@getuserfeedback/protocol 1.3.0 → 1.4.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 +4 -0
- package/dist/flow-assignments.d.ts.map +1 -1
- package/dist/flow-assignments.js +1 -1
- package/dist/flow-display.d.ts +140 -0
- package/dist/flow-display.d.ts.map +1 -0
- package/dist/flow-display.js +21 -0
- package/dist/host/host-event-contract.d.ts +2 -0
- package/dist/host/host-event-contract.d.ts.map +1 -1
- package/dist/host/host-event-contract.js +3 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/webview-transport.d.ts +2 -0
- package/dist/webview-transport.d.ts.map +1 -1
- package/dist/webview-transport.js +4 -1
- package/package.json +8 -1
- package/src/flow-assignments.ts +1 -1
- package/src/flow-display.test.ts +56 -0
- package/src/flow-display.ts +41 -0
- package/src/host/host-event-contract.ts +5 -2
- package/src/index.ts +8 -0
- package/src/webview-transport.ts +4 -1
|
@@ -2,6 +2,10 @@ import * as z from "zod/mini";
|
|
|
2
2
|
import type { IdentityTypeValue } from "./identity-type.js";
|
|
3
3
|
export type FlowAssignmentExternalIdIdentityTypeValue = `externalId.users.none.${string}`;
|
|
4
4
|
export type FlowAssignmentIdentityTypeValue = IdentityTypeValue | FlowAssignmentExternalIdIdentityTypeValue;
|
|
5
|
+
export declare const flowAssignmentIdentitySchema: z.ZodMiniObject<{
|
|
6
|
+
type: z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>, z.ZodMiniType<`externalId.users.none.${string}`, `externalId.users.none.${string}`, z.core.$ZodTypeInternals<`externalId.users.none.${string}`, `externalId.users.none.${string}`>>]>;
|
|
7
|
+
value: z.ZodMiniString<string>;
|
|
8
|
+
}, z.core.$strip>;
|
|
5
9
|
export declare const flowAssignmentStatusSchema: z.ZodMiniEnum<{
|
|
6
10
|
pending: "pending";
|
|
7
11
|
held: "held";
|
|
@@ -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;
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBrC,CAAC;AAEH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;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F,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
|
@@ -3,7 +3,7 @@ import { appEventCapabilitySchema, appEventFlagSchema, appEventIdentityTypeSchem
|
|
|
3
3
|
const flowAssignmentExternalIdIdentityTypeSchema = z.string().check(z.trim(), z.minLength(1), z.regex(/^externalId\.users\.none\.[a-z0-9][a-z0-9_.-]*$/, {
|
|
4
4
|
message: "External ID identity type must use externalId.users.none.<type> with a lowercase Segment external ID type.",
|
|
5
5
|
}));
|
|
6
|
-
const flowAssignmentIdentitySchema = z.object({
|
|
6
|
+
export const flowAssignmentIdentitySchema = z.object({
|
|
7
7
|
type: z.union([
|
|
8
8
|
appEventIdentityTypeSchema,
|
|
9
9
|
flowAssignmentExternalIdIdentityTypeSchema,
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import * as z from "zod/mini";
|
|
2
|
+
export declare const runtimeDisplayBroadcastsSchema: z.ZodMiniObject<{
|
|
3
|
+
version: z.ZodMiniString<string>;
|
|
4
|
+
opportunities: z.ZodMiniArray<z.ZodMiniNever>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const flowDisplaySyncRequestSchema: z.ZodMiniObject<{
|
|
7
|
+
identities: z.ZodMiniDefault<z.ZodMiniArray<z.ZodMiniObject<{
|
|
8
|
+
type: z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>, z.ZodMiniType<`externalId.users.none.${string}`, `externalId.users.none.${string}`, z.core.$ZodTypeInternals<`externalId.users.none.${string}`, `externalId.users.none.${string}`>>]>;
|
|
9
|
+
value: z.ZodMiniString<string>;
|
|
10
|
+
}, z.core.$strip>>>;
|
|
11
|
+
context: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
12
|
+
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
13
|
+
key: z.ZodMiniString<string>;
|
|
14
|
+
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
15
|
+
value: z.ZodMiniType<string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
16
|
+
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
17
|
+
} | null)[] | {
|
|
18
|
+
[key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
19
|
+
} | null)[] | {
|
|
20
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
21
|
+
} | null)[] | {
|
|
22
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
23
|
+
} | null)[] | {
|
|
24
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
25
|
+
} | null)[] | {
|
|
26
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
27
|
+
} | null)[] | {
|
|
28
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
29
|
+
} | null)[] | {
|
|
30
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
31
|
+
} | null)[] | {
|
|
32
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
33
|
+
} | null)[] | {
|
|
34
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
35
|
+
} | null)[] | {
|
|
36
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
37
|
+
} | null)[] | {
|
|
38
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
39
|
+
} | null, unknown, z.core.$ZodTypeInternals<string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
40
|
+
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
41
|
+
} | null)[] | {
|
|
42
|
+
[key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
43
|
+
} | null)[] | {
|
|
44
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
45
|
+
} | null)[] | {
|
|
46
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
47
|
+
} | null)[] | {
|
|
48
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
49
|
+
} | null)[] | {
|
|
50
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
51
|
+
} | null)[] | {
|
|
52
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
53
|
+
} | null)[] | {
|
|
54
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
55
|
+
} | null)[] | {
|
|
56
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
57
|
+
} | null)[] | {
|
|
58
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
59
|
+
} | null)[] | {
|
|
60
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
61
|
+
} | null)[] | {
|
|
62
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
63
|
+
} | null, unknown>>;
|
|
64
|
+
variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
65
|
+
origin: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
66
|
+
runtime_config: "runtime_config";
|
|
67
|
+
trigger_context: "trigger_context";
|
|
68
|
+
provider_sync: "provider_sync";
|
|
69
|
+
api: "api";
|
|
70
|
+
}>>;
|
|
71
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
72
|
+
name: z.ZodMiniString<string>;
|
|
73
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
74
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
status: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
77
|
+
reason: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
78
|
+
evaluatedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
79
|
+
}, z.core.$strip>>>;
|
|
80
|
+
capabilities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
81
|
+
key: z.ZodMiniString<string>;
|
|
82
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
83
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
84
|
+
name: z.ZodMiniString<string>;
|
|
85
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
86
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
87
|
+
}, z.core.$strip>>;
|
|
88
|
+
}, z.core.$strip>>>;
|
|
89
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
90
|
+
path: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
91
|
+
referrer: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
92
|
+
search: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
93
|
+
}, z.core.$strip>>;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
holdOwnerKey: z.ZodMiniString<string>;
|
|
96
|
+
at: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
97
|
+
assignmentLimit: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
98
|
+
knownBroadcastManifestVersion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
export declare const flowDisplaySyncResponseSchema: z.ZodMiniObject<{
|
|
101
|
+
fetchedAt: z.ZodMiniString<string>;
|
|
102
|
+
assignments: z.ZodMiniObject<{
|
|
103
|
+
claimed: z.ZodMiniArray<z.ZodMiniObject<{
|
|
104
|
+
flowAssignmentId: z.ZodMiniString<string>;
|
|
105
|
+
flowId: z.ZodMiniString<string>;
|
|
106
|
+
holdGroupToken: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
107
|
+
presentedFlowVersionId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
108
|
+
latestFlowVersionId: z.ZodMiniString<string>;
|
|
109
|
+
status: z.ZodMiniEnum<{
|
|
110
|
+
pending: "pending";
|
|
111
|
+
held: "held";
|
|
112
|
+
presented: "presented";
|
|
113
|
+
completed: "completed";
|
|
114
|
+
expired: "expired";
|
|
115
|
+
superseded: "superseded";
|
|
116
|
+
withdrawn_pending: "withdrawn_pending";
|
|
117
|
+
withdrawn_presented: "withdrawn_presented";
|
|
118
|
+
withdrawn_final: "withdrawn_final";
|
|
119
|
+
}>;
|
|
120
|
+
assignedAt: z.ZodMiniString<string>;
|
|
121
|
+
expiresAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
122
|
+
heldAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
123
|
+
holdExpiresAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
124
|
+
presentedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
125
|
+
completedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
126
|
+
expiredAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
127
|
+
supersededAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
128
|
+
withdrawnAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
129
|
+
withdrawnFinalAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
130
|
+
}, z.core.$strip>>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
broadcasts: z.ZodMiniObject<{
|
|
133
|
+
version: z.ZodMiniString<string>;
|
|
134
|
+
opportunities: z.ZodMiniArray<z.ZodMiniNever>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
export type RuntimeDisplayBroadcasts = z.output<typeof runtimeDisplayBroadcastsSchema>;
|
|
138
|
+
export type FlowDisplaySyncRequest = z.output<typeof flowDisplaySyncRequestSchema>;
|
|
139
|
+
export type FlowDisplaySyncResponse = z.output<typeof flowDisplaySyncResponseSchema>;
|
|
140
|
+
//# sourceMappingURL=flow-display.d.ts.map
|
|
@@ -0,0 +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,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,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAC5C,OAAO,4BAA4B,CACnC,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAC7C,OAAO,6BAA6B,CACpC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as z from "zod/mini";
|
|
2
|
+
import { flowAssignmentIdentitySchema, flowAssignmentRecordSchema, flowAssignmentTargetingContextSchema, } from "./flow-assignments.js";
|
|
3
|
+
export const runtimeDisplayBroadcastsSchema = z.object({
|
|
4
|
+
version: z.string().check(z.trim(), z.minLength(1)),
|
|
5
|
+
opportunities: z.array(z.never()),
|
|
6
|
+
});
|
|
7
|
+
export const flowDisplaySyncRequestSchema = z.object({
|
|
8
|
+
identities: z._default(z.array(flowAssignmentIdentitySchema), []),
|
|
9
|
+
context: z.optional(flowAssignmentTargetingContextSchema),
|
|
10
|
+
holdOwnerKey: z.string().check(z.trim(), z.minLength(1)),
|
|
11
|
+
at: z.optional(z.number()),
|
|
12
|
+
assignmentLimit: z.optional(z.number()),
|
|
13
|
+
knownBroadcastManifestVersion: z.optional(z.string().check(z.trim(), z.minLength(1))),
|
|
14
|
+
});
|
|
15
|
+
export const flowDisplaySyncResponseSchema = z.object({
|
|
16
|
+
fetchedAt: z.string(),
|
|
17
|
+
assignments: z.object({
|
|
18
|
+
claimed: z.array(flowAssignmentRecordSchema),
|
|
19
|
+
}),
|
|
20
|
+
broadcasts: runtimeDisplayBroadcastsSchema,
|
|
21
|
+
});
|
|
@@ -21,6 +21,8 @@ export interface FlowStateChangedDetail extends FlowState {
|
|
|
21
21
|
}
|
|
22
22
|
export interface InstanceFlowStateChangedDetail extends FlowState {
|
|
23
23
|
instanceId: string;
|
|
24
|
+
/** Flow handle for the currently pinned aggregate flow, when known. */
|
|
25
|
+
flowHandleId?: string;
|
|
24
26
|
}
|
|
25
27
|
export interface OpenRequestedDetail {
|
|
26
28
|
instanceId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-event-contract.d.ts","sourceRoot":"","sources":["../../src/host/host-event-contract.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,6FAA6F;AAC7F,MAAM,WAAW,SAAS;IACzB,qCAAqC;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAuB,SAAQ,SAAS;IACxD,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,8BAA+B,SAAQ,SAAS;IAChE,UAAU,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"host-event-contract.d.ts","sourceRoot":"","sources":["../../src/host/host-event-contract.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,6FAA6F;AAC7F,MAAM,WAAW,SAAS;IACzB,qCAAqC;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAuB,SAAQ,SAAS;IACxD,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,8BAA+B,SAAQ,SAAS;IAChE,UAAU,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,SAAS,GAAG,WAAW,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAA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AAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1C;AAED,MAAM,MAAM,oBAAoB,GAC7B,2BAA2B,GAC3B,2BAA2B,CAAC;AAE/B,wBAAgB,sBAAsB,CACrC,MAAM,EAAE,OAAO,GACb,MAAM,IAAI,oBAAoB,CAkBhC;AAED,+FAA+F;AAC/F,MAAM,MAAM,wBAAwB,GAAG;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG,wBAAwB,CAAC;AAElE;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE;IACzD,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,0BAA0B,GAAG,IAAI,CAEpC;AAcD;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE;IACzD,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,wBAAwB,GAAG,IAAI,CAgBlC"}
|
|
@@ -34,12 +34,13 @@ export function isFlowStateChangedDetail(detail) {
|
|
|
34
34
|
export function isInstanceFlowStateChangedDetail(detail) {
|
|
35
35
|
if (!isRecord(detail))
|
|
36
36
|
return false;
|
|
37
|
-
const { instanceId, isOpen, isLoading, width, height } = detail;
|
|
37
|
+
const { instanceId, isOpen, isLoading, width, height, flowHandleId } = detail;
|
|
38
38
|
return (isNonEmptyString(instanceId) &&
|
|
39
39
|
typeof isOpen === "boolean" &&
|
|
40
40
|
typeof isLoading === "boolean" &&
|
|
41
41
|
(typeof width === "undefined" || typeof width === "number") &&
|
|
42
|
-
(typeof height === "undefined" || typeof height === "number")
|
|
42
|
+
(typeof height === "undefined" || typeof height === "number") &&
|
|
43
|
+
(typeof flowHandleId === "undefined" || isNonEmptyString(flowHandleId)));
|
|
43
44
|
}
|
|
44
45
|
export function isOpenRequestedDetail(detail) {
|
|
45
46
|
if (!isRecord(detail))
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { DEFAULT_AUTO_DETECT_COLOR_SCHEME_ATTRS } from "./defaults.js";
|
|
|
4
4
|
export type { ErrorEvent, ProtocolErrorCode } from "./errors.js";
|
|
5
5
|
export { ErrorCategory, ErrorCategorySchema, ErrorEventSchema, ProtocolError, } from "./errors.js";
|
|
6
6
|
export { type ClaimPendingFlowAssignmentsRequest, type ClaimPendingFlowAssignmentsResponse, claimPendingFlowAssignmentsRequestSchema, claimPendingFlowAssignmentsResponseSchema, type FlowAssignmentExternalIdIdentityTypeValue, type FlowAssignmentIdentityTypeValue, type FlowAssignmentRecipientRequest, type FlowAssignmentRecord, type FlowAssignmentStatus, type FlowAssignmentTargetingContext, flowAssignmentRecipientRequestSchema, flowAssignmentRecordSchema, flowAssignmentStatusSchema, flowAssignmentTargetingContextSchema, type ListPendingFlowAssignmentsResponse, listPendingFlowAssignmentsResponseSchema, nullableUpdateFlowAssignmentLifecycleResponseSchema, type ReleaseFlowAssignmentClaimRequest, type ReleaseFlowAssignmentClaimResponse, releaseFlowAssignmentClaimRequestSchema, releaseFlowAssignmentClaimResponseSchema, type UpdateFlowAssignmentLifecycleRequest, type UpdateFlowAssignmentLifecycleResponse, updateFlowAssignmentLifecycleRequestSchema, updateFlowAssignmentLifecycleResponseSchema, } from "./flow-assignments.js";
|
|
7
|
+
export { type FlowDisplaySyncRequest, type FlowDisplaySyncResponse, flowDisplaySyncRequestSchema, flowDisplaySyncResponseSchema, type RuntimeDisplayBroadcasts, runtimeDisplayBroadcastsSchema, } from "./flow-display.js";
|
|
7
8
|
export { buildIdentityTypeGuidanceMessage, getIdentityTypeSuggestion, IDENTITY_TYPE_VALUES, type IdentityTypeValue, isIdentityTypeValue, type StandardIdentityTypeValue, } from "./identity-type.js";
|
|
8
9
|
export { isPublicGrantScope, type PublicGrantScope, publicGrantScopeIdSchema, } from "./public-grant-scope.js";
|
|
9
10
|
export { type RuntimeEndpoints, resolveApiBaseUrl, resolveCoreUrl, resolveTrpcBaseUrl, runtimeEndpointsSchema, } from "./runtime-endpoints.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,2BAA2B,EAC3B,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,2BAA2B,EAC3B,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,2BAA2B,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,KAAK,UAAU,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sCAAsC,EAAE,MAAM,eAAe,CAAC;AACvE,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EACN,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EACxC,wCAAwC,EACxC,yCAAyC,EACzC,KAAK,yCAAyC,EAC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} from "./client-meta.js";
|
|
|
3
3
|
export { DEFAULT_AUTO_DETECT_COLOR_SCHEME_ATTRS } from "./defaults.js";
|
|
4
4
|
export { ErrorCategory, ErrorCategorySchema, ErrorEventSchema, ProtocolError, } from "./errors.js";
|
|
5
5
|
export { claimPendingFlowAssignmentsRequestSchema, claimPendingFlowAssignmentsResponseSchema, flowAssignmentRecipientRequestSchema, flowAssignmentRecordSchema, flowAssignmentStatusSchema, flowAssignmentTargetingContextSchema, listPendingFlowAssignmentsResponseSchema, nullableUpdateFlowAssignmentLifecycleResponseSchema, releaseFlowAssignmentClaimRequestSchema, releaseFlowAssignmentClaimResponseSchema, updateFlowAssignmentLifecycleRequestSchema, updateFlowAssignmentLifecycleResponseSchema, } from "./flow-assignments.js";
|
|
6
|
+
export { flowDisplaySyncRequestSchema, flowDisplaySyncResponseSchema, runtimeDisplayBroadcastsSchema, } from "./flow-display.js";
|
|
6
7
|
export { buildIdentityTypeGuidanceMessage, getIdentityTypeSuggestion, IDENTITY_TYPE_VALUES, isIdentityTypeValue, } from "./identity-type.js";
|
|
7
8
|
export { isPublicGrantScope, publicGrantScopeIdSchema, } from "./public-grant-scope.js";
|
|
8
9
|
export { resolveApiBaseUrl, resolveCoreUrl, resolveTrpcBaseUrl, runtimeEndpointsSchema, } from "./runtime-endpoints.js";
|
|
@@ -886,6 +886,7 @@ export declare const webViewTransportHostEventSchema: z.ZodMiniDiscriminatedUnio
|
|
|
886
886
|
}, z.core.$strict>, z.ZodMiniObject<{
|
|
887
887
|
name: z.ZodMiniLiteral<"instance:flow:state-changed:instance">;
|
|
888
888
|
detail: z.ZodMiniObject<{
|
|
889
|
+
flowHandleId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
889
890
|
instanceId: z.ZodMiniString<string>;
|
|
890
891
|
isOpen: z.ZodMiniBoolean<boolean>;
|
|
891
892
|
isLoading: z.ZodMiniBoolean<boolean>;
|
|
@@ -1470,6 +1471,7 @@ export declare const webViewTransportWebMessageSchema: z.ZodMiniDiscriminatedUni
|
|
|
1470
1471
|
}, z.core.$strict>, z.ZodMiniObject<{
|
|
1471
1472
|
name: z.ZodMiniLiteral<"instance:flow:state-changed:instance">;
|
|
1472
1473
|
detail: z.ZodMiniObject<{
|
|
1474
|
+
flowHandleId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1473
1475
|
instanceId: z.ZodMiniString<string>;
|
|
1474
1476
|
isOpen: z.ZodMiniBoolean<boolean>;
|
|
1475
1477
|
isLoading: z.ZodMiniBoolean<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webview-transport.d.ts","sourceRoot":"","sources":["../src/webview-transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAgB9B,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOvC,CAAC;
|
|
1
|
+
{"version":3,"file":"webview-transport.d.ts","sourceRoot":"","sources":["../src/webview-transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAgB9B,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAa3C,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAC5C,OAAO,4BAA4B,CACnC,CAAC;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CACnD,OAAO,mCAAmC,CAC1C,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAC/C,OAAO,+BAA+B,CACtC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAChD,OAAO,gCAAgC,CACvC,CAAC;AAEF,wBAAgB,kCAAkC,CACjD,KAAK,EAAE,OAAO,GACZ,6BAA6B,CAE/B;AAED,wBAAgB,+BAA+B,CAC9C,KAAK,EAAE,OAAO,GACZ,0BAA0B,CAE5B"}
|
|
@@ -45,7 +45,10 @@ const flowStateChangedDetailSchema = z.strictObject({
|
|
|
45
45
|
...flowStateBase,
|
|
46
46
|
flowHandleId: nonEmptyStringSchema,
|
|
47
47
|
});
|
|
48
|
-
const instanceFlowStateChangedDetailSchema = z.strictObject(
|
|
48
|
+
const instanceFlowStateChangedDetailSchema = z.strictObject({
|
|
49
|
+
...flowStateBase,
|
|
50
|
+
flowHandleId: z.optional(nonEmptyStringSchema),
|
|
51
|
+
});
|
|
49
52
|
const openRequestedDetailSchema = z.strictObject({
|
|
50
53
|
instanceId: nonEmptyStringSchema,
|
|
51
54
|
source: z.enum(["command", "targeting"]),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getuserfeedback/protocol",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "getuserfeedback widget protocol — host surface and (later) wire protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"getuserfeedback",
|
|
@@ -106,6 +106,12 @@
|
|
|
106
106
|
"import": "./dist/flow-assignments.js",
|
|
107
107
|
"default": "./dist/flow-assignments.js"
|
|
108
108
|
},
|
|
109
|
+
"./flow-display": {
|
|
110
|
+
"types": "./dist/flow-display.d.ts",
|
|
111
|
+
"bun": "./src/flow-display.ts",
|
|
112
|
+
"import": "./dist/flow-display.js",
|
|
113
|
+
"default": "./dist/flow-display.js"
|
|
114
|
+
},
|
|
109
115
|
"./trpc-envelope": {
|
|
110
116
|
"types": "./dist/trpc-envelope.d.ts",
|
|
111
117
|
"bun": "./src/trpc-envelope.ts",
|
|
@@ -119,6 +125,7 @@
|
|
|
119
125
|
"types": "bun ../../scripts/clean-build-output.ts dist tsconfig.tsbuildinfo && tsc -b tsconfig.json --emitDeclarationOnly",
|
|
120
126
|
"typecheck": "tsc -b tsconfig.json",
|
|
121
127
|
"test": "bun test --dots",
|
|
128
|
+
"test:changed": "bun test --changed=${TEST_CHANGED_BASE:-HEAD} --pass-with-no-tests --dots",
|
|
122
129
|
"pack:verify": "node ../../scripts/pack-and-verify.cjs",
|
|
123
130
|
"publish:dry-run": "node ../../scripts/publish-package.cjs . -- --dry-run",
|
|
124
131
|
"publish:npm": "node ../../scripts/publish-package.cjs ."
|
package/src/flow-assignments.ts
CHANGED
|
@@ -25,7 +25,7 @@ const flowAssignmentExternalIdIdentityTypeSchema = z.string().check(
|
|
|
25
25
|
FlowAssignmentExternalIdIdentityTypeValue
|
|
26
26
|
>;
|
|
27
27
|
|
|
28
|
-
const flowAssignmentIdentitySchema = z.object({
|
|
28
|
+
export const flowAssignmentIdentitySchema = z.object({
|
|
29
29
|
type: z.union([
|
|
30
30
|
appEventIdentityTypeSchema,
|
|
31
31
|
flowAssignmentExternalIdIdentityTypeSchema,
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { describe, expect, it } from "bun:test";
|
|
2
|
+
import {
|
|
3
|
+
flowDisplaySyncRequestSchema,
|
|
4
|
+
flowDisplaySyncResponseSchema,
|
|
5
|
+
} from "./flow-display";
|
|
6
|
+
|
|
7
|
+
describe("flow display sync contracts", () => {
|
|
8
|
+
it("accepts assignment claim input plus broadcast manifest version", () => {
|
|
9
|
+
const result = flowDisplaySyncRequestSchema.parse({
|
|
10
|
+
holdOwnerKey: "inst_1",
|
|
11
|
+
identities: [{ type: "anonymousId", value: "anon_1" }],
|
|
12
|
+
context: {
|
|
13
|
+
page: { path: "/pricing" },
|
|
14
|
+
capabilities: [{ key: "checkout.drawer" }],
|
|
15
|
+
},
|
|
16
|
+
assignmentLimit: 2,
|
|
17
|
+
knownBroadcastManifestVersion: "broadcasts_1",
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
expect(result).toEqual({
|
|
21
|
+
holdOwnerKey: "inst_1",
|
|
22
|
+
identities: [{ type: "anonymousId", value: "anon_1" }],
|
|
23
|
+
context: {
|
|
24
|
+
page: { path: "/pricing" },
|
|
25
|
+
capabilities: [{ key: "checkout.drawer" }],
|
|
26
|
+
},
|
|
27
|
+
assignmentLimit: 2,
|
|
28
|
+
knownBroadcastManifestVersion: "broadcasts_1",
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it("accepts claimed assignments with an empty broadcast manifest", () => {
|
|
33
|
+
const result = flowDisplaySyncResponseSchema.parse({
|
|
34
|
+
fetchedAt: "2026-06-18T00:00:00.000Z",
|
|
35
|
+
assignments: {
|
|
36
|
+
claimed: [
|
|
37
|
+
{
|
|
38
|
+
flowAssignmentId: "fa_1",
|
|
39
|
+
flowId: "sur_1",
|
|
40
|
+
holdGroupToken: "hold_1",
|
|
41
|
+
latestFlowVersionId: "flv_1",
|
|
42
|
+
status: "held",
|
|
43
|
+
assignedAt: "2026-06-18T00:00:00.000Z",
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
broadcasts: {
|
|
48
|
+
version: "empty",
|
|
49
|
+
opportunities: [],
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
expect(result.assignments.claimed[0]?.flowAssignmentId).toBe("fa_1");
|
|
54
|
+
expect(result.broadcasts.opportunities).toEqual([]);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as z from "zod/mini";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
flowAssignmentIdentitySchema,
|
|
5
|
+
flowAssignmentRecordSchema,
|
|
6
|
+
flowAssignmentTargetingContextSchema,
|
|
7
|
+
} from "./flow-assignments.js";
|
|
8
|
+
|
|
9
|
+
export const runtimeDisplayBroadcastsSchema = z.object({
|
|
10
|
+
version: z.string().check(z.trim(), z.minLength(1)),
|
|
11
|
+
opportunities: z.array(z.never()),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const flowDisplaySyncRequestSchema = z.object({
|
|
15
|
+
identities: z._default(z.array(flowAssignmentIdentitySchema), []),
|
|
16
|
+
context: z.optional(flowAssignmentTargetingContextSchema),
|
|
17
|
+
holdOwnerKey: z.string().check(z.trim(), z.minLength(1)),
|
|
18
|
+
at: z.optional(z.number()),
|
|
19
|
+
assignmentLimit: z.optional(z.number()),
|
|
20
|
+
knownBroadcastManifestVersion: z.optional(
|
|
21
|
+
z.string().check(z.trim(), z.minLength(1)),
|
|
22
|
+
),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const flowDisplaySyncResponseSchema = z.object({
|
|
26
|
+
fetchedAt: z.string(),
|
|
27
|
+
assignments: z.object({
|
|
28
|
+
claimed: z.array(flowAssignmentRecordSchema),
|
|
29
|
+
}),
|
|
30
|
+
broadcasts: runtimeDisplayBroadcastsSchema,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export type RuntimeDisplayBroadcasts = z.output<
|
|
34
|
+
typeof runtimeDisplayBroadcastsSchema
|
|
35
|
+
>;
|
|
36
|
+
export type FlowDisplaySyncRequest = z.output<
|
|
37
|
+
typeof flowDisplaySyncRequestSchema
|
|
38
|
+
>;
|
|
39
|
+
export type FlowDisplaySyncResponse = z.output<
|
|
40
|
+
typeof flowDisplaySyncResponseSchema
|
|
41
|
+
>;
|
|
@@ -24,6 +24,8 @@ export interface FlowStateChangedDetail extends FlowState {
|
|
|
24
24
|
|
|
25
25
|
export interface InstanceFlowStateChangedDetail extends FlowState {
|
|
26
26
|
instanceId: string;
|
|
27
|
+
/** Flow handle for the currently pinned aggregate flow, when known. */
|
|
28
|
+
flowHandleId?: string;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
export interface OpenRequestedDetail {
|
|
@@ -116,13 +118,14 @@ export function isInstanceFlowStateChangedDetail(
|
|
|
116
118
|
detail: unknown,
|
|
117
119
|
): detail is InstanceFlowStateChangedDetail {
|
|
118
120
|
if (!isRecord(detail)) return false;
|
|
119
|
-
const { instanceId, isOpen, isLoading, width, height } = detail;
|
|
121
|
+
const { instanceId, isOpen, isLoading, width, height, flowHandleId } = detail;
|
|
120
122
|
return (
|
|
121
123
|
isNonEmptyString(instanceId) &&
|
|
122
124
|
typeof isOpen === "boolean" &&
|
|
123
125
|
typeof isLoading === "boolean" &&
|
|
124
126
|
(typeof width === "undefined" || typeof width === "number") &&
|
|
125
|
-
(typeof height === "undefined" || typeof height === "number")
|
|
127
|
+
(typeof height === "undefined" || typeof height === "number") &&
|
|
128
|
+
(typeof flowHandleId === "undefined" || isNonEmptyString(flowHandleId))
|
|
126
129
|
);
|
|
127
130
|
}
|
|
128
131
|
|
package/src/index.ts
CHANGED
|
@@ -61,6 +61,14 @@ export {
|
|
|
61
61
|
updateFlowAssignmentLifecycleRequestSchema,
|
|
62
62
|
updateFlowAssignmentLifecycleResponseSchema,
|
|
63
63
|
} from "./flow-assignments.js";
|
|
64
|
+
export {
|
|
65
|
+
type FlowDisplaySyncRequest,
|
|
66
|
+
type FlowDisplaySyncResponse,
|
|
67
|
+
flowDisplaySyncRequestSchema,
|
|
68
|
+
flowDisplaySyncResponseSchema,
|
|
69
|
+
type RuntimeDisplayBroadcasts,
|
|
70
|
+
runtimeDisplayBroadcastsSchema,
|
|
71
|
+
} from "./flow-display.js";
|
|
64
72
|
export {
|
|
65
73
|
buildIdentityTypeGuidanceMessage,
|
|
66
74
|
getIdentityTypeSuggestion,
|
package/src/webview-transport.ts
CHANGED
|
@@ -55,7 +55,10 @@ const flowStateChangedDetailSchema = z.strictObject({
|
|
|
55
55
|
flowHandleId: nonEmptyStringSchema,
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
-
const instanceFlowStateChangedDetailSchema = z.strictObject(
|
|
58
|
+
const instanceFlowStateChangedDetailSchema = z.strictObject({
|
|
59
|
+
...flowStateBase,
|
|
60
|
+
flowHandleId: z.optional(nonEmptyStringSchema),
|
|
61
|
+
});
|
|
59
62
|
|
|
60
63
|
const openRequestedDetailSchema = z.strictObject({
|
|
61
64
|
instanceId: nonEmptyStringSchema,
|