@jitsu/protocols 1.9.13 → 1.9.15

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 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:
@@ -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
  };
@@ -159,6 +165,14 @@ export type EventContext = {
159
165
  mode?: string;
160
166
  options?: any;
161
167
  };
168
+ // available in Profile Builder transformations
169
+ allConnections?: {
170
+ id: string;
171
+ destinationId: string;
172
+ destinationName: string;
173
+ type: string;
174
+ mode: string;
175
+ }[];
162
176
  workspace: {
163
177
  id: string;
164
178
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jitsu/protocols",
3
- "version": "1.9.13",
3
+ "version": "1.9.15",
4
4
  "description": "",
5
5
  "author": "Jitsu Dev Team <dev@jitsu.com>",
6
6
  "publishConfig": {
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
- profile_id?: string;
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
- id?: string;
12
+ profileId: string;
13
+ userId?: string;
11
14
  anonymousId?: string;
12
15
  traits: Record<string, any>;
13
16
  };