@kya-os/consent 0.1.47 → 0.1.48
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/README.md +89 -0
- package/dist/bundle/index.d.ts +2 -0
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +1 -0
- package/dist/bundle/index.js.map +1 -1
- package/dist/bundle/inline.d.ts.map +1 -1
- package/dist/bundle/inline.js +4 -4
- package/dist/bundle/inline.js.map +1 -1
- package/dist/capabilities/registry.d.ts.map +1 -1
- package/dist/capabilities/registry.js +5 -1
- package/dist/capabilities/registry.js.map +1 -1
- package/dist/cedar/compile.d.ts +67 -2
- package/dist/cedar/compile.d.ts.map +1 -1
- package/dist/cedar/compile.js +34 -5
- package/dist/cedar/compile.js.map +1 -1
- package/dist/cedar/index.d.ts +1 -0
- package/dist/cedar/index.d.ts.map +1 -1
- package/dist/cedar/index.js.map +1 -1
- package/dist/cjs/bundle/index.js +3 -1
- package/dist/cjs/bundle/index.js.map +1 -1
- package/dist/cjs/bundle/inline.js +4 -4
- package/dist/cjs/bundle/inline.js.map +1 -1
- package/dist/cjs/capabilities/registry.js +5 -1
- package/dist/cjs/capabilities/registry.js.map +1 -1
- package/dist/cjs/cedar/compile.js +34 -5
- package/dist/cjs/cedar/compile.js.map +1 -1
- package/dist/cjs/cedar/index.js.map +1 -1
- package/dist/cjs/components/consent-action-bar.js +16 -5
- package/dist/cjs/components/consent-action-bar.js.map +1 -1
- package/dist/cjs/components/consent-capabilities-screen.js +92 -37
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-capability-card.js +35 -4
- package/dist/cjs/components/consent-capability-card.js.map +1 -1
- package/dist/cjs/components/mcp-consent.js +37 -27
- package/dist/cjs/components/mcp-consent.js.map +1 -1
- package/dist/cjs/constants/capabilities.js +10 -0
- package/dist/cjs/constants/capabilities.js.map +1 -0
- package/dist/cjs/constants/index.js +3 -1
- package/dist/cjs/constants/index.js.map +1 -1
- package/dist/cjs/mcp-app/inline.js +2 -2
- package/dist/cjs/mcp-app/inline.js.map +1 -1
- package/dist/cjs/resolution/credential-capabilities.js.map +1 -1
- package/dist/cjs/resolution/selected-capabilities.js +73 -0
- package/dist/cjs/resolution/selected-capabilities.js.map +1 -0
- package/dist/cjs/schemas/capabilities.schemas.js +14 -2
- package/dist/cjs/schemas/capabilities.schemas.js.map +1 -1
- package/dist/cjs/types/capabilities.types.js +55 -0
- package/dist/cjs/types/capabilities.types.js.map +1 -1
- package/dist/components/consent-action-bar.d.ts +2 -0
- package/dist/components/consent-action-bar.d.ts.map +1 -1
- package/dist/components/consent-action-bar.js +16 -5
- package/dist/components/consent-action-bar.js.map +1 -1
- package/dist/components/consent-capabilities-screen.d.ts +18 -5
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +92 -37
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-capability-card.d.ts +2 -0
- package/dist/components/consent-capability-card.d.ts.map +1 -1
- package/dist/components/consent-capability-card.js +35 -4
- package/dist/components/consent-capability-card.js.map +1 -1
- package/dist/components/mcp-consent.d.ts +3 -0
- package/dist/components/mcp-consent.d.ts.map +1 -1
- package/dist/components/mcp-consent.js +37 -27
- package/dist/components/mcp-consent.js.map +1 -1
- package/dist/consent.js +221 -46
- package/dist/consent.min.js +193 -146
- package/dist/constants/capabilities.d.ts +7 -0
- package/dist/constants/capabilities.d.ts.map +1 -0
- package/dist/constants/capabilities.js +7 -0
- package/dist/constants/capabilities.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/mcp-app/inline.d.ts.map +1 -1
- package/dist/mcp-app/inline.js +2 -2
- package/dist/mcp-app/inline.js.map +1 -1
- package/dist/resolution/credential-capabilities.d.ts +2 -2
- package/dist/resolution/credential-capabilities.d.ts.map +1 -1
- package/dist/resolution/credential-capabilities.js.map +1 -1
- package/dist/resolution/selected-capabilities.d.ts +26 -0
- package/dist/resolution/selected-capabilities.d.ts.map +1 -0
- package/dist/resolution/selected-capabilities.js +69 -0
- package/dist/resolution/selected-capabilities.js.map +1 -0
- package/dist/schemas/api.schemas.d.ts +88 -68
- package/dist/schemas/api.schemas.d.ts.map +1 -1
- package/dist/schemas/branding.schemas.d.ts +2 -2
- package/dist/schemas/capabilities.schemas.d.ts +58 -12
- package/dist/schemas/capabilities.schemas.d.ts.map +1 -1
- package/dist/schemas/capabilities.schemas.js +14 -2
- package/dist/schemas/capabilities.schemas.js.map +1 -1
- package/dist/schemas/config.schemas.d.ts +140 -100
- package/dist/schemas/config.schemas.d.ts.map +1 -1
- package/dist/types/capabilities.types.d.ts +69 -0
- package/dist/types/capabilities.types.d.ts.map +1 -1
- package/dist/types/capabilities.types.js +53 -1
- package/dist/types/capabilities.types.js.map +1 -1
- package/package.json +6 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline.js","sourceRoot":"","sources":["../../src/mcp-app/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,sEAAsE;AACtE,MAAM,CAAC,MAAM,oBAAoB,GAAW,
|
|
1
|
+
{"version":3,"file":"inline.js","sourceRoot":"","sources":["../../src/mcp-app/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,sEAAsE;AACtE,MAAM,CAAC,MAAM,oBAAoB,GAAW,mnxvBAAmnxvB,CAAC;AAEhqxvB,4CAA4C;AAC5C,MAAM,CAAC,MAAM,yBAAyB,GAAW,MAAM,CAAC"}
|
|
@@ -26,7 +26,7 @@ export declare function shouldRenderScopesInteractive(identityAssertion: string
|
|
|
26
26
|
* granted, so all ids are returned; otherwise the operator's `defaultOn` seeds
|
|
27
27
|
* the initial selection.
|
|
28
28
|
*/
|
|
29
|
-
export declare function capabilityIdsFor(capabilities: Capability
|
|
29
|
+
export declare function capabilityIdsFor(capabilities: ReadonlyArray<Pick<Capability, "id" | "defaultOn">>, disclosureMode: boolean): string[];
|
|
30
30
|
/**
|
|
31
31
|
* Identity of a seeding decision: the capability ids in order, plus the
|
|
32
32
|
* all-selected flag. Lit compares properties by reference, so a parent that
|
|
@@ -34,5 +34,5 @@ export declare function capabilityIdsFor(capabilities: Capability[], disclosureM
|
|
|
34
34
|
* wipe the user's toggles) on every keystroke. Seeding is keyed on this value
|
|
35
35
|
* instead of array identity.
|
|
36
36
|
*/
|
|
37
|
-
export declare function capabilitySeedKey(capabilities: Capability
|
|
37
|
+
export declare function capabilitySeedKey(capabilities: ReadonlyArray<Pick<Capability, "id" | "defaultOn">>, allSelected: boolean): string;
|
|
38
38
|
//# sourceMappingURL=credential-capabilities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-capabilities.d.ts","sourceRoot":"","sources":["../../src/resolution/credential-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAYjE,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,QAAQ,EACd,eAAe,EAAE,MAAM,GACtB,OAAO,CAET;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAEnE;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAKT;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAC3C,iBAAiB,EAAE,MAAM,GAAG,SAAS,GACpC,OAAO,CAET;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"credential-capabilities.d.ts","sourceRoot":"","sources":["../../src/resolution/credential-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAYjE,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,QAAQ,EACd,eAAe,EAAE,MAAM,GACtB,OAAO,CAET;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAEnE;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAKT;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAC3C,iBAAiB,EAAE,MAAM,GAAG,SAAS,GACpC,OAAO,CAET;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,WAAW,CAAC,CAAC,EACjE,cAAc,EAAE,OAAO,GACtB,MAAM,EAAE,CAIV;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,WAAW,CAAC,CAAC,EACjE,WAAW,EAAE,OAAO,GACnB,MAAM,CAER"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-capabilities.js","sourceRoot":"","sources":["../../src/resolution/credential-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,yBAAyB,CAAC;AAGpE;;;;GAIG;AACH,MAAM,uBAAuB,GAAwB;IACnD,UAAU,CAAC,YAAY;IACvB,UAAU,CAAC,WAAW;CACvB,CAAC;AAEF,MAAM,UAAU,4BAA4B,CAC1C,IAAc,EACd,eAAuB;IAEvB,OAAO,eAAe,GAAG,CAAC,IAAI,uBAAuB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACvE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,IAAc;IACxD,OAAO,IAAI,KAAK,UAAU,CAAC,WAAW,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,QAAgC;IAEhC,OAAO,CACL,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC;QAC3C,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAC5C,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,6BAA6B,CAC3C,iBAAqC;IAErC,OAAO,CAAC,iBAAiB,CAAC;AAC5B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,
|
|
1
|
+
{"version":3,"file":"credential-capabilities.js","sourceRoot":"","sources":["../../src/resolution/credential-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,yBAAyB,CAAC;AAGpE;;;;GAIG;AACH,MAAM,uBAAuB,GAAwB;IACnD,UAAU,CAAC,YAAY;IACvB,UAAU,CAAC,WAAW;CACvB,CAAC;AAEF,MAAM,UAAU,4BAA4B,CAC1C,IAAc,EACd,eAAuB;IAEvB,OAAO,eAAe,GAAG,CAAC,IAAI,uBAAuB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACvE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,IAAc;IACxD,OAAO,IAAI,KAAK,UAAU,CAAC,WAAW,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,QAAgC;IAEhC,OAAO,CACL,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC;QAC3C,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAC5C,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,6BAA6B,CAC3C,iBAAqC;IAErC,OAAO,CAAC,iBAAiB,CAAC;AAC5B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,YAAiE,EACjE,cAAuB;IAEvB,OAAO,YAAY;SAChB,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,cAAc,IAAI,UAAU,CAAC,SAAS,CAAC;SAC9D,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;AACxC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAC/B,YAAiE,EACjE,WAAoB;IAEpB,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Capability } from "../types/capabilities.types.js";
|
|
2
|
+
type ScopeCapability = Pick<Capability, "id" | "scopes"> & {
|
|
3
|
+
cedar?: string;
|
|
4
|
+
};
|
|
5
|
+
export type RequestedCapabilities<T extends ScopeCapability> = {
|
|
6
|
+
ok: true;
|
|
7
|
+
capabilities: T[];
|
|
8
|
+
} | {
|
|
9
|
+
ok: false;
|
|
10
|
+
error: string;
|
|
11
|
+
};
|
|
12
|
+
type SelectionResult = {
|
|
13
|
+
ok: true;
|
|
14
|
+
scopes: string[];
|
|
15
|
+
} | {
|
|
16
|
+
ok: false;
|
|
17
|
+
error: string;
|
|
18
|
+
};
|
|
19
|
+
/** Project a registry or project catalog onto this request before disclosure.
|
|
20
|
+
* Never rewrite a broader Cedar template as if it were an exact grant policy. */
|
|
21
|
+
export declare function projectRequestedCapabilities<T extends ScopeCapability>(requestedScopes: string[], capabilities: T[]): RequestedCapabilities<T>;
|
|
22
|
+
/** Derive the posted scope set from the reviewed capability IDs, without aliases
|
|
23
|
+
* or implicit widening. An assertion-bound or credential grant is indivisible. */
|
|
24
|
+
export declare function resolveCapabilitySelection(requestedScopes: string[], capabilities: ScopeCapability[], detail: unknown, requireAll?: boolean): SelectionResult;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=selected-capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selected-capabilities.d.ts","sourceRoot":"","sources":["../../src/resolution/selected-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,KAAK,eAAe,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,QAAQ,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC9E,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,eAAe,IACvD;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,YAAY,EAAE,CAAC,EAAE,CAAA;CAAE,GAC/B;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AACjC,KAAK,eAAe,GAChB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAC9B;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAcjC;iFACiF;AACjF,wBAAgB,4BAA4B,CAAC,CAAC,SAAS,eAAe,EACpE,eAAe,EAAE,MAAM,EAAE,EACzB,YAAY,EAAE,CAAC,EAAE,GAChB,qBAAqB,CAAC,CAAC,CAAC,CA2B1B;AAED;kFACkF;AAClF,wBAAgB,0BAA0B,CACxC,eAAe,EAAE,MAAM,EAAE,EACzB,YAAY,EAAE,eAAe,EAAE,EAC/B,MAAM,EAAE,OAAO,EACf,UAAU,UAAQ,GACjB,eAAe,CA0BjB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const MAPPING_ERROR = "The displayed capability scopes do not match the requested permissions. Contact the service operator.";
|
|
2
|
+
const SELECTION_ERROR = "Select at least one listed permission.";
|
|
3
|
+
function strings(value) {
|
|
4
|
+
return Array.isArray(value) && value.every((item) => typeof item === "string" && item.length > 0);
|
|
5
|
+
}
|
|
6
|
+
function sameSet(left, right) {
|
|
7
|
+
return left.size === right.size && [...left].every((value) => right.has(value));
|
|
8
|
+
}
|
|
9
|
+
/** Project a registry or project catalog onto this request before disclosure.
|
|
10
|
+
* Never rewrite a broader Cedar template as if it were an exact grant policy. */
|
|
11
|
+
export function projectRequestedCapabilities(requestedScopes, capabilities) {
|
|
12
|
+
if (!strings(requestedScopes) || requestedScopes.length === 0 ||
|
|
13
|
+
capabilities.length === 0 || capabilities.some((capability) => !capability || typeof capability.id !== "string" || !capability.id ||
|
|
14
|
+
!strings(capability.scopes) || capability.scopes.length === 0)) {
|
|
15
|
+
return { ok: false, error: MAPPING_ERROR };
|
|
16
|
+
}
|
|
17
|
+
const knownIds = new Set(capabilities.map((capability) => capability.id));
|
|
18
|
+
const requested = new Set(requestedScopes);
|
|
19
|
+
const disclosed = new Set(capabilities.flatMap((capability) => capability.scopes));
|
|
20
|
+
// Credential session keys hash the requested array, including duplicates.
|
|
21
|
+
// Reject ambiguous requests instead of silently normalizing their key.
|
|
22
|
+
if (requested.size !== requestedScopes.length ||
|
|
23
|
+
knownIds.size !== capabilities.length || [...requested].some((scope) => !disclosed.has(scope))) {
|
|
24
|
+
return { ok: false, error: MAPPING_ERROR };
|
|
25
|
+
}
|
|
26
|
+
const projected = capabilities.flatMap((capability) => {
|
|
27
|
+
const scopes = requestedScopes.filter((scope) => capability.scopes.includes(scope));
|
|
28
|
+
if (scopes.length === 0)
|
|
29
|
+
return [];
|
|
30
|
+
return [{
|
|
31
|
+
...capability,
|
|
32
|
+
scopes,
|
|
33
|
+
// Keep the operator's exact policy only when its full scope set applies.
|
|
34
|
+
cedar: scopes.length === new Set(capability.scopes).size ? capability.cedar : "",
|
|
35
|
+
}];
|
|
36
|
+
});
|
|
37
|
+
return { ok: true, capabilities: projected };
|
|
38
|
+
}
|
|
39
|
+
/** Derive the posted scope set from the reviewed capability IDs, without aliases
|
|
40
|
+
* or implicit widening. An assertion-bound or credential grant is indivisible. */
|
|
41
|
+
export function resolveCapabilitySelection(requestedScopes, capabilities, detail, requireAll = false) {
|
|
42
|
+
const projection = projectRequestedCapabilities(requestedScopes, capabilities);
|
|
43
|
+
if (!projection.ok)
|
|
44
|
+
return projection;
|
|
45
|
+
const requestedCapabilities = projection.capabilities;
|
|
46
|
+
const knownIds = new Set(requestedCapabilities.map((capability) => capability.id));
|
|
47
|
+
if (!detail || typeof detail !== "object" ||
|
|
48
|
+
!("selectedCapabilityIds" in detail) || !strings(detail.selectedCapabilityIds) ||
|
|
49
|
+
!("selectedScopes" in detail) || !strings(detail.selectedScopes)) {
|
|
50
|
+
return { ok: false, error: SELECTION_ERROR };
|
|
51
|
+
}
|
|
52
|
+
const selectedIds = new Set(detail.selectedCapabilityIds);
|
|
53
|
+
if (selectedIds.size === 0 || selectedIds.size !== detail.selectedCapabilityIds.length ||
|
|
54
|
+
[...selectedIds].some((id) => !knownIds.has(id))) {
|
|
55
|
+
return { ok: false, error: SELECTION_ERROR };
|
|
56
|
+
}
|
|
57
|
+
if (requireAll && selectedIds.size !== knownIds.size) {
|
|
58
|
+
return { ok: false, error: "This grant requires every listed permission. Select all permissions or deny the request." };
|
|
59
|
+
}
|
|
60
|
+
const selectedScopes = new Set(requestedCapabilities
|
|
61
|
+
.filter((capability) => selectedIds.has(capability.id))
|
|
62
|
+
.flatMap((capability) => capability.scopes));
|
|
63
|
+
if (!sameSet(selectedScopes, new Set(detail.selectedScopes))) {
|
|
64
|
+
return { ok: false, error: SELECTION_ERROR };
|
|
65
|
+
}
|
|
66
|
+
// Preserve the canonical request ordering used by credential session keys.
|
|
67
|
+
return { ok: true, scopes: requestedScopes.filter((scope) => selectedScopes.has(scope)) };
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=selected-capabilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selected-capabilities.js","sourceRoot":"","sources":["../../src/resolution/selected-capabilities.ts"],"names":[],"mappings":"AAUA,MAAM,aAAa,GACjB,uGAAuG,CAAC;AAC1G,MAAM,eAAe,GAAG,wCAAwC,CAAC;AAEjE,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACpG,CAAC;AAED,SAAS,OAAO,CAAC,IAAiB,EAAE,KAAkB;IACpD,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AAClF,CAAC;AAED;iFACiF;AACjF,MAAM,UAAU,4BAA4B,CAC1C,eAAyB,EACzB,YAAiB;IAEjB,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC;QACzD,YAAY,CAAC,MAAM,KAAK,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAC5D,CAAC,UAAU,IAAI,OAAO,UAAU,CAAC,EAAE,KAAK,QAAQ,IAAI,CAAC,UAAU,CAAC,EAAE;QAClE,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;QACrE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;IAC7C,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1E,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACnF,0EAA0E;IAC1E,uEAAuE;IACvE,IAAI,SAAS,CAAC,IAAI,KAAK,eAAe,CAAC,MAAM;QACzC,QAAQ,CAAC,IAAI,KAAK,YAAY,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QACnG,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;IAC7C,CAAC;IACD,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QACpD,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACpF,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACnC,OAAO,CAAC;gBACN,GAAG,UAAU;gBACb,MAAM;gBACN,yEAAyE;gBACzE,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;aACjF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;AAC/C,CAAC;AAED;kFACkF;AAClF,MAAM,UAAU,0BAA0B,CACxC,eAAyB,EACzB,YAA+B,EAC/B,MAAe,EACf,UAAU,GAAG,KAAK;IAElB,MAAM,UAAU,GAAG,4BAA4B,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;IAC/E,IAAI,CAAC,UAAU,CAAC,EAAE;QAAE,OAAO,UAAU,CAAC;IACtC,MAAM,qBAAqB,GAAG,UAAU,CAAC,YAAY,CAAC;IACtD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IACnF,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ;QACrC,CAAC,CAAC,uBAAuB,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC;QAC9E,CAAC,CAAC,gBAAgB,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;QACrE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;IAC/C,CAAC;IACD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAC1D,IAAI,WAAW,CAAC,IAAI,KAAK,CAAC,IAAI,WAAW,CAAC,IAAI,KAAK,MAAM,CAAC,qBAAqB,CAAC,MAAM;QAClF,CAAC,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QACrD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;IAC/C,CAAC;IACD,IAAI,UAAU,IAAI,WAAW,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,EAAE,CAAC;QACrD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,0FAA0F,EAAE,CAAC;IAC1H,CAAC;IACD,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,qBAAqB;SACjD,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;SACtD,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/C,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC;QAC7D,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;IAC/C,CAAC;IACD,2EAA2E;IAC3E,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;AAC5F,CAAC"}
|
|
@@ -17,13 +17,13 @@ export declare const OAuthIdentitySchema: z.ZodObject<{
|
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
18
18
|
provider: string;
|
|
19
19
|
subject: string;
|
|
20
|
-
email?: string | undefined;
|
|
21
20
|
name?: string | undefined;
|
|
21
|
+
email?: string | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
provider: string;
|
|
24
24
|
subject: string;
|
|
25
|
-
email?: string | undefined;
|
|
26
25
|
name?: string | undefined;
|
|
26
|
+
email?: string | undefined;
|
|
27
27
|
}>;
|
|
28
28
|
export type OAuthIdentitySchemaType = z.infer<typeof OAuthIdentitySchema>;
|
|
29
29
|
/**
|
|
@@ -51,13 +51,13 @@ export declare const ConsentApprovalRequestSchema: z.ZodObject<{
|
|
|
51
51
|
}, "strip", z.ZodTypeAny, {
|
|
52
52
|
provider: string;
|
|
53
53
|
subject: string;
|
|
54
|
-
email?: string | undefined;
|
|
55
54
|
name?: string | undefined;
|
|
55
|
+
email?: string | undefined;
|
|
56
56
|
}, {
|
|
57
57
|
provider: string;
|
|
58
58
|
subject: string;
|
|
59
|
-
email?: string | undefined;
|
|
60
59
|
name?: string | undefined;
|
|
60
|
+
email?: string | undefined;
|
|
61
61
|
}>>>;
|
|
62
62
|
user_did: z.ZodOptional<z.ZodString>;
|
|
63
63
|
/**
|
|
@@ -88,8 +88,8 @@ export declare const ConsentApprovalRequestSchema: z.ZodObject<{
|
|
|
88
88
|
oauth_identity?: {
|
|
89
89
|
provider: string;
|
|
90
90
|
subject: string;
|
|
91
|
-
email?: string | undefined;
|
|
92
91
|
name?: string | undefined;
|
|
92
|
+
email?: string | undefined;
|
|
93
93
|
} | null | undefined;
|
|
94
94
|
credential_user_email?: string | undefined;
|
|
95
95
|
credential_provider_user_id?: string | undefined;
|
|
@@ -108,8 +108,8 @@ export declare const ConsentApprovalRequestSchema: z.ZodObject<{
|
|
|
108
108
|
oauth_identity?: {
|
|
109
109
|
provider: string;
|
|
110
110
|
subject: string;
|
|
111
|
-
email?: string | undefined;
|
|
112
111
|
name?: string | undefined;
|
|
112
|
+
email?: string | undefined;
|
|
113
113
|
} | null | undefined;
|
|
114
114
|
credential_user_email?: string | undefined;
|
|
115
115
|
credential_provider_user_id?: string | undefined;
|
|
@@ -162,14 +162,14 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
162
162
|
logoUrl: z.ZodOptional<z.ZodString>;
|
|
163
163
|
companyName: z.ZodOptional<z.ZodString>;
|
|
164
164
|
}, "strip", z.ZodTypeAny, {
|
|
165
|
+
logoUrl?: string | undefined;
|
|
165
166
|
primaryColor?: string | undefined;
|
|
166
167
|
secondaryColor?: string | undefined;
|
|
167
|
-
logoUrl?: string | undefined;
|
|
168
168
|
companyName?: string | undefined;
|
|
169
169
|
}, {
|
|
170
|
+
logoUrl?: string | undefined;
|
|
170
171
|
primaryColor?: string | undefined;
|
|
171
172
|
secondaryColor?: string | undefined;
|
|
172
|
-
logoUrl?: string | undefined;
|
|
173
173
|
companyName?: string | undefined;
|
|
174
174
|
}>>;
|
|
175
175
|
ui: z.ZodOptional<z.ZodObject<{
|
|
@@ -251,54 +251,54 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
251
251
|
value: z.ZodString;
|
|
252
252
|
label: z.ZodString;
|
|
253
253
|
}, "strip", z.ZodTypeAny, {
|
|
254
|
-
value: string;
|
|
255
254
|
label: string;
|
|
256
|
-
}, {
|
|
257
255
|
value: string;
|
|
256
|
+
}, {
|
|
258
257
|
label: string;
|
|
258
|
+
value: string;
|
|
259
259
|
}>, "many">>;
|
|
260
260
|
pattern: z.ZodOptional<z.ZodString>;
|
|
261
261
|
}, "strip", z.ZodTypeAny, {
|
|
262
|
-
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
263
|
-
label: string;
|
|
264
262
|
name: string;
|
|
263
|
+
label: string;
|
|
264
|
+
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
265
265
|
required: boolean;
|
|
266
266
|
options?: {
|
|
267
|
-
value: string;
|
|
268
267
|
label: string;
|
|
268
|
+
value: string;
|
|
269
269
|
}[] | undefined;
|
|
270
270
|
placeholder?: string | undefined;
|
|
271
271
|
pattern?: string | undefined;
|
|
272
272
|
}, {
|
|
273
|
-
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
274
|
-
label: string;
|
|
275
273
|
name: string;
|
|
274
|
+
label: string;
|
|
275
|
+
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
276
276
|
required: boolean;
|
|
277
277
|
options?: {
|
|
278
|
-
value: string;
|
|
279
278
|
label: string;
|
|
279
|
+
value: string;
|
|
280
280
|
}[] | undefined;
|
|
281
281
|
placeholder?: string | undefined;
|
|
282
282
|
pattern?: string | undefined;
|
|
283
283
|
}>, {
|
|
284
|
-
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
285
|
-
label: string;
|
|
286
284
|
name: string;
|
|
285
|
+
label: string;
|
|
286
|
+
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
287
287
|
required: boolean;
|
|
288
288
|
options?: {
|
|
289
|
-
value: string;
|
|
290
289
|
label: string;
|
|
290
|
+
value: string;
|
|
291
291
|
}[] | undefined;
|
|
292
292
|
placeholder?: string | undefined;
|
|
293
293
|
pattern?: string | undefined;
|
|
294
294
|
}, {
|
|
295
|
-
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
296
|
-
label: string;
|
|
297
295
|
name: string;
|
|
296
|
+
label: string;
|
|
297
|
+
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
298
298
|
required: boolean;
|
|
299
299
|
options?: {
|
|
300
|
-
value: string;
|
|
301
300
|
label: string;
|
|
301
|
+
value: string;
|
|
302
302
|
}[] | undefined;
|
|
303
303
|
placeholder?: string | undefined;
|
|
304
304
|
pattern?: string | undefined;
|
|
@@ -437,7 +437,7 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
437
437
|
capabilities: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
438
438
|
id: z.ZodString;
|
|
439
439
|
label: z.ZodString;
|
|
440
|
-
capabilities: z.ZodArray<z.ZodObject<{
|
|
440
|
+
capabilities: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
441
441
|
id: z.ZodString;
|
|
442
442
|
label: z.ZodString;
|
|
443
443
|
description: z.ZodString;
|
|
@@ -448,23 +448,43 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
448
448
|
scopes: z.ZodArray<z.ZodString, "many">;
|
|
449
449
|
category: z.ZodOptional<z.ZodString>;
|
|
450
450
|
}, "strip", z.ZodTypeAny, {
|
|
451
|
+
cedar: string;
|
|
451
452
|
id: string;
|
|
452
453
|
label: string;
|
|
453
454
|
description: string;
|
|
454
455
|
icon: "search" | "cart" | "card" | "pin" | "pin-new" | "shield" | "key" | "tools" | "user" | "calendar" | "lock" | "eye" | "send" | "package" | "neutral";
|
|
455
456
|
riskLevel: "low" | "medium" | "high" | "critical";
|
|
456
457
|
defaultOn: boolean;
|
|
457
|
-
cedar: string;
|
|
458
458
|
scopes: string[];
|
|
459
459
|
category?: string | undefined;
|
|
460
460
|
}, {
|
|
461
|
+
cedar: string;
|
|
461
462
|
id: string;
|
|
462
463
|
label: string;
|
|
463
464
|
description: string;
|
|
464
465
|
icon: "search" | "cart" | "card" | "pin" | "pin-new" | "shield" | "key" | "tools" | "user" | "calendar" | "lock" | "eye" | "send" | "package" | "neutral";
|
|
465
466
|
riskLevel: "low" | "medium" | "high" | "critical";
|
|
466
467
|
defaultOn: boolean;
|
|
468
|
+
scopes: string[];
|
|
469
|
+
category?: string | undefined;
|
|
470
|
+
}>, {
|
|
471
|
+
cedar: string;
|
|
472
|
+
id: string;
|
|
473
|
+
label: string;
|
|
474
|
+
description: string;
|
|
475
|
+
icon: "search" | "cart" | "card" | "pin" | "pin-new" | "shield" | "key" | "tools" | "user" | "calendar" | "lock" | "eye" | "send" | "package" | "neutral";
|
|
476
|
+
riskLevel: "low" | "medium" | "high" | "critical";
|
|
477
|
+
defaultOn: boolean;
|
|
478
|
+
scopes: string[];
|
|
479
|
+
category?: string | undefined;
|
|
480
|
+
}, {
|
|
467
481
|
cedar: string;
|
|
482
|
+
id: string;
|
|
483
|
+
label: string;
|
|
484
|
+
description: string;
|
|
485
|
+
icon: "search" | "cart" | "card" | "pin" | "pin-new" | "shield" | "key" | "tools" | "user" | "calendar" | "lock" | "eye" | "send" | "package" | "neutral";
|
|
486
|
+
riskLevel: "low" | "medium" | "high" | "critical";
|
|
487
|
+
defaultOn: boolean;
|
|
468
488
|
scopes: string[];
|
|
469
489
|
category?: string | undefined;
|
|
470
490
|
}>, "many">;
|
|
@@ -472,13 +492,13 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
472
492
|
id: string;
|
|
473
493
|
label: string;
|
|
474
494
|
capabilities: {
|
|
495
|
+
cedar: string;
|
|
475
496
|
id: string;
|
|
476
497
|
label: string;
|
|
477
498
|
description: string;
|
|
478
499
|
icon: "search" | "cart" | "card" | "pin" | "pin-new" | "shield" | "key" | "tools" | "user" | "calendar" | "lock" | "eye" | "send" | "package" | "neutral";
|
|
479
500
|
riskLevel: "low" | "medium" | "high" | "critical";
|
|
480
501
|
defaultOn: boolean;
|
|
481
|
-
cedar: string;
|
|
482
502
|
scopes: string[];
|
|
483
503
|
category?: string | undefined;
|
|
484
504
|
}[];
|
|
@@ -486,13 +506,13 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
486
506
|
id: string;
|
|
487
507
|
label: string;
|
|
488
508
|
capabilities: {
|
|
509
|
+
cedar: string;
|
|
489
510
|
id: string;
|
|
490
511
|
label: string;
|
|
491
512
|
description: string;
|
|
492
513
|
icon: "search" | "cart" | "card" | "pin" | "pin-new" | "shield" | "key" | "tools" | "user" | "calendar" | "lock" | "eye" | "send" | "package" | "neutral";
|
|
493
514
|
riskLevel: "low" | "medium" | "high" | "critical";
|
|
494
515
|
defaultOn: boolean;
|
|
495
|
-
cedar: string;
|
|
496
516
|
scopes: string[];
|
|
497
517
|
category?: string | undefined;
|
|
498
518
|
}[];
|
|
@@ -506,21 +526,21 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
506
526
|
logoUrl: z.ZodOptional<z.ZodString>;
|
|
507
527
|
connectedAt: z.ZodOptional<z.ZodString>;
|
|
508
528
|
}, "strip", z.ZodTypeAny, {
|
|
529
|
+
verified: boolean;
|
|
509
530
|
name: string;
|
|
510
531
|
did: string;
|
|
511
|
-
|
|
512
|
-
logoUrl?: string | undefined;
|
|
532
|
+
connectedAt?: string | undefined;
|
|
513
533
|
vendor?: string | undefined;
|
|
514
534
|
surfaceLabel?: string | undefined;
|
|
515
|
-
|
|
535
|
+
logoUrl?: string | undefined;
|
|
516
536
|
}, {
|
|
537
|
+
verified: boolean;
|
|
517
538
|
name: string;
|
|
518
539
|
did: string;
|
|
519
|
-
|
|
520
|
-
logoUrl?: string | undefined;
|
|
540
|
+
connectedAt?: string | undefined;
|
|
521
541
|
vendor?: string | undefined;
|
|
522
542
|
surfaceLabel?: string | undefined;
|
|
523
|
-
|
|
543
|
+
logoUrl?: string | undefined;
|
|
524
544
|
}>>;
|
|
525
545
|
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
526
546
|
headlineVerb: z.ZodOptional<z.ZodString>;
|
|
@@ -593,22 +613,22 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
593
613
|
id: string;
|
|
594
614
|
label: string;
|
|
595
615
|
capabilities: {
|
|
616
|
+
cedar: string;
|
|
596
617
|
id: string;
|
|
597
618
|
label: string;
|
|
598
619
|
description: string;
|
|
599
620
|
icon: "search" | "cart" | "card" | "pin" | "pin-new" | "shield" | "key" | "tools" | "user" | "calendar" | "lock" | "eye" | "send" | "package" | "neutral";
|
|
600
621
|
riskLevel: "low" | "medium" | "high" | "critical";
|
|
601
622
|
defaultOn: boolean;
|
|
602
|
-
cedar: string;
|
|
603
623
|
scopes: string[];
|
|
604
624
|
category?: string | undefined;
|
|
605
625
|
}[];
|
|
606
626
|
}[] | undefined;
|
|
607
627
|
theme?: "light" | "dark" | undefined;
|
|
608
628
|
branding?: {
|
|
629
|
+
logoUrl?: string | undefined;
|
|
609
630
|
primaryColor?: string | undefined;
|
|
610
631
|
secondaryColor?: string | undefined;
|
|
611
|
-
logoUrl?: string | undefined;
|
|
612
632
|
companyName?: string | undefined;
|
|
613
633
|
} | undefined;
|
|
614
634
|
ui?: {
|
|
@@ -637,26 +657,26 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
637
657
|
continueButtonText?: string | undefined;
|
|
638
658
|
} | undefined;
|
|
639
659
|
customFields?: {
|
|
640
|
-
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
641
|
-
label: string;
|
|
642
660
|
name: string;
|
|
661
|
+
label: string;
|
|
662
|
+
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
643
663
|
required: boolean;
|
|
644
664
|
options?: {
|
|
645
|
-
value: string;
|
|
646
665
|
label: string;
|
|
666
|
+
value: string;
|
|
647
667
|
}[] | undefined;
|
|
648
668
|
placeholder?: string | undefined;
|
|
649
669
|
pattern?: string | undefined;
|
|
650
670
|
}[] | undefined;
|
|
651
671
|
expirationDays?: number | undefined;
|
|
652
672
|
agentMetadata?: {
|
|
673
|
+
verified: boolean;
|
|
653
674
|
name: string;
|
|
654
675
|
did: string;
|
|
655
|
-
|
|
656
|
-
logoUrl?: string | undefined;
|
|
676
|
+
connectedAt?: string | undefined;
|
|
657
677
|
vendor?: string | undefined;
|
|
658
678
|
surfaceLabel?: string | undefined;
|
|
659
|
-
|
|
679
|
+
logoUrl?: string | undefined;
|
|
660
680
|
} | undefined;
|
|
661
681
|
headlineVerb?: string | undefined;
|
|
662
682
|
revocationPath?: string | undefined;
|
|
@@ -719,22 +739,22 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
719
739
|
id: string;
|
|
720
740
|
label: string;
|
|
721
741
|
capabilities: {
|
|
742
|
+
cedar: string;
|
|
722
743
|
id: string;
|
|
723
744
|
label: string;
|
|
724
745
|
description: string;
|
|
725
746
|
icon: "search" | "cart" | "card" | "pin" | "pin-new" | "shield" | "key" | "tools" | "user" | "calendar" | "lock" | "eye" | "send" | "package" | "neutral";
|
|
726
747
|
riskLevel: "low" | "medium" | "high" | "critical";
|
|
727
748
|
defaultOn: boolean;
|
|
728
|
-
cedar: string;
|
|
729
749
|
scopes: string[];
|
|
730
750
|
category?: string | undefined;
|
|
731
751
|
}[];
|
|
732
752
|
}[] | undefined;
|
|
733
753
|
theme?: "light" | "dark" | undefined;
|
|
734
754
|
branding?: {
|
|
755
|
+
logoUrl?: string | undefined;
|
|
735
756
|
primaryColor?: string | undefined;
|
|
736
757
|
secondaryColor?: string | undefined;
|
|
737
|
-
logoUrl?: string | undefined;
|
|
738
758
|
companyName?: string | undefined;
|
|
739
759
|
} | undefined;
|
|
740
760
|
ui?: {
|
|
@@ -763,26 +783,26 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
763
783
|
continueButtonText?: string | undefined;
|
|
764
784
|
} | undefined;
|
|
765
785
|
customFields?: {
|
|
766
|
-
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
767
|
-
label: string;
|
|
768
786
|
name: string;
|
|
787
|
+
label: string;
|
|
788
|
+
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
769
789
|
required: boolean;
|
|
770
790
|
options?: {
|
|
771
|
-
value: string;
|
|
772
791
|
label: string;
|
|
792
|
+
value: string;
|
|
773
793
|
}[] | undefined;
|
|
774
794
|
placeholder?: string | undefined;
|
|
775
795
|
pattern?: string | undefined;
|
|
776
796
|
}[] | undefined;
|
|
777
797
|
expirationDays?: number | undefined;
|
|
778
798
|
agentMetadata?: {
|
|
799
|
+
verified: boolean;
|
|
779
800
|
name: string;
|
|
780
801
|
did: string;
|
|
781
|
-
|
|
782
|
-
logoUrl?: string | undefined;
|
|
802
|
+
connectedAt?: string | undefined;
|
|
783
803
|
vendor?: string | undefined;
|
|
784
804
|
surfaceLabel?: string | undefined;
|
|
785
|
-
|
|
805
|
+
logoUrl?: string | undefined;
|
|
786
806
|
} | undefined;
|
|
787
807
|
headlineVerb?: string | undefined;
|
|
788
808
|
revocationPath?: string | undefined;
|
|
@@ -850,22 +870,22 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
850
870
|
id: string;
|
|
851
871
|
label: string;
|
|
852
872
|
capabilities: {
|
|
873
|
+
cedar: string;
|
|
853
874
|
id: string;
|
|
854
875
|
label: string;
|
|
855
876
|
description: string;
|
|
856
877
|
icon: "search" | "cart" | "card" | "pin" | "pin-new" | "shield" | "key" | "tools" | "user" | "calendar" | "lock" | "eye" | "send" | "package" | "neutral";
|
|
857
878
|
riskLevel: "low" | "medium" | "high" | "critical";
|
|
858
879
|
defaultOn: boolean;
|
|
859
|
-
cedar: string;
|
|
860
880
|
scopes: string[];
|
|
861
881
|
category?: string | undefined;
|
|
862
882
|
}[];
|
|
863
883
|
}[] | undefined;
|
|
864
884
|
theme?: "light" | "dark" | undefined;
|
|
865
885
|
branding?: {
|
|
886
|
+
logoUrl?: string | undefined;
|
|
866
887
|
primaryColor?: string | undefined;
|
|
867
888
|
secondaryColor?: string | undefined;
|
|
868
|
-
logoUrl?: string | undefined;
|
|
869
889
|
companyName?: string | undefined;
|
|
870
890
|
} | undefined;
|
|
871
891
|
ui?: {
|
|
@@ -894,26 +914,26 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
894
914
|
continueButtonText?: string | undefined;
|
|
895
915
|
} | undefined;
|
|
896
916
|
customFields?: {
|
|
897
|
-
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
898
|
-
label: string;
|
|
899
917
|
name: string;
|
|
918
|
+
label: string;
|
|
919
|
+
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
900
920
|
required: boolean;
|
|
901
921
|
options?: {
|
|
902
|
-
value: string;
|
|
903
922
|
label: string;
|
|
923
|
+
value: string;
|
|
904
924
|
}[] | undefined;
|
|
905
925
|
placeholder?: string | undefined;
|
|
906
926
|
pattern?: string | undefined;
|
|
907
927
|
}[] | undefined;
|
|
908
928
|
expirationDays?: number | undefined;
|
|
909
929
|
agentMetadata?: {
|
|
930
|
+
verified: boolean;
|
|
910
931
|
name: string;
|
|
911
932
|
did: string;
|
|
912
|
-
|
|
913
|
-
logoUrl?: string | undefined;
|
|
933
|
+
connectedAt?: string | undefined;
|
|
914
934
|
vendor?: string | undefined;
|
|
915
935
|
surfaceLabel?: string | undefined;
|
|
916
|
-
|
|
936
|
+
logoUrl?: string | undefined;
|
|
917
937
|
} | undefined;
|
|
918
938
|
headlineVerb?: string | undefined;
|
|
919
939
|
revocationPath?: string | undefined;
|
|
@@ -980,22 +1000,22 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
980
1000
|
id: string;
|
|
981
1001
|
label: string;
|
|
982
1002
|
capabilities: {
|
|
1003
|
+
cedar: string;
|
|
983
1004
|
id: string;
|
|
984
1005
|
label: string;
|
|
985
1006
|
description: string;
|
|
986
1007
|
icon: "search" | "cart" | "card" | "pin" | "pin-new" | "shield" | "key" | "tools" | "user" | "calendar" | "lock" | "eye" | "send" | "package" | "neutral";
|
|
987
1008
|
riskLevel: "low" | "medium" | "high" | "critical";
|
|
988
1009
|
defaultOn: boolean;
|
|
989
|
-
cedar: string;
|
|
990
1010
|
scopes: string[];
|
|
991
1011
|
category?: string | undefined;
|
|
992
1012
|
}[];
|
|
993
1013
|
}[] | undefined;
|
|
994
1014
|
theme?: "light" | "dark" | undefined;
|
|
995
1015
|
branding?: {
|
|
1016
|
+
logoUrl?: string | undefined;
|
|
996
1017
|
primaryColor?: string | undefined;
|
|
997
1018
|
secondaryColor?: string | undefined;
|
|
998
|
-
logoUrl?: string | undefined;
|
|
999
1019
|
companyName?: string | undefined;
|
|
1000
1020
|
} | undefined;
|
|
1001
1021
|
ui?: {
|
|
@@ -1024,26 +1044,26 @@ export declare const ConsentConfigAPIResponseSchema: z.ZodObject<{
|
|
|
1024
1044
|
continueButtonText?: string | undefined;
|
|
1025
1045
|
} | undefined;
|
|
1026
1046
|
customFields?: {
|
|
1027
|
-
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
1028
|
-
label: string;
|
|
1029
1047
|
name: string;
|
|
1048
|
+
label: string;
|
|
1049
|
+
type: "text" | "textarea" | "checkbox" | "select" | "email";
|
|
1030
1050
|
required: boolean;
|
|
1031
1051
|
options?: {
|
|
1032
|
-
value: string;
|
|
1033
1052
|
label: string;
|
|
1053
|
+
value: string;
|
|
1034
1054
|
}[] | undefined;
|
|
1035
1055
|
placeholder?: string | undefined;
|
|
1036
1056
|
pattern?: string | undefined;
|
|
1037
1057
|
}[] | undefined;
|
|
1038
1058
|
expirationDays?: number | undefined;
|
|
1039
1059
|
agentMetadata?: {
|
|
1060
|
+
verified: boolean;
|
|
1040
1061
|
name: string;
|
|
1041
1062
|
did: string;
|
|
1042
|
-
|
|
1043
|
-
logoUrl?: string | undefined;
|
|
1063
|
+
connectedAt?: string | undefined;
|
|
1044
1064
|
vendor?: string | undefined;
|
|
1045
1065
|
surfaceLabel?: string | undefined;
|
|
1046
|
-
|
|
1066
|
+
logoUrl?: string | undefined;
|
|
1047
1067
|
} | undefined;
|
|
1048
1068
|
headlineVerb?: string | undefined;
|
|
1049
1069
|
revocationPath?: string | undefined;
|
|
@@ -1101,13 +1121,13 @@ export declare const CredentialAuthResponseSchema: z.ZodObject<{
|
|
|
1101
1121
|
}, "strip", z.ZodTypeAny, {
|
|
1102
1122
|
provider: string;
|
|
1103
1123
|
subject: string;
|
|
1104
|
-
email?: string | undefined;
|
|
1105
1124
|
name?: string | undefined;
|
|
1125
|
+
email?: string | undefined;
|
|
1106
1126
|
}, {
|
|
1107
1127
|
provider: string;
|
|
1108
1128
|
subject: string;
|
|
1109
|
-
email?: string | undefined;
|
|
1110
1129
|
name?: string | undefined;
|
|
1130
|
+
email?: string | undefined;
|
|
1111
1131
|
}>>;
|
|
1112
1132
|
error: z.ZodOptional<z.ZodString>;
|
|
1113
1133
|
error_code: z.ZodOptional<z.ZodString>;
|
|
@@ -1116,8 +1136,8 @@ export declare const CredentialAuthResponseSchema: z.ZodObject<{
|
|
|
1116
1136
|
oauth_identity?: {
|
|
1117
1137
|
provider: string;
|
|
1118
1138
|
subject: string;
|
|
1119
|
-
email?: string | undefined;
|
|
1120
1139
|
name?: string | undefined;
|
|
1140
|
+
email?: string | undefined;
|
|
1121
1141
|
} | undefined;
|
|
1122
1142
|
error?: string | undefined;
|
|
1123
1143
|
error_code?: string | undefined;
|
|
@@ -1126,8 +1146,8 @@ export declare const CredentialAuthResponseSchema: z.ZodObject<{
|
|
|
1126
1146
|
oauth_identity?: {
|
|
1127
1147
|
provider: string;
|
|
1128
1148
|
subject: string;
|
|
1129
|
-
email?: string | undefined;
|
|
1130
1149
|
name?: string | undefined;
|
|
1150
|
+
email?: string | undefined;
|
|
1131
1151
|
} | undefined;
|
|
1132
1152
|
error?: string | undefined;
|
|
1133
1153
|
error_code?: string | undefined;
|