@getuserfeedback/protocol 0.5.1 → 0.5.5
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 +207 -0
- package/dist/flow-assignments.d.ts.map +1 -0
- package/dist/flow-assignments.js +67 -0
- package/dist/host/sdk-types.d.ts +8 -0
- package/dist/host/sdk-types.d.ts.map +1 -1
- package/dist/host/sdk.d.ts +1 -1
- package/dist/host/sdk.d.ts.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/runtime-endpoints.d.ts +3 -0
- package/dist/runtime-endpoints.d.ts.map +1 -1
- package/dist/runtime-endpoints.js +49 -0
- package/dist/trpc-envelope.d.ts +8 -0
- package/dist/trpc-envelope.d.ts.map +1 -0
- package/dist/trpc-envelope.js +6 -0
- package/dist/widget-commands.d.ts +14 -2
- package/dist/widget-commands.d.ts.map +1 -1
- package/dist/widget-commands.js +14 -0
- package/dist/widget-config.d.ts +3 -3
- package/package.json +9 -1
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const flowAssignmentStatusSchema: z.ZodEnum<{
|
|
3
|
+
pending: "pending";
|
|
4
|
+
held: "held";
|
|
5
|
+
presented: "presented";
|
|
6
|
+
completed: "completed";
|
|
7
|
+
expired: "expired";
|
|
8
|
+
superseded: "superseded";
|
|
9
|
+
withdrawn_pending: "withdrawn_pending";
|
|
10
|
+
withdrawn_presented: "withdrawn_presented";
|
|
11
|
+
withdrawn_final: "withdrawn_final";
|
|
12
|
+
}>;
|
|
13
|
+
export declare const flowAssignmentRecipientRequestSchema: z.ZodObject<{
|
|
14
|
+
identities: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
15
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
16
|
+
value: z.ZodString;
|
|
17
|
+
}, z.core.$strip>>>;
|
|
18
|
+
at: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export declare const flowAssignmentRecordSchema: z.ZodObject<{
|
|
21
|
+
flowAssignmentId: z.ZodString;
|
|
22
|
+
flowId: z.ZodString;
|
|
23
|
+
holdGroupToken: z.ZodOptional<z.ZodString>;
|
|
24
|
+
presentedFlowVersionId: z.ZodOptional<z.ZodString>;
|
|
25
|
+
latestFlowVersionId: z.ZodString;
|
|
26
|
+
status: z.ZodEnum<{
|
|
27
|
+
pending: "pending";
|
|
28
|
+
held: "held";
|
|
29
|
+
presented: "presented";
|
|
30
|
+
completed: "completed";
|
|
31
|
+
expired: "expired";
|
|
32
|
+
superseded: "superseded";
|
|
33
|
+
withdrawn_pending: "withdrawn_pending";
|
|
34
|
+
withdrawn_presented: "withdrawn_presented";
|
|
35
|
+
withdrawn_final: "withdrawn_final";
|
|
36
|
+
}>;
|
|
37
|
+
assignedAt: z.ZodString;
|
|
38
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
39
|
+
heldAt: z.ZodOptional<z.ZodString>;
|
|
40
|
+
holdExpiresAt: z.ZodOptional<z.ZodString>;
|
|
41
|
+
presentedAt: z.ZodOptional<z.ZodString>;
|
|
42
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
43
|
+
expiredAt: z.ZodOptional<z.ZodString>;
|
|
44
|
+
supersededAt: z.ZodOptional<z.ZodString>;
|
|
45
|
+
withdrawnAt: z.ZodOptional<z.ZodString>;
|
|
46
|
+
withdrawnFinalAt: z.ZodOptional<z.ZodString>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export declare const listPendingFlowAssignmentsResponseSchema: z.ZodObject<{
|
|
49
|
+
fetchedAt: z.ZodString;
|
|
50
|
+
flowAssignments: z.ZodArray<z.ZodObject<{
|
|
51
|
+
flowAssignmentId: z.ZodString;
|
|
52
|
+
flowId: z.ZodString;
|
|
53
|
+
holdGroupToken: z.ZodOptional<z.ZodString>;
|
|
54
|
+
presentedFlowVersionId: z.ZodOptional<z.ZodString>;
|
|
55
|
+
latestFlowVersionId: z.ZodString;
|
|
56
|
+
status: z.ZodEnum<{
|
|
57
|
+
pending: "pending";
|
|
58
|
+
held: "held";
|
|
59
|
+
presented: "presented";
|
|
60
|
+
completed: "completed";
|
|
61
|
+
expired: "expired";
|
|
62
|
+
superseded: "superseded";
|
|
63
|
+
withdrawn_pending: "withdrawn_pending";
|
|
64
|
+
withdrawn_presented: "withdrawn_presented";
|
|
65
|
+
withdrawn_final: "withdrawn_final";
|
|
66
|
+
}>;
|
|
67
|
+
assignedAt: z.ZodString;
|
|
68
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
69
|
+
heldAt: z.ZodOptional<z.ZodString>;
|
|
70
|
+
holdExpiresAt: z.ZodOptional<z.ZodString>;
|
|
71
|
+
presentedAt: z.ZodOptional<z.ZodString>;
|
|
72
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
73
|
+
expiredAt: z.ZodOptional<z.ZodString>;
|
|
74
|
+
supersededAt: z.ZodOptional<z.ZodString>;
|
|
75
|
+
withdrawnAt: z.ZodOptional<z.ZodString>;
|
|
76
|
+
withdrawnFinalAt: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
export declare const claimPendingFlowAssignmentsRequestSchema: z.ZodObject<{
|
|
80
|
+
identities: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
81
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
82
|
+
value: z.ZodString;
|
|
83
|
+
}, z.core.$strip>>>;
|
|
84
|
+
holdOwnerKey: z.ZodString;
|
|
85
|
+
at: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
export declare const claimPendingFlowAssignmentsResponseSchema: z.ZodObject<{
|
|
89
|
+
fetchedAt: z.ZodString;
|
|
90
|
+
flowAssignments: z.ZodArray<z.ZodObject<{
|
|
91
|
+
flowAssignmentId: z.ZodString;
|
|
92
|
+
flowId: z.ZodString;
|
|
93
|
+
holdGroupToken: z.ZodOptional<z.ZodString>;
|
|
94
|
+
presentedFlowVersionId: z.ZodOptional<z.ZodString>;
|
|
95
|
+
latestFlowVersionId: z.ZodString;
|
|
96
|
+
status: z.ZodEnum<{
|
|
97
|
+
pending: "pending";
|
|
98
|
+
held: "held";
|
|
99
|
+
presented: "presented";
|
|
100
|
+
completed: "completed";
|
|
101
|
+
expired: "expired";
|
|
102
|
+
superseded: "superseded";
|
|
103
|
+
withdrawn_pending: "withdrawn_pending";
|
|
104
|
+
withdrawn_presented: "withdrawn_presented";
|
|
105
|
+
withdrawn_final: "withdrawn_final";
|
|
106
|
+
}>;
|
|
107
|
+
assignedAt: z.ZodString;
|
|
108
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
109
|
+
heldAt: z.ZodOptional<z.ZodString>;
|
|
110
|
+
holdExpiresAt: z.ZodOptional<z.ZodString>;
|
|
111
|
+
presentedAt: z.ZodOptional<z.ZodString>;
|
|
112
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
113
|
+
expiredAt: z.ZodOptional<z.ZodString>;
|
|
114
|
+
supersededAt: z.ZodOptional<z.ZodString>;
|
|
115
|
+
withdrawnAt: z.ZodOptional<z.ZodString>;
|
|
116
|
+
withdrawnFinalAt: z.ZodOptional<z.ZodString>;
|
|
117
|
+
}, z.core.$strip>>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
export declare const updateFlowAssignmentLifecycleRequestSchema: z.ZodObject<{
|
|
120
|
+
identities: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
121
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
122
|
+
value: z.ZodString;
|
|
123
|
+
}, z.core.$strip>>>;
|
|
124
|
+
flowAssignmentId: z.ZodString;
|
|
125
|
+
flowVersionId: z.ZodOptional<z.ZodString>;
|
|
126
|
+
holdGroupToken: z.ZodOptional<z.ZodString>;
|
|
127
|
+
at: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
export declare const releaseFlowAssignmentClaimRequestSchema: z.ZodObject<{
|
|
130
|
+
identities: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
131
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
132
|
+
value: z.ZodString;
|
|
133
|
+
}, z.core.$strip>>>;
|
|
134
|
+
holdGroupToken: z.ZodString;
|
|
135
|
+
holdOwnerKey: z.ZodOptional<z.ZodString>;
|
|
136
|
+
at: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
export declare const releaseFlowAssignmentClaimResponseSchema: z.ZodObject<{
|
|
139
|
+
releasedCount: z.ZodNumber;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
export declare const updateFlowAssignmentLifecycleResponseSchema: z.ZodObject<{
|
|
142
|
+
flowAssignmentId: z.ZodString;
|
|
143
|
+
flowId: z.ZodString;
|
|
144
|
+
holdGroupToken: z.ZodOptional<z.ZodString>;
|
|
145
|
+
presentedFlowVersionId: z.ZodOptional<z.ZodString>;
|
|
146
|
+
latestFlowVersionId: z.ZodString;
|
|
147
|
+
status: z.ZodEnum<{
|
|
148
|
+
pending: "pending";
|
|
149
|
+
held: "held";
|
|
150
|
+
presented: "presented";
|
|
151
|
+
completed: "completed";
|
|
152
|
+
expired: "expired";
|
|
153
|
+
superseded: "superseded";
|
|
154
|
+
withdrawn_pending: "withdrawn_pending";
|
|
155
|
+
withdrawn_presented: "withdrawn_presented";
|
|
156
|
+
withdrawn_final: "withdrawn_final";
|
|
157
|
+
}>;
|
|
158
|
+
assignedAt: z.ZodString;
|
|
159
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
160
|
+
heldAt: z.ZodOptional<z.ZodString>;
|
|
161
|
+
holdExpiresAt: z.ZodOptional<z.ZodString>;
|
|
162
|
+
presentedAt: z.ZodOptional<z.ZodString>;
|
|
163
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
164
|
+
expiredAt: z.ZodOptional<z.ZodString>;
|
|
165
|
+
supersededAt: z.ZodOptional<z.ZodString>;
|
|
166
|
+
withdrawnAt: z.ZodOptional<z.ZodString>;
|
|
167
|
+
withdrawnFinalAt: z.ZodOptional<z.ZodString>;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
export declare const nullableUpdateFlowAssignmentLifecycleResponseSchema: z.ZodNullable<z.ZodObject<{
|
|
170
|
+
flowAssignmentId: z.ZodString;
|
|
171
|
+
flowId: z.ZodString;
|
|
172
|
+
holdGroupToken: z.ZodOptional<z.ZodString>;
|
|
173
|
+
presentedFlowVersionId: z.ZodOptional<z.ZodString>;
|
|
174
|
+
latestFlowVersionId: z.ZodString;
|
|
175
|
+
status: z.ZodEnum<{
|
|
176
|
+
pending: "pending";
|
|
177
|
+
held: "held";
|
|
178
|
+
presented: "presented";
|
|
179
|
+
completed: "completed";
|
|
180
|
+
expired: "expired";
|
|
181
|
+
superseded: "superseded";
|
|
182
|
+
withdrawn_pending: "withdrawn_pending";
|
|
183
|
+
withdrawn_presented: "withdrawn_presented";
|
|
184
|
+
withdrawn_final: "withdrawn_final";
|
|
185
|
+
}>;
|
|
186
|
+
assignedAt: z.ZodString;
|
|
187
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
188
|
+
heldAt: z.ZodOptional<z.ZodString>;
|
|
189
|
+
holdExpiresAt: z.ZodOptional<z.ZodString>;
|
|
190
|
+
presentedAt: z.ZodOptional<z.ZodString>;
|
|
191
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
192
|
+
expiredAt: z.ZodOptional<z.ZodString>;
|
|
193
|
+
supersededAt: z.ZodOptional<z.ZodString>;
|
|
194
|
+
withdrawnAt: z.ZodOptional<z.ZodString>;
|
|
195
|
+
withdrawnFinalAt: z.ZodOptional<z.ZodString>;
|
|
196
|
+
}, z.core.$strip>>;
|
|
197
|
+
export type FlowAssignmentStatus = z.output<typeof flowAssignmentStatusSchema>;
|
|
198
|
+
export type FlowAssignmentRecipientRequest = z.output<typeof flowAssignmentRecipientRequestSchema>;
|
|
199
|
+
export type FlowAssignmentRecord = z.output<typeof flowAssignmentRecordSchema>;
|
|
200
|
+
export type ClaimPendingFlowAssignmentsRequest = z.output<typeof claimPendingFlowAssignmentsRequestSchema>;
|
|
201
|
+
export type ClaimPendingFlowAssignmentsResponse = z.output<typeof claimPendingFlowAssignmentsResponseSchema>;
|
|
202
|
+
export type ListPendingFlowAssignmentsResponse = z.output<typeof listPendingFlowAssignmentsResponseSchema>;
|
|
203
|
+
export type ReleaseFlowAssignmentClaimRequest = z.output<typeof releaseFlowAssignmentClaimRequestSchema>;
|
|
204
|
+
export type ReleaseFlowAssignmentClaimResponse = z.output<typeof releaseFlowAssignmentClaimResponseSchema>;
|
|
205
|
+
export type UpdateFlowAssignmentLifecycleRequest = z.output<typeof updateFlowAssignmentLifecycleRequestSchema>;
|
|
206
|
+
export type UpdateFlowAssignmentLifecycleResponse = z.output<typeof updateFlowAssignmentLifecycleResponseSchema>;
|
|
207
|
+
//# sourceMappingURL=flow-assignments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-assignments.d.ts","sourceRoot":"","sources":["../src/flow-assignments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAIzB,eAAO,MAAM,0BAA0B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M,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"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { appEventIdentitySchema } from "./app-event.js";
|
|
3
|
+
export const flowAssignmentStatusSchema = z.enum([
|
|
4
|
+
"pending",
|
|
5
|
+
"held",
|
|
6
|
+
"presented",
|
|
7
|
+
"completed",
|
|
8
|
+
"expired",
|
|
9
|
+
"superseded",
|
|
10
|
+
"withdrawn_pending",
|
|
11
|
+
"withdrawn_presented",
|
|
12
|
+
"withdrawn_final",
|
|
13
|
+
]);
|
|
14
|
+
export const flowAssignmentRecipientRequestSchema = z.object({
|
|
15
|
+
identities: z.array(appEventIdentitySchema).default([]),
|
|
16
|
+
at: z.optional(z.number()),
|
|
17
|
+
});
|
|
18
|
+
export const flowAssignmentRecordSchema = z.object({
|
|
19
|
+
flowAssignmentId: z.string().trim().min(1),
|
|
20
|
+
flowId: z.string().trim().min(1),
|
|
21
|
+
holdGroupToken: z.optional(z.string().trim().min(1)),
|
|
22
|
+
presentedFlowVersionId: z.optional(z.string().trim().min(1)),
|
|
23
|
+
latestFlowVersionId: z.string().trim().min(1),
|
|
24
|
+
status: flowAssignmentStatusSchema,
|
|
25
|
+
assignedAt: z.string(),
|
|
26
|
+
expiresAt: z.optional(z.string()),
|
|
27
|
+
heldAt: z.optional(z.string()),
|
|
28
|
+
holdExpiresAt: z.optional(z.string()),
|
|
29
|
+
presentedAt: z.optional(z.string()),
|
|
30
|
+
completedAt: z.optional(z.string()),
|
|
31
|
+
expiredAt: z.optional(z.string()),
|
|
32
|
+
supersededAt: z.optional(z.string()),
|
|
33
|
+
withdrawnAt: z.optional(z.string()),
|
|
34
|
+
withdrawnFinalAt: z.optional(z.string()),
|
|
35
|
+
});
|
|
36
|
+
export const listPendingFlowAssignmentsResponseSchema = z.object({
|
|
37
|
+
fetchedAt: z.string(),
|
|
38
|
+
flowAssignments: z.array(flowAssignmentRecordSchema),
|
|
39
|
+
});
|
|
40
|
+
export const claimPendingFlowAssignmentsRequestSchema = z.object({
|
|
41
|
+
identities: z.array(appEventIdentitySchema).default([]),
|
|
42
|
+
holdOwnerKey: z.string().trim().min(1),
|
|
43
|
+
at: z.optional(z.number()),
|
|
44
|
+
limit: z.optional(z.number()),
|
|
45
|
+
});
|
|
46
|
+
export const claimPendingFlowAssignmentsResponseSchema = z.object({
|
|
47
|
+
fetchedAt: z.string(),
|
|
48
|
+
flowAssignments: z.array(flowAssignmentRecordSchema),
|
|
49
|
+
});
|
|
50
|
+
export const updateFlowAssignmentLifecycleRequestSchema = z.object({
|
|
51
|
+
identities: z.array(appEventIdentitySchema).default([]),
|
|
52
|
+
flowAssignmentId: z.string().trim().min(1),
|
|
53
|
+
flowVersionId: z.optional(z.string().trim().min(1)),
|
|
54
|
+
holdGroupToken: z.optional(z.string().trim().min(1)),
|
|
55
|
+
at: z.optional(z.number()),
|
|
56
|
+
});
|
|
57
|
+
export const releaseFlowAssignmentClaimRequestSchema = z.object({
|
|
58
|
+
identities: z.array(appEventIdentitySchema).default([]),
|
|
59
|
+
holdGroupToken: z.string().trim().min(1),
|
|
60
|
+
holdOwnerKey: z.optional(z.string().trim().min(1)),
|
|
61
|
+
at: z.optional(z.number()),
|
|
62
|
+
});
|
|
63
|
+
export const releaseFlowAssignmentClaimResponseSchema = z.object({
|
|
64
|
+
releasedCount: z.number(),
|
|
65
|
+
});
|
|
66
|
+
export const updateFlowAssignmentLifecycleResponseSchema = flowAssignmentRecordSchema;
|
|
67
|
+
export const nullableUpdateFlowAssignmentLifecycleResponseSchema = z.nullable(updateFlowAssignmentLifecycleResponseSchema);
|
package/dist/host/sdk-types.d.ts
CHANGED
|
@@ -75,6 +75,12 @@ export type RuntimeEndpoints = {
|
|
|
75
75
|
apiUrl?: string | undefined;
|
|
76
76
|
coreUrl?: string | undefined;
|
|
77
77
|
};
|
|
78
|
+
/** A single response metadata tag value preserved with a submitted response. */
|
|
79
|
+
export type ResponseMetadataTagValue = string | string[];
|
|
80
|
+
/** Optional metadata tags the host can attach to a widget flow run. */
|
|
81
|
+
export type ResponseMetadataInput = {
|
|
82
|
+
tags?: Record<string, ResponseMetadataTagValue> | undefined;
|
|
83
|
+
};
|
|
78
84
|
/**
|
|
79
85
|
* Use host attributes to auto-detect the color scheme ("light" by default). The widget observes these attributes on body and html elements,
|
|
80
86
|
*
|
|
@@ -181,6 +187,8 @@ export type OpenCommandPayload = {
|
|
|
181
187
|
flowId: string;
|
|
182
188
|
flowHandleId?: string | undefined;
|
|
183
189
|
container?: HTMLElement | undefined;
|
|
190
|
+
/** Optional metadata tags to persist with the eventual response submission. */
|
|
191
|
+
metadata?: ResponseMetadataInput | undefined;
|
|
184
192
|
/**
|
|
185
193
|
* When `true`, the flow view does not show a close button.
|
|
186
194
|
* Useful for mobile or embedded contexts where the host handles dismissal (e.g. via a drawer or back gesture).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-types.d.ts","sourceRoot":"","sources":["../../src/host/sdk-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,2DAA2D;AAC3D,MAAM,MAAM,oBAAoB,GAC7B,aAAa,GACb,QAAQ,GACR,cAAc,GACd,cAAc,GACd,mBAAmB,GACnB,8BAA8B,GAC9B,sBAAsB,CAAC;AAE1B,oEAAoE;AACpE,MAAM,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,oBAAoB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gEAAgE;AAChE,MAAM,MAAM,eAAe,GAAG;IAC7B,IAAI,CAAC,EAAE;QACN,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,Q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AAa,EAAE,MAAM,CAAC;QACtB,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;KACpC,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CACjD,CAAC"}
|
package/dist/host/sdk.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export { createCommandDispatch } from "./command-dispatch.js";
|
|
|
6
6
|
export { COMMAND_SETTLEMENT_TIMEOUT_CODE, CommandSettlementError, CommandSettlementTimeoutError, toCommandSettlementError, waitForCommandSettlement, } from "./command-settlement.js";
|
|
7
7
|
export type { FlowHandleFromSettlement, FlowState, } from "./host-event-contract.js";
|
|
8
8
|
export { getFlowHandleFromSettlementDetail, isFlowStateChangedDetail, isHandleInvalidatedDetail, isInstanceFlowStateChangedDetail, } from "./host-event-contract.js";
|
|
9
|
-
export type { AppEventPayload, ClientMeta, ClientOptions, Command, CommandEnvelope, ConfigureOptions, ContainerPolicy, InitOptions, PublicCommandPayload, TelemetryEvent, } from "./sdk-types.js";
|
|
9
|
+
export type { AppEventPayload, ClientMeta, ClientOptions, Command, CommandEnvelope, ConfigureOptions, ContainerPolicy, InitOptions, PublicCommandPayload, ResponseMetadataInput, TelemetryEvent, } from "./sdk-types.js";
|
|
10
10
|
//# sourceMappingURL=sdk.d.ts.map
|
package/dist/host/sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/host/sdk.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACN,+BAA+B,EAC/B,sBAAsB,EACtB,6BAA6B,EAC7B,wBAAwB,EACxB,wBAAwB,GACxB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACX,wBAAwB,EACxB,SAAS,GACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,iCAAiC,EACjC,wBAAwB,EACxB,yBAAyB,EACzB,gCAAgC,GAChC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACX,eAAe,EACf,UAAU,EACV,aAAa,EACb,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,oBAAoB,
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/host/sdk.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACN,+BAA+B,EAC/B,sBAAsB,EACtB,6BAA6B,EAC7B,wBAAwB,EACxB,wBAAwB,GACxB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACX,wBAAwB,EACxB,SAAS,GACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,iCAAiC,EACjC,wBAAwB,EACxB,yBAAyB,EACzB,gCAAgC,GAChC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACX,eAAe,EACf,UAAU,EACV,aAAa,EACb,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EAGrB,cAAc,GACd,MAAM,gBAAgB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export { type AppEventPayload, type AppEventTrackInput, appEventBaseSchema, appEventContextSchema, appEventFlowDismissedSchema, appEventIdentitySchema, appEventIdentityTypeSchema, appEventPayloadSchema, appEventSurveyViewedSchema, appEventTrackSchema, } from "./app-event.js";
|
|
2
2
|
export { type ClientMeta, clientMetaSchema, } from "./client-meta.js";
|
|
3
3
|
export { DEFAULT_AUTO_DETECT_COLOR_SCHEME_ATTRS } from "./defaults.js";
|
|
4
|
+
export { type ClaimPendingFlowAssignmentsRequest, type ClaimPendingFlowAssignmentsResponse, claimPendingFlowAssignmentsRequestSchema, claimPendingFlowAssignmentsResponseSchema, type FlowAssignmentRecipientRequest, type FlowAssignmentRecord, type FlowAssignmentStatus, flowAssignmentRecipientRequestSchema, flowAssignmentRecordSchema, flowAssignmentStatusSchema, type ListPendingFlowAssignmentsResponse, listPendingFlowAssignmentsResponseSchema, nullableUpdateFlowAssignmentLifecycleResponseSchema, type ReleaseFlowAssignmentClaimRequest, type ReleaseFlowAssignmentClaimResponse, releaseFlowAssignmentClaimRequestSchema, releaseFlowAssignmentClaimResponseSchema, type UpdateFlowAssignmentLifecycleRequest, type UpdateFlowAssignmentLifecycleResponse, updateFlowAssignmentLifecycleRequestSchema, updateFlowAssignmentLifecycleResponseSchema, } from "./flow-assignments.js";
|
|
4
5
|
export { buildIdentityTypeGuidanceMessage, getIdentityTypeSuggestion, IDENTITY_TYPE_VALUES, type IdentityTypeValue, isIdentityTypeValue, } from "./identity-type.js";
|
|
6
|
+
export { type RuntimeEndpoints, resolveApiBaseUrl, resolveCoreUrl, resolveTrpcBaseUrl, runtimeEndpointsSchema, } from "./runtime-endpoints.js";
|
|
5
7
|
export { getScopeMeta, isScope, listScopes, SCOPE_IDS, type Scope, scopeIdSchema, } from "./scopes.js";
|
|
8
|
+
export { type TrpcSuccessResponse, trpcSuccessResponseSchema, } from "./trpc-envelope.js";
|
|
6
9
|
export { type FlowVersionResolution, flowVersionResolutionSchema, type ThemeVersionResolution, themeVersionResolutionSchema, } from "./version-resolution.js";
|
|
7
|
-
export { type PublicCommandPayload, parseConfigureOptions, parseInitOptions, parsePublicCommand, publicCommandPayloadSchema, } from "./widget-commands.js";
|
|
10
|
+
export { type PublicCommandPayload, parseConfigureOptions, parseInitOptions, parsePublicCommand, publicCommandPayloadSchema, publicWidgetCommandKindSchema, } from "./widget-commands.js";
|
|
8
11
|
export { type ColorSchemeConfigInput, type ConfigureOptions, colorSchemeConfigInputSchema, configureOptionsSchema, consentConfigInputSchema, type InitOptions, initOptionsSchema, isPublicGrantScope, type PublicGrantScope, publicGrantScopeIdSchema, } from "./widget-config.js";
|
|
9
12
|
//# sourceMappingURL=index.d.ts.map
|
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,eAAe,EACpB,KAAK,kBAAkB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,KAAK,UAAU,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sCAAsC,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EACN,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,mBAAmB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,YAAY,EACZ,OAAO,EACP,UAAU,EACV,SAAS,EACT,KAAK,KAAK,EACV,aAAa,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,KAAK,qBAAqB,EAC1B,2BAA2B,EAC3B,KAAK,sBAAsB,EAC3B,4BAA4B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,KAAK,oBAAoB,EACzB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,KAAK,UAAU,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sCA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kB,EAClB,KAAK,gBAAgB,EACrB,wBAAwB,GACxB,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export { appEventBaseSchema, appEventContextSchema, appEventFlowDismissedSchema, appEventIdentitySchema, appEventIdentityTypeSchema, appEventPayloadSchema, appEventSurveyViewedSchema, appEventTrackSchema, } from "./app-event.js";
|
|
2
2
|
export { clientMetaSchema, } from "./client-meta.js";
|
|
3
3
|
export { DEFAULT_AUTO_DETECT_COLOR_SCHEME_ATTRS } from "./defaults.js";
|
|
4
|
+
export { claimPendingFlowAssignmentsRequestSchema, claimPendingFlowAssignmentsResponseSchema, flowAssignmentRecipientRequestSchema, flowAssignmentRecordSchema, flowAssignmentStatusSchema, listPendingFlowAssignmentsResponseSchema, nullableUpdateFlowAssignmentLifecycleResponseSchema, releaseFlowAssignmentClaimRequestSchema, releaseFlowAssignmentClaimResponseSchema, updateFlowAssignmentLifecycleRequestSchema, updateFlowAssignmentLifecycleResponseSchema, } from "./flow-assignments.js";
|
|
4
5
|
export { buildIdentityTypeGuidanceMessage, getIdentityTypeSuggestion, IDENTITY_TYPE_VALUES, isIdentityTypeValue, } from "./identity-type.js";
|
|
6
|
+
export { resolveApiBaseUrl, resolveCoreUrl, resolveTrpcBaseUrl, runtimeEndpointsSchema, } from "./runtime-endpoints.js";
|
|
5
7
|
export { getScopeMeta, isScope, listScopes, SCOPE_IDS, scopeIdSchema, } from "./scopes.js";
|
|
8
|
+
export { trpcSuccessResponseSchema, } from "./trpc-envelope.js";
|
|
6
9
|
export { flowVersionResolutionSchema, themeVersionResolutionSchema, } from "./version-resolution.js";
|
|
7
|
-
export { parseConfigureOptions, parseInitOptions, parsePublicCommand, publicCommandPayloadSchema, } from "./widget-commands.js";
|
|
10
|
+
export { parseConfigureOptions, parseInitOptions, parsePublicCommand, publicCommandPayloadSchema, publicWidgetCommandKindSchema, } from "./widget-commands.js";
|
|
8
11
|
export { colorSchemeConfigInputSchema, configureOptionsSchema, consentConfigInputSchema, initOptionsSchema, isPublicGrantScope, publicGrantScopeIdSchema, } from "./widget-config.js";
|
|
@@ -4,4 +4,7 @@ export declare const runtimeEndpointsSchema: z.ZodObject<{
|
|
|
4
4
|
coreUrl: z.ZodOptional<z.ZodString>;
|
|
5
5
|
}, z.core.$strict>;
|
|
6
6
|
export type RuntimeEndpoints = z.output<typeof runtimeEndpointsSchema>;
|
|
7
|
+
export declare const resolveCoreUrl: (runtimeEndpoints: RuntimeEndpoints | undefined) => URL | null;
|
|
8
|
+
export declare const resolveApiBaseUrl: (runtimeEndpoints: RuntimeEndpoints | undefined) => URL | null;
|
|
9
|
+
export declare const resolveTrpcBaseUrl: (runtimeEndpoints: RuntimeEndpoints | undefined) => URL | null;
|
|
7
10
|
//# sourceMappingURL=runtime-endpoints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-endpoints.d.ts","sourceRoot":"","sources":["../src/runtime-endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAIzB,eAAO,MAAM,sBAAsB;;;kBAKzB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"runtime-endpoints.d.ts","sourceRoot":"","sources":["../src/runtime-endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAIzB,eAAO,MAAM,sBAAsB;;;kBAKzB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAqBvE,eAAO,MAAM,cAAc,GAC1B,kBAAkB,gBAAgB,GAAG,SAAS,KAC5C,GAAG,GAAG,IAER,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC7B,kBAAkB,gBAAgB,GAAG,SAAS,KAC5C,GAAG,GAAG,IAaR,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC9B,kBAAkB,gBAAgB,GAAG,SAAS,KAC5C,GAAG,GAAG,IAaR,CAAC"}
|
|
@@ -6,3 +6,52 @@ export const runtimeEndpointsSchema = z
|
|
|
6
6
|
coreUrl: z.optional(absoluteUrlSchema),
|
|
7
7
|
})
|
|
8
8
|
.strict();
|
|
9
|
+
const parseAbsoluteUrl = (value) => {
|
|
10
|
+
if (!value) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
return new URL(value);
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const normalizeOrigin = (value) => {
|
|
21
|
+
const parsed = parseAbsoluteUrl(value);
|
|
22
|
+
if (!parsed) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return parsed.origin;
|
|
26
|
+
};
|
|
27
|
+
export const resolveCoreUrl = (runtimeEndpoints) => {
|
|
28
|
+
return parseAbsoluteUrl(runtimeEndpoints?.coreUrl);
|
|
29
|
+
};
|
|
30
|
+
export const resolveApiBaseUrl = (runtimeEndpoints) => {
|
|
31
|
+
const apiUrl = runtimeEndpoints?.apiUrl;
|
|
32
|
+
const parsed = parseAbsoluteUrl(apiUrl);
|
|
33
|
+
if (!parsed) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
if (!parsed.pathname || parsed.pathname === "/") {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
if (!parsed.pathname.endsWith("/")) {
|
|
40
|
+
parsed.pathname = `${parsed.pathname}/`;
|
|
41
|
+
}
|
|
42
|
+
return parsed;
|
|
43
|
+
};
|
|
44
|
+
export const resolveTrpcBaseUrl = (runtimeEndpoints) => {
|
|
45
|
+
const apiBaseUrl = resolveApiBaseUrl(runtimeEndpoints);
|
|
46
|
+
if (!apiBaseUrl) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
const normalizedApiPath = apiBaseUrl.pathname.endsWith("/")
|
|
50
|
+
? apiBaseUrl.pathname.slice(0, -1)
|
|
51
|
+
: apiBaseUrl.pathname;
|
|
52
|
+
if (!normalizedApiPath.endsWith("/v1")) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
const trpcPath = normalizedApiPath.slice(0, -"/v1".length) || "/";
|
|
56
|
+
return new URL(trpcPath, `${normalizeOrigin(apiBaseUrl.toString()) ?? ""}/`);
|
|
57
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const trpcSuccessResponseSchema: z.ZodObject<{
|
|
3
|
+
result: z.ZodObject<{
|
|
4
|
+
data: z.ZodUnknown;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type TrpcSuccessResponse = z.output<typeof trpcSuccessResponseSchema>;
|
|
8
|
+
//# sourceMappingURL=trpc-envelope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trpc-envelope.d.ts","sourceRoot":"","sources":["../src/trpc-envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,yBAAyB;;;;iBAIpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { type ConfigureOptions, type InitOptions } from "./widget-config.js";
|
|
3
|
+
export declare const publicWidgetCommandKindSchema: z.ZodEnum<{
|
|
4
|
+
open: "open";
|
|
5
|
+
prefetch: "prefetch";
|
|
6
|
+
prerender: "prerender";
|
|
7
|
+
identify: "identify";
|
|
8
|
+
setContainer: "setContainer";
|
|
9
|
+
setDefaultContainerPolicy: "setDefaultContainerPolicy";
|
|
10
|
+
configure: "configure";
|
|
11
|
+
init: "init";
|
|
12
|
+
close: "close";
|
|
13
|
+
reset: "reset";
|
|
14
|
+
}>;
|
|
3
15
|
export declare const containerPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
16
|
kind: z.ZodLiteral<"floating">;
|
|
5
17
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -69,9 +81,9 @@ export declare const publicCommandPayloadSchema: z.ZodUnion<readonly [z.ZodDiscr
|
|
|
69
81
|
system: "system";
|
|
70
82
|
}>]>>;
|
|
71
83
|
consent: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
84
|
+
pending: "pending";
|
|
72
85
|
granted: "granted";
|
|
73
86
|
denied: "denied";
|
|
74
|
-
pending: "pending";
|
|
75
87
|
revoked: "revoked";
|
|
76
88
|
}>, z.ZodArray<z.ZodEnum<{
|
|
77
89
|
"analytics.storage": "analytics.storage";
|
|
@@ -101,9 +113,9 @@ export declare const publicCommandPayloadSchema: z.ZodUnion<readonly [z.ZodDiscr
|
|
|
101
113
|
disableTelemetry: z.ZodOptional<z.ZodBoolean>;
|
|
102
114
|
enableDebug: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
103
115
|
defaultConsent: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
116
|
+
pending: "pending";
|
|
104
117
|
granted: "granted";
|
|
105
118
|
denied: "denied";
|
|
106
|
-
pending: "pending";
|
|
107
119
|
revoked: "revoked";
|
|
108
120
|
}>, z.ZodArray<z.ZodEnum<{
|
|
109
121
|
"analytics.storage": "analytics.storage";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-commands.d.ts","sourceRoot":"","sources":["../src/widget-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EACN,KAAK,gBAAgB,EAErB,KAAK,WAAW,EAEhB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"widget-commands.d.ts","sourceRoot":"","sources":["../src/widget-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EACN,KAAK,gBAAgB,EAErB,KAAK,WAAW,EAEhB,MAAM,oBAAoB,CAAC;AAmB5B,eAAO,MAAM,6BAA6B;;;;;;;;;;;EAAmC,CAAC;AAiD9E,eAAO,MAAM,qBAAqB;;;;;;;;;4BAahC,CAAC;AAiBH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAwDrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE/E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAErE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAE5D;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAEtE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CAEvE"}
|
package/dist/widget-commands.js
CHANGED
|
@@ -2,6 +2,20 @@ import * as z from "zod";
|
|
|
2
2
|
import { configureOptionsSchema, initOptionsSchema, } from "./widget-config.js";
|
|
3
3
|
const flowHandleIdSchema = z.string().trim().min(1);
|
|
4
4
|
const flowIdSchema = z.string().trim().min(1);
|
|
5
|
+
/** Public command kinds accepted from host / SDK before core dispatch. */
|
|
6
|
+
const publicWidgetCommandKinds = [
|
|
7
|
+
"open",
|
|
8
|
+
"prefetch",
|
|
9
|
+
"prerender",
|
|
10
|
+
"identify",
|
|
11
|
+
"setContainer",
|
|
12
|
+
"setDefaultContainerPolicy",
|
|
13
|
+
"configure",
|
|
14
|
+
"init",
|
|
15
|
+
"close",
|
|
16
|
+
"reset",
|
|
17
|
+
];
|
|
18
|
+
export const publicWidgetCommandKindSchema = z.enum(publicWidgetCommandKinds);
|
|
5
19
|
const isHTMLElementLike = (value) => {
|
|
6
20
|
if (typeof value !== "object" || value === null) {
|
|
7
21
|
return false;
|
package/dist/widget-config.d.ts
CHANGED
|
@@ -18,9 +18,9 @@ export declare const colorSchemeConfigInputSchema: z.ZodUnion<readonly [z.ZodObj
|
|
|
18
18
|
}>]>;
|
|
19
19
|
export type ColorSchemeConfigInput = z.output<typeof colorSchemeConfigInputSchema>;
|
|
20
20
|
export declare const consentConfigInputSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
21
|
+
pending: "pending";
|
|
21
22
|
granted: "granted";
|
|
22
23
|
denied: "denied";
|
|
23
|
-
pending: "pending";
|
|
24
24
|
revoked: "revoked";
|
|
25
25
|
}>, z.ZodArray<z.ZodEnum<{
|
|
26
26
|
"analytics.storage": "analytics.storage";
|
|
@@ -46,9 +46,9 @@ export declare const configureOptionsSchema: z.ZodObject<{
|
|
|
46
46
|
system: "system";
|
|
47
47
|
}>]>>;
|
|
48
48
|
consent: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
49
|
+
pending: "pending";
|
|
49
50
|
granted: "granted";
|
|
50
51
|
denied: "denied";
|
|
51
|
-
pending: "pending";
|
|
52
52
|
revoked: "revoked";
|
|
53
53
|
}>, z.ZodArray<z.ZodEnum<{
|
|
54
54
|
"analytics.storage": "analytics.storage";
|
|
@@ -77,9 +77,9 @@ export declare const initOptionsSchema: z.ZodObject<{
|
|
|
77
77
|
disableTelemetry: z.ZodOptional<z.ZodBoolean>;
|
|
78
78
|
enableDebug: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
79
79
|
defaultConsent: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
80
|
+
pending: "pending";
|
|
80
81
|
granted: "granted";
|
|
81
82
|
denied: "denied";
|
|
82
|
-
pending: "pending";
|
|
83
83
|
revoked: "revoked";
|
|
84
84
|
}>, z.ZodArray<z.ZodEnum<{
|
|
85
85
|
"analytics.storage": "analytics.storage";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getuserfeedback/protocol",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "getuserfeedback widget protocol — host surface and (later) wire protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"getuserfeedback",
|
|
@@ -64,6 +64,14 @@
|
|
|
64
64
|
"./version-resolution": {
|
|
65
65
|
"types": "./dist/version-resolution.d.ts",
|
|
66
66
|
"import": "./dist/version-resolution.js"
|
|
67
|
+
},
|
|
68
|
+
"./flow-assignments": {
|
|
69
|
+
"types": "./dist/flow-assignments.d.ts",
|
|
70
|
+
"import": "./dist/flow-assignments.js"
|
|
71
|
+
},
|
|
72
|
+
"./trpc-envelope": {
|
|
73
|
+
"types": "./dist/trpc-envelope.d.ts",
|
|
74
|
+
"import": "./dist/trpc-envelope.js"
|
|
67
75
|
}
|
|
68
76
|
},
|
|
69
77
|
"scripts": {
|