alepha 0.10.6 → 0.11.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/api/users.d.ts CHANGED
@@ -2,12 +2,659 @@ import * as _alepha_core0 from "alepha";
2
2
  import { Alepha, Static } from "alepha";
3
3
  import * as _alepha_react_auth0 from "alepha/react/auth";
4
4
  import { OAuth2Profile } from "alepha/react/auth";
5
- import { DateTimeProvider } from "alepha/datetime";
6
- import * as _alepha_postgres233 from "alepha/postgres";
5
+ import * as _alepha_postgres2 from "alepha/postgres";
6
+ import { Page } from "alepha/postgres";
7
+ import * as _alepha_server10 from "alepha/server";
7
8
  import * as _alepha_security0 from "alepha/security";
8
9
  import { CryptoProvider, RealmDescriptor, RealmDescriptorOptions, UserAccount } from "alepha/security";
9
- import * as typebox176 from "typebox";
10
+ import * as _alepha_server_links0 from "alepha/server/links";
11
+ import * as _alepha_api_notifications0 from "alepha/api/notifications";
12
+ import { DateTimeProvider } from "alepha/datetime";
13
+ import * as typebox282 from "typebox";
14
+ import * as dayjs17 from "dayjs";
15
+ import { VerificationController } from "alepha/api/verifications";
10
16
 
