@objectstack/spec 0.2.0 → 0.3.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.
Files changed (103) hide show
  1. package/README.md +127 -5
  2. package/dist/ai/index.d.ts +14 -0
  3. package/dist/ai/index.d.ts.map +1 -0
  4. package/dist/ai/index.js +29 -0
  5. package/dist/ai/model-registry.zod.d.ts +1389 -0
  6. package/dist/ai/model-registry.zod.d.ts.map +1 -0
  7. package/dist/ai/model-registry.zod.js +164 -0
  8. package/dist/ai/nlq.zod.d.ts +1126 -0
  9. package/dist/ai/nlq.zod.d.ts.map +1 -0
  10. package/dist/ai/nlq.zod.js +246 -0
  11. package/dist/ai/rag-pipeline.zod.d.ts +1034 -0
  12. package/dist/ai/rag-pipeline.zod.d.ts.map +1 -0
  13. package/dist/ai/rag-pipeline.zod.js +244 -0
  14. package/dist/api/index.d.ts +9 -0
  15. package/dist/api/index.d.ts.map +1 -0
  16. package/dist/api/index.js +24 -0
  17. package/dist/data/index.d.ts +21 -0
  18. package/dist/data/index.d.ts.map +1 -0
  19. package/dist/data/index.js +36 -0
  20. package/dist/data/query.zod.d.ts +386 -3
  21. package/dist/data/query.zod.d.ts.map +1 -1
  22. package/dist/data/query.zod.js +386 -3
  23. package/dist/data/validation.zod.d.ts +349 -0
  24. package/dist/data/validation.zod.d.ts.map +1 -1
  25. package/dist/data/validation.zod.js +395 -0
  26. package/dist/index.d.ts +36 -41
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +64 -49
  29. package/dist/system/auth-protocol.d.ts +175 -0
  30. package/dist/system/auth-protocol.d.ts.map +1 -0
  31. package/dist/system/auth-protocol.js +60 -0
  32. package/dist/system/auth.zod.d.ts +1097 -65
  33. package/dist/system/auth.zod.d.ts.map +1 -1
  34. package/dist/system/auth.zod.js +135 -1
  35. package/dist/system/identity.zod.d.ts +234 -180
  36. package/dist/system/identity.zod.d.ts.map +1 -1
  37. package/dist/system/identity.zod.js +168 -51
  38. package/dist/system/index.d.ts +28 -0
  39. package/dist/system/index.d.ts.map +1 -0
  40. package/dist/system/index.js +43 -0
  41. package/dist/system/manifest.zod.d.ts +10 -10
  42. package/dist/system/organization.zod.d.ts +179 -0
  43. package/dist/system/organization.zod.d.ts.map +1 -0
  44. package/dist/system/organization.zod.js +129 -0
  45. package/dist/ui/action.zod.d.ts +2 -2
  46. package/dist/ui/index.d.ts +17 -0
  47. package/dist/ui/index.d.ts.map +1 -0
  48. package/dist/ui/index.js +32 -0
  49. package/dist/ui/theme.zod.d.ts +6 -6
  50. package/json-schema/Account.json +87 -0
  51. package/json-schema/AuthConfig.json +235 -0
  52. package/json-schema/ChunkingStrategy.json +133 -0
  53. package/json-schema/DatabaseMapping.json +48 -0
  54. package/json-schema/DocumentChunk.json +97 -0
  55. package/json-schema/DocumentLoaderConfig.json +69 -0
  56. package/json-schema/DocumentMetadata.json +61 -0
  57. package/json-schema/EmbeddingModel.json +57 -0
  58. package/json-schema/EnterpriseAuthConfig.json +172 -0
  59. package/json-schema/Entity.json +55 -0
  60. package/json-schema/FieldSynonymConfig.json +39 -0
  61. package/json-schema/Invitation.json +69 -0
  62. package/json-schema/InvitationStatus.json +15 -0
  63. package/json-schema/LDAPConfig.json +22 -5
  64. package/json-schema/Member.json +46 -0
  65. package/json-schema/ModelCapability.json +47 -0
  66. package/json-schema/ModelConfig.json +181 -0
  67. package/json-schema/ModelLimits.json +45 -0
  68. package/json-schema/ModelPricing.json +28 -0
  69. package/json-schema/ModelProvider.json +19 -0
  70. package/json-schema/ModelRegistry.json +427 -0
  71. package/json-schema/ModelRegistryEntry.json +239 -0
  72. package/json-schema/ModelSelectionCriteria.json +50 -0
  73. package/json-schema/NLQAnalytics.json +106 -0
  74. package/json-schema/NLQFieldMapping.json +40 -0
  75. package/json-schema/NLQModelConfig.json +78 -0
  76. package/json-schema/NLQParseResult.json +252 -0
  77. package/json-schema/NLQRequest.json +110 -0
  78. package/json-schema/NLQResponse.json +288 -0
  79. package/json-schema/NLQTrainingExample.json +120 -0
  80. package/json-schema/OIDCConfig.json +18 -3
  81. package/json-schema/Organization.json +52 -0
  82. package/json-schema/PromptTemplate.json +163 -0
  83. package/json-schema/PromptVariable.json +56 -0
  84. package/json-schema/QueryContext.json +72 -0
  85. package/json-schema/QueryIntent.json +21 -0
  86. package/json-schema/QueryTemplate.json +81 -0
  87. package/json-schema/RAGPipelineConfig.json +552 -0
  88. package/json-schema/RAGPipelineStatus.json +66 -0
  89. package/json-schema/RAGQueryRequest.json +64 -0
  90. package/json-schema/RAGQueryResponse.json +108 -0
  91. package/json-schema/RerankingConfig.json +34 -0
  92. package/json-schema/RetrievalStrategy.json +121 -0
  93. package/json-schema/SAMLConfig.json +17 -3
  94. package/json-schema/Session.json +63 -0
  95. package/json-schema/StandardAuthProvider.json +235 -0
  96. package/json-schema/Timeframe.json +68 -0
  97. package/json-schema/User.json +51 -0
  98. package/json-schema/VectorStoreConfig.json +82 -0
  99. package/json-schema/VectorStoreProvider.json +21 -0
  100. package/json-schema/VerificationToken.json +36 -0
  101. package/package.json +27 -1
  102. package/json-schema/AuthProtocol.json +0 -17
  103. package/json-schema/AuthProvider.json +0 -171
