@getuserfeedback/protocol 0.6.1 → 0.8.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/app-event.d.ts +779 -10
- package/dist/app-event.d.ts.map +1 -1
- package/dist/app-event.js +81 -8
- package/dist/flow-assignments.d.ts +7 -4
- package/dist/flow-assignments.d.ts.map +1 -1
- package/dist/flow-assignments.js +15 -5
- 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/external-id-argument-guards.d.ts +10 -0
- package/dist/host/external-id-argument-guards.d.ts.map +1 -0
- package/dist/host/external-id-argument-guards.js +27 -0
- package/dist/host/index.d.ts +1 -0
- package/dist/host/index.d.ts.map +1 -1
- package/dist/host/index.js +1 -0
- package/dist/host/sdk-types.d.ts +92 -27
- 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 +2 -1
- package/dist/identity-type.d.ts.map +1 -1
- package/dist/identity-type.js +1 -1
- package/dist/index.d.ts +3 -87
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -6
- package/dist/widget-commands.d.ts +124 -3
- package/dist/widget-commands.d.ts.map +1 -1
- package/dist/widget-commands.js +10 -0
- package/dist/widget-config.d.ts +23 -5
- package/dist/widget-config.d.ts.map +1 -1
- package/dist/widget-config.js +2 -1
- package/package.json +22 -2
- package/src/app-event.ts +235 -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 +82 -0
- package/src/flow-assignments.ts +151 -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/external-id-argument-guards.ts +57 -0
- package/src/host/host-event-contract.ts +277 -0
- package/src/host/index.ts +14 -0
- package/src/host/lazy-handle-client.ts +207 -0
- package/src/host/request-id.ts +3 -0
- package/src/host/sdk-types.ts +528 -0
- package/src/host/sdk.ts +43 -0
- package/src/host/unique-id.ts +17 -0
- package/src/identity-type.ts +96 -0
- package/src/index.ts +139 -0
- package/src/protocol-root.test.ts +582 -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 +162 -0
- package/src/widget-config.ts +164 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-types.d.ts","sourceRoot":"","sources":["../../src/host/sdk-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAI1C
|
|
1
|
+
{"version":3,"file":"sdk-types.d.ts","sourceRoot":"","sources":["../../src/host/sdk-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAI1C;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAC7B,aAAa,GACb,QAAQ,GACR,cAAc,GACd,cAAc,GACd,mBAAmB,GACnB,8BAA8B,GAC9B,sBAAsB,CAAC;AAE1B,0FAA0F;AAC1F,MAAM,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,oBAAoB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,uEAAuE;AACvE,MAAM,MAAM,eAAe,GAAG;IAC7B,IAAI,CAAC,EAAE;QACN,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QA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,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClE,OAAO,EAAE;QACR,IAAI,EAAE;YACL,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;YACjC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;YACrC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;YACnC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;SACnC,CAAC;QACF,aAAa,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.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,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,WAAW,EACX,oBAAoB,EACpB,qBAAqB,
|
|
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,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EAErB,cAAc,GACd,MAAM,gBAAgB,CAAC"}
|
package/dist/identity-type.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/mini";
|
|
2
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
|
|
3
|
+
export type StandardIdentityTypeValue = (typeof IDENTITY_TYPE_VALUES)[number];
|
|
4
|
+
export type IdentityTypeValue = StandardIdentityTypeValue;
|
|
4
5
|
export declare const isIdentityTypeValue: (value: string) => value is IdentityTypeValue;
|
|
5
6
|
export declare const getIdentityTypeSuggestion: (value: string) => IdentityTypeValue | null;
|
|
6
7
|
export declare const buildIdentityTypeGuidanceMessage: (value: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-type.d.ts","sourceRoot":"","sources":["../src/identity-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,eAAO,MAAM,oBAAoB,iJAQvB,CAAC;AAEX,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"identity-type.d.ts","sourceRoot":"","sources":["../src/identity-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,eAAO,MAAM,oBAAoB,iJAQvB,CAAC;AAEX,MAAM,MAAM,yBAAyB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC9E,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,CAAC;AAyB1D,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;AAkBF,eAAO,MAAM,0BAA0B,gNAWtC,CAAC"}
|
package/dist/identity-type.js
CHANGED
|
@@ -35,7 +35,7 @@ export const buildIdentityTypeGuidanceMessage = (value) => {
|
|
|
35
35
|
return `Unsupported identity type ${displayValue}. Use "${suggestion}" instead.`;
|
|
36
36
|
}
|
|
37
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}.`;
|
|
38
|
+
return `Unsupported identity type ${displayValue}. Use one of: ${IDENTITY_TYPE_VALUES.join(", ")}. For external IDs, send Segment-compatible context.externalIds entries instead. Common mappings: ${mappingExamples}.`;
|
|
39
39
|
};
|
|
40
40
|
const identityTypeInputSchema = z.string().check(z.trim(), z.minLength(1, { error: "Identity type is required." }), z.check((ctx) => {
|
|
41
41
|
if (isIdentityTypeValue(ctx.value)) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export { type AppEventCapability, type AppEventFlag, type AppEventPayload, type AppEventTrackInput, appEventBaseSchema, appEventCapabilitySchema, appEventContextSchema, appEventFlagProviderSchema, appEventFlagSchema, appEventFlowDismissedSchema, appEventIdentitySchema, appEventIdentityTypeSchema, appEventPayloadSchema, appEventSurveyViewedSchema, appEventTrackSchema, } from "./app-event.js";
|
|
1
|
+
export { type AppEventCapability, type AppEventExternalId, type AppEventFlag, type AppEventJsonValue, type AppEventPayload, type AppEventTrackInput, appEventBaseSchema, appEventCapabilitySchema, appEventContextSchema, appEventCustomerTrackSchema, appEventExternalIdSchema, appEventFlagProviderSchema, appEventFlagSchema, appEventFlowDismissedSchema, appEventIdentitySchema, appEventIdentityTypeSchema, appEventPayloadSchema, appEventSurveyViewedSchema, appEventSystemBaseSchema, appEventSystemTrackSchema, appEventTrackSchema, reservedSystemAppEventNames, } from "./app-event.js";
|
|
3
2
|
export { type ClientMeta, clientMetaSchema, } from "./client-meta.js";
|
|
4
3
|
export { DEFAULT_AUTO_DETECT_COLOR_SCHEME_ATTRS } from "./defaults.js";
|
|
5
4
|
export type { ErrorEvent, ProtocolErrorCode } from "./errors.js";
|
|
6
5
|
export { ErrorCategory, ErrorCategorySchema, ErrorEventSchema, ProtocolError, } from "./errors.js";
|
|
7
|
-
export { type ClaimPendingFlowAssignmentsRequest, type ClaimPendingFlowAssignmentsResponse, claimPendingFlowAssignmentsRequestSchema, claimPendingFlowAssignmentsResponseSchema, 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";
|
|
8
|
-
export { buildIdentityTypeGuidanceMessage, getIdentityTypeSuggestion, IDENTITY_TYPE_VALUES, type IdentityTypeValue, isIdentityTypeValue, } from "./identity-type.js";
|
|
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 { buildIdentityTypeGuidanceMessage, getIdentityTypeSuggestion, IDENTITY_TYPE_VALUES, type IdentityTypeValue, isIdentityTypeValue, type StandardIdentityTypeValue, } from "./identity-type.js";
|
|
9
8
|
export { isPublicGrantScope, type PublicGrantScope, publicGrantScopeIdSchema, } from "./public-grant-scope.js";
|
|
10
9
|
export { type RuntimeEndpoints, resolveApiBaseUrl, resolveCoreUrl, resolveTrpcBaseUrl, runtimeEndpointsSchema, } from "./runtime-endpoints.js";
|
|
11
10
|
export { getScopeMeta, isScope, listScopes, SCOPE_IDS, type Scope, scopeIdSchema, } from "./scopes.js";
|
|
@@ -13,87 +12,4 @@ export { type TrpcSuccessResponse, trpcSuccessResponseSchema, } from "./trpc-env
|
|
|
13
12
|
export { type FlowVersionResolution, flowVersionResolutionSchema, type ThemeVersionResolution, themeVersionResolutionSchema, } from "./version-resolution.js";
|
|
14
13
|
export { type PublicCommandPayload, parseConfigureOptions, parseInitOptions, parsePublicCommand, publicCommandPayloadSchema, publicWidgetCommandKindSchema, } from "./widget-commands.js";
|
|
15
14
|
export { type AuthConfigInput, type AuthJwtConfigInput, authConfigInputSchema, authJwtConfigInputSchema, type ColorSchemeConfigInput, type ConfigureOptions, type ConsentConfigInput, type CoreInstanceConfig, type CoreInstanceConfigInput, colorSchemeConfigInputSchema, configureOptionsSchema, consentConfigInputSchema, coreInstanceConfigSchema, type DebugConfigInput, debugInputSchema, type FlagsConfigInput, flagsConfigInputSchema, type HostCapabilitiesConfigInput, hostCapabilitiesConfigInputSchema, type IdentityConfigInput, INSTANCE_CONFIG_UPDATE_KEYS, type InitOptions, type InstanceUpdateableConfig, identityConfigInputSchema, initOptionsSchema, instanceUpdateableConfigSchema, type TelemetryConfigInput, telemetryConfigInputSchema, } from "./widget-config.js";
|
|
16
|
-
/** @deprecated Prefer {@link AppEventFlag}; legacy name from root protocol surface. */
|
|
17
|
-
export type FeatureFlagConfigInput = AppEventFlagAlias;
|
|
18
|
-
/** @deprecated Prefer {@link appEventFlagSchema}; legacy name from root protocol surface. */
|
|
19
|
-
export declare const featureFlagConfigInputSchema: import("zod/mini").ZodMiniObject<{
|
|
20
|
-
key: import("zod/mini").ZodMiniString<string>;
|
|
21
|
-
target: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
22
|
-
value: import("zod/mini").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 | {
|
|
23
|
-
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
24
|
-
} | null)[] | {
|
|
25
|
-
[key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
26
|
-
} | null)[] | {
|
|
27
|
-
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
28
|
-
} | null)[] | {
|
|
29
|
-
[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;
|
|
30
|
-
} | null)[] | {
|
|
31
|
-
[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;
|
|
32
|
-
} | null)[] | {
|
|
33
|
-
[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;
|
|
34
|
-
} | null)[] | {
|
|
35
|
-
[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;
|
|
36
|
-
} | null)[] | {
|
|
37
|
-
[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;
|
|
38
|
-
} | null)[] | {
|
|
39
|
-
[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;
|
|
40
|
-
} | null)[] | {
|
|
41
|
-
[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;
|
|
42
|
-
} | null)[] | {
|
|
43
|
-
[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;
|
|
44
|
-
} | null)[] | {
|
|
45
|
-
[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;
|
|
46
|
-
} | null, unknown, import("zod/v4/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 | {
|
|
47
|
-
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
48
|
-
} | null)[] | {
|
|
49
|
-
[key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
50
|
-
} | null)[] | {
|
|
51
|
-
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
52
|
-
} | null)[] | {
|
|
53
|
-
[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;
|
|
54
|
-
} | null)[] | {
|
|
55
|
-
[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;
|
|
56
|
-
} | null)[] | {
|
|
57
|
-
[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;
|
|
58
|
-
} | null)[] | {
|
|
59
|
-
[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;
|
|
60
|
-
} | null)[] | {
|
|
61
|
-
[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;
|
|
62
|
-
} | null)[] | {
|
|
63
|
-
[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;
|
|
64
|
-
} | null)[] | {
|
|
65
|
-
[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;
|
|
66
|
-
} | null)[] | {
|
|
67
|
-
[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;
|
|
68
|
-
} | null)[] | {
|
|
69
|
-
[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;
|
|
70
|
-
} | null, unknown>>;
|
|
71
|
-
variant: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
72
|
-
origin: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniEnum<{
|
|
73
|
-
runtime_config: "runtime_config";
|
|
74
|
-
trigger_context: "trigger_context";
|
|
75
|
-
provider_sync: "provider_sync";
|
|
76
|
-
api: "api";
|
|
77
|
-
}>>;
|
|
78
|
-
provider: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniObject<{
|
|
79
|
-
name: import("zod/mini").ZodMiniString<string>;
|
|
80
|
-
project: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
81
|
-
environment: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
82
|
-
}, import("zod/v4/core").$strip>>;
|
|
83
|
-
status: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
84
|
-
reason: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
85
|
-
evaluatedAt: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
86
|
-
}, import("zod/v4/core").$strip>;
|
|
87
|
-
/** @deprecated Prefer {@link AppEventCapability}; legacy name from root protocol surface. */
|
|
88
|
-
export type RuntimeCapabilityConfigInput = AppEventCapabilityAlias;
|
|
89
|
-
/** @deprecated Prefer {@link appEventCapabilitySchema}; legacy name from root protocol surface. */
|
|
90
|
-
export declare const runtimeCapabilityConfigInputSchema: import("zod/mini").ZodMiniObject<{
|
|
91
|
-
key: import("zod/mini").ZodMiniString<string>;
|
|
92
|
-
source: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
93
|
-
provider: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniObject<{
|
|
94
|
-
name: import("zod/mini").ZodMiniString<string>;
|
|
95
|
-
project: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
96
|
-
environment: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
97
|
-
}, import("zod/v4/core").$strip>>;
|
|
98
|
-
}, import("zod/v4/core").$strip>;
|
|
99
15
|
//# 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,kBAAkB,
|
|
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,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EventContextSchema, appEventFlagProviderSchema, appEventFlagSchema, appEventFlowDismissedSchema, appEventIdentitySchema, appEventIdentityTypeSchema, appEventPayloadSchema, appEventSurveyViewedSchema, appEventTrackSchema, } from "./app-event.js";
|
|
1
|
+
export { appEventBaseSchema, appEventCapabilitySchema, appEventContextSchema, appEventCustomerTrackSchema, appEventExternalIdSchema, appEventFlagProviderSchema, appEventFlagSchema, appEventFlowDismissedSchema, appEventIdentitySchema, appEventIdentityTypeSchema, appEventPayloadSchema, appEventSurveyViewedSchema, appEventSystemBaseSchema, appEventSystemTrackSchema, appEventTrackSchema, reservedSystemAppEventNames, } from "./app-event.js";
|
|
3
2
|
export { clientMetaSchema, } from "./client-meta.js";
|
|
4
3
|
export { DEFAULT_AUTO_DETECT_COLOR_SCHEME_ATTRS } from "./defaults.js";
|
|
5
4
|
export { ErrorCategory, ErrorCategorySchema, ErrorEventSchema, ProtocolError, } from "./errors.js";
|
|
@@ -12,7 +11,3 @@ export { trpcSuccessResponseSchema, } from "./trpc-envelope.js";
|
|
|
12
11
|
export { flowVersionResolutionSchema, themeVersionResolutionSchema, } from "./version-resolution.js";
|
|
13
12
|
export { parseConfigureOptions, parseInitOptions, parsePublicCommand, publicCommandPayloadSchema, publicWidgetCommandKindSchema, } from "./widget-commands.js";
|
|
14
13
|
export { authConfigInputSchema, authJwtConfigInputSchema, colorSchemeConfigInputSchema, configureOptionsSchema, consentConfigInputSchema, coreInstanceConfigSchema, debugInputSchema, flagsConfigInputSchema, hostCapabilitiesConfigInputSchema, INSTANCE_CONFIG_UPDATE_KEYS, identityConfigInputSchema, initOptionsSchema, instanceUpdateableConfigSchema, telemetryConfigInputSchema, } from "./widget-config.js";
|
|
15
|
-
/** @deprecated Prefer {@link appEventFlagSchema}; legacy name from root protocol surface. */
|
|
16
|
-
export const featureFlagConfigInputSchema = appEventFlagSchemaAlias;
|
|
17
|
-
/** @deprecated Prefer {@link appEventCapabilitySchema}; legacy name from root protocol surface. */
|
|
18
|
-
export const runtimeCapabilityConfigInputSchema = appEventCapabilitySchemaAlias;
|
|
@@ -11,6 +11,7 @@ export declare const publicWidgetCommandKindSchema: z.ZodMiniEnum<{
|
|
|
11
11
|
init: "init";
|
|
12
12
|
close: "close";
|
|
13
13
|
reset: "reset";
|
|
14
|
+
track: "track";
|
|
14
15
|
}>;
|
|
15
16
|
export declare const containerPolicySchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
16
17
|
kind: z.ZodMiniLiteral<"floating">;
|
|
@@ -76,9 +77,9 @@ export declare const publicCommandPayloadSchema: z.ZodMiniUnion<readonly [z.ZodM
|
|
|
76
77
|
colorScheme: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
77
78
|
autoDetectColorScheme: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
78
79
|
}, z.core.$strict>, z.ZodMiniEnum<{
|
|
80
|
+
system: "system";
|
|
79
81
|
light: "light";
|
|
80
82
|
dark: "dark";
|
|
81
|
-
system: "system";
|
|
82
83
|
}>]>>;
|
|
83
84
|
consent: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
|
|
84
85
|
pending: "pending";
|
|
@@ -108,9 +109,9 @@ export declare const publicCommandPayloadSchema: z.ZodMiniUnion<readonly [z.ZodM
|
|
|
108
109
|
colorScheme: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
109
110
|
autoDetectColorScheme: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
110
111
|
}, z.core.$strict>, z.ZodMiniEnum<{
|
|
112
|
+
system: "system";
|
|
111
113
|
light: "light";
|
|
112
114
|
dark: "dark";
|
|
113
|
-
system: "system";
|
|
114
115
|
}>]>>;
|
|
115
116
|
disableTelemetry: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
116
117
|
enableDebug: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -253,13 +254,133 @@ export declare const publicCommandPayloadSchema: z.ZodMiniUnion<readonly [z.ZodM
|
|
|
253
254
|
flowHandleId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
254
255
|
}, z.core.$strict>, z.ZodMiniObject<{
|
|
255
256
|
kind: z.ZodMiniLiteral<"reset">;
|
|
256
|
-
}, z.core.$strict
|
|
257
|
+
}, z.core.$strict>, z.ZodMiniObject<{
|
|
258
|
+
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
259
|
+
identities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
260
|
+
type: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"anonymousId" | "userId" | "traits.email" | "traits.phone" | "context.device.id" | "context.device.advertisingId" | "context.device.token", string>>;
|
|
261
|
+
value: z.ZodMiniString<string>;
|
|
262
|
+
}, z.core.$strip>>>;
|
|
263
|
+
context: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
264
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
265
|
+
path: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
266
|
+
referrer: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
267
|
+
search: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
268
|
+
}, z.core.$strip>>;
|
|
269
|
+
locale: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
270
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
271
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
272
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
273
|
+
type: z.ZodMiniString<string>;
|
|
274
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
275
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
276
|
+
}, z.core.$strip>>>;
|
|
277
|
+
flags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
278
|
+
key: z.ZodMiniString<string>;
|
|
279
|
+
target: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
280
|
+
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 | {
|
|
281
|
+
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
282
|
+
} | null)[] | {
|
|
283
|
+
[key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
284
|
+
} | null)[] | {
|
|
285
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
286
|
+
} | null)[] | {
|
|
287
|
+
[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;
|
|
288
|
+
} | null)[] | {
|
|
289
|
+
[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;
|
|
290
|
+
} | null)[] | {
|
|
291
|
+
[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;
|
|
292
|
+
} | null)[] | {
|
|
293
|
+
[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;
|
|
294
|
+
} | null)[] | {
|
|
295
|
+
[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;
|
|
296
|
+
} | null)[] | {
|
|
297
|
+
[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;
|
|
298
|
+
} | null)[] | {
|
|
299
|
+
[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;
|
|
300
|
+
} | null)[] | {
|
|
301
|
+
[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;
|
|
302
|
+
} | null)[] | {
|
|
303
|
+
[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;
|
|
304
|
+
} | 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 | {
|
|
305
|
+
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
306
|
+
} | null)[] | {
|
|
307
|
+
[key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
308
|
+
} | null)[] | {
|
|
309
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
310
|
+
} | null)[] | {
|
|
311
|
+
[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;
|
|
312
|
+
} | null)[] | {
|
|
313
|
+
[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;
|
|
314
|
+
} | null)[] | {
|
|
315
|
+
[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;
|
|
316
|
+
} | null)[] | {
|
|
317
|
+
[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;
|
|
318
|
+
} | null)[] | {
|
|
319
|
+
[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;
|
|
320
|
+
} | null)[] | {
|
|
321
|
+
[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;
|
|
322
|
+
} | null)[] | {
|
|
323
|
+
[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;
|
|
324
|
+
} | null)[] | {
|
|
325
|
+
[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;
|
|
326
|
+
} | null)[] | {
|
|
327
|
+
[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;
|
|
328
|
+
} | null, unknown>>;
|
|
329
|
+
variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
330
|
+
origin: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
331
|
+
runtime_config: "runtime_config";
|
|
332
|
+
trigger_context: "trigger_context";
|
|
333
|
+
provider_sync: "provider_sync";
|
|
334
|
+
api: "api";
|
|
335
|
+
}>>;
|
|
336
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
337
|
+
name: z.ZodMiniString<string>;
|
|
338
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
339
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
340
|
+
}, z.core.$strip>>;
|
|
341
|
+
status: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
342
|
+
reason: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
343
|
+
evaluatedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
344
|
+
}, z.core.$strip>>>;
|
|
345
|
+
capabilities: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
346
|
+
key: z.ZodMiniString<string>;
|
|
347
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
348
|
+
provider: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
349
|
+
name: z.ZodMiniString<string>;
|
|
350
|
+
project: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
351
|
+
environment: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
352
|
+
}, z.core.$strip>>;
|
|
353
|
+
}, z.core.$strip>>>;
|
|
354
|
+
}, z.core.$strip>>;
|
|
355
|
+
messageId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
356
|
+
timestamp: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
357
|
+
origin: z.ZodMiniLiteral<"customer">;
|
|
358
|
+
event: z.ZodMiniString<string>;
|
|
359
|
+
properties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniType<import("./app-event.js").AppEventJsonValue, unknown, z.core.$ZodTypeInternals<import("./app-event.js").AppEventJsonValue, unknown>>>>;
|
|
360
|
+
kind: z.ZodMiniLiteral<"track">;
|
|
361
|
+
}, z.core.$strip>], "kind">, z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
257
362
|
kind: z.ZodMiniLiteral<"identify">;
|
|
258
363
|
traits: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
|
|
364
|
+
options: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
365
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
366
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
367
|
+
type: z.ZodMiniString<string>;
|
|
368
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
369
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
370
|
+
}, z.core.$strip>>>;
|
|
371
|
+
}, z.core.$strict>>;
|
|
259
372
|
}, z.core.$strict>, z.ZodMiniObject<{
|
|
260
373
|
kind: z.ZodMiniLiteral<"identify">;
|
|
261
374
|
userId: z.ZodMiniString<string>;
|
|
262
375
|
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
376
|
+
options: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
377
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
378
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
379
|
+
type: z.ZodMiniString<string>;
|
|
380
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
381
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
382
|
+
}, z.core.$strip>>>;
|
|
383
|
+
}, z.core.$strict>>;
|
|
263
384
|
}, z.core.$strict>]>]>;
|
|
264
385
|
export type PublicCommandPayload = z.output<typeof publicCommandPayloadSchema>;
|
|
265
386
|
export type ContainerPolicy = z.output<typeof containerPolicySchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-commands.d.ts","sourceRoot":"","sources":["../src/widget-commands.ts"],"names":[],"mappings":"AAAA,OAA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|
|
1
1
|
import * as z from "zod/mini";
|
|
2
|
+
import { appEventCustomerTrackSchema, appEventExternalIdSchema, } from "./app-event.js";
|
|
2
3
|
import { configureOptionsSchema, initOptionsSchema, } from "./widget-config.js";
|
|
3
4
|
const flowHandleIdSchema = z.string().check(z.trim(), z.minLength(1));
|
|
4
5
|
const flowIdSchema = z.string().check(z.trim(), z.minLength(1));
|
|
@@ -14,6 +15,7 @@ const publicWidgetCommandKinds = [
|
|
|
14
15
|
"init",
|
|
15
16
|
"close",
|
|
16
17
|
"reset",
|
|
18
|
+
"track",
|
|
17
19
|
];
|
|
18
20
|
export const publicWidgetCommandKindSchema = z.enum(publicWidgetCommandKinds);
|
|
19
21
|
const isHTMLElementLike = (value) => {
|
|
@@ -34,15 +36,20 @@ const htmlElementOrNullSchema = z.custom((value) => value === null || isHTMLElem
|
|
|
34
36
|
message: "Container must be null or an HTMLElement with nodeType=1",
|
|
35
37
|
});
|
|
36
38
|
const identifyTraitsSchema = z.record(z.string(), z.unknown());
|
|
39
|
+
const identifyOptionsSchema = z.strictObject({
|
|
40
|
+
externalIds: z.optional(z.array(appEventExternalIdSchema).check(z.maxLength(20))),
|
|
41
|
+
});
|
|
37
42
|
const identifyPayloadSchema = z.union([
|
|
38
43
|
z.strictObject({
|
|
39
44
|
kind: z.literal("identify"),
|
|
40
45
|
traits: identifyTraitsSchema,
|
|
46
|
+
options: z.optional(identifyOptionsSchema),
|
|
41
47
|
}),
|
|
42
48
|
z.strictObject({
|
|
43
49
|
kind: z.literal("identify"),
|
|
44
50
|
userId: z.string().check(z.trim(), z.minLength(1)),
|
|
45
51
|
traits: z.optional(identifyTraitsSchema),
|
|
52
|
+
options: z.optional(identifyOptionsSchema),
|
|
46
53
|
}),
|
|
47
54
|
]);
|
|
48
55
|
// TODO(migration): After telemetry confirms no remaining `open.containerRequirement` in host command queues, remove the optional field and transform so unknown keys fail under `.strict()` again.
|
|
@@ -105,6 +112,9 @@ export const publicCommandPayloadSchema = z.union([
|
|
|
105
112
|
z.strictObject({
|
|
106
113
|
kind: z.literal("reset"),
|
|
107
114
|
}),
|
|
115
|
+
z.extend(appEventCustomerTrackSchema, {
|
|
116
|
+
kind: z.literal("track"),
|
|
117
|
+
}),
|
|
108
118
|
]),
|
|
109
119
|
identifyPayloadSchema,
|
|
110
120
|
]);
|
package/dist/widget-config.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import * as z from "zod/mini";
|
|
|
2
2
|
export declare const colorSchemeConfigInputSchema: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
3
3
|
autoDetectColorScheme: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
4
4
|
}, z.core.$strict>, z.ZodMiniEnum<{
|
|
5
|
+
system: "system";
|
|
5
6
|
light: "light";
|
|
6
7
|
dark: "dark";
|
|
7
|
-
system: "system";
|
|
8
8
|
}>]>;
|
|
9
9
|
export type ColorSchemeConfigInput = z.output<typeof colorSchemeConfigInputSchema>;
|
|
10
10
|
export declare const telemetryConfigInputSchema: z.ZodMiniObject<{
|
|
@@ -43,6 +43,12 @@ export declare const identityConfigInputSchema: z.ZodMiniObject<{
|
|
|
43
43
|
anonymousId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
44
44
|
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
45
45
|
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
46
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
47
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
48
|
+
type: z.ZodMiniString<string>;
|
|
49
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
50
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
51
|
+
}, z.core.$strip>>>;
|
|
46
52
|
}, z.core.$strip>;
|
|
47
53
|
export type IdentityConfigInput = z.output<typeof identityConfigInputSchema>;
|
|
48
54
|
export declare const flagsConfigInputSchema: z.ZodMiniArray<z.ZodMiniObject<{
|
|
@@ -128,9 +134,9 @@ export declare const configureOptionsSchema: z.ZodMiniObject<{
|
|
|
128
134
|
colorScheme: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
129
135
|
autoDetectColorScheme: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
130
136
|
}, z.core.$strict>, z.ZodMiniEnum<{
|
|
137
|
+
system: "system";
|
|
131
138
|
light: "light";
|
|
132
139
|
dark: "dark";
|
|
133
|
-
system: "system";
|
|
134
140
|
}>]>>;
|
|
135
141
|
consent: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
|
|
136
142
|
pending: "pending";
|
|
@@ -159,9 +165,9 @@ export declare const initOptionsSchema: z.ZodMiniObject<{
|
|
|
159
165
|
colorScheme: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
160
166
|
autoDetectColorScheme: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
161
167
|
}, z.core.$strict>, z.ZodMiniEnum<{
|
|
168
|
+
system: "system";
|
|
162
169
|
light: "light";
|
|
163
170
|
dark: "dark";
|
|
164
|
-
system: "system";
|
|
165
171
|
}>]>>;
|
|
166
172
|
disableTelemetry: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
167
173
|
enableDebug: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -310,9 +316,9 @@ export declare const instanceUpdateableConfigSchema: z.ZodMiniObject<{
|
|
|
310
316
|
colorScheme: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
311
317
|
autoDetectColorScheme: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
312
318
|
}, z.core.$strict>, z.ZodMiniEnum<{
|
|
319
|
+
system: "system";
|
|
313
320
|
light: "light";
|
|
314
321
|
dark: "dark";
|
|
315
|
-
system: "system";
|
|
316
322
|
}>]>>;
|
|
317
323
|
consent: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
|
|
318
324
|
pending: "pending";
|
|
@@ -338,6 +344,12 @@ export declare const instanceUpdateableConfigSchema: z.ZodMiniObject<{
|
|
|
338
344
|
anonymousId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
339
345
|
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
340
346
|
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
347
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
348
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
349
|
+
type: z.ZodMiniString<string>;
|
|
350
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
351
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
352
|
+
}, z.core.$strip>>>;
|
|
341
353
|
}, z.core.$strip>>;
|
|
342
354
|
}, z.core.$strict>;
|
|
343
355
|
export type InstanceUpdateableConfig = z.output<typeof instanceUpdateableConfigSchema>;
|
|
@@ -354,9 +366,9 @@ export declare const coreInstanceConfigSchema: z.ZodMiniObject<{
|
|
|
354
366
|
colorScheme: z.ZodMiniDefault<z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
355
367
|
autoDetectColorScheme: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
356
368
|
}, z.core.$strict>, z.ZodMiniEnum<{
|
|
369
|
+
system: "system";
|
|
357
370
|
light: "light";
|
|
358
371
|
dark: "dark";
|
|
359
|
-
system: "system";
|
|
360
372
|
}>]>>>;
|
|
361
373
|
disableTelemetry: z.ZodMiniDefault<z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>>;
|
|
362
374
|
enableDebug: z.ZodMiniDefault<z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>>;
|
|
@@ -384,6 +396,12 @@ export declare const coreInstanceConfigSchema: z.ZodMiniObject<{
|
|
|
384
396
|
anonymousId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
385
397
|
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
386
398
|
traits: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
399
|
+
externalIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
400
|
+
id: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>;
|
|
401
|
+
type: z.ZodMiniString<string>;
|
|
402
|
+
collection: z.ZodMiniLiteral<"users">;
|
|
403
|
+
encoding: z.ZodMiniLiteral<"none">;
|
|
404
|
+
}, z.core.$strip>>>;
|
|
387
405
|
}, z.core.$strip>>;
|
|
388
406
|
apiKey: z.ZodMiniString<string>;
|
|
389
407
|
clientMeta: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-config.d.ts","sourceRoot":"","sources":["../src/widget-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"widget-config.d.ts","sourceRoot":"","sources":["../src/widget-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAiB9B,eAAO,MAAM,4BAA4B;;;;;;IAKvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAC5C,OAAO,4BAA4B,CACnC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;iBAErC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAW5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,eAAO,MAAM,2BAA2B,EAAE,sBAEzC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAC9C,OAAO,8BAA8B,CACrC,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,2BAA2B,EAAE,CAAC,MAAM,wBAAwB,CAAC,EAKzE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAenC,CAAC;AAEH,0EAA0E;AAC1E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE/E,yDAAyD;AACzD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
package/dist/widget-config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from "zod/mini";
|
|
2
|
-
import { appEventCapabilitySchema, appEventFlagSchema } from "./app-event.js";
|
|
2
|
+
import { appEventCapabilitySchema, appEventExternalIdSchema, appEventFlagSchema, } from "./app-event.js";
|
|
3
3
|
import { clientMetaSchema } from "./client-meta.js";
|
|
4
4
|
import { DEFAULT_AUTO_DETECT_COLOR_SCHEME_ATTRS } from "./defaults.js";
|
|
5
5
|
import { runtimeEndpointsSchema } from "./runtime-endpoints.js";
|
|
@@ -36,6 +36,7 @@ export const identityConfigInputSchema = z.object({
|
|
|
36
36
|
anonymousId: z.optional(z.string().check(z.trim(), z.minLength(1))),
|
|
37
37
|
userId: z.optional(z.string().check(z.trim(), z.minLength(1))),
|
|
38
38
|
traits: z.optional(z.record(z.string(), z.unknown())),
|
|
39
|
+
externalIds: z.optional(z.array(appEventExternalIdSchema).check(z.maxLength(20))),
|
|
39
40
|
});
|
|
40
41
|
export const flagsConfigInputSchema = z.array(appEventFlagSchema);
|
|
41
42
|
export const hostCapabilitiesConfigInputSchema = z.array(appEventCapabilitySchema);
|