17
+ //#region src/entities/identities.d.ts
18
+ declare const identities: _alepha_postgres2.EntityDescriptor<typebox282.TObject<{
19
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
20
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
21
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
22
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
23
+ userId: _alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_REF>;
24
+ provider: typebox282.TString;
25
+ providerUserId: typebox282.TString;
26
+ providerData: typebox282.TOptional<typebox282.TRecord<string, typebox282.TAny>>;
27
+ }>>;
28
+ type IdentityEntity = Static<typeof identities.schema>;
29
+ //#endregion
30
+ //#region src/schemas/identityQuerySchema.d.ts
31
+ declare const identityQuerySchema: typebox282.TObject<{
32
+ page: typebox282.TOptional<typebox282.TInteger>;
33
+ size: typebox282.TOptional<typebox282.TInteger>;
34
+ sort: typebox282.TOptional<typebox282.TString>;
35
+ userId: typebox282.TOptional<typebox282.TString>;
36
+ provider: typebox282.TOptional<typebox282.TString>;
37
+ }>;
38
+ type IdentityQuery = Static<typeof identityQuerySchema>;
39
+ //#endregion
40
+ //#region src/services/IdentityService.d.ts
41
+ declare class IdentityService {
42
+ readonly identities: _alepha_postgres2.RepositoryDescriptor<typebox282.TObject<{
43
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
44
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
45
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
46
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
47
+ userId: _alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_REF>;
48
+ provider: typebox282.TString;
49
+ providerUserId: typebox282.TString;
50
+ providerData: typebox282.TOptional<typebox282.TRecord<string, typebox282.TAny>>;
51
+ }>>;
52
+ /**
53
+ * Find identities with pagination and filtering.
54
+ */
55
+ findIdentities(q?: IdentityQuery): Promise<Page<IdentityEntity>>;
56
+ /**
57
+ * Get an identity by ID.
58
+ */
59
+ getIdentityById(id: string): Promise<IdentityEntity>;
60
+ /**
61
+ * Delete an identity by ID.
62
+ */
63
+ deleteIdentity(id: string): Promise<void>;
64
+ }
65
+ //#endregion
66
+ //#region src/controllers/IdentityController.d.ts
67
+ declare class IdentityController {
68
+ protected readonly url = "/identities";
69
+ protected readonly group = "identities";
70
+ protected readonly identityService: IdentityService;
71
+ /**
72
+ * Find identities with pagination and filtering.
73
+ */
74
+ readonly findIdentities: _alepha_server10.ActionDescriptorFn<{
75
+ query: typebox282.TObject<{
76
+ page: typebox282.TOptional<typebox282.TInteger>;
77
+ size: typebox282.TOptional<typebox282.TInteger>;
78
+ sort: typebox282.TOptional<typebox282.TString>;
79
+ userId: typebox282.TOptional<typebox282.TString>;
80
+ provider: typebox282.TOptional<typebox282.TString>;
81
+ }>;
82
+ response: _alepha_postgres2.TPage<typebox282.TObject<{
83
+ id: typebox282.TString;
84
+ version: typebox282.TNumber;
85
+ createdAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
86
+ updatedAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
87
+ userId: typebox282.TString;
88
+ provider: typebox282.TString;
89
+ providerUserId: typebox282.TString;
90
+ providerData: typebox282.TOptional<typebox282.TRecord<string, typebox282.TAny>>;
91
+ }>>;
92
+ }>;
93
+ /**
94
+ * Get an identity by ID.
95
+ */
96
+ readonly getIdentity: _alepha_server10.ActionDescriptorFn<{
97
+ params: typebox282.TObject<{
98
+ id: typebox282.TString;
99
+ }>;
100
+ response: typebox282.TObject<{
101
+ id: typebox282.TString;
102
+ version: typebox282.TNumber;
103
+ createdAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
104
+ updatedAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
105
+ userId: typebox282.TString;
106
+ provider: typebox282.TString;
107
+ providerUserId: typebox282.TString;
108
+ providerData: typebox282.TOptional<typebox282.TRecord<string, typebox282.TAny>>;
109
+ }>;
110
+ }>;
111
+ /**
112
+ * Delete an identity.
113
+ */
114
+ readonly deleteIdentity: _alepha_server10.ActionDescriptorFn<{
115
+ params: typebox282.TObject<{
116
+ id: typebox282.TString;
117
+ }>;
118
+ response: typebox282.TObject<{
119
+ ok: typebox282.TBoolean;
120
+ id: typebox282.TOptional<typebox282.TUnion<[typebox282.TString, typebox282.TInteger]>>;
121
+ count: typebox282.TOptional<typebox282.TNumber>;
122
+ }>;
123
+ }>;
124
+ }
125
+ //#endregion
126
+ //#region src/entities/sessions.d.ts
127
+ declare const sessions: _alepha_postgres2.EntityDescriptor<typebox282.TObject<{
128
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
129
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
130
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
131
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
132
+ refreshToken: typebox282.TString;
133
+ userId: _alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_REF>;
134
+ expiresAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
135
+ ip: typebox282.TOptional<typebox282.TString>;
136
+ userAgent: typebox282.TOptional<typebox282.TObject<{
137
+ os: typebox282.TString;
138
+ browser: typebox282.TString;
139
+ device: typebox282.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
140
+ }>>;
141
+ }>>;
142
+ type SessionEntity = Static<typeof sessions.schema>;
143
+ //#endregion
144
+ //#region src/schemas/sessionQuerySchema.d.ts
145
+ declare const sessionQuerySchema: typebox282.TObject<{
146
+ page: typebox282.TOptional<typebox282.TInteger>;
147
+ size: typebox282.TOptional<typebox282.TInteger>;
148
+ sort: typebox282.TOptional<typebox282.TString>;
149
+ userId: typebox282.TOptional<typebox282.TString>;
150
+ }>;
151
+ type SessionQuery = Static<typeof sessionQuerySchema>;
152
+ //#endregion
153
+ //#region src/services/SessionCrudService.d.ts
154
+ declare class SessionCrudService {
155
+ readonly sessions: _alepha_postgres2.RepositoryDescriptor<typebox282.TObject<{
156
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
157
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
158
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
159
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
160
+ refreshToken: typebox282.TString;
161
+ userId: _alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_REF>;
162
+ expiresAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
163
+ ip: typebox282.TOptional<typebox282.TString>;
164
+ userAgent: typebox282.TOptional<typebox282.TObject<{
165
+ os: typebox282.TString;
166
+ browser: typebox282.TString;
167
+ device: typebox282.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
168
+ }>>;
169
+ }>>;
170
+ /**
171
+ * Find sessions with pagination and filtering.
172
+ */
173
+ findSessions(q?: SessionQuery): Promise<Page<SessionEntity>>;
174
+ /**
175
+ * Get a session by ID.
176
+ */
177
+ getSessionById(id: string): Promise<SessionEntity>;
178
+ /**
179
+ * Delete a session by ID.
180
+ */
181
+ deleteSession(id: string): Promise<void>;
182
+ }
183
+ //#endregion
184
+ //#region src/controllers/SessionController.d.ts
185
+ declare class SessionController {
186
+ protected readonly url = "/sessions";
187
+ protected readonly group = "sessions";
188
+ protected readonly sessionService: SessionCrudService;
189
+ /**
190
+ * Find sessions with pagination and filtering.
191
+ */
192
+ readonly findSessions: _alepha_server10.ActionDescriptorFn<{
193
+ query: typebox282.TObject<{
194
+ page: typebox282.TOptional<typebox282.TInteger>;
195
+ size: typebox282.TOptional<typebox282.TInteger>;
196
+ sort: typebox282.TOptional<typebox282.TString>;
197
+ userId: typebox282.TOptional<typebox282.TString>;
198
+ }>;
199
+ response: _alepha_postgres2.TPage<typebox282.TObject<{
200
+ id: typebox282.TString;
201
+ version: typebox282.TNumber;
202
+ createdAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
203
+ updatedAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
204
+ refreshToken: typebox282.TString;
205
+ userId: typebox282.TString;
206
+ expiresAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
207
+ ip: typebox282.TOptional<typebox282.TString>;
208
+ userAgent: typebox282.TOptional<typebox282.TObject<{
209
+ os: typebox282.TString;
210
+ browser: typebox282.TString;
211
+ device: typebox282.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
212
+ }>>;
213
+ }>>;
214
+ }>;
215
+ /**
216
+ * Get a session by ID.
217
+ */
218
+ readonly getSession: _alepha_server10.ActionDescriptorFn<{
219
+ params: typebox282.TObject<{
220
+ id: typebox282.TString;
221
+ }>;
222
+ response: typebox282.TObject<{
223
+ id: typebox282.TString;
224
+ version: typebox282.TNumber;
225
+ createdAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
226
+ updatedAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
227
+ refreshToken: typebox282.TString;
228
+ userId: typebox282.TString;
229
+ expiresAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
230
+ ip: typebox282.TOptional<typebox282.TString>;
231
+ userAgent: typebox282.TOptional<typebox282.TObject<{
232
+ os: typebox282.TString;
233
+ browser: typebox282.TString;
234
+ device: typebox282.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
235
+ }>>;
236
+ }>;
237
+ }>;
238
+ /**
239
+ * Delete a session.
240
+ */
241
+ readonly deleteSession: _alepha_server10.ActionDescriptorFn<{
242
+ params: typebox282.TObject<{
243
+ id: typebox282.TString;
244
+ }>;
245
+ response: typebox282.TObject<{
246
+ ok: typebox282.TBoolean;
247
+ id: typebox282.TOptional<typebox282.TUnion<[typebox282.TString, typebox282.TInteger]>>;
248
+ count: typebox282.TOptional<typebox282.TNumber>;
249
+ }>;
250
+ }>;
251
+ }
252
+ //#endregion
253
+ //#region src/notifications/UserNotifications.d.ts
254
+ declare class UserNotifications {
255
+ readonly passwordReset: _alepha_api_notifications0.NotificationDescriptor<typebox282.TObject<{
256
+ email: typebox282.TString;
257
+ resetUrl: typebox282.TString;
258
+ expiresInMinutes: typebox282.TNumber;
259
+ }>>;
260
+ readonly emailVerification: _alepha_api_notifications0.NotificationDescriptor<typebox282.TObject<{
261
+ email: typebox282.TString;
262
+ verifyUrl: typebox282.TString;
263
+ expiresInMinutes: typebox282.TNumber;
264
+ }>>;
265
+ }
266
+ //#endregion
267
+ //#region src/services/CredentialService.d.ts
268
+ declare class CredentialService {
269
+ protected readonly cryptoProvider: CryptoProvider;
270
+ protected readonly verificationController: _alepha_server_links0.HttpVirtualClient<VerificationController>;
271
+ protected readonly userNotifications: UserNotifications;
272
+ readonly users: _alepha_postgres2.RepositoryDescriptor<typebox282.TObject<{
273
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
274
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
275
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
276
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
277
+ email: typebox282.TString;
278
+ roles: typebox282.TArray<typebox282.TString>;
279
+ name: typebox282.TOptional<typebox282.TString>;
280
+ firstName: typebox282.TOptional<typebox282.TString>;
281
+ lastName: typebox282.TOptional<typebox282.TString>;
282
+ picture: typebox282.TOptional<typebox282.TString>;
283
+ enabled: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
284
+ emailVerified: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
285
+ }>>;
286
+ readonly sessions: _alepha_postgres2.RepositoryDescriptor<typebox282.TObject<{
287
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
288
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
289
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
290
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
291
+ refreshToken: typebox282.TString;
292
+ userId: _alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_REF>;
293
+ expiresAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
294
+ ip: typebox282.TOptional<typebox282.TString>;
295
+ userAgent: typebox282.TOptional<typebox282.TObject<{
296
+ os: typebox282.TString;
297
+ browser: typebox282.TString;
298
+ device: typebox282.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
299
+ }>>;
300
+ }>>;
301
+ readonly identities: _alepha_postgres2.RepositoryDescriptor<typebox282.TObject<{
302
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
303
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
304
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
305
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
306
+ userId: _alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_REF>;
307
+ provider: typebox282.TString;
308
+ providerUserId: typebox282.TString;
309
+ providerData: typebox282.TOptional<typebox282.TRecord<string, typebox282.TAny>>;
310
+ }>>;
311
+ /**
312
+ * Request a password reset for a user by email.
313
+ * Uses the verification service for secure token generation and management.
314
+ *
315
+ * @param email - User's email address
316
+ * @param resetUrl - Base URL for the password reset page
317
+ * @returns True if reset was initiated (regardless of whether user exists - for security)
318
+ */
319
+ requestPasswordReset(email: string, resetUrl: string): Promise<boolean>;
320
+ /**
321
+ * Validate a password reset token.
322
+ * Returns email if valid, throws error if invalid/expired.
323
+ */
324
+ validateResetToken(email: string, token: string): Promise<string>;
325
+ /**
326
+ * Reset a user's password using a valid reset token.
327
+ * Validates token, updates password, and invalidates all sessions.
328
+ */
329
+ resetPassword(email: string, token: string, newPassword: string): Promise<void>;
330
+ }
331
+ //#endregion
332
+ //#region src/entities/users.d.ts
333
+ declare const users: _alepha_postgres2.EntityDescriptor<typebox282.TObject<{
334
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
335
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
336
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
337
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
338
+ email: typebox282.TString;
339
+ roles: typebox282.TArray<typebox282.TString>;
340
+ name: typebox282.TOptional<typebox282.TString>;
341
+ firstName: typebox282.TOptional<typebox282.TString>;
342
+ lastName: typebox282.TOptional<typebox282.TString>;
343
+ picture: typebox282.TOptional<typebox282.TString>;
344
+ enabled: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
345
+ emailVerified: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
346
+ }>>;
347
+ type UserEntity = Static<typeof users.schema>;
348
+ //#endregion
349
+ //#region src/schemas/createUserSchema.d.ts
350
+ declare const createUserSchema: typebox282.TObject<{
351
+ email: typebox282.TString;
352
+ name: typebox282.TOptional<typebox282.TString>;
353
+ firstName: typebox282.TOptional<typebox282.TString>;
354
+ lastName: typebox282.TOptional<typebox282.TString>;
355
+ picture: typebox282.TOptional<typebox282.TString>;
356
+ roles: typebox282.TOptional<typebox282.TArray<typebox282.TString>>;
357
+ enabled: typebox282.TOptional<typebox282.TBoolean>;
358
+ emailVerified: typebox282.TOptional<typebox282.TBoolean>;
359
+ }>;
360
+ type CreateUser = Static<typeof createUserSchema>;
361
+ //#endregion
362
+ //#region src/schemas/updateUserSchema.d.ts
363
+ declare const updateUserSchema: typebox282.TObject<{
364
+ name: typebox282.TOptional<typebox282.TString>;
365
+ firstName: typebox282.TOptional<typebox282.TString>;
366
+ lastName: typebox282.TOptional<typebox282.TString>;
367
+ picture: typebox282.TOptional<typebox282.TString>;
368
+ roles: typebox282.TOptional<typebox282.TArray<typebox282.TString>>;
369
+ enabled: typebox282.TOptional<typebox282.TBoolean>;
370
+ }>;
371
+ type UpdateUser = Static<typeof updateUserSchema>;
372
+ //#endregion
373
+ //#region src/schemas/userQuerySchema.d.ts
374
+ declare const userQuerySchema: typebox282.TObject<{
375
+ page: typebox282.TOptional<typebox282.TInteger>;
376
+ size: typebox282.TOptional<typebox282.TInteger>;
377
+ sort: typebox282.TOptional<typebox282.TString>;
378
+ email: typebox282.TOptional<typebox282.TString>;
379
+ enabled: typebox282.TOptional<typebox282.TBoolean>;
380
+ emailVerified: typebox282.TOptional<typebox282.TBoolean>;
381
+ roles: typebox282.TOptional<typebox282.TArray<typebox282.TString>>;
382
+ }>;
383
+ type UserQuery = Static<typeof userQuerySchema>;
384
+ //#endregion
385
+ //#region src/services/UserService.d.ts
386
+ declare class UserService {
387
+ protected readonly verificationController: _alepha_server_links0.HttpVirtualClient<VerificationController>;
388
+ protected readonly userNotifications: UserNotifications;
389
+ readonly users: _alepha_postgres2.RepositoryDescriptor<typebox282.TObject<{
390
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
391
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
392
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
393
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
394
+ email: typebox282.TString;
395
+ roles: typebox282.TArray<typebox282.TString>;
396
+ name: typebox282.TOptional<typebox282.TString>;
397
+ firstName: typebox282.TOptional<typebox282.TString>;
398
+ lastName: typebox282.TOptional<typebox282.TString>;
399
+ picture: typebox282.TOptional<typebox282.TString>;
400
+ enabled: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
401
+ emailVerified: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
402
+ }>>;
403
+ /**
404
+ * Request email verification for a user.
405
+ * Uses the verification service for secure token generation and management.
406
+ *
407
+ * @param email - User's email address
408
+ * @param verifyUrl - Base URL for the email verification page
409
+ * @returns True if verification was initiated
410
+ */
411
+ requestEmailVerification(email: string, verifyUrl: string): Promise<boolean>;
412
+ /**
413
+ * Verify a user's email using a valid verification token.
414
+ * Validates token and updates the user's emailVerified status.
415
+ */
416
+ verifyEmail(email: string, token: string): Promise<void>;
417
+ /**
418
+ * Check if an email is verified.
419
+ *
420
+ * @param email - User's email address
421
+ * @returns True if email is verified, false otherwise
422
+ */
423
+ isEmailVerified(email: string): Promise<boolean>;
424
+ /**
425
+ * Find users with pagination and filtering.
426
+ */
427
+ findUsers(q?: UserQuery): Promise<Page<UserEntity>>;
428
+ /**
429
+ * Get a user by ID.
430
+ */
431
+ getUserById(id: string): Promise<UserEntity>;
432
+ /**
433
+ * Create a new user.
434
+ */
435
+ createUser(data: CreateUser): Promise<UserEntity>;
436
+ /**
437
+ * Update an existing user.
438
+ */
439
+ updateUser(id: string, data: UpdateUser): Promise<UserEntity>;
440
+ /**
441
+ * Delete a user by ID.
442
+ */
443
+ deleteUser(id: string): Promise<void>;
444
+ }
445
+ //#endregion
446
+ //#region src/controllers/UserController.d.ts
447
+ declare class UserController {
448
+ protected readonly url = "/users";
449
+ protected readonly group = "users";
450
+ protected readonly credentialService: CredentialService;
451
+ protected readonly userService: UserService;
452
+ /**
453
+ * Find users with pagination and filtering.
454
+ */
455
+ readonly findUsers: _alepha_server10.ActionDescriptorFn<{
456
+ query: typebox282.TObject<{
457
+ page: typebox282.TOptional<typebox282.TInteger>;
458
+ size: typebox282.TOptional<typebox282.TInteger>;
459
+ sort: typebox282.TOptional<typebox282.TString>;
460
+ email: typebox282.TOptional<typebox282.TString>;
461
+ enabled: typebox282.TOptional<typebox282.TBoolean>;
462
+ emailVerified: typebox282.TOptional<typebox282.TBoolean>;
463
+ roles: typebox282.TOptional<typebox282.TArray<typebox282.TString>>;
464
+ }>;
465
+ response: _alepha_postgres2.TPage<typebox282.TObject<{
466
+ id: typebox282.TString;
467
+ version: typebox282.TNumber;
468
+ createdAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
469
+ updatedAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
470
+ email: typebox282.TString;
471
+ roles: typebox282.TArray<typebox282.TString>;
472
+ name: typebox282.TOptional<typebox282.TString>;
473
+ firstName: typebox282.TOptional<typebox282.TString>;
474
+ lastName: typebox282.TOptional<typebox282.TString>;
475
+ picture: typebox282.TOptional<typebox282.TString>;
476
+ enabled: typebox282.TBoolean;
477
+ emailVerified: typebox282.TBoolean;
478
+ }>>;
479
+ }>;
480
+ /**
481
+ * Get a user by ID.
482
+ */
483
+ readonly getUser: _alepha_server10.ActionDescriptorFn<{
484
+ params: typebox282.TObject<{
485
+ id: typebox282.TString;
486
+ }>;
487
+ response: typebox282.TObject<{
488
+ id: typebox282.TString;
489
+ version: typebox282.TNumber;
490
+ createdAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
491
+ updatedAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
492
+ email: typebox282.TString;
493
+ roles: typebox282.TArray<typebox282.TString>;
494
+ name: typebox282.TOptional<typebox282.TString>;
495
+ firstName: typebox282.TOptional<typebox282.TString>;
496
+ lastName: typebox282.TOptional<typebox282.TString>;
497
+ picture: typebox282.TOptional<typebox282.TString>;
498
+ enabled: typebox282.TBoolean;
499
+ emailVerified: typebox282.TBoolean;
500
+ }>;
501
+ }>;
502
+ /**
503
+ * Create a new user.
504
+ */
505
+ readonly createUser: _alepha_server10.ActionDescriptorFn<{
506
+ body: typebox282.TObject<{
507
+ email: typebox282.TString;
508
+ name: typebox282.TOptional<typebox282.TString>;
509
+ firstName: typebox282.TOptional<typebox282.TString>;
510
+ lastName: typebox282.TOptional<typebox282.TString>;
511
+ picture: typebox282.TOptional<typebox282.TString>;
512
+ roles: typebox282.TOptional<typebox282.TArray<typebox282.TString>>;
513
+ enabled: typebox282.TOptional<typebox282.TBoolean>;
514
+ emailVerified: typebox282.TOptional<typebox282.TBoolean>;
515
+ }>;
516
+ response: typebox282.TObject<{
517
+ id: typebox282.TString;
518
+ version: typebox282.TNumber;
519
+ createdAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
520
+ updatedAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
521
+ email: typebox282.TString;
522
+ roles: typebox282.TArray<typebox282.TString>;
523
+ name: typebox282.TOptional<typebox282.TString>;
524
+ firstName: typebox282.TOptional<typebox282.TString>;
525
+ lastName: typebox282.TOptional<typebox282.TString>;
526
+ picture: typebox282.TOptional<typebox282.TString>;
527
+ enabled: typebox282.TBoolean;
528
+ emailVerified: typebox282.TBoolean;
529
+ }>;
530
+ }>;
531
+ /**
532
+ * Update a user.
533
+ */
534
+ readonly updateUser: _alepha_server10.ActionDescriptorFn<{
535
+ params: typebox282.TObject<{
536
+ id: typebox282.TString;
537
+ }>;
538
+ body: typebox282.TObject<{
539
+ name: typebox282.TOptional<typebox282.TString>;
540
+ firstName: typebox282.TOptional<typebox282.TString>;
541
+ lastName: typebox282.TOptional<typebox282.TString>;
542
+ picture: typebox282.TOptional<typebox282.TString>;
543
+ roles: typebox282.TOptional<typebox282.TArray<typebox282.TString>>;
544
+ enabled: typebox282.TOptional<typebox282.TBoolean>;
545
+ }>;
546
+ response: typebox282.TObject<{
547
+ id: typebox282.TString;
548
+ version: typebox282.TNumber;
549
+ createdAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
550
+ updatedAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
551
+ email: typebox282.TString;
552
+ roles: typebox282.TArray<typebox282.TString>;
553
+ name: typebox282.TOptional<typebox282.TString>;
554
+ firstName: typebox282.TOptional<typebox282.TString>;
555
+ lastName: typebox282.TOptional<typebox282.TString>;
556
+ picture: typebox282.TOptional<typebox282.TString>;
557
+ enabled: typebox282.TBoolean;
558
+ emailVerified: typebox282.TBoolean;
559
+ }>;
560
+ }>;
561
+ /**
562
+ * Delete a user.
563
+ */
564
+ readonly deleteUser: _alepha_server10.ActionDescriptorFn<{
565
+ params: typebox282.TObject<{
566
+ id: typebox282.TString;
567
+ }>;
568
+ response: typebox282.TObject<{
569
+ ok: typebox282.TBoolean;
570
+ id: typebox282.TOptional<typebox282.TUnion<[typebox282.TString, typebox282.TInteger]>>;
571
+ count: typebox282.TOptional<typebox282.TNumber>;
572
+ }>;
573
+ }>;
574
+ /**
575
+ * Request a password reset.
576
+ * Generates a reset token using verification service and sends an email to the user.
577
+ */
578
+ requestPasswordReset: _alepha_server10.ActionDescriptorFn<{
579
+ body: typebox282.TObject<{
580
+ email: typebox282.TString;
581
+ resetUrl: typebox282.TString;
582
+ }>;
583
+ response: typebox282.TObject<{
584
+ success: typebox282.TBoolean;
585
+ message: typebox282.TString;
586
+ }>;
587
+ }>;
588
+ /**
589
+ * Validate a password reset token.
590
+ * Checks if the token is valid and not expired.
591
+ */
592
+ validateResetToken: _alepha_server10.ActionDescriptorFn<{
593
+ query: typebox282.TObject<{
594
+ email: typebox282.TString;
595
+ token: typebox282.TString;
596
+ }>;
597
+ response: typebox282.TObject<{
598
+ valid: typebox282.TBoolean;
599
+ email: typebox282.TOptional<typebox282.TString>;
600
+ }>;
601
+ }>;
602
+ /**
603
+ * Reset password with a valid token.
604
+ * Updates the user's password and invalidates all sessions.
605
+ */
606
+ resetPassword: _alepha_server10.ActionDescriptorFn<{
607
+ body: typebox282.TObject<{
608
+ email: typebox282.TString;
609
+ token: typebox282.TString;
610
+ newPassword: typebox282.TString;
611
+ }>;
612
+ response: typebox282.TObject<{
613
+ success: typebox282.TBoolean;
614
+ message: typebox282.TString;
615
+ }>;
616
+ }>;
617
+ /**
618
+ * Request email verification.
619
+ * Generates a verification token using verification service and sends an email to the user.
620
+ */
621
+ requestEmailVerification: _alepha_server10.ActionDescriptorFn<{
622
+ body: typebox282.TObject<{
623
+ email: typebox282.TString;
624
+ verifyUrl: typebox282.TString;
625
+ }>;
626
+ response: typebox282.TObject<{
627
+ success: typebox282.TBoolean;
628
+ message: typebox282.TString;
629
+ }>;
630
+ }>;
631
+ /**
632
+ * Verify email with a valid token.
633
+ * Updates the user's emailVerified status.
634
+ */
635
+ verifyEmail: _alepha_server10.ActionDescriptorFn<{
636
+ body: typebox282.TObject<{
637
+ email: typebox282.TString;
638
+ token: typebox282.TString;
639
+ }>;
640
+ response: typebox282.TObject<{
641
+ success: typebox282.TBoolean;
642
+ message: typebox282.TString;
643
+ }>;
644
+ }>;
645
+ /**
646
+ * Check if an email is verified.
647
+ */
648
+ checkEmailVerification: _alepha_server10.ActionDescriptorFn<{
649
+ query: typebox282.TObject<{
650
+ email: typebox282.TString;
651
+ }>;
652
+ response: typebox282.TObject<{
653
+ verified: typebox282.TBoolean;
654
+ }>;
655
+ }>;
656
+ }
657
+ //#endregion
11
658
  //#region src/descriptors/$authApple.d.ts