@@ -1 +1 @@
1
- {"version":3,"file":"auth.zod.d.ts","sourceRoot":"","sources":["../../src/system/auth.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;GASG;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY,qFAOvB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;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;;;;;;;;;;;;;QAWH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBH,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StandardAuthProviderSchema = exports.AuthConfigSchema = exports.AuthPluginConfigSchema = exports.DatabaseAdapterSchema = exports.UserFieldMappingSchema = exports.TwoFactorConfigSchema = exports.AccountLinkingConfigSchema = exports.CSRFConfigSchema = exports.RateLimitConfigSchema = exports.SessionConfigSchema = exports.PasskeyConfigSchema = exports.MagicLinkConfigSchema = exports.EmailPasswordConfigSchema = exports.OAuthProviderSchema = exports.AuthStrategy = void 0;
3
+ exports.StandardAuthProviderSchema = exports.AuthConfigSchema = exports.AuthPluginConfigSchema = exports.DatabaseMappingSchema = exports.BETTER_AUTH_FIELD_MAPPINGS = exports.DatabaseAdapterSchema = exports.UserFieldMappingSchema = exports.EnterpriseAuthConfigSchema = exports.LDAPConfigSchema = exports.SAMLConfigSchema = exports.OIDCConfigSchema = exports.TwoFactorConfigSchema = exports.AccountLinkingConfigSchema = exports.CSRFConfigSchema = exports.RateLimitConfigSchema = exports.SessionConfigSchema = exports.PasskeyConfigSchema = exports.MagicLinkConfigSchema = exports.EmailPasswordConfigSchema = exports.OAuthProviderSchema = exports.AuthStrategy = void 0;
4
4
  const zod_1 = require("zod");
5
5
  /**
6
6
  * Authentication Protocol
@@ -139,6 +139,58 @@ exports.TwoFactorConfigSchema = zod_1.z.object({
139
139
  count: zod_1.z.number().default(10).describe('Number of backup codes to generate'),
140
140
  }).optional(),
141
141
  });
142
+ /**
143
+ * OIDC / OAuth2 Enterprise Configuration
144
+ * OpenID Connect configuration for enterprise SSO
145
+ */
146
+ exports.OIDCConfigSchema = zod_1.z.object({
147
+ enabled: zod_1.z.boolean().default(false),
148
+ issuer: zod_1.z.string().url().describe('OIDC Issuer URL (.well-known/openid-configuration)'),
149
+ clientId: zod_1.z.string().describe('OIDC client ID'),
150
+ clientSecret: zod_1.z.string().describe('OIDC client secret'),
151
+ scopes: zod_1.z.array(zod_1.z.string()).default(['openid', 'profile', 'email']).describe('OIDC scopes'),
152
+ attributeMapping: zod_1.z.record(zod_1.z.string()).optional().describe('Map IdP claims to User fields'),
153
+ displayName: zod_1.z.string().optional().describe('Display name for the provider button'),
154
+ icon: zod_1.z.string().optional().describe('Icon URL or identifier'),
155
+ });
156
+ /**
157
+ * SAML 2.0 Enterprise Configuration
158
+ * SAML configuration for legacy enterprise SSO
159
+ */
160
+ exports.SAMLConfigSchema = zod_1.z.object({
161
+ enabled: zod_1.z.boolean().default(false),
162
+ entryPoint: zod_1.z.string().url().describe('IdP SSO URL'),
163
+ cert: zod_1.z.string().describe('IdP Public Certificate (PEM format)'),
164
+ issuer: zod_1.z.string().describe('Entity ID of the IdP'),
165
+ signatureAlgorithm: zod_1.z.enum(['sha256', 'sha512']).default('sha256').describe('Signature algorithm'),
166
+ attributeMapping: zod_1.z.record(zod_1.z.string()).optional().describe('Map SAML attributes to User fields'),
167
+ displayName: zod_1.z.string().optional().describe('Display name for the provider button'),
168
+ icon: zod_1.z.string().optional().describe('Icon URL or identifier'),
169
+ });
170
+ /**
171
+ * LDAP / Active Directory Enterprise Configuration
172
+ * LDAP configuration for on-premise directory services
173
+ */
174
+ exports.LDAPConfigSchema = zod_1.z.object({
175
+ enabled: zod_1.z.boolean().default(false),
176
+ url: zod_1.z.string().url().describe('LDAP Server URL (ldap:// or ldaps://)'),
177
+ bindDn: zod_1.z.string().describe('Bind DN for LDAP authentication'),
178
+ bindCredentials: zod_1.z.string().describe('Bind credentials'),
179
+ searchBase: zod_1.z.string().describe('Search base DN'),
180
+ searchFilter: zod_1.z.string().describe('Search filter'),
181
+ groupSearchBase: zod_1.z.string().optional().describe('Group search base DN'),
182
+ displayName: zod_1.z.string().optional().describe('Display name for the provider button'),
183
+ icon: zod_1.z.string().optional().describe('Icon URL or identifier'),
184
+ });
185
+ /**
186
+ * Enterprise Authentication Configuration
187
+ * Combines SAML, LDAP, and OIDC configurations for enterprise SSO
188
+ */
189
+ exports.EnterpriseAuthConfigSchema = zod_1.z.object({
190
+ oidc: exports.OIDCConfigSchema.optional().describe('OpenID Connect configuration'),
191
+ saml: exports.SAMLConfigSchema.optional().describe('SAML 2.0 configuration'),
192
+ ldap: exports.LDAPConfigSchema.optional().describe('LDAP/Active Directory configuration'),
193
+ });
142
194
  /**
143
195
  * User Field Mapping Configuration
144
196
  * Maps authentication user fields to ObjectStack user object fields
@@ -161,6 +213,65 @@ exports.DatabaseAdapterSchema = zod_1.z.object({
161
213
  tablePrefix: zod_1.z.string().default('auth_').describe('Prefix for auth tables'),
162
214
  schema: zod_1.z.string().optional().describe('Database schema name'),
163
215
  });
216
+ /**
217
+ * Default field mappings for better-auth compatibility
218
+ * These mappings bridge the gap between ObjectStack standard (Auth.js conventions)
219
+ * and better-auth's field naming conventions
220
+ */
221
+ exports.BETTER_AUTH_FIELD_MAPPINGS = {
222
+ session: {
223
+ sessionToken: 'token',
224
+ expires: 'expiresAt',
225
+ },
226
+ account: {
227
+ providerAccountId: 'accountId',
228
+ provider: 'providerId',
229
+ },
230
+ };
231
+ /**
232
+ * Database Field Mapping Configuration
233
+ * Maps ObjectStack standard field names to driver-specific field names.
234
+ *
235
+ * Useful when the underlying authentication driver (e.g., better-auth) uses
236
+ * different column names than the ObjectStack standard schemas (which follow
237
+ * Auth.js conventions).
238
+ *
239
+ * @example
240
+ * ```typescript
241
+ * mapping: {
242
+ * session: {
243
+ * sessionToken: 'token', // better-auth uses 'token'
244
+ * expires: 'expiresAt' // better-auth uses 'expiresAt'
245
+ * },
246
+ * account: {
247
+ * providerAccountId: 'accountId', // better-auth uses 'accountId'
248
+ * provider: 'providerId' // better-auth uses 'providerId'
249
+ * }
250
+ * }
251
+ * ```
252
+ */
253
+ exports.DatabaseMappingSchema = zod_1.z.object({
254
+ /**
255
+ * User model field mapping
256
+ * Maps ObjectStack User fields to driver fields
257
+ */
258
+ user: zod_1.z.record(zod_1.z.string()).optional().describe('User field mapping (e.g., { "emailVerified": "email_verified" })'),
259
+ /**
260
+ * Session model field mapping
261
+ * Maps ObjectStack Session fields to driver fields
262
+ */
263
+ session: zod_1.z.record(zod_1.z.string()).default(exports.BETTER_AUTH_FIELD_MAPPINGS.session).describe('Session field mapping'),
264
+ /**
265
+ * Account model field mapping
266
+ * Maps ObjectStack Account fields to driver fields
267
+ */
268
+ account: zod_1.z.record(zod_1.z.string()).default(exports.BETTER_AUTH_FIELD_MAPPINGS.account).describe('Account field mapping'),
269
+ /**
270
+ * Verification token field mapping
271
+ * Maps ObjectStack VerificationToken fields to driver fields
272
+ */
273
+ verificationToken: zod_1.z.record(zod_1.z.string()).optional().describe('VerificationToken field mapping'),
274
+ });
164
275
  /**
165
276
  * Authentication Plugin Configuration
166
277
  * Extends authentication with additional features
@@ -271,6 +382,20 @@ exports.AuthConfigSchema = zod_1.z.object({
271
382
  * Two-factor authentication configuration
272
383
  */
273
384
  twoFactor: exports.TwoFactorConfigSchema.optional(),
385
+ /**
386
+ * Organization (Multi-tenant) configuration
387
+ * Enables B2B SaaS scenarios where users belong to multiple teams/workspaces
388
+ */
389
+ organization: zod_1.z.object({
390
+ enabled: zod_1.z.boolean().default(false).describe('Enable organization/multi-tenant features'),
391
+ allowUserToCreateOrg: zod_1.z.boolean().default(true).describe('Allow users to create organizations'),
392
+ defaultRole: zod_1.z.string().default('member').describe('Default role for new members'),
393
+ creatorRole: zod_1.z.string().default('owner').describe('Role assigned to organization creator'),
394
+ }).optional().describe('Organization/multi-tenant configuration'),
395
+ /**
396
+ * Enterprise authentication configuration (SAML, LDAP, OIDC)
397
+ */
398
+ enterprise: exports.EnterpriseAuthConfigSchema.optional(),
274
399
  /**
275
400
  * User field mapping
276
401
  */
@@ -279,6 +404,15 @@ exports.AuthConfigSchema = zod_1.z.object({
279
404
  * Database adapter configuration
280
405
  */
281
406
  database: exports.DatabaseAdapterSchema.optional(),
407
+ /**
408
+ * Database field mapping configuration
409
+ * Maps ObjectStack standard field names to driver-specific field names.
410
+ *
411
+ * This is distinct from the database adapter configuration and provides
412
+ * instructions for the driver to map our standard schema fields to the
413
+ * underlying engine's fields (e.g., better-auth uses 'token' instead of 'sessionToken').
414
+ */
415
+ mapping: exports.DatabaseMappingSchema.optional(),
282
416
  /**
283
417
  * Additional authentication plugins
284
418
  */
@@ -1,204 +1,258 @@
1
1
  import { z } from 'zod';
2
2
  /**
3
- * Authentication Protocol
4
- * Defines supported authentication standards (OIDC, SAML, LDAP).
3
+ * Identity & User Model Specification
4
+ *
5
+ * Defines the standard user, account, and session data models for ObjectStack.
6
+ * These schemas represent "who is logged in" and their associated data.
7
+ *
8
+ * This is separate from authentication configuration (auth.zod.ts) which
9
+ * defines "how to login".
5
10
  */
6
- export declare const AuthProtocol: z.ZodEnum<["oidc", "saml", "ldap", "oauth2", "local", "mock"]>;
7
11
  /**
8
- * OIDC / OAuth2 Config (Standard)
12
+ * User Schema
13
+ * Core user identity data model
9
14
  */
10
- export declare const OIDCConfigSchema: z.ZodObject<{
11
- issuer: z.ZodString;
12
- clientId: z.ZodString;
13
- clientSecret: z.ZodString;
14
- scopes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
15
- attributeMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
15
+ export declare const UserSchema: z.ZodObject<{
16
+ /**
17
+ * Unique user identifier
18
+ */
19
+ id: z.ZodString;
20
+ /**
21
+ * User's email address (primary identifier)
22
+ */
23
+ email: z.ZodString;
24
+ /**
25
+ * Email verification status
26
+ */
27
+ emailVerified: z.ZodDefault<z.ZodBoolean>;
28
+ /**
29
+ * User's display name
30
+ */
31
+ name: z.ZodOptional<z.ZodString>;
32
+ /**
33
+ * User's profile image URL
34
+ */
35
+ image: z.ZodOptional<z.ZodString>;
36
+ /**
37
+ * Account creation timestamp
38
+ */
39
+ createdAt: z.ZodDate;
40
+ /**
41
+ * Last update timestamp
42
+ */
43
+ updatedAt: z.ZodDate;
16
44
  }, "strip", z.ZodTypeAny, {
17
- issuer: string;
18
- clientId: string;
19
- clientSecret: string;
20
- scopes: string[];
21
- attributeMapping?: Record<string, string> | undefined;
45
+ email: string;
46
+ id: string;
47
+ emailVerified: boolean;
48
+ createdAt: Date;
49
+ updatedAt: Date;
50
+ image?: string | undefined;
51
+ name?: string | undefined;
22
52
  }, {
23
- issuer: string;
24
- clientId: string;
25
- clientSecret: string;
26
- scopes?: string[] | undefined;
27
- attributeMapping?: Record<string, string> | undefined;
53
+ email: string;
54
+ id: string;
55
+ createdAt: Date;
56
+ updatedAt: Date;
57
+ image?: string | undefined;
58
+ name?: string | undefined;
59
+ emailVerified?: boolean | undefined;
28
60
  }>;
61
+ export type User = z.infer<typeof UserSchema>;
29
62
  /**
30
- * SAML 2.0 Config (Enterprise)
63
+ * Account Schema
64
+ * Links external OAuth/OIDC/SAML accounts to a user
31
65
  */
32
- export declare const SAMLConfigSchema: z.ZodObject<{
33
- entryPoint: z.ZodString;
34
- cert: z.ZodString;
35
- issuer: z.ZodString;
36
- signatureAlgorithm: z.ZodDefault<z.ZodEnum<["sha256", "sha512"]>>;
37
- attributeMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
66
+ export declare const AccountSchema: z.ZodObject<{
67
+ /**
68
+ * Unique account identifier
69
+ */
70
+ id: z.ZodString;
71
+ /**
72
+ * Associated user ID
73
+ */
74
+ userId: z.ZodString;
75
+ /**
76
+ * Account type/provider
77
+ */
78
+ type: z.ZodEnum<["oauth", "oidc", "email", "credentials", "saml", "ldap"]>;
79
+ /**
80
+ * Provider name (e.g., 'google', 'github', 'okta')
81
+ */
82
+ provider: z.ZodString;
83
+ /**
84
+ * Provider account ID
85
+ */
86
+ providerAccountId: z.ZodString;
87
+ /**
88
+ * OAuth refresh token
89
+ */
90
+ refreshToken: z.ZodOptional<z.ZodString>;
91
+ /**
92
+ * OAuth access token
93
+ */
94
+ accessToken: z.ZodOptional<z.ZodString>;
95
+ /**
96
+ * Token expiry timestamp
97
+ */
98
+ expiresAt: z.ZodOptional<z.ZodNumber>;
99
+ /**
100
+ * OAuth token type
101
+ */
102
+ tokenType: z.ZodOptional<z.ZodString>;
103
+ /**
104
+ * OAuth scope
105
+ */
106
+ scope: z.ZodOptional<z.ZodString>;
107
+ /**
108
+ * OAuth ID token
109
+ */
110
+ idToken: z.ZodOptional<z.ZodString>;
111
+ /**
112
+ * Session state
113
+ */
114
+ sessionState: z.ZodOptional<z.ZodString>;
115
+ /**
116
+ * Account creation timestamp
117
+ */
118
+ createdAt: z.ZodDate;
119
+ /**
120
+ * Last update timestamp
121
+ */
122
+ updatedAt: z.ZodDate;
38
123
  }, "strip", z.ZodTypeAny, {
39
- issuer: string;
40
- entryPoint: string;
41
- cert: string;
42
- signatureAlgorithm: "sha256" | "sha512";
43
- attributeMapping?: Record<string, string> | undefined;
124
+ type: "email" | "oauth" | "oidc" | "credentials" | "saml" | "ldap";
125
+ id: string;
126
+ userId: string;
127
+ createdAt: Date;
128
+ updatedAt: Date;
129
+ provider: string;
130
+ providerAccountId: string;
131
+ scope?: string | undefined;
132
+ refreshToken?: string | undefined;
133
+ accessToken?: string | undefined;
134
+ expiresAt?: number | undefined;
135
+ tokenType?: string | undefined;
136
+ idToken?: string | undefined;
137
+ sessionState?: string | undefined;
44
138
  }, {
45
- issuer: string;
46
- entryPoint: string;
47
- cert: string;
48
- attributeMapping?: Record<string, string> | undefined;
49
- signatureAlgorithm?: "sha256" | "sha512" | undefined;
139
+ type: "email" | "oauth" | "oidc" | "credentials" | "saml" | "ldap";
140
+ id: string;
141
+ userId: string;
142
+ createdAt: Date;
143
+ updatedAt: Date;
144
+ provider: string;
145
+ providerAccountId: string;
146
+ scope?: string | undefined;
147
+ refreshToken?: string | undefined;
148
+ accessToken?: string | undefined;
149
+ expiresAt?: number | undefined;
150
+ tokenType?: string | undefined;
151
+ idToken?: string | undefined;
152
+ sessionState?: string | undefined;
50
153
  }>;
154
+ export type Account = z.infer<typeof AccountSchema>;
51
155
  /**
52
- * LDAP / AD Config (On-premise)
156
+ * Session Schema
157
+ * User session data model
53
158
  */
54
- export declare const LDAPConfigSchema: z.ZodObject<{
55
- url: z.ZodString;
56
- bindDn: z.ZodString;
57
- bindCredentials: z.ZodString;
58
- searchBase: z.ZodString;
59
- searchFilter: z.ZodString;
60
- groupSearchBase: z.ZodOptional<z.ZodString>;
159
+ export declare const SessionSchema: z.ZodObject<{
160
+ /**
161
+ * Unique session identifier
162
+ */
163
+ id: z.ZodString;
164
+ /**
165
+ * Session token
166
+ */
167
+ sessionToken: z.ZodString;
168
+ /**
169
+ * Associated user ID
170
+ */
171
+ userId: z.ZodString;
172
+ /**
173
+ * Active organization ID for this session
174
+ * Used for context switching in multi-tenant applications
175
+ */
176
+ activeOrganizationId: z.ZodOptional<z.ZodString>;
177
+ /**
178
+ * Session expiry timestamp
179
+ */
180
+ expires: z.ZodDate;
181
+ /**
182
+ * Session creation timestamp
183
+ */
184
+ createdAt: z.ZodDate;
185
+ /**
186
+ * Last update timestamp
187
+ */
188
+ updatedAt: z.ZodDate;
189
+ /**
190
+ * IP address of the session
191
+ */
192
+ ipAddress: z.ZodOptional<z.ZodString>;
193
+ /**
194
+ * User agent string
195
+ */
196
+ userAgent: z.ZodOptional<z.ZodString>;
197
+ /**
198
+ * Device fingerprint
199
+ */
200
+ fingerprint: z.ZodOptional<z.ZodString>;
61
201
  }, "strip", z.ZodTypeAny, {
62
- url: string;
63
- bindDn: string;
64
- bindCredentials: string;
65
- searchBase: string;
66
- searchFilter: string;
67
- groupSearchBase?: string | undefined;
202
+ id: string;
203
+ userId: string;
204
+ createdAt: Date;
205
+ updatedAt: Date;
206
+ sessionToken: string;
207
+ expires: Date;
208
+ activeOrganizationId?: string | undefined;
209
+ ipAddress?: string | undefined;
210
+ userAgent?: string | undefined;
211
+ fingerprint?: string | undefined;
68
212
  }, {
69
- url: string;
70
- bindDn: string;
71
- bindCredentials: string;
72
- searchBase: string;
73
- searchFilter: string;
74
- groupSearchBase?: string | undefined;
213
+ id: string;
214
+ userId: string;
215
+ createdAt: Date;
216
+ updatedAt: Date;
217
+ sessionToken: string;
218
+ expires: Date;
219
+ activeOrganizationId?: string | undefined;
220
+ ipAddress?: string | undefined;
221
+ userAgent?: string | undefined;
222
+ fingerprint?: string | undefined;
75
223
  }>;
224
+ export type Session = z.infer<typeof SessionSchema>;
76
225
  /**
77
- * Identity Provider (IdP) Schema
78
- * Connects the OS to an external source of truth for identities.
226
+ * Verification Token Schema
227
+ * Email verification and password reset tokens
79
228
  */
80
- export declare const AuthProviderSchema: z.ZodObject<{
81
- name: z.ZodString;
82
- label: z.ZodString;
83
- type: z.ZodEnum<["oidc", "saml", "ldap", "oauth2", "local", "mock"]>;
84
- /** Configuration (Polymorphic based on type) */
85
- config: z.ZodUnion<[z.ZodObject<{
86
- issuer: z.ZodString;
87
- clientId: z.ZodString;
88
- clientSecret: z.ZodString;
89
- scopes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
90
- attributeMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
91
- }, "strip", z.ZodTypeAny, {
92
- issuer: string;
93
- clientId: string;
94
- clientSecret: string;
95
- scopes: string[];
96
- attributeMapping?: Record<string, string> | undefined;
97
- }, {
98
- issuer: string;
99
- clientId: string;
100
- clientSecret: string;
101
- scopes?: string[] | undefined;
102
- attributeMapping?: Record<string, string> | undefined;
103
- }>, z.ZodObject<{
104
- entryPoint: z.ZodString;
105
- cert: z.ZodString;
106
- issuer: z.ZodString;
107
- signatureAlgorithm: z.ZodDefault<z.ZodEnum<["sha256", "sha512"]>>;
108
- attributeMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
109
- }, "strip", z.ZodTypeAny, {
110
- issuer: string;
111
- entryPoint: string;
112
- cert: string;
113
- signatureAlgorithm: "sha256" | "sha512";
114
- attributeMapping?: Record<string, string> | undefined;
115
- }, {
116
- issuer: string;
117
- entryPoint: string;
118
- cert: string;
119
- attributeMapping?: Record<string, string> | undefined;
120
- signatureAlgorithm?: "sha256" | "sha512" | undefined;
121
- }>, z.ZodObject<{
122
- url: z.ZodString;
123
- bindDn: z.ZodString;
124
- bindCredentials: z.ZodString;
125
- searchBase: z.ZodString;
126
- searchFilter: z.ZodString;
127
- groupSearchBase: z.ZodOptional<z.ZodString>;
128
- }, "strip", z.ZodTypeAny, {
129
- url: string;
130
- bindDn: string;
131
- bindCredentials: string;
132
- searchBase: string;
133
- searchFilter: string;
134
- groupSearchBase?: string | undefined;
135
- }, {
136
- url: string;
137
- bindDn: string;
138
- bindCredentials: string;
139
- searchBase: string;
140
- searchFilter: string;
141
- groupSearchBase?: string | undefined;
142
- }>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
143
- /** Visuals */
144
- icon: z.ZodOptional<z.ZodString>;
145
- /** Policies */
146
- active: z.ZodDefault<z.ZodBoolean>;
147
- registrationEnabled: z.ZodDefault<z.ZodBoolean>;
229
+ export declare const VerificationTokenSchema: z.ZodObject<{
230
+ /**
231
+ * Token identifier (email or phone)
232
+ */
233
+ identifier: z.ZodString;
234
+ /**
235
+ * Verification token
236
+ */
237
+ token: z.ZodString;
238
+ /**
239
+ * Token expiry timestamp
240
+ */
241
+ expires: z.ZodDate;
242
+ /**
243
+ * Token creation timestamp
244
+ */
245
+ createdAt: z.ZodDate;
148
246
  }, "strip", z.ZodTypeAny, {
149
- type: "local" | "oidc" | "saml" | "ldap" | "oauth2" | "mock";
150
- label: string;
151
- name: string;
152
- active: boolean;
153
- config: Record<string, any> | {
154
- issuer: string;
155
- clientId: string;
156
- clientSecret: string;
157
- scopes: string[];
158
- attributeMapping?: Record<string, string> | undefined;
159
- } | {
160
- issuer: string;
161
- entryPoint: string;
162
- cert: string;
163
- signatureAlgorithm: "sha256" | "sha512";
164
- attributeMapping?: Record<string, string> | undefined;
165
- } | {
166
- url: string;
167
- bindDn: string;
168
- bindCredentials: string;
169
- searchBase: string;
170
- searchFilter: string;
171
- groupSearchBase?: string | undefined;
172
- };
173
- registrationEnabled: boolean;
174
- icon?: string | undefined;
247
+ createdAt: Date;
248
+ expires: Date;
249
+ identifier: string;
250
+ token: string;
175
251
  }, {
176
- type: "local" | "oidc" | "saml" | "ldap" | "oauth2" | "mock";
177
- label: string;
178
- name: string;
179
- config: Record<string, any> | {
180
- issuer: string;
181
- clientId: string;
182
- clientSecret: string;
183
- scopes?: string[] | undefined;
184
- attributeMapping?: Record<string, string> | undefined;
185
- } | {
186
- issuer: string;
187
- entryPoint: string;
188
- cert: string;
189
- attributeMapping?: Record<string, string> | undefined;
190
- signatureAlgorithm?: "sha256" | "sha512" | undefined;
191
- } | {
192
- url: string;
193
- bindDn: string;
194
- bindCredentials: string;
195
- searchBase: string;
196
- searchFilter: string;
197
- groupSearchBase?: string | undefined;
198
- };
199
- icon?: string | undefined;
200
- active?: boolean | undefined;
201
- registrationEnabled?: boolean | undefined;
252
+ createdAt: Date;
253
+ expires: Date;
254
+ identifier: string;
255
+ token: string;
202
256
  }>;
203
- export type AuthProvider = z.infer<typeof AuthProviderSchema>;
257
+ export type VerificationToken = z.infer<typeof VerificationTokenSchema>;
204
258
  //# sourceMappingURL=identity.zod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity.zod.d.ts","sourceRoot":"","sources":["../../src/system/identity.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,YAAY,gEAOvB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;EAM3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;EAM3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;EAO3B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;IAK7B,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQhD,cAAc;;IAGd,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGf,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
1
+ {"version":3,"file":"identity.zod.d.ts","s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