@kya-os/consent 0.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/constants/auth-modes.d.ts +54 -0
- package/dist/constants/auth-modes.d.ts.map +1 -0
- package/dist/constants/auth-modes.js +128 -0
- package/dist/constants/auth-modes.js.map +1 -0
- package/dist/constants/colors.d.ts +38 -0
- package/dist/constants/colors.d.ts.map +1 -0
- package/dist/constants/colors.js +40 -0
- package/dist/constants/colors.js.map +1 -0
- package/dist/constants/defaults.d.ts +112 -0
- package/dist/constants/defaults.d.ts.map +1 -0
- package/dist/constants/defaults.js +146 -0
- package/dist/constants/defaults.js.map +1 -0
- package/dist/constants/index.d.ts +11 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +37 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -0
- package/dist/resolution/index.d.ts +12 -0
- package/dist/resolution/index.d.ts.map +1 -0
- package/dist/resolution/index.js +28 -0
- package/dist/resolution/index.js.map +1 -0
- package/dist/resolution/resolve-branding.d.ts +70 -0
- package/dist/resolution/resolve-branding.d.ts.map +1 -0
- package/dist/resolution/resolve-branding.js +159 -0
- package/dist/resolution/resolve-branding.js.map +1 -0
- package/dist/resolution/resolve-config.d.ts +81 -0
- package/dist/resolution/resolve-config.d.ts.map +1 -0
- package/dist/resolution/resolve-config.js +254 -0
- package/dist/resolution/resolve-config.js.map +1 -0
- package/dist/resolution/resolve-copy.d.ts +53 -0
- package/dist/resolution/resolve-copy.d.ts.map +1 -0
- package/dist/resolution/resolve-copy.js +136 -0
- package/dist/resolution/resolve-copy.js.map +1 -0
- package/dist/schemas/api.schemas.d.ts +984 -0
- package/dist/schemas/api.schemas.d.ts.map +1 -0
- package/dist/schemas/api.schemas.js +153 -0
- package/dist/schemas/api.schemas.js.map +1 -0
- package/dist/schemas/branding.schemas.d.ts +100 -0
- package/dist/schemas/branding.schemas.d.ts.map +1 -0
- package/dist/schemas/branding.schemas.js +57 -0
- package/dist/schemas/branding.schemas.js.map +1 -0
- package/dist/schemas/config.schemas.d.ts +1182 -0
- package/dist/schemas/config.schemas.d.ts.map +1 -0
- package/dist/schemas/config.schemas.js +147 -0
- package/dist/schemas/config.schemas.js.map +1 -0
- package/dist/schemas/index.d.ts +13 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +29 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/modes.schemas.d.ts +406 -0
- package/dist/schemas/modes.schemas.d.ts.map +1 -0
- package/dist/schemas/modes.schemas.js +107 -0
- package/dist/schemas/modes.schemas.js.map +1 -0
- package/dist/security/escape.d.ts +114 -0
- package/dist/security/escape.d.ts.map +1 -0
- package/dist/security/escape.js +202 -0
- package/dist/security/escape.js.map +1 -0
- package/dist/security/index.d.ts +10 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +26 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/validators.d.ts +98 -0
- package/dist/security/validators.d.ts.map +1 -0
- package/dist/security/validators.js +210 -0
- package/dist/security/validators.js.map +1 -0
- package/dist/styles/css-variables.d.ts +78 -0
- package/dist/styles/css-variables.d.ts.map +1 -0
- package/dist/styles/css-variables.js +129 -0
- package/dist/styles/css-variables.js.map +1 -0
- package/dist/styles/index.d.ts +12 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/styles/index.js +28 -0
- package/dist/styles/index.js.map +1 -0
- package/dist/styles/stylesheet.d.ts +57 -0
- package/dist/styles/stylesheet.d.ts.map +1 -0
- package/dist/styles/stylesheet.js +204 -0
- package/dist/styles/stylesheet.js.map +1 -0
- package/dist/styles/tokens.d.ts +141 -0
- package/dist/styles/tokens.d.ts.map +1 -0
- package/dist/styles/tokens.js +183 -0
- package/dist/styles/tokens.js.map +1 -0
- package/dist/templates/base/base-template.d.ts +81 -0
- package/dist/templates/base/base-template.d.ts.map +1 -0
- package/dist/templates/base/base-template.js +282 -0
- package/dist/templates/base/base-template.js.map +1 -0
- package/dist/templates/base/components.d.ts +120 -0
- package/dist/templates/base/components.d.ts.map +1 -0
- package/dist/templates/base/components.js +295 -0
- package/dist/templates/base/components.js.map +1 -0
- package/dist/templates/base/index.d.ts +8 -0
- package/dist/templates/base/index.d.ts.map +1 -0
- package/dist/templates/base/index.js +26 -0
- package/dist/templates/base/index.js.map +1 -0
- package/dist/templates/index.d.ts +18 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +34 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/modes/consent-only.template.d.ts +36 -0
- package/dist/templates/modes/consent-only.template.d.ts.map +1 -0
- package/dist/templates/modes/consent-only.template.js +74 -0
- package/dist/templates/modes/consent-only.template.js.map +1 -0
- package/dist/templates/modes/credentials.template.d.ts +65 -0
- package/dist/templates/modes/credentials.template.d.ts.map +1 -0
- package/dist/templates/modes/credentials.template.js +414 -0
- package/dist/templates/modes/credentials.template.js.map +1 -0
- package/dist/templates/modes/index.d.ts +14 -0
- package/dist/templates/modes/index.d.ts.map +1 -0
- package/dist/templates/modes/index.js +24 -0
- package/dist/templates/modes/index.js.map +1 -0
- package/dist/templates/modes/magic-link.template.d.ts +33 -0
- package/dist/templates/modes/magic-link.template.d.ts.map +1 -0
- package/dist/templates/modes/magic-link.template.js +196 -0
- package/dist/templates/modes/magic-link.template.js.map +1 -0
- package/dist/templates/modes/oauth.template.d.ts +40 -0
- package/dist/templates/modes/oauth.template.d.ts.map +1 -0
- package/dist/templates/modes/oauth.template.js +153 -0
- package/dist/templates/modes/oauth.template.js.map +1 -0
- package/dist/templates/modes/otp.template.d.ts +35 -0
- package/dist/templates/modes/otp.template.d.ts.map +1 -0
- package/dist/templates/modes/otp.template.js +316 -0
- package/dist/templates/modes/otp.template.js.map +1 -0
- package/dist/templates/modes/success.template.d.ts +41 -0
- package/dist/templates/modes/success.template.d.ts.map +1 -0
- package/dist/templates/modes/success.template.js +140 -0
- package/dist/templates/modes/success.template.js.map +1 -0
- package/dist/templates/registry.d.ts +62 -0
- package/dist/templates/registry.d.ts.map +1 -0
- package/dist/templates/registry.js +135 -0
- package/dist/templates/registry.js.map +1 -0
- package/dist/types/api.types.d.ts +134 -0
- package/dist/types/api.types.d.ts.map +1 -0
- package/dist/types/api.types.js +10 -0
- package/dist/types/api.types.js.map +1 -0
- package/dist/types/branding.types.d.ts +53 -0
- package/dist/types/branding.types.d.ts.map +1 -0
- package/dist/types/branding.types.js +10 -0
- package/dist/types/branding.types.js.map +1 -0
- package/dist/types/config.types.d.ts +201 -0
- package/dist/types/config.types.d.ts.map +1 -0
- package/dist/types/config.types.js +10 -0
- package/dist/types/config.types.js.map +1 -0
- package/dist/types/copy.types.d.ts +109 -0
- package/dist/types/copy.types.d.ts.map +1 -0
- package/dist/types/copy.types.js +10 -0
- package/dist/types/copy.types.js.map +1 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +31 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/modes.types.d.ts +197 -0
- package/dist/types/modes.types.d.ts.map +1 -0
- package/dist/types/modes.types.js +35 -0
- package/dist/types/modes.types.js.map +1 -0
- package/dist/types/page.types.d.ts +120 -0
- package/dist/types/page.types.d.ts.map +1 -0
- package/dist/types/page.types.js +10 -0
- package/dist/types/page.types.js.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth Mode Constants and Registry
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for authentication mode definitions.
|
|
5
|
+
*
|
|
6
|
+
* @module @kya-os/consent/constants/auth-modes
|
|
7
|
+
*/
|
|
8
|
+
import { type AuthMode } from "../types/modes.types";
|
|
9
|
+
/**
|
|
10
|
+
* Auth mode metadata for UI display and behavior
|
|
11
|
+
*/
|
|
12
|
+
export interface AuthModeMetadata {
|
|
13
|
+
/** Unique mode identifier */
|
|
14
|
+
id: AuthMode;
|
|
15
|
+
/** Display name for UI */
|
|
16
|
+
displayName: string;
|
|
17
|
+
/** Short description */
|
|
18
|
+
description: string;
|
|
19
|
+
/** Whether this mode requires external authentication */
|
|
20
|
+
requiresExternalAuth: boolean;
|
|
21
|
+
/** Whether this mode collects credentials */
|
|
22
|
+
collectsCredentials: boolean;
|
|
23
|
+
/** Icon name (for UI rendering) */
|
|
24
|
+
icon: string;
|
|
25
|
+
/** Whether the mode is fully implemented */
|
|
26
|
+
implemented: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Auth Mode Registry
|
|
30
|
+
*
|
|
31
|
+
* Complete metadata for all supported authentication modes.
|
|
32
|
+
*/
|
|
33
|
+
export declare const AUTH_MODE_REGISTRY: Record<AuthMode, AuthModeMetadata>;
|
|
34
|
+
/**
|
|
35
|
+
* Get metadata for an auth mode
|
|
36
|
+
*/
|
|
37
|
+
export declare function getAuthModeMetadata(mode: AuthMode): AuthModeMetadata;
|
|
38
|
+
/**
|
|
39
|
+
* Get all implemented auth modes
|
|
40
|
+
*/
|
|
41
|
+
export declare function getImplementedAuthModes(): AuthMode[];
|
|
42
|
+
/**
|
|
43
|
+
* Check if an auth mode is implemented
|
|
44
|
+
*/
|
|
45
|
+
export declare function isAuthModeImplemented(mode: AuthMode): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Check if an auth mode requires external authentication
|
|
48
|
+
*/
|
|
49
|
+
export declare function requiresExternalAuth(mode: AuthMode): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Check if an auth mode collects credentials
|
|
52
|
+
*/
|
|
53
|
+
export declare function collectsCredentials(mode: AuthMode): boolean;
|
|
54
|
+
//# sourceMappingURL=auth-modes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-modes.d.ts","sourceRoot":"","sources":["../../src/constants/auth-modes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6BAA6B;IAC7B,EAAE,EAAE,QAAQ,CAAC;IACb,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,oBAAoB,EAAE,OAAO,CAAC;IAC9B,6CAA6C;IAC7C,mBAAmB,EAAE,OAAO,CAAC;IAC7B,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAyEjE,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,gBAAgB,CAEpE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,QAAQ,EAAE,CAIpD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAE7D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAE5D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAE3D"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Auth Mode Constants and Registry
|
|
4
|
+
*
|
|
5
|
+
* Single source of truth for authentication mode definitions.
|
|
6
|
+
*
|
|
7
|
+
* @module @kya-os/consent/constants/auth-modes
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.AUTH_MODE_REGISTRY = void 0;
|
|
11
|
+
exports.getAuthModeMetadata = getAuthModeMetadata;
|
|
12
|
+
exports.getImplementedAuthModes = getImplementedAuthModes;
|
|
13
|
+
exports.isAuthModeImplemented = isAuthModeImplemented;
|
|
14
|
+
exports.requiresExternalAuth = requiresExternalAuth;
|
|
15
|
+
exports.collectsCredentials = collectsCredentials;
|
|
16
|
+
const modes_types_1 = require("../types/modes.types");
|
|
17
|
+
/**
|
|
18
|
+
* Auth Mode Registry
|
|
19
|
+
*
|
|
20
|
+
* Complete metadata for all supported authentication modes.
|
|
21
|
+
*/
|
|
22
|
+
exports.AUTH_MODE_REGISTRY = {
|
|
23
|
+
[modes_types_1.AUTH_MODES.CONSENT_ONLY]: {
|
|
24
|
+
id: modes_types_1.AUTH_MODES.CONSENT_ONLY,
|
|
25
|
+
displayName: "Consent Only",
|
|
26
|
+
description: "Simple consent without additional authentication",
|
|
27
|
+
requiresExternalAuth: false,
|
|
28
|
+
collectsCredentials: false,
|
|
29
|
+
icon: "check-circle",
|
|
30
|
+
implemented: true,
|
|
31
|
+
},
|
|
32
|
+
[modes_types_1.AUTH_MODES.CREDENTIALS]: {
|
|
33
|
+
id: modes_types_1.AUTH_MODES.CREDENTIALS,
|
|
34
|
+
displayName: "Username & Password",
|
|
35
|
+
description: "Traditional username and password authentication",
|
|
36
|
+
requiresExternalAuth: false,
|
|
37
|
+
collectsCredentials: true,
|
|
38
|
+
icon: "key",
|
|
39
|
+
implemented: true,
|
|
40
|
+
},
|
|
41
|
+
[modes_types_1.AUTH_MODES.OAUTH]: {
|
|
42
|
+
id: modes_types_1.AUTH_MODES.OAUTH,
|
|
43
|
+
displayName: "OAuth",
|
|
44
|
+
description: "OAuth 2.0 authentication with external provider",
|
|
45
|
+
requiresExternalAuth: true,
|
|
46
|
+
collectsCredentials: false,
|
|
47
|
+
icon: "external-link",
|
|
48
|
+
implemented: true,
|
|
49
|
+
},
|
|
50
|
+
[modes_types_1.AUTH_MODES.MAGIC_LINK]: {
|
|
51
|
+
id: modes_types_1.AUTH_MODES.MAGIC_LINK,
|
|
52
|
+
displayName: "Magic Link",
|
|
53
|
+
description: "Passwordless login via email link",
|
|
54
|
+
requiresExternalAuth: false,
|
|
55
|
+
collectsCredentials: false,
|
|
56
|
+
icon: "mail",
|
|
57
|
+
implemented: false,
|
|
58
|
+
},
|
|
59
|
+
[modes_types_1.AUTH_MODES.OTP]: {
|
|
60
|
+
id: modes_types_1.AUTH_MODES.OTP,
|
|
61
|
+
displayName: "One-Time Password",
|
|
62
|
+
description: "SMS or email verification code",
|
|
63
|
+
requiresExternalAuth: false,
|
|
64
|
+
collectsCredentials: false,
|
|
65
|
+
icon: "smartphone",
|
|
66
|
+
implemented: false,
|
|
67
|
+
},
|
|
68
|
+
[modes_types_1.AUTH_MODES.QR_CODE]: {
|
|
69
|
+
id: modes_types_1.AUTH_MODES.QR_CODE,
|
|
70
|
+
displayName: "QR Code",
|
|
71
|
+
description: "Scan QR code with authenticator app",
|
|
72
|
+
requiresExternalAuth: false,
|
|
73
|
+
collectsCredentials: false,
|
|
74
|
+
icon: "qr-code",
|
|
75
|
+
implemented: false,
|
|
76
|
+
},
|
|
77
|
+
[modes_types_1.AUTH_MODES.PASSKEY]: {
|
|
78
|
+
id: modes_types_1.AUTH_MODES.PASSKEY,
|
|
79
|
+
displayName: "Passkey",
|
|
80
|
+
description: "Biometric or device-based authentication",
|
|
81
|
+
requiresExternalAuth: false,
|
|
82
|
+
collectsCredentials: false,
|
|
83
|
+
icon: "fingerprint",
|
|
84
|
+
implemented: false,
|
|
85
|
+
},
|
|
86
|
+
[modes_types_1.AUTH_MODES.IDV]: {
|
|
87
|
+
id: modes_types_1.AUTH_MODES.IDV,
|
|
88
|
+
displayName: "Identity Verification",
|
|
89
|
+
description: "Document-based identity verification",
|
|
90
|
+
requiresExternalAuth: true,
|
|
91
|
+
collectsCredentials: false,
|
|
92
|
+
icon: "id-card",
|
|
93
|
+
implemented: false,
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Get metadata for an auth mode
|
|
98
|
+
*/
|
|
99
|
+
function getAuthModeMetadata(mode) {
|
|
100
|
+
return exports.AUTH_MODE_REGISTRY[mode];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Get all implemented auth modes
|
|
104
|
+
*/
|
|
105
|
+
function getImplementedAuthModes() {
|
|
106
|
+
return Object.values(exports.AUTH_MODE_REGISTRY)
|
|
107
|
+
.filter((meta) => meta.implemented)
|
|
108
|
+
.map((meta) => meta.id);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Check if an auth mode is implemented
|
|
112
|
+
*/
|
|
113
|
+
function isAuthModeImplemented(mode) {
|
|
114
|
+
return exports.AUTH_MODE_REGISTRY[mode].implemented;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Check if an auth mode requires external authentication
|
|
118
|
+
*/
|
|
119
|
+
function requiresExternalAuth(mode) {
|
|
120
|
+
return exports.AUTH_MODE_REGISTRY[mode].requiresExternalAuth;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Check if an auth mode collects credentials
|
|
124
|
+
*/
|
|
125
|
+
function collectsCredentials(mode) {
|
|
126
|
+
return exports.AUTH_MODE_REGISTRY[mode].collectsCredentials;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=auth-modes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-modes.js","sourceRoot":"","sources":["../../src/constants/auth-modes.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AA2GH,kDAEC;AAKD,0DAIC;AAKD,sDAEC;AAKD,oDAEC;AAKD,kDAEC;AAzID,sDAAiE;AAsBjE;;;;GAIG;AACU,QAAA,kBAAkB,GAAuC;IACpE,CAAC,wBAAU,CAAC,YAAY,CAAC,EAAE;QACzB,EAAE,EAAE,wBAAU,CAAC,YAAY;QAC3B,WAAW,EAAE,cAAc;QAC3B,WAAW,EAAE,kDAAkD;QAC/D,oBAAoB,EAAE,KAAK;QAC3B,mBA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
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consent Color Constants
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for default colors.
|
|
5
|
+
* Canonical color is blue (#2563EB) matching AgentShield.
|
|
6
|
+
*
|
|
7
|
+
* @module @kya-os/consent/constants/colors
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Default colors for consent pages
|
|
11
|
+
*
|
|
12
|
+
* CRITICAL: These must match AgentShield constants.ts exactly
|
|
13
|
+
* - Primary: Tailwind blue-600 (#2563EB)
|
|
14
|
+
* - Secondary: Tailwind blue-100 (#DBEAFE)
|
|
15
|
+
*/
|
|
16
|
+
export declare const DEFAULT_COLORS: {
|
|
17
|
+
/** Primary brand color - Tailwind blue-600 */
|
|
18
|
+
readonly PRIMARY: "#2563EB";
|
|
19
|
+
/** Secondary/accent color - Tailwind blue-100 */
|
|
20
|
+
readonly SECONDARY: "#DBEAFE";
|
|
21
|
+
/** Background color */
|
|
22
|
+
readonly BACKGROUND: "#F9FAFB";
|
|
23
|
+
/** Text colors */
|
|
24
|
+
readonly TEXT_PRIMARY: "#111827";
|
|
25
|
+
readonly TEXT_SECONDARY: "#6B7280";
|
|
26
|
+
readonly TEXT_MUTED: "#9CA3AF";
|
|
27
|
+
/** Border colors */
|
|
28
|
+
readonly BORDER: "#E5E7EB";
|
|
29
|
+
readonly BORDER_DARK: "#D1D5DB";
|
|
30
|
+
/** Success color - Tailwind green-600 */
|
|
31
|
+
readonly SUCCESS: "#16A34A";
|
|
32
|
+
/** Error color - Tailwind red-600 */
|
|
33
|
+
readonly ERROR: "#DC2626";
|
|
34
|
+
/** Warning color - Tailwind amber-500 */
|
|
35
|
+
readonly WARNING: "#F59E0B";
|
|
36
|
+
};
|
|
37
|
+
export type DefaultColorsType = typeof DEFAULT_COLORS;
|
|
38
|
+
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/constants/colors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;IACzB,8CAA8C;;IAE9C,iDAAiD;;IAEjD,uBAAuB;;IAEvB,kBAAkB;;;;IAIlB,oBAAoB;;;IAGpB,yCAAyC;;IAEzC,qCAAqC;;IAErC,yCAAyC;;CAEjC,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,OAAO,cAAc,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Consent Color Constants
|
|
4
|
+
*
|
|
5
|
+
* Single source of truth for default colors.
|
|
6
|
+
* Canonical color is blue (#2563EB) matching AgentShield.
|
|
7
|
+
*
|
|
8
|
+
* @module @kya-os/consent/constants/colors
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.DEFAULT_COLORS = void 0;
|
|
12
|
+
/**
|
|
13
|
+
* Default colors for consent pages
|
|
14
|
+
*
|
|
15
|
+
* CRITICAL: These must match AgentShield constants.ts exactly
|
|
16
|
+
* - Primary: Tailwind blue-600 (#2563EB)
|
|
17
|
+
* - Secondary: Tailwind blue-100 (#DBEAFE)
|
|
18
|
+
*/
|
|
19
|
+
exports.DEFAULT_COLORS = {
|
|
20
|
+
/** Primary brand color - Tailwind blue-600 */
|
|
21
|
+
PRIMARY: "#2563EB",
|
|
22
|
+
/** Secondary/accent color - Tailwind blue-100 */
|
|
23
|
+
SECONDARY: "#DBEAFE",
|
|
24
|
+
/** Background color */
|
|
25
|
+
BACKGROUND: "#F9FAFB",
|
|
26
|
+
/** Text colors */
|
|
27
|
+
TEXT_PRIMARY: "#111827",
|
|
28
|
+
TEXT_SECONDARY: "#6B7280",
|
|
29
|
+
TEXT_MUTED: "#9CA3AF",
|
|
30
|
+
/** Border colors */
|
|
31
|
+
BORDER: "#E5E7EB",
|
|
32
|
+
BORDER_DARK: "#D1D5DB",
|
|
33
|
+
/** Success color - Tailwind green-600 */
|
|
34
|
+
SUCCESS: "#16A34A",
|
|
35
|
+
/** Error color - Tailwind red-600 */
|
|
36
|
+
ERROR: "#DC2626",
|
|
37
|
+
/** Warning color - Tailwind amber-500 */
|
|
38
|
+
WARNING: "#F59E0B",
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/constants/colors.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH;;;;;;GAMG;AACU,QAAA,cAAc,GAAG;IAC5B,8CAA8C;IAC9C,OAAO,EAAE,SAAS;IAClB,iDAAiD;IACjD,SAAS,EAAE,SAAS;IACpB,uBAAuB;IACvB,UAAU,EAAE,SAAS;IACrB,kBAAkB;IAClB,YAAY,EAAE,SAAS;IACvB,cAAc,EAAE,SAAS;IACzB,UAAU,EAAE,SAAS;IACrB,oBAAoB;IACpB,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE,SAAS;IACtB,yCAAyC;IACzC,OAAO,EAAE,SAAS;IAClB,qCAAqC;IACrC,KAAK,EAAE,SAAS;IAChB,yCAAyC;IACzC,OAAO,EAAE,SAAS;CACV,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consent Default Values
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for all consent page defaults.
|
|
5
|
+
* These values are used when config fields are not specified.
|
|
6
|
+
*
|
|
7
|
+
* CRITICAL: These must match AgentShield constants.ts exactly
|
|
8
|
+
* to ensure WYSIWYG parity.
|
|
9
|
+
*
|
|
10
|
+
* @module @kya-os/consent/constants/defaults
|
|
11
|
+
*/
|
|
12
|
+
import type { ConsentBranding, ConsentUI, ConsentTerms, ConsentSuccess, ConsentMetadata } from "../types/config.types";
|
|
13
|
+
/**
|
|
14
|
+
* Default branding configuration
|
|
15
|
+
*
|
|
16
|
+
* CRITICAL: primaryColor MUST be #2563EB (blue)
|
|
17
|
+
* This resolves the dual defaults issue where some files used orange (#EB8525)
|
|
18
|
+
*/
|
|
19
|
+
export declare const DEFAULT_BRANDING: Required<ConsentBranding>;
|
|
20
|
+
/**
|
|
21
|
+
* Default UI text and configuration
|
|
22
|
+
*
|
|
23
|
+
* Text placeholders:
|
|
24
|
+
* - [AI Agent] - Replaced with actual agent name at render time
|
|
25
|
+
*/
|
|
26
|
+
export declare const DEFAULT_UI: Required<ConsentUI>;
|
|
27
|
+
/**
|
|
28
|
+
* Default terms and conditions configuration
|
|
29
|
+
*/
|
|
30
|
+
export declare const DEFAULT_TERMS: Required<ConsentTerms>;
|
|
31
|
+
/**
|
|
32
|
+
* Default success page configuration
|
|
33
|
+
*/
|
|
34
|
+
export declare const DEFAULT_SUCCESS: Required<ConsentSuccess>;
|
|
35
|
+
/**
|
|
36
|
+
* Default metadata configuration
|
|
37
|
+
*/
|
|
38
|
+
export declare const DEFAULT_METADATA: ConsentMetadata;
|
|
39
|
+
/**
|
|
40
|
+
* Default expiration in days
|
|
41
|
+
*/
|
|
42
|
+
export declare const DEFAULT_EXPIRATION_DAYS = 30;
|
|
43
|
+
/**
|
|
44
|
+
* Credential form defaults
|
|
45
|
+
*/
|
|
46
|
+
export declare const DEFAULT_CREDENTIALS_CONFIG: {
|
|
47
|
+
readonly usernameLabel: "Username";
|
|
48
|
+
readonly usernamePlaceholder: "Enter your username";
|
|
49
|
+
readonly passwordLabel: "Password";
|
|
50
|
+
readonly passwordPlaceholder: "Enter your password";
|
|
51
|
+
readonly showRememberMe: true;
|
|
52
|
+
readonly showForgotPassword: true;
|
|
53
|
+
readonly forgotPasswordUrl: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* OAuth form defaults
|
|
57
|
+
*/
|
|
58
|
+
export declare const DEFAULT_OAUTH_CONFIG: {
|
|
59
|
+
readonly providerId: string;
|
|
60
|
+
readonly providerName: string;
|
|
61
|
+
readonly buttonText: "Continue with OAuth";
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Magic link form defaults
|
|
65
|
+
*/
|
|
66
|
+
export declare const DEFAULT_MAGIC_LINK_CONFIG: {
|
|
67
|
+
readonly enabled: false;
|
|
68
|
+
readonly emailLabel: "Email";
|
|
69
|
+
readonly emailPlaceholder: "Enter your email address";
|
|
70
|
+
readonly buttonText: "Send Magic Link";
|
|
71
|
+
readonly resendCooldown: 60;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* OTP form defaults
|
|
75
|
+
*/
|
|
76
|
+
export declare const DEFAULT_OTP_CONFIG: {
|
|
77
|
+
readonly enabled: false;
|
|
78
|
+
readonly phoneLabel: "Phone Number";
|
|
79
|
+
readonly phonePlaceholder: "Enter your phone number";
|
|
80
|
+
readonly instructions: "We will send you a verification code";
|
|
81
|
+
readonly digits: 4 | 6 | 8;
|
|
82
|
+
readonly resendCooldown: 60;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* QR code form defaults
|
|
86
|
+
*/
|
|
87
|
+
export declare const DEFAULT_QR_CODE_CONFIG: {
|
|
88
|
+
readonly enabled: false;
|
|
89
|
+
readonly instructions: "Scan this QR code with your authenticator app";
|
|
90
|
+
readonly size: 200;
|
|
91
|
+
readonly showManualEntry: true;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Passkey form defaults
|
|
95
|
+
*/
|
|
96
|
+
export declare const DEFAULT_PASSKEY_CONFIG: {
|
|
97
|
+
readonly enabled: false;
|
|
98
|
+
readonly instructions: "Use your device's biometric authentication";
|
|
99
|
+
readonly buttonText: "Continue with Passkey";
|
|
100
|
+
readonly showCompatibilityInfo: true;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* IDV form defaults
|
|
104
|
+
*/
|
|
105
|
+
export declare const DEFAULT_IDV_CONFIG: {
|
|
106
|
+
readonly enabled: false;
|
|
107
|
+
readonly providerName: string;
|
|
108
|
+
readonly verificationType: "document" | "selfie" | "both";
|
|
109
|
+
readonly instructions: "Complete identity verification";
|
|
110
|
+
readonly estimatedTime: "2-5 minutes";
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/constants/defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,SAAS,EACT,YAAY,EACZ,cAAc,EACd,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAG/B;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,eAAe,CAKtD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,SAAS,CAW1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,YAAY,CAKhD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,cAAc,CAOpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,eAI9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;gCAOM,MAAM;CACzC,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,oBAAoB;yBACK,MAAM;2BACJ,MAAM;;CAEpC,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;CAM5B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;qBAKhB,CAAC,GAAG,CAAC,GAAG,CAAC;;CAEd,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,kBAAkB;;2BAES,MAAM;+BACZ,UAAU,GAAG,QAAQ,GAAG,MAAM;;;CAGtD,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Consent Default Values
|
|
4
|
+
*
|
|
5
|
+
* Single source of truth for all consent page defaults.
|
|
6
|
+
* These values are used when config fields are not specified.
|
|
7
|
+
*
|
|
8
|
+
* CRITICAL: These must match AgentShield constants.ts exactly
|
|
9
|
+
* to ensure WYSIWYG parity.
|
|
10
|
+
*
|
|
11
|
+
* @module @kya-os/consent/constants/defaults
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.DEFAULT_IDV_CONFIG = exports.DEFAULT_PASSKEY_CONFIG = exports.DEFAULT_QR_CODE_CONFIG = exports.DEFAULT_OTP_CONFIG = exports.DEFAULT_MAGIC_LINK_CONFIG = exports.DEFAULT_OAUTH_CONFIG = exports.DEFAULT_CREDENTIALS_CONFIG = exports.DEFAULT_EXPIRATION_DAYS = exports.DEFAULT_METADATA = exports.DEFAULT_SUCCESS = exports.DEFAULT_TERMS = exports.DEFAULT_UI = exports.DEFAULT_BRANDING = void 0;
|
|
15
|
+
const colors_1 = require("./colors");
|
|
16
|
+
/**
|
|
17
|
+
* Default branding configuration
|
|
18
|
+
*
|
|
19
|
+
* CRITICAL: primaryColor MUST be #2563EB (blue)
|
|
20
|
+
* This resolves the dual defaults issue where some files used orange (#EB8525)
|
|
21
|
+
*/
|
|
22
|
+
exports.DEFAULT_BRANDING = {
|
|
23
|
+
primaryColor: colors_1.DEFAULT_COLORS.PRIMARY,
|
|
24
|
+
secondaryColor: colors_1.DEFAULT_COLORS.SECONDARY,
|
|
25
|
+
logoUrl: undefined,
|
|
26
|
+
companyName: undefined,
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Default UI text and configuration
|
|
30
|
+
*
|
|
31
|
+
* Text placeholders:
|
|
32
|
+
* - [AI Agent] - Replaced with actual agent name at render time
|
|
33
|
+
*/
|
|
34
|
+
exports.DEFAULT_UI = {
|
|
35
|
+
title: "Permission request",
|
|
36
|
+
description: "It looks like you would like to use [AI Agent] to access resources on your behalf.",
|
|
37
|
+
expirationText: "This delegation will expire in",
|
|
38
|
+
cancelButtonText: "Cancel",
|
|
39
|
+
submitButtonText: "Allow access",
|
|
40
|
+
permissionsHeader: "The agent is requesting the following permissions:",
|
|
41
|
+
autoClose: false,
|
|
42
|
+
popupEnabled: false,
|
|
43
|
+
theme: "auto",
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Default terms and conditions configuration
|
|
47
|
+
*/
|
|
48
|
+
exports.DEFAULT_TERMS = {
|
|
49
|
+
text: "Terms and Conditions",
|
|
50
|
+
url: undefined,
|
|
51
|
+
version: undefined,
|
|
52
|
+
required: true,
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Default success page configuration
|
|
56
|
+
*/
|
|
57
|
+
exports.DEFAULT_SUCCESS = {
|
|
58
|
+
title: "Access Granted",
|
|
59
|
+
description: "The agent now has permission to act on your behalf.",
|
|
60
|
+
showCredential: true,
|
|
61
|
+
redirectUrl: undefined,
|
|
62
|
+
redirectDelay: undefined,
|
|
63
|
+
continueButtonText: "Close",
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Default metadata configuration
|
|
67
|
+
*/
|
|
68
|
+
exports.DEFAULT_METADATA = {
|
|
69
|
+
version: 1,
|
|
70
|
+
updatedAt: undefined,
|
|
71
|
+
cacheVersion: undefined,
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Default expiration in days
|
|
75
|
+
*/
|
|
76
|
+
exports.DEFAULT_EXPIRATION_DAYS = 30;
|
|
77
|
+
/**
|
|
78
|
+
* Credential form defaults
|
|
79
|
+
*/
|
|
80
|
+
exports.DEFAULT_CREDENTIALS_CONFIG = {
|
|
81
|
+
usernameLabel: "Username",
|
|
82
|
+
usernamePlaceholder: "Enter your username",
|
|
83
|
+
passwordLabel: "Password",
|
|
84
|
+
passwordPlaceholder: "Enter your password",
|
|
85
|
+
showRememberMe: true,
|
|
86
|
+
showForgotPassword: true,
|
|
87
|
+
forgotPasswordUrl: undefined,
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* OAuth form defaults
|
|
91
|
+
*/
|
|
92
|
+
exports.DEFAULT_OAUTH_CONFIG = {
|
|
93
|
+
providerId: undefined,
|
|
94
|
+
providerName: undefined,
|
|
95
|
+
buttonText: "Continue with OAuth",
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Magic link form defaults
|
|
99
|
+
*/
|
|
100
|
+
exports.DEFAULT_MAGIC_LINK_CONFIG = {
|
|
101
|
+
enabled: false,
|
|
102
|
+
emailLabel: "Email",
|
|
103
|
+
emailPlaceholder: "Enter your email address",
|
|
104
|
+
buttonText: "Send Magic Link",
|
|
105
|
+
resendCooldown: 60,
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* OTP form defaults
|
|
109
|
+
*/
|
|
110
|
+
exports.DEFAULT_OTP_CONFIG = {
|
|
111
|
+
enabled: false,
|
|
112
|
+
phoneLabel: "Phone Number",
|
|
113
|
+
phonePlaceholder: "Enter your phone number",
|
|
114
|
+
instructions: "We will send you a verification code",
|
|
115
|
+
digits: 6,
|
|
116
|
+
resendCooldown: 60,
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* QR code form defaults
|
|
120
|
+
*/
|
|
121
|
+
exports.DEFAULT_QR_CODE_CONFIG = {
|
|
122
|
+
enabled: false,
|
|
123
|
+
instructions: "Scan this QR code with your authenticator app",
|
|
124
|
+
size: 200,
|
|
125
|
+
showManualEntry: true,
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Passkey form defaults
|
|
129
|
+
*/
|
|
130
|
+
exports.DEFAULT_PASSKEY_CONFIG = {
|
|
131
|
+
enabled: false,
|
|
132
|
+
instructions: "Use your device's biometric authentication",
|
|
133
|
+
buttonText: "Continue with Passkey",
|
|
134
|
+
showCompatibilityInfo: true,
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* IDV form defaults
|
|
138
|
+
*/
|
|
139
|
+
exports.DEFAULT_IDV_CONFIG = {
|
|
140
|
+
enabled: false,
|
|
141
|
+
providerName: undefined,
|
|
142
|
+
verificationType: "document",
|
|
143
|
+
instructions: "Complete identity verification",
|
|
144
|
+
estimatedTime: "2-5 minutes",
|
|
145
|
+
};
|
|
146
|
+
//# sourceMappingURL=defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/constants/defaults.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AASH,qCAA0C;AAE1C;;;;;GAKG;AACU,QAAA,gBAAgB,GAA8B;IACzD,YAAY,EAAE,uBAAc,CAAC,OAAO;IACpC,cAAc,EAAE,uBAAc,CAAC,SAAS;IACxC,OAAO,EAAE,SAA8B;IACvC,WAAW,EAAE,SAA8B;CAC5C,CAAC;AAEF;;;;;GAKG;AACU,QAAA,UAAU,GAAwB;IAC7C,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,oFAAoF;IACtF,cAAc,EAAE,gCAAgC;IAChD,gBAAgB,EAAE,QAAQ;IAC1B,gBAAgB,EAAE,cAAc;IAChC,iBAAiB,EAAE,oDAAoD;IACvE,SAAS,EAAE,KAAK;IAChB,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE,MAAM;CACd,CAAC;AAEF;;GAEG;AACU,QAAA,aAAa,GAA2B;IACnD,IAAI,EAAE,sBAAsB;IAC5B,GAAG,EAAE,SAA8B;IACnC,OAAO,EAAE,SAA8B;IACvC,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF;;GAEG;AACU,QAAA,eAAe,GAA6B;IACvD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,qDAAqD;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AAO,EAAE,KAAK;IACd,YAAY,EAAE,4CAA4C;IAC1D,UAAU,EAAE,uBAAuB;IACnC,qBAAqB,EAAE,IAAI;CACnB,CAAC;AAEX;;GAEG;AACU,QAAA,kBAAkB,GAAG;IAChC,OAAO,EAAE,KAAK;IACd,YAAY,EAAE,SAA8B;IAC5C,gBAAgB,EAAE,UAA4C;IAC9D,YAAY,EAAE,gCAAgC;IAC9C,aAAa,EAAE,aAAa;CACpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consent Constants
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for all default values and constants.
|
|
5
|
+
*
|
|
6
|
+
* @module @kya-os/consent/constants
|
|
7
|
+
*/
|
|
8
|
+
export { DEFAULT_COLORS, type DefaultColorsType } from "./colors";
|
|
9
|
+
export { DEFAULT_BRANDING, DEFAULT_UI, DEFAULT_TERMS, DEFAULT_SUCCESS, DEFAULT_METADATA, DEFAULT_EXPIRATION_DAYS, DEFAULT_CREDENTIALS_CONFIG, DEFAULT_OAUTH_CONFIG, DEFAULT_MAGIC_LINK_CONFIG, DEFAULT_OTP_CONFIG, DEFAULT_QR_CODE_CONFIG, DEFAULT_PASSKEY_CONFIG, DEFAULT_IDV_CONFIG, } from "./defaults";
|
|
10
|
+
export { AUTH_MODE_REGISTRY, getAuthModeMetadata, getImplementedAuthModes, isAuthModeImplemented, requiresExternalAuth, collectsCredentials, type AuthModeMetadata, } from "./auth-modes";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGlE,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Consent Constants
|
|
4
|
+
*
|
|
5
|
+
* Single source of truth for all default values and constants.
|
|
6
|
+
*
|
|
7
|
+
* @module @kya-os/consent/constants
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.collectsCredentials = exports.requiresExternalAuth = exports.isAuthModeImplemented = exports.getImplementedAuthModes = exports.getAuthModeMetadata = exports.AUTH_MODE_REGISTRY = exports.DEFAULT_IDV_CONFIG = exports.DEFAULT_PASSKEY_CONFIG = exports.DEFAULT_QR_CODE_CONFIG = exports.DEFAULT_OTP_CONFIG = exports.DEFAULT_MAGIC_LINK_CONFIG = exports.DEFAULT_OAUTH_CONFIG = exports.DEFAULT_CREDENTIALS_CONFIG = exports.DEFAULT_EXPIRATION_DAYS = exports.DEFAULT_METADATA = exports.DEFAULT_SUCCESS = exports.DEFAULT_TERMS = exports.DEFAULT_UI = exports.DEFAULT_BRANDING = exports.DEFAULT_COLORS = void 0;
|
|
11
|
+
// Color constants
|
|
12
|
+
var colors_1 = require("./colors");
|
|
13
|
+
Object.defineProperty(exports, "DEFAULT_COLORS", { enumerable: true, get: function () { return colors_1.DEFAULT_COLORS; } });
|
|
14
|
+
// Default configurations
|
|
15
|
+
var defaults_1 = require("./defaults");
|
|
16
|
+
Object.defineProperty(exports, "DEFAULT_BRANDING", { enumerable: true, get: function () { return defaults_1.DEFAULT_BRANDING; } });
|
|
17
|
+
Object.defineProperty(exports, "DEFAULT_UI", { enumerable: true, get: function () { return defaults_1.DEFAULT_UI; } });
|
|
18
|
+
Object.defineProperty(exports, "DEFAULT_TERMS", { enumerable: true, get: function () { return defaults_1.DEFAULT_TERMS; } });
|
|
19
|
+
Object.defineProperty(exports, "DEFAULT_SUCCESS", { enumerable: true, get: function () { return defaults_1.DEFAULT_SUCCESS; } });
|
|
20
|
+
Object.defineProperty(exports, "DEFAULT_METADATA", { enumerable: true, get: function () { return defaults_1.DEFAULT_METADATA; } });
|
|
21
|
+
Object.defineProperty(exports, "DEFAULT_EXPIRATION_DAYS", { enumerable: true, get: function () { return defaults_1.DEFAULT_EXPIRATION_DAYS; } });
|
|
22
|
+
Object.defineProperty(exports, "DEFAULT_CREDENTIALS_CONFIG", { enumerable: true, get: function () { return defaults_1.DEFAULT_CREDENTIALS_CONFIG; } });
|
|
23
|
+
Object.defineProperty(exports, "DEFAULT_OAUTH_CONFIG", { enumerable: true, get: function () { return defaults_1.DEFAULT_OAUTH_CONFIG; } });
|
|
24
|
+
Object.defineProperty(exports, "DEFAULT_MAGIC_LINK_CONFIG", { enumerable: true, get: function () { return defaults_1.DEFAULT_MAGIC_LINK_CONFIG; } });
|
|
25
|
+
Object.defineProperty(exports, "DEFAULT_OTP_CONFIG", { enumerable: true, get: function () { return defaults_1.DEFAULT_OTP_CONFIG; } });
|
|
26
|
+
Object.defineProperty(exports, "DEFAULT_QR_CODE_CONFIG", { enumerable: true, get: function () { return defaults_1.DEFAULT_QR_CODE_CONFIG; } });
|
|
27
|
+
Object.defineProperty(exports, "DEFAULT_PASSKEY_CONFIG", { enumerable: true, get: function () { return defaults_1.DEFAULT_PASSKEY_CONFIG; } });
|
|
28
|
+
Object.defineProperty(exports, "DEFAULT_IDV_CONFIG", { enumerable: true, get: function () { return defaults_1.DEFAULT_IDV_CONFIG; } });
|
|
29
|
+
// Auth mode registry and utilities
|
|
30
|
+
var auth_modes_1 = require("./auth-modes");
|
|
31
|
+
Object.defineProperty(exports, "AUTH_MODE_REGISTRY", { enumerable: true, get: function () { return auth_modes_1.AUTH_MODE_REGISTRY; } });
|
|
32
|
+
Object.defineProperty(exports, "getAuthModeMetadata", { enumerable: true, get: function () { return auth_modes_1.getAuthModeMetadata; } });
|
|
33
|
+
Object.defineProperty(exports, "getImplementedAuthModes", { enumerable: true, get: function () { return auth_modes_1.getImplementedAuthModes; } });
|
|
34
|
+
Object.defineProperty(exports, "isAuthModeImplemented", { enumerable: true, get: function () { return auth_modes_1.isAuthModeImplemented; } });
|
|
35
|
+
Object.defineProperty(exports, "requiresExternalAuth", { enumerable: true, get: function () { return auth_modes_1.requiresExternalAuth; } });
|
|
36
|
+
Object.defineProperty(exports, "collectsCredentials", { enumerable: true, get: function () { return auth_modes_1.collectsCredentials; } });
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,kBAAkB;AAClB,mCAAkE;AAAzD,wGAAA,cAAc,OAAA;AAEvB,yBAAyB;AACzB,uCAcoB;AAblB,4GAAA,gBAAgB,OAAA;AAChB,sGAAA,UAAU,OAAA;AACV,yGAAA,aAAa,OAAA;AACb,2GAAA,eAAe,OAAA;AACf,4GAAA,gBAAgB,OAAA;AAChB,mHAAA,uBAAuB,OAAA;AACvB,sHAAA,0BAA0B,OAAA;AAC1B,gHAAA,oBAAoB,OAAA;AACpB,qHAAA,yBAAyB,OAAA;AACzB,8GAAA,kBAAkB,OAAA;AAClB,kHAAA,sBAAsB,OAAA;AACtB,kHAAA,sBAAsB,OAAA;AACtB,8GAAA,kBAAkB,OAAA;AAGpB,mCAAmC;AACnC,2CAQsB;AAPpB,gHAAA,kBAAkB,OAAA;AAClB,iHAAA,mBAAmB,OAAA;AACnB,qHAAA,uBAAuB,OAAA;AACvB,mHAAA,qBAAqB,OAAA;AACrB,kHAAA,oBAAoB,OAAA;AACpB,iHAAA,mBAAmB,OAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @kya-os/consent
|
|
3
|
+
*
|
|
4
|
+
* Canonical consent page types, styles, defaults, and utilities.
|
|
5
|
+
* Single source of truth for both MCP-I runtime rendering and AgentShield WYSIWYG preview.
|
|
6
|
+
*
|
|
7
|
+
* @module @kya-os/consent
|
|
8
|
+
*/
|
|
9
|
+
export * from "./types";
|
|
10
|
+
export * from "./schemas";
|
|
11
|
+
export * from "./constants";
|
|
12
|
+
export * from "./styles";
|
|
13
|
+
export * from "./resolution";
|
|
14
|
+
export * from "./security";
|
|
15
|
+
export * from "./templates";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,SAAS,CAAC;AAGxB,cAAc,WAAW,CAAC;AAG1B,cAAc,aAAa,CAAC;AAG5B,cAAc,UAAU,CAAC;AAGzB,cAAc,cAAc,CAAC;AAG7B,cAAc,YAAY,CAAC;AAG3B,cAAc,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @kya-os/consent
|
|
4
|
+
*
|
|
5
|
+
* Canonical consent page types, styles, defaults, and utilities.
|
|
6
|
+
* Single source of truth for both MCP-I runtime rendering and AgentShield WYSIWYG preview.
|
|
7
|
+
*
|
|
8
|
+
* @module @kya-os/consent
|
|
9
|
+
*/
|
|
10
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(o, k2, desc);
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
22
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
// Re-export all types
|
|
26
|
+
__exportStar(require("./types"), exports);
|
|
27
|
+
// Re-export all schemas
|
|
28
|
+
__exportStar(require("./schemas"), exports);
|
|
29
|
+
// Re-export all constants
|
|
30
|
+
__exportStar(require("./constants"), exports);
|
|
31
|
+
// Re-export all styles
|
|
32
|
+
__exportStar(require("./styles"), exports);
|
|
33
|
+
// Re-export all resolution utilities
|
|
34
|
+
__exportStar(require("./resolution"), exports);
|
|
35
|
+
// Re-export all security utilities
|
|
36
|
+
__exportStar(require("./security"), exports);
|
|
37
|
+
// Re-export all templates
|
|
38
|
+
__exportStar(require("./templates"), exports);
|
|
39
|
+
//# sourceMappingURL=index.js.map
|