@getuserfeedback/protocol 0.4.1 → 0.5.1

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.
@@ -0,0 +1,148 @@
1
+ import * as z from "zod";
2
+ export { appEventIdentityTypeSchema } from "./identity-type.js";
3
+ export declare const appEventIdentitySchema: z.ZodObject<{
4
+ type: z.ZodPipe<z.ZodString, z.ZodTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
5
+ value: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export declare const appEventContextSchema: z.ZodObject<{
8
+ page: z.ZodOptional<z.ZodObject<{
9
+ path: z.ZodOptional<z.ZodString>;
10
+ referrer: z.ZodOptional<z.ZodString>;
11
+ search: z.ZodOptional<z.ZodString>;
12
+ }, z.core.$strip>>;
13
+ locale: z.ZodOptional<z.ZodString>;
14
+ userAgent: z.ZodOptional<z.ZodString>;
15
+ }, z.core.$strip>;
16
+ export declare const appEventBaseSchema: z.ZodObject<{
17
+ traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
18
+ identities: z.ZodOptional<z.ZodArray<z.ZodObject<{
19
+ type: z.ZodPipe<z.ZodString, z.ZodTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
20
+ value: z.ZodString;
21
+ }, z.core.$strip>>>;
22
+ context: z.ZodOptional<z.ZodObject<{
23
+ page: z.ZodOptional<z.ZodObject<{
24
+ path: z.ZodOptional<z.ZodString>;
25
+ referrer: z.ZodOptional<z.ZodString>;
26
+ search: z.ZodOptional<z.ZodString>;
27
+ }, z.core.$strip>>;
28
+ locale: z.ZodOptional<z.ZodString>;
29
+ userAgent: z.ZodOptional<z.ZodString>;
30
+ }, z.core.$strip>>;
31
+ messageId: z.ZodOptional<z.ZodString>;
32
+ timestamp: z.ZodOptional<z.ZodNumber>;
33
+ }, z.core.$strip>;
34
+ export declare const appEventSurveyViewedSchema: z.ZodObject<{
35
+ traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
36
+ identities: z.ZodOptional<z.ZodArray<z.ZodObject<{
37
+ type: z.ZodPipe<z.ZodString, z.ZodTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
38
+ value: z.ZodString;
39
+ }, z.core.$strip>>>;
40
+ context: z.ZodOptional<z.ZodObject<{
41
+ page: z.ZodOptional<z.ZodObject<{
42
+ path: z.ZodOptional<z.ZodString>;
43
+ referrer: z.ZodOptional<z.ZodString>;
44
+ search: z.ZodOptional<z.ZodString>;
45
+ }, z.core.$strip>>;
46
+ locale: z.ZodOptional<z.ZodString>;
47
+ userAgent: z.ZodOptional<z.ZodString>;
48
+ }, z.core.$strip>>;
49
+ messageId: z.ZodOptional<z.ZodString>;
50
+ timestamp: z.ZodOptional<z.ZodNumber>;
51
+ event: z.ZodLiteral<"Flow Viewed">;
52
+ references: z.ZodObject<{
53
+ surveyId: z.ZodString;
54
+ }, z.core.$strip>;
55
+ }, z.core.$strip>;
56
+ export declare const appEventFlowDismissedSchema: z.ZodObject<{
57
+ traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
58
+ identities: z.ZodOptional<z.ZodArray<z.ZodObject<{
59
+ type: z.ZodPipe<z.ZodString, z.ZodTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
60
+ value: z.ZodString;
61
+ }, z.core.$strip>>>;
62
+ context: z.ZodOptional<z.ZodObject<{
63
+ page: z.ZodOptional<z.ZodObject<{
64
+ path: z.ZodOptional<z.ZodString>;
65
+ referrer: z.ZodOptional<z.ZodString>;
66
+ search: z.ZodOptional<z.ZodString>;
67
+ }, z.core.$strip>>;
68
+ locale: z.ZodOptional<z.ZodString>;
69
+ userAgent: z.ZodOptional<z.ZodString>;
70
+ }, z.core.$strip>>;
71
+ messageId: z.ZodOptional<z.ZodString>;
72
+ timestamp: z.ZodOptional<z.ZodNumber>;
73
+ event: z.ZodLiteral<"Flow Dismissed">;
74
+ references: z.ZodObject<{
75
+ surveyId: z.ZodString;
76
+ }, z.core.$strip>;
77
+ }, z.core.$strip>;
78
+ export declare const appEventTrackSchema: z.ZodObject<{
79
+ traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
80
+ identities: z.ZodOptional<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
+ context: z.ZodOptional<z.ZodObject<{
85
+ page: z.ZodOptional<z.ZodObject<{
86
+ path: z.ZodOptional<z.ZodString>;
87
+ referrer: z.ZodOptional<z.ZodString>;
88
+ search: z.ZodOptional<z.ZodString>;
89
+ }, z.core.$strip>>;
90
+ locale: z.ZodOptional<z.ZodString>;
91
+ userAgent: z.ZodOptional<z.ZodString>;
92
+ }, z.core.$strip>>;
93
+ messageId: z.ZodOptional<z.ZodString>;
94
+ timestamp: z.ZodOptional<z.ZodNumber>;
95
+ event: z.ZodEnum<{
96
+ "Flow Viewed": "Flow Viewed";
97
+ "Flow Dismissed": "Flow Dismissed";
98
+ }>;
99
+ references: z.ZodObject<{
100
+ surveyId: z.ZodString;
101
+ }, z.core.$strip>;
102
+ }, z.core.$strip>;
103
+ export declare const appEventPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
104
+ traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
105
+ identities: z.ZodOptional<z.ZodArray<z.ZodObject<{
106
+ type: z.ZodPipe<z.ZodString, z.ZodTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
107
+ value: z.ZodString;
108
+ }, z.core.$strip>>>;
109
+ context: z.ZodOptional<z.ZodObject<{
110
+ page: z.ZodOptional<z.ZodObject<{
111
+ path: z.ZodOptional<z.ZodString>;
112
+ referrer: z.ZodOptional<z.ZodString>;
113
+ search: z.ZodOptional<z.ZodString>;
114
+ }, z.core.$strip>>;
115
+ locale: z.ZodOptional<z.ZodString>;
116
+ userAgent: z.ZodOptional<z.ZodString>;
117
+ }, z.core.$strip>>;
118
+ messageId: z.ZodOptional<z.ZodString>;
119
+ timestamp: z.ZodOptional<z.ZodNumber>;
120
+ event: z.ZodLiteral<"Flow Viewed">;
121
+ references: z.ZodObject<{
122
+ surveyId: z.ZodString;
123
+ }, z.core.$strip>;
124
+ }, z.core.$strip>, z.ZodObject<{
125
+ traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
126
+ identities: z.ZodOptional<z.ZodArray<z.ZodObject<{
127
+ type: z.ZodPipe<z.ZodString, z.ZodTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
128
+ value: z.ZodString;
129
+ }, z.core.$strip>>>;
130
+ context: z.ZodOptional<z.ZodObject<{
131
+ page: z.ZodOptional<z.ZodObject<{
132
+ path: z.ZodOptional<z.ZodString>;
133
+ referrer: z.ZodOptional<z.ZodString>;
134
+ search: z.ZodOptional<z.ZodString>;
135
+ }, z.core.$strip>>;
136
+ locale: z.ZodOptional<z.ZodString>;
137
+ userAgent: z.ZodOptional<z.ZodString>;
138
+ }, z.core.$strip>>;
139
+ messageId: z.ZodOptional<z.ZodString>;
140
+ timestamp: z.ZodOptional<z.ZodNumber>;
141
+ event: z.ZodLiteral<"Flow Dismissed">;
142
+ references: z.ZodObject<{
143
+ surveyId: z.ZodString;
144
+ }, z.core.$strip>;
145
+ }, z.core.$strip>], "event">;
146
+ export type AppEventTrackInput = z.output<typeof appEventTrackSchema>;
147
+ export type AppEventPayload = z.output<typeof appEventPayloadSchema>;
148
+ //# sourceMappingURL=app-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-event.d.ts","sourceRoot":"","sources":["../src/app-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAEhE,eAAO,MAAM,sBAAsB;;;iBAGjC,CAAC;AAQH,eAAO,MAAM,qBAAqB;;;;;;;;iBAIhC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;iBAM7B,CAAC;AAMH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;iBAGrC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;iBAGtC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;iBAG9B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAGhC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,43 @@
1
+ import * as z from "zod";
2
+ import { appEventIdentityTypeSchema } from "./identity-type.js";
3
+ export { appEventIdentityTypeSchema } from "./identity-type.js";
4
+ export const appEventIdentitySchema = z.object({
5
+ type: appEventIdentityTypeSchema,
6
+ value: z.string().trim().min(1),
7
+ });
8
+ const appEventPageSchema = z.object({
9
+ path: z.optional(z.string()),
10
+ referrer: z.optional(z.string()),
11
+ search: z.optional(z.string()),
12
+ });
13
+ export const appEventContextSchema = z.object({
14
+ page: z.optional(appEventPageSchema),
15
+ locale: z.optional(z.string()),
16
+ userAgent: z.optional(z.string()),
17
+ });
18
+ export const appEventBaseSchema = z.object({
19
+ traits: z.optional(z.record(z.string(), z.unknown())),
20
+ identities: z.optional(z.array(appEventIdentitySchema)),
21
+ context: z.optional(appEventContextSchema),
22
+ messageId: z.optional(z.string()),
23
+ timestamp: z.optional(z.number()),
24
+ });
25
+ const appEventSurveyReferenceSchema = z.object({
26
+ surveyId: z.string(),
27
+ });
28
+ export const appEventSurveyViewedSchema = appEventBaseSchema.extend({
29
+ event: z.literal("Flow Viewed"),
30
+ references: appEventSurveyReferenceSchema,
31
+ });
32
+ export const appEventFlowDismissedSchema = appEventBaseSchema.extend({
33
+ event: z.literal("Flow Dismissed"),
34
+ references: appEventSurveyReferenceSchema,
35
+ });
36
+ export const appEventTrackSchema = appEventBaseSchema.extend({
37
+ event: z.enum(["Flow Viewed", "Flow Dismissed"]),
38
+ references: appEventSurveyReferenceSchema,
39
+ });
40
+ export const appEventPayloadSchema = z.discriminatedUnion("event", [
41
+ appEventSurveyViewedSchema,
42
+ appEventFlowDismissedSchema,
43
+ ]);
@@ -1,12 +1,12 @@
1
1
  import * as z from "zod";
