@getuserfeedback/protocol 0.6.1 → 0.8.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/app-event.d.ts +779 -10
- package/dist/app-event.d.ts.map +1 -1
- package/dist/app-event.js +81 -8
- package/dist/flow-assignments.d.ts +7 -4
- package/dist/flow-assignments.d.ts.map +1 -1
- package/dist/flow-assignments.js +15 -5
- package/dist/host/constants.d.ts +2 -2
- package/dist/host/constants.d.ts.map +1 -1
- package/dist/host/constants.js +3 -1
- package/dist/host/external-id-argument-guards.d.ts +10 -0
- package/dist/host/external-id-argument-guards.d.ts.map +1 -0
- package/dist/host/external-id-argument-guards.js +27 -0
- package/dist/host/index.d.ts +1 -0
- package/dist/host/index.d.ts.map +1 -1
- package/dist/host/index.js +1 -0
- package/dist/host/sdk-types.d.ts +92 -27
- package/dist/host/sdk-types.d.ts.map +1 -1
- package/dist/host/sdk.d.ts.map +1 -1
- package/dist/identity-type.d.ts +2 -1
- package/dist/identity-type.d.ts.map +1 -1
- package/dist/identity-type.js +1 -1
- package/dist/index.d.ts +3 -87
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -6
- package/dist/widget-commands.d.ts +124 -3
- package/dist/widget-commands.d.ts.map +1 -1
- package/dist/widget-commands.js +10 -0
- package/dist/widget-config.d.ts +23 -5
- package/dist/widget-config.d.ts.map +1 -1
- package/dist/widget-config.js +2 -1
- package/package.json +22 -2
- package/src/app-event.ts +235 -0
- package/src/client-meta.ts +25 -0
- package/src/defaults.ts +4 -0
- package/src/errors.ts +58 -0
- package/src/flow-assignments.test.ts +82 -0
- package/src/flow-assignments.ts +151 -0
- package/src/host/command-dispatch.ts +59 -0
- package/src/host/command-envelope.ts +41 -0
- package/src/host/command-settlement.ts +121 -0
- package/src/host/constants.ts +103 -0
- package/src/host/external-id-argument-guards.ts +57 -0
- package/src/host/host-event-contract.ts +277 -0
- package/src/host/index.ts +14 -0
- package/src/host/lazy-handle-client.ts +207 -0
- package/src/host/request-id.ts +3 -0
- package/src/host/sdk-types.ts +528 -0
- package/src/host/sdk.ts +43 -0
- package/src/host/unique-id.ts +17 -0
- package/src/identity-type.ts +96 -0
- package/src/index.ts +139 -0
- package/src/protocol-root.test.ts +582 -0
- package/src/public-grant-scope.ts +25 -0
- package/src/runtime-endpoints.ts +69 -0
- package/src/scopes.ts +79 -0
- package/src/trpc-envelope.ts +9 -0
- package/src/version-resolution.ts +18 -0
- package/src/widget-commands.ts +162 -0
- package/src/widget-config.ts +164 -0
package/dist/app-event.d.ts
CHANGED
|
@@ -7,6 +7,9 @@ export declare const appEventIdentitySchema: z.ZodMiniObject<{
|
|
|
7
7
|
type AppEventFlagValue = string | number | boolean | null | AppEventFlagValue[] | {
|
|
8
8
|
[key: string]: AppEventFlagValue;
|
|
9
9
|
};
|
|
10
|
+
export type AppEventJsonValue = string | number | boolean | null | AppEventJsonValue[] | {
|
|
11
|
+
[key: string]: AppEventJsonValue;
|
|
12
|
+
};
|
|
10
13
|
export declare const appEventFlagProviderSchema: z.ZodMiniObject<{
|
|
11
14
|
name: z.ZodMiniString<string>;
|
|
12
15
|
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -41,6 +44,13 @@ export declare const appEventCapabilitySchema: z.ZodMiniObject<{
|
|
|
41
44
|
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
42
45
|
}, z.core.$strip>>;
|
|
43
46
|
}, z.core.$strip>;
|
|
47
|
+
export declare const appEventExternalIdSchema: z.ZodMiniObject<{
|
|
48
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
49
|
+
type: z.ZodMiniString<string>;
|
|
50
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
51
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type AppEventExternalId = z.output<typeof appEventExternalIdSchema>;
|
|
44
54
|
export declare const appEventContextSchema: z.ZodMiniObject<{
|
|
45
55
|
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
46
56
|
path: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -49,6 +59,12 @@ export declare const appEventContextSchema: z.ZodMiniObject<{
|
|
|
49
59
|
}, z.core.$strip>>;
|
|
50
60
|
locale: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
51
61
|
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
62
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
63
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
64
|
+
type: z.ZodMiniString<string>;
|
|
65
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
66
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
67
|
+
}, z.core.$strip>>>;
|
|
52
68
|
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
53
69
|
key: z.ZodMiniString<string>;
|
|
54
70
|
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -93,6 +109,66 @@ export declare const appEventBaseSchema: z.ZodMiniObject<{
|
|
|
93
109
|
}, z.core.$strip>>;
|
|
94
110
|
locale: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
95
111
|
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
112
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
113
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
114
|
+
type: z.ZodMiniString<string>;
|
|
115
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
116
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
117
|
+
}, z.core.$strip>>>;
|
|
118
|
+
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
119
|
+
key: z.ZodMiniString<string>;
|
|
120
|
+
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
121
|
+
value: z.ZodMiniType<AppEventFlagValue, unknown, z.core.$ZodTypeInternals<AppEventFlagValue, unknown>>;
|
|
122
|
+
variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
123
|
+
origin: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
124
|
+
runtime_config: "runtime_config";
|
|
125
|
+
trigger_context: "trigger_context";
|
|
126
|
+
provider_sync: "provider_sync";
|
|
127
|
+
api: "api";
|
|
128
|
+
}>>;
|
|
129
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
130
|
+
name: z.ZodMiniString<string>;
|
|
131
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
132
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
133
|
+
}, z.core.$strip>>;
|
|
134
|
+
status: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
135
|
+
reason: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
136
|
+
evaluatedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
137
|
+
}, z.core.$strip>>>;
|
|
138
|
+
capabilities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
139
|
+
key: z.ZodMiniString<string>;
|
|
140
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
141
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
142
|
+
name: z.ZodMiniString<string>;
|
|
143
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
144
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
145
|
+
}, z.core.$strip>>;
|
|
146
|
+
}, z.core.$strip>>>;
|
|
147
|
+
}, z.core.$strip>>;
|
|
148
|
+
messageId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
149
|
+
timestamp: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
export declare const reservedSystemAppEventNames: readonly ["Response Submitted", "Flow Viewed", "Flow Dismissed", "Identified"];
|
|
152
|
+
export declare const appEventSystemBaseSchema: z.ZodMiniObject<{
|
|
153
|
+
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
154
|
+
identities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
155
|
+
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
156
|
+
value: z.ZodMiniString<string>;
|
|
157
|
+
}, z.core.$strip>>>;
|
|
158
|
+
context: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
159
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
160
|
+
path: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
161
|
+
referrer: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
162
|
+
search: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
163
|
+
}, z.core.$strip>>;
|
|
164
|
+
locale: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
165
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
166
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
167
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
168
|
+
type: z.ZodMiniString<string>;
|
|
169
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
170
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
171
|
+
}, z.core.$strip>>>;
|
|
96
172
|
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
97
173
|
key: z.ZodMiniString<string>;
|
|
98
174
|
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -125,8 +201,9 @@ export declare const appEventBaseSchema: z.ZodMiniObject<{
|
|
|
125
201
|
}, z.core.$strip>>;
|
|
126
202
|
messageId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
127
203
|
timestamp: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
204
|
+
origin: z.ZodMiniLiteral<"system">;
|
|
128
205
|
}, z.core.$strip>;
|
|
129
|
-
export declare const appEventSurveyViewedSchema: z.ZodMiniObject<{
|
|
206
|
+
export declare const appEventSurveyViewedSchema: z.ZodMiniPipe<z.ZodMiniObject<{
|
|
130
207
|
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
131
208
|
identities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
132
209
|
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
@@ -140,6 +217,12 @@ export declare const appEventSurveyViewedSchema: z.ZodMiniObject<{
|
|
|
140
217
|
}, z.core.$strip>>;
|
|
141
218
|
locale: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
142
219
|
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
220
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
221
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
222
|
+
type: z.ZodMiniString<string>;
|
|
223
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
224
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
225
|
+
}, z.core.$strip>>>;
|
|
143
226
|
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
144
227
|
key: z.ZodMiniString<string>;
|
|
145
228
|
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -172,12 +255,119 @@ export declare const appEventSurveyViewedSchema: z.ZodMiniObject<{
|
|
|
172
255
|
}, z.core.$strip>>;
|
|
173
256
|
messageId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
174
257
|
timestamp: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
258
|
+
origin: z.ZodMiniOptional<z.ZodMiniLiteral<"system">>;
|
|
175
259
|
event: z.ZodMiniLiteral<"Flow Viewed">;
|
|
176
260
|
references: z.ZodMiniObject<{
|
|
177
261
|
surveyId: z.ZodMiniString<string>;
|
|
178
262
|
}, z.core.$strip>;
|
|
179
|
-
}, z.core.$strip
|
|
180
|
-
|
|
263
|
+
}, z.core.$strip>, z.ZodMiniTransform<Omit<{
|
|
264
|
+
event: "Flow Viewed";
|
|
265
|
+
references: {
|
|
266
|
+
surveyId: string;
|
|
267
|
+
};
|
|
268
|
+
traits?: Record<string, unknown> | undefined;
|
|
269
|
+
identities?: {
|
|
270
|
+
type: "anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token";
|
|
271
|
+
value: string;
|
|
272
|
+
}[] | undefined;
|
|
273
|
+
context?: {
|
|
274
|
+
page?: {
|
|
275
|
+
path?: string | undefined;
|
|
276
|
+
referrer?: string | undefined;
|
|
277
|
+
search?: string | undefined;
|
|
278
|
+
} | undefined;
|
|
279
|
+
locale?: string | undefined;
|
|
280
|
+
userAgent?: string | undefined;
|
|
281
|
+
externalIds?: {
|
|
282
|
+
id: string;
|
|
283
|
+
type: string;
|
|
284
|
+
collection: "users";
|
|
285
|
+
encoding: "none";
|
|
286
|
+
}[] | undefined;
|
|
287
|
+
flags?: {
|
|
288
|
+
key: string;
|
|
289
|
+
value: AppEventFlagValue;
|
|
290
|
+
target?: string | undefined;
|
|
291
|
+
variant?: string | undefined;
|
|
292
|
+
origin?: "runtime_config" | "trigger_context" | "provider_sync" | "api" | undefined;
|
|
293
|
+
provider?: {
|
|
294
|
+
name: string;
|
|
295
|
+
project?: string | undefined;
|
|
296
|
+
environment?: string | undefined;
|
|
297
|
+
} | undefined;
|
|
298
|
+
status?: string | undefined;
|
|
299
|
+
reason?: string | undefined;
|
|
300
|
+
evaluatedAt?: string | undefined;
|
|
301
|
+
}[] | undefined;
|
|
302
|
+
capabilities?: {
|
|
303
|
+
key: string;
|
|
304
|
+
source?: string | undefined;
|
|
305
|
+
provider?: {
|
|
306
|
+
name: string;
|
|
307
|
+
project?: string | undefined;
|
|
308
|
+
environment?: string | undefined;
|
|
309
|
+
} | undefined;
|
|
310
|
+
}[] | undefined;
|
|
311
|
+
} | undefined;
|
|
312
|
+
messageId?: string | undefined;
|
|
313
|
+
timestamp?: number | undefined;
|
|
314
|
+
origin?: "system" | undefined;
|
|
315
|
+
}, "origin"> & {
|
|
316
|
+
origin: "system";
|
|
317
|
+
}, {
|
|
318
|
+
event: "Flow Viewed";
|
|
319
|
+
references: {
|
|
320
|
+
surveyId: string;
|
|
321
|
+
};
|
|
322
|
+
traits?: Record<string, unknown> | undefined;
|
|
323
|
+
identities?: {
|
|
324
|
+
type: "anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token";
|
|
325
|
+
value: string;
|
|
326
|
+
}[] | undefined;
|
|
327
|
+
context?: {
|
|
328
|
+
page?: {
|
|
329
|
+
path?: string | undefined;
|
|
330
|
+
referrer?: string | undefined;
|
|
331
|
+
search?: string | undefined;
|
|
332
|
+
} | undefined;
|
|
333
|
+
locale?: string | undefined;
|
|
334
|
+
userAgent?: string | undefined;
|
|
335
|
+
externalIds?: {
|
|
336
|
+
id: string;
|
|
337
|
+
type: string;
|
|
338
|
+
collection: "users";
|
|
339
|
+
encoding: "none";
|
|
340
|
+
}[] | undefined;
|
|
341
|
+
flags?: {
|
|
342
|
+
key: string;
|
|
343
|
+
value: AppEventFlagValue;
|
|
344
|
+
target?: string | undefined;
|
|
345
|
+
variant?: string | undefined;
|
|
346
|
+
origin?: "runtime_config" | "trigger_context" | "provider_sync" | "api" | undefined;
|
|
347
|
+
provider?: {
|
|
348
|
+
name: string;
|
|
349
|
+
project?: string | undefined;
|
|
350
|
+
environment?: string | undefined;
|
|
351
|
+
} | undefined;
|
|
352
|
+
status?: string | undefined;
|
|
353
|
+
reason?: string | undefined;
|
|
354
|
+
evaluatedAt?: string | undefined;
|
|
355
|
+
}[] | undefined;
|
|
356
|
+
capabilities?: {
|
|
357
|
+
key: string;
|
|
358
|
+
source?: string | undefined;
|
|
359
|
+
provider?: {
|
|
360
|
+
name: string;
|
|
361
|
+
project?: string | undefined;
|
|
362
|
+
environment?: string | undefined;
|
|
363
|
+
} | undefined;
|
|
364
|
+
}[] | undefined;
|
|
365
|
+
} | undefined;
|
|
366
|
+
messageId?: string | undefined;
|
|
367
|
+
timestamp?: number | undefined;
|
|
368
|
+
origin?: "system" | undefined;
|
|
369
|
+
}>>;
|
|
370
|
+
export declare const appEventFlowDismissedSchema: z.ZodMiniPipe<z.ZodMiniObject<{
|
|
181
371
|
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
182
372
|
identities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
183
373
|
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
@@ -191,6 +381,12 @@ export declare const appEventFlowDismissedSchema: z.ZodMiniObject<{
|
|
|
191
381
|
}, z.core.$strip>>;
|
|
192
382
|
locale: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
193
383
|
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
384
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
385
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
386
|
+
type: z.ZodMiniString<string>;
|
|
387
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
388
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
389
|
+
}, z.core.$strip>>>;
|
|
194
390
|
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
195
391
|
key: z.ZodMiniString<string>;
|
|
196
392
|
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -223,12 +419,119 @@ export declare const appEventFlowDismissedSchema: z.ZodMiniObject<{
|
|
|
223
419
|
}, z.core.$strip>>;
|
|
224
420
|
messageId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
225
421
|
timestamp: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
422
|
+
origin: z.ZodMiniOptional<z.ZodMiniLiteral<"system">>;
|
|
226
423
|
event: z.ZodMiniLiteral<"Flow Dismissed">;
|
|
227
424
|
references: z.ZodMiniObject<{
|
|
228
425
|
surveyId: z.ZodMiniString<string>;
|
|
229
426
|
}, z.core.$strip>;
|
|
230
|
-
}, z.core.$strip
|
|
231
|
-
|
|
427
|
+
}, z.core.$strip>, z.ZodMiniTransform<Omit<{
|
|
428
|
+
event: "Flow Dismissed";
|
|
429
|
+
references: {
|
|
430
|
+
surveyId: string;
|
|
431
|
+
};
|
|
432
|
+
traits?: Record<string, unknown> | undefined;
|
|
433
|
+
identities?: {
|
|
434
|
+
type: "anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token";
|
|
435
|
+
value: string;
|
|
436
|
+
}[] | undefined;
|
|
437
|
+
context?: {
|
|
438
|
+
page?: {
|
|
439
|
+
path?: string | undefined;
|
|
440
|
+
referrer?: string | undefined;
|
|
441
|
+
search?: string | undefined;
|
|
442
|
+
} | undefined;
|
|
443
|
+
locale?: string | undefined;
|
|
444
|
+
userAgent?: string | undefined;
|
|
445
|
+
externalIds?: {
|
|
446
|
+
id: string;
|
|
447
|
+
type: string;
|
|
448
|
+
collection: "users";
|
|
449
|
+
encoding: "none";
|
|
450
|
+
}[] | undefined;
|
|
451
|
+
flags?: {
|
|
452
|
+
key: string;
|
|
453
|
+
value: AppEventFlagValue;
|
|
454
|
+
target?: string | undefined;
|
|
455
|
+
variant?: string | undefined;
|
|
456
|
+
origin?: "runtime_config" | "trigger_context" | "provider_sync" | "api" | undefined;
|
|
457
|
+
provider?: {
|
|
458
|
+
name: string;
|
|
459
|
+
project?: string | undefined;
|
|
460
|
+
environment?: string | undefined;
|
|
461
|
+
} | undefined;
|
|
462
|
+
status?: string | undefined;
|
|
463
|
+
reason?: string | undefined;
|
|
464
|
+
evaluatedAt?: string | undefined;
|
|
465
|
+
}[] | undefined;
|
|
466
|
+
capabilities?: {
|
|
467
|
+
key: string;
|
|
468
|
+
source?: string | undefined;
|
|
469
|
+
provider?: {
|
|
470
|
+
name: string;
|
|
471
|
+
project?: string | undefined;
|
|
472
|
+
environment?: string | undefined;
|
|
473
|
+
} | undefined;
|
|
474
|
+
}[] | undefined;
|
|
475
|
+
} | undefined;
|
|
476
|
+
messageId?: string | undefined;
|
|
477
|
+
timestamp?: number | undefined;
|
|
478
|
+
origin?: "system" | undefined;
|
|
479
|
+
}, "origin"> & {
|
|
480
|
+
origin: "system";
|
|
481
|
+
}, {
|
|
482
|
+
event: "Flow Dismissed";
|
|
483
|
+
references: {
|
|
484
|
+
surveyId: string;
|
|
485
|
+
};
|
|
486
|
+
traits?: Record<string, unknown> | undefined;
|
|
487
|
+
identities?: {
|
|
488
|
+
type: "anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token";
|
|
489
|
+
value: string;
|
|
490
|
+
}[] | undefined;
|
|
491
|
+
context?: {
|
|
492
|
+
page?: {
|
|
493
|
+
path?: string | undefined;
|
|
494
|
+
referrer?: string | undefined;
|
|
495
|
+
search?: string | undefined;
|
|
496
|
+
} | undefined;
|
|
497
|
+
locale?: string | undefined;
|
|
498
|
+
userAgent?: string | undefined;
|
|
499
|
+
externalIds?: {
|
|
500
|
+
id: string;
|
|
501
|
+
type: string;
|
|
502
|
+
collection: "users";
|
|
503
|
+
encoding: "none";
|
|
504
|
+
}[] | undefined;
|
|
505
|
+
flags?: {
|
|
506
|
+
key: string;
|
|
507
|
+
value: AppEventFlagValue;
|
|
508
|
+
target?: string | undefined;
|
|
509
|
+
variant?: string | undefined;
|
|
510
|
+
origin?: "runtime_config" | "trigger_context" | "provider_sync" | "api" | undefined;
|
|
511
|
+
provider?: {
|
|
512
|
+
name: string;
|
|
513
|
+
project?: string | undefined;
|
|
514
|
+
environment?: string | undefined;
|
|
515
|
+
} | undefined;
|
|
516
|
+
status?: string | undefined;
|
|
517
|
+
reason?: string | undefined;
|
|
518
|
+
evaluatedAt?: string | undefined;
|
|
519
|
+
}[] | undefined;
|
|
520
|
+
capabilities?: {
|
|
521
|
+
key: string;
|
|
522
|
+
source?: string | undefined;
|
|
523
|
+
provider?: {
|
|
524
|
+
name: string;
|
|
525
|
+
project?: string | undefined;
|
|
526
|
+
environment?: string | undefined;
|
|
527
|
+
} | undefined;
|
|
528
|
+
}[] | undefined;
|
|
529
|
+
} | undefined;
|
|
530
|
+
messageId?: string | undefined;
|
|
531
|
+
timestamp?: number | undefined;
|
|
532
|
+
origin?: "system" | undefined;
|
|
533
|
+
}>>;
|
|
534
|
+
export declare const appEventSystemTrackSchema: z.ZodMiniObject<{
|
|
232
535
|
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
233
536
|
identities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
234
537
|
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
@@ -242,6 +545,12 @@ export declare const appEventTrackSchema: z.ZodMiniObject<{
|
|
|
242
545
|
}, z.core.$strip>>;
|
|
243
546
|
locale: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
244
547
|
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
548
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
549
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
550
|
+
type: z.ZodMiniString<string>;
|
|
551
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
552
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
553
|
+
}, z.core.$strip>>>;
|
|
245
554
|
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
246
555
|
key: z.ZodMiniString<string>;
|
|
247
556
|
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -274,6 +583,7 @@ export declare const appEventTrackSchema: z.ZodMiniObject<{
|
|
|
274
583
|
}, z.core.$strip>>;
|
|
275
584
|
messageId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
276
585
|
timestamp: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
586
|
+
origin: z.ZodMiniLiteral<"system">;
|
|
277
587
|
event: z.ZodMiniEnum<{
|
|
278
588
|
"Flow Viewed": "Flow Viewed";
|
|
279
589
|
"Flow Dismissed": "Flow Dismissed";
|
|
@@ -282,7 +592,7 @@ export declare const appEventTrackSchema: z.ZodMiniObject<{
|
|
|
282
592
|
surveyId: z.ZodMiniString<string>;
|
|
283
593
|
}, z.core.$strip>;
|
|
284
594
|
}, z.core.$strip>;
|
|
285
|
-
export declare const
|
|
595
|
+
export declare const appEventCustomerTrackSchema: z.ZodMiniObject<{
|
|
286
596
|
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
287
597
|
identities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
288
598
|
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
@@ -296,6 +606,12 @@ export declare const appEventPayloadSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMi
|
|
|
296
606
|
}, z.core.$strip>>;
|
|
297
607
|
locale: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
298
608
|
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
609
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
610
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
611
|
+
type: z.ZodMiniString<string>;
|
|
612
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
613
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
614
|
+
}, z.core.$strip>>>;
|
|
299
615
|
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
300
616
|
key: z.ZodMiniString<string>;
|
|
301
617
|
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -328,11 +644,177 @@ export declare const appEventPayloadSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMi
|
|
|
328
644
|
}, z.core.$strip>>;
|
|
329
645
|
messageId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
330
646
|
timestamp: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
331
|
-
|
|
647
|
+
origin: z.ZodMiniLiteral<"customer">;
|
|
648
|
+
event: z.ZodMiniString<string>;
|
|
649
|
+
properties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniType<AppEventJsonValue, unknown, z.core.$ZodTypeInternals<AppEventJsonValue, unknown>>>>;
|
|
650
|
+
}, z.core.$strip>;
|
|
651
|
+
export declare const appEventTrackSchema: z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniObject<{
|
|
652
|
+
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
653
|
+
identities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
654
|
+
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
655
|
+
value: z.ZodMiniString<string>;
|
|
656
|
+
}, z.core.$strip>>>;
|
|
657
|
+
context: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
658
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
659
|
+
path: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
660
|
+
referrer: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
661
|
+
search: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
662
|
+
}, z.core.$strip>>;
|
|
663
|
+
locale: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
664
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
665
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
666
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
667
|
+
type: z.ZodMiniString<string>;
|
|
668
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
669
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
670
|
+
}, z.core.$strip>>>;
|
|
671
|
+
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
672
|
+
key: z.ZodMiniString<string>;
|
|
673
|
+
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
674
|
+
value: z.ZodMiniType<AppEventFlagValue, unknown, z.core.$ZodTypeInternals<AppEventFlagValue, unknown>>;
|
|
675
|
+
variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
676
|
+
origin: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
677
|
+
runtime_config: "runtime_config";
|
|
678
|
+
trigger_context: "trigger_context";
|
|
679
|
+
provider_sync: "provider_sync";
|
|
680
|
+
api: "api";
|
|
681
|
+
}>>;
|
|
682
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
683
|
+
name: z.ZodMiniString<string>;
|
|
684
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
685
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
686
|
+
}, z.core.$strip>>;
|
|
687
|
+
status: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
688
|
+
reason: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
689
|
+
evaluatedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
690
|
+
}, z.core.$strip>>>;
|
|
691
|
+
capabilities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
692
|
+
key: z.ZodMiniString<string>;
|
|
693
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
694
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
695
|
+
name: z.ZodMiniString<string>;
|
|
696
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
697
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
698
|
+
}, z.core.$strip>>;
|
|
699
|
+
}, z.core.$strip>>>;
|
|
700
|
+
}, z.core.$strip>>;
|
|
701
|
+
messageId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
702
|
+
timestamp: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
703
|
+
origin: z.ZodMiniOptional<z.ZodMiniLiteral<"system">>;
|
|
704
|
+
event: z.ZodMiniEnum<{
|
|
705
|
+
"Flow Viewed": "Flow Viewed";
|
|
706
|
+
"Flow Dismissed": "Flow Dismissed";
|
|
707
|
+
}>;
|
|
332
708
|
references: z.ZodMiniObject<{
|
|
333
709
|
surveyId: z.ZodMiniString<string>;
|
|
334
710
|
}, z.core.$strip>;
|
|
335
|
-
}, z.core.$strip>, z.
|
|
711
|
+
}, z.core.$strip>, z.ZodMiniTransform<Omit<{
|
|
712
|
+
event: "Flow Viewed" | "Flow Dismissed";
|
|
713
|
+
references: {
|
|
714
|
+
surveyId: string;
|
|
715
|
+
};
|
|
716
|
+
traits?: Record<string, unknown> | undefined;
|
|
717
|
+
identities?: {
|
|
718
|
+
type: "anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token";
|
|
719
|
+
value: string;
|
|
720
|
+
}[] | undefined;
|
|
721
|
+
context?: {
|
|
722
|
+
page?: {
|
|
723
|
+
path?: string | undefined;
|
|
724
|
+
referrer?: string | undefined;
|
|
725
|
+
search?: string | undefined;
|
|
726
|
+
} | undefined;
|
|
727
|
+
locale?: string | undefined;
|
|
728
|
+
userAgent?: string | undefined;
|
|
729
|
+
externalIds?: {
|
|
730
|
+
id: string;
|
|
731
|
+
type: string;
|
|
732
|
+
collection: "users";
|
|
733
|
+
encoding: "none";
|
|
734
|
+
}[] | undefined;
|
|
735
|
+
flags?: {
|
|
736
|
+
key: string;
|
|
737
|
+
value: AppEventFlagValue;
|
|
738
|
+
target?: string | undefined;
|
|
739
|
+
variant?: string | undefined;
|
|
740
|
+
origin?: "runtime_config" | "trigger_context" | "provider_sync" | "api" | undefined;
|
|
741
|
+
provider?: {
|
|
742
|
+
name: string;
|
|
743
|
+
project?: string | undefined;
|
|
744
|
+
environment?: string | undefined;
|
|
745
|
+
} | undefined;
|
|
746
|
+
status?: string | undefined;
|
|
747
|
+
reason?: string | undefined;
|
|
748
|
+
evaluatedAt?: string | undefined;
|
|
749
|
+
}[] | undefined;
|
|
750
|
+
capabilities?: {
|
|
751
|
+
key: string;
|
|
752
|
+
source?: string | undefined;
|
|
753
|
+
provider?: {
|
|
754
|
+
name: string;
|
|
755
|
+
project?: string | undefined;
|
|
756
|
+
environment?: string | undefined;
|
|
757
|
+
} | undefined;
|
|
758
|
+
}[] | undefined;
|
|
759
|
+
} | undefined;
|
|
760
|
+
messageId?: string | undefined;
|
|
761
|
+
timestamp?: number | undefined;
|
|
762
|
+
origin?: "system" | undefined;
|
|
763
|
+
}, "origin"> & {
|
|
764
|
+
origin: "system";
|
|
765
|
+
}, {
|
|
766
|
+
event: "Flow Viewed" | "Flow Dismissed";
|
|
767
|
+
references: {
|
|
768
|
+
surveyId: string;
|
|
769
|
+
};
|
|
770
|
+
traits?: Record<string, unknown> | undefined;
|
|
771
|
+
identities?: {
|
|
772
|
+
type: "anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token";
|
|
773
|
+
value: string;
|
|
774
|
+
}[] | undefined;
|
|
775
|
+
context?: {
|
|
776
|
+
page?: {
|
|
777
|
+
path?: string | undefined;
|
|
778
|
+
referrer?: string | undefined;
|
|
779
|
+
search?: string | undefined;
|
|
780
|
+
} | undefined;
|
|
781
|
+
locale?: string | undefined;
|
|
782
|
+
userAgent?: string | undefined;
|
|
783
|
+
externalIds?: {
|
|
784
|
+
id: string;
|
|
785
|
+
type: string;
|
|
786
|
+
collection: "users";
|
|
787
|
+
encoding: "none";
|
|
788
|
+
}[] | undefined;
|
|
789
|
+
flags?: {
|
|
790
|
+
key: string;
|
|
791
|
+
value: AppEventFlagValue;
|
|
792
|
+
target?: string | undefined;
|
|
793
|
+
variant?: string | undefined;
|
|
794
|
+
origin?: "runtime_config" | "trigger_context" | "provider_sync" | "api" | undefined;
|
|
795
|
+
provider?: {
|
|
796
|
+
name: string;
|
|
797
|
+
project?: string | undefined;
|
|
798
|
+
environment?: string | undefined;
|
|
799
|
+
} | undefined;
|
|
800
|
+
status?: string | undefined;
|
|
801
|
+
reason?: string | undefined;
|
|
802
|
+
evaluatedAt?: string | undefined;
|
|
803
|
+
}[] | undefined;
|
|
804
|
+
capabilities?: {
|
|
805
|
+
key: string;
|
|
806
|
+
source?: string | undefined;
|
|
807
|
+
provider?: {
|
|
808
|
+
name: string;
|
|
809
|
+
project?: string | undefined;
|
|
810
|
+
environment?: string | undefined;
|
|
811
|
+
} | undefined;
|
|
812
|
+
}[] | undefined;
|
|
813
|
+
} | undefined;
|
|
814
|
+
messageId?: string | undefined;
|
|
815
|
+
timestamp?: number | undefined;
|
|
816
|
+
origin?: "system" | undefined;
|
|
817
|
+
}>>, z.ZodMiniObject<{
|
|
336
818
|
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
337
819
|
identities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
338
820
|
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
@@ -346,6 +828,12 @@ export declare const appEventPayloadSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMi
|
|
|
346
828
|
}, z.core.$strip>>;
|
|
347
829
|
locale: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
348
830
|
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
831
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
832
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
833
|
+
type: z.ZodMiniString<string>;
|
|
834
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
835
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
836
|
+
}, z.core.$strip>>>;
|
|
349
837
|
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
350
838
|
key: z.ZodMiniString<string>;
|
|
351
839
|
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -378,11 +866,292 @@ export declare const appEventPayloadSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMi
|
|
|
378
866
|
}, z.core.$strip>>;
|
|
379
867
|
messageId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
380
868
|
timestamp: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
381
|
-
|
|
869
|
+
origin: z.ZodMiniLiteral<"customer">;
|
|
870
|
+
event: z.ZodMiniString<string>;
|
|
871
|
+
properties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniType<AppEventJsonValue, unknown, z.core.$ZodTypeInternals<AppEventJsonValue, unknown>>>>;
|
|
872
|
+
}, z.core.$strip>]>;
|
|
873
|
+
export declare const appEventPayloadSchema: z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniObject<{
|
|
874
|
+
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
875
|
+
identities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
876
|
+
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
877
|
+
value: z.ZodMiniString<string>;
|
|
878
|
+
}, z.core.$strip>>>;
|
|
879
|
+
context: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
880
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
881
|
+
path: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
882
|
+
referrer: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
883
|
+
search: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
884
|
+
}, z.core.$strip>>;
|
|
885
|
+
locale: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
886
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
887
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
888
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
889
|
+
type: z.ZodMiniString<string>;
|
|
890
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
891
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
892
|
+
}, z.core.$strip>>>;
|
|
893
|
+
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
894
|
+
key: z.ZodMiniString<string>;
|
|
895
|
+
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
896
|
+
value: z.ZodMiniType<AppEventFlagValue, unknown, z.core.$ZodTypeInternals<AppEventFlagValue, unknown>>;
|
|
897
|
+
variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
898
|
+
origin: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
899
|
+
runtime_config: "runtime_config";
|
|
900
|
+
trigger_context: "trigger_context";
|
|
901
|
+
provider_sync: "provider_sync";
|
|
902
|
+
api: "api";
|
|
903
|
+
}>>;
|
|
904
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
905
|
+
name: z.ZodMiniString<string>;
|
|
906
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
907
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
908
|
+
}, z.core.$strip>>;
|
|
909
|
+
status: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
910
|
+
reason: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
911
|
+
evaluatedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
912
|
+
}, z.core.$strip>>>;
|
|
913
|
+
capabilities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
914
|
+
key: z.ZodMiniString<string>;
|
|
915
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
916
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
917
|
+
name: z.ZodMiniString<string>;
|
|
918
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
919
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
920
|
+
}, z.core.$strip>>;
|
|
921
|
+
}, z.core.$strip>>>;
|
|
922
|
+
}, z.core.$strip>>;
|
|
923
|
+
messageId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
924
|
+
timestamp: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
925
|
+
origin: z.ZodMiniOptional<z.ZodMiniLiteral<"system">>;
|
|
926
|
+
event: z.ZodMiniEnum<{
|
|
927
|
+
"Flow Viewed": "Flow Viewed";
|
|
928
|
+
"Flow Dismissed": "Flow Dismissed";
|
|
929
|
+
}>;
|
|
382
930
|
references: z.ZodMiniObject<{
|
|
383
931
|
surveyId: z.ZodMiniString<string>;
|
|
384
932
|
}, z.core.$strip>;
|
|
385
|
-
}, z.core.$strip
|
|
933
|
+
}, z.core.$strip>, z.ZodMiniTransform<Omit<{
|
|
934
|
+
event: "Flow Viewed" | "Flow Dismissed";
|
|
935
|
+
references: {
|
|
936
|
+
surveyId: string;
|
|
937
|
+
};
|
|
938
|
+
traits?: Record<string, unknown> | undefined;
|
|
939
|
+
identities?: {
|
|
940
|
+
type: "anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token";
|
|
941
|
+
value: string;
|
|
942
|
+
}[] | undefined;
|
|
943
|
+
context?: {
|
|
944
|
+
page?: {
|
|
945
|
+
path?: string | undefined;
|
|
946
|
+
referrer?: string | undefined;
|
|
947
|
+
search?: string | undefined;
|
|
948
|
+
} | undefined;
|
|
949
|
+
locale?: string | undefined;
|
|
950
|
+
userAgent?: string | undefined;
|
|
951
|
+
externalIds?: {
|
|
952
|
+
id: string;
|
|
953
|
+
type: string;
|
|
954
|
+
collection: "users";
|
|
955
|
+
encoding: "none";
|
|
956
|
+
}[] | undefined;
|
|
957
|
+
flags?: {
|
|
958
|
+
key: string;
|
|
959
|
+
value: AppEventFlagValue;
|
|
960
|
+
target?: string | undefined;
|
|
961
|
+
variant?: string | undefined;
|
|
962
|
+
origin?: "runtime_config" | "trigger_context" | "provider_sync" | "api" | undefined;
|
|
963
|
+
provider?: {
|
|
964
|
+
name: string;
|
|
965
|
+
project?: string | undefined;
|
|
966
|
+
environment?: string | undefined;
|
|
967
|
+
} | undefined;
|
|
968
|
+
status?: string | undefined;
|
|
969
|
+
reason?: string | undefined;
|
|
970
|
+
evaluatedAt?: string | undefined;
|
|
971
|
+
}[] | undefined;
|
|
972
|
+
capabilities?: {
|
|
973
|
+
key: string;
|
|
974
|
+
source?: string | undefined;
|
|
975
|
+
provider?: {
|
|
976
|
+
name: string;
|
|
977
|
+
project?: string | undefined;
|
|
978
|
+
environment?: string | undefined;
|
|
979
|
+
} | undefined;
|
|
980
|
+
}[] | undefined;
|
|
981
|
+
} | undefined;
|
|
982
|
+
messageId?: string | undefined;
|
|
983
|
+
timestamp?: number | undefined;
|
|
984
|
+
origin?: "system" | undefined;
|
|
985
|
+
}, "origin"> & {
|
|
986
|
+
origin: "system";
|
|
987
|
+
}, {
|
|
988
|
+
event: "Flow Viewed" | "Flow Dismissed";
|
|
989
|
+
references: {
|
|
990
|
+
surveyId: string;
|
|
991
|
+
};
|
|
992
|
+
traits?: Record<string, unknown> | undefined;
|
|
993
|
+
identities?: {
|
|
994
|
+
type: "anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token";
|
|
995
|
+
value: string;
|
|
996
|
+
}[] | undefined;
|
|
997
|
+
context?: {
|
|
998
|
+
page?: {
|
|
999
|
+
path?: string | undefined;
|
|
1000
|
+
referrer?: string | undefined;
|
|
1001
|
+
search?: string | undefined;
|
|
1002
|
+
} | undefined;
|
|
1003
|
+
locale?: string | undefined;
|
|
1004
|
+
userAgent?: string | undefined;
|
|
1005
|
+
externalIds?: {
|
|
1006
|
+
id: string;
|
|
1007
|
+
type: string;
|
|
1008
|
+
collection: "users";
|
|
1009
|
+
encoding: "none";
|
|
1010
|
+
}[] | undefined;
|
|
1011
|
+
flags?: {
|
|
1012
|
+
key: string;
|
|
1013
|
+
value: AppEventFlagValue;
|
|
1014
|
+
target?: string | undefined;
|
|
1015
|
+
variant?: string | undefined;
|
|
1016
|
+
origin?: "runtime_config" | "trigger_context" | "provider_sync" | "api" | undefined;
|
|
1017
|
+
provider?: {
|
|
1018
|
+
name: string;
|
|
1019
|
+
project?: string | undefined;
|
|
1020
|
+
environment?: string | undefined;
|
|
1021
|
+
} | undefined;
|
|
1022
|
+
status?: string | undefined;
|
|
1023
|
+
reason?: string | undefined;
|
|
1024
|
+
evaluatedAt?: string | undefined;
|
|
1025
|
+
}[] | undefined;
|
|
1026
|
+
capabilities?: {
|
|
1027
|
+
key: string;
|
|
1028
|
+
source?: string | undefined;
|
|
1029
|
+
provider?: {
|
|
1030
|
+
name: string;
|
|
1031
|
+
project?: string | undefined;
|
|
1032
|
+
environment?: string | undefined;
|
|
1033
|
+
} | undefined;
|
|
1034
|
+
}[] | undefined;
|
|
1035
|
+
} | undefined;
|
|
1036
|
+
messageId?: string | undefined;
|
|
1037
|
+
timestamp?: number | undefined;
|
|
1038
|
+
origin?: "system" | undefined;
|
|
1039
|
+
}>>, z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
1040
|
+
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
1041
|
+
identities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
1042
|
+
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
1043
|
+
value: z.ZodMiniString<string>;
|
|
1044
|
+
}, z.core.$strip>>>;
|
|
1045
|
+
context: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
1046
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
1047
|
+
path: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1048
|
+
referrer: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1049
|
+
search: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1050
|
+
}, z.core.$strip>>;
|
|
1051
|
+
locale: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1052
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1053
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
1054
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
1055
|
+
type: z.ZodMiniString<string>;
|
|
1056
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
1057
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
1058
|
+
}, z.core.$strip>>>;
|
|
1059
|
+
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
1060
|
+
key: z.ZodMiniString<string>;
|
|
1061
|
+
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1062
|
+
value: z.ZodMiniType<AppEventFlagValue, unknown, z.core.$ZodTypeInternals<AppEventFlagValue, unknown>>;
|
|
1063
|
+
variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1064
|
+
origin: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
1065
|
+
runtime_config: "runtime_config";
|
|
1066
|
+
trigger_context: "trigger_context";
|
|
1067
|
+
provider_sync: "provider_sync";
|
|
1068
|
+
api: "api";
|
|
1069
|
+
}>>;
|
|
1070
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
1071
|
+
name: z.ZodMiniString<string>;
|
|
1072
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1073
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1074
|
+
}, z.core.$strip>>;
|
|
1075
|
+
status: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1076
|
+
reason: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1077
|
+
evaluatedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1078
|
+
}, z.core.$strip>>>;
|
|
1079
|
+
capabilities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
1080
|
+
key: z.ZodMiniString<string>;
|
|
1081
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1082
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
1083
|
+
name: z.ZodMiniString<string>;
|
|
1084
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1085
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1086
|
+
}, z.core.$strip>>;
|
|
1087
|
+
}, z.core.$strip>>>;
|
|
1088
|
+
}, z.core.$strip>>;
|
|
1089
|
+
messageId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1090
|
+
timestamp: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
1091
|
+
origin: z.ZodMiniLiteral<"system">;
|
|
1092
|
+
event: z.ZodMiniEnum<{
|
|
1093
|
+
"Flow Viewed": "Flow Viewed";
|
|
1094
|
+
"Flow Dismissed": "Flow Dismissed";
|
|
1095
|
+
}>;
|
|
1096
|
+
references: z.ZodMiniObject<{
|
|
1097
|
+
surveyId: z.ZodMiniString<string>;
|
|
1098
|
+
}, z.core.$strip>;
|
|
1099
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
1100
|
+
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
1101
|
+
identities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
1102
|
+
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
1103
|
+
value: z.ZodMiniString<string>;
|
|
1104
|
+
}, z.core.$strip>>>;
|
|
1105
|
+
context: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
1106
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
1107
|
+
path: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1108
|
+
referrer: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1109
|
+
search: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1110
|
+
}, z.core.$strip>>;
|
|
1111
|
+
locale: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1112
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1113
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
1114
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
1115
|
+
type: z.ZodMiniString<string>;
|
|
1116
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
1117
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
1118
|
+
}, z.core.$strip>>>;
|
|
1119
|
+
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
1120
|
+
key: z.ZodMiniString<string>;
|
|
1121
|
+
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1122
|
+
value: z.ZodMiniType<AppEventFlagValue, unknown, z.core.$ZodTypeInternals<AppEventFlagValue, unknown>>;
|
|
1123
|
+
variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1124
|
+
origin: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
1125
|
+
runtime_config: "runtime_config";
|
|
1126
|
+
trigger_context: "trigger_context";
|
|
1127
|
+
provider_sync: "provider_sync";
|
|
1128
|
+
api: "api";
|
|
1129
|
+
}>>;
|
|
1130
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
1131
|
+
name: z.ZodMiniString<string>;
|
|
1132
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1133
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1134
|
+
}, z.core.$strip>>;
|
|
1135
|
+
status: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1136
|
+
reason: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1137
|
+
evaluatedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1138
|
+
}, z.core.$strip>>>;
|
|
1139
|
+
capabilities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
1140
|
+
key: z.ZodMiniString<string>;
|
|
1141
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1142
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
1143
|
+
name: z.ZodMiniString<string>;
|
|
1144
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1145
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1146
|
+
}, z.core.$strip>>;
|
|
1147
|
+
}, z.core.$strip>>>;
|
|
1148
|
+
}, z.core.$strip>>;
|
|
1149
|
+
messageId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1150
|
+
timestamp: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
1151
|
+
origin: z.ZodMiniLiteral<"customer">;
|
|
1152
|
+
event: z.ZodMiniString<string>;
|
|
1153
|
+
properties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniType<AppEventJsonValue, unknown, z.core.$ZodTypeInternals<AppEventJsonValue, unknown>>>>;
|
|
1154
|
+
}, z.core.$strip>], "origin">]>;
|
|
386
1155
|
export type AppEventTrackInput = z.output<typeof appEventTrackSchema>;
|
|
387
1156
|
export type AppEventPayload = z.output<typeof appEventPayloadSchema>;
|
|
388
1157
|
export type AppEventFlag = z.output<typeof appEventFlagSchema>;
|