@jitsu/protocols 1.9.13-canary.1167.20250215132227 → 1.9.14
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 +10 -0
- package/async-request.d.ts +2 -2
- package/functions.d.ts +6 -0
- package/package.json +1 -1
- package/profile.d.ts +5 -2
package/analytics.d.ts
CHANGED
|
@@ -361,6 +361,16 @@ export type JitsuOptions = {
|
|
|
361
361
|
* set to ".example.com". If it lives on "example.com", cookie domain will be set to ".example.com" too
|
|
362
362
|
*/
|
|
363
363
|
cookieDomain?: string;
|
|
364
|
+
/**
|
|
365
|
+
* Name of cookies
|
|
366
|
+
*/
|
|
367
|
+
cookieNames?: {
|
|
368
|
+
anonymousId?: string;
|
|
369
|
+
userId?: string;
|
|
370
|
+
userTraits?: string;
|
|
371
|
+
groupId?: string;
|
|
372
|
+
groupTraits?: string;
|
|
373
|
+
};
|
|
364
374
|
/**
|
|
365
375
|
* Additional cookies to capture, where the keys are cookie names and
|
|
366
376
|
* the values are the corresponding cookie values. By default, the following cookies are captured:
|
package/async-request.d.ts
CHANGED
|
@@ -11,12 +11,12 @@ export type IngestMessage = {
|
|
|
11
11
|
messageId: string;
|
|
12
12
|
//currently this not being filled
|
|
13
13
|
connectionId: string;
|
|
14
|
-
//id of a stream where this message should eventually go. For debugging purposes so far
|
|
15
|
-
streamId?: string;
|
|
16
14
|
type: string;
|
|
17
15
|
origin: {
|
|
18
16
|
baseUrl: string;
|
|
19
17
|
slug?: string;
|
|
18
|
+
sourceId?: string;
|
|
19
|
+
sourceName?: string;
|
|
20
20
|
domain?: string;
|
|
21
21
|
classic?: boolean;
|
|
22
22
|
};
|
package/functions.d.ts
CHANGED
|
@@ -66,10 +66,16 @@ export type FunctionLogger<Sync extends boolean = false> = {
|
|
|
66
66
|
debug: (message: string, ...args: any[]) => void | Promise<void>;
|
|
67
67
|
error: (message: string, ...args: any[]) => void | Promise<void>;
|
|
68
68
|
};
|
|
69
|
+
|
|
70
|
+
interface Warehouse {
|
|
71
|
+
query: (sql: string, params?: Record<string, any>) => Promise<any[]>;
|
|
72
|
+
}
|
|
73
|
+
|
|
69
74
|
export type FunctionContext<P extends AnyProps = AnyProps> = {
|
|
70
75
|
log: FunctionLogger;
|
|
71
76
|
fetch: FetchType;
|
|
72
77
|
store: TTLStore;
|
|
78
|
+
getWarehouse: (destinationId: string) => Warehouse;
|
|
73
79
|
metrics?: FunctionMetrics;
|
|
74
80
|
props: P;
|
|
75
81
|
};
|
package/package.json
CHANGED
package/profile.d.ts
CHANGED
|
@@ -2,12 +2,15 @@ import { FunctionContext } from "./functions";
|
|
|
2
2
|
import { AnalyticsServerEvent } from "./analytics";
|
|
3
3
|
|
|
4
4
|
export type ProfileResult = {
|
|
5
|
-
|
|
5
|
+
profileId?: string;
|
|
6
|
+
destinationId?: string;
|
|
7
|
+
tableName?: string;
|
|
6
8
|
traits: Record<string, any>;
|
|
7
9
|
};
|
|
8
10
|
|
|
9
11
|
export type ProfileUser = {
|
|
10
|
-
|
|
12
|
+
profileId: string;
|
|
13
|
+
userId?: string;
|
|
11
14
|
anonymousId?: string;
|
|
12
15
|
traits: Record<string, any>;
|
|
13
16
|
};
|