2
2
  export declare const clientMetaSchema: z.ZodObject<{
3
3
  loader: z.ZodEnum<{
4
+ custom: "custom";
4
5
  sdk: "sdk";
5
6
  gtm: "gtm";
6
7
  segment: "segment";
7
8
  rudderstack: "rudderstack";
8
9
  tealium: "tealium";
9
- custom: "custom";
10
10
  }>;
11
11
  clientName: z.ZodOptional<z.ZodString>;
12
12
  clientVersion: z.ZodOptional<z.ZodString>;
@@ -0,0 +1,8 @@
1
+ import * as z from "zod";
2
+ export declare const IDENTITY_TYPE_VALUES: readonly ["anonymousId", "userId", "traits.email", "traits.phone", "context.device.id", "context.device.advertisingId", "context.device.token"];
3
+ export type IdentityTypeValue = (typeof IDENTITY_TYPE_VALUES)[number];
4
+ export declare const isIdentityTypeValue: (value: string) => value is IdentityTypeValue;
5
+ export declare const getIdentityTypeSuggestion: (value: string) => IdentityTypeValue | null;
6
+ export declare const buildIdentityTypeGuidanceMessage: (value: string) => string;
7
+ export declare const appEventIdentityTypeSchema: z.ZodPipe<z.ZodString, z.ZodTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
8
+ //# sourceMappingURL=identity-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-type.d.ts","sourceRoot":"","sources":["../src/identity-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,oBAAoB,iJAQvB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAsBtE,eAAO,MAAM,mBAAmB,GAC/B,OAAO,MAAM,KACX,KAAK,IAAI,iBACkD,CAAC;AAK/D,eAAO,MAAM,yBAAyB,GACrC,OAAO,MAAM,KACX,iBAAiB,GAAG,IACuD,CAAC;AAE/E,eAAO,MAAM,gCAAgC,GAAI,OAAO,MAAM,KAAG,MAehE,CAAC;AAEF,eAAO,MAAM,0BAA0B,4LAqBpC,CAAC"}
@@ -0,0 +1,59 @@
1
+ import * as z from "zod";
2
+ export const IDENTITY_TYPE_VALUES = [
3
+ "anonymousId",
4
+ "userId",
5
+ "traits.email",
6
+ "traits.phone",
7
+ "context.device.id",
8
+ "context.device.advertisingId",
9
+ "context.device.token",
10
+ ];
11
+ const IDENTITY_TYPE_ALIAS_SUGGESTIONS = {
12
+ advertising_id: "context.device.advertisingId",
13
+ anonymous_id: "anonymousId",
14
+ device_id: "context.device.id",
15
+ device_token: "context.device.token",
16
+ email: "traits.email",
17
+ phone: "traits.phone",
18
+ phone_number: "traits.phone",
19
+ user_id: "userId",
20
+ };
21
+ const COMMON_IDENTITY_TYPE_MAPPINGS = [
22
+ ["email", "traits.email"],
23
+ ["phone", "traits.phone"],
24
+ ["user_id", "userId"],
25
+ ];
26
+ const normalizeIdentityTypeAliasKey = (value) => value.trim().toLowerCase().replace(/-/g, "_");
27
+ export const isIdentityTypeValue = (value) => IDENTITY_TYPE_VALUES.some((candidate) => candidate === value);
28
+ const parseIdentityTypeValue = (value) => isIdentityTypeValue(value) ? value : null;
29
+ export const getIdentityTypeSuggestion = (value) => IDENTITY_TYPE_ALIAS_SUGGESTIONS[normalizeIdentityTypeAliasKey(value)] ?? null;
30
+ export const buildIdentityTypeGuidanceMessage = (value) => {
31
+ const normalizedValue = value.trim();
32
+ const displayValue = normalizedValue.length > 0 ? `"${normalizedValue}"` : "that value";
33
+ const suggestion = getIdentityTypeSuggestion(value);
34
+ if (suggestion) {
35
+ return `Unsupported identity type ${displayValue}. Use "${suggestion}" instead.`;
36
+ }
37
+ const mappingExamples = COMMON_IDENTITY_TYPE_MAPPINGS.map(([from, to]) => `${from} -> ${to}`).join(", ");
38
+ return `Unsupported identity type ${displayValue}. Use one of: ${IDENTITY_TYPE_VALUES.join(", ")}. Common mappings: ${mappingExamples}.`;
39
+ };
40
+ export const appEventIdentityTypeSchema = z
41
+ .string()
42
+ .trim()
43
+ .min(1, "Identity type is required.")
44
+ .superRefine((value, ctx) => {
45
+ if (!isIdentityTypeValue(value)) {
46
+ ctx.addIssue({
47
+ code: "custom",
48
+ fatal: true,
49
+ message: buildIdentityTypeGuidanceMessage(value),
50
+ });
51
+ }
52
+ })
53
+ .transform((value) => {
54
+ const parsed = parseIdentityTypeValue(value);
55
+ if (parsed === null) {
56
+ throw new Error(`Identity type should have been validated before transform: ${value}`);
57
+ }
58
+ return parsed;
59
+ });
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
+ export { type AppEventPayload, type AppEventTrackInput, appEventBaseSchema, appEventContextSchema, appEventFlowDismissedSchema, appEventIdentitySchema, appEventIdentityTypeSchema, appEventPayloadSchema, appEventSurveyViewedSchema, appEventTrackSchema, } from "./app-event.js";
1
2
  export { type ClientMeta, clientMetaSchema, } from "./client-meta.js";
2
3
  export { DEFAULT_AUTO_DETECT_COLOR_SCHEME_ATTRS } from "./defaults.js";
4
+ export { buildIdentityTypeGuidanceMessage, getIdentityTypeSuggestion, IDENTITY_TYPE_VALUES, type IdentityTypeValue, isIdentityTypeValue, } from "./identity-type.js";
3
5
  export { getScopeMeta, isScope, listScopes, SCOPE_IDS, type Scope, scopeIdSchema, } from "./scopes.js";
4
6
  export { type FlowVersionResolution, flowVersionResolutionSchema, type ThemeVersionResolution, themeVersionResolutionSchema, } from "./version-resolution.js";
5
7
  export { type PublicCommandPayload, parseConfigureOptions, parseInitOptions, parsePublicCommand, publicCommandPayloadSchema, } from "./widget-commands.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,UAAU,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sCAAsC,EAAE,MAAM,eAAe,CAAC;AACvE,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,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,4BAA4B,EAC5B,sBAAsB,EACtB,wBAAwB,EACxB,KAAK,WAAW,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,wBAAwB,GACxB,MAAM,oBAAoB,CAAC"}
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,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,4BAA4B,EAC5B,sBAAsB,EACtB,wBAAwB,EACxB,KAAK,WAAW,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,wBAAwB,GACxB,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
+ export { appEventBaseSchema, appEventContextSchema, appEventFlowDismissedSchema, appEventIdentitySchema, appEventIdentityTypeSchema, appEventPayloadSchema, appEventSurveyViewedSchema, appEventTrackSchema, } from "./app-event.js";
1
2
  export { clientMetaSchema, } from "./client-meta.js";
