@getuserfeedback/protocol 1.6.1 → 2.0.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/flow-assignments.d.ts +0 -10
- package/dist/flow-assignments.d.ts.map +1 -1
- package/dist/flow-assignments.js +0 -2
- package/dist/flow-display.d.ts +8 -2
- package/dist/flow-display.d.ts.map +1 -1
- package/dist/flow-display.js +6 -3
- package/package.json +1 -1
- package/src/flow-assignments.ts +0 -2
- package/src/flow-display.test.ts +32 -0
- package/src/flow-display.ts +9 -4
|
@@ -217,8 +217,6 @@ export declare const flowAssignmentRecordSchema: z.ZodMiniObject<{
|
|
|
217
217
|
completedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
218
218
|
expiredAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
219
219
|
supersededAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
220
|
-
withdrawnAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
221
|
-
withdrawnFinalAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
222
220
|
}, z.core.$strip>;
|
|
223
221
|
export declare const listPendingFlowAssignmentsResponseSchema: z.ZodMiniObject<{
|
|
224
222
|
fetchedAt: z.ZodMiniString<string>;
|
|
@@ -247,8 +245,6 @@ export declare const listPendingFlowAssignmentsResponseSchema: z.ZodMiniObject<{
|
|
|
247
245
|
completedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
248
246
|
expiredAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
249
247
|
supersededAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
250
|
-
withdrawnAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
251
|
-
withdrawnFinalAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
252
248
|
}, z.core.$strip>>;
|
|
253
249
|
}, z.core.$strip>;
|
|
254
250
|
export declare const claimPendingFlowAssignmentsRequestSchema: z.ZodMiniObject<{
|
|
@@ -371,8 +367,6 @@ export declare const claimPendingFlowAssignmentsResponseSchema: z.ZodMiniObject<
|
|
|
371
367
|
completedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
372
368
|
expiredAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
373
369
|
supersededAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
374
|
-
withdrawnAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
375
|
-
withdrawnFinalAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
376
370
|
}, z.core.$strip>>;
|
|
377
371
|
}, z.core.$strip>;
|
|
378
372
|
export declare const updateFlowAssignmentLifecycleRequestSchema: z.ZodMiniObject<{
|
|
@@ -506,8 +500,6 @@ export declare const updateFlowAssignmentLifecycleResponseSchema: z.ZodMiniObjec
|
|
|
506
500
|
completedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
507
501
|
expiredAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
508
502
|
supersededAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
509
|
-
withdrawnAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
510
|
-
withdrawnFinalAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
511
503
|
}, z.core.$strip>;
|
|
512
504
|
export declare const nullableUpdateFlowAssignmentLifecycleResponseSchema: z.ZodMiniNullable<z.ZodMiniObject<{
|
|
513
505
|
flowAssignmentId: z.ZodMiniString<string>;
|
|
@@ -534,8 +526,6 @@ export declare const nullableUpdateFlowAssignmentLifecycleResponseSchema: z.ZodM
|
|
|
534
526
|
completedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
535
527
|
expiredAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
536
528
|
supersededAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
537
|
-
withdrawnAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
538
|
-
withdrawnFinalAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
539
529
|
}, z.core.$strip>>;
|
|
540
530
|
export type FlowAssignmentStatus = z.output<typeof flowAssignmentStatusSchema>;
|
|
541
531
|
export type FlowAssignmentRecipientRequest = z.output<typeof flowAssignmentRecipientRequestSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-assignments.d.ts","sourceRoot":"","sources":["../src/flow-assignments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAO9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,MAAM,MAAM,yCAAyC,GACpD,yBAAyB,MAAM,EAAE,CAAC;AACnC,MAAM,MAAM,+BAA+B,GACxC,iBAAiB,GACjB,yCAAyC,CAAC;AAc7C,eAAO,MAAM,4BAA4B;;;iBAMvC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;EAUrC,CAAC;AAEH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU/C,CAAC;AAEH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI/C,CAAC;AAEH,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"flow-assignments.d.ts","sourceRoot":"","sources":["../src/flow-assignments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAO9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,MAAM,MAAM,yCAAyC,GACpD,yBAAyB,MAAM,EAAE,CAAC;AACnC,MAAM,MAAM,+BAA+B,GACxC,iBA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AAC,CAAC;AAC/E,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CACpD,OAAO,oCAAoC,CAC3C,CAAC;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CACpD,OAAO,oCAAoC,CAC3C,CAAC;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC/E,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CACxD,OAAO,wCAAwC,CAC/C,CAAC;AACF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CACzD,OAAO,yCAAyC,CAChD,CAAC;AACF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CACxD,OAAO,wCAAwC,CAC/C,CAAC;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CACvD,OAAO,uCAAuC,CAC9C,CAAC;AACF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CACxD,OAAO,wCAAwC,CAC/C,CAAC;AACF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAC1D,OAAO,0CAA0C,CACjD,CAAC;AACF,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAC3D,OAAO,2CAA2C,CAClD,CAAC"}
|
package/dist/flow-assignments.js
CHANGED
|
@@ -50,8 +50,6 @@ export const flowAssignmentRecordSchema = z.object({
|
|
|
50
50
|
completedAt: z.optional(z.string()),
|
|
51
51
|
expiredAt: z.optional(z.string()),
|
|
52
52
|
supersededAt: z.optional(z.string()),
|
|
53
|
-
withdrawnAt: z.optional(z.string()),
|
|
54
|
-
withdrawnFinalAt: z.optional(z.string()),
|
|
55
53
|
});
|
|
56
54
|
export const listPendingFlowAssignmentsResponseSchema = z.object({
|
|
57
55
|
fetchedAt: z.string(),
|
package/dist/flow-display.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare const runtimeDisplayEligibilitySchema: z.ZodMiniObject<{
|
|
|
7
7
|
}, z.core.$strip>;
|
|
8
8
|
export declare const runtimeDisplayTriggerSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
9
9
|
kind: z.ZodMiniLiteral<"immediate">;
|
|
10
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
11
|
+
kind: z.ZodMiniLiteral<"exit_intent">;
|
|
10
12
|
}, z.core.$strip>], "kind">;
|
|
11
13
|
export declare const runtimeDisplayBroadcastOpportunitySchema: z.ZodMiniObject<{
|
|
12
14
|
opportunityId: z.ZodMiniString<string>;
|
|
@@ -25,6 +27,8 @@ export declare const runtimeDisplayBroadcastOpportunitySchema: z.ZodMiniObject<{
|
|
|
25
27
|
}, z.core.$strip>;
|
|
26
28
|
runtimeTrigger: z.ZodMiniDefault<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
27
29
|
kind: z.ZodMiniLiteral<"immediate">;
|
|
30
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
31
|
+
kind: z.ZodMiniLiteral<"exit_intent">;
|
|
28
32
|
}, z.core.$strip>], "kind">>;
|
|
29
33
|
}, z.core.$strip>;
|
|
30
34
|
export declare const runtimeDisplayBroadcastsSchema: z.ZodMiniObject<{
|
|
@@ -46,6 +50,8 @@ export declare const runtimeDisplayBroadcastsSchema: z.ZodMiniObject<{
|
|
|
46
50
|
}, z.core.$strip>;
|
|
47
51
|
runtimeTrigger: z.ZodMiniDefault<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
48
52
|
kind: z.ZodMiniLiteral<"immediate">;
|
|
53
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
54
|
+
kind: z.ZodMiniLiteral<"exit_intent">;
|
|
49
55
|
}, z.core.$strip>], "kind">>;
|
|
50
56
|
}, z.core.$strip>>;
|
|
51
57
|
}, z.core.$strip>;
|
|
@@ -171,8 +177,6 @@ export declare const flowDisplaySyncResponseSchema: z.ZodMiniObject<{
|
|
|
171
177
|
completedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
172
178
|
expiredAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
173
179
|
supersededAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
174
|
-
withdrawnAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
175
|
-
withdrawnFinalAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
176
180
|
}, z.core.$strip>>;
|
|
177
181
|
}, z.core.$strip>;
|
|
178
182
|
broadcasts: z.ZodMiniObject<{
|
|
@@ -194,6 +198,8 @@ export declare const flowDisplaySyncResponseSchema: z.ZodMiniObject<{
|
|
|
194
198
|
}, z.core.$strip>;
|
|
195
199
|
runtimeTrigger: z.ZodMiniDefault<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
196
200
|
kind: z.ZodMiniLiteral<"immediate">;
|
|
201
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
202
|
+
kind: z.ZodMiniLiteral<"exit_intent">;
|
|
197
203
|
}, z.core.$strip>], "kind">>;
|
|
198
204
|
}, z.core.$strip>>;
|
|
199
205
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-display.d.ts","sourceRoot":"","sources":["../src/flow-display.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAQ9B,eAAO,MAAM,+BAA+B;;;;;iBAU1C,CAAC;
|
|
1
|
+
{"version":3,"file":"flow-display.d.ts","sourceRoot":"","sources":["../src/flow-display.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAQ9B,eAAO,MAAM,+BAA+B;;;;;iBAU1C,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;2BAOtC,CAAC;AAQH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;iBAcnD,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;iBAGzC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASvC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMxC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAC9C,OAAO,8BAA8B,CACrC,CAAC;AACF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CACxD,OAAO,wCAAwC,CAC/C,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAC/C,OAAO,+BAA+B,CACtC,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAC3C,OAAO,2BAA2B,CAClC,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAC5C,OAAO,4BAA4B,CACnC,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAC7C,OAAO,6BAA6B,CACpC,CAAC"}
|
package/dist/flow-display.js
CHANGED
|
@@ -6,14 +6,17 @@ export const runtimeDisplayEligibilitySchema = z.object({
|
|
|
6
6
|
path: z.string().check(z.trim(), z.minLength(1)),
|
|
7
7
|
})),
|
|
8
8
|
});
|
|
9
|
-
const immediateRuntimeDisplayTrigger = {
|
|
10
|
-
kind: "immediate",
|
|
11
|
-
};
|
|
12
9
|
export const runtimeDisplayTriggerSchema = z.discriminatedUnion("kind", [
|
|
13
10
|
z.object({
|
|
14
11
|
kind: z.literal("immediate"),
|
|
15
12
|
}),
|
|
13
|
+
z.object({
|
|
14
|
+
kind: z.literal("exit_intent"),
|
|
15
|
+
}),
|
|
16
16
|
]);
|
|
17
|
+
const immediateRuntimeDisplayTrigger = {
|
|
18
|
+
kind: "immediate",
|
|
19
|
+
};
|
|
17
20
|
export const runtimeDisplayBroadcastOpportunitySchema = z.object({
|
|
18
21
|
opportunityId: z.string().check(z.trim(), z.minLength(1)),
|
|
19
22
|
flowId: z.string().check(z.trim(), z.minLength(1)),
|
package/package.json
CHANGED
package/src/flow-assignments.ts
CHANGED
|
@@ -80,8 +80,6 @@ export const flowAssignmentRecordSchema = z.object({
|
|
|
80
80
|
completedAt: z.optional(z.string()),
|
|
81
81
|
expiredAt: z.optional(z.string()),
|
|
82
82
|
supersededAt: z.optional(z.string()),
|
|
83
|
-
withdrawnAt: z.optional(z.string()),
|
|
84
|
-
withdrawnFinalAt: z.optional(z.string()),
|
|
85
83
|
});
|
|
86
84
|
|
|
87
85
|
export const listPendingFlowAssignmentsResponseSchema = z.object({
|
package/src/flow-display.test.ts
CHANGED
|
@@ -131,4 +131,36 @@ describe("flow display sync contracts", () => {
|
|
|
131
131
|
kind: "immediate",
|
|
132
132
|
});
|
|
133
133
|
});
|
|
134
|
+
|
|
135
|
+
it("accepts exit-intent runtime broadcast opportunities", () => {
|
|
136
|
+
const result = flowDisplaySyncResponseSchema.parse({
|
|
137
|
+
fetchedAt: "2026-06-18T00:00:00.000Z",
|
|
138
|
+
assignments: {
|
|
139
|
+
claimed: [],
|
|
140
|
+
},
|
|
141
|
+
broadcasts: {
|
|
142
|
+
version: "broadcasts_1",
|
|
143
|
+
opportunities: [
|
|
144
|
+
{
|
|
145
|
+
opportunityId: "rtb_daver_1",
|
|
146
|
+
flowId: "sur_1",
|
|
147
|
+
flowVersionId: "flv_1",
|
|
148
|
+
source: {
|
|
149
|
+
kind: "runtime_broadcast",
|
|
150
|
+
},
|
|
151
|
+
runtimeEligibility: {
|
|
152
|
+
requiredCapabilities: [],
|
|
153
|
+
},
|
|
154
|
+
runtimeTrigger: {
|
|
155
|
+
kind: "exit_intent",
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
expect(result.broadcasts.opportunities[0]?.runtimeTrigger).toEqual({
|
|
163
|
+
kind: "exit_intent",
|
|
164
|
+
});
|
|
165
|
+
});
|
|
134
166
|
});
|
package/src/flow-display.ts
CHANGED
|
@@ -18,16 +18,21 @@ export const runtimeDisplayEligibilitySchema = z.object({
|
|
|
18
18
|
),
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
const immediateRuntimeDisplayTrigger = {
|
|
22
|
-
kind: "immediate",
|
|
23
|
-
} as const;
|
|
24
|
-
|
|
25
21
|
export const runtimeDisplayTriggerSchema = z.discriminatedUnion("kind", [
|
|
26
22
|
z.object({
|
|
27
23
|
kind: z.literal("immediate"),
|
|
28
24
|
}),
|
|
25
|
+
z.object({
|
|
26
|
+
kind: z.literal("exit_intent"),
|
|
27
|
+
}),
|
|
29
28
|
]);
|
|
30
29
|
|
|
30
|
+
const immediateRuntimeDisplayTrigger: z.output<
|
|
31
|
+
typeof runtimeDisplayTriggerSchema
|
|
32
|
+
> = {
|
|
33
|
+
kind: "immediate",
|
|
34
|
+
};
|
|
35
|
+
|
|
31
36
|
export const runtimeDisplayBroadcastOpportunitySchema = z.object({
|
|
32
37
|
opportunityId: z.string().check(z.trim(), z.minLength(1)),
|
|
33
38
|
flowId: z.string().check(z.trim(), z.minLength(1)),
|