-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
346 lines (243 loc) · 10.4 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
declare module "react-native-shake" {
export function start(apiKey: string): Promise<void>;
export function show(): void;
export function show(shakeScreen: ShakeScreen): void;
export function setUserFeedbackEnabled(enabled: boolean): void;
export function isUserFeedbackEnabled(): Promise<boolean>;
export function setEnableActivityHistory(activityHistoryEnabled: boolean): void;
export function isEnableActivityHistory(): Promise<boolean>;
export function setEnableBlackBox(blackBoxEnabled: boolean): void;
export function isEnableBlackBox(): Promise<boolean>;
export function setShowFloatingReportButton(floatingButtonEnabled: boolean): void;
export function isShowFloatingReportButton(): Promise<boolean>;
export function setInvokeShakeOnShakeDeviceEvent(shakeInvokeEnabled: boolean): void;
export function isInvokeShakeOnShakeDeviceEvent(): Promise<boolean>;
export function setInvokeShakeOnScreenshot(screenshotInvokeEnabled: boolean): void;
export function isInvokeShakeOnScreenshot(): Promise<boolean>;
export function getDefaultScreen(): Promise<ShakeScreen>;
export function setDefaultScreen(shakeScreen: ShakeScreen): void;
export function getShakeForm(): Promise<ShakeForm>;
export function setShakeForm(shakeForm?: ShakeForm): void;
export function setShakeTheme(shakeTheme: ShakeTheme): void;
export function setHomeSubtitle(subtitle: String): void;
export function setHomeActions(actions: Array<ShakeBaseAction>): void;
export function getShowIntroMessage(): Promise<boolean>;
export function setShowIntroMessage(showIntroMessage: boolean): void;
export function isAutoVideoRecording(): Promise<boolean>;
export function setAutoVideoRecording(videoRecordingEnabled: boolean): void;
export function isConsoleLogsEnabled(): Promise<boolean>;
export function setConsoleLogsEnabled(consoleLogsEnabled: boolean): void;
export function isNetworkRequestsEnabled(): Promise<boolean>;
export function setNetworkRequestsEnabled(networkRequestsEnabled: boolean): void;
export function insertNetworkRequest(requestBuilder: NetworkRequestBuilder): void;
export function setNetworkRequestsFilter(
filter?: (requestBuilder: NetworkRequestBuilder) => NetworkRequestBuilder
): void;
export function insertNotificationEvent(notificationBuilder: NotificationEventBuilder): void;
export function setNotificationEventsFilter(
filter?: (notificationBuilder: NotificationEventBuilder) => NotificationEventBuilder
): void;
export function setUnreadMessagesListener(
listener?: (count: number) => void
): void;
export function setShakeOpenListener(
listener?: () => void
): void;
export function setShakeDismissListener(
listener?: () => void
): void;
export function setShakeSubmitListener(
listener?: (type: string, fields: { [key: string]: string; } ) => void
): void;
export function setShakeReportData(files: Array<ShakeFile>): void;
export function isSensitiveDataRedactionEnabled(): Promise<boolean>;
export function setSensitiveDataRedactionEnabled(sensitiveDataRedactionEnabled: boolean): void;
export function isScreenshotIncluded(): Promise<boolean>;
export function setScreenshotIncluded(screenshotIncluded: boolean): void;
export function getShakingThreshold(): Promise<number>;
export function setShakingThreshold(shakingThreshold: number): void;
export function silentReport(
description: string,
files: Array<ShakeFile>,
configuration: ShakeReportConfiguration
): void;
export function log(logLevel: LogLevel, message: string): void;
export function setMetadata(key: string, value: string): void;
export function clearMetadata(): void;
export function addPrivateView(viewRef: object): void;
export function removePrivateView(viewRef: object): void;
export function clearPrivateViews(): void;
export function showNotificationsSettings(): void;
export function registerUser(id: string): void;
export function updateUserId(id: string): void;
export function updateUserMetadata(metadata: object): void;
export function unregisterUser(): void;
export function setPushNotificationsToken(token: string): void;
export function showChatNotification(data: { [key: string]: string }): void;
export function setTags(tags: Array<String>): void;
export class ShakeReportConfiguration {
blackBoxData: boolean;
activityHistoryData: boolean;
screenshot: boolean;
video: boolean
showReportSentMessage: boolean;
}
export class NotificationEvent {
id: string;
title: string;
description: string;
}
export class NetworkRequest {
url: string;
method: string;
requestBody: string;
responseBody: string;
requestHeaders: object;
responseHeaders: object;
statusCode: string;
duration: number;
timestamp: string;
}
export class NotificationEventBuilder {
getId: () => string;
setId: (id: string) => NotificationEventBuilder;
getTitle: () => string;
setTitle: (title: string) => NotificationEventBuilder;
getDescription: () => string;
setDescription: (description: string) => NotificationEventBuilder;
build: () => NotificationEvent;
}
export class NetworkRequestBuilder {
getUrl: () => string;
setUrl: (url: string) => NetworkRequestBuilder;
getMethod: () => string;
setMethod: (method: string) => NetworkRequestBuilder;
getRequestBody: () => string;
setRequestBody: (requestBody: string) => NetworkRequestBuilder;
getResponseBody: () => string;
setResponseBody: (responseBody: string) => NetworkRequestBuilder;
getRequestHeaders: () => { [key: string]: string };
setRequestHeaders: (requestHeaders: { [key: string]: string }) => NetworkRequestBuilder;
getResponseHeaders: () => { [key: string]: string };
setResponseHeaders: (responseHeaders: { [key: string]: string }) => NetworkRequestBuilder;
getStatusCode: () => string;
setStatusCode: (statusCode: string) => NetworkRequestBuilder;
getDuration: () => string;
setDuration: (duration: number) => NetworkRequestBuilder;
getDate: () => Date;
setDate: (date: Date) => NetworkRequestBuilder;
build: () => NetworkRequest;
}
export class ShakeFile {
name: string;
path: string;
}
export namespace ShakeFile {
function create(filePath: string, fileName?: string): ShakeFile;
}
export class LogLevel {
static VERBOSE: LogLevel;
static DEBUG: LogLevel;
static INFO: LogLevel;
static WARN: LogLevel;
static ERROR: LogLevel;
value: string;
}
export class ShakeScreen {
static HOME: ShakeScreen;
static NEW: ShakeScreen;
static CHAT: ShakeScreen;
value: string;
}
export class ShakeForm {
components: Array<ShakeFormComponent>;
constructor(components: Array<ShakeFormComponent>);
}
export class ShakeTheme {
fontFamilyMedium: string | null;
fontFamilyBold: string | null;
backgroundColor: string | null;
secondaryBackgroundColor: string | null;
textColor: string | null;
secondaryTextColor: string | null;
accentColor: string | null;
accentTextColor: string | null;
outlineColor: string | null;
borderRadius: number | null;
elevation: number | null;
shadowOffset: { width: number, height: number } | null;
shadowOpacity: number | null;
shadowRadius: number | null;
constructor();
}
export class ShakeFormComponent {
type: string;
constructor(type: string);
}
export class ShakeTitle extends ShakeFormComponent {
key: string;
label: string | null;
labelRes: string | null;
initialValue: string | null;
required: boolean;
constructor(key: string, label: string, initialValue?: string | null, required?: boolean);
}
export class ShakeTextInput extends ShakeFormComponent {
key: string;
label: string | null;
labelRes: string | null;
initialValue: string | null;
required: boolean;
constructor(key: string, label: string, initialValue?: string | null, required?: boolean);
}
export class ShakeEmail extends ShakeFormComponent {
key: string;
label: string | null;
labelRes: string | null;
initialValue: string | null;
required: boolean;
constructor(key: string, label: string, initialValue?: string | null, required?: boolean);
}
export class ShakePicker extends ShakeFormComponent {
key: string;
label: string | null;
labelRes: string | null;
items: Array<ShakePickerItem>;
constructor(key: string, label: string, items: Array<ShakePickerItem>);
}
export class ShakePickerItem {
key: string;
text: string | null;
textRes: string | null;
icon: string | null;
iconRes: string | null;
tag: string | null;
constructor(key: string, text: string, icon?: string | null, tag?: string | null);
}
export class ShakeAttachments extends ShakeFormComponent {
constructor();
}
export class ShakeInspectButton extends ShakeFormComponent{
constructor();
}
export class ShakeBaseAction {
type: string;
constructor(type: string)
}
export class ShakeHomeAction extends ShakeBaseAction {
title: string | null;
titleRes: string | null;
subtitle: string | null;
subtitleRes: string | null;
icon: string | null;
iconRes: string | null;
handler: ()=>void | null;
constructor(title: string, subtitle?: string | null, icon?: string | null, handler?: ()=>void | null);
}
export class ShakeChatAction extends ShakeBaseAction {
constructor(title?: string | null, subtitle?: string | null, icon?: string | null);
}
export class ShakeSubmitAction extends ShakeBaseAction {
constructor(title?: string | null, subtitle?: string | null, icon?: string | null);
}
}