12
659
  /**
13
660
  * TODO: Implement Apple authentication
@@ -62,275 +709,157 @@ declare const $realmUsers: (options?: {
62
709
  realm?: Partial<RealmDescriptorOptions>;
63
710
  }) => _alepha_security0.RealmDescriptor;
64
711
  //#endregion
65
- //#region src/entities/identities.d.ts
66
- declare const identities: _alepha_postgres233.PgTableWithColumnsAndSchema<_alepha_postgres233.PgTableConfig<"identities", typebox176.TObject<{
67
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
68
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
69
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
70
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
71
- userId: _alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_REF>;
72
- provider: typebox176.TString;
73
- providerUserId: typebox176.TString;
74
- providerData: typebox176.TOptional<typebox176.TRecord<string, typebox176.TAny>>;
75
- }>, _alepha_postgres233.FromSchema<typebox176.TObject<{
76
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
77
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
78
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
79
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
80
- userId: _alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_REF>;
81
- provider: typebox176.TString;
82
- providerUserId: typebox176.TString;
83
- providerData: typebox176.TOptional<typebox176.TRecord<string, typebox176.TAny>>;
84
- }>>>, typebox176.TObject<{
85
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
86
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
87
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
88
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
89
- userId: _alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_REF>;
90
- provider: typebox176.TString;
91
- providerUserId: typebox176.TString;
92
- providerData: typebox176.TOptional<typebox176.TRecord<string, typebox176.TAny>>;
93
- }>>;
94
- type IdentityEntity = Static<typeof identities.$schema>;
712
+ //#region src/schemas/identityResourceSchema.d.ts
713
+ declare const identityResourceSchema: typebox282.TObject<{
714
+ id: typebox282.TString;
715
+ version: typebox282.TNumber;
716
+ createdAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
717
+ updatedAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
718
+ userId: typebox282.TString;
719
+ provider: typebox282.TString;
720
+ providerUserId: typebox282.TString;
721
+ providerData: typebox282.TOptional<typebox282.TRecord<string, typebox282.TAny>>;
722
+ }>;
723
+ type IdentityResource = Static<typeof identityResourceSchema>;
95
724
  //#endregion
96
- //#region src/entities/sessions.d.ts
97
- declare const sessions: _alepha_postgres233.PgTableWithColumnsAndSchema<_alepha_postgres233.PgTableConfig<"sessions", typebox176.TObject<{
98
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
99
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
100
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
101
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
102
- refreshToken: typebox176.TString;
103
- userId: _alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_REF>;
104
- expiresAt: typebox176.TString;
105
- ip: typebox176.TOptional<typebox176.TString>;
106
- userAgent: typebox176.TOptional<typebox176.TObject<{
107
- os: typebox176.TString;
108
- browser: typebox176.TString;
109
- device: typebox176.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
110
- }>>;
111
- }>, _alepha_postgres233.FromSchema<typebox176.TObject<{
112
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
113
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
114
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
115
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
116
- refreshToken: typebox176.TString;
117
- userId: _alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_REF>;
118
- expiresAt: typebox176.TString;
119
- ip: typebox176.TOptional<typebox176.TString>;
120
- userAgent: typebox176.TOptional<typebox176.TObject<{
121
- os: typebox176.TString;
122
- browser: typebox176.TString;
123
- device: typebox176.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
124
- }>>;
125
- }>>>, typebox176.TObject<{
126
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
127
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
128
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
129
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
130
- refreshToken: typebox176.TString;
131
- userId: _alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_REF>;
132
- expiresAt: typebox176.TString;
133
- ip: typebox176.TOptional<typebox176.TString>;
134
- userAgent: typebox176.TOptional<typebox176.TObject<{
135
- os: typebox176.TString;
136
- browser: typebox176.TString;
137
- device: typebox176.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
725
+ //#region src/schemas/sessionResourceSchema.d.ts
726
+ declare const sessionResourceSchema: typebox282.TObject<{
727
+ id: typebox282.TString;
728
+ version: typebox282.TNumber;
729
+ createdAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
730
+ updatedAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
731
+ refreshToken: typebox282.TString;
732
+ userId: typebox282.TString;
733
+ expiresAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
734
+ ip: typebox282.TOptional<typebox282.TString>;
735
+ userAgent: typebox282.TOptional<typebox282.TObject<{
736
+ os: typebox282.TString;
737
+ browser: typebox282.TString;
738
+ device: typebox282.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
138
739
  }>>;
139
- }>>;
140
- type SessionEntity = Static<typeof sessions.$schema>;
740
+ }>;
741
+ type SessionResource = Static<typeof sessionResourceSchema>;
141
742
  //#endregion
142
- //#region src/entities/users.d.ts
143
- declare const users: _alepha_postgres233.PgTableWithColumnsAndSchema<_alepha_postgres233.PgTableConfig<"users", typebox176.TObject<{
144
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
145
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
146
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
147
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
148
- email: typebox176.TString;
149
- roles: typebox176.TArray<typebox176.TString>;
150
- name: typebox176.TOptional<typebox176.TString>;
151
- firstName: typebox176.TOptional<typebox176.TString>;
152
- lastName: typebox176.TOptional<typebox176.TString>;
153
- picture: typebox176.TOptional<typebox176.TString>;
154
- enabled: _alepha_postgres233.PgAttr<typebox176.TBoolean, typeof _alepha_postgres233.PG_DEFAULT>;
155
- emailVerified: _alepha_postgres233.PgAttr<typebox176.TBoolean, typeof _alepha_postgres233.PG_DEFAULT>;
156
- }>, _alepha_postgres233.FromSchema<typebox176.TObject<{
157
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
158
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
159
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
160
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
161
- email: typebox176.TString;
162
- roles: typebox176.TArray<typebox176.TString>;
163
- name: typebox176.TOptional<typebox176.TString>;
164
- firstName: typebox176.TOptional<typebox176.TString>;
165
- lastName: typebox176.TOptional<typebox176.TString>;
166
- picture: typebox176.TOptional<typebox176.TString>;
167
- enabled: _alepha_postgres233.PgAttr<typebox176.TBoolean, typeof _alepha_postgres233.PG_DEFAULT>;
168
- emailVerified: _alepha_postgres233.PgAttr<typebox176.TBoolean, typeof _alepha_postgres233.PG_DEFAULT>;
169
- }>>>, typebox176.TObject<{
170
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
171
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
172
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
173
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
174
- email: typebox176.TString;
175
- roles: typebox176.TArray<typebox176.TString>;
176
- name: typebox176.TOptional<typebox176.TString>;
177
- firstName: typebox176.TOptional<typebox176.TString>;
178
- lastName: typebox176.TOptional<typebox176.TString>;
179
- picture: typebox176.TOptional<typebox176.TString>;
180
- enabled: _alepha_postgres233.PgAttr<typebox176.TBoolean, typeof _alepha_postgres233.PG_DEFAULT>;
181
- emailVerified: _alepha_postgres233.PgAttr<typebox176.TBoolean, typeof _alepha_postgres233.PG_DEFAULT>;
182
- }>>;
183
- type UserEntity = Static<typeof users.$schema>;
743
+ //#region src/schemas/userResourceSchema.d.ts
744
+ declare const userResourceSchema: typebox282.TObject<{
745
+ id: typebox282.TString;
746
+ version: typebox282.TNumber;
747
+ createdAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
748
+ updatedAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
749
+ email: typebox282.TString;
750
+ roles: typebox282.TArray<typebox282.TString>;
751
+ name: typebox282.TOptional<typebox282.TString>;
752
+ firstName: typebox282.TOptional<typebox282.TString>;
753
+ lastName: typebox282.TOptional<typebox282.TString>;
754
+ picture: typebox282.TOptional<typebox282.TString>;
755
+ enabled: typebox282.TBoolean;
756
+ emailVerified: typebox282.TBoolean;
757
+ }>;
758
+ type UserResource = Static<typeof userResourceSchema>;
184
759
  //#endregion
185
760
  //#region src/services/SessionService.d.ts
186
761
  declare class SessionService {
187
762
  protected readonly alepha: Alepha;
188
763
  protected readonly dateTimeProvider: DateTimeProvider;
189
764
  protected readonly cryptoProvider: CryptoProvider;
190
- readonly users: _alepha_postgres233.RepositoryDescriptor<_alepha_postgres233.PgTableConfig<"users", typebox176.TObject<{
191
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
192
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
193
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
194
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
195
- email: typebox176.TString;
196
- roles: typebox176.TArray<typebox176.TString>;
197
- name: typebox176.TOptional<typebox176.TString>;
198
- firstName: typebox176.TOptional<typebox176.TString>;
199
- lastName: typebox176.TOptional<typebox176.TString>;
200
- picture: typebox176.TOptional<typebox176.TString>;
201
- enabled: _alepha_postgres233.PgAttr<typebox176.TBoolean, typeof _alepha_postgres233.PG_DEFAULT>;
202
- emailVerified: _alepha_postgres233.PgAttr<typebox176.TBoolean, typeof _alepha_postgres233.PG_DEFAULT>;
203
- }>, _alepha_postgres233.FromSchema<typebox176.TObject<{
204
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
205
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
206
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
207
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
208
- email: typebox176.TString;
209
- roles: typebox176.TArray<typebox176.TString>;
210
- name: typebox176.TOptional<typebox176.TString>;
211
- firstName: typebox176.TOptional<typebox176.TString>;
212
- lastName: typebox176.TOptional<typebox176.TString>;
213
- picture: typebox176.TOptional<typebox176.TString>;
214
- enabled: _alepha_postgres233.PgAttr<typebox176.TBoolean, typeof _alepha_postgres233.PG_DEFAULT>;
215
- emailVerified: _alepha_postgres233.PgAttr<typebox176.TBoolean, typeof _alepha_postgres233.PG_DEFAULT>;
216
- }>>>, typebox176.TObject<{
217
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
218
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
219
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
220
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
221
- email: typebox176.TString;
222
- roles: typebox176.TArray<typebox176.TString>;
223
- name: typebox176.TOptional<typebox176.TString>;
224
- firstName: typebox176.TOptional<typebox176.TString>;
225
- lastName: typebox176.TOptional<typebox176.TString>;
226
- picture: typebox176.TOptional<typebox176.TString>;
227
- enabled: _alepha_postgres233.PgAttr<typebox176.TBoolean, typeof _alepha_postgres233.PG_DEFAULT>;
228
- emailVerified: _alepha_postgres233.PgAttr<typebox176.TBoolean, typeof _alepha_postgres233.PG_DEFAULT>;
765
+ readonly users: _alepha_postgres2.RepositoryDescriptor<typebox282.TObject<{
766
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
767
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
768
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
769
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
770
+ email: typebox282.TString;
771
+ roles: typebox282.TArray<typebox282.TString>;
772
+ name: typebox282.TOptional<typebox282.TString>;
773
+ firstName: typebox282.TOptional<typebox282.TString>;
774
+ lastName: typebox282.TOptional<typebox282.TString>;
775
+ picture: typebox282.TOptional<typebox282.TString>;
776
+ enabled: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
777
+ emailVerified: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
229
778
  }>>;
230
- readonly sessions: _alepha_postgres233.RepositoryDescriptor<_alepha_postgres233.PgTableConfig<"sessions", typebox176.TObject<{
231
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
232
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
233
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
234
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
235
- refreshToken: typebox176.TString;
236
- userId: _alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_REF>;
237
- expiresAt: typebox176.TString;
238
- ip: typebox176.TOptional<typebox176.TString>;
239
- userAgent: typebox176.TOptional<typebox176.TObject<{
240
- os: typebox176.TString;
241
- browser: typebox176.TString;
242
- device: typebox176.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
243
- }>>;
244
- }>, _alepha_postgres233.FromSchema<typebox176.TObject<{
245
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
246
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
247
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
248
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
249
- refreshToken: typebox176.TString;
250
- userId: _alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_REF>;
251
- expiresAt: typebox176.TString;
252
- ip: typebox176.TOptional<typebox176.TString>;
253
- userAgent: typebox176.TOptional<typebox176.TObject<{
254
- os: typebox176.TString;
255
- browser: typebox176.TString;
256
- device: typebox176.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
257
- }>>;
258
- }>>>, typebox176.TObject<{
259
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
260
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
261
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
262
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
263
- refreshToken: typebox176.TString;
264
- userId: _alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_REF>;
265
- expiresAt: typebox176.TString;
266
- ip: typebox176.TOptional<typebox176.TString>;
267
- userAgent: typebox176.TOptional<typebox176.TObject<{
268
- os: typebox176.TString;
269
- browser: typebox176.TString;
270
- device: typebox176.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
779
+ readonly sessions: _alepha_postgres2.RepositoryDescriptor<typebox282.TObject<{
780
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
781
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
782
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
783
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
784
+ refreshToken: typebox282.TString;
785
+ userId: _alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_REF>;
786
+ expiresAt: typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>;
787
+ ip: typebox282.TOptional<typebox282.TString>;
788
+ userAgent: typebox282.TOptional<typebox282.TObject<{
789
+ os: typebox282.TString;
790
+ browser: typebox282.TString;
791
+ device: typebox282.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
271
792
  }>>;
272
793
  }>>;
273
- readonly identities: _alepha_postgres233.RepositoryDescriptor<_alepha_postgres233.PgTableConfig<"identities", typebox176.TObject<{
274
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
275
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
276
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
277
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
278
- userId: _alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_REF>;
279
- provider: typebox176.TString;
280
- providerUserId: typebox176.TString;
281
- providerData: typebox176.TOptional<typebox176.TRecord<string, typebox176.TAny>>;
282
- }>, _alepha_postgres233.FromSchema<typebox176.TObject<{
283
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
284
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
285
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
286
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
287
- userId: _alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_REF>;
288
- provider: typebox176.TString;
289
- providerUserId: typebox176.TString;
290
- providerData: typebox176.TOptional<typebox176.TRecord<string, typebox176.TAny>>;
291
- }>>>, typebox176.TObject<{
292
- id: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_PRIMARY_KEY>, typeof _alepha_postgres233.PG_DEFAULT>;
293
- version: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TInteger, typeof _alepha_postgres233.PG_VERSION>, typeof _alepha_postgres233.PG_DEFAULT>;
294
- createdAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_CREATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
295
- updatedAt: _alepha_postgres233.PgAttr<_alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_UPDATED_AT>, typeof _alepha_postgres233.PG_DEFAULT>;
296
- userId: _alepha_postgres233.PgAttr<typebox176.TString, typeof _alepha_postgres233.PG_REF>;
297
- provider: typebox176.TString;
298
- providerUserId: typebox176.TString;
299
- providerData: typebox176.TOptional<typebox176.TRecord<string, typebox176.TAny>>;
794
+ readonly identities: _alepha_postgres2.RepositoryDescriptor<typebox282.TObject<{
795
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
796
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
797
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
798
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
799
+ userId: _alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_REF>;
800
+ provider: typebox282.TString;
801
+ providerUserId: typebox282.TString;
802
+ providerData: typebox282.TOptional<typebox282.TRecord<string, typebox282.TAny>>;
300
803
  }>>;
301
- login(provider: string, username: string, password: string): Promise<{
302
- name?: string | undefined;
303
- firstName?: string | undefined;
304
- lastName?: string | undefined;
305
- picture?: string | undefined;
306
- id: string;
307
- version: number;
308
- createdAt: string;
309
- updatedAt: string;
310
- email: string;
311
- roles: string[];
312
- enabled: boolean;
313
- emailVerified: boolean;
314
- }>;
804
+ login(provider: string, username: string, password: string): Promise<_alepha_postgres2.PgStatic<typebox282.TObject<{
805
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
806
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
807
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
808
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
809
+ email: typebox282.TString;
810
+ roles: typebox282.TArray<typebox282.TString>;
811
+ name: typebox282.TOptional<typebox282.TString>;
812
+ firstName: typebox282.TOptional<typebox282.TString>;
813
+ lastName: typebox282.TOptional<typebox282.TString>;
814
+ picture: typebox282.TOptional<typebox282.TString>;
815
+ enabled: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
816
+ emailVerified: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
817
+ }>, _alepha_postgres2.PgRelationMap<typebox282.TObject<{
818
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
819
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
820
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
821
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
822
+ email: typebox282.TString;
823
+ roles: typebox282.TArray<typebox282.TString>;
824
+ name: typebox282.TOptional<typebox282.TString>;
825
+ firstName: typebox282.TOptional<typebox282.TString>;
826
+ lastName: typebox282.TOptional<typebox282.TString>;
827
+ picture: typebox282.TOptional<typebox282.TString>;
828
+ enabled: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
829
+ emailVerified: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
830
+ }>>>>;
315
831
  createSession(user: UserAccount, expiresIn: number): Promise<{
316
832
  refreshToken: string;
317
833
  sessionId: string;
318
834
  }>;
319
835
  refreshSession(refreshToken: string): Promise<{
320
- user: {
321
- name?: string | undefined;
322
- firstName?: string | undefined;
323
- lastName?: string | undefined;
324
- picture?: string | undefined;
325
- id: string;
326
- version: number;
327
- createdAt: string;
328
- updatedAt: string;
329
- email: string;
330
- roles: string[];
331
- enabled: boolean;
332
- emailVerified: boolean;
333
- };
836
+ user: _alepha_postgres2.PgStatic<typebox282.TObject<{
837
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
838
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
839
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
840
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
841
+ email: typebox282.TString;
842
+ roles: typebox282.TArray<typebox282.TString>;
843
+ name: typebox282.TOptional<typebox282.TString>;
844
+ firstName: typebox282.TOptional<typebox282.TString>;
845
+ lastName: typebox282.TOptional<typebox282.TString>;
846
+ picture: typebox282.TOptional<typebox282.TString>;
847
+ enabled: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
848
+ emailVerified: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
849
+ }>, _alepha_postgres2.PgRelationMap<typebox282.TObject<{
850
+ id: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TString, typeof _alepha_postgres2.PG_PRIMARY_KEY>, typeof _alepha_postgres2.PG_DEFAULT>;
851
+ version: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TInteger, typeof _alepha_postgres2.PG_VERSION>, typeof _alepha_postgres2.PG_DEFAULT>;
852
+ createdAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_CREATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
853
+ updatedAt: _alepha_postgres2.PgAttr<_alepha_postgres2.PgAttr<typebox282.TCodec<typebox282.TString, dayjs17.Dayjs>, typeof _alepha_postgres2.PG_UPDATED_AT>, typeof _alepha_postgres2.PG_DEFAULT>;
854
+ email: typebox282.TString;
855
+ roles: typebox282.TArray<typebox282.TString>;
856
+ name: typebox282.TOptional<typebox282.TString>;
857
+ firstName: typebox282.TOptional<typebox282.TString>;
858
+ lastName: typebox282.TOptional<typebox282.TString>;
859
+ picture: typebox282.TOptional<typebox282.TString>;
860
+ enabled: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
861
+ emailVerified: _alepha_postgres2.PgAttr<typebox282.TBoolean, typeof _alepha_postgres2.PG_DEFAULT>;
862
+ }>>>;
334
863
  expiresIn: number;
335
864
  sessionId: string;
336
865
  }>;
@@ -340,14 +869,14 @@ declare class SessionService {
340
869
  firstName?: string | undefined;
341
870
  lastName?: string | undefined;
342
871
  picture?: string | undefined;
343
- id: string;
344
- version: number;
345
- createdAt: string;
346
- updatedAt: string;
347
872
  email: string;
348
- roles: string[];
349
873
  enabled: boolean;
350
874
  emailVerified: boolean;
875
+ roles: string[];
876
+ id: string;
877
+ version: number;
878
+ createdAt: dayjs17.Dayjs;
879
+ updatedAt: dayjs17.Dayjs;
351
880
  } | {
352
881
  sub: string;
353
882
  email?: string;
@@ -385,11 +914,11 @@ declare class SessionService {
385
914
  * Provides user management API endpoints for Alepha applications.
386
915
  *
387
916
  * This module includes user CRUD operations, authentication endpoints,
388
- * and user profile management capabilities.
917
+ * password reset functionality, and user profile management capabilities.
389
918
  *
390
919
  * @module alepha.api.users
391
920
  */
392
921
  declare const AlephaApiUsers: _alepha_core0.Service<_alepha_core0.Module<{}>>;
393
922
  //#endregion
394
- export { $authApple, $authCredentials, $authGithub, $authGoogle, $realmUsers, AlephaApiUsers, IdentityEntity, SessionEntity, SessionService, UserEntity, identities, sessions, users };
923
+ export { $authApple, $authCredentials, $authGithub, $authGoogle, $realmUsers, AlephaApiUsers, CreateUser, CredentialService, IdentityController, IdentityEntity, IdentityQuery, IdentityResource, IdentityService, SessionController, SessionCrudService, SessionEntity, SessionQuery, SessionResource, SessionService, UpdateUser, UserController, UserEntity, UserQuery, UserResource, UserService, createUserSchema, identities, identityQuerySchema, identityResourceSchema, sessionQuerySchema, sessionResourceSchema, sessions, updateUserSchema, userQuerySchema, userResourceSchema, users };
395
924
  //# sourceMappingURL=index.d.ts.map