@capgo/capacitor-rudderstack 8.1.2

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,525 @@
1
+ {
2
+ "api": {
3
+ "name": "RudderStackPlugin",
4
+ "slug": "rudderstackplugin",
5
+ "docs": "Capacitor API that mirrors the public surface of `rudder-sdk-cordova`.",
6
+ "tags": [],
7
+ "methods": [
8
+ {
9
+ "name": "initialize",
10
+ "signature": "(writeKey: string, config?: RudderConfiguration | RudderOptions | undefined, options?: RudderOptions | undefined) => Promise<void>",
11
+ "parameters": [
12
+ {
13
+ "name": "writeKey",
14
+ "docs": "",
15
+ "type": "string"
16
+ },
17
+ {
18
+ "name": "config",
19
+ "docs": "",
20
+ "type": "RudderConfiguration | RudderOptions | undefined"
21
+ },
22
+ {
23
+ "name": "options",
24
+ "docs": "",
25
+ "type": "RudderOptions | undefined"
26
+ }
27
+ ],
28
+ "returns": "Promise<void>",
29
+ "tags": [],
30
+ "docs": "Initializes the RudderStack client.\n\nThe method keeps the Cordova signature, so the second argument may be either a config object or\na Rudder options object.",
31
+ "complexTypes": [
32
+ "RudderConfiguration",
33
+ "RudderOptions"
34
+ ],
35
+ "slug": "initialize"
36
+ },
37
+ {
38
+ "name": "identify",
39
+ "signature": "(userId: string, traits?: RudderOptions | RudderTraits | undefined, options?: RudderOptions | undefined) => Promise<void>",
40
+ "parameters": [
41
+ {
42
+ "name": "userId",
43
+ "docs": "",
44
+ "type": "string"
45
+ },
46
+ {
47
+ "name": "traits",
48
+ "docs": "",
49
+ "type": "RudderOptions | RudderTraits | undefined"
50
+ },
51
+ {
52
+ "name": "options",
53
+ "docs": "",
54
+ "type": "RudderOptions | undefined"
55
+ }
56
+ ],
57
+ "returns": "Promise<void>",
58
+ "tags": [],
59
+ "docs": "Sends an identify call for the provided user id.",
60
+ "complexTypes": [
61
+ "RudderTraits",
62
+ "RudderOptions"
63
+ ],
64
+ "slug": "identify"
65
+ },
66
+ {
67
+ "name": "group",
68
+ "signature": "(groupId: string, groupTraits?: RudderOptions | RudderTraits | undefined, options?: RudderOptions | undefined) => Promise<void>",
69
+ "parameters": [
70
+ {
71
+ "name": "groupId",
72
+ "docs": "",
73
+ "type": "string"
74
+ },
75
+ {
76
+ "name": "groupTraits",
77
+ "docs": "",
78
+ "type": "RudderOptions | RudderTraits | undefined"
79
+ },
80
+ {
81
+ "name": "options",
82
+ "docs": "",
83
+ "type": "RudderOptions | undefined"
84
+ }
85
+ ],
86
+ "returns": "Promise<void>",
87
+ "tags": [],
88
+ "docs": "Sends a group call for the provided group id.",
89
+ "complexTypes": [
90
+ "RudderTraits",
91
+ "RudderOptions"
92
+ ],
93
+ "slug": "group"
94
+ },
95
+ {
96
+ "name": "track",
97
+ "signature": "(eventName: string, properties?: RudderOptions | RudderProperties | undefined, options?: RudderOptions | undefined) => Promise<void>",
98
+ "parameters": [
99
+ {
100
+ "name": "eventName",
101
+ "docs": "",
102
+ "type": "string"
103
+ },
104
+ {
105
+ "name": "properties",
106
+ "docs": "",
107
+ "type": "RudderOptions | RudderProperties | undefined"
108
+ },
109
+ {
110
+ "name": "options",
111
+ "docs": "",
112
+ "type": "RudderOptions | undefined"
113
+ }
114
+ ],
115
+ "returns": "Promise<void>",
116
+ "tags": [],
117
+ "docs": "Sends a track call for the provided event name.",
118
+ "complexTypes": [
119
+ "RudderProperties",
120
+ "RudderOptions"
121
+ ],
122
+ "slug": "track"
123
+ },
124
+ {
125
+ "name": "screen",
126
+ "signature": "(screenName: string, properties?: RudderOptions | RudderProperties | undefined, options?: RudderOptions | undefined) => Promise<void>",
127
+ "parameters": [
128
+ {
129
+ "name": "screenName",
130
+ "docs": "",
131
+ "type": "string"
132
+ },
133
+ {
134
+ "name": "properties",
135
+ "docs": "",
136
+ "type": "RudderOptions | RudderProperties | undefined"
137
+ },
138
+ {
139
+ "name": "options",
140
+ "docs": "",
141
+ "type": "RudderOptions | undefined"
142
+ }
143
+ ],
144
+ "returns": "Promise<void>",
145
+ "tags": [],
146
+ "docs": "Sends a screen call for the provided screen name.",
147
+ "complexTypes": [
148
+ "RudderProperties",
149
+ "RudderOptions"
150
+ ],
151
+ "slug": "screen"
152
+ },
153
+ {
154
+ "name": "alias",
155
+ "signature": "(newId: string, options?: RudderOptions | undefined) => Promise<void>",
156
+ "parameters": [
157
+ {
158
+ "name": "newId",
159
+ "docs": "",
160
+ "type": "string"
161
+ },
162
+ {
163
+ "name": "options",
164
+ "docs": "",
165
+ "type": "RudderOptions | undefined"
166
+ }
167
+ ],
168
+ "returns": "Promise<void>",
169
+ "tags": [],
170
+ "docs": "Aliases the current user to a new identifier.",
171
+ "complexTypes": [
172
+ "RudderOptions"
173
+ ],
174
+ "slug": "alias"
175
+ },
176
+ {
177
+ "name": "reset",
178
+ "signature": "() => Promise<void>",
179
+ "parameters": [],
180
+ "returns": "Promise<void>",
181
+ "tags": [],
182
+ "docs": "Resets the current RudderStack identity state.",
183
+ "complexTypes": [],
184
+ "slug": "reset"
185
+ },
186
+ {
187
+ "name": "flush",
188
+ "signature": "() => Promise<void>",
189
+ "parameters": [],
190
+ "returns": "Promise<void>",
191
+ "tags": [],
192
+ "docs": "Flushes queued events immediately.",
193
+ "complexTypes": [],
194
+ "slug": "flush"
195
+ },
196
+ {
197
+ "name": "putDeviceToken",
198
+ "signature": "(deviceToken: string) => Promise<void>",
199
+ "parameters": [
200
+ {
201
+ "name": "deviceToken",
202
+ "docs": "",
203
+ "type": "string"
204
+ }
205
+ ],
206
+ "returns": "Promise<void>",
207
+ "tags": [],
208
+ "docs": "Sets the push token that RudderStack forwards to supported destinations.",
209
+ "complexTypes": [],
210
+ "slug": "putdevicetoken"
211
+ },
212
+ {
213
+ "name": "setAdvertisingId",
214
+ "signature": "(advertisingId: string) => Promise<void>",
215
+ "parameters": [
216
+ {
217
+ "name": "advertisingId",
218
+ "docs": "",
219
+ "type": "string"
220
+ }
221
+ ],
222
+ "returns": "Promise<void>",
223
+ "tags": [
224
+ {
225
+ "name": "deprecated",
226
+ "text": "Use `putAdvertisingId` instead."
227
+ }
228
+ ],
229
+ "docs": "",
230
+ "complexTypes": [],
231
+ "slug": "setadvertisingid"
232
+ },
233
+ {
234
+ "name": "putAdvertisingId",
235
+ "signature": "(advertisingId: string) => Promise<void>",
236
+ "parameters": [
237
+ {
238
+ "name": "advertisingId",
239
+ "docs": "",
240
+ "type": "string"
241
+ }
242
+ ],
243
+ "returns": "Promise<void>",
244
+ "tags": [],
245
+ "docs": "Sets a custom advertising id value.",
246
+ "complexTypes": [],
247
+ "slug": "putadvertisingid"
248
+ },
249
+ {
250
+ "name": "setAnonymousId",
251
+ "signature": "(anonymousId: string) => Promise<void>",
252
+ "parameters": [
253
+ {
254
+ "name": "anonymousId",
255
+ "docs": "",
256
+ "type": "string"
257
+ }
258
+ ],
259
+ "returns": "Promise<void>",
260
+ "tags": [
261
+ {
262
+ "name": "deprecated",
263
+ "text": "Use `putAnonymousId` instead."
264
+ }
265
+ ],
266
+ "docs": "",
267
+ "complexTypes": [],
268
+ "slug": "setanonymousid"
269
+ },
270
+ {
271
+ "name": "putAnonymousId",
272
+ "signature": "(anonymousId: string) => Promise<void>",
273
+ "parameters": [
274
+ {
275
+ "name": "anonymousId",
276
+ "docs": "",
277
+ "type": "string"
278
+ }
279
+ ],
280
+ "returns": "Promise<void>",
281
+ "tags": [],
282
+ "docs": "Sets a custom anonymous id value.",
283
+ "complexTypes": [],
284
+ "slug": "putanonymousid"
285
+ },
286
+ {
287
+ "name": "optOut",
288
+ "signature": "(optOut: boolean) => Promise<void>",
289
+ "parameters": [
290
+ {
291
+ "name": "optOut",
292
+ "docs": "",
293
+ "type": "boolean"
294
+ }
295
+ ],
296
+ "returns": "Promise<void>",
297
+ "tags": [],
298
+ "docs": "Toggles RudderStack tracking opt-out.",
299
+ "complexTypes": [],
300
+ "slug": "optout"
301
+ },
302
+ {
303
+ "name": "getPluginVersion",
304
+ "signature": "() => Promise<PluginVersionResult>",
305
+ "parameters": [],
306
+ "returns": "Promise<PluginVersionResult>",
307
+ "tags": [],
308
+ "docs": "Returns the plugin version marker from the native implementation.",
309
+ "complexTypes": [
310
+ "PluginVersionResult"
311
+ ],
312
+ "slug": "getpluginversion"
313
+ }
314
+ ],
315
+ "properties": []
316
+ },
317
+ "interfaces": [
318
+ {
319
+ "name": "RudderConfiguration",
320
+ "slug": "rudderconfiguration",
321
+ "docs": "Supported configuration keys for the underlying RudderStack native SDKs.",
322
+ "tags": [],
323
+ "methods": [],
324
+ "properties": [
325
+ {
326
+ "name": "dataPlaneUrl",
327
+ "tags": [],
328
+ "docs": "RudderStack data plane URL.",
329
+ "complexTypes": [],
330
+ "type": "string | undefined"
331
+ },
332
+ {
333
+ "name": "flushQueueSize",
334
+ "tags": [],
335
+ "docs": "Number of events to batch before a flush.",
336
+ "complexTypes": [],
337
+ "type": "number | undefined"
338
+ },
339
+ {
340
+ "name": "dbCountThreshold",
341
+ "tags": [],
342
+ "docs": "Database row threshold that triggers pruning on Android and iOS.",
343
+ "complexTypes": [],
344
+ "type": "number | undefined"
345
+ },
346
+ {
347
+ "name": "configRefreshInterval",
348
+ "tags": [],
349
+ "docs": "Server config refresh interval in hours.",
350
+ "complexTypes": [],
351
+ "type": "number | undefined"
352
+ },
353
+ {
354
+ "name": "logLevel",
355
+ "tags": [],
356
+ "docs": "RudderStack log verbosity.",
357
+ "complexTypes": [
358
+ "RudderLogLevelValue"
359
+ ],
360
+ "type": "RudderLogLevelValue"
361
+ },
362
+ {
363
+ "name": "sleepTimeOut",
364
+ "tags": [],
365
+ "docs": "Sleep timeout / sleep count used by the native SDK.",
366
+ "complexTypes": [],
367
+ "type": "number | undefined"
368
+ },
369
+ {
370
+ "name": "autoCollectAdvertId",
371
+ "tags": [],
372
+ "docs": "Android only. Lets the native SDK collect the advertising identifier automatically.",
373
+ "complexTypes": [],
374
+ "type": "boolean | undefined"
375
+ },
376
+ {
377
+ "name": "trackLifecycleEvents",
378
+ "tags": [],
379
+ "docs": "Tracks `Application Installed`, `Application Updated`, and `Application Opened` automatically.",
380
+ "complexTypes": [],
381
+ "type": "boolean | undefined"
382
+ },
383
+ {
384
+ "name": "controlPlaneUrl",
385
+ "tags": [],
386
+ "docs": "RudderStack control plane URL.",
387
+ "complexTypes": [],
388
+ "type": "string | undefined"
389
+ },
390
+ {
391
+ "name": "recordScreenViews",
392
+ "tags": [],
393
+ "docs": "Enables automatic screen tracking where supported by the native SDK.",
394
+ "complexTypes": [],
395
+ "type": "boolean | undefined"
396
+ },
397
+ {
398
+ "name": "factories",
399
+ "tags": [],
400
+ "docs": "Ignored in this Capacitor port.\n\nThe Cordova SDK uses this field to bootstrap native destination factories from companion plugins.\nThose extension packages are not implemented in this first Capacitor release.",
401
+ "complexTypes": [],
402
+ "type": "any[] | undefined"
403
+ }
404
+ ]
405
+ },
406
+ {
407
+ "name": "RudderOptions",
408
+ "slug": "rudderoptions",
409
+ "docs": "RudderStack per-call options.",
410
+ "tags": [],
411
+ "methods": [],
412
+ "properties": [
413
+ {
414
+ "name": "externalIds",
415
+ "tags": [],
416
+ "docs": "External identifiers forwarded with the event.",
417
+ "complexTypes": [
418
+ "Record"
419
+ ],
420
+ "type": "Record<string, string>"
421
+ },
422
+ {
423
+ "name": "integrations",
424
+ "tags": [],
425
+ "docs": "Destination enablement flags keyed by integration name.",
426
+ "complexTypes": [
427
+ "Record"
428
+ ],
429
+ "type": "Record<string, boolean>"
430
+ }
431
+ ]
432
+ },
433
+ {
434
+ "name": "PluginVersionResult",
435
+ "slug": "pluginversionresult",
436
+ "docs": "Plugin version payload.",
437
+ "tags": [],
438
+ "methods": [],
439
+ "properties": [
440
+ {
441
+ "name": "version",
442
+ "tags": [],
443
+ "docs": "Version identifier returned by the platform implementation.",
444
+ "complexTypes": [],
445
+ "type": "string"
446
+ }
447
+ ]
448
+ }
449
+ ],
450
+ "enums": [],
451
+ "typeAliases": [
452
+ {
453
+ "name": "RudderLogLevelValue",
454
+ "slug": "rudderloglevelvalue",
455
+ "docs": "RudderStack log level values exposed for migration convenience.",
456
+ "types": [
457
+ {
458
+ "text": "0",
459
+ "complexTypes": []
460
+ },
461
+ {
462
+ "text": "1",
463
+ "complexTypes": []
464
+ },
465
+ {
466
+ "text": "2",
467
+ "complexTypes": []
468
+ },
469
+ {
470
+ "text": "3",
471
+ "complexTypes": []
472
+ },
473
+ {
474
+ "text": "4",
475
+ "complexTypes": []
476
+ },
477
+ {
478
+ "text": "5",
479
+ "complexTypes": []
480
+ }
481
+ ]
482
+ },
483
+ {
484
+ "name": "Record",
485
+ "slug": "record",
486
+ "docs": "Construct a type with a set of properties K of type T",
487
+ "types": [
488
+ {
489
+ "text": "{\r\n [P in K]: T;\r\n}",
490
+ "complexTypes": [
491
+ "K",
492
+ "T"
493
+ ]
494
+ }
495
+ ]
496
+ },
497
+ {
498
+ "name": "RudderTraits",
499
+ "slug": "ruddertraits",
500
+ "docs": "Traits payload accepted by `identify` and `group`.",
501
+ "types": [
502
+ {
503
+ "text": "Record<string, any>",
504
+ "complexTypes": [
505
+ "Record"
506
+ ]
507
+ }
508
+ ]
509
+ },
510
+ {
511
+ "name": "RudderProperties",
512
+ "slug": "rudderproperties",
513
+ "docs": "Properties payload accepted by `track` and `screen`.",
514
+ "types": [
515
+ {
516
+ "text": "Record<string, any>",
517
+ "complexTypes": [
518
+ "Record"
519
+ ]
520
+ }
521
+ ]
522
+ }
523
+ ],
524
+ "pluginConfigs": []
525
+ }
@@ -0,0 +1,154 @@
1
+ /**
2
+ * Plugin version payload.
3
+ */
4
+ export interface PluginVersionResult {
5
+ /**
6
+ * Version identifier returned by the platform implementation.
7
+ */
8
+ version: string;
9
+ }
10
+ /**
11
+ * Supported configuration keys for the underlying RudderStack native SDKs.
12
+ */
13
+ export interface RudderConfiguration {
14
+ /**
15
+ * RudderStack data plane URL.
16
+ */
17
+ dataPlaneUrl?: string;
18
+ /**
19
+ * Number of events to batch before a flush.
20
+ */
21
+ flushQueueSize?: number;
22
+ /**
23
+ * Database row threshold that triggers pruning on Android and iOS.
24
+ */
25
+ dbCountThreshold?: number;
26
+ /**
27
+ * Server config refresh interval in hours.
28
+ */
29
+ configRefreshInterval?: number;
30
+ /**
31
+ * RudderStack log verbosity.
32
+ */
33
+ logLevel?: RudderLogLevelValue;
34
+ /**
35
+ * Sleep timeout / sleep count used by the native SDK.
36
+ */
37
+ sleepTimeOut?: number;
38
+ /**
39
+ * Android only. Lets the native SDK collect the advertising identifier automatically.
40
+ */
41
+ autoCollectAdvertId?: boolean;
42
+ /**
43
+ * Tracks `Application Installed`, `Application Updated`, and `Application Opened` automatically.
44
+ */
45
+ trackLifecycleEvents?: boolean;
46
+ /**
47
+ * RudderStack control plane URL.
48
+ */
49
+ controlPlaneUrl?: string;
50
+ /**
51
+ * Enables automatic screen tracking where supported by the native SDK.
52
+ */
53
+ recordScreenViews?: boolean;
54
+ /**
55
+ * Ignored in this Capacitor port.
56
+ *
57
+ * The Cordova SDK uses this field to bootstrap native destination factories from companion plugins.
58
+ * Those extension packages are not implemented in this first Capacitor release.
59
+ */
60
+ factories?: any[];
61
+ }
62
+ /**
63
+ * RudderStack per-call options.
64
+ */
65
+ export interface RudderOptions {
66
+ /**
67
+ * External identifiers forwarded with the event.
68
+ */
69
+ externalIds?: Record<string, string>;
70
+ /**
71
+ * Destination enablement flags keyed by integration name.
72
+ */
73
+ integrations?: Record<string, boolean>;
74
+ }
75
+ /**
76
+ * Traits payload accepted by `identify` and `group`.
77
+ */
78
+ export type RudderTraits = Record<string, any>;
79
+ /**
80
+ * Properties payload accepted by `track` and `screen`.
81
+ */
82
+ export type RudderProperties = Record<string, any>;
83
+ /**
84
+ * RudderStack log level values exposed for migration convenience.
85
+ */
86
+ export type RudderLogLevelValue = 0 | 1 | 2 | 3 | 4 | 5;
87
+ /**
88
+ * Capacitor API that mirrors the public surface of `rudder-sdk-cordova`.
89
+ */
90
+ export interface RudderStackPlugin {
91
+ /**
92
+ * Initializes the RudderStack client.
93
+ *
94
+ * The method keeps the Cordova signature, so the second argument may be either a config object or
95
+ * a Rudder options object.
96
+ */
97
+ initialize(writeKey: string, config?: RudderConfiguration | RudderOptions, options?: RudderOptions): Promise<void>;
98
+ /**
99
+ * Sends an identify call for the provided user id.
100
+ */
101
+ identify(userId: string, traits?: RudderTraits | RudderOptions, options?: RudderOptions): Promise<void>;
102
+ /**
103
+ * Sends a group call for the provided group id.
104
+ */
105
+ group(groupId: string, groupTraits?: RudderTraits | RudderOptions, options?: RudderOptions): Promise<void>;
106
+ /**
107
+ * Sends a track call for the provided event name.
108
+ */
109
+ track(eventName: string, properties?: RudderProperties | RudderOptions, options?: RudderOptions): Promise<void>;
110
+ /**
111
+ * Sends a screen call for the provided screen name.
112
+ */
113
+ screen(screenName: string, properties?: RudderProperties | RudderOptions, options?: RudderOptions): Promise<void>;
114
+ /**
115
+ * Aliases the current user to a new identifier.
116
+ */
117
+ alias(newId: string, options?: RudderOptions): Promise<void>;
118
+ /**
119
+ * Resets the current RudderStack identity state.
120
+ */
121
+ reset(): Promise<void>;
122
+ /**
123
+ * Flushes queued events immediately.
124
+ */
125
+ flush(): Promise<void>;
126
+ /**
127
+ * Sets the push token that RudderStack forwards to supported destinations.
128
+ */
129
+ putDeviceToken(deviceToken: string): Promise<void>;
130
+ /**
131
+ * @deprecated Use `putAdvertisingId` instead.
132
+ */
133
+ setAdvertisingId(advertisingId: string): Promise<void>;
134
+ /**
135
+ * Sets a custom advertising id value.
136
+ */
137
+ putAdvertisingId(advertisingId: string): Promise<void>;
138
+ /**
139
+ * @deprecated Use `putAnonymousId` instead.
140
+ */
141
+ setAnonymousId(anonymousId: string): Promise<void>;
142
+ /**
143
+ * Sets a custom anonymous id value.
144
+ */
145
+ putAnonymousId(anonymousId: string): Promise<void>;
146
+ /**
147
+ * Toggles RudderStack tracking opt-out.
148
+ */
149
+ optOut(optOut: boolean): Promise<void>;
150
+ /**
151
+ * Returns the plugin version marker from the native implementation.
152
+ */
153
+ getPluginVersion(): Promise<PluginVersionResult>;
154
+ }
@@ -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":"","sourcesContent":["/**\n * Plugin version payload.\n */\nexport interface PluginVersionResult {\n /**\n * Version identifier returned by the platform implementation.\n */\n version: string;\n}\n\n/**\n * Supported configuration keys for the underlying RudderStack native SDKs.\n */\nexport interface RudderConfiguration {\n /**\n * RudderStack data plane URL.\n */\n dataPlaneUrl?: string;\n\n /**\n * Number of events to batch before a flush.\n */\n flushQueueSize?: number;\n\n /**\n * Database row threshold that triggers pruning on Android and iOS.\n */\n dbCountThreshold?: number;\n\n /**\n * Server config refresh interval in hours.\n */\n configRefreshInterval?: number;\n\n /**\n * RudderStack log verbosity.\n */\n logLevel?: RudderLogLevelValue;\n\n /**\n * Sleep timeout / sleep count used by the native SDK.\n */\n sleepTimeOut?: number;\n\n /**\n * Android only. Lets the native SDK collect the advertising identifier automatically.\n */\n autoCollectAdvertId?: boolean;\n\n /**\n * Tracks `Application Installed`, `Application Updated`, and `Application Opened` automatically.\n */\n trackLifecycleEvents?: boolean;\n\n /**\n * RudderStack control plane URL.\n */\n controlPlaneUrl?: string;\n\n /**\n * Enables automatic screen tracking where supported by the native SDK.\n */\n recordScreenViews?: boolean;\n\n /**\n * Ignored in this Capacitor port.\n *\n * The Cordova SDK uses this field to bootstrap native destination factories from companion plugins.\n * Those extension packages are not implemented in this first Capacitor release.\n */\n factories?: any[];\n}\n\n/**\n * RudderStack per-call options.\n */\nexport interface RudderOptions {\n /**\n * External identifiers forwarded with the event.\n */\n externalIds?: Record<string, string>;\n\n /**\n * Destination enablement flags keyed by integration name.\n */\n integrations?: Record<string, boolean>;\n}\n\n/**\n * Traits payload accepted by `identify` and `group`.\n */\nexport type RudderTraits = Record<string, any>;\n\n/**\n * Properties payload accepted by `track` and `screen`.\n */\nexport type RudderProperties = Record<string, any>;\n\n/**\n * RudderStack log level values exposed for migration convenience.\n */\nexport type RudderLogLevelValue = 0 | 1 | 2 | 3 | 4 | 5;\n\n/**\n * Capacitor API that mirrors the public surface of `rudder-sdk-cordova`.\n */\nexport interface RudderStackPlugin {\n /**\n * Initializes the RudderStack client.\n *\n * The method keeps the Cordova signature, so the second argument may be either a config object or\n * a Rudder options object.\n */\n initialize(writeKey: string, config?: RudderConfiguration | RudderOptions, options?: RudderOptions): Promise<void>;\n\n /**\n * Sends an identify call for the provided user id.\n */\n identify(userId: string, traits?: RudderTraits | RudderOptions, options?: RudderOptions): Promise<void>;\n\n /**\n * Sends a group call for the provided group id.\n */\n group(groupId: string, groupTraits?: RudderTraits | RudderOptions, options?: RudderOptions): Promise<void>;\n\n /**\n * Sends a track call for the provided event name.\n */\n track(eventName: string, properties?: RudderProperties | RudderOptions, options?: RudderOptions): Promise<void>;\n\n /**\n * Sends a screen call for the provided screen name.\n */\n screen(screenName: string, properties?: RudderProperties | RudderOptions, options?: RudderOptions): Promise<void>;\n\n /**\n * Aliases the current user to a new identifier.\n */\n alias(newId: string, options?: RudderOptions): Promise<void>;\n\n /**\n * Resets the current RudderStack identity state.\n */\n reset(): Promise<void>;\n\n /**\n * Flushes queued events immediately.\n */\n flush(): Promise<void>;\n\n /**\n * Sets the push token that RudderStack forwards to supported destinations.\n */\n putDeviceToken(deviceToken: string): Promise<void>;\n\n /**\n * @deprecated Use `putAdvertisingId` instead.\n */\n setAdvertisingId(advertisingId: string): Promise<void>;\n\n /**\n * Sets a custom advertising id value.\n */\n putAdvertisingId(advertisingId: string): Promise<void>;\n\n /**\n * @deprecated Use `putAnonymousId` instead.\n */\n setAnonymousId(anonymousId: string): Promise<void>;\n\n /**\n * Sets a custom anonymous id value.\n */\n putAnonymousId(anonymousId: string): Promise<void>;\n\n /**\n * Toggles RudderStack tracking opt-out.\n */\n optOut(optOut: boolean): Promise<void>;\n\n /**\n * Returns the plugin version marker from the native implementation.\n */\n getPluginVersion(): Promise<PluginVersionResult>;\n}\n"]}