capacitor-gleap-plugin 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/docs.json ADDED
@@ -0,0 +1,411 @@
1
+ {
2
+ "api": {
3
+ "name": "GleapPlugin",
4
+ "slug": "gleapplugin",
5
+ "docs": "",
6
+ "tags": [],
7
+ "methods": [
8
+ {
9
+ "name": "initialize",
10
+ "signature": "(options: { API_KEY: string; }) => any",
11
+ "parameters": [
12
+ {
13
+ "name": "options",
14
+ "docs": "",
15
+ "type": "{ API_KEY: string; }"
16
+ }
17
+ ],
18
+ "returns": "any",
19
+ "tags": [
20
+ {
21
+ "name": "since",
22
+ "text": "7.0.0"
23
+ }
24
+ ],
25
+ "docs": "Initialize Gleap with an API key",
26
+ "complexTypes": [],
27
+ "slug": "initialize"
28
+ },
29
+ {
30
+ "name": "identify",
31
+ "signature": "(options: { userId: string; userHash?: string; name?: string; email?: string; phone?: string; value?: number; }) => any",
32
+ "parameters": [
33
+ {
34
+ "name": "options",
35
+ "docs": "",
36
+ "type": "{ userId: string; userHash?: string | undefined; name?: string | undefined; email?: string | undefined; phone?: string | undefined; value?: number | undefined; }"
37
+ }
38
+ ],
39
+ "returns": "any",
40
+ "tags": [
41
+ {
42
+ "name": "since",
43
+ "text": "7.0.0"
44
+ }
45
+ ],
46
+ "docs": "Set user identity",
47
+ "complexTypes": [],
48
+ "slug": "identify"
49
+ },
50
+ {
51
+ "name": "clearIdentity",
52
+ "signature": "() => any",
53
+ "parameters": [],
54
+ "returns": "any",
55
+ "tags": [
56
+ {
57
+ "name": "since",
58
+ "text": "7.0.0"
59
+ }
60
+ ],
61
+ "docs": "Clear user identity",
62
+ "complexTypes": [],
63
+ "slug": "clearidentity"
64
+ },
65
+ {
66
+ "name": "log",
67
+ "signature": "(options: { message: string; logLevel?: \"ERROR\" | \"WARNING\" | \"INFO\"; }) => any",
68
+ "parameters": [
69
+ {
70
+ "name": "options",
71
+ "docs": "",
72
+ "type": "{ message: string; logLevel?: \"ERROR\" | \"WARNING\" | \"INFO\" | undefined; }"
73
+ }
74
+ ],
75
+ "returns": "any",
76
+ "tags": [
77
+ {
78
+ "name": "since",
79
+ "text": "7.0.0"
80
+ }
81
+ ],
82
+ "docs": "Submit a custom log message with the given level",
83
+ "complexTypes": [],
84
+ "slug": "log"
85
+ },
86
+ {
87
+ "name": "attachCustomData",
88
+ "signature": "(options: { data: any; }) => any",
89
+ "parameters": [
90
+ {
91
+ "name": "options",
92
+ "docs": "",
93
+ "type": "{ data: any; }"
94
+ }
95
+ ],
96
+ "returns": "any",
97
+ "tags": [
98
+ {
99
+ "name": "since",
100
+ "text": "7.0.0"
101
+ }
102
+ ],
103
+ "docs": "Add custom data",
104
+ "complexTypes": [],
105
+ "slug": "attachcustomdata"
106
+ },
107
+ {
108
+ "name": "setCustomData",
109
+ "signature": "(options: { key: string; value: string; }) => any",
110
+ "parameters": [
111
+ {
112
+ "name": "options",
113
+ "docs": "",
114
+ "type": "{ key: string; value: string; }"
115
+ }
116
+ ],
117
+ "returns": "any",
118
+ "tags": [
119
+ {
120
+ "name": "since",
121
+ "text": "7.0.0"
122
+ }
123
+ ],
124
+ "docs": "Set custom data",
125
+ "complexTypes": [],
126
+ "slug": "setcustomdata"
127
+ },
128
+ {
129
+ "name": "removeCustomData",
130
+ "signature": "(options: { key: string; }) => any",
131
+ "parameters": [
132
+ {
133
+ "name": "options",
134
+ "docs": "",
135
+ "type": "{ key: string; }"
136
+ }
137
+ ],
138
+ "returns": "any",
139
+ "tags": [
140
+ {
141
+ "name": "since",
142
+ "text": "7.0.0"
143
+ }
144
+ ],
145
+ "docs": "Remove custom data by key",
146
+ "complexTypes": [],
147
+ "slug": "removecustomdata"
148
+ },
149
+ {
150
+ "name": "clearCustomData",
151
+ "signature": "() => any",
152
+ "parameters": [],
153
+ "returns": "any",
154
+ "tags": [
155
+ {
156
+ "name": "since",
157
+ "text": "7.0.0"
158
+ }
159
+ ],
160
+ "docs": "Clear custom data",
161
+ "complexTypes": [],
162
+ "slug": "clearcustomdata"
163
+ },
164
+ {
165
+ "name": "logEvent",
166
+ "signature": "(options: { name: string; data?: any; }) => any",
167
+ "parameters": [
168
+ {
169
+ "name": "options",
170
+ "docs": "",
171
+ "type": "{ name: string; data?: any; }"
172
+ }
173
+ ],
174
+ "returns": "any",
175
+ "tags": [
176
+ {
177
+ "name": "since",
178
+ "text": "7.0.0"
179
+ }
180
+ ],
181
+ "docs": "Log event to Gleap",
182
+ "complexTypes": [],
183
+ "slug": "logevent"
184
+ },
185
+ {
186
+ "name": "setEventCallback",
187
+ "signature": "(callback: GleapEventCallback) => any",
188
+ "parameters": [
189
+ {
190
+ "name": "callback",
191
+ "docs": "",
192
+ "type": "(name: string, data?: any) => void"
193
+ }
194
+ ],
195
+ "returns": "any",
196
+ "tags": [
197
+ {
198
+ "name": "since",
199
+ "text": "7.0.0"
200
+ }
201
+ ],
202
+ "docs": "",
203
+ "complexTypes": [
204
+ "GleapEventCallback",
205
+ "CallbackID"
206
+ ],
207
+ "slug": "seteventcallback"
208
+ },
209
+ {
210
+ "name": "sendSilentCrashReport",
211
+ "signature": "(options: { description: string; severity?: \"LOW\" | \"MEDIUM\" | \"HIGH\"; dataExclusion?: { customData: Boolean; metaData: Boolean; attachments: Boolean; consoleLog: Boolean; networkLogs: Boolean; customEventLog: Boolean; screenshot: Boolean; replays: Boolean; }; }) => any",
212
+ "parameters": [
213
+ {
214
+ "name": "options",
215
+ "docs": "",
216
+ "type": "{ description: string; severity?: \"LOW\" | \"MEDIUM\" | \"HIGH\" | undefined; dataExclusion?: { customData: any; metaData: any; attachments: any; consoleLog: any; networkLogs: any; customEventLog: any; screenshot: any; replays: any; } | undefined; }"
217
+ }
218
+ ],
219
+ "returns": "any",
220
+ "tags": [
221
+ {
222
+ "name": "since",
223
+ "text": "7.0.0"
224
+ }
225
+ ],
226
+ "docs": "Log event to Gleap",
227
+ "complexTypes": [
228
+ "Boolean"
229
+ ],
230
+ "slug": "sendsilentcrashreport"
231
+ },
232
+ {
233
+ "name": "preFillForm",
234
+ "signature": "(options: { data: any; }) => any",
235
+ "parameters": [
236
+ {
237
+ "name": "options",
238
+ "docs": "",
239
+ "type": "{ data: any; }"
240
+ }
241
+ ],
242
+ "returns": "any",
243
+ "tags": [
244
+ {
245
+ "name": "since",
246
+ "text": "7.0.0"
247
+ }
248
+ ],
249
+ "docs": "Prefills the widget's form data",
250
+ "complexTypes": [],
251
+ "slug": "prefillform"
252
+ },
253
+ {
254
+ "name": "addAttachment",
255
+ "signature": "(options: { base64data: string; name: string; }) => any",
256
+ "parameters": [
257
+ {
258
+ "name": "options",
259
+ "docs": "",
260
+ "type": "{ base64data: string; name: string; }"
261
+ }
262
+ ],
263
+ "returns": "any",
264
+ "tags": [
265
+ {
266
+ "name": "since",
267
+ "text": "7.0.0"
268
+ }
269
+ ],
270
+ "docs": "Add attachment as bas64 string",
271
+ "complexTypes": [],
272
+ "slug": "addattachment"
273
+ },
274
+ {
275
+ "name": "removeAllAttachments",
276
+ "signature": "() => any",
277
+ "parameters": [],
278
+ "returns": "any",
279
+ "tags": [
280
+ {
281
+ "name": "since",
282
+ "text": "7.0.0"
283
+ }
284
+ ],
285
+ "docs": "All attachments removed",
286
+ "complexTypes": [],
287
+ "slug": "removeallattachments"
288
+ },
289
+ {
290
+ "name": "open",
291
+ "signature": "() => any",
292
+ "parameters": [],
293
+ "returns": "any",
294
+ "tags": [
295
+ {
296
+ "name": "since",
297
+ "text": "7.0.0"
298
+ }
299
+ ],
300
+ "docs": "Open widget",
301
+ "complexTypes": [],
302
+ "slug": "open"
303
+ },
304
+ {
305
+ "name": "close",
306
+ "signature": "() => any",
307
+ "parameters": [],
308
+ "returns": "any",
309
+ "tags": [
310
+ {
311
+ "name": "since",
312
+ "text": "7.0.0"
313
+ }
314
+ ],
315
+ "docs": "Close widget",
316
+ "complexTypes": [],
317
+ "slug": "close"
318
+ },
319
+ {
320
+ "name": "isOpened",
321
+ "signature": "() => any",
322
+ "parameters": [],
323
+ "returns": "any",
324
+ "tags": [
325
+ {
326
+ "name": "since",
327
+ "text": "7.0.0"
328
+ }
329
+ ],
330
+ "docs": "Check widget status code",
331
+ "complexTypes": [],
332
+ "slug": "isopened"
333
+ },
334
+ {
335
+ "name": "startFeedbackFlow",
336
+ "signature": "(options: { feedbackFlow?: string; showBackButton?: boolean; }) => any",
337
+ "parameters": [
338
+ {
339
+ "name": "options",
340
+ "docs": "",
341
+ "type": "{ feedbackFlow?: string | undefined; showBackButton?: boolean | undefined; }"
342
+ }
343
+ ],
344
+ "returns": "any",
345
+ "tags": [
346
+ {
347
+ "name": "since",
348
+ "text": "7.0.0"
349
+ }
350
+ ],
351
+ "docs": "Start Feedback flow",
352
+ "complexTypes": [],
353
+ "slug": "startfeedbackflow"
354
+ },
355
+ {
356
+ "name": "setLanguage",
357
+ "signature": "(options: { languageCode: string; }) => any",
358
+ "parameters": [
359
+ {
360
+ "name": "options",
361
+ "docs": "",
362
+ "type": "{ languageCode: string; }"
363
+ }
364
+ ],
365
+ "returns": "any",
366
+ "tags": [
367
+ {
368
+ "name": "since",
369
+ "text": "7.0.0"
370
+ }
371
+ ],
372
+ "docs": "Set Language",
373
+ "complexTypes": [],
374
+ "slug": "setlanguage"
375
+ },
376
+ {
377
+ "name": "disableConsoleLogOverwrite",
378
+ "signature": "() => any",
379
+ "parameters": [],
380
+ "returns": "any",
381
+ "tags": [
382
+ {
383
+ "name": "since",
384
+ "text": "7.0.0"
385
+ }
386
+ ],
387
+ "docs": "Disable console log overwrite",
388
+ "complexTypes": [],
389
+ "slug": "disableconsolelogoverwrite"
390
+ },
391
+ {
392
+ "name": "enableDebugConsoleLog",
393
+ "signature": "() => any",
394
+ "parameters": [],
395
+ "returns": "any",
396
+ "tags": [
397
+ {
398
+ "name": "since",
399
+ "text": "7.0.0"
400
+ }
401
+ ],
402
+ "docs": "Enable debug console log",
403
+ "complexTypes": [],
404
+ "slug": "enabledebugconsolelog"
405
+ }
406
+ ],
407
+ "properties": []
408
+ },
409
+ "interfaces": [],
410
+ "enums": []
411
+ }
@@ -0,0 +1,215 @@
1
+ export declare type CallbackID = string;
2
+ export declare type GleapEventCallback = (name: string, data?: any) => void;
3
+ export interface GleapPlugin {
4
+ /**
5
+ * Initialize Gleap with an API key
6
+ *
7
+ * @since 7.0.0
8
+ */
9
+ initialize(options: {
10
+ API_KEY: string;
11
+ }): Promise<{
12
+ initialized: boolean;
13
+ }>;
14
+ /**
15
+ * Set user identity
16
+ *
17
+ * @since 7.0.0
18
+ */
19
+ identify(options: {
20
+ userId: string;
21
+ userHash?: string;
22
+ name?: string;
23
+ email?: string;
24
+ phone?: string;
25
+ value?: number;
26
+ }): Promise<{
27
+ identify: boolean;
28
+ }>;
29
+ /**
30
+ * Clear user identity
31
+ *
32
+ * @since 7.0.0
33
+ */
34
+ clearIdentity(): Promise<{
35
+ clearIdentity: boolean;
36
+ }>;
37
+ /**
38
+ * Submit a custom log message with the given level
39
+ *
40
+ * @since 7.0.0
41
+ */
42
+ log(options: {
43
+ message: string;
44
+ logLevel?: "ERROR" | "WARNING" | "INFO";
45
+ }): Promise<{
46
+ logged: boolean;
47
+ }>;
48
+ /**
49
+ * Add custom data
50
+ *
51
+ * @since 7.0.0
52
+ */
53
+ attachCustomData(options: {
54
+ data: any;
55
+ }): Promise<{
56
+ attachedCustomData: boolean;
57
+ }>;
58
+ /**
59
+ * Set custom data
60
+ *
61
+ * @since 7.0.0
62
+ */
63
+ setCustomData(options: {
64
+ key: string;
65
+ value: string;
66
+ }): Promise<{
67
+ setCustomData: boolean;
68
+ }>;
69
+ /**
70
+ * Remove custom data by key
71
+ *
72
+ * @since 7.0.0
73
+ */
74
+ removeCustomData(options: {
75
+ key: string;
76
+ }): Promise<{
77
+ removedCustomData: boolean;
78
+ }>;
79
+ /**
80
+ * Clear custom data
81
+ *
82
+ * @since 7.0.0
83
+ */
84
+ clearCustomData(): Promise<{
85
+ clearedCustomData: boolean;
86
+ }>;
87
+ /**
88
+ * Log event to Gleap
89
+ *
90
+ * @since 7.0.0
91
+ */
92
+ logEvent(options: {
93
+ name: string;
94
+ data?: any;
95
+ }): Promise<{
96
+ loggedEvent: boolean;
97
+ }>;
98
+ /**
99
+ *
100
+ *
101
+ * @since 7.0.0
102
+ */
103
+ setEventCallback(callback: GleapEventCallback): Promise<CallbackID>;
104
+ /**
105
+ * Log event to Gleap
106
+ *
107
+ * @since 7.0.0
108
+ */
109
+ sendSilentCrashReport(options: {
110
+ description: string;
111
+ severity?: "LOW" | "MEDIUM" | "HIGH";
112
+ dataExclusion?: {
113
+ customData: Boolean;
114
+ metaData: Boolean;
115
+ attachments: Boolean;
116
+ consoleLog: Boolean;
117
+ networkLogs: Boolean;
118
+ customEventLog: Boolean;
119
+ screenshot: Boolean;
120
+ replays: Boolean;
121
+ };
122
+ }): Promise<{
123
+ sentSilentBugReport: boolean;
124
+ }>;
125
+ /**
126
+ * Prefills the widget's form data
127
+ *
128
+ * @since 7.0.0
129
+ */
130
+ preFillForm(options: {
131
+ data: any;
132
+ }): Promise<{
133
+ preFilledForm: boolean;
134
+ }>;
135
+ /**
136
+ * Add attachment as bas64 string
137
+ *
138
+ * @since 7.0.0
139
+ */
140
+ addAttachment(options: {
141
+ base64data: string;
142
+ name: string;
143
+ }): Promise<{
144
+ attachmentAdded: boolean;
145
+ }>;
146
+ /**
147
+ * All attachments removed
148
+ *
149
+ * @since 7.0.0
150
+ */
151
+ removeAllAttachments(): Promise<{
152
+ allAttachmentsRemoved: boolean;
153
+ }>;
154
+ /**
155
+ * Open widget
156
+ *
157
+ * @since 7.0.0
158
+ */
159
+ open(): Promise<{
160
+ openedWidget: boolean;
161
+ }>;
162
+ /**
163
+ * Close widget
164
+ *
165
+ * @since 7.0.0
166
+ */
167
+ close(): Promise<{
168
+ closedWidget: boolean;
169
+ }>;
170
+ /**
171
+ * Check widget status code
172
+ *
173
+ * @since 7.0.0
174
+ */
175
+ isOpened(): Promise<{
176
+ isOpened: boolean;
177
+ }>;
178
+ /**
179
+ * Start Feedback flow
180
+ *
181
+ * @since 7.0.0
182
+ */
183
+ startFeedbackFlow(options: {
184
+ feedbackFlow?: string;
185
+ showBackButton?: boolean;
186
+ }): Promise<{
187
+ startedFeedbackFlow: boolean;
188
+ }>;
189
+ /**
190
+ * Set Language
191
+ *
192
+ * @since 7.0.0
193
+ */
194
+ setLanguage(options: {
195
+ languageCode: string;
196
+ }): Promise<{
197
+ setLanguage: string;
198
+ }>;
199
+ /**
200
+ * Disable console log overwrite
201
+ *
202
+ * @since 7.0.0
203
+ */
204
+ disableConsoleLogOverwrite(): Promise<{
205
+ consoleLogDisabled: boolean;
206
+ }>;
207
+ /**
208
+ * Enable debug console log
209
+ *
210
+ * @since 7.0.0
211
+ */
212
+ enableDebugConsoleLog(): Promise<{
213
+ debugConsoleLogEnabled: boolean;
214
+ }>;
215
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { GleapPlugin } from './definitions';
2
+ declare const Gleap: GleapPlugin;
3
+ export * from './definitions';
4
+ export { Gleap };
@@ -0,0 +1,7 @@
1
+ import { registerPlugin } from '@capacitor/core';
2
+ const Gleap = registerPlugin('Gleap', {
3
+ web: () => import('./web').then(m => new m.GleapWeb()),
4
+ });
5
+ export * from './definitions';
6
+ export { Gleap };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,KAAK,GAAG,cAAc,CAAc,OAAO,EAAE;IACjD,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;CACvD,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,CAAC"}