@getuserfeedback/protocol 0.4.0 → 0.4.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.
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/scopes.d.ts +1 -0
- package/dist/scopes.d.ts.map +1 -1
- package/dist/scopes.js +3 -0
- package/dist/widget-config.d.ts +10 -0
- package/dist/widget-config.d.ts.map +1 -1
- package/dist/widget-config.js +4 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export { type ClientMeta, clientMetaSchema, } from "./client-meta.js";
|
|
1
2
|
export { DEFAULT_AUTO_DETECT_COLOR_SCHEME_ATTRS } from "./defaults.js";
|
|
2
|
-
export { getScopeMeta, listScopes, SCOPE_IDS, type Scope, scopeIdSchema, } from "./scopes.js";
|
|
3
|
+
export { getScopeMeta, isScope, listScopes, SCOPE_IDS, type Scope, scopeIdSchema, } from "./scopes.js";
|
|
3
4
|
export { type FlowVersionResolution, flowVersionResolutionSchema, type ThemeVersionResolution, themeVersionResolutionSchema, } from "./version-resolution.js";
|
|
4
5
|
export { type PublicCommandPayload, parseConfigureOptions, parseInitOptions, parsePublicCommand, publicCommandPayloadSchema, } from "./widget-commands.js";
|
|
5
|
-
export { type ColorSchemeConfigInput, type ConfigureOptions, colorSchemeConfigInputSchema, configureOptionsSchema, consentConfigInputSchema, type InitOptions, initOptionsSchema, } from "./widget-config.js";
|
|
6
|
+
export { type ColorSchemeConfigInput, type ConfigureOptions, colorSchemeConfigInputSchema, configureOptionsSchema, consentConfigInputSchema, type InitOptions, initOptionsSchema, isPublicGrantScope, type PublicGrantScope, publicGrantScopeIdSchema, } from "./widget-config.js";
|
|
6
7
|
//# 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,EAAE,sCAAsC,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EACN,YAAY,EACZ,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,
|
|
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"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
export { clientMetaSchema, } from "./client-meta.js";
|
|
1
2
|
export { DEFAULT_AUTO_DETECT_COLOR_SCHEME_ATTRS } from "./defaults.js";
|
|
2
|
-
export { getScopeMeta, listScopes, SCOPE_IDS, scopeIdSchema, } from "./scopes.js";
|
|
3
|
+
export { getScopeMeta, isScope, listScopes, SCOPE_IDS, scopeIdSchema, } from "./scopes.js";
|
|
3
4
|
export { flowVersionResolutionSchema, themeVersionResolutionSchema, } from "./version-resolution.js";
|
|
4
5
|
export { parseConfigureOptions, parseInitOptions, parsePublicCommand, publicCommandPayloadSchema, } from "./widget-commands.js";
|
|
5
|
-
export { colorSchemeConfigInputSchema, configureOptionsSchema, consentConfigInputSchema, initOptionsSchema, } from "./widget-config.js";
|
|
6
|
+
export { colorSchemeConfigInputSchema, configureOptionsSchema, consentConfigInputSchema, initOptionsSchema, isPublicGrantScope, publicGrantScopeIdSchema, } from "./widget-config.js";
|
package/dist/scopes.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export declare const scopeIdSchema: z.ZodEnum<{
|
|
|
20
20
|
"ads.personalization": "ads.personalization";
|
|
21
21
|
}>;
|
|
22
22
|
export type Scope = (typeof SCOPE_IDS)[number];
|
|
23
|
+
export declare function isScope(value: unknown): value is Scope;
|
|
23
24
|
export type ScopeMeta = {
|
|
24
25
|
description: string;
|
|
25
26
|
};
|
package/dist/scopes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,SAAS,EAAE,SAAS;IAChC,uBAAuB;IACvB,kBAAkB;IAClB,mBAAmB;IACnB,uBAAuB;IACvB,yBAAyB;IACzB,aAAa;IACb,eAAe;IACf,qBAAqB;CAUrB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;EAAoB,CAAC;AAE/C,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/C,MAAM,MAAM,SAAS,GAAG;IACvB,WAAW,EAAE,MAAM,CAAC;CACpB,CAAC;AAqCF,wBAAgB,YAAY,CAAC,EAAE,EAAE,KAAK,GAAG,SAAS,CAEjD;AAED,wBAAgB,UAAU,IAAI,aAAa,CAAC;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,GAAG,SAAS,CAAC,CAKrE"}
|
|
1
|
+
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,SAAS,EAAE,SAAS;IAChC,uBAAuB;IACvB,kBAAkB;IAClB,mBAAmB;IACnB,uBAAuB;IACvB,yBAAyB;IACzB,aAAa;IACb,eAAe;IACf,qBAAqB;CAUrB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;EAAoB,CAAC;AAE/C,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/C,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAEtD;AAED,MAAM,MAAM,SAAS,GAAG;IACvB,WAAW,EAAE,MAAM,CAAC;CACpB,CAAC;AAqCF,wBAAgB,YAAY,CAAC,EAAE,EAAE,KAAK,GAAG,SAAS,CAEjD;AAED,wBAAgB,UAAU,IAAI,aAAa,CAAC;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,GAAG,SAAS,CAAC,CAKrE"}
|
package/dist/scopes.js
CHANGED
|
@@ -10,6 +10,9 @@ export const SCOPE_IDS = [
|
|
|
10
10
|
"ads.personalization",
|
|
11
11
|
];
|
|
12
12
|
export const scopeIdSchema = z.enum(SCOPE_IDS);
|
|
13
|
+
export function isScope(value) {
|
|
14
|
+
return scopeIdSchema.safeParse(value).success;
|
|
15
|
+
}
|
|
13
16
|
const scopeMetaById = {
|
|
14
17
|
"functionality.storage": {
|
|
15
18
|
description: "Allow essential storage for core widget behavior (e.g., frequency capping, dismissals, draft answers).",
|
package/dist/widget-config.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
+
export declare const publicGrantScopeIdSchema: z.ZodEnum<{
|
|
3
|
+
"analytics.storage": "analytics.storage";
|
|
4
|
+
"analytics.measurement": "analytics.measurement";
|
|
5
|
+
"personalization.storage": "personalization.storage";
|
|
6
|
+
"ads.storage": "ads.storage";
|
|
7
|
+
"ads.user_data": "ads.user_data";
|
|
8
|
+
"ads.personalization": "ads.personalization";
|
|
9
|
+
}>;
|
|
10
|
+
export type PublicGrantScope = z.infer<typeof publicGrantScopeIdSchema>;
|
|
11
|
+
export declare function isPublicGrantScope(value: unknown): value is PublicGrantScope;
|
|
2
12
|
export declare const colorSchemeConfigInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
3
13
|
autoDetectColorScheme: z.ZodArray<z.ZodString>;
|
|
4
14
|
}, z.core.$strict>, z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-config.d.ts","sourceRoot":"","sources":["../src/widget-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"widget-config.d.ts","sourceRoot":"","sources":["../src/widget-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AA2BzB,eAAO,MAAM,wBAAwB;;;;;;;EAA8B,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAExE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E;AAED,eAAO,MAAM,4BAA4B;;;;;;IAOvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAC5C,OAAO,4BAA4B,CACnC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;KAGnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE3E,eAAO,MAAM,gBAAgB,2EAI3B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;iBAShC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMzB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEvE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAWpB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,eAAO,MAAM,2BAA2B,EAAE,sBAEzC,CAAC"}
|
package/dist/widget-config.js
CHANGED
|
@@ -14,7 +14,10 @@ const publicGrantScopeIds = [
|
|
|
14
14
|
"ads.user_data",
|
|
15
15
|
"ads.personalization",
|
|
16
16
|
];
|
|
17
|
-
const publicGrantScopeIdSchema = z.enum(publicGrantScopeIds);
|
|
17
|
+
export const publicGrantScopeIdSchema = z.enum(publicGrantScopeIds);
|
|
18
|
+
export function isPublicGrantScope(value) {
|
|
19
|
+
return publicGrantScopeIdSchema.safeParse(value).success;
|
|
20
|
+
}
|
|
18
21
|
export const colorSchemeConfigInputSchema = z.union([
|
|
19
22
|
z
|
|
20
23
|
.object({
|