2
3
  export { DEFAULT_AUTO_DETECT_COLOR_SCHEME_ATTRS } from "./defaults.js";
4
+ export { buildIdentityTypeGuidanceMessage, getIdentityTypeSuggestion, IDENTITY_TYPE_VALUES, isIdentityTypeValue, } from "./identity-type.js";
3
5
  export { getScopeMeta, isScope, listScopes, SCOPE_IDS, scopeIdSchema, } from "./scopes.js";
4
6
  export { flowVersionResolutionSchema, themeVersionResolutionSchema, } from "./version-resolution.js";
5
7
  export { parseConfigureOptions, parseInitOptions, parsePublicCommand, publicCommandPayloadSchema, } from "./widget-commands.js";
@@ -115,12 +115,12 @@ export declare const publicCommandPayloadSchema: z.ZodUnion<readonly [z.ZodDiscr
115
115
  }>>]>>;
116
116
  clientMeta: z.ZodOptional<z.ZodObject<{
117
117
  loader: z.ZodEnum<{
118
+ custom: "custom";
118
119
  sdk: "sdk";
119
120
  gtm: "gtm";
120
121
  segment: "segment";
121
122
  rudderstack: "rudderstack";
122
123
  tealium: "tealium";
123
- custom: "custom";
124
124
  }>;
125
125
  clientName: z.ZodOptional<z.ZodString>;
126
126
  clientVersion: z.ZodOptional<z.ZodString>;
@@ -91,12 +91,12 @@ export declare const initOptionsSchema: z.ZodObject<{
91
91
  }>>]>>;
92
92
  clientMeta: z.ZodOptional<z.ZodObject<{
93
93
  loader: z.ZodEnum<{
94
+ custom: "custom";
94
95
  sdk: "sdk";
95
96
  gtm: "gtm";
96
97
  segment: "segment";
97
98
  rudderstack: "rudderstack";
98
99
  tealium: "tealium";
99
- custom: "custom";
100
100
  }>;
101
101
  clientName: z.ZodOptional<z.ZodString>;
102
102
  clientVersion: z.ZodOptional<z.ZodString>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getuserfeedback/protocol",
3
- "version": "0.4.1",
3
+ "version": "0.5.1",
4
4
  "description": "getuserfeedback widget protocol — host surface and (later) wire protocol",
5
5
  "keywords": [
6
6
  "getuserfeedback",