@getuserfeedback/protocol 0.6.0 → 0.7.2
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 +659 -17
- package/dist/app-event.d.ts.map +1 -1
- package/dist/app-event.js +71 -8
- package/dist/errors.d.ts +73 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +43 -0
- package/dist/flow-assignments.d.ts +83 -4
- package/dist/flow-assignments.d.ts.map +1 -1
- package/dist/flow-assignments.js +1 -0
- 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/sdk-types.d.ts +73 -28
- 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 +4 -2
- package/dist/identity-type.d.ts.map +1 -1
- package/dist/identity-type.js +4 -2
- package/dist/index.d.ts +4 -86
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -6
- package/dist/widget-commands.d.ts +102 -3
- package/dist/widget-commands.d.ts.map +1 -1
- package/dist/widget-commands.js +5 -0
- package/dist/widget-config.d.ts +5 -5
- package/package.json +22 -2
- package/src/app-event.ts +211 -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 +63 -0
- package/src/flow-assignments.ts +125 -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/host-event-contract.ts +277 -0
- package/src/host/index.ts +13 -0
- package/src/host/lazy-handle-client.ts +207 -0
- package/src/host/request-id.ts +3 -0
- package/src/host/sdk-types.ts +506 -0
- package/src/host/sdk.ts +43 -0
- package/src/host/unique-id.ts +17 -0
- package/src/identity-type.ts +102 -0
- package/src/index.ts +136 -0
- package/src/protocol-root.test.ts +476 -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 +152 -0
- package/src/widget-config.ts +157 -0
package/dist/app-event.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-event.d.ts","sourceRoot":"","sources":["../src/app-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAG9B,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAEhE,eAAO,MAAM,sBAAsB;;;iBAGjC,CAAC;AAEH,KAAK,iBAAiB,GACnB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,iBAAiB,EAAE,GACnB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"app-event.d.ts","sourceRoot":"","sources":["../src/app-event.ts"],"names":[],"mappings":"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"}
|
package/dist/app-event.js
CHANGED
|
@@ -13,6 +13,18 @@ const appEventFlagValueSchema = z.lazy(() => z.union([
|
|
|
13
13
|
z.array(appEventFlagValueSchema),
|
|
14
14
|
z.record(z.string(), appEventFlagValueSchema),
|
|
15
15
|
]));
|
|
16
|
+
const appEventJsonNumberSchema = z.number().check(z.refine(Number.isFinite, {
|
|
17
|
+
message: "Expected a finite JSON number.",
|
|
18
|
+
}));
|
|
19
|
+
const appEventJsonValueSchema = z.lazy(() => z.union([
|
|
20
|
+
z.string(),
|
|
21
|
+
appEventJsonNumberSchema,
|
|
22
|
+
z.boolean(),
|
|
23
|
+
z.null(),
|
|
24
|
+
z.array(appEventJsonValueSchema),
|
|
25
|
+
z.record(z.string(), appEventJsonValueSchema),
|
|
26
|
+
]));
|
|
27
|
+
const appEventJsonObjectSchema = z.record(z.string(), appEventJsonValueSchema);
|
|
16
28
|
export const appEventFlagProviderSchema = z.object({
|
|
17
29
|
name: z.string().check(z.trim(), z.minLength(1)),
|
|
18
30
|
project: z.optional(z.string().check(z.trim(), z.minLength(1))),
|
|
@@ -56,19 +68,70 @@ export const appEventBaseSchema = z.object({
|
|
|
56
68
|
const appEventSurveyReferenceSchema = z.object({
|
|
57
69
|
surveyId: z.string(),
|
|
58
70
|
});
|
|
59
|
-
export const
|
|
71
|
+
export const reservedSystemAppEventNames = [
|
|
72
|
+
"Response Submitted",
|
|
73
|
+
"Flow Viewed",
|
|
74
|
+
"Flow Dismissed",
|
|
75
|
+
"Identified",
|
|
76
|
+
];
|
|
77
|
+
const reservedSystemAppEventNameLowercaseSet = new Set(reservedSystemAppEventNames.map((event) => event.toLowerCase()));
|
|
78
|
+
const appEventSystemTrackNameSchema = z.enum(["Flow Viewed", "Flow Dismissed"]);
|
|
79
|
+
const appEventCustomerNameSchema = z.string().check(z.trim(), z.minLength(1), z.maxLength(255), z.check((ctx) => {
|
|
80
|
+
if (!reservedSystemAppEventNameLowercaseSet.has(ctx.value.toLowerCase())) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
ctx.issues.push({
|
|
84
|
+
code: "custom",
|
|
85
|
+
input: ctx.value,
|
|
86
|
+
message: "Customer app event names cannot use reserved system event names.",
|
|
87
|
+
continue: false,
|
|
88
|
+
});
|
|
89
|
+
}));
|
|
90
|
+
export const appEventSystemBaseSchema = z.extend(appEventBaseSchema, {
|
|
91
|
+
origin: z.literal("system"),
|
|
92
|
+
});
|
|
93
|
+
const normalizeSystemAppEventOrigin = (input) => {
|
|
94
|
+
const { origin: _origin, ...rest } = input;
|
|
95
|
+
return {
|
|
96
|
+
...rest,
|
|
97
|
+
origin: "system",
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
export const appEventSurveyViewedSchema = z.pipe(z.extend(appEventBaseSchema, {
|
|
101
|
+
origin: z.optional(z.literal("system")),
|
|
60
102
|
event: z.literal("Flow Viewed"),
|
|
61
103
|
references: appEventSurveyReferenceSchema,
|
|
62
|
-
});
|
|
63
|
-
export const appEventFlowDismissedSchema = z.extend(appEventBaseSchema, {
|
|
104
|
+
}), z.transform(normalizeSystemAppEventOrigin));
|
|
105
|
+
export const appEventFlowDismissedSchema = z.pipe(z.extend(appEventBaseSchema, {
|
|
106
|
+
origin: z.optional(z.literal("system")),
|
|
64
107
|
event: z.literal("Flow Dismissed"),
|
|
65
108
|
references: appEventSurveyReferenceSchema,
|
|
109
|
+
}), z.transform(normalizeSystemAppEventOrigin));
|
|
110
|
+
export const appEventSystemTrackSchema = z.extend(appEventSystemBaseSchema, {
|
|
111
|
+
event: appEventSystemTrackNameSchema,
|
|
112
|
+
references: appEventSurveyReferenceSchema,
|
|
66
113
|
});
|
|
67
|
-
|
|
68
|
-
|
|
114
|
+
const appEventLegacySystemTrackSchema = z.pipe(z.extend(appEventBaseSchema, {
|
|
115
|
+
origin: z.optional(z.literal("system")),
|
|
116
|
+
event: appEventSystemTrackNameSchema,
|
|
69
117
|
references: appEventSurveyReferenceSchema,
|
|
118
|
+
}), z.transform(normalizeSystemAppEventOrigin));
|
|
119
|
+
export const appEventCustomerTrackSchema = z.extend(appEventBaseSchema, {
|
|
120
|
+
origin: z.literal("customer"),
|
|
121
|
+
event: appEventCustomerNameSchema,
|
|
122
|
+
// TODO(migration): Normalize Date values in event properties to ISO strings.
|
|
123
|
+
// [from=manual-date-property-serialization] [to=protocol-date-property-normalization] [scope=slice] [priority=medium] [impact=medium] [risk=low]
|
|
124
|
+
properties: z.optional(appEventJsonObjectSchema),
|
|
70
125
|
});
|
|
71
|
-
export const
|
|
72
|
-
|
|
73
|
-
|
|
126
|
+
export const appEventTrackSchema = z.union([
|
|
127
|
+
appEventLegacySystemTrackSchema,
|
|
128
|
+
appEventCustomerTrackSchema,
|
|
129
|
+
]);
|
|
130
|
+
const appEventDiscriminatedPayloadSchema = z.discriminatedUnion("origin", [
|
|
131
|
+
appEventSystemTrackSchema,
|
|
132
|
+
appEventCustomerTrackSchema,
|
|
133
|
+
]);
|
|
134
|
+
export const appEventPayloadSchema = z.union([
|
|
135
|
+
appEventLegacySystemTrackSchema,
|
|
136
|
+
appEventDiscriminatedPayloadSchema,
|
|
74
137
|
]);
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as z from "zod/mini";
|
|
2
|
+
export declare const ErrorCategory: {
|
|
3
|
+
readonly INTERNAL: "INTERNAL";
|
|
4
|
+
readonly INVALID_USAGE: "INVALID_USAGE";
|
|
5
|
+
readonly HOST: "HOST";
|
|
6
|
+
};
|
|
7
|
+
export type ErrorCategory = (typeof ErrorCategory)[keyof typeof ErrorCategory];
|
|
8
|
+
export declare const ErrorCategorySchema: z.ZodMiniEnum<{
|
|
9
|
+
INTERNAL: "INTERNAL";
|
|
10
|
+
INVALID_USAGE: "INVALID_USAGE";
|
|
11
|
+
HOST: "HOST";
|
|
12
|
+
}>;
|
|
13
|
+
export declare const ErrorEventSchema: z.ZodMiniObject<{
|
|
14
|
+
id: z.ZodMiniString<string>;
|
|
15
|
+
name: z.ZodMiniString<string>;
|
|
16
|
+
message: z.ZodMiniString<string>;
|
|
17
|
+
stack: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
18
|
+
category: z.ZodMiniEnum<{
|
|
19
|
+
INTERNAL: "INTERNAL";
|
|
20
|
+
INVALID_USAGE: "INVALID_USAGE";
|
|
21
|
+
HOST: "HOST";
|
|
22
|
+
}>;
|
|
23
|
+
timestamp: z.ZodMiniNumber<number>;
|
|
24
|
+
probability: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
25
|
+
context: z.ZodMiniObject<{
|
|
26
|
+
widgetVersion: z.ZodMiniString<string>;
|
|
27
|
+
clientMeta: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
28
|
+
loader: z.ZodMiniEnum<{
|
|
29
|
+
custom: "custom";
|
|
30
|
+
sdk: "sdk";
|
|
31
|
+
gtm: "gtm";
|
|
32
|
+
segment: "segment";
|
|
33
|
+
rudderstack: "rudderstack";
|
|
34
|
+
tealium: "tealium";
|
|
35
|
+
}>;
|
|
36
|
+
clientName: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
37
|
+
clientVersion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
38
|
+
integrator: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
39
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
40
|
+
version: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
transport: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
43
|
+
loader: "loader";
|
|
44
|
+
"script-tag": "script-tag";
|
|
45
|
+
esm: "esm";
|
|
46
|
+
"tag-manager": "tag-manager";
|
|
47
|
+
snippet: "snippet";
|
|
48
|
+
}>>;
|
|
49
|
+
runtime: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
50
|
+
framework: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
51
|
+
next: "next";
|
|
52
|
+
vite: "vite";
|
|
53
|
+
webpack: "webpack";
|
|
54
|
+
plain: "plain";
|
|
55
|
+
}>>;
|
|
56
|
+
runtime: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
57
|
+
browser: "browser";
|
|
58
|
+
edge: "edge";
|
|
59
|
+
}>>;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
notes: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
debug: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export type ErrorEvent = z.output<typeof ErrorEventSchema>;
|
|
67
|
+
export type ProtocolErrorCode = "PARSE" | "VERSION" | "UNKNOWN_TYPE";
|
|
68
|
+
export declare class ProtocolError extends Error {
|
|
69
|
+
code: ProtocolErrorCode;
|
|
70
|
+
details: string;
|
|
71
|
+
constructor(code: ProtocolErrorCode, details: string);
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAQ9B,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE/E,eAAO,MAAM,mBAAmB;;;;EAI9B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAc3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE3D,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,SAAS,GAAG,cAAc,CAAC;AAIrE,qBAAa,aAAc,SAAQ,KAAK;IACvC,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;gBAEJ,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM;CASpD"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as z from "zod/mini";
|
|
2
|
+
import { clientMetaSchema } from "./client-meta.js";
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Error-telemetry definitions shared across widget / host.
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
export const ErrorCategory = {
|
|
7
|
+
INTERNAL: "INTERNAL",
|
|
8
|
+
INVALID_USAGE: "INVALID_USAGE",
|
|
9
|
+
HOST: "HOST",
|
|
10
|
+
};
|
|
11
|
+
export const ErrorCategorySchema = z.enum([
|
|
12
|
+
ErrorCategory.INTERNAL,
|
|
13
|
+
ErrorCategory.INVALID_USAGE,
|
|
14
|
+
ErrorCategory.HOST,
|
|
15
|
+
]);
|
|
16
|
+
export const ErrorEventSchema = z.object({
|
|
17
|
+
id: z.string(),
|
|
18
|
+
name: z.string(),
|
|
19
|
+
message: z.string(),
|
|
20
|
+
stack: z.optional(z.string()),
|
|
21
|
+
category: ErrorCategorySchema,
|
|
22
|
+
timestamp: z.number(),
|
|
23
|
+
probability: z.optional(z.number()),
|
|
24
|
+
context: z.object({
|
|
25
|
+
widgetVersion: z.string(),
|
|
26
|
+
clientMeta: z.optional(clientMetaSchema),
|
|
27
|
+
/** When true, telemetry was captured with debug mode on (affects how to interpret context). */
|
|
28
|
+
debug: z.optional(z.boolean()),
|
|
29
|
+
}),
|
|
30
|
+
});
|
|
31
|
+
const MAX_DETAIL_LENGTH = 80;
|
|
32
|
+
export class ProtocolError extends Error {
|
|
33
|
+
code;
|
|
34
|
+
details;
|
|
35
|
+
constructor(code, details) {
|
|
36
|
+
const short = details.length > MAX_DETAIL_LENGTH
|
|
37
|
+
? details.slice(0, MAX_DETAIL_LENGTH)
|
|
38
|
+
: details;
|
|
39
|
+
super(short);
|
|
40
|
+
this.code = code;
|
|
41
|
+
this.details = short;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -91,7 +91,7 @@ export declare const flowAssignmentTargetingContextSchema: z.ZodMiniObject<{
|
|
|
91
91
|
}, z.core.$strip>;
|
|
92
92
|
export declare const flowAssignmentRecipientRequestSchema: z.ZodMiniObject<{
|
|
93
93
|
identities: z.ZodMiniDefault<z.ZodMiniArray<z.ZodMiniObject<{
|
|
94
|
-
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"
|
|
94
|
+
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("./identity-type.js").IdentityTypeValue, string>>;
|
|
95
95
|
value: z.ZodMiniString<string>;
|
|
96
96
|
}, z.core.$strip>>>;
|
|
97
97
|
context: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
@@ -236,7 +236,7 @@ export declare const listPendingFlowAssignmentsResponseSchema: z.ZodMiniObject<{
|
|
|
236
236
|
}, z.core.$strip>;
|
|
237
237
|
export declare const claimPendingFlowAssignmentsRequestSchema: z.ZodMiniObject<{
|
|
238
238
|
identities: z.ZodMiniDefault<z.ZodMiniArray<z.ZodMiniObject<{
|
|
239
|
-
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"
|
|
239
|
+
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("./identity-type.js").IdentityTypeValue, string>>;
|
|
240
240
|
value: z.ZodMiniString<string>;
|
|
241
241
|
}, z.core.$strip>>>;
|
|
242
242
|
context: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
@@ -355,9 +355,88 @@ export declare const claimPendingFlowAssignmentsResponseSchema: z.ZodMiniObject<
|
|
|
355
355
|
}, z.core.$strip>;
|
|
356
356
|
export declare const updateFlowAssignmentLifecycleRequestSchema: z.ZodMiniObject<{
|
|
357
357
|
identities: z.ZodMiniDefault<z.ZodMiniArray<z.ZodMiniObject<{
|
|
358
|
-
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"
|
|
358
|
+
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("./identity-type.js").IdentityTypeValue, string>>;
|
|
359
359
|
value: z.ZodMiniString<string>;
|
|
360
360
|
}, z.core.$strip>>>;
|
|
361
|
+
context: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
362
|
+
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
363
|
+
key: z.ZodMiniString<string>;
|
|
364
|
+
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
365
|
+
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 | {
|
|
366
|
+
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
367
|
+
} | null)[] | {
|
|
368
|
+
[key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
369
|
+
} | null)[] | {
|
|
370
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
371
|
+
} | null)[] | {
|
|
372
|
+
[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;
|
|
373
|
+
} | null)[] | {
|
|
374
|
+
[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;
|
|
375
|
+
} | null)[] | {
|
|
376
|
+
[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;
|
|
377
|
+
} | null)[] | {
|
|
378
|
+
[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;
|
|
379
|
+
} | null)[] | {
|
|
380
|
+
[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;
|
|
381
|
+
} | null)[] | {
|
|
382
|
+
[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;
|
|
383
|
+
} | null)[] | {
|
|
384
|
+
[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;
|
|
385
|
+
} | null)[] | {
|
|
386
|
+
[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;
|
|
387
|
+
} | null)[] | {
|
|
388
|
+
[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;
|
|
389
|
+
} | 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 | {
|
|
390
|
+
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
391
|
+
} | null)[] | {
|
|
392
|
+
[key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
393
|
+
} | null)[] | {
|
|
394
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
395
|
+
} | null)[] | {
|
|
396
|
+
[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;
|
|
397
|
+
} | null)[] | {
|
|
398
|
+
[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;
|
|
399
|
+
} | null)[] | {
|
|
400
|
+
[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;
|
|
401
|
+
} | null)[] | {
|
|
402
|
+
[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;
|
|
403
|
+
} | null)[] | {
|
|
404
|
+
[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;
|
|
405
|
+
} | null)[] | {
|
|
406
|
+
[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;
|
|
407
|
+
} | null)[] | {
|
|
408
|
+
[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;
|
|
409
|
+
} | null)[] | {
|
|
410
|
+
[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;
|
|
411
|
+
} | null)[] | {
|
|
412
|
+
[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;
|
|
413
|
+
} | null, unknown>>;
|
|
414
|
+
variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
415
|
+
origin: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
416
|
+
runtime_config: "runtime_config";
|
|
417
|
+
trigger_context: "trigger_context";
|
|
418
|
+
provider_sync: "provider_sync";
|
|
419
|
+
api: "api";
|
|
420
|
+
}>>;
|
|
421
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
422
|
+
name: z.ZodMiniString<string>;
|
|
423
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
424
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
425
|
+
}, z.core.$strip>>;
|
|
426
|
+
status: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
427
|
+
reason: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
428
|
+
evaluatedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
429
|
+
}, z.core.$strip>>>;
|
|
430
|
+
capabilities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
431
|
+
key: z.ZodMiniString<string>;
|
|
432
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
433
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
434
|
+
name: z.ZodMiniString<string>;
|
|
435
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
436
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
437
|
+
}, z.core.$strip>>;
|
|
438
|
+
}, z.core.$strip>>>;
|
|
439
|
+
}, z.core.$strip>>;
|
|
361
440
|
flowAssignmentId: z.ZodMiniString<string>;
|
|
362
441
|
flowVersionId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
363
442
|
holdGroupToken: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -365,7 +444,7 @@ export declare const updateFlowAssignmentLifecycleRequestSchema: z.ZodMiniObject
|
|
|
365
444
|
}, z.core.$strip>;
|
|
366
445
|
export declare const releaseFlowAssignmentClaimRequestSchema: z.ZodMiniObject<{
|
|
367
446
|
identities: z.ZodMiniDefault<z.ZodMiniArray<z.ZodMiniObject<{
|
|
368
|
-
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"
|
|
447
|
+
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("./identity-type.js").IdentityTypeValue, string>>;
|
|
369
448
|
value: z.ZodMiniString<string>;
|
|
370
449
|
}, z.core.$strip>>>;
|
|
371
450
|
holdGroupToken: z.ZodMiniString<string>;
|
|
@@ -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;AAQ9B,eAAO,MAAM,0BAA0B;;;;;;;;;;EAUrC,CAAC;AAEH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG/C,CAAC;AAEH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI/C,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBrC,CAAC;AAEH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGnD,CAAC;AAEH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMnD,CAAC;AAEH,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGpD,CAAC;AAEH,eAAO,MAAM,0CAA0C
|
|
1
|
+
{"version":3,"file":"flow-assignments.d.ts","sourceRoot":"","sources":["../src/flow-assignments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAQ9B,eAAO,MAAM,0BAA0B;;;;;;;;;;EAUrC,CAAC;AAEH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG/C,CAAC;AAEH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI/C,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBrC,CAAC;AAEH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGnD,CAAC;AAEH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMnD,CAAC;AAEH,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGpD,CAAC;AAEH,eAAO,MAAM,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOrD,CAAC;AAEH,eAAO,MAAM,uCAAuC;;;;;;;;iBAKlD,CAAC;AAEH,eAAO,MAAM,wCAAwC;;iBAEnD,CAAC;AAEH,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAC7B,CAAC;AAC5B,eAAO,MAAM,mDAAmD;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAE/D,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,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
|
@@ -55,6 +55,7 @@ export const claimPendingFlowAssignmentsResponseSchema = z.object({
|
|
|
55
55
|
});
|
|
56
56
|
export const updateFlowAssignmentLifecycleRequestSchema = z.object({
|
|
57
57
|
identities: z._default(z.array(appEventIdentitySchema), []),
|
|
58
|
+
context: z.optional(flowAssignmentTargetingContextSchema),
|
|
58
59
|
flowAssignmentId: z.string().check(z.trim(), z.minLength(1)),
|
|
59
60
|
flowVersionId: z.optional(z.string().check(z.trim(), z.minLength(1))),
|
|
60
61
|
holdGroupToken: z.optional(z.string().check(z.trim(), z.minLength(1))),
|
package/dist/host/constants.d.ts
CHANGED
|
@@ -27,9 +27,9 @@ export declare const HOST_EVENT_KEYS: {
|
|
|
27
27
|
* Stable capability tokens announced by the browser SDK during init.
|
|
28
28
|
* These are versioned and namespaced to support forward-compatible negotiation.
|
|
29
29
|
*/
|
|
30
|
-
export declare const SDK_PROTOCOL_CAPABILITIES: readonly ["gx.protocol.public.v1", "gx.command.configure.v1", "gx.command.open.v1", "gx.command.prefetch.v1", "gx.command.prerender.v1", "gx.command.identify.v1", "gx.command.setContainer.v1", "gx.command.close.v1", "gx.command.reset.v1", "gx.command.setDefaultContainerPolicy.v1"];
|
|
30
|
+
export declare const SDK_PROTOCOL_CAPABILITIES: readonly ["gx.protocol.public.v1", "gx.command.configure.v1", "gx.command.open.v1", "gx.command.prefetch.v1", "gx.command.prerender.v1", "gx.command.identify.v1", "gx.command.setContainer.v1", "gx.command.close.v1", "gx.command.reset.v1", "gx.command.setDefaultContainerPolicy.v1", "gx.command.track.v1"];
|
|
31
31
|
export type SdkProtocolCapability = (typeof SDK_PROTOCOL_CAPABILITIES)[number];
|
|
32
32
|
export declare const LOADER_RUNTIME_GLOBAL_KEY: "__getuserfeedback_runtime";
|
|
33
|
-
export declare const LOADER_RUNTIME_PROTOCOL_VERSION: "
|
|
33
|
+
export declare const LOADER_RUNTIME_PROTOCOL_VERSION: "v2";
|
|
34
34
|
export declare const toHostEventName: (key: string) => string;
|
|
35
35
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/host/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAC7B,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAI1D,eAAO,MAAM,eAAe,EAAG,kBAA2B,CAAC;AAE3D,eAAO,MAAM,mBAAmB,EAAG,kBAA2B,CAAC;AAI/D,eAAO,MAAM,iBAAiB,EAAG,kBAA2B,CAAC;AAE7D,eAAO,MAAM,eAAe;;;;;;;;;;;;;CAalB,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/host/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAC7B,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAI1D,eAAO,MAAM,eAAe,EAAG,kBAA2B,CAAC;AAE3D,eAAO,MAAM,mBAAmB,EAAG,kBAA2B,CAAC;AAI/D,eAAO,MAAM,iBAAiB,EAAG,kBAA2B,CAAC;AAE7D,eAAO,MAAM,eAAe;;;;;;;;;;;;;CAalB,CAAC;AAkDX;;;GAGG;AACH,eAAO,MAAM,yBAAyB,kTAG5B,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/E,eAAO,MAAM,yBAAyB,EAAG,2BAAoC,CAAC;AAC9E,eAAO,MAAM,+BAA+B,EAAG,IAAa,CAAC;AAG7D,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,KAAG,MACjB,CAAC"}
|
package/dist/host/constants.js
CHANGED
|
@@ -36,6 +36,7 @@ const SDK_COMMAND_CAPABILITY_BY_KIND = {
|
|
|
36
36
|
close: "gx.command.close.v1",
|
|
37
37
|
reset: "gx.command.reset.v1",
|
|
38
38
|
setDefaultContainerPolicy: "gx.command.setDefaultContainerPolicy.v1",
|
|
39
|
+
track: "gx.command.track.v1",
|
|
39
40
|
};
|
|
40
41
|
const SDK_COMMAND_CAPABILITIES = [
|
|
41
42
|
SDK_COMMAND_CAPABILITY_BY_KIND.configure,
|
|
@@ -47,6 +48,7 @@ const SDK_COMMAND_CAPABILITIES = [
|
|
|
47
48
|
SDK_COMMAND_CAPABILITY_BY_KIND.close,
|
|
48
49
|
SDK_COMMAND_CAPABILITY_BY_KIND.reset,
|
|
49
50
|
SDK_COMMAND_CAPABILITY_BY_KIND.setDefaultContainerPolicy,
|
|
51
|
+
SDK_COMMAND_CAPABILITY_BY_KIND.track,
|
|
50
52
|
];
|
|
51
53
|
/**
|
|
52
54
|
* Stable capability tokens announced by the browser SDK during init.
|
|
@@ -57,6 +59,6 @@ export const SDK_PROTOCOL_CAPABILITIES = [
|
|
|
57
59
|
...SDK_COMMAND_CAPABILITIES,
|
|
58
60
|
];
|
|
59
61
|
export const LOADER_RUNTIME_GLOBAL_KEY = "__getuserfeedback_runtime";
|
|
60
|
-
export const LOADER_RUNTIME_PROTOCOL_VERSION = "
|
|
62
|
+
export const LOADER_RUNTIME_PROTOCOL_VERSION = "v2";
|
|
61
63
|
// Helper to construct full event name with prefix
|
|
62
64
|
export const toHostEventName = (key) => `${HOST_EVENT_PREFIX}${key}`;
|