@jitsu/protocols 1.9.18-canary.1269.20250403142744 → 1.9.18-canary.1288.20250415191203
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/analytics.d.ts +5 -25
- package/package.json +1 -1
package/analytics.d.ts
CHANGED
|
@@ -328,7 +328,6 @@ export type RuntimeFacade = {
|
|
|
328
328
|
| undefined;
|
|
329
329
|
referrer(): string | undefined;
|
|
330
330
|
pageTitle(): string | undefined;
|
|
331
|
-
ip?(): string | undefined;
|
|
332
331
|
};
|
|
333
332
|
|
|
334
333
|
export type ErrorHandler = (message: string, ...args: any[]) => void;
|
|
@@ -441,33 +440,18 @@ export type Traits = {
|
|
|
441
440
|
*/
|
|
442
441
|
$doNotSend?: boolean;
|
|
443
442
|
};
|
|
444
|
-
/**
|
|
445
|
-
* If context is passed along with properties, it gets a special treatment. It is merged with
|
|
446
|
-
* default payload context and with properties. This type works as a type hint for TypeScript
|
|
447
|
-
*/
|
|
448
|
-
export type PropertiesWithContext = {
|
|
449
|
-
context?: AnalyticsContext;
|
|
450
|
-
} & JSONObject;
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* If context is passed along with properties, it gets a special treatment. It is merged with
|
|
454
|
-
* default payload context and with properties. This type works as a type hint for TypeScript
|
|
455
|
-
*/
|
|
456
|
-
export type TraitsWithContext = {
|
|
457
|
-
context?: AnalyticsContext;
|
|
458
|
-
} & Traits;
|
|
459
443
|
|
|
460
444
|
export interface AnalyticsInterface {
|
|
461
445
|
track(
|
|
462
446
|
eventName: string | JSONObject,
|
|
463
|
-
properties?: JSONObject | Callback
|
|
447
|
+
properties?: JSONObject | Callback,
|
|
464
448
|
options?: Options | Callback,
|
|
465
449
|
callback?: Callback
|
|
466
450
|
): Promise<DispatchedEvent>;
|
|
467
451
|
|
|
468
452
|
page(
|
|
469
|
-
category?: string | object
|
|
470
|
-
name?: string | object | Callback
|
|
453
|
+
category?: string | object,
|
|
454
|
+
name?: string | object | Callback,
|
|
471
455
|
properties?: object | Options | Callback | null,
|
|
472
456
|
options?: Options | Callback,
|
|
473
457
|
callback?: Callback
|
|
@@ -475,16 +459,12 @@ export interface AnalyticsInterface {
|
|
|
475
459
|
|
|
476
460
|
group(
|
|
477
461
|
groupId?: ID | object,
|
|
478
|
-
traits?: Traits |
|
|
462
|
+
traits?: Traits | null,
|
|
479
463
|
options?: Options,
|
|
480
464
|
callback?: Callback
|
|
481
465
|
): Promise<DispatchedEvent>;
|
|
482
466
|
|
|
483
|
-
identify(
|
|
484
|
-
id?: ID | Traits | TraitsWithContext,
|
|
485
|
-
traits?: Traits | TraitsWithContext | Callback | null,
|
|
486
|
-
callback?: Callback
|
|
487
|
-
): Promise<DispatchedEvent>;
|
|
467
|
+
identify(id?: ID | Traits, traits?: Traits | Callback | null, callback?: Callback): Promise<DispatchedEvent>;
|
|
488
468
|
|
|
489
469
|
reset(callback?: (...params: any[]) => any): Promise<any>;
|
|
490
470
|
|