@kya-os/contracts 1.6.18 → 1.7.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.
@@ -2,22 +2,78 @@
2
2
  /**
3
3
  * Consent Module Exports
4
4
  *
5
- * Types and schemas for consent page configuration and approval handling
5
+ * Types and schemas for consent page configuration and approval handling.
6
+ *
7
+ * This module re-exports from @kya-os/consent (the single source of truth)
8
+ * while maintaining backward compatibility with existing contracts consumers.
6
9
  */
7
10
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.validateConsentConfig = exports.validateConsentApprovalResponse = exports.validateConsentApprovalRequest = exports.validateConsentPageConfig = exports.oauthIdentitySchema = exports.consentConfigSchema = exports.consentApprovalResponseSchema = exports.consentApprovalRequestSchema = exports.consentPageConfigSchema = exports.consentCustomFieldOptionSchema = exports.consentCustomFieldSchema = exports.consentTermsSchema = exports.consentBrandingSchema = void 0;
9
- // Export schemas and inferred types (types are derived from schemas)
10
- var schemas_js_1 = require("./schemas.js");
11
- Object.defineProperty(exports, "consentBrandingSchema", { enumerable: true, get: function () { return schemas_js_1.consentBrandingSchema; } });
12
- Object.defineProperty(exports, "consentTermsSchema", { enumerable: true, get: function () { return schemas_js_1.consentTermsSchema; } });
13
- Object.defineProperty(exports, "consentCustomFieldSchema", { enumerable: true, get: function () { return schemas_js_1.consentCustomFieldSchema; } });
14
- Object.defineProperty(exports, "consentCustomFieldOptionSchema", { enumerable: true, get: function () { return schemas_js_1.consentCustomFieldOptionSchema; } });
15
- Object.defineProperty(exports, "consentPageConfigSchema", { enumerable: true, get: function () { return schemas_js_1.consentPageConfigSchema; } });
16
- Object.defineProperty(exports, "consentApprovalRequestSchema", { enumerable: true, get: function () { return schemas_js_1.consentApprovalRequestSchema; } });
17
- Object.defineProperty(exports, "consentApprovalResponseSchema", { enumerable: true, get: function () { return schemas_js_1.consentApprovalResponseSchema; } });
18
- Object.defineProperty(exports, "consentConfigSchema", { enumerable: true, get: function () { return schemas_js_1.consentConfigSchema; } });
19
- Object.defineProperty(exports, "oauthIdentitySchema", { enumerable: true, get: function () { return schemas_js_1.oauthIdentitySchema; } });
20
- Object.defineProperty(exports, "validateConsentPageConfig", { enumerable: true, get: function () { return schemas_js_1.validateConsentPageConfig; } });
21
- Object.defineProperty(exports, "validateConsentApprovalRequest", { enumerable: true, get: function () { return schemas_js_1.validateConsentApprovalRequest; } });
22
- Object.defineProperty(exports, "validateConsentApprovalResponse", { enumerable: true, get: function () { return schemas_js_1.validateConsentApprovalResponse; } });
23
- Object.defineProperty(exports, "validateConsentConfig", { enumerable: true, get: function () { return schemas_js_1.validateConsentConfig; } });
11
+ exports.consentPageConfigSchema = exports.consentCustomFieldOptionSchema = exports.consentCustomFieldSchema = exports.consentConfigSchema = exports.consentTermsSchema = exports.consentBrandingSchema = exports.collectsCredentials = exports.requiresExternalAuth = exports.isAuthModeImplemented = exports.getImplementedAuthModes = exports.getAuthModeMetadata = exports.AUTH_MODE_REGISTRY = exports.AUTH_MODES = exports.DEFAULT_COLORS = exports.DEFAULT_EXPIRATION_DAYS = exports.DEFAULT_METADATA = exports.DEFAULT_SUCCESS = exports.DEFAULT_TERMS = exports.DEFAULT_UI = exports.DEFAULT_BRANDING = exports.validateCustomField = exports.validateConsentBranding = exports.validateConsentConfig = exports.validateConsentPageConfig = exports.validateOAuthIdentity = exports.validateConsentApprovalResponse = exports.validateConsentApprovalRequest = exports.CredentialAuthResponseSchema = exports.CredentialAuthRequestSchema = exports.ConsentPageConfigSchema = exports.ConsentApprovalResponseSchema = exports.ConsentApprovalRequestSchema = exports.OAuthIdentitySchema = exports.IDVConfigSchema = exports.PasskeyConfigSchema = exports.QRCodeConfigSchema = exports.OTPConfigSchema = exports.MagicLinkConfigSchema = exports.OAuthConfigSchema = exports.CredentialsConfigSchema = exports.AuthModeSchema = exports.ConsentBrandingSchema = exports.ConsentMetadataSchema = exports.ConsentSuccessSchema = exports.ConsentUISchema = exports.ConsentTermsSchema = exports.ConsentCustomFieldOptionSchema = exports.ConsentCustomFieldSchema = exports.ConsentConfigWithMetaSchema = exports.ConsentConfigSchema = void 0;
12
+ exports.oauthIdentitySchema = exports.consentApprovalResponseSchema = exports.consentApprovalRequestSchema = void 0;
13
+ // Re-export schemas from @kya-os/consent
14
+ var consent_1 = require("@kya-os/consent");
15
+ // Config schemas
16
+ Object.defineProperty(exports, "ConsentConfigSchema", { enumerable: true, get: function () { return consent_1.ConsentConfigSchema; } });
17
+ Object.defineProperty(exports, "ConsentConfigWithMetaSchema", { enumerable: true, get: function () { return consent_1.ConsentConfigWithMetaSchema; } });
18
+ Object.defineProperty(exports, "ConsentCustomFieldSchema", { enumerable: true, get: function () { return consent_1.ConsentCustomFieldSchema; } });
19
+ Object.defineProperty(exports, "ConsentCustomFieldOptionSchema", { enumerable: true, get: function () { return consent_1.ConsentCustomFieldOptionSchema; } });
20
+ Object.defineProperty(exports, "ConsentTermsSchema", { enumerable: true, get: function () { return consent_1.ConsentTermsSchema; } });
21
+ Object.defineProperty(exports, "ConsentUISchema", { enumerable: true, get: function () { return consent_1.ConsentUISchema; } });
22
+ Object.defineProperty(exports, "ConsentSuccessSchema", { enumerable: true, get: function () { return consent_1.ConsentSuccessSchema; } });
23
+ Object.defineProperty(exports, "ConsentMetadataSchema", { enumerable: true, get: function () { return consent_1.ConsentMetadataSchema; } });
24
+ // Branding schemas
25
+ Object.defineProperty(exports, "ConsentBrandingSchema", { enumerable: true, get: function () { return consent_1.ConsentBrandingSchema; } });
26
+ // Mode schemas
27
+ Object.defineProperty(exports, "AuthModeSchema", { enumerable: true, get: function () { return consent_1.AuthModeSchema; } });
28
+ Object.defineProperty(exports, "CredentialsConfigSchema", { enumerable: true, get: function () { return consent_1.CredentialsConfigSchema; } });
29
+ Object.defineProperty(exports, "OAuthConfigSchema", { enumerable: true, get: function () { return consent_1.OAuthConfigSchema; } });
30
+ Object.defineProperty(exports, "MagicLinkConfigSchema", { enumerable: true, get: function () { return consent_1.MagicLinkConfigSchema; } });
31
+ Object.defineProperty(exports, "OTPConfigSchema", { enumerable: true, get: function () { return consent_1.OTPConfigSchema; } });
32
+ Object.defineProperty(exports, "QRCodeConfigSchema", { enumerable: true, get: function () { return consent_1.QRCodeConfigSchema; } });
33
+ Object.defineProperty(exports, "PasskeyConfigSchema", { enumerable: true, get: function () { return consent_1.PasskeyConfigSchema; } });
34
+ Object.defineProperty(exports, "IDVConfigSchema", { enumerable: true, get: function () { return consent_1.IDVConfigSchema; } });
35
+ // API schemas
36
+ Object.defineProperty(exports, "OAuthIdentitySchema", { enumerable: true, get: function () { return consent_1.OAuthIdentitySchema; } });
37
+ Object.defineProperty(exports, "ConsentApprovalRequestSchema", { enumerable: true, get: function () { return consent_1.ConsentApprovalRequestSchema; } });
38
+ Object.defineProperty(exports, "ConsentApprovalResponseSchema", { enumerable: true, get: function () { return consent_1.ConsentApprovalResponseSchema; } });
39
+ Object.defineProperty(exports, "ConsentPageConfigSchema", { enumerable: true, get: function () { return consent_1.ConsentPageConfigSchema; } });
40
+ Object.defineProperty(exports, "CredentialAuthRequestSchema", { enumerable: true, get: function () { return consent_1.CredentialAuthRequestSchema; } });
41
+ Object.defineProperty(exports, "CredentialAuthResponseSchema", { enumerable: true, get: function () { return consent_1.CredentialAuthResponseSchema; } });
42
+ // Validation helpers
43
+ Object.defineProperty(exports, "validateConsentApprovalRequest", { enumerable: true, get: function () { return consent_1.validateConsentApprovalRequest; } });
44
+ Object.defineProperty(exports, "validateConsentApprovalResponse", { enumerable: true, get: function () { return consent_1.validateConsentApprovalResponse; } });
45
+ Object.defineProperty(exports, "validateOAuthIdentity", { enumerable: true, get: function () { return consent_1.validateOAuthIdentity; } });
46
+ Object.defineProperty(exports, "validateConsentPageConfig", { enumerable: true, get: function () { return consent_1.validateConsentPageConfig; } });
47
+ Object.defineProperty(exports, "validateConsentConfig", { enumerable: true, get: function () { return consent_1.validateConsentConfig; } });
48
+ Object.defineProperty(exports, "validateConsentBranding", { enumerable: true, get: function () { return consent_1.validateConsentBranding; } });
49
+ Object.defineProperty(exports, "validateCustomField", { enumerable: true, get: function () { return consent_1.validateCustomField; } });
50
+ // Re-export constants and defaults
51
+ var consent_2 = require("@kya-os/consent");
52
+ // Defaults
53
+ Object.defineProperty(exports, "DEFAULT_BRANDING", { enumerable: true, get: function () { return consent_2.DEFAULT_BRANDING; } });
54
+ Object.defineProperty(exports, "DEFAULT_UI", { enumerable: true, get: function () { return consent_2.DEFAULT_UI; } });
55
+ Object.defineProperty(exports, "DEFAULT_TERMS", { enumerable: true, get: function () { return consent_2.DEFAULT_TERMS; } });
56
+ Object.defineProperty(exports, "DEFAULT_SUCCESS", { enumerable: true, get: function () { return consent_2.DEFAULT_SUCCESS; } });
57
+ Object.defineProperty(exports, "DEFAULT_METADATA", { enumerable: true, get: function () { return consent_2.DEFAULT_METADATA; } });
58
+ Object.defineProperty(exports, "DEFAULT_EXPIRATION_DAYS", { enumerable: true, get: function () { return consent_2.DEFAULT_EXPIRATION_DAYS; } });
59
+ Object.defineProperty(exports, "DEFAULT_COLORS", { enumerable: true, get: function () { return consent_2.DEFAULT_COLORS; } });
60
+ // Auth mode constants and utilities
61
+ Object.defineProperty(exports, "AUTH_MODES", { enumerable: true, get: function () { return consent_2.AUTH_MODES; } });
62
+ Object.defineProperty(exports, "AUTH_MODE_REGISTRY", { enumerable: true, get: function () { return consent_2.AUTH_MODE_REGISTRY; } });
63
+ Object.defineProperty(exports, "getAuthModeMetadata", { enumerable: true, get: function () { return consent_2.getAuthModeMetadata; } });
64
+ Object.defineProperty(exports, "getImplementedAuthModes", { enumerable: true, get: function () { return consent_2.getImplementedAuthModes; } });
65
+ Object.defineProperty(exports, "isAuthModeImplemented", { enumerable: true, get: function () { return consent_2.isAuthModeImplemented; } });
66
+ Object.defineProperty(exports, "requiresExternalAuth", { enumerable: true, get: function () { return consent_2.requiresExternalAuth; } });
67
+ Object.defineProperty(exports, "collectsCredentials", { enumerable: true, get: function () { return consent_2.collectsCredentials; } });
68
+ // Legacy schema exports (aliased for backward compatibility)
69
+ // These map old camelCase naming to new PascalCase canonical names
70
+ var consent_3 = require("@kya-os/consent");
71
+ Object.defineProperty(exports, "consentBrandingSchema", { enumerable: true, get: function () { return consent_3.ConsentBrandingSchema; } });
72
+ Object.defineProperty(exports, "consentTermsSchema", { enumerable: true, get: function () { return consent_3.ConsentTermsSchema; } });
73
+ Object.defineProperty(exports, "consentConfigSchema", { enumerable: true, get: function () { return consent_3.ConsentConfigSchema; } });
74
+ Object.defineProperty(exports, "consentCustomFieldSchema", { enumerable: true, get: function () { return consent_3.ConsentCustomFieldSchema; } });
75
+ Object.defineProperty(exports, "consentCustomFieldOptionSchema", { enumerable: true, get: function () { return consent_3.ConsentCustomFieldOptionSchema; } });
76
+ Object.defineProperty(exports, "consentPageConfigSchema", { enumerable: true, get: function () { return consent_3.ConsentPageConfigSchema; } });
77
+ Object.defineProperty(exports, "consentApprovalRequestSchema", { enumerable: true, get: function () { return consent_3.ConsentApprovalRequestSchema; } });
78
+ Object.defineProperty(exports, "consentApprovalResponseSchema", { enumerable: true, get: function () { return consent_3.ConsentApprovalResponseSchema; } });
79
+ Object.defineProperty(exports, "oauthIdentitySchema", { enumerable: true, get: function () { return consent_3.OAuthIdentitySchema; } });