@getuserfeedback/protocol 0.10.2 → 1.1.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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/scopes.d.ts +2 -2
- package/dist/version-resolution.d.ts +1 -1
- package/dist/version-resolution.js +1 -1
- package/dist/webview-transport.d.ts +2016 -0
- package/dist/webview-transport.d.ts.map +1 -0
- package/dist/webview-transport.js +155 -0
- package/dist/widget-commands.d.ts +5 -5
- package/dist/widget-config.d.ts +10 -10
- package/package.json +6 -6
- package/src/index.ts +12 -8
- package/src/protocol-root.test.ts +167 -68
- package/src/version-resolution.ts +1 -1
- package/src/webview-transport.ts +196 -0
- package/dist/mobile-bridge.d.ts +0 -439
- package/dist/mobile-bridge.d.ts.map +0 -1
- package/dist/mobile-bridge.js +0 -74
- package/src/mobile-bridge.ts +0 -95
package/dist/index.d.ts
CHANGED
|
@@ -5,12 +5,12 @@ export type { ErrorEvent, ProtocolErrorCode } from "./errors.js";
|
|
|
5
5
|
export { ErrorCategory, ErrorCategorySchema, ErrorEventSchema, ProtocolError, } from "./errors.js";
|
|
6
6
|
export { type ClaimPendingFlowAssignmentsRequest, type ClaimPendingFlowAssignmentsResponse, claimPendingFlowAssignmentsRequestSchema, claimPendingFlowAssignmentsResponseSchema, type FlowAssignmentExternalIdIdentityTypeValue, type FlowAssignmentIdentityTypeValue, type FlowAssignmentRecipientRequest, type FlowAssignmentRecord, type FlowAssignmentStatus, type FlowAssignmentTargetingContext, flowAssignmentRecipientRequestSchema, flowAssignmentRecordSchema, flowAssignmentStatusSchema, flowAssignmentTargetingContextSchema, type ListPendingFlowAssignmentsResponse, listPendingFlowAssignmentsResponseSchema, nullableUpdateFlowAssignmentLifecycleResponseSchema, type ReleaseFlowAssignmentClaimRequest, type ReleaseFlowAssignmentClaimResponse, releaseFlowAssignmentClaimRequestSchema, releaseFlowAssignmentClaimResponseSchema, type UpdateFlowAssignmentLifecycleRequest, type UpdateFlowAssignmentLifecycleResponse, updateFlowAssignmentLifecycleRequestSchema, updateFlowAssignmentLifecycleResponseSchema, } from "./flow-assignments.js";
|
|
7
7
|
export { buildIdentityTypeGuidanceMessage, getIdentityTypeSuggestion, IDENTITY_TYPE_VALUES, type IdentityTypeValue, isIdentityTypeValue, type StandardIdentityTypeValue, } from "./identity-type.js";
|
|
8
|
-
export { type MobileBridgeNativeMessage, type MobileBridgeWebMessage, mobileBridgeNativeMessageSchema, mobileBridgeWebMessageSchema, parseMobileBridgeNativeMessage, parseMobileBridgeWebMessage, } from "./mobile-bridge.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, type ScopeMeta, scopeIdSchema, } from "./scopes.js";
|
|
12
11
|
export { type TrpcSuccessResponse, trpcSuccessResponseSchema, } from "./trpc-envelope.js";
|
|
13
12
|
export { type FlowVersionResolution, flowVersionResolutionSchema, type ThemeVersionResolution, themeVersionResolutionSchema, } from "./version-resolution.js";
|
|
13
|
+
export { parseWebViewTransportNativeMessage, parseWebViewTransportWebMessage, type WebViewCommandEnvelope, type WebViewTransportHostEvent, type WebViewTransportNativeMessage, type WebViewTransportWebMessage, webViewCommandEnvelopeSchema, webViewTransportHostEventSchema, webViewTransportNativeMessageSchema, webViewTransportWebMessageSchema, } from "./webview-transport.js";
|
|
14
14
|
export { type PublicCommandPayload, parseConfigureOptions, parseInitOptions, parsePublicCommand, publicCommandPayloadSchema, publicWidgetCommandKindSchema, } from "./widget-commands.js";
|
|
15
15
|
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
16
|
//# 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,EACvB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,2BAA2B,EAC3B,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,2BAA2B,EAC3B,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,2BAA2B,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,KAAK,UAAU,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sCAAsC,EAAE,MAAM,eAAe,CAAC;AACvE,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EACN,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,KAAK,kCAAkC,EACvC,KAAK,mCAAm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AAO,EACN,kCAAkC,EAClC,+BAA+B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAC/B,4BAA4B,EAC5B,+BAA+B,EAC/B,mCAAmC,EACnC,gCAAgC,GAChC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,KAAK,oBAAoB,EACzB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,EAC1B,6BAA6B,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,4BAA4B,EAC5B,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,gBAAgB,EACrB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,sBAAsB,EACtB,KAAK,2BAA2B,EAChC,iCAAiC,EACjC,KAAK,mBAAmB,EACxB,2BAA2B,EAC3B,KAAK,WAAW,EAChB,KAAK,wBAAwB,EAC7B,yBAAyB,EACzB,iBAAiB,EACjB,8BAA8B,EAC9B,KAAK,oBAAoB,EACzB,0BAA0B,GAC1B,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,11 +4,11 @@ export { DEFAULT_AUTO_DETECT_COLOR_SCHEME_ATTRS } from "./defaults.js";
|
|
|
4
4
|
export { ErrorCategory, ErrorCategorySchema, ErrorEventSchema, ProtocolError, } from "./errors.js";
|
|
5
5
|
export { claimPendingFlowAssignmentsRequestSchema, claimPendingFlowAssignmentsResponseSchema, flowAssignmentRecipientRequestSchema, flowAssignmentRecordSchema, flowAssignmentStatusSchema, flowAssignmentTargetingContextSchema, listPendingFlowAssignmentsResponseSchema, nullableUpdateFlowAssignmentLifecycleResponseSchema, releaseFlowAssignmentClaimRequestSchema, releaseFlowAssignmentClaimResponseSchema, updateFlowAssignmentLifecycleRequestSchema, updateFlowAssignmentLifecycleResponseSchema, } from "./flow-assignments.js";
|
|
6
6
|
export { buildIdentityTypeGuidanceMessage, getIdentityTypeSuggestion, IDENTITY_TYPE_VALUES, isIdentityTypeValue, } from "./identity-type.js";
|
|
7
|
-
export { mobileBridgeNativeMessageSchema, mobileBridgeWebMessageSchema, parseMobileBridgeNativeMessage, parseMobileBridgeWebMessage, } from "./mobile-bridge.js";
|
|
8
7
|
export { isPublicGrantScope, publicGrantScopeIdSchema, } from "./public-grant-scope.js";
|
|
9
8
|
export { resolveApiBaseUrl, resolveCoreUrl, resolveTrpcBaseUrl, runtimeEndpointsSchema, } from "./runtime-endpoints.js";
|
|
10
9
|
export { getScopeMeta, isScope, listScopes, SCOPE_IDS, scopeIdSchema, } from "./scopes.js";
|
|
11
10
|
export { trpcSuccessResponseSchema, } from "./trpc-envelope.js";
|
|
12
11
|
export { flowVersionResolutionSchema, themeVersionResolutionSchema, } from "./version-resolution.js";
|
|
12
|
+
export { parseWebViewTransportNativeMessage, parseWebViewTransportWebMessage, webViewCommandEnvelopeSchema, webViewTransportHostEventSchema, webViewTransportNativeMessageSchema, webViewTransportWebMessageSchema, } from "./webview-transport.js";
|
|
13
13
|
export { parseConfigureOptions, parseInitOptions, parsePublicCommand, publicCommandPayloadSchema, publicWidgetCommandKindSchema, } from "./widget-commands.js";
|
|
14
14
|
export { authConfigInputSchema, authJwtConfigInputSchema, colorSchemeConfigInputSchema, configureOptionsSchema, consentConfigInputSchema, coreInstanceConfigSchema, debugInputSchema, flagsConfigInputSchema, hostCapabilitiesConfigInputSchema, INSTANCE_CONFIG_UPDATE_KEYS, identityConfigInputSchema, initOptionsSchema, instanceUpdateableConfigSchema, telemetryConfigInputSchema, } from "./widget-config.js";
|
package/dist/scopes.d.ts
CHANGED
|
@@ -10,14 +10,14 @@ export declare const SCOPE_IDS: readonly [
|
|
|
10
10
|
"ads.personalization"
|
|
11
11
|
];
|
|
12
12
|
export declare const scopeIdSchema: z.ZodMiniEnum<{
|
|
13
|
-
"functionality.storage": "functionality.storage";
|
|
14
|
-
"security.storage": "security.storage";
|
|
15
13
|
"analytics.storage": "analytics.storage";
|
|
16
14
|
"analytics.measurement": "analytics.measurement";
|
|
17
15
|
"personalization.storage": "personalization.storage";
|
|
18
16
|
"ads.storage": "ads.storage";
|
|
19
17
|
"ads.user_data": "ads.user_data";
|
|
20
18
|
"ads.personalization": "ads.personalization";
|
|
19
|
+
"functionality.storage": "functionality.storage";
|
|
20
|
+
"security.storage": "security.storage";
|
|
21
21
|
}>;
|
|
22
22
|
export type Scope = (typeof SCOPE_IDS)[number];
|
|
23
23
|
export declare function isScope(value: unknown): value is Scope;
|
|
@@ -3,7 +3,7 @@ export declare const flowVersionResolutionSchema: z.ZodMiniObject<{
|
|
|
3
3
|
flowVersionId: z.ZodMiniString<string>;
|
|
4
4
|
}, z.core.$strip>;
|
|
5
5
|
export declare const themeVersionResolutionSchema: z.ZodMiniObject<{
|
|
6
|
-
themeRuntimeArtifactId: z.
|
|
6
|
+
themeRuntimeArtifactId: z.ZodMiniString<string>;
|
|
7
7
|
themeVersionId: z.ZodMiniString<string>;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
9
|
export type FlowVersionResolution = z.output<typeof flowVersionResolutionSchema>;
|
|
@@ -4,6 +4,6 @@ export const flowVersionResolutionSchema = z.object({
|
|
|
4
4
|
flowVersionId: versionIdSchema,
|
|
5
5
|
});
|
|
6
6
|
export const themeVersionResolutionSchema = z.object({
|
|
7
|
-
themeRuntimeArtifactId:
|
|
7
|
+
themeRuntimeArtifactId: versionIdSchema,
|
|
8
8
|
themeVersionId: versionIdSchema,
|
|
9
9
|
});
|