@alepha/ui 0.13.6 → 0.13.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/AdminAudits-CwvH8e8c.js +215 -0
- package/dist/admin/AdminAudits-CwvH8e8c.js.map +1 -0
- package/dist/admin/AdminAudits-Dv8Vk_6r.js +3 -0
- package/dist/admin/AdminFiles-5CPA3lQk.js +3 -0
- package/dist/admin/{AdminFiles-B_jfB_Py.js → AdminFiles-C_w1tb_x.js} +4 -3
- package/dist/admin/AdminFiles-C_w1tb_x.js.map +1 -0
- package/dist/admin/AdminLayout-BnSmtA4x.js +3 -0
- package/dist/admin/AdminLayout-XiSivwWH.js +39 -0
- package/dist/admin/AdminLayout-XiSivwWH.js.map +1 -0
- package/dist/admin/AdminNotifications-DLjmZWtf.js +3 -0
- package/dist/admin/{AdminNotifications-BFEjqpqx.js → AdminNotifications-DuYy74AN.js} +3 -3
- package/dist/admin/AdminNotifications-DuYy74AN.js.map +1 -0
- package/dist/admin/AdminParameters-DYg48Jwe.js +3 -0
- package/dist/admin/AdminParameters-YagqWTG3.js +575 -0
- package/dist/admin/AdminParameters-YagqWTG3.js.map +1 -0
- package/dist/admin/{AdminSessions-D7DESfWK.js → AdminSessions-BCjgJ-93.js} +4 -4
- package/dist/admin/AdminSessions-BCjgJ-93.js.map +1 -0
- package/dist/admin/AdminSessions-DEh2uN-4.js +3 -0
- package/dist/admin/AdminUserAudits-B_PUXCKC.js +177 -0
- package/dist/admin/AdminUserAudits-B_PUXCKC.js.map +1 -0
- package/dist/admin/AdminUserAudits-D7cTcElL.js +3 -0
- package/dist/admin/{AdminUserCreate-Bhxsn92l.js → AdminUserCreate-DzfRbGZ4.js} +4 -4
- package/dist/admin/AdminUserCreate-DzfRbGZ4.js.map +1 -0
- package/dist/admin/{AdminUserCreate-CYI_xW5T.js → AdminUserCreate-oUA1KDIl.js} +1 -1
- package/dist/admin/{AdminUserDetails-C2y1Ig4n.js → AdminUserDetails-DeTrJm-t.js} +5 -5
- package/dist/admin/AdminUserDetails-DeTrJm-t.js.map +1 -0
- package/dist/admin/{AdminUserDetails-Cmzx9HxH.js → AdminUserDetails-y1H5DW8Y.js} +1 -1
- package/dist/admin/{AdminUserLayout-sW6cjZL0.js → AdminUserLayout-CsfrrZkD.js} +4 -7
- package/dist/admin/AdminUserLayout-CsfrrZkD.js.map +1 -0
- package/dist/admin/{AdminUserLayout-DGSf612u.js → AdminUserLayout-Dejnz13m.js} +1 -1
- package/dist/admin/AdminUserSessions-Bbhcpz4k.js +3 -0
- package/dist/admin/{AdminUserSessions-CvN15wPe.js → AdminUserSessions-DO9H85O-.js} +4 -4
- package/dist/admin/AdminUserSessions-DO9H85O-.js.map +1 -0
- package/dist/admin/{AdminUserSettings-DvaaxgcV.js → AdminUserSettings-B3jA8g3p.js} +4 -4
- package/dist/admin/AdminUserSettings-B3jA8g3p.js.map +1 -0
- package/dist/admin/AdminUserSettings-CE0xpbQc.js +3 -0
- package/dist/admin/AdminUsers-CegGZDhW.js +3 -0
- package/dist/admin/{AdminUsers-BR3C-jrg.js → AdminUsers-ebbrJBT0.js} +13 -17
- package/dist/admin/AdminUsers-ebbrJBT0.js.map +1 -0
- package/dist/admin/index.d.ts +2700 -1178
- package/dist/admin/index.js +65 -62
- package/dist/admin/index.js.map +1 -1
- package/dist/auth/AuthLayout-BAZJHzDG.js +23 -0
- package/dist/auth/AuthLayout-BAZJHzDG.js.map +1 -0
- package/dist/auth/{Login-7HlBjDeV.js → Login-CeNZZjrr.js} +80 -44
- package/dist/auth/Login-CeNZZjrr.js.map +1 -0
- package/dist/auth/Login-hQcu1nlu.js +4 -0
- package/dist/auth/Register-B6HBNVHS.js +4 -0
- package/dist/auth/{Register-CuQr3kgi.js → Register-s4ENeyiE.js} +131 -91
- package/dist/auth/Register-s4ENeyiE.js.map +1 -0
- package/dist/auth/ResetPassword-Cjd-W-Nu.js +3 -0
- package/dist/auth/ResetPassword-GLIFkJT7.js +278 -0
- package/dist/auth/ResetPassword-GLIFkJT7.js.map +1 -0
- package/dist/auth/index.d.ts +605 -532
- package/dist/auth/index.js +26 -18
- package/dist/auth/index.js.map +1 -1
- package/dist/core/index.d.ts +425 -155
- package/dist/core/index.js +1751 -1369
- package/dist/core/index.js.map +1 -1
- package/package.json +23 -20
- package/src/admin/AdminRouter.ts +70 -16
- package/src/admin/components/AdminLayout.tsx +41 -61
- package/src/admin/components/audits/AdminAudits.tsx +240 -0
- package/src/admin/components/{AdminFiles.tsx → files/AdminFiles.tsx} +1 -1
- package/src/admin/components/{AdminJobs.tsx → jobs/AdminJobs.tsx} +1 -1
- package/src/admin/components/parameters/AdminParameters.tsx +137 -0
- package/src/admin/components/parameters/ParameterDetails.tsx +228 -0
- package/src/admin/components/parameters/ParameterHistory.tsx +146 -0
- package/src/admin/components/parameters/ParameterTree.tsx +146 -0
- package/src/admin/components/parameters/types.ts +35 -0
- package/src/admin/components/{AdminSessions.tsx → sessions/AdminSessions.tsx} +1 -1
- package/src/admin/components/users/AdminUserAudits.tsx +183 -0
- package/src/admin/components/{AdminUserCreate.tsx → users/AdminUserCreate.tsx} +1 -1
- package/src/admin/components/{AdminUserLayout.tsx → users/AdminUserLayout.tsx} +1 -4
- package/src/admin/components/{AdminUserSettings.tsx → users/AdminUserSettings.tsx} +1 -1
- package/src/admin/components/{AdminUsers.tsx → users/AdminUsers.tsx} +10 -12
- package/src/admin/index.ts +24 -16
- package/src/auth/AuthRouter.ts +23 -17
- package/src/auth/components/AuthLayout.tsx +6 -3
- package/src/auth/components/Login.tsx +109 -47
- package/src/auth/components/Register.tsx +158 -94
- package/src/auth/components/ResetPassword.tsx +51 -5
- package/src/auth/components/buttons/UserButton.tsx +2 -0
- package/src/core/atoms/alephaThemeAtom.ts +13 -0
- package/src/core/atoms/alephaThemeListAtom.ts +10 -0
- package/src/core/atoms/themes/default.ts +6 -0
- package/src/core/{themes → atoms/themes}/midnight.ts +3 -5
- package/src/core/components/buttons/ActionButton.tsx +33 -26
- package/src/core/components/buttons/DarkModeButton.tsx +0 -1
- package/src/core/components/buttons/ThemeButton.tsx +10 -7
- package/src/core/components/buttons/ToggleSidebarButton.tsx +19 -16
- package/src/core/components/data/ErrorViewer.tsx +171 -0
- package/src/core/components/data/JsonViewer.tsx +147 -138
- package/src/core/components/form/Control.tsx +95 -18
- package/src/core/components/form/ControlArray.tsx +377 -0
- package/src/core/components/form/ControlObject.tsx +127 -0
- package/src/core/components/form/TypeForm.tsx +99 -37
- package/src/core/components/layout/AdminShell.tsx +14 -1
- package/src/core/components/layout/AlephaMantineProvider.tsx +7 -3
- package/src/core/components/layout/Omnibar.tsx +1 -1
- package/src/core/components/layout/Sidebar.tsx +47 -14
- package/src/core/components/table/ColumnPicker.tsx +126 -0
- package/src/core/components/table/DataTable.tsx +354 -181
- package/src/core/components/table/DataTableFilters.tsx +64 -0
- package/src/core/components/table/DataTablePagination.tsx +59 -0
- package/src/core/components/table/DataTableToolbar.tsx +126 -0
- package/src/core/components/table/FilterPicker.tsx +138 -0
- package/src/core/components/table/types.ts +199 -0
- package/src/core/helpers/isComponentType.ts +9 -0
- package/src/core/helpers/renderIcon.tsx +13 -0
- package/src/core/hooks/useTheme.ts +24 -18
- package/src/core/index.ts +24 -3
- package/src/core/interfaces/AlephaTheme.ts +8 -0
- package/src/core/providers/ThemeProvider.ts +44 -62
- package/src/core/services/DialogService.tsx +24 -0
- package/src/core/utils/parseInput.ts +2 -2
- package/styles.css +1 -1
- package/dist/admin/AdminFiles-B-0UcHVV.js +0 -3
- package/dist/admin/AdminFiles-B_jfB_Py.js.map +0 -1
- package/dist/admin/AdminLayout-BMtiXAzS.js +0 -396
- package/dist/admin/AdminLayout-BMtiXAzS.js.map +0 -1
- package/dist/admin/AdminLayout-BNo3GoHR.js +0 -3
- package/dist/admin/AdminNotifications-BFEjqpqx.js.map +0 -1
- package/dist/admin/AdminNotifications-DJs2ZjNj.js +0 -3
- package/dist/admin/AdminSessions-D7DESfWK.js.map +0 -1
- package/dist/admin/AdminSessions-PS2M8iXi.js +0 -3
- package/dist/admin/AdminUserCreate-Bhxsn92l.js.map +0 -1
- package/dist/admin/AdminUserDetails-C2y1Ig4n.js.map +0 -1
- package/dist/admin/AdminUserLayout-sW6cjZL0.js.map +0 -1
- package/dist/admin/AdminUserSessions-CvN15wPe.js.map +0 -1
- package/dist/admin/AdminUserSessions-D-aOcZgV.js +0 -3
- package/dist/admin/AdminUserSettings-CEMhIYrI.js +0 -3
- package/dist/admin/AdminUserSettings-DvaaxgcV.js.map +0 -1
- package/dist/admin/AdminUsers-BR3C-jrg.js.map +0 -1
- package/dist/admin/AdminUsers-CMW9vN09.js +0 -3
- package/dist/auth/AuthLayout-CzwUKD9y.js +0 -19
- package/dist/auth/AuthLayout-CzwUKD9y.js.map +0 -1
- package/dist/auth/Login-7HlBjDeV.js.map +0 -1
- package/dist/auth/Login-C-e27DGb.js +0 -4
- package/dist/auth/Register-CuQr3kgi.js.map +0 -1
- package/dist/auth/Register-DbvXwgbG.js +0 -4
- package/dist/auth/ResetPassword-BzU-cdd4.js +0 -243
- package/dist/auth/ResetPassword-BzU-cdd4.js.map +0 -1
- package/dist/auth/ResetPassword-DSvrdpaA.js +0 -3
- package/src/admin/AdminSidebar.ts +0 -31
- package/src/admin/components/AdminParameters.tsx +0 -24
- package/src/core/themes/aurora.ts +0 -107
- package/src/core/themes/crystal.ts +0 -107
- package/src/core/themes/default.ts +0 -7
- package/src/core/themes/ember.ts +0 -107
- package/src/core/themes/index.ts +0 -7
- package/src/core/themes/remoraid.ts +0 -278
- package/src/core/themes/slate.ts +0 -81
- /package/src/admin/components/{AdminNotifications.tsx → notifications/AdminNotifications.tsx} +0 -0
- /package/src/admin/components/{AdminUserDetails.tsx → users/AdminUserDetails.tsx} +0 -0
- /package/src/admin/components/{AdminUserSessions.tsx → users/AdminUserSessions.tsx} +0 -0
- /package/src/admin/components/{AdminVerifications.tsx → verifications/AdminVerifications.tsx} +0 -0
package/dist/admin/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdminShellProps } from "@alepha/ui";
|
|
2
2
|
import { AuthRouter } from "@alepha/ui/auth";
|
|
3
|
-
import * as
|
|
3
|
+
import * as alepha2502 from "alepha";
|
|
4
4
|
import { Alepha, AlephaError, Async, FileLike, InstantiableClass, LogLevel, LoggerInterface, Page, Page as Page$1, PageQuery, Primitive, Service, Static, StaticEncode, StreamLike, TArray, TFile, TNull, TObject, TOptional, TRecord, TSchema, TStream, TString, TUnion, TVoid } from "alepha";
|
|
5
|
-
import * as react0 from "react";
|
|
6
|
-
import { FC, ReactNode } from "react";
|
|
7
5
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
import * as react3 from "react";
|
|
7
|
+
import { FC, ReactNode } from "react";
|
|
8
8
|
import { IncomingMessage, Server, ServerResponse } from "node:http";
|
|
9
9
|
import { Readable } from "node:stream";
|
|
10
10
|
import { ReadableStream } from "node:stream/web";
|
|
@@ -25,33 +25,33 @@ import { PgTransactionConfig } from "drizzle-orm/pg-core/session";
|
|
|
25
25
|
import * as DrizzleKit from "drizzle-kit/api";
|
|
26
26
|
|
|
27
27
|
//#region ../../../alepha/src/security/schemas/userAccountInfoSchema.d.ts
|
|
28
|
-
declare const userAccountInfoSchema:
|
|
29
|
-
id:
|
|
30
|
-
name:
|
|
31
|
-
email:
|
|
32
|
-
username:
|
|
33
|
-
picture:
|
|
34
|
-
sessionId:
|
|
35
|
-
organizations:
|
|
36
|
-
roles:
|
|
28
|
+
declare const userAccountInfoSchema: alepha2502.TObject<{
|
|
29
|
+
id: alepha2502.TString;
|
|
30
|
+
name: alepha2502.TOptional<alepha2502.TString>;
|
|
31
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
32
|
+
username: alepha2502.TOptional<alepha2502.TString>;
|
|
33
|
+
picture: alepha2502.TOptional<alepha2502.TString>;
|
|
34
|
+
sessionId: alepha2502.TOptional<alepha2502.TString>;
|
|
35
|
+
organizations: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
36
|
+
roles: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
37
37
|
}>;
|
|
38
38
|
type UserAccount = Static<typeof userAccountInfoSchema>;
|
|
39
39
|
//#endregion
|
|
40
|
-
//#region ../../../alepha/src/server/schemas/errorSchema.d.ts
|
|
41
|
-
declare const errorSchema:
|
|
42
|
-
error:
|
|
43
|
-
status:
|
|
44
|
-
message:
|
|
45
|
-
details:
|
|
46
|
-
requestId:
|
|
47
|
-
cause:
|
|
48
|
-
name:
|
|
49
|
-
message:
|
|
40
|
+
//#region ../../../alepha/src/server/core/schemas/errorSchema.d.ts
|
|
41
|
+
declare const errorSchema: alepha2502.TObject<{
|
|
42
|
+
error: alepha2502.TString;
|
|
43
|
+
status: alepha2502.TInteger;
|
|
44
|
+
message: alepha2502.TString;
|
|
45
|
+
details: alepha2502.TOptional<alepha2502.TString>;
|
|
46
|
+
requestId: alepha2502.TOptional<alepha2502.TString>;
|
|
47
|
+
cause: alepha2502.TOptional<alepha2502.TObject<{
|
|
48
|
+
name: alepha2502.TString;
|
|
49
|
+
message: alepha2502.TString;
|
|
50
50
|
}>>;
|
|
51
51
|
}>;
|
|
52
52
|
type ErrorSchema = Static<typeof errorSchema>;
|
|
53
53
|
//#endregion
|
|
54
|
-
//#region ../../../alepha/src/server/errors/HttpError.d.ts
|
|
54
|
+
//#region ../../../alepha/src/server/core/errors/HttpError.d.ts
|
|
55
55
|
declare class HttpError extends AlephaError {
|
|
56
56
|
name: string;
|
|
57
57
|
static is: (error: unknown, status?: number) => error is HttpErrorLike;
|
|
@@ -114,11 +114,11 @@ interface Tree<T$1 extends Route> {
|
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
//#endregion
|
|
117
|
-
//#region ../../../alepha/src/server/constants/routeMethods.d.ts
|
|
117
|
+
//#region ../../../alepha/src/server/core/constants/routeMethods.d.ts
|
|
118
118
|
declare const routeMethods: readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", "CONNECT", "TRACE"];
|
|
119
119
|
type RouteMethod = (typeof routeMethods)[number];
|
|
120
120
|
//#endregion
|
|
121
|
-
//#region ../../../alepha/src/server/helpers/ServerReply.d.ts
|
|
121
|
+
//#region ../../../alepha/src/server/core/helpers/ServerReply.d.ts
|
|
122
122
|
/**
|
|
123
123
|
* Helper for building server replies.
|
|
124
124
|
*/
|
|
@@ -146,7 +146,7 @@ declare class ServerReply {
|
|
|
146
146
|
setBody(body: any): this;
|
|
147
147
|
}
|
|
148
148
|
//#endregion
|
|
149
|
-
//#region ../../../alepha/src/server/services/UserAgentParser.d.ts
|
|
149
|
+
//#region ../../../alepha/src/server/core/services/UserAgentParser.d.ts
|
|
150
150
|
interface UserAgentInfo {
|
|
151
151
|
os: "Windows" | "Android" | "Ubuntu" | "MacOS" | "iOS" | "Linux" | "FreeBSD" | "OpenBSD" | "ChromeOS" | "BlackBerry" | "Symbian" | "Windows Phone";
|
|
152
152
|
browser: "Chrome" | "Firefox" | "Safari" | "Edge" | "Opera" | "Internet Explorer" | "Brave" | "Vivaldi" | "Samsung Browser" | "UC Browser" | "Yandex";
|
|
@@ -162,7 +162,7 @@ declare class UserAgentParser {
|
|
|
162
162
|
parse(userAgent?: string): UserAgentInfo;
|
|
163
163
|
}
|
|
164
164
|
//#endregion
|
|
165
|
-
//#region ../../../alepha/src/server/interfaces/ServerRequest.d.ts
|
|
165
|
+
//#region ../../../alepha/src/server/core/interfaces/ServerRequest.d.ts
|
|
166
166
|
type TRequestBody = TObject | TString | TArray | TRecord | TStream;
|
|
167
167
|
type TResponseBody = TObject | TString | TRecord | TFile | TArray | TStream | TVoid;
|
|
168
168
|
interface RequestConfigSchema {
|
|
@@ -285,15 +285,15 @@ interface WebRequestEvent {
|
|
|
285
285
|
}
|
|
286
286
|
//#endregion
|
|
287
287
|
//#region ../../../alepha/src/logger/schemas/logEntrySchema.d.ts
|
|
288
|
-
declare const logEntrySchema:
|
|
289
|
-
level:
|
|
290
|
-
message:
|
|
291
|
-
service:
|
|
292
|
-
module:
|
|
293
|
-
context:
|
|
294
|
-
app:
|
|
295
|
-
data:
|
|
296
|
-
timestamp:
|
|
288
|
+
declare const logEntrySchema: alepha2502.TObject<{
|
|
289
|
+
level: alepha2502.TUnsafe<"TRACE" | "SILENT" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
290
|
+
message: alepha2502.TString;
|
|
291
|
+
service: alepha2502.TString;
|
|
292
|
+
module: alepha2502.TString;
|
|
293
|
+
context: alepha2502.TOptional<alepha2502.TString>;
|
|
294
|
+
app: alepha2502.TOptional<alepha2502.TString>;
|
|
295
|
+
data: alepha2502.TOptional<alepha2502.TAny>;
|
|
296
|
+
timestamp: alepha2502.TNumber;
|
|
297
297
|
}>;
|
|
298
298
|
type LogEntry = Static<typeof logEntrySchema>;
|
|
299
299
|
//#endregion
|
|
@@ -308,8 +308,8 @@ declare class DateTimeProvider {
|
|
|
308
308
|
protected readonly timeouts: Timeout[];
|
|
309
309
|
protected readonly intervals: Interval[];
|
|
310
310
|
constructor();
|
|
311
|
-
protected readonly onStart:
|
|
312
|
-
protected readonly onStop:
|
|
311
|
+
protected readonly onStart: alepha2502.HookPrimitive<"start">;
|
|
312
|
+
protected readonly onStop: alepha2502.HookPrimitive<"stop">;
|
|
313
313
|
setLocale(locale: string): void;
|
|
314
314
|
isDateTime(value: unknown): value is DateTime;
|
|
315
315
|
/**
|
|
@@ -441,7 +441,7 @@ declare class Logger implements LoggerInterface {
|
|
|
441
441
|
}
|
|
442
442
|
//#endregion
|
|
443
443
|
//#region ../../../alepha/src/logger/index.d.ts
|
|
444
|
-
declare const envSchema$
|
|
444
|
+
declare const envSchema$10: alepha2502.TObject<{
|
|
445
445
|
/**
|
|
446
446
|
* Default log level for the application.
|
|
447
447
|
*
|
|
@@ -458,17 +458,17 @@ declare const envSchema$9: alepha1532.TObject<{
|
|
|
458
458
|
* LOG_LEVEL=my.module.name:debug,info # Set debug level for my.module.name and info for all other modules
|
|
459
459
|
* LOG_LEVEL=alepha:trace, info # Set trace level for all alepha modules and info for all other modules
|
|
460
460
|
*/
|
|
461
|
-
LOG_LEVEL:
|
|
461
|
+
LOG_LEVEL: alepha2502.TOptional<alepha2502.TString>;
|
|
462
462
|
/**
|
|
463
463
|
* Built-in log formats.
|
|
464
464
|
* - "json" - JSON format, useful for structured logging and log aggregation. {@link JsonFormatterProvider}
|
|
465
|
-
* - "pretty" - Simple text format, human-readable, with colors. {@link
|
|
465
|
+
* - "pretty" - Simple text format, human-readable, with colors. {@link PrettyFormatterProvider}
|
|
466
466
|
* - "raw" - Raw format, no formatting, just the message. {@link RawFormatterProvider}
|
|
467
467
|
*/
|
|
468
|
-
LOG_FORMAT:
|
|
468
|
+
LOG_FORMAT: alepha2502.TOptional<alepha2502.TUnsafe<"json" | "pretty" | "raw">>;
|
|
469
469
|
}>;
|
|
470
470
|
declare module "alepha" {
|
|
471
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
471
|
+
interface Env extends Partial<Static<typeof envSchema$10>> {}
|
|
472
472
|
interface State {
|
|
473
473
|
/**
|
|
474
474
|
* Current log level for the application or specific modules.
|
|
@@ -483,7 +483,7 @@ declare module "alepha" {
|
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
//#endregion
|
|
486
|
-
//#region ../../../alepha/src/server/services/ServerRequestParser.d.ts
|
|
486
|
+
//#region ../../../alepha/src/server/core/services/ServerRequestParser.d.ts
|
|
487
487
|
declare class ServerRequestParser {
|
|
488
488
|
protected readonly alepha: Alepha;
|
|
489
489
|
protected readonly userAgentParser: UserAgentParser;
|
|
@@ -493,7 +493,7 @@ declare class ServerRequestParser {
|
|
|
493
493
|
getRequestIp(request: ServerRequestData): string | undefined;
|
|
494
494
|
}
|
|
495
495
|
//#endregion
|
|
496
|
-
//#region ../../../alepha/src/server/providers/ServerTimingProvider.d.ts
|
|
496
|
+
//#region ../../../alepha/src/server/core/providers/ServerTimingProvider.d.ts
|
|
497
497
|
type TimingMap = Record<string, [number, number]>;
|
|
498
498
|
declare class ServerTimingProvider {
|
|
499
499
|
protected readonly log: Logger;
|
|
@@ -502,15 +502,15 @@ declare class ServerTimingProvider {
|
|
|
502
502
|
prefix: string;
|
|
503
503
|
disabled: boolean;
|
|
504
504
|
};
|
|
505
|
-
readonly onRequest:
|
|
506
|
-
readonly onResponse:
|
|
505
|
+
readonly onRequest: alepha2502.HookPrimitive<"server:onRequest">;
|
|
506
|
+
readonly onResponse: alepha2502.HookPrimitive<"server:onResponse">;
|
|
507
507
|
protected get handlerName(): string;
|
|
508
508
|
beginTiming(name: string): void;
|
|
509
509
|
endTiming(name: string): void;
|
|
510
510
|
protected setDuration(name: string, timing: TimingMap): void;
|
|
511
511
|
}
|
|
512
512
|
//#endregion
|
|
513
|
-
//#region ../../../alepha/src/server/providers/ServerRouterProvider.d.ts
|
|
513
|
+
//#region ../../../alepha/src/server/core/providers/ServerRouterProvider.d.ts
|
|
514
514
|
/**
|
|
515
515
|
* Main router for all routes on the server side.
|
|
516
516
|
*
|
|
@@ -549,7 +549,7 @@ declare class ServerRouterProvider extends RouterProvider<ServerRouteMatcher> {
|
|
|
549
549
|
}, request: ServerRequestConfig): void;
|
|
550
550
|
}
|
|
551
551
|
//#endregion
|
|
552
|
-
//#region ../../../alepha/src/server/providers/ServerProvider.d.ts
|
|
552
|
+
//#region ../../../alepha/src/server/core/providers/ServerProvider.d.ts
|
|
553
553
|
/**
|
|
554
554
|
* Base server provider to handle incoming requests and route them.
|
|
555
555
|
*
|
|
@@ -567,11 +567,11 @@ declare class ServerProvider {
|
|
|
567
567
|
/**
|
|
568
568
|
* When a Node.js HTTP request is received from outside. (Vercel, AWS Lambda, etc.)
|
|
569
569
|
*/
|
|
570
|
-
protected readonly onNodeRequest:
|
|
570
|
+
protected readonly onNodeRequest: alepha2502.HookPrimitive<"node:request">;
|
|
571
571
|
/**
|
|
572
572
|
* When a Web (Fetch API) request is received from outside. (Netlify, Cloudflare Workers, etc.)
|
|
573
573
|
*/
|
|
574
|
-
protected readonly onWebRequest:
|
|
574
|
+
protected readonly onWebRequest: alepha2502.HookPrimitive<"web:request">;
|
|
575
575
|
/**
|
|
576
576
|
* Handle Node.js HTTP request event.
|
|
577
577
|
*
|
|
@@ -588,7 +588,7 @@ declare class ServerProvider {
|
|
|
588
588
|
protected isViteNotFound(url?: string, route?: Route, params?: Record<string, string>): boolean;
|
|
589
589
|
}
|
|
590
590
|
//#endregion
|
|
591
|
-
//#region ../../../alepha/src/cache/providers/CacheProvider.d.ts
|
|
591
|
+
//#region ../../../alepha/src/cache/core/providers/CacheProvider.d.ts
|
|
592
592
|
/**
|
|
593
593
|
* Cache provider interface.
|
|
594
594
|
*
|
|
@@ -631,7 +631,7 @@ declare abstract class CacheProvider {
|
|
|
631
631
|
abstract clear(): Promise<void>;
|
|
632
632
|
}
|
|
633
633
|
//#endregion
|
|
634
|
-
//#region ../../../alepha/src/cache/primitives/$cache.d.ts
|
|
634
|
+
//#region ../../../alepha/src/cache/core/primitives/$cache.d.ts
|
|
635
635
|
interface CachePrimitiveOptions<TReturn = any, TParameter extends any[] = any[]> {
|
|
636
636
|
/**
|
|
637
637
|
* The cache name. This is useful for invalidating multiple caches at once.
|
|
@@ -698,7 +698,7 @@ interface CachePrimitiveFn<TReturn = any, TParameter extends any[] = any[]> exte
|
|
|
698
698
|
(...args: TParameter): Promise<TReturn>;
|
|
699
699
|
}
|
|
700
700
|
//#endregion
|
|
701
|
-
//#region ../../../alepha/src/server/services/HttpClient.d.ts
|
|
701
|
+
//#region ../../../alepha/src/server/core/services/HttpClient.d.ts
|
|
702
702
|
declare class HttpClient {
|
|
703
703
|
protected readonly log: Logger;
|
|
704
704
|
protected readonly alepha: Alepha;
|
|
@@ -770,7 +770,7 @@ interface HttpAction {
|
|
|
770
770
|
};
|
|
771
771
|
}
|
|
772
772
|
//#endregion
|
|
773
|
-
//#region ../../../alepha/src/server/primitives/$action.d.ts
|
|
773
|
+
//#region ../../../alepha/src/server/core/primitives/$action.d.ts
|
|
774
774
|
interface ActionPrimitiveOptions<TConfig extends RequestConfigSchema> extends Omit<ServerRoute, "handler" | "path" | "schema" | "mapParams"> {
|
|
775
775
|
/**
|
|
776
776
|
* Name of the action.
|
|
@@ -908,33 +908,33 @@ type ServerActionHandler<TConfig extends RequestConfigSchema = RequestConfigSche
|
|
|
908
908
|
*/
|
|
909
909
|
interface ServerActionRequest<TConfig extends RequestConfigSchema> extends ServerRequest<TConfig> {}
|
|
910
910
|
//#endregion
|
|
911
|
-
//#region ../../../alepha/src/server/schemas/okSchema.d.ts
|
|
912
|
-
declare const okSchema:
|
|
913
|
-
ok:
|
|
914
|
-
id:
|
|
915
|
-
count:
|
|
911
|
+
//#region ../../../alepha/src/server/core/schemas/okSchema.d.ts
|
|
912
|
+
declare const okSchema: alepha2502.TObject<{
|
|
913
|
+
ok: alepha2502.TBoolean;
|
|
914
|
+
id: alepha2502.TOptional<alepha2502.TUnion<[alepha2502.TString, alepha2502.TInteger]>>;
|
|
915
|
+
count: alepha2502.TOptional<alepha2502.TNumber>;
|
|
916
916
|
}>;
|
|
917
917
|
type Ok = Static<typeof okSchema>;
|
|
918
918
|
//#endregion
|
|
919
|
-
//#region ../../../alepha/src/server/providers/BunHttpServerProvider.d.ts
|
|
920
|
-
declare const envSchema$
|
|
921
|
-
SERVER_PORT:
|
|
922
|
-
SERVER_HOST:
|
|
919
|
+
//#region ../../../alepha/src/server/core/providers/BunHttpServerProvider.d.ts
|
|
920
|
+
declare const envSchema$9: alepha2502.TObject<{
|
|
921
|
+
SERVER_PORT: alepha2502.TInteger;
|
|
922
|
+
SERVER_HOST: alepha2502.TString;
|
|
923
923
|
}>;
|
|
924
924
|
declare module "alepha" {
|
|
925
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
925
|
+
interface Env extends Partial<Static<typeof envSchema$9>> {}
|
|
926
926
|
}
|
|
927
927
|
//#endregion
|
|
928
|
-
//#region ../../../alepha/src/server/providers/NodeHttpServerProvider.d.ts
|
|
929
|
-
declare const envSchema$
|
|
930
|
-
SERVER_PORT:
|
|
931
|
-
SERVER_HOST:
|
|
928
|
+
//#region ../../../alepha/src/server/core/providers/NodeHttpServerProvider.d.ts
|
|
929
|
+
declare const envSchema$8: alepha2502.TObject<{
|
|
930
|
+
SERVER_PORT: alepha2502.TInteger;
|
|
931
|
+
SERVER_HOST: alepha2502.TString;
|
|
932
932
|
}>;
|
|
933
933
|
declare module "alepha" {
|
|
934
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
934
|
+
interface Env extends Partial<Static<typeof envSchema$8>> {}
|
|
935
935
|
}
|
|
936
936
|
//#endregion
|
|
937
|
-
//#region ../../../alepha/src/server/index.d.ts
|
|
937
|
+
//#region ../../../alepha/src/server/core/index.d.ts
|
|
938
938
|
declare module "alepha" {
|
|
939
939
|
interface State {
|
|
940
940
|
"alepha.node.server"?: Server;
|
|
@@ -1012,24 +1012,24 @@ interface UserAccountToken extends UserAccount {
|
|
|
1012
1012
|
}
|
|
1013
1013
|
//#endregion
|
|
1014
1014
|
//#region ../../../alepha/src/security/schemas/roleSchema.d.ts
|
|
1015
|
-
declare const roleSchema:
|
|
1016
|
-
name:
|
|
1017
|
-
description:
|
|
1018
|
-
default:
|
|
1019
|
-
permissions:
|
|
1020
|
-
name:
|
|
1021
|
-
ownership:
|
|
1022
|
-
exclude:
|
|
1015
|
+
declare const roleSchema: alepha2502.TObject<{
|
|
1016
|
+
name: alepha2502.TString;
|
|
1017
|
+
description: alepha2502.TOptional<alepha2502.TString>;
|
|
1018
|
+
default: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
1019
|
+
permissions: alepha2502.TArray<alepha2502.TObject<{
|
|
1020
|
+
name: alepha2502.TString;
|
|
1021
|
+
ownership: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
1022
|
+
exclude: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
1023
1023
|
}>>;
|
|
1024
1024
|
}>;
|
|
1025
1025
|
type Role = Static<typeof roleSchema>;
|
|
1026
1026
|
//#endregion
|
|
1027
1027
|
//#region ../../../alepha/src/security/providers/SecurityProvider.d.ts
|
|
1028
|
-
declare const envSchema$
|
|
1029
|
-
APP_SECRET:
|
|
1028
|
+
declare const envSchema$7: alepha2502.TObject<{
|
|
1029
|
+
APP_SECRET: alepha2502.TString;
|
|
1030
1030
|
}>;
|
|
1031
1031
|
declare module "alepha" {
|
|
1032
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
1032
|
+
interface Env extends Partial<Static<typeof envSchema$7>> {}
|
|
1033
1033
|
}
|
|
1034
1034
|
//#endregion
|
|
1035
1035
|
//#region ../../../alepha/src/security/primitives/$realm.d.ts
|
|
@@ -1126,19 +1126,19 @@ declare module "alepha" {
|
|
|
1126
1126
|
* @module alepha.security
|
|
1127
1127
|
*/
|
|
1128
1128
|
//#endregion
|
|
1129
|
-
//#region ../../../alepha/src/server
|
|
1129
|
+
//#region ../../../alepha/src/server/security/providers/ServerBasicAuthProvider.d.ts
|
|
1130
1130
|
interface BasicAuthOptions {
|
|
1131
1131
|
username: string;
|
|
1132
1132
|
password: string;
|
|
1133
1133
|
}
|
|
1134
1134
|
//#endregion
|
|
1135
|
-
//#region ../../../alepha/src/server
|
|
1135
|
+
//#region ../../../alepha/src/server/security/providers/ServerSecurityProvider.d.ts
|
|
1136
1136
|
type ServerRouteSecure = {
|
|
1137
1137
|
realm?: string;
|
|
1138
1138
|
basic?: BasicAuthOptions;
|
|
1139
1139
|
};
|
|
1140
1140
|
//#endregion
|
|
1141
|
-
//#region ../../../alepha/src/server
|
|
1141
|
+
//#region ../../../alepha/src/server/security/index.d.ts
|
|
1142
1142
|
declare module "alepha" {
|
|
1143
1143
|
interface State {
|
|
1144
1144
|
/**
|
|
@@ -1190,30 +1190,30 @@ declare module "alepha/server" {
|
|
|
1190
1190
|
* @module alepha.server.security
|
|
1191
1191
|
*/
|
|
1192
1192
|
//#endregion
|
|
1193
|
-
//#region ../../../alepha/src/server
|
|
1194
|
-
declare const apiLinkSchema:
|
|
1195
|
-
name:
|
|
1196
|
-
group:
|
|
1197
|
-
path:
|
|
1198
|
-
method:
|
|
1199
|
-
requestBodyType:
|
|
1200
|
-
service:
|
|
1193
|
+
//#region ../../../alepha/src/server/links/schemas/apiLinksResponseSchema.d.ts
|
|
1194
|
+
declare const apiLinkSchema: alepha2502.TObject<{
|
|
1195
|
+
name: alepha2502.TString;
|
|
1196
|
+
group: alepha2502.TOptional<alepha2502.TString>;
|
|
1197
|
+
path: alepha2502.TString;
|
|
1198
|
+
method: alepha2502.TOptional<alepha2502.TString>;
|
|
1199
|
+
requestBodyType: alepha2502.TOptional<alepha2502.TString>;
|
|
1200
|
+
service: alepha2502.TOptional<alepha2502.TString>;
|
|
1201
1201
|
}>;
|
|
1202
|
-
declare const apiLinksResponseSchema:
|
|
1203
|
-
prefix:
|
|
1204
|
-
links:
|
|
1205
|
-
name:
|
|
1206
|
-
group:
|
|
1207
|
-
path:
|
|
1208
|
-
method:
|
|
1209
|
-
requestBodyType:
|
|
1210
|
-
service:
|
|
1202
|
+
declare const apiLinksResponseSchema: alepha2502.TObject<{
|
|
1203
|
+
prefix: alepha2502.TOptional<alepha2502.TString>;
|
|
1204
|
+
links: alepha2502.TArray<alepha2502.TObject<{
|
|
1205
|
+
name: alepha2502.TString;
|
|
1206
|
+
group: alepha2502.TOptional<alepha2502.TString>;
|
|
1207
|
+
path: alepha2502.TString;
|
|
1208
|
+
method: alepha2502.TOptional<alepha2502.TString>;
|
|
1209
|
+
requestBodyType: alepha2502.TOptional<alepha2502.TString>;
|
|
1210
|
+
service: alepha2502.TOptional<alepha2502.TString>;
|
|
1211
1211
|
}>>;
|
|
1212
1212
|
}>;
|
|
1213
1213
|
type ApiLinksResponse = Static<typeof apiLinksResponseSchema>;
|
|
1214
1214
|
type ApiLink = Static<typeof apiLinkSchema>;
|
|
1215
1215
|
//#endregion
|
|
1216
|
-
//#region ../../../alepha/src/server
|
|
1216
|
+
//#region ../../../alepha/src/server/links/providers/LinkProvider.d.ts
|
|
1217
1217
|
/**
|
|
1218
1218
|
* Browser, SSR friendly, service to handle links.
|
|
1219
1219
|
*/
|
|
@@ -1409,7 +1409,7 @@ interface RetryPrimitiveOptions<T$1 extends (...args: any[]) => any> {
|
|
|
1409
1409
|
signal?: AbortSignal;
|
|
1410
1410
|
}
|
|
1411
1411
|
//#endregion
|
|
1412
|
-
//#region ../../../alepha/src/server
|
|
1412
|
+
//#region ../../../alepha/src/server/links/index.d.ts
|
|
1413
1413
|
declare module "alepha" {
|
|
1414
1414
|
interface State {
|
|
1415
1415
|
/**
|
|
@@ -1433,7 +1433,7 @@ declare module "alepha" {
|
|
|
1433
1433
|
* @module alepha.server.links
|
|
1434
1434
|
*/
|
|
1435
1435
|
//#endregion
|
|
1436
|
-
//#region ../../../alepha/src/server
|
|
1436
|
+
//#region ../../../alepha/src/server/cache/providers/ServerCacheProvider.d.ts
|
|
1437
1437
|
declare module "alepha/server" {
|
|
1438
1438
|
interface ServerRoute {
|
|
1439
1439
|
/**
|
|
@@ -1548,11 +1548,11 @@ declare class Redirection extends Error {
|
|
|
1548
1548
|
}
|
|
1549
1549
|
//#endregion
|
|
1550
1550
|
//#region ../../../react/src/core/providers/ReactPageProvider.d.ts
|
|
1551
|
-
declare const envSchema$
|
|
1552
|
-
REACT_STRICT_MODE:
|
|
1551
|
+
declare const envSchema$6: alepha2502.TObject<{
|
|
1552
|
+
REACT_STRICT_MODE: alepha2502.TBoolean;
|
|
1553
1553
|
}>;
|
|
1554
1554
|
declare module "alepha" {
|
|
1555
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
1555
|
+
interface Env extends Partial<Static<typeof envSchema$6>> {}
|
|
1556
1556
|
}
|
|
1557
1557
|
declare class ReactPageProvider {
|
|
1558
1558
|
protected readonly log: Logger;
|
|
@@ -1580,7 +1580,6 @@ declare class ReactPageProvider {
|
|
|
1580
1580
|
* It also handles errors and redirects.
|
|
1581
1581
|
*/
|
|
1582
1582
|
createLayers(route: PageRoute, state: ReactRouterState, previous?: PreviousLayerData[]): Promise<CreateLayersResult>;
|
|
1583
|
-
protected createRedirectionLayer(redirect: string): CreateLayersResult;
|
|
1584
1583
|
protected getErrorHandler(route: PageRoute): ErrorHandler | undefined;
|
|
1585
1584
|
protected createElement(page: PageRoute, props: Record<string, any>): Promise<ReactNode>;
|
|
1586
1585
|
renderError(error: Error): ReactNode;
|
|
@@ -1592,7 +1591,7 @@ declare class ReactPageProvider {
|
|
|
1592
1591
|
}, params?: Record<string, any>): string;
|
|
1593
1592
|
compile(path: string, params?: Record<string, string>): string;
|
|
1594
1593
|
protected renderView(index: number, path: string, view: ReactNode | undefined, page: PageRoute): ReactNode;
|
|
1595
|
-
protected readonly configure:
|
|
1594
|
+
protected readonly configure: alepha2502.HookPrimitive<"configure">;
|
|
1596
1595
|
protected map(pages: Array<PagePrimitive>, target: PagePrimitive): PageRouteEntry;
|
|
1597
1596
|
add(entry: PageRouteEntry): void;
|
|
1598
1597
|
protected createMatch(page: PageRoute): string;
|
|
@@ -1707,10 +1706,10 @@ interface PagePrimitiveOptions<TConfig extends PageConfigSchema = PageConfigSche
|
|
|
1707
1706
|
* Load data before rendering the page.
|
|
1708
1707
|
*
|
|
1709
1708
|
* This function receives
|
|
1710
|
-
* - the request context
|
|
1709
|
+
* - the request context (params, query, etc.)
|
|
1711
1710
|
* - the parent props (if page has a parent)
|
|
1712
1711
|
*
|
|
1713
|
-
* In SSR, the returned data will be serialized and sent to the client, then reused during the client-side hydration.
|
|
1712
|
+
* > In SSR, the returned data will be serialized and sent to the client, then reused during the client-side hydration.
|
|
1714
1713
|
*
|
|
1715
1714
|
* Resolve can be stopped by throwing an error, which will be handled by the `errorHandler` function.
|
|
1716
1715
|
* It's common to throw a `NotFoundError` to display a 404 page.
|
|
@@ -1718,6 +1717,12 @@ interface PagePrimitiveOptions<TConfig extends PageConfigSchema = PageConfigSche
|
|
|
1718
1717
|
* RedirectError can be thrown to redirect the user to another page.
|
|
1719
1718
|
*/
|
|
1720
1719
|
resolve?: (context: PageResolve<TConfig, TPropsParent>) => Async<TProps>;
|
|
1720
|
+
/**
|
|
1721
|
+
* Default props to pass to the component when rendering the page.
|
|
1722
|
+
*
|
|
1723
|
+
* Resolved props from the `resolve` function will override these default props.
|
|
1724
|
+
*/
|
|
1725
|
+
props?: () => Partial<TProps>;
|
|
1721
1726
|
/**
|
|
1722
1727
|
* The component to render when the page is loaded.
|
|
1723
1728
|
*
|
|
@@ -1743,6 +1748,12 @@ interface PagePrimitiveOptions<TConfig extends PageConfigSchema = PageConfigSche
|
|
|
1743
1748
|
* Define a parent page for nested routing.
|
|
1744
1749
|
*/
|
|
1745
1750
|
parent?: PagePrimitive<PageConfigSchema, TPropsParent, any>;
|
|
1751
|
+
/**
|
|
1752
|
+
* Function to determine if the page can be accessed.
|
|
1753
|
+
*
|
|
1754
|
+
* If it returns false, the page will not be accessible and a 403 Forbidden error will be returned.
|
|
1755
|
+
* This function can be used to implement permission-based access control.
|
|
1756
|
+
*/
|
|
1746
1757
|
can?: () => boolean;
|
|
1747
1758
|
/**
|
|
1748
1759
|
* Catch any error from the `resolve` function or during `rendering`.
|
|
@@ -1919,23 +1930,23 @@ declare class ReactBrowserRouterProvider extends RouterProvider<BrowserRoute> {
|
|
|
1919
1930
|
protected readonly alepha: Alepha;
|
|
1920
1931
|
protected readonly pageApi: ReactPageProvider;
|
|
1921
1932
|
add(entry: PageRouteEntry): void;
|
|
1922
|
-
protected readonly configure:
|
|
1933
|
+
protected readonly configure: alepha2502.HookPrimitive<"configure">;
|
|
1923
1934
|
transition(url: URL, previous?: PreviousLayerData[], meta?: {}): Promise<string | void>;
|
|
1924
1935
|
root(state: ReactRouterState): ReactNode;
|
|
1925
1936
|
}
|
|
1926
1937
|
//#endregion
|
|
1927
1938
|
//#region ../../../react/src/core/providers/ReactBrowserProvider.d.ts
|
|
1928
|
-
declare const envSchema$
|
|
1929
|
-
REACT_ROOT_ID:
|
|
1939
|
+
declare const envSchema$5: alepha2502.TObject<{
|
|
1940
|
+
REACT_ROOT_ID: alepha2502.TString;
|
|
1930
1941
|
}>;
|
|
1931
1942
|
declare module "alepha" {
|
|
1932
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
1943
|
+
interface Env extends Partial<Static<typeof envSchema$5>> {}
|
|
1933
1944
|
}
|
|
1934
1945
|
/**
|
|
1935
1946
|
* React browser renderer configuration atom
|
|
1936
1947
|
*/
|
|
1937
|
-
declare const reactBrowserOptions:
|
|
1938
|
-
scrollRestoration:
|
|
1948
|
+
declare const reactBrowserOptions: alepha2502.Atom<alepha2502.TObject<{
|
|
1949
|
+
scrollRestoration: alepha2502.TUnsafe<"top" | "manual">;
|
|
1939
1950
|
}>, "alepha.react.browser.options">;
|
|
1940
1951
|
type ReactBrowserRendererOptions = Static<typeof reactBrowserOptions.schema>;
|
|
1941
1952
|
declare module "alepha" {
|
|
@@ -1983,8 +1994,8 @@ declare class ReactBrowserProvider {
|
|
|
1983
1994
|
* Get embedded layers from the server.
|
|
1984
1995
|
*/
|
|
1985
1996
|
protected getHydrationState(): ReactHydrationState | undefined;
|
|
1986
|
-
protected readonly onTransitionEnd:
|
|
1987
|
-
readonly ready:
|
|
1997
|
+
protected readonly onTransitionEnd: alepha2502.HookPrimitive<"react:transition:end">;
|
|
1998
|
+
readonly ready: alepha2502.HookPrimitive<"ready">;
|
|
1988
1999
|
}
|
|
1989
2000
|
interface RouterGoOptions {
|
|
1990
2001
|
replace?: boolean;
|
|
@@ -2095,9 +2106,10 @@ declare class ReactRouter<T$1 extends object> {
|
|
|
2095
2106
|
path?: string | undefined;
|
|
2096
2107
|
schema?: PageConfigSchema | undefined;
|
|
2097
2108
|
resolve?: ((context: PageResolve<PageConfigSchema, TPropsParentDefault>) => any) | undefined;
|
|
2098
|
-
|
|
2109
|
+
props?: (() => Partial<any>) | undefined;
|
|
2110
|
+
component?: react3.FC<any> | undefined;
|
|
2099
2111
|
lazy?: (() => Promise<{
|
|
2100
|
-
default:
|
|
2112
|
+
default: react3.FC<any>;
|
|
2101
2113
|
}>) | undefined;
|
|
2102
2114
|
can?: (() => boolean) | undefined;
|
|
2103
2115
|
errorHandler?: ErrorHandler | undefined;
|
|
@@ -2110,7 +2122,7 @@ declare class ReactRouter<T$1 extends object> {
|
|
|
2110
2122
|
onLeave?: (() => void) | undefined;
|
|
2111
2123
|
animation?: PageAnimation | undefined;
|
|
2112
2124
|
head?: Head | ((props: any, previous?: Head) => Head) | undefined;
|
|
2113
|
-
icon?:
|
|
2125
|
+
icon?: react3.ReactNode | react3.ComponentType;
|
|
2114
2126
|
};
|
|
2115
2127
|
path(name: keyof VirtualRouter<T$1> | string, config?: {
|
|
2116
2128
|
params?: Record<string, any>;
|
|
@@ -2546,25 +2558,25 @@ declare class FileDetector {
|
|
|
2546
2558
|
}
|
|
2547
2559
|
//#endregion
|
|
2548
2560
|
//#region ../../../react/src/core/providers/ReactServerProvider.d.ts
|
|
2549
|
-
declare const envSchema$
|
|
2550
|
-
REACT_SSR_ENABLED:
|
|
2551
|
-
REACT_ROOT_ID:
|
|
2552
|
-
REACT_SERVER_TEMPLATE: alepha1532.TOptional<alepha1532.TString>;
|
|
2561
|
+
declare const envSchema$4: alepha2502.TObject<{
|
|
2562
|
+
REACT_SSR_ENABLED: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
2563
|
+
REACT_ROOT_ID: alepha2502.TString;
|
|
2553
2564
|
}>;
|
|
2554
2565
|
declare module "alepha" {
|
|
2555
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
2566
|
+
interface Env extends Partial<Static<typeof envSchema$4>> {}
|
|
2556
2567
|
interface State {
|
|
2557
2568
|
"alepha.react.server.ssr"?: boolean;
|
|
2569
|
+
"alepha.react.server.template"?: string;
|
|
2558
2570
|
}
|
|
2559
2571
|
}
|
|
2560
2572
|
/**
|
|
2561
2573
|
* React server provider configuration atom
|
|
2562
2574
|
*/
|
|
2563
|
-
declare const reactServerOptions:
|
|
2564
|
-
publicDir:
|
|
2565
|
-
staticServer:
|
|
2566
|
-
disabled:
|
|
2567
|
-
path:
|
|
2575
|
+
declare const reactServerOptions: alepha2502.Atom<alepha2502.TObject<{
|
|
2576
|
+
publicDir: alepha2502.TString;
|
|
2577
|
+
staticServer: alepha2502.TObject<{
|
|
2578
|
+
disabled: alepha2502.TBoolean;
|
|
2579
|
+
path: alepha2502.TString;
|
|
2568
2580
|
}>;
|
|
2569
2581
|
}>, "alepha.react.server.options">;
|
|
2570
2582
|
type ReactServerProviderOptions = Static<typeof reactServerOptions.schema>;
|
|
@@ -2677,21 +2689,21 @@ declare module "alepha" {
|
|
|
2677
2689
|
* @module alepha.react
|
|
2678
2690
|
*/
|
|
2679
2691
|
//#endregion
|
|
2680
|
-
//#region ../../../alepha/src/server
|
|
2681
|
-
declare const tokensSchema:
|
|
2682
|
-
provider:
|
|
2683
|
-
access_token:
|
|
2684
|
-
issued_at:
|
|
2685
|
-
expires_in:
|
|
2686
|
-
refresh_token:
|
|
2687
|
-
refresh_token_expires_in:
|
|
2688
|
-
refresh_expires_in:
|
|
2689
|
-
id_token:
|
|
2690
|
-
scope:
|
|
2692
|
+
//#region ../../../alepha/src/server/auth/schemas/tokensSchema.d.ts
|
|
2693
|
+
declare const tokensSchema: alepha2502.TObject<{
|
|
2694
|
+
provider: alepha2502.TString;
|
|
2695
|
+
access_token: alepha2502.TString;
|
|
2696
|
+
issued_at: alepha2502.TNumber;
|
|
2697
|
+
expires_in: alepha2502.TOptional<alepha2502.TNumber>;
|
|
2698
|
+
refresh_token: alepha2502.TOptional<alepha2502.TString>;
|
|
2699
|
+
refresh_token_expires_in: alepha2502.TOptional<alepha2502.TNumber>;
|
|
2700
|
+
refresh_expires_in: alepha2502.TOptional<alepha2502.TNumber>;
|
|
2701
|
+
id_token: alepha2502.TOptional<alepha2502.TString>;
|
|
2702
|
+
scope: alepha2502.TOptional<alepha2502.TString>;
|
|
2691
2703
|
}>;
|
|
2692
2704
|
type Tokens = Static<typeof tokensSchema>;
|
|
2693
2705
|
//#endregion
|
|
2694
|
-
//#region ../../../alepha/src/server
|
|
2706
|
+
//#region ../../../alepha/src/server/cookies/primitives/$cookie.d.ts
|
|
2695
2707
|
interface Cookies {
|
|
2696
2708
|
req: Record<string, string>;
|
|
2697
2709
|
res: Record<string, Cookie | null>;
|
|
@@ -2706,7 +2718,7 @@ interface Cookie {
|
|
|
2706
2718
|
domain?: string;
|
|
2707
2719
|
}
|
|
2708
2720
|
//#endregion
|
|
2709
|
-
//#region ../../../alepha/src/server
|
|
2721
|
+
//#region ../../../alepha/src/server/cookies/index.d.ts
|
|
2710
2722
|
declare module "alepha/server" {
|
|
2711
2723
|
interface ServerRequest {
|
|
2712
2724
|
cookies: Cookies;
|
|
@@ -2723,7 +2735,7 @@ declare module "alepha/server" {
|
|
|
2723
2735
|
* @module alepha.server.cookies
|
|
2724
2736
|
*/
|
|
2725
2737
|
//#endregion
|
|
2726
|
-
//#region ../../../alepha/src/server
|
|
2738
|
+
//#region ../../../alepha/src/server/auth/index.d.ts
|
|
2727
2739
|
declare module "alepha" {
|
|
2728
2740
|
interface State {
|
|
2729
2741
|
/**
|
|
@@ -2757,8 +2769,8 @@ declare class ReactAuth {
|
|
|
2757
2769
|
protected readonly alepha: Alepha;
|
|
2758
2770
|
protected readonly httpClient: HttpClient;
|
|
2759
2771
|
protected readonly linkProvider: LinkProvider;
|
|
2760
|
-
protected readonly onBeginTransition:
|
|
2761
|
-
protected readonly onFetchRequest:
|
|
2772
|
+
protected readonly onBeginTransition: alepha2502.HookPrimitive<"react:transition:begin">;
|
|
2773
|
+
protected readonly onFetchRequest: alepha2502.HookPrimitive<"client:onRequest">;
|
|
2762
2774
|
/**
|
|
2763
2775
|
* Get the current authenticated user.
|
|
2764
2776
|
*
|
|
@@ -2781,6 +2793,7 @@ declare class ReactAuth {
|
|
|
2781
2793
|
username?: string;
|
|
2782
2794
|
password?: string;
|
|
2783
2795
|
redirect?: string;
|
|
2796
|
+
realm?: string;
|
|
2784
2797
|
[extra: string]: any;
|
|
2785
2798
|
}): Promise<Tokens>;
|
|
2786
2799
|
logout(): void;
|
|
@@ -3690,11 +3703,11 @@ declare class DrizzleKitProvider {
|
|
|
3690
3703
|
*/
|
|
3691
3704
|
importDrizzleKit(): typeof DrizzleKit;
|
|
3692
3705
|
}
|
|
3693
|
-
declare const devMigrationsSchema:
|
|
3694
|
-
id:
|
|
3695
|
-
name:
|
|
3696
|
-
snapshot:
|
|
3697
|
-
created_at:
|
|
3706
|
+
declare const devMigrationsSchema: alepha2502.TObject<{
|
|
3707
|
+
id: alepha2502.TNumber;
|
|
3708
|
+
name: alepha2502.TString;
|
|
3709
|
+
snapshot: alepha2502.TString;
|
|
3710
|
+
created_at: alepha2502.TString;
|
|
3698
3711
|
}>;
|
|
3699
3712
|
type DevMigrations = Static<typeof devMigrationsSchema>;
|
|
3700
3713
|
//#endregion
|
|
@@ -3891,7 +3904,7 @@ declare class QueryManager {
|
|
|
3891
3904
|
createPagination<T$1>(entities: T$1[], limit?: number, offset?: number, sort?: Array<{
|
|
3892
3905
|
column: string;
|
|
3893
3906
|
direction: "asc" | "desc";
|
|
3894
|
-
}>):
|
|
3907
|
+
}>): alepha2502.Page<T$1>;
|
|
3895
3908
|
}
|
|
3896
3909
|
interface PgJoin {
|
|
3897
3910
|
table: string;
|
|
@@ -4062,11 +4075,15 @@ declare abstract class Repository<T$1 extends TObject> {
|
|
|
4062
4075
|
/**
|
|
4063
4076
|
* Create many entities.
|
|
4064
4077
|
*
|
|
4078
|
+
* Inserts are batched in chunks of 1000 to avoid hitting database limits.
|
|
4079
|
+
*
|
|
4065
4080
|
* @param values The entities to create.
|
|
4066
4081
|
* @param opts The statement options.
|
|
4067
4082
|
* @returns The created entities.
|
|
4068
4083
|
*/
|
|
4069
|
-
createMany(values: Array<Static<TObjectInsert<T$1>>>, opts?: StatementOptions
|
|
4084
|
+
createMany(values: Array<Static<TObjectInsert<T$1>>>, opts?: StatementOptions & {
|
|
4085
|
+
batchSize?: number;
|
|
4086
|
+
}): Promise<Static<T$1>[]>;
|
|
4070
4087
|
/**
|
|
4071
4088
|
* Find an entity and update it.
|
|
4072
4089
|
*/
|
|
@@ -4195,19 +4212,254 @@ interface StatementOptions {
|
|
|
4195
4212
|
now?: DateTime | string;
|
|
4196
4213
|
}
|
|
4197
4214
|
//#endregion
|
|
4198
|
-
//#region ../../../alepha/src/
|
|
4199
|
-
|
|
4200
|
-
|
|
4215
|
+
//#region ../../../alepha/src/topic/core/providers/TopicProvider.d.ts
|
|
4216
|
+
/**
|
|
4217
|
+
* Base class for topic providers.
|
|
4218
|
+
*/
|
|
4219
|
+
declare abstract class TopicProvider {
|
|
4220
|
+
protected readonly alepha: Alepha;
|
|
4221
|
+
/**
|
|
4222
|
+
* Publish a message to a topic.
|
|
4223
|
+
*
|
|
4224
|
+
* @param topic - The topic to publish to.
|
|
4225
|
+
* @param message - The message to publish.
|
|
4226
|
+
*/
|
|
4227
|
+
abstract publish(topic: string, message: string): Promise<void>;
|
|
4228
|
+
/**
|
|
4229
|
+
* Subscribe to a topic.
|
|
4230
|
+
*
|
|
4231
|
+
* @param topic - The topic to subscribe to.
|
|
4232
|
+
* @param callback - The callback to call when a message is received.
|
|
4233
|
+
*/
|
|
4234
|
+
abstract subscribe(topic: string, callback: SubscribeCallback): Promise<UnSubscribeFn>;
|
|
4235
|
+
/**
|
|
4236
|
+
* Unsubscribe from a topic.
|
|
4237
|
+
*
|
|
4238
|
+
* @param topic - The topic to unsubscribe from.
|
|
4239
|
+
*/
|
|
4240
|
+
abstract unsubscribe(topic: string): Promise<void>;
|
|
4241
|
+
/**
|
|
4242
|
+
* Returns the list of $subscribers for this provider.
|
|
4243
|
+
*/
|
|
4244
|
+
protected subscribers(): Array<() => Promise<unknown>>;
|
|
4245
|
+
}
|
|
4246
|
+
type SubscribeCallback = (message: string) => Promise<void> | void;
|
|
4247
|
+
type UnSubscribeFn = () => Promise<void>;
|
|
4248
|
+
//#endregion
|
|
4249
|
+
//#region ../../../alepha/src/topic/core/primitives/$topic.d.ts
|
|
4250
|
+
interface TopicPrimitiveOptions<T$1 extends TopicMessageSchema> {
|
|
4251
|
+
/**
|
|
4252
|
+
* Unique name identifier for the topic.
|
|
4253
|
+
*
|
|
4254
|
+
* This name is used for:
|
|
4255
|
+
* - Topic identification across the pub/sub system
|
|
4256
|
+
* - Message routing between publishers and subscribers
|
|
4257
|
+
* - Logging and debugging topic-related operations
|
|
4258
|
+
* - Provider-specific topic management (channels, keys, etc.)
|
|
4259
|
+
*
|
|
4260
|
+
* If not provided, defaults to the property key where the topic is declared.
|
|
4261
|
+
*
|
|
4262
|
+
* **Naming Conventions**:
|
|
4263
|
+
* - Use descriptive, hierarchical names: "user.activity", "order.events"
|
|
4264
|
+
* - Avoid spaces and special characters
|
|
4265
|
+
* - Consider using dot notation for categorization
|
|
4266
|
+
* - Keep names concise but meaningful
|
|
4267
|
+
*
|
|
4268
|
+
* @example "user-activity"
|
|
4269
|
+
* @example "chat.messages"
|
|
4270
|
+
* @example "system.health.checks"
|
|
4271
|
+
* @example "payment.webhooks"
|
|
4272
|
+
*/
|
|
4273
|
+
name?: string;
|
|
4274
|
+
/**
|
|
4275
|
+
* Human-readable description of the topic's purpose and usage.
|
|
4276
|
+
*
|
|
4277
|
+
* Used for:
|
|
4278
|
+
* - Documentation generation and API references
|
|
4279
|
+
* - Developer onboarding and understanding
|
|
4280
|
+
* - Monitoring dashboards and admin interfaces
|
|
4281
|
+
* - Team communication about system architecture
|
|
4282
|
+
*
|
|
4283
|
+
* **Description Best Practices**:
|
|
4284
|
+
* - Explain what events/messages this topic handles
|
|
4285
|
+
* - Mention key use cases and subscribers
|
|
4286
|
+
* - Include any important timing or ordering guarantees
|
|
4287
|
+
* - Note any special processing requirements
|
|
4288
|
+
*
|
|
4289
|
+
* @example "Real-time user activity events for analytics and notifications"
|
|
4290
|
+
* @example "Order lifecycle events from creation to delivery"
|
|
4291
|
+
* @example "Chat messages broadcast to all room participants"
|
|
4292
|
+
* @example "System health checks and service status updates"
|
|
4293
|
+
*/
|
|
4294
|
+
description?: string;
|
|
4295
|
+
/**
|
|
4296
|
+
* Topic provider configuration for message storage and delivery.
|
|
4297
|
+
*
|
|
4298
|
+
* Options:
|
|
4299
|
+
* - **"memory"**: In-memory provider (default for development, lost on restart)
|
|
4300
|
+
* - **Service<TopicProvider>**: Custom provider class (e.g., RedisTopicProvider)
|
|
4301
|
+
* - **undefined**: Uses the default topic provider from dependency injection
|
|
4302
|
+
*
|
|
4303
|
+
* **Provider Selection Guidelines**:
|
|
4304
|
+
* - **Development**: Use "memory" for fast, simple testing without external dependencies
|
|
4305
|
+
* - **Production**: Use Redis or message brokers for persistence and scalability
|
|
4306
|
+
* - **Distributed systems**: Use Redis/RabbitMQ for cross-service communication
|
|
4307
|
+
* - **High-throughput**: Use specialized providers with connection pooling
|
|
4308
|
+
* - **Real-time**: Ensure provider supports low-latency message delivery
|
|
4309
|
+
*
|
|
4310
|
+
* **Provider Capabilities**:
|
|
4311
|
+
* - Message persistence and durability
|
|
4312
|
+
* - Subscriber management and connection handling
|
|
4313
|
+
* - Message ordering and delivery guarantees
|
|
4314
|
+
* - Horizontal scaling and load distribution
|
|
4315
|
+
*
|
|
4316
|
+
* @default Uses injected TopicProvider
|
|
4317
|
+
* @example "memory"
|
|
4318
|
+
* @example RedisTopicProvider
|
|
4319
|
+
* @example RabbitMQTopicProvider
|
|
4320
|
+
*/
|
|
4321
|
+
provider?: "memory" | Service<TopicProvider>;
|
|
4322
|
+
/**
|
|
4323
|
+
* TypeBox schema defining the structure of messages published to this topic.
|
|
4324
|
+
*
|
|
4325
|
+
* The schema must include:
|
|
4326
|
+
* - **payload**: Required schema for the main message data
|
|
4327
|
+
* - **headers**: Optional schema for message metadata
|
|
4328
|
+
*
|
|
4329
|
+
* This schema:
|
|
4330
|
+
* - Validates all messages published to the topic
|
|
4331
|
+
* - Provides full TypeScript type inference for subscribers
|
|
4332
|
+
* - Ensures type safety between publishers and subscribers
|
|
4333
|
+
* - Enables automatic serialization/deserialization
|
|
4334
|
+
*
|
|
4335
|
+
* **Schema Design Best Practices**:
|
|
4336
|
+
* - Keep payload schemas focused and cohesive
|
|
4337
|
+
* - Use optional fields for data that might not always be present
|
|
4338
|
+
* - Include timestamp fields for event ordering
|
|
4339
|
+
* - Consider versioning for schema evolution
|
|
4340
|
+
* - Use union types for different event types in the same topic
|
|
4341
|
+
*
|
|
4342
|
+
* @example
|
|
4343
|
+
* ```ts
|
|
4344
|
+
* {
|
|
4345
|
+
* payload: t.object({
|
|
4346
|
+
* eventId: t.text(),
|
|
4347
|
+
* eventType: t.enum(["created", "updated"]),
|
|
4348
|
+
* data: t.record(t.text(), t.any()),
|
|
4349
|
+
* timestamp: t.number(),
|
|
4350
|
+
* userId: t.optional(t.text())
|
|
4351
|
+
* }),
|
|
4352
|
+
* headers: t.optional(t.object({
|
|
4353
|
+
* source: t.text(),
|
|
4354
|
+
* correlationId: t.text()
|
|
4355
|
+
* }))
|
|
4356
|
+
* }
|
|
4357
|
+
* ```
|
|
4358
|
+
*/
|
|
4359
|
+
schema: T$1;
|
|
4360
|
+
/**
|
|
4361
|
+
* Default subscriber handler function that processes messages published to this topic.
|
|
4362
|
+
*
|
|
4363
|
+
* This handler:
|
|
4364
|
+
* - Automatically subscribes when the topic is initialized
|
|
4365
|
+
* - Receives all messages published to the topic
|
|
4366
|
+
* - Runs for every message without additional subscription setup
|
|
4367
|
+
* - Can be supplemented with additional subscribers via `subscribe()` method
|
|
4368
|
+
* - Should handle errors gracefully to avoid breaking other subscribers
|
|
4369
|
+
*
|
|
4370
|
+
* **Handler Design Guidelines**:
|
|
4371
|
+
* - Keep handlers focused on a single responsibility
|
|
4372
|
+
* - Use proper error handling and logging
|
|
4373
|
+
* - Consider performance impact for high-frequency topics
|
|
4374
|
+
* - Make handlers idempotent when possible
|
|
4375
|
+
* - Validate business rules within the handler logic
|
|
4376
|
+
* - Log important processing steps for debugging
|
|
4377
|
+
*
|
|
4378
|
+
* **Error Handling Strategy**:
|
|
4379
|
+
* - Log errors but don't re-throw to avoid affecting other subscribers
|
|
4380
|
+
* - Use try-catch blocks for external service calls
|
|
4381
|
+
* - Consider implementing circuit breakers for resilience
|
|
4382
|
+
* - Monitor error rates and patterns for system health
|
|
4383
|
+
*
|
|
4384
|
+
* @param message - The topic message with validated payload and headers
|
|
4385
|
+
* @param message.payload - The typed message data based on the schema
|
|
4386
|
+
* @returns Promise that resolves when processing is complete
|
|
4387
|
+
*
|
|
4388
|
+
* @example
|
|
4389
|
+
* ```ts
|
|
4390
|
+
* handler: async (message) => {
|
|
4391
|
+
* const { eventType, data, timestamp } = message.payload;
|
|
4392
|
+
*
|
|
4393
|
+
* try {
|
|
4394
|
+
* // Log message receipt
|
|
4395
|
+
* this.logger.info(`Processing ${eventType} event`, { timestamp, data });
|
|
4396
|
+
*
|
|
4397
|
+
* // Process based on event type
|
|
4398
|
+
* switch (eventType) {
|
|
4399
|
+
* case "created":
|
|
4400
|
+
* await this.handleCreation(data);
|
|
4401
|
+
* break;
|
|
4402
|
+
* case "updated":
|
|
4403
|
+
* await this.handleUpdate(data);
|
|
4404
|
+
* break;
|
|
4405
|
+
* default:
|
|
4406
|
+
* this.logger.warn(`Unknown event type: ${eventType}`);
|
|
4407
|
+
* }
|
|
4408
|
+
*
|
|
4409
|
+
* this.logger.info(`Successfully processed ${eventType} event`);
|
|
4410
|
+
*
|
|
4411
|
+
* } catch (error) {
|
|
4412
|
+
* // Log error but don't re-throw to avoid affecting other subscribers
|
|
4413
|
+
* this.logger.error(`Failed to process ${eventType} event`, {
|
|
4414
|
+
* error: error.message,
|
|
4415
|
+
* eventType,
|
|
4416
|
+
* timestamp,
|
|
4417
|
+
* data
|
|
4418
|
+
* });
|
|
4419
|
+
* }
|
|
4420
|
+
* }
|
|
4421
|
+
* ```
|
|
4422
|
+
*/
|
|
4423
|
+
handler?: TopicHandler<T$1>;
|
|
4424
|
+
}
|
|
4425
|
+
declare class TopicPrimitive<T$1 extends TopicMessageSchema> extends Primitive<TopicPrimitiveOptions<T$1>> {
|
|
4426
|
+
protected readonly log: Logger;
|
|
4427
|
+
protected readonly dateTimeProvider: DateTimeProvider;
|
|
4428
|
+
readonly provider: TopicProvider;
|
|
4429
|
+
get name(): string;
|
|
4430
|
+
publish(payload: TopicMessage<T$1>["payload"]): Promise<void>;
|
|
4431
|
+
subscribe(handler: TopicHandler<T$1>): Promise<UnSubscribeFn>;
|
|
4432
|
+
wait(options?: TopicWaitOptions<T$1>): Promise<TopicMessage<T$1>>;
|
|
4433
|
+
protected $provider(): TopicProvider;
|
|
4434
|
+
protected parseMessage(message: string): TopicMessage<T$1>;
|
|
4435
|
+
}
|
|
4436
|
+
interface TopicMessage<T$1 extends TopicMessageSchema> {
|
|
4437
|
+
payload: Static<T$1["payload"]>;
|
|
4438
|
+
}
|
|
4439
|
+
interface TopicWaitOptions<T$1 extends TopicMessageSchema> {
|
|
4440
|
+
timeout?: DurationLike;
|
|
4441
|
+
filter?: (message: {
|
|
4442
|
+
payload: Static<T$1["payload"]>;
|
|
4443
|
+
}) => boolean;
|
|
4444
|
+
}
|
|
4445
|
+
interface TopicMessageSchema {
|
|
4446
|
+
payload: TSchema;
|
|
4447
|
+
}
|
|
4448
|
+
type TopicHandler<T$1 extends TopicMessageSchema = TopicMessageSchema> = (message: TopicMessage<T$1>) => unknown;
|
|
4449
|
+
//#endregion
|
|
4450
|
+
//#region ../../../alepha/src/lock/core/primitives/$lock.d.ts
|
|
4451
|
+
declare const envSchema$3: alepha2502.TObject<{
|
|
4452
|
+
LOCK_PREFIX_KEY: alepha2502.TString;
|
|
4201
4453
|
}>;
|
|
4202
4454
|
declare module "alepha" {
|
|
4203
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
4455
|
+
interface Env extends Partial<Static<typeof envSchema$3>> {}
|
|
4204
4456
|
}
|
|
4205
4457
|
//#endregion
|
|
4206
4458
|
//#region ../../../alepha/src/orm/providers/drivers/NodePostgresProvider.d.ts
|
|
4207
4459
|
declare module "alepha" {
|
|
4208
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
4460
|
+
interface Env extends Partial<Static<typeof envSchema$2>> {}
|
|
4209
4461
|
}
|
|
4210
|
-
declare const envSchema$
|
|
4462
|
+
declare const envSchema$2: alepha2502.TObject<{
|
|
4211
4463
|
/**
|
|
4212
4464
|
* Main configuration for database connection.
|
|
4213
4465
|
* Accept a string in the format of a Postgres connection URL.
|
|
@@ -4215,21 +4467,21 @@ declare const envSchema$1: alepha1532.TObject<{
|
|
|
4215
4467
|
* or
|
|
4216
4468
|
* Example: postgres://user:password@localhost:5432/database?sslmode=require
|
|
4217
4469
|
*/
|
|
4218
|
-
DATABASE_URL:
|
|
4470
|
+
DATABASE_URL: alepha2502.TOptional<alepha2502.TString>;
|
|
4219
4471
|
/**
|
|
4220
4472
|
* In addition to the DATABASE_URL, you can specify the postgres schema name.
|
|
4221
4473
|
*
|
|
4222
4474
|
* It will monkey patch drizzle tables.
|
|
4223
4475
|
*/
|
|
4224
|
-
POSTGRES_SCHEMA:
|
|
4476
|
+
POSTGRES_SCHEMA: alepha2502.TOptional<alepha2502.TString>;
|
|
4225
4477
|
}>;
|
|
4226
4478
|
//#endregion
|
|
4227
4479
|
//#region ../../../alepha/src/orm/providers/drivers/NodeSqliteProvider.d.ts
|
|
4228
4480
|
/**
|
|
4229
4481
|
* Configuration options for the Node.js SQLite database provider.
|
|
4230
4482
|
*/
|
|
4231
|
-
declare const nodeSqliteOptions:
|
|
4232
|
-
path:
|
|
4483
|
+
declare const nodeSqliteOptions: alepha2502.Atom<alepha2502.TObject<{
|
|
4484
|
+
path: alepha2502.TOptional<alepha2502.TString>;
|
|
4233
4485
|
}>, "alepha.postgres.node-sqlite.options">;
|
|
4234
4486
|
type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
|
|
4235
4487
|
declare module "alepha" {
|
|
@@ -4312,6 +4564,539 @@ declare module "alepha" {
|
|
|
4312
4564
|
}
|
|
4313
4565
|
}
|
|
4314
4566
|
//#endregion
|
|
4567
|
+
//#region ../../../alepha/src/api/audits/entities/audits.d.ts
|
|
4568
|
+
/**
|
|
4569
|
+
* Audit severity levels for categorizing events.
|
|
4570
|
+
*/
|
|
4571
|
+
declare const auditSeveritySchema: alepha2502.TUnsafe<"info" | "warning" | "critical">;
|
|
4572
|
+
type AuditSeverity = Static<typeof auditSeveritySchema>;
|
|
4573
|
+
/**
|
|
4574
|
+
* Audit log entity for tracking important system events.
|
|
4575
|
+
*
|
|
4576
|
+
* Stores comprehensive audit information including:
|
|
4577
|
+
* - Who performed the action (userId, userRealm)
|
|
4578
|
+
* - What happened (type, action, resource)
|
|
4579
|
+
* - When it happened (createdAt)
|
|
4580
|
+
* - Context and details (metadata, ipAddress, userAgent)
|
|
4581
|
+
*/
|
|
4582
|
+
declare const audits: EntityPrimitive<alepha2502.TObject<{
|
|
4583
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
4584
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
4585
|
+
/**
|
|
4586
|
+
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
4587
|
+
* Used for categorizing and filtering audit events.
|
|
4588
|
+
*/
|
|
4589
|
+
type: alepha2502.TString;
|
|
4590
|
+
/**
|
|
4591
|
+
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
4592
|
+
*/
|
|
4593
|
+
action: alepha2502.TString;
|
|
4594
|
+
/**
|
|
4595
|
+
* Severity level of the event.
|
|
4596
|
+
*/
|
|
4597
|
+
severity: PgAttr<alepha2502.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
4598
|
+
/**
|
|
4599
|
+
* User ID who performed the action (null for system events).
|
|
4600
|
+
*/
|
|
4601
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
4602
|
+
/**
|
|
4603
|
+
* User realm for multi-tenant support.
|
|
4604
|
+
*/
|
|
4605
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
4606
|
+
/**
|
|
4607
|
+
* User email at the time of the event (denormalized for history).
|
|
4608
|
+
*/
|
|
4609
|
+
userEmail: alepha2502.TOptional<alepha2502.TString>;
|
|
4610
|
+
/**
|
|
4611
|
+
* Resource type affected (e.g., "user", "order", "file").
|
|
4612
|
+
*/
|
|
4613
|
+
resourceType: alepha2502.TOptional<alepha2502.TString>;
|
|
4614
|
+
/**
|
|
4615
|
+
* Resource ID affected.
|
|
4616
|
+
*/
|
|
4617
|
+
resourceId: alepha2502.TOptional<alepha2502.TString>;
|
|
4618
|
+
/**
|
|
4619
|
+
* Human-readable description of the event.
|
|
4620
|
+
*/
|
|
4621
|
+
description: alepha2502.TOptional<alepha2502.TString>;
|
|
4622
|
+
/**
|
|
4623
|
+
* Additional metadata/context as JSON.
|
|
4624
|
+
*/
|
|
4625
|
+
metadata: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
4626
|
+
/**
|
|
4627
|
+
* Client IP address.
|
|
4628
|
+
*/
|
|
4629
|
+
ipAddress: alepha2502.TOptional<alepha2502.TString>;
|
|
4630
|
+
/**
|
|
4631
|
+
* Client user agent.
|
|
4632
|
+
*/
|
|
4633
|
+
userAgent: alepha2502.TOptional<alepha2502.TString>;
|
|
4634
|
+
/**
|
|
4635
|
+
* Session ID if applicable.
|
|
4636
|
+
*/
|
|
4637
|
+
sessionId: alepha2502.TOptional<alepha2502.TString>;
|
|
4638
|
+
/**
|
|
4639
|
+
* Request ID for correlation.
|
|
4640
|
+
*/
|
|
4641
|
+
requestId: alepha2502.TOptional<alepha2502.TString>;
|
|
4642
|
+
/**
|
|
4643
|
+
* Whether the action was successful.
|
|
4644
|
+
*/
|
|
4645
|
+
success: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
4646
|
+
/**
|
|
4647
|
+
* Error message if the action failed.
|
|
4648
|
+
*/
|
|
4649
|
+
errorMessage: alepha2502.TOptional<alepha2502.TString>;
|
|
4650
|
+
}>>;
|
|
4651
|
+
type AuditEntity = Static<typeof audits.schema>;
|
|
4652
|
+
//#endregion
|
|
4653
|
+
//#region ../../../alepha/src/api/audits/schemas/auditQuerySchema.d.ts
|
|
4654
|
+
/**
|
|
4655
|
+
* Query schema for searching and filtering audit logs.
|
|
4656
|
+
*/
|
|
4657
|
+
declare const auditQuerySchema: alepha2502.TObject<{
|
|
4658
|
+
page: alepha2502.TOptional<alepha2502.TInteger>;
|
|
4659
|
+
size: alepha2502.TOptional<alepha2502.TInteger>;
|
|
4660
|
+
sort: alepha2502.TOptional<alepha2502.TString>;
|
|
4661
|
+
type: alepha2502.TOptional<alepha2502.TString>;
|
|
4662
|
+
action: alepha2502.TOptional<alepha2502.TString>;
|
|
4663
|
+
severity: alepha2502.TOptional<alepha2502.TUnsafe<"info" | "warning" | "critical">>;
|
|
4664
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
4665
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
4666
|
+
resourceType: alepha2502.TOptional<alepha2502.TString>;
|
|
4667
|
+
resourceId: alepha2502.TOptional<alepha2502.TString>;
|
|
4668
|
+
success: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
4669
|
+
from: alepha2502.TOptional<alepha2502.TString>;
|
|
4670
|
+
to: alepha2502.TOptional<alepha2502.TString>;
|
|
4671
|
+
search: alepha2502.TOptional<alepha2502.TString>;
|
|
4672
|
+
}>;
|
|
4673
|
+
type AuditQuery = Static<typeof auditQuerySchema>;
|
|
4674
|
+
//#endregion
|
|
4675
|
+
//#region ../../../alepha/src/api/audits/schemas/createAuditSchema.d.ts
|
|
4676
|
+
/**
|
|
4677
|
+
* Schema for creating a new audit log entry.
|
|
4678
|
+
*/
|
|
4679
|
+
declare const createAuditSchema: alepha2502.TObject<{
|
|
4680
|
+
type: alepha2502.TString;
|
|
4681
|
+
action: alepha2502.TString;
|
|
4682
|
+
severity: alepha2502.TOptional<alepha2502.TUnsafe<"info" | "warning" | "critical">>;
|
|
4683
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
4684
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
4685
|
+
userEmail: alepha2502.TOptional<alepha2502.TString>;
|
|
4686
|
+
resourceType: alepha2502.TOptional<alepha2502.TString>;
|
|
4687
|
+
resourceId: alepha2502.TOptional<alepha2502.TString>;
|
|
4688
|
+
description: alepha2502.TOptional<alepha2502.TString>;
|
|
4689
|
+
metadata: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
4690
|
+
ipAddress: alepha2502.TOptional<alepha2502.TString>;
|
|
4691
|
+
userAgent: alepha2502.TOptional<alepha2502.TString>;
|
|
4692
|
+
sessionId: alepha2502.TOptional<alepha2502.TString>;
|
|
4693
|
+
requestId: alepha2502.TOptional<alepha2502.TString>;
|
|
4694
|
+
success: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
4695
|
+
errorMessage: alepha2502.TOptional<alepha2502.TString>;
|
|
4696
|
+
}>;
|
|
4697
|
+
type CreateAudit = Static<typeof createAuditSchema>;
|
|
4698
|
+
//#endregion
|
|
4699
|
+
//#region ../../../alepha/src/api/audits/services/AuditService.d.ts
|
|
4700
|
+
/**
|
|
4701
|
+
* Registered audit type definition.
|
|
4702
|
+
*/
|
|
4703
|
+
interface AuditTypeDefinition {
|
|
4704
|
+
type: string;
|
|
4705
|
+
description?: string;
|
|
4706
|
+
actions: string[];
|
|
4707
|
+
}
|
|
4708
|
+
/**
|
|
4709
|
+
* Service for managing audit logs.
|
|
4710
|
+
*
|
|
4711
|
+
* Provides methods for:
|
|
4712
|
+
* - Creating audit entries
|
|
4713
|
+
* - Querying audit history
|
|
4714
|
+
* - Aggregating audit statistics
|
|
4715
|
+
* - Managing registered audit types
|
|
4716
|
+
*/
|
|
4717
|
+
declare class AuditService {
|
|
4718
|
+
protected readonly alepha: Alepha;
|
|
4719
|
+
protected readonly log: Logger;
|
|
4720
|
+
protected readonly repo: Repository<alepha2502.TObject<{
|
|
4721
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
4722
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
4723
|
+
type: alepha2502.TString;
|
|
4724
|
+
action: alepha2502.TString;
|
|
4725
|
+
severity: PgAttr<alepha2502.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
4726
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
4727
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
4728
|
+
userEmail: alepha2502.TOptional<alepha2502.TString>;
|
|
4729
|
+
resourceType: alepha2502.TOptional<alepha2502.TString>;
|
|
4730
|
+
resourceId: alepha2502.TOptional<alepha2502.TString>;
|
|
4731
|
+
description: alepha2502.TOptional<alepha2502.TString>;
|
|
4732
|
+
metadata: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
4733
|
+
ipAddress: alepha2502.TOptional<alepha2502.TString>;
|
|
4734
|
+
userAgent: alepha2502.TOptional<alepha2502.TString>;
|
|
4735
|
+
sessionId: alepha2502.TOptional<alepha2502.TString>;
|
|
4736
|
+
requestId: alepha2502.TOptional<alepha2502.TString>;
|
|
4737
|
+
success: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
4738
|
+
errorMessage: alepha2502.TOptional<alepha2502.TString>;
|
|
4739
|
+
}>>;
|
|
4740
|
+
/**
|
|
4741
|
+
* Registry of audit types and their allowed actions.
|
|
4742
|
+
*/
|
|
4743
|
+
protected readonly auditTypes: Map<string, AuditTypeDefinition>;
|
|
4744
|
+
/**
|
|
4745
|
+
* Register an audit type with its allowed actions.
|
|
4746
|
+
*/
|
|
4747
|
+
registerType(definition: AuditTypeDefinition): void;
|
|
4748
|
+
/**
|
|
4749
|
+
* Get all registered audit types.
|
|
4750
|
+
*/
|
|
4751
|
+
getRegisteredTypes(): AuditTypeDefinition[];
|
|
4752
|
+
/**
|
|
4753
|
+
* Get current request context if available.
|
|
4754
|
+
*/
|
|
4755
|
+
protected getRequestContext(): ServerRequest | undefined;
|
|
4756
|
+
/**
|
|
4757
|
+
* Create a new audit log entry.
|
|
4758
|
+
* Automatically populates ipAddress, userAgent, and requestId from the current request context.
|
|
4759
|
+
*/
|
|
4760
|
+
create(data: CreateAudit): Promise<AuditEntity>;
|
|
4761
|
+
/**
|
|
4762
|
+
* Record an audit event (convenience method).
|
|
4763
|
+
*/
|
|
4764
|
+
record(type: string, action: string, options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
|
|
4765
|
+
/**
|
|
4766
|
+
* Record an authentication event.
|
|
4767
|
+
*/
|
|
4768
|
+
recordAuth(action: "login" | "logout" | "login_failed" | "token_refresh" | "mfa_setup" | "mfa_verify", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
|
|
4769
|
+
/**
|
|
4770
|
+
* Record a user management event.
|
|
4771
|
+
*/
|
|
4772
|
+
recordUser(action: "create" | "update" | "delete" | "enable" | "disable" | "role_change", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
|
|
4773
|
+
/**
|
|
4774
|
+
* Record a data access event.
|
|
4775
|
+
*/
|
|
4776
|
+
recordAccess(action: "view" | "export" | "download", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
|
|
4777
|
+
/**
|
|
4778
|
+
* Record a security event.
|
|
4779
|
+
*/
|
|
4780
|
+
recordSecurity(action: "permission_denied" | "suspicious_activity" | "rate_limited" | "blocked", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
|
|
4781
|
+
/**
|
|
4782
|
+
* Record a system event.
|
|
4783
|
+
*/
|
|
4784
|
+
recordSystem(action: "startup" | "shutdown" | "config_change" | "maintenance" | "error", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
|
|
4785
|
+
/**
|
|
4786
|
+
* Find audit entries with filtering and pagination.
|
|
4787
|
+
*/
|
|
4788
|
+
find(query?: AuditQuery): Promise<Page$1<AuditEntity>>;
|
|
4789
|
+
/**
|
|
4790
|
+
* Get audit entry by ID.
|
|
4791
|
+
*/
|
|
4792
|
+
getById(id: string): Promise<AuditEntity>;
|
|
4793
|
+
/**
|
|
4794
|
+
* Get audit entries for a specific user.
|
|
4795
|
+
*/
|
|
4796
|
+
findByUser(userId: string, query?: Omit<AuditQuery, "userId">): Promise<Page$1<AuditEntity>>;
|
|
4797
|
+
/**
|
|
4798
|
+
* Get audit entries for a specific resource.
|
|
4799
|
+
*/
|
|
4800
|
+
findByResource(resourceType: string, resourceId: string, query?: Omit<AuditQuery, "resourceType" | "resourceId">): Promise<Page$1<AuditEntity>>;
|
|
4801
|
+
/**
|
|
4802
|
+
* Get audit statistics for a time period.
|
|
4803
|
+
*/
|
|
4804
|
+
getStats(options?: {
|
|
4805
|
+
from?: Date;
|
|
4806
|
+
to?: Date;
|
|
4807
|
+
userRealm?: string;
|
|
4808
|
+
}): Promise<AuditStats>;
|
|
4809
|
+
/**
|
|
4810
|
+
* Delete old audit entries (for retention policy).
|
|
4811
|
+
*/
|
|
4812
|
+
deleteOlderThan(date: Date): Promise<number>;
|
|
4813
|
+
}
|
|
4814
|
+
/**
|
|
4815
|
+
* Audit statistics summary.
|
|
4816
|
+
*/
|
|
4817
|
+
interface AuditStats {
|
|
4818
|
+
total: number;
|
|
4819
|
+
byType: Record<string, number>;
|
|
4820
|
+
bySeverity: Record<AuditSeverity, number>;
|
|
4821
|
+
successRate: number;
|
|
4822
|
+
recentFailures: AuditEntity[];
|
|
4823
|
+
}
|
|
4824
|
+
//#endregion
|
|
4825
|
+
//#region ../../../alepha/src/api/audits/controllers/AuditController.d.ts
|
|
4826
|
+
/**
|
|
4827
|
+
* REST API controller for audit log management.
|
|
4828
|
+
*
|
|
4829
|
+
* Provides endpoints for:
|
|
4830
|
+
* - Querying audit logs with filtering
|
|
4831
|
+
* - Creating audit entries
|
|
4832
|
+
* - Getting audit statistics
|
|
4833
|
+
* - Viewing registered audit types
|
|
4834
|
+
*/
|
|
4835
|
+
declare class AuditController {
|
|
4836
|
+
protected readonly url = "/audits";
|
|
4837
|
+
protected readonly group = "audits";
|
|
4838
|
+
protected readonly auditService: AuditService;
|
|
4839
|
+
/**
|
|
4840
|
+
* Find audit entries with filtering and pagination.
|
|
4841
|
+
*/
|
|
4842
|
+
readonly findAudits: ActionPrimitiveFn<{
|
|
4843
|
+
query: alepha2502.TObject<{
|
|
4844
|
+
page: alepha2502.TOptional<alepha2502.TInteger>;
|
|
4845
|
+
size: alepha2502.TOptional<alepha2502.TInteger>;
|
|
4846
|
+
sort: alepha2502.TOptional<alepha2502.TString>;
|
|
4847
|
+
type: alepha2502.TOptional<alepha2502.TString>;
|
|
4848
|
+
action: alepha2502.TOptional<alepha2502.TString>;
|
|
4849
|
+
severity: alepha2502.TOptional<alepha2502.TUnsafe<"info" | "warning" | "critical">>;
|
|
4850
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
4851
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
4852
|
+
resourceType: alepha2502.TOptional<alepha2502.TString>;
|
|
4853
|
+
resourceId: alepha2502.TOptional<alepha2502.TString>;
|
|
4854
|
+
success: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
4855
|
+
from: alepha2502.TOptional<alepha2502.TString>;
|
|
4856
|
+
to: alepha2502.TOptional<alepha2502.TString>;
|
|
4857
|
+
search: alepha2502.TOptional<alepha2502.TString>;
|
|
4858
|
+
}>;
|
|
4859
|
+
response: alepha2502.TPage<alepha2502.TObject<{
|
|
4860
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
4861
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
4862
|
+
type: alepha2502.TString;
|
|
4863
|
+
action: alepha2502.TString;
|
|
4864
|
+
severity: PgAttr<alepha2502.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
4865
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
4866
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
4867
|
+
userEmail: alepha2502.TOptional<alepha2502.TString>;
|
|
4868
|
+
resourceType: alepha2502.TOptional<alepha2502.TString>;
|
|
4869
|
+
resourceId: alepha2502.TOptional<alepha2502.TString>;
|
|
4870
|
+
description: alepha2502.TOptional<alepha2502.TString>;
|
|
4871
|
+
metadata: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
4872
|
+
ipAddress: alepha2502.TOptional<alepha2502.TString>;
|
|
4873
|
+
userAgent: alepha2502.TOptional<alepha2502.TString>;
|
|
4874
|
+
sessionId: alepha2502.TOptional<alepha2502.TString>;
|
|
4875
|
+
requestId: alepha2502.TOptional<alepha2502.TString>;
|
|
4876
|
+
success: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
4877
|
+
errorMessage: alepha2502.TOptional<alepha2502.TString>;
|
|
4878
|
+
}>>;
|
|
4879
|
+
}>;
|
|
4880
|
+
/**
|
|
4881
|
+
* Get a single audit entry by ID.
|
|
4882
|
+
*/
|
|
4883
|
+
readonly getAudit: ActionPrimitiveFn<{
|
|
4884
|
+
params: alepha2502.TObject<{
|
|
4885
|
+
id: alepha2502.TString;
|
|
4886
|
+
}>;
|
|
4887
|
+
response: alepha2502.TObject<{
|
|
4888
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
4889
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
4890
|
+
type: alepha2502.TString;
|
|
4891
|
+
action: alepha2502.TString;
|
|
4892
|
+
severity: PgAttr<alepha2502.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
4893
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
4894
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
4895
|
+
userEmail: alepha2502.TOptional<alepha2502.TString>;
|
|
4896
|
+
resourceType: alepha2502.TOptional<alepha2502.TString>;
|
|
4897
|
+
resourceId: alepha2502.TOptional<alepha2502.TString>;
|
|
4898
|
+
description: alepha2502.TOptional<alepha2502.TString>;
|
|
4899
|
+
metadata: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
4900
|
+
ipAddress: alepha2502.TOptional<alepha2502.TString>;
|
|
4901
|
+
userAgent: alepha2502.TOptional<alepha2502.TString>;
|
|
4902
|
+
sessionId: alepha2502.TOptional<alepha2502.TString>;
|
|
4903
|
+
requestId: alepha2502.TOptional<alepha2502.TString>;
|
|
4904
|
+
success: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
4905
|
+
errorMessage: alepha2502.TOptional<alepha2502.TString>;
|
|
4906
|
+
}>;
|
|
4907
|
+
}>;
|
|
4908
|
+
/**
|
|
4909
|
+
* Create a new audit entry.
|
|
4910
|
+
*/
|
|
4911
|
+
readonly createAudit: ActionPrimitiveFn<{
|
|
4912
|
+
body: alepha2502.TObject<{
|
|
4913
|
+
type: alepha2502.TString;
|
|
4914
|
+
action: alepha2502.TString;
|
|
4915
|
+
severity: alepha2502.TOptional<alepha2502.TUnsafe<"info" | "warning" | "critical">>;
|
|
4916
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
4917
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
4918
|
+
userEmail: alepha2502.TOptional<alepha2502.TString>;
|
|
4919
|
+
resourceType: alepha2502.TOptional<alepha2502.TString>;
|
|
4920
|
+
resourceId: alepha2502.TOptional<alepha2502.TString>;
|
|
4921
|
+
description: alepha2502.TOptional<alepha2502.TString>;
|
|
4922
|
+
metadata: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
4923
|
+
ipAddress: alepha2502.TOptional<alepha2502.TString>;
|
|
4924
|
+
userAgent: alepha2502.TOptional<alepha2502.TString>;
|
|
4925
|
+
sessionId: alepha2502.TOptional<alepha2502.TString>;
|
|
4926
|
+
requestId: alepha2502.TOptional<alepha2502.TString>;
|
|
4927
|
+
success: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
4928
|
+
errorMessage: alepha2502.TOptional<alepha2502.TString>;
|
|
4929
|
+
}>;
|
|
4930
|
+
response: alepha2502.TObject<{
|
|
4931
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
4932
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
4933
|
+
type: alepha2502.TString;
|
|
4934
|
+
action: alepha2502.TString;
|
|
4935
|
+
severity: PgAttr<alepha2502.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
4936
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
4937
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
4938
|
+
userEmail: alepha2502.TOptional<alepha2502.TString>;
|
|
4939
|
+
resourceType: alepha2502.TOptional<alepha2502.TString>;
|
|
4940
|
+
resourceId: alepha2502.TOptional<alepha2502.TString>;
|
|
4941
|
+
description: alepha2502.TOptional<alepha2502.TString>;
|
|
4942
|
+
metadata: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
4943
|
+
ipAddress: alepha2502.TOptional<alepha2502.TString>;
|
|
4944
|
+
userAgent: alepha2502.TOptional<alepha2502.TString>;
|
|
4945
|
+
sessionId: alepha2502.TOptional<alepha2502.TString>;
|
|
4946
|
+
requestId: alepha2502.TOptional<alepha2502.TString>;
|
|
4947
|
+
success: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
4948
|
+
errorMessage: alepha2502.TOptional<alepha2502.TString>;
|
|
4949
|
+
}>;
|
|
4950
|
+
}>;
|
|
4951
|
+
/**
|
|
4952
|
+
* Get audit entries for a specific user.
|
|
4953
|
+
*/
|
|
4954
|
+
readonly findByUser: ActionPrimitiveFn<{
|
|
4955
|
+
params: alepha2502.TObject<{
|
|
4956
|
+
userId: alepha2502.TString;
|
|
4957
|
+
}>;
|
|
4958
|
+
query: alepha2502.TObject<{
|
|
4959
|
+
type: alepha2502.TOptional<alepha2502.TString>;
|
|
4960
|
+
sort: alepha2502.TOptional<alepha2502.TString>;
|
|
4961
|
+
search: alepha2502.TOptional<alepha2502.TString>;
|
|
4962
|
+
page: alepha2502.TOptional<alepha2502.TInteger>;
|
|
4963
|
+
from: alepha2502.TOptional<alepha2502.TString>;
|
|
4964
|
+
to: alepha2502.TOptional<alepha2502.TString>;
|
|
4965
|
+
size: alepha2502.TOptional<alepha2502.TInteger>;
|
|
4966
|
+
success: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
4967
|
+
action: alepha2502.TOptional<alepha2502.TString>;
|
|
4968
|
+
severity: alepha2502.TOptional<alepha2502.TUnsafe<"info" | "warning" | "critical">>;
|
|
4969
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
4970
|
+
resourceType: alepha2502.TOptional<alepha2502.TString>;
|
|
4971
|
+
resourceId: alepha2502.TOptional<alepha2502.TString>;
|
|
4972
|
+
}>;
|
|
4973
|
+
response: alepha2502.TPage<alepha2502.TObject<{
|
|
4974
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
4975
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
4976
|
+
type: alepha2502.TString;
|
|
4977
|
+
action: alepha2502.TString;
|
|
4978
|
+
severity: PgAttr<alepha2502.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
4979
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
4980
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
4981
|
+
userEmail: alepha2502.TOptional<alepha2502.TString>;
|
|
4982
|
+
resourceType: alepha2502.TOptional<alepha2502.TString>;
|
|
4983
|
+
resourceId: alepha2502.TOptional<alepha2502.TString>;
|
|
4984
|
+
description: alepha2502.TOptional<alepha2502.TString>;
|
|
4985
|
+
metadata: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
4986
|
+
ipAddress: alepha2502.TOptional<alepha2502.TString>;
|
|
4987
|
+
userAgent: alepha2502.TOptional<alepha2502.TString>;
|
|
4988
|
+
sessionId: alepha2502.TOptional<alepha2502.TString>;
|
|
4989
|
+
requestId: alepha2502.TOptional<alepha2502.TString>;
|
|
4990
|
+
success: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
4991
|
+
errorMessage: alepha2502.TOptional<alepha2502.TString>;
|
|
4992
|
+
}>>;
|
|
4993
|
+
}>;
|
|
4994
|
+
/**
|
|
4995
|
+
* Get audit entries for a specific resource.
|
|
4996
|
+
*/
|
|
4997
|
+
readonly findByResource: ActionPrimitiveFn<{
|
|
4998
|
+
params: alepha2502.TObject<{
|
|
4999
|
+
resourceType: alepha2502.TString;
|
|
5000
|
+
resourceId: alepha2502.TString;
|
|
5001
|
+
}>;
|
|
5002
|
+
query: alepha2502.TObject<{
|
|
5003
|
+
type: alepha2502.TOptional<alepha2502.TString>;
|
|
5004
|
+
sort: alepha2502.TOptional<alepha2502.TString>;
|
|
5005
|
+
search: alepha2502.TOptional<alepha2502.TString>;
|
|
5006
|
+
page: alepha2502.TOptional<alepha2502.TInteger>;
|
|
5007
|
+
from: alepha2502.TOptional<alepha2502.TString>;
|
|
5008
|
+
to: alepha2502.TOptional<alepha2502.TString>;
|
|
5009
|
+
size: alepha2502.TOptional<alepha2502.TInteger>;
|
|
5010
|
+
success: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
5011
|
+
action: alepha2502.TOptional<alepha2502.TString>;
|
|
5012
|
+
severity: alepha2502.TOptional<alepha2502.TUnsafe<"info" | "warning" | "critical">>;
|
|
5013
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
5014
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
5015
|
+
}>;
|
|
5016
|
+
response: alepha2502.TPage<alepha2502.TObject<{
|
|
5017
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
5018
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
5019
|
+
type: alepha2502.TString;
|
|
5020
|
+
action: alepha2502.TString;
|
|
5021
|
+
severity: PgAttr<alepha2502.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
5022
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
5023
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
5024
|
+
userEmail: alepha2502.TOptional<alepha2502.TString>;
|
|
5025
|
+
resourceType: alepha2502.TOptional<alepha2502.TString>;
|
|
5026
|
+
resourceId: alepha2502.TOptional<alepha2502.TString>;
|
|
5027
|
+
description: alepha2502.TOptional<alepha2502.TString>;
|
|
5028
|
+
metadata: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
5029
|
+
ipAddress: alepha2502.TOptional<alepha2502.TString>;
|
|
5030
|
+
userAgent: alepha2502.TOptional<alepha2502.TString>;
|
|
5031
|
+
sessionId: alepha2502.TOptional<alepha2502.TString>;
|
|
5032
|
+
requestId: alepha2502.TOptional<alepha2502.TString>;
|
|
5033
|
+
success: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
5034
|
+
errorMessage: alepha2502.TOptional<alepha2502.TString>;
|
|
5035
|
+
}>>;
|
|
5036
|
+
}>;
|
|
5037
|
+
/**
|
|
5038
|
+
* Get audit statistics.
|
|
5039
|
+
*/
|
|
5040
|
+
readonly getStats: ActionPrimitiveFn<{
|
|
5041
|
+
query: alepha2502.TObject<{
|
|
5042
|
+
from: alepha2502.TOptional<alepha2502.TString>;
|
|
5043
|
+
to: alepha2502.TOptional<alepha2502.TString>;
|
|
5044
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
5045
|
+
}>;
|
|
5046
|
+
response: alepha2502.TObject<{
|
|
5047
|
+
total: alepha2502.TInteger;
|
|
5048
|
+
byType: alepha2502.TRecord<"^.*$", alepha2502.TInteger>;
|
|
5049
|
+
bySeverity: alepha2502.TObject<{
|
|
5050
|
+
info: alepha2502.TInteger;
|
|
5051
|
+
warning: alepha2502.TInteger;
|
|
5052
|
+
critical: alepha2502.TInteger;
|
|
5053
|
+
}>;
|
|
5054
|
+
successRate: alepha2502.TNumber;
|
|
5055
|
+
recentFailures: alepha2502.TArray<alepha2502.TObject<{
|
|
5056
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
5057
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
5058
|
+
type: alepha2502.TString;
|
|
5059
|
+
action: alepha2502.TString;
|
|
5060
|
+
severity: PgAttr<alepha2502.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
5061
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
5062
|
+
userRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
5063
|
+
userEmail: alepha2502.TOptional<alepha2502.TString>;
|
|
5064
|
+
resourceType: alepha2502.TOptional<alepha2502.TString>;
|
|
5065
|
+
resourceId: alepha2502.TOptional<alepha2502.TString>;
|
|
5066
|
+
description: alepha2502.TOptional<alepha2502.TString>;
|
|
5067
|
+
metadata: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
5068
|
+
ipAddress: alepha2502.TOptional<alepha2502.TString>;
|
|
5069
|
+
userAgent: alepha2502.TOptional<alepha2502.TString>;
|
|
5070
|
+
sessionId: alepha2502.TOptional<alepha2502.TString>;
|
|
5071
|
+
requestId: alepha2502.TOptional<alepha2502.TString>;
|
|
5072
|
+
success: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
5073
|
+
errorMessage: alepha2502.TOptional<alepha2502.TString>;
|
|
5074
|
+
}>>;
|
|
5075
|
+
}>;
|
|
5076
|
+
}>;
|
|
5077
|
+
/**
|
|
5078
|
+
* Get registered audit types.
|
|
5079
|
+
*/
|
|
5080
|
+
readonly getTypes: ActionPrimitiveFn<{
|
|
5081
|
+
response: alepha2502.TArray<alepha2502.TObject<{
|
|
5082
|
+
type: alepha2502.TString;
|
|
5083
|
+
description: alepha2502.TOptional<alepha2502.TString>;
|
|
5084
|
+
actions: alepha2502.TArray<alepha2502.TString>;
|
|
5085
|
+
}>>;
|
|
5086
|
+
}>;
|
|
5087
|
+
/**
|
|
5088
|
+
* Get distinct values for filters.
|
|
5089
|
+
*/
|
|
5090
|
+
readonly getFilterOptions: ActionPrimitiveFn<{
|
|
5091
|
+
response: alepha2502.TObject<{
|
|
5092
|
+
types: alepha2502.TArray<alepha2502.TString>;
|
|
5093
|
+
actions: alepha2502.TArray<alepha2502.TString>;
|
|
5094
|
+
resourceTypes: alepha2502.TArray<alepha2502.TString>;
|
|
5095
|
+
userRealms: alepha2502.TArray<alepha2502.TString>;
|
|
5096
|
+
}>;
|
|
5097
|
+
}>;
|
|
5098
|
+
}
|
|
5099
|
+
//#endregion
|
|
4315
5100
|
//#region ../../../alepha/src/bucket/providers/FileStorageProvider.d.ts
|
|
4316
5101
|
declare abstract class FileStorageProvider {
|
|
4317
5102
|
/**
|
|
@@ -4536,8 +5321,8 @@ interface BucketFileOptions {
|
|
|
4536
5321
|
/**
|
|
4537
5322
|
* Local file storage configuration atom
|
|
4538
5323
|
*/
|
|
4539
|
-
declare const localFileStorageOptions:
|
|
4540
|
-
storagePath:
|
|
5324
|
+
declare const localFileStorageOptions: alepha2502.Atom<alepha2502.TObject<{
|
|
5325
|
+
storagePath: alepha2502.TString;
|
|
4541
5326
|
}>, "alepha.bucket.local.options">;
|
|
4542
5327
|
type LocalFileStorageProviderOptions = Static<typeof localFileStorageOptions.schema>;
|
|
4543
5328
|
declare module "alepha" {
|
|
@@ -4580,102 +5365,102 @@ declare module "alepha" {
|
|
|
4580
5365
|
* @module alepha.bucket
|
|
4581
5366
|
*/
|
|
4582
5367
|
//#endregion
|
|
4583
|
-
//#region ../../../alepha/src/api
|
|
4584
|
-
declare const files: EntityPrimitive<
|
|
4585
|
-
id: PgAttr<PgAttr<
|
|
4586
|
-
version: PgAttr<PgAttr<
|
|
4587
|
-
createdAt: PgAttr<PgAttr<
|
|
4588
|
-
updatedAt: PgAttr<PgAttr<
|
|
4589
|
-
blobId:
|
|
4590
|
-
creator:
|
|
4591
|
-
creatorRealm:
|
|
4592
|
-
creatorName:
|
|
4593
|
-
bucket:
|
|
4594
|
-
expirationDate:
|
|
4595
|
-
name:
|
|
4596
|
-
size:
|
|
4597
|
-
mimeType:
|
|
4598
|
-
tags:
|
|
4599
|
-
checksum:
|
|
5368
|
+
//#region ../../../alepha/src/api/files/entities/files.d.ts
|
|
5369
|
+
declare const files: EntityPrimitive<alepha2502.TObject<{
|
|
5370
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
5371
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
5372
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
5373
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
5374
|
+
blobId: alepha2502.TString;
|
|
5375
|
+
creator: alepha2502.TOptional<alepha2502.TString>;
|
|
5376
|
+
creatorRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
5377
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
5378
|
+
bucket: alepha2502.TString;
|
|
5379
|
+
expirationDate: alepha2502.TOptional<alepha2502.TString>;
|
|
5380
|
+
name: alepha2502.TString;
|
|
5381
|
+
size: alepha2502.TNumber;
|
|
5382
|
+
mimeType: alepha2502.TString;
|
|
5383
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
5384
|
+
checksum: alepha2502.TOptional<alepha2502.TString>;
|
|
4600
5385
|
}>>;
|
|
4601
5386
|
type FileEntity = Static<typeof files.schema>;
|
|
4602
5387
|
//#endregion
|
|
4603
|
-
//#region ../../../alepha/src/api
|
|
4604
|
-
declare const fileQuerySchema:
|
|
4605
|
-
page:
|
|
4606
|
-
size:
|
|
4607
|
-
sort:
|
|
4608
|
-
bucket:
|
|
4609
|
-
tags:
|
|
4610
|
-
name:
|
|
4611
|
-
mimeType:
|
|
4612
|
-
creator:
|
|
4613
|
-
createdAfter:
|
|
4614
|
-
createdBefore:
|
|
5388
|
+
//#region ../../../alepha/src/api/files/schemas/fileQuerySchema.d.ts
|
|
5389
|
+
declare const fileQuerySchema: alepha2502.TObject<{
|
|
5390
|
+
page: alepha2502.TOptional<alepha2502.TInteger>;
|
|
5391
|
+
size: alepha2502.TOptional<alepha2502.TInteger>;
|
|
5392
|
+
sort: alepha2502.TOptional<alepha2502.TString>;
|
|
5393
|
+
bucket: alepha2502.TOptional<alepha2502.TString>;
|
|
5394
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
5395
|
+
name: alepha2502.TOptional<alepha2502.TString>;
|
|
5396
|
+
mimeType: alepha2502.TOptional<alepha2502.TString>;
|
|
5397
|
+
creator: alepha2502.TOptional<alepha2502.TString>;
|
|
5398
|
+
createdAfter: alepha2502.TOptional<alepha2502.TString>;
|
|
5399
|
+
createdBefore: alepha2502.TOptional<alepha2502.TString>;
|
|
4615
5400
|
}>;
|
|
4616
5401
|
type FileQuery = Static<typeof fileQuerySchema>;
|
|
4617
5402
|
//#endregion
|
|
4618
|
-
//#region ../../../alepha/src/api
|
|
4619
|
-
declare const fileResourceSchema:
|
|
4620
|
-
id: PgAttr<PgAttr<
|
|
4621
|
-
version: PgAttr<PgAttr<
|
|
4622
|
-
createdAt: PgAttr<PgAttr<
|
|
4623
|
-
updatedAt: PgAttr<PgAttr<
|
|
4624
|
-
blobId:
|
|
4625
|
-
creator:
|
|
4626
|
-
creatorRealm:
|
|
4627
|
-
creatorName:
|
|
4628
|
-
bucket:
|
|
4629
|
-
expirationDate:
|
|
4630
|
-
name:
|
|
4631
|
-
size:
|
|
4632
|
-
mimeType:
|
|
4633
|
-
tags:
|
|
4634
|
-
checksum:
|
|
5403
|
+
//#region ../../../alepha/src/api/files/schemas/fileResourceSchema.d.ts
|
|
5404
|
+
declare const fileResourceSchema: alepha2502.TObject<{
|
|
5405
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
5406
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
5407
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
5408
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
5409
|
+
blobId: alepha2502.TString;
|
|
5410
|
+
creator: alepha2502.TOptional<alepha2502.TString>;
|
|
5411
|
+
creatorRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
5412
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
5413
|
+
bucket: alepha2502.TString;
|
|
5414
|
+
expirationDate: alepha2502.TOptional<alepha2502.TString>;
|
|
5415
|
+
name: alepha2502.TString;
|
|
5416
|
+
size: alepha2502.TNumber;
|
|
5417
|
+
mimeType: alepha2502.TString;
|
|
5418
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
5419
|
+
checksum: alepha2502.TOptional<alepha2502.TString>;
|
|
4635
5420
|
}>;
|
|
4636
5421
|
type FileResource = Static<typeof fileResourceSchema>;
|
|
4637
5422
|
//#endregion
|
|
4638
|
-
//#region ../../../alepha/src/api
|
|
4639
|
-
declare const storageStatsSchema:
|
|
4640
|
-
totalSize:
|
|
4641
|
-
totalFiles:
|
|
4642
|
-
byBucket:
|
|
4643
|
-
bucket:
|
|
4644
|
-
totalSize:
|
|
4645
|
-
fileCount:
|
|
5423
|
+
//#region ../../../alepha/src/api/files/schemas/storageStatsSchema.d.ts
|
|
5424
|
+
declare const storageStatsSchema: alepha2502.TObject<{
|
|
5425
|
+
totalSize: alepha2502.TNumber;
|
|
5426
|
+
totalFiles: alepha2502.TNumber;
|
|
5427
|
+
byBucket: alepha2502.TArray<alepha2502.TObject<{
|
|
5428
|
+
bucket: alepha2502.TString;
|
|
5429
|
+
totalSize: alepha2502.TNumber;
|
|
5430
|
+
fileCount: alepha2502.TNumber;
|
|
4646
5431
|
}>>;
|
|
4647
|
-
byMimeType:
|
|
4648
|
-
mimeType:
|
|
4649
|
-
fileCount:
|
|
5432
|
+
byMimeType: alepha2502.TArray<alepha2502.TObject<{
|
|
5433
|
+
mimeType: alepha2502.TString;
|
|
5434
|
+
fileCount: alepha2502.TNumber;
|
|
4650
5435
|
}>>;
|
|
4651
5436
|
}>;
|
|
4652
5437
|
type StorageStats = Static<typeof storageStatsSchema>;
|
|
4653
5438
|
//#endregion
|
|
4654
|
-
//#region ../../../alepha/src/api
|
|
5439
|
+
//#region ../../../alepha/src/api/files/services/FileService.d.ts
|
|
4655
5440
|
declare class FileService {
|
|
4656
5441
|
protected readonly alepha: Alepha;
|
|
4657
5442
|
protected readonly log: Logger;
|
|
4658
|
-
protected readonly fileRepository: Repository<
|
|
4659
|
-
id: PgAttr<PgAttr<
|
|
4660
|
-
version: PgAttr<PgAttr<
|
|
4661
|
-
createdAt: PgAttr<PgAttr<
|
|
4662
|
-
updatedAt: PgAttr<PgAttr<
|
|
4663
|
-
blobId:
|
|
4664
|
-
creator:
|
|
4665
|
-
creatorRealm:
|
|
4666
|
-
creatorName:
|
|
4667
|
-
bucket:
|
|
4668
|
-
expirationDate:
|
|
4669
|
-
name:
|
|
4670
|
-
size:
|
|
4671
|
-
mimeType:
|
|
4672
|
-
tags:
|
|
4673
|
-
checksum:
|
|
5443
|
+
protected readonly fileRepository: Repository<alepha2502.TObject<{
|
|
5444
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
5445
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
5446
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
5447
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
5448
|
+
blobId: alepha2502.TString;
|
|
5449
|
+
creator: alepha2502.TOptional<alepha2502.TString>;
|
|
5450
|
+
creatorRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
5451
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
5452
|
+
bucket: alepha2502.TString;
|
|
5453
|
+
expirationDate: alepha2502.TOptional<alepha2502.TString>;
|
|
5454
|
+
name: alepha2502.TString;
|
|
5455
|
+
size: alepha2502.TNumber;
|
|
5456
|
+
mimeType: alepha2502.TString;
|
|
5457
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
5458
|
+
checksum: alepha2502.TOptional<alepha2502.TString>;
|
|
4674
5459
|
}>>;
|
|
4675
5460
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
4676
5461
|
protected readonly defaultBucket: BucketPrimitive;
|
|
4677
|
-
protected onUploadFile:
|
|
4678
|
-
protected onDeleteBucketFile:
|
|
5462
|
+
protected onUploadFile: alepha2502.HookPrimitive<"bucket:file:uploaded">;
|
|
5463
|
+
protected onDeleteBucketFile: alepha2502.HookPrimitive<"bucket:file:deleted">;
|
|
4679
5464
|
/**
|
|
4680
5465
|
* Calculates SHA-256 checksum of a file.
|
|
4681
5466
|
*
|
|
@@ -4795,7 +5580,7 @@ declare class FileService {
|
|
|
4795
5580
|
entityToResource(entity: FileEntity): FileResource;
|
|
4796
5581
|
}
|
|
4797
5582
|
//#endregion
|
|
4798
|
-
//#region ../../../alepha/src/api
|
|
5583
|
+
//#region ../../../alepha/src/api/files/controllers/FileController.d.ts
|
|
4799
5584
|
/**
|
|
4800
5585
|
* REST API controller for file management operations.
|
|
4801
5586
|
* Provides endpoints for uploading, downloading, listing, and deleting files.
|
|
@@ -4809,34 +5594,34 @@ declare class FileController {
|
|
|
4809
5594
|
* Supports filtering by bucket and tags.
|
|
4810
5595
|
*/
|
|
4811
5596
|
readonly findFiles: ActionPrimitiveFn<{
|
|
4812
|
-
query:
|
|
4813
|
-
page:
|
|
4814
|
-
size:
|
|
4815
|
-
sort:
|
|
4816
|
-
bucket:
|
|
4817
|
-
tags:
|
|
4818
|
-
name:
|
|
4819
|
-
mimeType:
|
|
4820
|
-
creator:
|
|
4821
|
-
createdAfter:
|
|
4822
|
-
createdBefore:
|
|
5597
|
+
query: alepha2502.TObject<{
|
|
5598
|
+
page: alepha2502.TOptional<alepha2502.TInteger>;
|
|
5599
|
+
size: alepha2502.TOptional<alepha2502.TInteger>;
|
|
5600
|
+
sort: alepha2502.TOptional<alepha2502.TString>;
|
|
5601
|
+
bucket: alepha2502.TOptional<alepha2502.TString>;
|
|
5602
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
5603
|
+
name: alepha2502.TOptional<alepha2502.TString>;
|
|
5604
|
+
mimeType: alepha2502.TOptional<alepha2502.TString>;
|
|
5605
|
+
creator: alepha2502.TOptional<alepha2502.TString>;
|
|
5606
|
+
createdAfter: alepha2502.TOptional<alepha2502.TString>;
|
|
5607
|
+
createdBefore: alepha2502.TOptional<alepha2502.TString>;
|
|
4823
5608
|
}>;
|
|
4824
|
-
response:
|
|
4825
|
-
id: PgAttr<PgAttr<
|
|
4826
|
-
version: PgAttr<PgAttr<
|
|
4827
|
-
createdAt: PgAttr<PgAttr<
|
|
4828
|
-
updatedAt: PgAttr<PgAttr<
|
|
4829
|
-
blobId:
|
|
4830
|
-
creator:
|
|
4831
|
-
creatorRealm:
|
|
4832
|
-
creatorName:
|
|
4833
|
-
bucket:
|
|
4834
|
-
expirationDate:
|
|
4835
|
-
name:
|
|
4836
|
-
size:
|
|
4837
|
-
mimeType:
|
|
4838
|
-
tags:
|
|
4839
|
-
checksum:
|
|
5609
|
+
response: alepha2502.TPage<alepha2502.TObject<{
|
|
5610
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
5611
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
5612
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
5613
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
5614
|
+
blobId: alepha2502.TString;
|
|
5615
|
+
creator: alepha2502.TOptional<alepha2502.TString>;
|
|
5616
|
+
creatorRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
5617
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
5618
|
+
bucket: alepha2502.TString;
|
|
5619
|
+
expirationDate: alepha2502.TOptional<alepha2502.TString>;
|
|
5620
|
+
name: alepha2502.TString;
|
|
5621
|
+
size: alepha2502.TNumber;
|
|
5622
|
+
mimeType: alepha2502.TString;
|
|
5623
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
5624
|
+
checksum: alepha2502.TOptional<alepha2502.TString>;
|
|
4840
5625
|
}>>;
|
|
4841
5626
|
}>;
|
|
4842
5627
|
/**
|
|
@@ -4844,13 +5629,13 @@ declare class FileController {
|
|
|
4844
5629
|
* Removes the file from the bucket and cleans up the database record.
|
|
4845
5630
|
*/
|
|
4846
5631
|
readonly deleteFile: ActionPrimitiveFn<{
|
|
4847
|
-
params:
|
|
4848
|
-
id:
|
|
5632
|
+
params: alepha2502.TObject<{
|
|
5633
|
+
id: alepha2502.TString;
|
|
4849
5634
|
}>;
|
|
4850
|
-
response:
|
|
4851
|
-
ok:
|
|
4852
|
-
id:
|
|
4853
|
-
count:
|
|
5635
|
+
response: alepha2502.TObject<{
|
|
5636
|
+
ok: alepha2502.TBoolean;
|
|
5637
|
+
id: alepha2502.TOptional<alepha2502.TUnion<[alepha2502.TString, alepha2502.TInteger]>>;
|
|
5638
|
+
count: alepha2502.TOptional<alepha2502.TNumber>;
|
|
4854
5639
|
}>;
|
|
4855
5640
|
}>;
|
|
4856
5641
|
/**
|
|
@@ -4859,29 +5644,29 @@ declare class FileController {
|
|
|
4859
5644
|
* Optionally specify bucket and expiration date.
|
|
4860
5645
|
*/
|
|
4861
5646
|
readonly uploadFile: ActionPrimitiveFn<{
|
|
4862
|
-
body:
|
|
4863
|
-
file:
|
|
5647
|
+
body: alepha2502.TObject<{
|
|
5648
|
+
file: alepha2502.TFile;
|
|
4864
5649
|
}>;
|
|
4865
|
-
query:
|
|
4866
|
-
expirationDate:
|
|
4867
|
-
bucket:
|
|
5650
|
+
query: alepha2502.TObject<{
|
|
5651
|
+
expirationDate: alepha2502.TOptional<alepha2502.TString>;
|
|
5652
|
+
bucket: alepha2502.TOptional<alepha2502.TString>;
|
|
4868
5653
|
}>;
|
|
4869
|
-
response:
|
|
4870
|
-
id: PgAttr<PgAttr<
|
|
4871
|
-
version: PgAttr<PgAttr<
|
|
4872
|
-
createdAt: PgAttr<PgAttr<
|
|
4873
|
-
updatedAt: PgAttr<PgAttr<
|
|
4874
|
-
blobId:
|
|
4875
|
-
creator:
|
|
4876
|
-
creatorRealm:
|
|
4877
|
-
creatorName:
|
|
4878
|
-
bucket:
|
|
4879
|
-
expirationDate:
|
|
4880
|
-
name:
|
|
4881
|
-
size:
|
|
4882
|
-
mimeType:
|
|
4883
|
-
tags:
|
|
4884
|
-
checksum:
|
|
5654
|
+
response: alepha2502.TObject<{
|
|
5655
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
5656
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
5657
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
5658
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
5659
|
+
blobId: alepha2502.TString;
|
|
5660
|
+
creator: alepha2502.TOptional<alepha2502.TString>;
|
|
5661
|
+
creatorRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
5662
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
5663
|
+
bucket: alepha2502.TString;
|
|
5664
|
+
expirationDate: alepha2502.TOptional<alepha2502.TString>;
|
|
5665
|
+
name: alepha2502.TString;
|
|
5666
|
+
size: alepha2502.TNumber;
|
|
5667
|
+
mimeType: alepha2502.TString;
|
|
5668
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
5669
|
+
checksum: alepha2502.TOptional<alepha2502.TString>;
|
|
4885
5670
|
}>;
|
|
4886
5671
|
}>;
|
|
4887
5672
|
/**
|
|
@@ -4889,30 +5674,30 @@ declare class FileController {
|
|
|
4889
5674
|
* Allows updating name, tags, and expiration date without modifying file content.
|
|
4890
5675
|
*/
|
|
4891
5676
|
readonly updateFile: ActionPrimitiveFn<{
|
|
4892
|
-
params:
|
|
4893
|
-
id:
|
|
5677
|
+
params: alepha2502.TObject<{
|
|
5678
|
+
id: alepha2502.TString;
|
|
4894
5679
|
}>;
|
|
4895
|
-
body:
|
|
4896
|
-
name:
|
|
4897
|
-
tags:
|
|
4898
|
-
expirationDate:
|
|
5680
|
+
body: alepha2502.TObject<{
|
|
5681
|
+
name: alepha2502.TOptional<alepha2502.TString>;
|
|
5682
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
5683
|
+
expirationDate: alepha2502.TOptional<alepha2502.TString>;
|
|
4899
5684
|
}>;
|
|
4900
|
-
response:
|
|
4901
|
-
id: PgAttr<PgAttr<
|
|
4902
|
-
version: PgAttr<PgAttr<
|
|
4903
|
-
createdAt: PgAttr<PgAttr<
|
|
4904
|
-
updatedAt: PgAttr<PgAttr<
|
|
4905
|
-
blobId:
|
|
4906
|
-
creator:
|
|
4907
|
-
creatorRealm:
|
|
4908
|
-
creatorName:
|
|
4909
|
-
bucket:
|
|
4910
|
-
expirationDate:
|
|
4911
|
-
name:
|
|
4912
|
-
size:
|
|
4913
|
-
mimeType:
|
|
4914
|
-
tags:
|
|
4915
|
-
checksum:
|
|
5685
|
+
response: alepha2502.TObject<{
|
|
5686
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
5687
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
5688
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
5689
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
5690
|
+
blobId: alepha2502.TString;
|
|
5691
|
+
creator: alepha2502.TOptional<alepha2502.TString>;
|
|
5692
|
+
creatorRealm: alepha2502.TOptional<alepha2502.TString>;
|
|
5693
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
5694
|
+
bucket: alepha2502.TString;
|
|
5695
|
+
expirationDate: alepha2502.TOptional<alepha2502.TString>;
|
|
5696
|
+
name: alepha2502.TString;
|
|
5697
|
+
size: alepha2502.TNumber;
|
|
5698
|
+
mimeType: alepha2502.TString;
|
|
5699
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
5700
|
+
checksum: alepha2502.TOptional<alepha2502.TString>;
|
|
4916
5701
|
}>;
|
|
4917
5702
|
}>;
|
|
4918
5703
|
/**
|
|
@@ -4921,29 +5706,67 @@ declare class FileController {
|
|
|
4921
5706
|
* Cached with ETag support for 1 year (immutable).
|
|
4922
5707
|
*/
|
|
4923
5708
|
readonly streamFile: ActionPrimitiveFn<{
|
|
4924
|
-
params:
|
|
4925
|
-
id:
|
|
5709
|
+
params: alepha2502.TObject<{
|
|
5710
|
+
id: alepha2502.TString;
|
|
4926
5711
|
}>;
|
|
4927
|
-
response:
|
|
5712
|
+
response: alepha2502.TFile;
|
|
4928
5713
|
}>;
|
|
4929
5714
|
}
|
|
4930
5715
|
//#endregion
|
|
4931
|
-
//#region ../../../alepha/src/
|
|
4932
|
-
declare
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
5716
|
+
//#region ../../../alepha/src/scheduler/primitives/$scheduler.d.ts
|
|
5717
|
+
declare const envSchema$1: alepha2502.TObject<{
|
|
5718
|
+
SCHEDULER_PREFIX: alepha2502.TOptional<alepha2502.TString>;
|
|
5719
|
+
}>;
|
|
5720
|
+
declare module "alepha" {
|
|
5721
|
+
interface Env extends Partial<Static<typeof envSchema$1>> {}
|
|
5722
|
+
}
|
|
5723
|
+
//#endregion
|
|
5724
|
+
//#region ../../../alepha/src/scheduler/index.d.ts
|
|
5725
|
+
declare module "alepha" {
|
|
5726
|
+
interface Hooks {
|
|
5727
|
+
"scheduler:begin": {
|
|
5728
|
+
name: string;
|
|
5729
|
+
now: DateTime;
|
|
5730
|
+
context: string;
|
|
5731
|
+
};
|
|
5732
|
+
"scheduler:success": {
|
|
5733
|
+
name: string;
|
|
5734
|
+
context: string;
|
|
5735
|
+
};
|
|
5736
|
+
"scheduler:error": {
|
|
5737
|
+
name: string;
|
|
5738
|
+
error: Error;
|
|
5739
|
+
context: string;
|
|
5740
|
+
};
|
|
5741
|
+
"scheduler:end": {
|
|
5742
|
+
name: string;
|
|
5743
|
+
context: string;
|
|
5744
|
+
};
|
|
5745
|
+
}
|
|
5746
|
+
}
|
|
5747
|
+
/**
|
|
5748
|
+
* Generic interface for scheduling tasks.
|
|
5749
|
+
*
|
|
5750
|
+
* @see {@link $scheduler}
|
|
5751
|
+
* @module alepha.scheduler
|
|
5752
|
+
*/
|
|
5753
|
+
//#endregion
|
|
5754
|
+
//#region ../../../alepha/src/api/files/index.d.ts
|
|
5755
|
+
declare module "alepha/bucket" {
|
|
5756
|
+
interface BucketFileOptions {
|
|
5757
|
+
/**
|
|
5758
|
+
* Time to live for the files in the bucket.
|
|
5759
|
+
*/
|
|
5760
|
+
ttl?: DurationLike;
|
|
5761
|
+
/**
|
|
5762
|
+
* Tags for the bucket.
|
|
5763
|
+
*/
|
|
5764
|
+
tags?: string[];
|
|
5765
|
+
/**
|
|
5766
|
+
* User performing the operation.
|
|
5767
|
+
*/
|
|
5768
|
+
user?: UserAccountToken;
|
|
5769
|
+
/**
|
|
4947
5770
|
* Whether to persist the file metadata in the database.
|
|
4948
5771
|
*
|
|
4949
5772
|
* @default true
|
|
@@ -5226,56 +6049,56 @@ declare class BatchPrimitive<TItem extends TSchema, TResponse = any> extends Pri
|
|
|
5226
6049
|
* @returns The number of items cleared
|
|
5227
6050
|
*/
|
|
5228
6051
|
clearCompleted(status?: "completed" | "failed"): number;
|
|
5229
|
-
protected readonly onReady:
|
|
5230
|
-
protected readonly dispose:
|
|
5231
|
-
}
|
|
5232
|
-
//#endregion
|
|
5233
|
-
//#region ../../../alepha/src/api
|
|
5234
|
-
declare const notifications: EntityPrimitive<
|
|
5235
|
-
id: PgAttr<PgAttr<
|
|
5236
|
-
version: PgAttr<PgAttr<
|
|
5237
|
-
createdAt: PgAttr<PgAttr<
|
|
5238
|
-
updatedAt: PgAttr<PgAttr<
|
|
5239
|
-
type:
|
|
5240
|
-
template:
|
|
5241
|
-
category:
|
|
5242
|
-
critical:
|
|
5243
|
-
sensitive:
|
|
5244
|
-
contact:
|
|
5245
|
-
variables:
|
|
5246
|
-
scheduledAt:
|
|
5247
|
-
sentAt:
|
|
5248
|
-
error:
|
|
5249
|
-
at:
|
|
5250
|
-
name:
|
|
5251
|
-
message:
|
|
6052
|
+
protected readonly onReady: alepha2502.HookPrimitive<"ready">;
|
|
6053
|
+
protected readonly dispose: alepha2502.HookPrimitive<"stop">;
|
|
6054
|
+
}
|
|
6055
|
+
//#endregion
|
|
6056
|
+
//#region ../../../alepha/src/api/notifications/entities/notifications.d.ts
|
|
6057
|
+
declare const notifications: EntityPrimitive<alepha2502.TObject<{
|
|
6058
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
6059
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
6060
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
6061
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
6062
|
+
type: alepha2502.TUnsafe<"email" | "sms">;
|
|
6063
|
+
template: alepha2502.TString;
|
|
6064
|
+
category: alepha2502.TOptional<alepha2502.TString>;
|
|
6065
|
+
critical: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
6066
|
+
sensitive: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
6067
|
+
contact: alepha2502.TString;
|
|
6068
|
+
variables: alepha2502.TOptional<alepha2502.TRecord<"^.*$", alepha2502.TAny>>;
|
|
6069
|
+
scheduledAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6070
|
+
sentAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6071
|
+
error: alepha2502.TOptional<alepha2502.TObject<{
|
|
6072
|
+
at: alepha2502.TString;
|
|
6073
|
+
name: alepha2502.TString;
|
|
6074
|
+
message: alepha2502.TString;
|
|
5252
6075
|
}>>;
|
|
5253
6076
|
}>>;
|
|
5254
6077
|
type NotificationEntity = Static<typeof notifications.schema>;
|
|
5255
6078
|
//#endregion
|
|
5256
|
-
//#region ../../../alepha/src/api
|
|
5257
|
-
declare const notificationCreateSchema:
|
|
5258
|
-
type:
|
|
5259
|
-
template:
|
|
5260
|
-
contact:
|
|
5261
|
-
variables:
|
|
6079
|
+
//#region ../../../alepha/src/api/notifications/schemas/notificationCreateSchema.d.ts
|
|
6080
|
+
declare const notificationCreateSchema: alepha2502.TObject<{
|
|
6081
|
+
type: alepha2502.TUnsafe<"email" | "sms">;
|
|
6082
|
+
template: alepha2502.TString;
|
|
6083
|
+
contact: alepha2502.TString;
|
|
6084
|
+
variables: alepha2502.TOptional<alepha2502.TRecord<"^.*$", alepha2502.TAny>>;
|
|
5262
6085
|
}>;
|
|
5263
6086
|
type NotificationCreate = Static<typeof notificationCreateSchema>;
|
|
5264
6087
|
//#endregion
|
|
5265
|
-
//#region ../../../alepha/src/api
|
|
5266
|
-
declare const notificationQuerySchema:
|
|
5267
|
-
page:
|
|
5268
|
-
size:
|
|
5269
|
-
sort:
|
|
5270
|
-
type:
|
|
5271
|
-
template:
|
|
5272
|
-
contact:
|
|
5273
|
-
category:
|
|
5274
|
-
status:
|
|
6088
|
+
//#region ../../../alepha/src/api/notifications/schemas/notificationQuerySchema.d.ts
|
|
6089
|
+
declare const notificationQuerySchema: alepha2502.TObject<{
|
|
6090
|
+
page: alepha2502.TOptional<alepha2502.TInteger>;
|
|
6091
|
+
size: alepha2502.TOptional<alepha2502.TInteger>;
|
|
6092
|
+
sort: alepha2502.TOptional<alepha2502.TString>;
|
|
6093
|
+
type: alepha2502.TOptional<alepha2502.TUnsafe<"email" | "sms">>;
|
|
6094
|
+
template: alepha2502.TOptional<alepha2502.TString>;
|
|
6095
|
+
contact: alepha2502.TOptional<alepha2502.TString>;
|
|
6096
|
+
category: alepha2502.TOptional<alepha2502.TString>;
|
|
6097
|
+
status: alepha2502.TOptional<alepha2502.TUnsafe<"pending" | "sent" | "failed">>;
|
|
5275
6098
|
}>;
|
|
5276
6099
|
type NotificationQuery = Static<typeof notificationQuerySchema>;
|
|
5277
6100
|
//#endregion
|
|
5278
|
-
//#region ../../../alepha/src/api
|
|
6101
|
+
//#region ../../../alepha/src/api/notifications/primitives/$notification.d.ts
|
|
5279
6102
|
interface NotificationPrimitiveOptions<T$1 extends TObject> extends NotificationMessage<T$1> {
|
|
5280
6103
|
name?: string;
|
|
5281
6104
|
description?: string;
|
|
@@ -5402,28 +6225,28 @@ declare module "alepha" {
|
|
|
5402
6225
|
* @module alepha.sms
|
|
5403
6226
|
*/
|
|
5404
6227
|
//#endregion
|
|
5405
|
-
//#region ../../../alepha/src/api
|
|
6228
|
+
//#region ../../../alepha/src/api/notifications/services/NotificationSenderService.d.ts
|
|
5406
6229
|
declare class NotificationSenderService {
|
|
5407
6230
|
protected readonly alepha: Alepha;
|
|
5408
6231
|
protected readonly log: Logger;
|
|
5409
|
-
protected readonly notificationRepository: Repository<
|
|
5410
|
-
id: PgAttr<PgAttr<
|
|
5411
|
-
version: PgAttr<PgAttr<
|
|
5412
|
-
createdAt: PgAttr<PgAttr<
|
|
5413
|
-
updatedAt: PgAttr<PgAttr<
|
|
5414
|
-
type:
|
|
5415
|
-
template:
|
|
5416
|
-
category:
|
|
5417
|
-
critical:
|
|
5418
|
-
sensitive:
|
|
5419
|
-
contact:
|
|
5420
|
-
variables:
|
|
5421
|
-
scheduledAt:
|
|
5422
|
-
sentAt:
|
|
5423
|
-
error:
|
|
5424
|
-
at:
|
|
5425
|
-
name:
|
|
5426
|
-
message:
|
|
6232
|
+
protected readonly notificationRepository: Repository<alepha2502.TObject<{
|
|
6233
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
6234
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
6235
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
6236
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
6237
|
+
type: alepha2502.TUnsafe<"email" | "sms">;
|
|
6238
|
+
template: alepha2502.TString;
|
|
6239
|
+
category: alepha2502.TOptional<alepha2502.TString>;
|
|
6240
|
+
critical: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
6241
|
+
sensitive: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
6242
|
+
contact: alepha2502.TString;
|
|
6243
|
+
variables: alepha2502.TOptional<alepha2502.TRecord<"^.*$", alepha2502.TAny>>;
|
|
6244
|
+
scheduledAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6245
|
+
sentAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6246
|
+
error: alepha2502.TOptional<alepha2502.TObject<{
|
|
6247
|
+
at: alepha2502.TString;
|
|
6248
|
+
name: alepha2502.TString;
|
|
6249
|
+
message: alepha2502.TString;
|
|
5427
6250
|
}>>;
|
|
5428
6251
|
}>>;
|
|
5429
6252
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
@@ -5440,15 +6263,15 @@ declare class NotificationSenderService {
|
|
|
5440
6263
|
body: string;
|
|
5441
6264
|
};
|
|
5442
6265
|
protected load(notification: NotificationEntity): {
|
|
5443
|
-
template: NotificationPrimitive<
|
|
6266
|
+
template: NotificationPrimitive<alepha2502.TObject<alepha2502.TProperties>>;
|
|
5444
6267
|
variables: Record<string, any>;
|
|
5445
6268
|
contact: string;
|
|
5446
6269
|
};
|
|
5447
6270
|
}
|
|
5448
6271
|
//#endregion
|
|
5449
|
-
//#region ../../../alepha/src/api
|
|
5450
|
-
declare const notificationServiceEnvSchema:
|
|
5451
|
-
NOTIFICATION_QUEUE:
|
|
6272
|
+
//#region ../../../alepha/src/api/notifications/services/NotificationService.d.ts
|
|
6273
|
+
declare const notificationServiceEnvSchema: alepha2502.TObject<{
|
|
6274
|
+
NOTIFICATION_QUEUE: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
5452
6275
|
}>;
|
|
5453
6276
|
declare module "alepha" {
|
|
5454
6277
|
interface Env extends Partial<Static<typeof notificationServiceEnvSchema>> {}
|
|
@@ -5459,71 +6282,71 @@ declare class NotificationService {
|
|
|
5459
6282
|
protected readonly env: {
|
|
5460
6283
|
NOTIFICATION_QUEUE?: boolean | undefined;
|
|
5461
6284
|
};
|
|
5462
|
-
protected readonly notificationRepository: Repository<
|
|
5463
|
-
id: PgAttr<PgAttr<
|
|
5464
|
-
version: PgAttr<PgAttr<
|
|
5465
|
-
createdAt: PgAttr<PgAttr<
|
|
5466
|
-
updatedAt: PgAttr<PgAttr<
|
|
5467
|
-
type:
|
|
5468
|
-
template:
|
|
5469
|
-
category:
|
|
5470
|
-
critical:
|
|
5471
|
-
sensitive:
|
|
5472
|
-
contact:
|
|
5473
|
-
variables:
|
|
5474
|
-
scheduledAt:
|
|
5475
|
-
sentAt:
|
|
5476
|
-
error:
|
|
5477
|
-
at:
|
|
5478
|
-
name:
|
|
5479
|
-
message:
|
|
6285
|
+
protected readonly notificationRepository: Repository<alepha2502.TObject<{
|
|
6286
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
6287
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
6288
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
6289
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
6290
|
+
type: alepha2502.TUnsafe<"email" | "sms">;
|
|
6291
|
+
template: alepha2502.TString;
|
|
6292
|
+
category: alepha2502.TOptional<alepha2502.TString>;
|
|
6293
|
+
critical: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
6294
|
+
sensitive: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
6295
|
+
contact: alepha2502.TString;
|
|
6296
|
+
variables: alepha2502.TOptional<alepha2502.TRecord<"^.*$", alepha2502.TAny>>;
|
|
6297
|
+
scheduledAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6298
|
+
sentAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6299
|
+
error: alepha2502.TOptional<alepha2502.TObject<{
|
|
6300
|
+
at: alepha2502.TString;
|
|
6301
|
+
name: alepha2502.TString;
|
|
6302
|
+
message: alepha2502.TString;
|
|
5480
6303
|
}>>;
|
|
5481
6304
|
}>>;
|
|
5482
6305
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
5483
6306
|
protected readonly notificationSenderService: NotificationSenderService;
|
|
5484
|
-
readonly notificationBatch: BatchPrimitive<
|
|
5485
|
-
type:
|
|
5486
|
-
template:
|
|
5487
|
-
contact:
|
|
5488
|
-
variables:
|
|
6307
|
+
readonly notificationBatch: BatchPrimitive<alepha2502.TObject<{
|
|
6308
|
+
type: alepha2502.TUnsafe<"email" | "sms">;
|
|
6309
|
+
template: alepha2502.TString;
|
|
6310
|
+
contact: alepha2502.TString;
|
|
6311
|
+
variables: alepha2502.TOptional<alepha2502.TRecord<"^.*$", alepha2502.TAny>>;
|
|
5489
6312
|
}>, Promise<void>>;
|
|
5490
|
-
findNotificationById(id: string): Promise<PgStatic<
|
|
5491
|
-
id: PgAttr<PgAttr<
|
|
5492
|
-
version: PgAttr<PgAttr<
|
|
5493
|
-
createdAt: PgAttr<PgAttr<
|
|
5494
|
-
updatedAt: PgAttr<PgAttr<
|
|
5495
|
-
type:
|
|
5496
|
-
template:
|
|
5497
|
-
category:
|
|
5498
|
-
critical:
|
|
5499
|
-
sensitive:
|
|
5500
|
-
contact:
|
|
5501
|
-
variables:
|
|
5502
|
-
scheduledAt:
|
|
5503
|
-
sentAt:
|
|
5504
|
-
error:
|
|
5505
|
-
at:
|
|
5506
|
-
name:
|
|
5507
|
-
message:
|
|
6313
|
+
findNotificationById(id: string): Promise<PgStatic<alepha2502.TObject<{
|
|
6314
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
6315
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
6316
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
6317
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
6318
|
+
type: alepha2502.TUnsafe<"email" | "sms">;
|
|
6319
|
+
template: alepha2502.TString;
|
|
6320
|
+
category: alepha2502.TOptional<alepha2502.TString>;
|
|
6321
|
+
critical: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
6322
|
+
sensitive: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
6323
|
+
contact: alepha2502.TString;
|
|
6324
|
+
variables: alepha2502.TOptional<alepha2502.TRecord<"^.*$", alepha2502.TAny>>;
|
|
6325
|
+
scheduledAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6326
|
+
sentAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6327
|
+
error: alepha2502.TOptional<alepha2502.TObject<{
|
|
6328
|
+
at: alepha2502.TString;
|
|
6329
|
+
name: alepha2502.TString;
|
|
6330
|
+
message: alepha2502.TString;
|
|
5508
6331
|
}>>;
|
|
5509
|
-
}>, PgRelationMap<
|
|
5510
|
-
id: PgAttr<PgAttr<
|
|
5511
|
-
version: PgAttr<PgAttr<
|
|
5512
|
-
createdAt: PgAttr<PgAttr<
|
|
5513
|
-
updatedAt: PgAttr<PgAttr<
|
|
5514
|
-
type:
|
|
5515
|
-
template:
|
|
5516
|
-
category:
|
|
5517
|
-
critical:
|
|
5518
|
-
sensitive:
|
|
5519
|
-
contact:
|
|
5520
|
-
variables:
|
|
5521
|
-
scheduledAt:
|
|
5522
|
-
sentAt:
|
|
5523
|
-
error:
|
|
5524
|
-
at:
|
|
5525
|
-
name:
|
|
5526
|
-
message:
|
|
6332
|
+
}>, PgRelationMap<alepha2502.TObject<{
|
|
6333
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
6334
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
6335
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
6336
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
6337
|
+
type: alepha2502.TUnsafe<"email" | "sms">;
|
|
6338
|
+
template: alepha2502.TString;
|
|
6339
|
+
category: alepha2502.TOptional<alepha2502.TString>;
|
|
6340
|
+
critical: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
6341
|
+
sensitive: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
6342
|
+
contact: alepha2502.TString;
|
|
6343
|
+
variables: alepha2502.TOptional<alepha2502.TRecord<"^.*$", alepha2502.TAny>>;
|
|
6344
|
+
scheduledAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6345
|
+
sentAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6346
|
+
error: alepha2502.TOptional<alepha2502.TObject<{
|
|
6347
|
+
at: alepha2502.TString;
|
|
6348
|
+
name: alepha2502.TString;
|
|
6349
|
+
message: alepha2502.TString;
|
|
5527
6350
|
}>>;
|
|
5528
6351
|
}>>>>;
|
|
5529
6352
|
findNotifications(q?: NotificationQuery): Promise<Page$1<NotificationEntity>>;
|
|
@@ -5533,7 +6356,7 @@ declare class NotificationService {
|
|
|
5533
6356
|
createNotification(entry: NotificationCreate): Promise<void>;
|
|
5534
6357
|
}
|
|
5535
6358
|
//#endregion
|
|
5536
|
-
//#region ../../../alepha/src/api
|
|
6359
|
+
//#region ../../../alepha/src/api/notifications/controllers/NotificationController.d.ts
|
|
5537
6360
|
declare class NotificationController {
|
|
5538
6361
|
protected readonly url = "/notifications";
|
|
5539
6362
|
protected readonly group = "notifications";
|
|
@@ -5542,144 +6365,860 @@ declare class NotificationController {
|
|
|
5542
6365
|
* Find notifications with pagination and filtering.
|
|
5543
6366
|
*/
|
|
5544
6367
|
readonly findNotifications: ActionPrimitiveFn<{
|
|
5545
|
-
query:
|
|
5546
|
-
page:
|
|
5547
|
-
size:
|
|
5548
|
-
sort:
|
|
5549
|
-
type:
|
|
5550
|
-
template:
|
|
5551
|
-
contact:
|
|
5552
|
-
category:
|
|
5553
|
-
status:
|
|
6368
|
+
query: alepha2502.TObject<{
|
|
6369
|
+
page: alepha2502.TOptional<alepha2502.TInteger>;
|
|
6370
|
+
size: alepha2502.TOptional<alepha2502.TInteger>;
|
|
6371
|
+
sort: alepha2502.TOptional<alepha2502.TString>;
|
|
6372
|
+
type: alepha2502.TOptional<alepha2502.TUnsafe<"email" | "sms">>;
|
|
6373
|
+
template: alepha2502.TOptional<alepha2502.TString>;
|
|
6374
|
+
contact: alepha2502.TOptional<alepha2502.TString>;
|
|
6375
|
+
category: alepha2502.TOptional<alepha2502.TString>;
|
|
6376
|
+
status: alepha2502.TOptional<alepha2502.TUnsafe<"pending" | "sent" | "failed">>;
|
|
5554
6377
|
}>;
|
|
5555
|
-
response:
|
|
5556
|
-
id: PgAttr<PgAttr<
|
|
5557
|
-
version: PgAttr<PgAttr<
|
|
5558
|
-
createdAt: PgAttr<PgAttr<
|
|
5559
|
-
updatedAt: PgAttr<PgAttr<
|
|
5560
|
-
type:
|
|
5561
|
-
template:
|
|
5562
|
-
category:
|
|
5563
|
-
critical:
|
|
5564
|
-
sensitive:
|
|
5565
|
-
contact:
|
|
5566
|
-
variables:
|
|
5567
|
-
scheduledAt:
|
|
5568
|
-
sentAt:
|
|
5569
|
-
error:
|
|
5570
|
-
at:
|
|
5571
|
-
name:
|
|
5572
|
-
message:
|
|
6378
|
+
response: alepha2502.TPage<alepha2502.TObject<{
|
|
6379
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
6380
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
6381
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
6382
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
6383
|
+
type: alepha2502.TUnsafe<"email" | "sms">;
|
|
6384
|
+
template: alepha2502.TString;
|
|
6385
|
+
category: alepha2502.TOptional<alepha2502.TString>;
|
|
6386
|
+
critical: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
6387
|
+
sensitive: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
6388
|
+
contact: alepha2502.TString;
|
|
6389
|
+
variables: alepha2502.TOptional<alepha2502.TRecord<"^.*$", alepha2502.TAny>>;
|
|
6390
|
+
scheduledAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6391
|
+
sentAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6392
|
+
error: alepha2502.TOptional<alepha2502.TObject<{
|
|
6393
|
+
at: alepha2502.TString;
|
|
6394
|
+
name: alepha2502.TString;
|
|
6395
|
+
message: alepha2502.TString;
|
|
5573
6396
|
}>>;
|
|
5574
6397
|
}>>;
|
|
5575
6398
|
}>;
|
|
5576
6399
|
}
|
|
5577
6400
|
//#endregion
|
|
5578
|
-
//#region ../../../alepha/src/queue/providers/WorkerProvider.d.ts
|
|
5579
|
-
declare const envSchema:
|
|
6401
|
+
//#region ../../../alepha/src/queue/core/providers/WorkerProvider.d.ts
|
|
6402
|
+
declare const envSchema: alepha2502.TObject<{
|
|
5580
6403
|
/**
|
|
5581
|
-
* The
|
|
5582
|
-
* Workers will check for shutdown after each timeout period.
|
|
6404
|
+
* The interval in milliseconds to wait before checking for new messages.
|
|
5583
6405
|
*/
|
|
5584
|
-
|
|
6406
|
+
QUEUE_WORKER_INTERVAL: alepha2502.TInteger;
|
|
6407
|
+
/**
|
|
6408
|
+
* The maximum interval in milliseconds to wait before checking for new messages.
|
|
6409
|
+
*/
|
|
6410
|
+
QUEUE_WORKER_MAX_INTERVAL: alepha2502.TInteger;
|
|
5585
6411
|
/**
|
|
5586
6412
|
* The number of workers to run concurrently. Defaults to 1.
|
|
5587
6413
|
* Useful only if you are doing a lot of I/O.
|
|
5588
6414
|
*/
|
|
5589
|
-
QUEUE_WORKER_CONCURRENCY:
|
|
6415
|
+
QUEUE_WORKER_CONCURRENCY: alepha2502.TInteger;
|
|
6416
|
+
}>;
|
|
6417
|
+
declare module "alepha" {
|
|
6418
|
+
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
6419
|
+
}
|
|
6420
|
+
//#endregion
|
|
6421
|
+
//#region ../../../alepha/src/api/parameters/entities/parameters.d.ts
|
|
6422
|
+
/**
|
|
6423
|
+
* Parameter status values.
|
|
6424
|
+
*
|
|
6425
|
+
* - EXPIRED: Past version, no longer active
|
|
6426
|
+
* - CURRENT: Currently active version
|
|
6427
|
+
* - NEXT: Scheduled to become active (closest future date)
|
|
6428
|
+
* - FUTURE: Scheduled for activation after NEXT
|
|
6429
|
+
*/
|
|
6430
|
+
type ParameterStatus = "expired" | "current" | "next" | "future";
|
|
6431
|
+
/**
|
|
6432
|
+
* Configuration parameter entity for versioned configuration management.
|
|
6433
|
+
*
|
|
6434
|
+
* Stores all versions of configuration parameters with:
|
|
6435
|
+
* - Automatic status management (expired, current, next, future)
|
|
6436
|
+
* - Schema versioning for migrations
|
|
6437
|
+
* - Activation scheduling
|
|
6438
|
+
* - Audit trail (creator info)
|
|
6439
|
+
*/
|
|
6440
|
+
declare const parameters: EntityPrimitive<alepha2502.TObject<{
|
|
6441
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
6442
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
6443
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
6444
|
+
/**
|
|
6445
|
+
* Configuration name using dot notation for tree hierarchy.
|
|
6446
|
+
* Examples: "app.features", "app.pricing.tiers", "system.limits"
|
|
6447
|
+
*/
|
|
6448
|
+
name: alepha2502.TString;
|
|
5590
6449
|
/**
|
|
5591
|
-
*
|
|
5592
|
-
* Should be less than the job's lock duration.
|
|
6450
|
+
* The configuration content as JSON.
|
|
5593
6451
|
*/
|
|
5594
|
-
|
|
6452
|
+
content: alepha2502.TRecord<string, alepha2502.TAny>;
|
|
5595
6453
|
/**
|
|
5596
|
-
*
|
|
6454
|
+
* Schema version hash for detecting schema changes.
|
|
6455
|
+
* Used for auto-migration when schema evolves.
|
|
5597
6456
|
*/
|
|
5598
|
-
|
|
6457
|
+
schemaHash: alepha2502.TString;
|
|
5599
6458
|
/**
|
|
5600
|
-
*
|
|
6459
|
+
* Current status of this parameter version.
|
|
5601
6460
|
*/
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
6461
|
+
status: PgAttr<alepha2502.TUnsafe<"expired" | "current" | "next" | "future">, typeof PG_DEFAULT>;
|
|
6462
|
+
/**
|
|
6463
|
+
* When this version should become active.
|
|
6464
|
+
* Default is immediate (now).
|
|
6465
|
+
*/
|
|
6466
|
+
activationDate: alepha2502.TString;
|
|
6467
|
+
/**
|
|
6468
|
+
* When this version was deactivated (became expired).
|
|
6469
|
+
* Null if still active or scheduled.
|
|
6470
|
+
*/
|
|
6471
|
+
expiredAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6472
|
+
/**
|
|
6473
|
+
* Version number for this configuration.
|
|
6474
|
+
* Auto-incremented per config name.
|
|
6475
|
+
*/
|
|
6476
|
+
version: alepha2502.TInteger;
|
|
6477
|
+
/**
|
|
6478
|
+
* Optional description of changes in this version.
|
|
6479
|
+
*/
|
|
6480
|
+
changeDescription: alepha2502.TOptional<alepha2502.TString>;
|
|
6481
|
+
/**
|
|
6482
|
+
* Optional tags for filtering/categorization.
|
|
6483
|
+
*/
|
|
6484
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
6485
|
+
/**
|
|
6486
|
+
* Creator user ID (if available).
|
|
6487
|
+
*/
|
|
6488
|
+
creatorId: alepha2502.TOptional<alepha2502.TString>;
|
|
6489
|
+
/**
|
|
6490
|
+
* Creator display name for audit trail.
|
|
6491
|
+
*/
|
|
6492
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
6493
|
+
/**
|
|
6494
|
+
* Previous content before this change (for rollback reference).
|
|
6495
|
+
*/
|
|
6496
|
+
previousContent: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
6497
|
+
/**
|
|
6498
|
+
* Migration log if schema changed.
|
|
6499
|
+
*/
|
|
6500
|
+
migrationLog: alepha2502.TOptional<alepha2502.TString>;
|
|
6501
|
+
}>>;
|
|
6502
|
+
type Parameter = Static<typeof parameters.schema>;
|
|
6503
|
+
//#endregion
|
|
6504
|
+
//#region ../../../alepha/src/api/parameters/primitives/$config.d.ts
|
|
6505
|
+
/**
|
|
6506
|
+
* Creates a versioned configuration primitive for managing application settings.
|
|
6507
|
+
*
|
|
6508
|
+
* Provides type-safe, versioned configuration with:
|
|
6509
|
+
* - Schema validation with auto-migration detection
|
|
6510
|
+
* - Default values for initial state
|
|
6511
|
+
* - Scheduled activation (FUTURE, NEXT, CURRENT, EXPIRED statuses)
|
|
6512
|
+
* - PostgreSQL persistence with full version history
|
|
6513
|
+
* - Cross-instance synchronization via topic
|
|
6514
|
+
* - Tree view support via dot-notation naming (e.g., "app.features.flags")
|
|
6515
|
+
*
|
|
6516
|
+
* Integrates with Alepha's atom system for state management:
|
|
6517
|
+
* - Uses `alepha.set(atom, value)` for mutations
|
|
6518
|
+
* - Listens to `state:mutate` events to detect changes
|
|
6519
|
+
* - Auto-persists changes to database
|
|
6520
|
+
* - Syncs across instances via topic
|
|
6521
|
+
*
|
|
6522
|
+
* @example
|
|
6523
|
+
* ```ts
|
|
6524
|
+
* class AppConfig {
|
|
6525
|
+
* features = $config({
|
|
6526
|
+
* name: "app.features.flags",
|
|
6527
|
+
* schema: t.object({
|
|
6528
|
+
* enableBeta: t.boolean(),
|
|
6529
|
+
* maxUploadSize: t.number()
|
|
6530
|
+
* }),
|
|
6531
|
+
* default: { enableBeta: false, maxUploadSize: 10485760 }
|
|
6532
|
+
* });
|
|
6533
|
+
*
|
|
6534
|
+
* async enableBeta() {
|
|
6535
|
+
* // Immediate activation
|
|
6536
|
+
* await this.features.set({ enableBeta: true, maxUploadSize: 20971520 });
|
|
6537
|
+
* }
|
|
6538
|
+
*
|
|
6539
|
+
* async scheduleBetaRelease() {
|
|
6540
|
+
* // Schedule for future activation
|
|
6541
|
+
* await this.features.set(
|
|
6542
|
+
* { enableBeta: true, maxUploadSize: 20971520 },
|
|
6543
|
+
* { activationDate: new Date('2024-03-01') }
|
|
6544
|
+
* );
|
|
6545
|
+
* }
|
|
6546
|
+
* }
|
|
6547
|
+
* ```
|
|
6548
|
+
*/
|
|
6549
|
+
interface ConfigPrimitiveOptions<T$1 extends TObject> {
|
|
6550
|
+
/**
|
|
6551
|
+
* Configuration name using dot notation for tree hierarchy.
|
|
6552
|
+
* Examples: "app.features", "app.pricing.tiers", "system.limits"
|
|
6553
|
+
*/
|
|
6554
|
+
name?: string;
|
|
6555
|
+
/**
|
|
6556
|
+
* Human-readable description of the configuration.
|
|
6557
|
+
*/
|
|
6558
|
+
description?: string;
|
|
6559
|
+
/**
|
|
6560
|
+
* TypeBox schema defining the configuration structure.
|
|
6561
|
+
*/
|
|
6562
|
+
schema: T$1;
|
|
6563
|
+
/**
|
|
6564
|
+
* Default value used when no configuration exists in database.
|
|
6565
|
+
*/
|
|
6566
|
+
default: Static<T$1>;
|
|
6567
|
+
}
|
|
6568
|
+
declare class ConfigPrimitive<T$1 extends TObject> extends Primitive<ConfigPrimitiveOptions<T$1>> {
|
|
6569
|
+
protected readonly log: Logger;
|
|
6570
|
+
protected readonly store: ConfigStore;
|
|
6571
|
+
/** Internal atom key for state management */
|
|
6572
|
+
protected atomKey: string;
|
|
6573
|
+
/** Schema hash for migration detection */
|
|
6574
|
+
protected schemaHash: string;
|
|
6575
|
+
/** Whether we're currently syncing (to avoid loops) */
|
|
6576
|
+
protected syncing: boolean;
|
|
6577
|
+
/** Whether initial load has completed */
|
|
6578
|
+
protected loaded: boolean;
|
|
6579
|
+
/**
|
|
6580
|
+
* Configuration name (uses property key if not specified).
|
|
6581
|
+
*/
|
|
6582
|
+
get name(): string;
|
|
6583
|
+
/**
|
|
6584
|
+
* The TypeBox schema for this configuration.
|
|
6585
|
+
*/
|
|
6586
|
+
get schema(): T$1;
|
|
6587
|
+
/**
|
|
6588
|
+
* Get the current configuration value.
|
|
6589
|
+
*/
|
|
6590
|
+
get current(): Static<T$1>;
|
|
6591
|
+
/**
|
|
6592
|
+
* Get a specific field from the current configuration.
|
|
6593
|
+
*/
|
|
6594
|
+
get<Key$1 extends keyof Static<T$1>>(key: Key$1): Static<T$1>[Key$1];
|
|
6595
|
+
/**
|
|
6596
|
+
* Set a new configuration value.
|
|
6597
|
+
*
|
|
6598
|
+
* @param value - The new configuration value
|
|
6599
|
+
* @param options - Optional settings (activation date, creator info, etc.)
|
|
6600
|
+
*/
|
|
6601
|
+
set(value: Static<T$1>, options?: SetConfigOptions): Promise<void>;
|
|
6602
|
+
/**
|
|
6603
|
+
* Subscribe to configuration changes.
|
|
6604
|
+
*/
|
|
6605
|
+
sub(fn: (curr: Static<T$1>) => void): () => void;
|
|
6606
|
+
/**
|
|
6607
|
+
* Reload configuration from database.
|
|
6608
|
+
* Called when scheduled config activates or sync message received.
|
|
6609
|
+
*/
|
|
6610
|
+
reload(): Promise<void>;
|
|
6611
|
+
/**
|
|
6612
|
+
* Update from sync message (called by ConfigStore).
|
|
6613
|
+
* Uses skipEvents to avoid infinite loops.
|
|
6614
|
+
*/
|
|
6615
|
+
updateFromSync(content: unknown): Promise<void>;
|
|
6616
|
+
/**
|
|
6617
|
+
* Get version history for this configuration.
|
|
6618
|
+
*/
|
|
6619
|
+
getHistory(): Promise<{
|
|
6620
|
+
tags?: string[] | undefined;
|
|
6621
|
+
creatorName?: string | undefined;
|
|
6622
|
+
expiredAt?: string | undefined;
|
|
6623
|
+
changeDescription?: string | undefined;
|
|
6624
|
+
creatorId?: string | undefined;
|
|
6625
|
+
previousContent?: Record<string, any> | undefined;
|
|
6626
|
+
migrationLog?: string | undefined;
|
|
6627
|
+
name: string;
|
|
6628
|
+
id: string;
|
|
6629
|
+
version: number;
|
|
6630
|
+
createdAt: string;
|
|
6631
|
+
updatedAt: string;
|
|
6632
|
+
content: Record<string, any>;
|
|
6633
|
+
status: "expired" | "current" | "next" | "future";
|
|
6634
|
+
schemaHash: string;
|
|
6635
|
+
activationDate: string;
|
|
6636
|
+
}[]>;
|
|
6637
|
+
/**
|
|
6638
|
+
* Rollback to a specific version.
|
|
6639
|
+
*/
|
|
6640
|
+
rollback(version: number, options?: SetConfigOptions): Promise<void>;
|
|
6641
|
+
/**
|
|
6642
|
+
* Hook to load initial value from database on start.
|
|
6643
|
+
*/
|
|
6644
|
+
protected readonly onStart: alepha2502.HookPrimitive<"start">;
|
|
6645
|
+
/**
|
|
6646
|
+
* Called after primitive creation to initialize.
|
|
6647
|
+
*/
|
|
6648
|
+
protected onInit(): void;
|
|
6649
|
+
/**
|
|
6650
|
+
* Load initial value from database.
|
|
6651
|
+
*/
|
|
6652
|
+
protected loadInitial(): Promise<void>;
|
|
6653
|
+
/**
|
|
6654
|
+
* Calculate a hash of the schema for migration detection.
|
|
6655
|
+
*/
|
|
6656
|
+
protected calculateSchemaHash(): string;
|
|
6657
|
+
}
|
|
6658
|
+
interface SetConfigOptions {
|
|
6659
|
+
/**
|
|
6660
|
+
* User making the change (for audit trail).
|
|
6661
|
+
*/
|
|
6662
|
+
user?: Pick<UserAccount, "id" | "email" | "name">;
|
|
6663
|
+
/**
|
|
6664
|
+
* When this configuration should become active.
|
|
6665
|
+
* Default is immediate (now).
|
|
6666
|
+
*/
|
|
6667
|
+
activationDate?: Date;
|
|
6668
|
+
/**
|
|
6669
|
+
* Description of the change.
|
|
6670
|
+
*/
|
|
6671
|
+
changeDescription?: string;
|
|
6672
|
+
/**
|
|
6673
|
+
* Tags for filtering/categorization.
|
|
6674
|
+
*/
|
|
6675
|
+
tags?: string[];
|
|
5606
6676
|
}
|
|
5607
6677
|
//#endregion
|
|
5608
|
-
//#region ../../../alepha/src/api
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
6678
|
+
//#region ../../../alepha/src/api/parameters/services/ConfigStore.d.ts
|
|
6679
|
+
/**
|
|
6680
|
+
* Payload for config sync events across instances.
|
|
6681
|
+
*/
|
|
6682
|
+
interface ConfigSyncPayload {
|
|
6683
|
+
name: string;
|
|
6684
|
+
version: number;
|
|
6685
|
+
content: unknown;
|
|
6686
|
+
status: ParameterStatus;
|
|
6687
|
+
instanceId: string;
|
|
6688
|
+
}
|
|
6689
|
+
/**
|
|
6690
|
+
* ConfigStore manages versioned configuration persistence and synchronization.
|
|
6691
|
+
*
|
|
6692
|
+
* Features:
|
|
6693
|
+
* - Stores all config versions in PostgreSQL
|
|
6694
|
+
* - Manages status transitions (future → next → current → expired)
|
|
6695
|
+
* - Provides cross-instance sync via topic
|
|
6696
|
+
* - Supports schema migrations via hash comparison
|
|
6697
|
+
* - Auto-activates scheduled configs
|
|
6698
|
+
*/
|
|
6699
|
+
declare class ConfigStore {
|
|
6700
|
+
protected readonly log: Logger;
|
|
6701
|
+
protected readonly dateTimeProvider: DateTimeProvider;
|
|
6702
|
+
protected readonly repo: Repository<TObject<{
|
|
6703
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
6704
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
6705
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
6706
|
+
name: alepha2502.TString;
|
|
6707
|
+
content: alepha2502.TRecord<string, alepha2502.TAny>;
|
|
6708
|
+
schemaHash: alepha2502.TString;
|
|
6709
|
+
status: PgAttr<alepha2502.TUnsafe<"expired" | "current" | "next" | "future">, typeof PG_DEFAULT>;
|
|
6710
|
+
activationDate: alepha2502.TString;
|
|
6711
|
+
expiredAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6712
|
+
version: alepha2502.TInteger;
|
|
6713
|
+
changeDescription: alepha2502.TOptional<alepha2502.TString>;
|
|
6714
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
6715
|
+
creatorId: alepha2502.TOptional<alepha2502.TString>;
|
|
6716
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
6717
|
+
previousContent: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
6718
|
+
migrationLog: alepha2502.TOptional<alepha2502.TString>;
|
|
6719
|
+
}>>;
|
|
6720
|
+
/** Unique identifier for this instance (to avoid self-updates) */
|
|
6721
|
+
protected readonly instanceId: `${string}-${string}-${string}-${string}-${string}`;
|
|
6722
|
+
/** In-memory cache of registered configs */
|
|
6723
|
+
protected readonly configs: Map<string, ConfigPrimitive<any>>;
|
|
6724
|
+
/** Topic for cross-instance synchronization */
|
|
6725
|
+
readonly syncTopic: TopicPrimitive<{
|
|
6726
|
+
payload: TObject<{
|
|
6727
|
+
name: alepha2502.TString;
|
|
6728
|
+
version: alepha2502.TInteger;
|
|
6729
|
+
content: alepha2502.TRecord<string, alepha2502.TAny>;
|
|
6730
|
+
status: alepha2502.TUnsafe<"expired" | "current" | "next" | "future">;
|
|
6731
|
+
instanceId: alepha2502.TString;
|
|
6732
|
+
}>;
|
|
6733
|
+
}>;
|
|
6734
|
+
/**
|
|
6735
|
+
* Register a config primitive with the store.
|
|
6736
|
+
*/
|
|
6737
|
+
register(config: ConfigPrimitive<any>): void;
|
|
6738
|
+
/**
|
|
6739
|
+
* Load the current config value from database.
|
|
6740
|
+
* Returns the current or next version if no current exists.
|
|
6741
|
+
*/
|
|
6742
|
+
load<T$1 extends TObject>(name: string): Promise<Static<T$1> | null>;
|
|
6743
|
+
/**
|
|
6744
|
+
* Save a new config version.
|
|
6745
|
+
*
|
|
6746
|
+
* @param name - Config name (e.g., "app.features.flags")
|
|
6747
|
+
* @param content - New config content
|
|
6748
|
+
* @param schemaHash - Hash of the schema for migration detection
|
|
6749
|
+
* @param options - Additional options (activation date, creator info, etc.)
|
|
6750
|
+
*/
|
|
6751
|
+
save<T$1 extends TObject>(name: string, content: Static<T$1>, schemaHash: string, options?: SaveConfigOptions): Promise<Parameter>;
|
|
6752
|
+
/**
|
|
6753
|
+
* Get all versions of a config.
|
|
6754
|
+
*/
|
|
6755
|
+
getHistory(name: string): Promise<Parameter[]>;
|
|
6756
|
+
/**
|
|
6757
|
+
* Get a specific version of a config.
|
|
6758
|
+
*/
|
|
6759
|
+
getVersion(name: string, version: number): Promise<Parameter | null>;
|
|
6760
|
+
/**
|
|
6761
|
+
* Rollback to a previous version by creating a new version with old content.
|
|
6762
|
+
*/
|
|
6763
|
+
rollback(name: string, targetVersion: number, options?: SaveConfigOptions): Promise<Parameter>;
|
|
6764
|
+
/**
|
|
6765
|
+
* Get all configs by status.
|
|
6766
|
+
*/
|
|
6767
|
+
getByStatus(status: ParameterStatus): Promise<Parameter[]>;
|
|
6768
|
+
/**
|
|
6769
|
+
* Get current config value with fallback to default from registered primitive.
|
|
6770
|
+
* Returns the in-memory current value which may be the default if never saved.
|
|
6771
|
+
*/
|
|
6772
|
+
getCurrentValue(name: string): {
|
|
6773
|
+
content: unknown;
|
|
6774
|
+
isDefault: boolean;
|
|
6775
|
+
} | null;
|
|
6776
|
+
/**
|
|
6777
|
+
* Get config info including current value with default fallback.
|
|
6778
|
+
*/
|
|
6779
|
+
getCurrentWithDefault(name: string): Promise<{
|
|
6780
|
+
current: Parameter | null;
|
|
6781
|
+
next: Parameter | null;
|
|
6782
|
+
defaultValue: unknown | null;
|
|
6783
|
+
currentValue: unknown | null;
|
|
6784
|
+
schema: TObject | null;
|
|
6785
|
+
}>;
|
|
6786
|
+
/**
|
|
6787
|
+
* Get all unique config names (for tree view).
|
|
6788
|
+
*/
|
|
6789
|
+
getConfigNames(): Promise<string[]>;
|
|
6790
|
+
/**
|
|
6791
|
+
* Build a tree structure from config names for UI.
|
|
6792
|
+
* Includes both database configs and registered (but not yet saved) configs.
|
|
6793
|
+
*/
|
|
6794
|
+
getConfigTree(): Promise<ConfigTreeNode[]>;
|
|
6795
|
+
/**
|
|
6796
|
+
* Check and activate scheduled configs that are due.
|
|
6797
|
+
* Should be called periodically (e.g., via scheduler).
|
|
6798
|
+
*/
|
|
6799
|
+
activateScheduledConfigs(): Promise<void>;
|
|
6800
|
+
/**
|
|
6801
|
+
* Transition config statuses when a new current is activated.
|
|
6802
|
+
*/
|
|
6803
|
+
protected transitionStatuses(name: string, now: Date): Promise<void>;
|
|
6804
|
+
/**
|
|
6805
|
+
* Recalculate statuses based on activation dates.
|
|
6806
|
+
*/
|
|
6807
|
+
protected recalculateStatuses(name: string): Promise<void>;
|
|
6808
|
+
/**
|
|
6809
|
+
* Publish sync event to other instances.
|
|
6810
|
+
*/
|
|
6811
|
+
protected publishSync(name: string, version: number, content: unknown, status: ParameterStatus): Promise<void>;
|
|
6812
|
+
/**
|
|
6813
|
+
* Handle incoming sync message from other instances.
|
|
6814
|
+
*/
|
|
6815
|
+
protected handleSyncMessage(payload: ConfigSyncPayload): Promise<void>;
|
|
6816
|
+
/**
|
|
6817
|
+
* Build tree structure from dot-notation names.
|
|
6818
|
+
*/
|
|
6819
|
+
protected buildTree(names: string[]): ConfigTreeNode[];
|
|
6820
|
+
}
|
|
6821
|
+
interface SaveConfigOptions {
|
|
6822
|
+
activationDate?: Date;
|
|
6823
|
+
changeDescription?: string;
|
|
6824
|
+
tags?: string[];
|
|
6825
|
+
creatorId?: string;
|
|
6826
|
+
creatorName?: string;
|
|
6827
|
+
}
|
|
6828
|
+
interface ConfigTreeNode {
|
|
6829
|
+
name: string;
|
|
6830
|
+
path: string;
|
|
6831
|
+
isLeaf: boolean;
|
|
6832
|
+
children: ConfigTreeNode[];
|
|
6833
|
+
}
|
|
6834
|
+
//#endregion
|
|
6835
|
+
//#region ../../../alepha/src/api/parameters/controllers/ConfigController.d.ts
|
|
6836
|
+
/**
|
|
6837
|
+
* REST API controller for versioned configuration management.
|
|
6838
|
+
*
|
|
6839
|
+
* Provides endpoints for:
|
|
6840
|
+
* - Listing all configurations (tree view support)
|
|
6841
|
+
* - Getting configuration history (all versions)
|
|
6842
|
+
* - Getting current/next configuration values
|
|
6843
|
+
* - Creating new configuration versions (immediate or scheduled)
|
|
6844
|
+
* - Rolling back to previous versions
|
|
6845
|
+
* - Activating scheduled versions immediately
|
|
6846
|
+
*/
|
|
6847
|
+
declare class ConfigController {
|
|
6848
|
+
protected readonly store: ConfigStore;
|
|
6849
|
+
/**
|
|
6850
|
+
* Get tree structure of all configuration names.
|
|
6851
|
+
* Useful for admin UI navigation.
|
|
6852
|
+
*/
|
|
6853
|
+
getConfigTree: ActionPrimitiveFn<{
|
|
6854
|
+
response: alepha2502.TArray<any>;
|
|
6855
|
+
}>;
|
|
6856
|
+
/**
|
|
6857
|
+
* List all unique configuration names.
|
|
6858
|
+
*/
|
|
6859
|
+
listConfigNames: ActionPrimitiveFn<{
|
|
6860
|
+
response: alepha2502.TObject<{
|
|
6861
|
+
names: alepha2502.TArray<alepha2502.TString>;
|
|
6862
|
+
}>;
|
|
6863
|
+
}>;
|
|
6864
|
+
/**
|
|
6865
|
+
* Get configurations by status.
|
|
6866
|
+
*/
|
|
6867
|
+
getByStatus: ActionPrimitiveFn<{
|
|
6868
|
+
params: alepha2502.TObject<{
|
|
6869
|
+
status: alepha2502.TUnsafe<"expired" | "current" | "next" | "future">;
|
|
6870
|
+
}>;
|
|
6871
|
+
response: alepha2502.TObject<{
|
|
6872
|
+
configs: alepha2502.TArray<alepha2502.TObject<{
|
|
6873
|
+
id: alepha2502.TString;
|
|
6874
|
+
createdAt: alepha2502.TString;
|
|
6875
|
+
updatedAt: alepha2502.TString;
|
|
6876
|
+
name: alepha2502.TString;
|
|
6877
|
+
content: alepha2502.TRecord<string, alepha2502.TAny>;
|
|
6878
|
+
schemaHash: alepha2502.TString;
|
|
6879
|
+
status: alepha2502.TUnsafe<"expired" | "current" | "next" | "future">;
|
|
6880
|
+
activationDate: alepha2502.TString;
|
|
6881
|
+
expiredAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6882
|
+
version: alepha2502.TInteger;
|
|
6883
|
+
changeDescription: alepha2502.TOptional<alepha2502.TString>;
|
|
6884
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
6885
|
+
creatorId: alepha2502.TOptional<alepha2502.TString>;
|
|
6886
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
6887
|
+
previousContent: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
6888
|
+
migrationLog: alepha2502.TOptional<alepha2502.TString>;
|
|
6889
|
+
}>>;
|
|
6890
|
+
}>;
|
|
6891
|
+
}>;
|
|
6892
|
+
/**
|
|
6893
|
+
* Get version history for a specific configuration.
|
|
6894
|
+
*/
|
|
6895
|
+
getHistory: ActionPrimitiveFn<{
|
|
6896
|
+
params: alepha2502.TObject<{
|
|
6897
|
+
name: alepha2502.TString;
|
|
6898
|
+
}>;
|
|
6899
|
+
response: alepha2502.TObject<{
|
|
6900
|
+
versions: alepha2502.TArray<alepha2502.TObject<{
|
|
6901
|
+
id: alepha2502.TString;
|
|
6902
|
+
createdAt: alepha2502.TString;
|
|
6903
|
+
updatedAt: alepha2502.TString;
|
|
6904
|
+
name: alepha2502.TString;
|
|
6905
|
+
content: alepha2502.TRecord<string, alepha2502.TAny>;
|
|
6906
|
+
schemaHash: alepha2502.TString;
|
|
6907
|
+
status: alepha2502.TUnsafe<"expired" | "current" | "next" | "future">;
|
|
6908
|
+
activationDate: alepha2502.TString;
|
|
6909
|
+
expiredAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6910
|
+
version: alepha2502.TInteger;
|
|
6911
|
+
changeDescription: alepha2502.TOptional<alepha2502.TString>;
|
|
6912
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
6913
|
+
creatorId: alepha2502.TOptional<alepha2502.TString>;
|
|
6914
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
6915
|
+
previousContent: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
6916
|
+
migrationLog: alepha2502.TOptional<alepha2502.TString>;
|
|
6917
|
+
}>>;
|
|
6918
|
+
}>;
|
|
6919
|
+
}>;
|
|
6920
|
+
/**
|
|
6921
|
+
* Get current and next values for a configuration.
|
|
6922
|
+
* Includes defaultValue and currentValue from the registered primitive
|
|
6923
|
+
* even if no versions exist in the database yet.
|
|
6924
|
+
*/
|
|
6925
|
+
getCurrent: ActionPrimitiveFn<{
|
|
6926
|
+
params: alepha2502.TObject<{
|
|
6927
|
+
name: alepha2502.TString;
|
|
6928
|
+
}>;
|
|
6929
|
+
response: alepha2502.TObject<{
|
|
6930
|
+
current: alepha2502.TOptional<alepha2502.TObject<{
|
|
6931
|
+
id: alepha2502.TString;
|
|
6932
|
+
createdAt: alepha2502.TString;
|
|
6933
|
+
updatedAt: alepha2502.TString;
|
|
6934
|
+
name: alepha2502.TString;
|
|
6935
|
+
content: alepha2502.TRecord<string, alepha2502.TAny>;
|
|
6936
|
+
schemaHash: alepha2502.TString;
|
|
6937
|
+
status: alepha2502.TUnsafe<"expired" | "current" | "next" | "future">;
|
|
6938
|
+
activationDate: alepha2502.TString;
|
|
6939
|
+
expiredAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6940
|
+
version: alepha2502.TInteger;
|
|
6941
|
+
changeDescription: alepha2502.TOptional<alepha2502.TString>;
|
|
6942
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
6943
|
+
creatorId: alepha2502.TOptional<alepha2502.TString>;
|
|
6944
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
6945
|
+
previousContent: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
6946
|
+
migrationLog: alepha2502.TOptional<alepha2502.TString>;
|
|
6947
|
+
}>>;
|
|
6948
|
+
next: alepha2502.TOptional<alepha2502.TObject<{
|
|
6949
|
+
id: alepha2502.TString;
|
|
6950
|
+
createdAt: alepha2502.TString;
|
|
6951
|
+
updatedAt: alepha2502.TString;
|
|
6952
|
+
name: alepha2502.TString;
|
|
6953
|
+
content: alepha2502.TRecord<string, alepha2502.TAny>;
|
|
6954
|
+
schemaHash: alepha2502.TString;
|
|
6955
|
+
status: alepha2502.TUnsafe<"expired" | "current" | "next" | "future">;
|
|
6956
|
+
activationDate: alepha2502.TString;
|
|
6957
|
+
expiredAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6958
|
+
version: alepha2502.TInteger;
|
|
6959
|
+
changeDescription: alepha2502.TOptional<alepha2502.TString>;
|
|
6960
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
6961
|
+
creatorId: alepha2502.TOptional<alepha2502.TString>;
|
|
6962
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
6963
|
+
previousContent: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
6964
|
+
migrationLog: alepha2502.TOptional<alepha2502.TString>;
|
|
6965
|
+
}>>;
|
|
6966
|
+
defaultValue: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
6967
|
+
currentValue: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
6968
|
+
schema: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
6969
|
+
}>;
|
|
6970
|
+
}>;
|
|
6971
|
+
/**
|
|
6972
|
+
* Get a specific version of a configuration.
|
|
6973
|
+
*/
|
|
6974
|
+
getVersion: ActionPrimitiveFn<{
|
|
6975
|
+
params: alepha2502.TObject<{
|
|
6976
|
+
name: alepha2502.TString;
|
|
6977
|
+
version: alepha2502.TInteger;
|
|
6978
|
+
}>;
|
|
6979
|
+
response: alepha2502.TObject<{
|
|
6980
|
+
config: alepha2502.TOptional<alepha2502.TObject<{
|
|
6981
|
+
id: alepha2502.TString;
|
|
6982
|
+
createdAt: alepha2502.TString;
|
|
6983
|
+
updatedAt: alepha2502.TString;
|
|
6984
|
+
name: alepha2502.TString;
|
|
6985
|
+
content: alepha2502.TRecord<string, alepha2502.TAny>;
|
|
6986
|
+
schemaHash: alepha2502.TString;
|
|
6987
|
+
status: alepha2502.TUnsafe<"expired" | "current" | "next" | "future">;
|
|
6988
|
+
activationDate: alepha2502.TString;
|
|
6989
|
+
expiredAt: alepha2502.TOptional<alepha2502.TString>;
|
|
6990
|
+
version: alepha2502.TInteger;
|
|
6991
|
+
changeDescription: alepha2502.TOptional<alepha2502.TString>;
|
|
6992
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
6993
|
+
creatorId: alepha2502.TOptional<alepha2502.TString>;
|
|
6994
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
6995
|
+
previousContent: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
6996
|
+
migrationLog: alepha2502.TOptional<alepha2502.TString>;
|
|
6997
|
+
}>>;
|
|
6998
|
+
}>;
|
|
6999
|
+
}>;
|
|
7000
|
+
/**
|
|
7001
|
+
* Create a new configuration version.
|
|
7002
|
+
*/
|
|
7003
|
+
createVersion: ActionPrimitiveFn<{
|
|
7004
|
+
params: alepha2502.TObject<{
|
|
7005
|
+
name: alepha2502.TString;
|
|
7006
|
+
}>;
|
|
7007
|
+
body: alepha2502.TObject<{
|
|
7008
|
+
content: alepha2502.TRecord<string, alepha2502.TAny>;
|
|
7009
|
+
schemaHash: alepha2502.TString;
|
|
7010
|
+
activationDate: alepha2502.TOptional<alepha2502.TString>;
|
|
7011
|
+
changeDescription: alepha2502.TOptional<alepha2502.TString>;
|
|
7012
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
7013
|
+
creatorId: alepha2502.TOptional<alepha2502.TString>;
|
|
7014
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
7015
|
+
}>;
|
|
7016
|
+
response: alepha2502.TObject<{
|
|
7017
|
+
id: alepha2502.TString;
|
|
7018
|
+
createdAt: alepha2502.TString;
|
|
7019
|
+
updatedAt: alepha2502.TString;
|
|
7020
|
+
name: alepha2502.TString;
|
|
7021
|
+
content: alepha2502.TRecord<string, alepha2502.TAny>;
|
|
7022
|
+
schemaHash: alepha2502.TString;
|
|
7023
|
+
status: alepha2502.TUnsafe<"expired" | "current" | "next" | "future">;
|
|
7024
|
+
activationDate: alepha2502.TString;
|
|
7025
|
+
expiredAt: alepha2502.TOptional<alepha2502.TString>;
|
|
7026
|
+
version: alepha2502.TInteger;
|
|
7027
|
+
changeDescription: alepha2502.TOptional<alepha2502.TString>;
|
|
7028
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
7029
|
+
creatorId: alepha2502.TOptional<alepha2502.TString>;
|
|
7030
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
7031
|
+
previousContent: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
7032
|
+
migrationLog: alepha2502.TOptional<alepha2502.TString>;
|
|
7033
|
+
}>;
|
|
7034
|
+
}>;
|
|
7035
|
+
/**
|
|
7036
|
+
* Rollback to a previous version.
|
|
7037
|
+
*/
|
|
7038
|
+
rollback: ActionPrimitiveFn<{
|
|
7039
|
+
params: alepha2502.TObject<{
|
|
7040
|
+
name: alepha2502.TString;
|
|
7041
|
+
}>;
|
|
7042
|
+
body: alepha2502.TObject<{
|
|
7043
|
+
targetVersion: alepha2502.TInteger;
|
|
7044
|
+
changeDescription: alepha2502.TOptional<alepha2502.TString>;
|
|
7045
|
+
creatorId: alepha2502.TOptional<alepha2502.TString>;
|
|
7046
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
7047
|
+
}>;
|
|
7048
|
+
response: alepha2502.TObject<{
|
|
7049
|
+
id: alepha2502.TString;
|
|
7050
|
+
createdAt: alepha2502.TString;
|
|
7051
|
+
updatedAt: alepha2502.TString;
|
|
7052
|
+
name: alepha2502.TString;
|
|
7053
|
+
content: alepha2502.TRecord<string, alepha2502.TAny>;
|
|
7054
|
+
schemaHash: alepha2502.TString;
|
|
7055
|
+
status: alepha2502.TUnsafe<"expired" | "current" | "next" | "future">;
|
|
7056
|
+
activationDate: alepha2502.TString;
|
|
7057
|
+
expiredAt: alepha2502.TOptional<alepha2502.TString>;
|
|
7058
|
+
version: alepha2502.TInteger;
|
|
7059
|
+
changeDescription: alepha2502.TOptional<alepha2502.TString>;
|
|
7060
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
7061
|
+
creatorId: alepha2502.TOptional<alepha2502.TString>;
|
|
7062
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
7063
|
+
previousContent: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
7064
|
+
migrationLog: alepha2502.TOptional<alepha2502.TString>;
|
|
7065
|
+
}>;
|
|
7066
|
+
}>;
|
|
7067
|
+
/**
|
|
7068
|
+
* Activate a scheduled version immediately.
|
|
7069
|
+
*/
|
|
7070
|
+
activateNow: ActionPrimitiveFn<{
|
|
7071
|
+
params: alepha2502.TObject<{
|
|
7072
|
+
name: alepha2502.TString;
|
|
7073
|
+
}>;
|
|
7074
|
+
body: alepha2502.TObject<{
|
|
7075
|
+
version: alepha2502.TInteger;
|
|
7076
|
+
creatorId: alepha2502.TOptional<alepha2502.TString>;
|
|
7077
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
7078
|
+
}>;
|
|
7079
|
+
response: alepha2502.TObject<{
|
|
7080
|
+
id: alepha2502.TString;
|
|
7081
|
+
createdAt: alepha2502.TString;
|
|
7082
|
+
updatedAt: alepha2502.TString;
|
|
7083
|
+
name: alepha2502.TString;
|
|
7084
|
+
content: alepha2502.TRecord<string, alepha2502.TAny>;
|
|
7085
|
+
schemaHash: alepha2502.TString;
|
|
7086
|
+
status: alepha2502.TUnsafe<"expired" | "current" | "next" | "future">;
|
|
7087
|
+
activationDate: alepha2502.TString;
|
|
7088
|
+
expiredAt: alepha2502.TOptional<alepha2502.TString>;
|
|
7089
|
+
version: alepha2502.TInteger;
|
|
7090
|
+
changeDescription: alepha2502.TOptional<alepha2502.TString>;
|
|
7091
|
+
tags: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
7092
|
+
creatorId: alepha2502.TOptional<alepha2502.TString>;
|
|
7093
|
+
creatorName: alepha2502.TOptional<alepha2502.TString>;
|
|
7094
|
+
previousContent: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
7095
|
+
migrationLog: alepha2502.TOptional<alepha2502.TString>;
|
|
7096
|
+
}>;
|
|
7097
|
+
}>;
|
|
7098
|
+
/**
|
|
7099
|
+
* Trigger activation check for all scheduled configs.
|
|
7100
|
+
* Normally called by a scheduler, but exposed for manual triggering.
|
|
7101
|
+
*/
|
|
7102
|
+
checkScheduled: ActionPrimitiveFn<{
|
|
7103
|
+
response: alepha2502.TObject<{
|
|
7104
|
+
message: alepha2502.TString;
|
|
7105
|
+
}>;
|
|
7106
|
+
}>;
|
|
7107
|
+
}
|
|
7108
|
+
//#endregion
|
|
7109
|
+
//#region ../../../alepha/src/api/users/atoms/realmAuthSettingsAtom.d.ts
|
|
7110
|
+
declare const realmAuthSettingsAtom: alepha2502.Atom<alepha2502.TObject<{
|
|
7111
|
+
displayName: alepha2502.TOptional<alepha2502.TString>;
|
|
7112
|
+
description: alepha2502.TOptional<alepha2502.TString>;
|
|
7113
|
+
logoUrl: alepha2502.TOptional<alepha2502.TString>;
|
|
7114
|
+
registrationAllowed: alepha2502.TBoolean;
|
|
7115
|
+
emailEnabled: alepha2502.TBoolean;
|
|
7116
|
+
emailRequired: alepha2502.TBoolean;
|
|
7117
|
+
usernameEnabled: alepha2502.TBoolean;
|
|
7118
|
+
usernameRequired: alepha2502.TBoolean;
|
|
7119
|
+
phoneEnabled: alepha2502.TBoolean;
|
|
7120
|
+
phoneRequired: alepha2502.TBoolean;
|
|
7121
|
+
verifyEmailRequired: alepha2502.TBoolean;
|
|
7122
|
+
verifyPhoneRequired: alepha2502.TBoolean;
|
|
7123
|
+
firstNameLastNameEnabled: alepha2502.TBoolean;
|
|
7124
|
+
firstNameLastNameRequired: alepha2502.TBoolean;
|
|
7125
|
+
resetPasswordAllowed: alepha2502.TBoolean;
|
|
7126
|
+
passwordPolicy: alepha2502.TObject<{
|
|
7127
|
+
minLength: alepha2502.TInteger;
|
|
7128
|
+
requireUppercase: alepha2502.TBoolean;
|
|
7129
|
+
requireLowercase: alepha2502.TBoolean;
|
|
7130
|
+
requireNumbers: alepha2502.TBoolean;
|
|
7131
|
+
requireSpecialCharacters: alepha2502.TBoolean;
|
|
5628
7132
|
}>;
|
|
5629
7133
|
}>, "alepha.api.users.realmAuthSettings">;
|
|
5630
7134
|
type RealmAuthSettings = Static<typeof realmAuthSettingsAtom.schema>;
|
|
5631
7135
|
//#endregion
|
|
5632
|
-
//#region ../../../alepha/src/api
|
|
5633
|
-
declare const identities: EntityPrimitive<
|
|
5634
|
-
id: PgAttr<PgAttr<
|
|
5635
|
-
version: PgAttr<PgAttr<
|
|
5636
|
-
createdAt: PgAttr<PgAttr<
|
|
5637
|
-
updatedAt: PgAttr<PgAttr<
|
|
5638
|
-
userId: PgAttr<
|
|
5639
|
-
password:
|
|
5640
|
-
provider:
|
|
5641
|
-
providerUserId:
|
|
5642
|
-
providerData:
|
|
7136
|
+
//#region ../../../alepha/src/api/users/entities/identities.d.ts
|
|
7137
|
+
declare const identities: EntityPrimitive<alepha2502.TObject<{
|
|
7138
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7139
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7140
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7141
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7142
|
+
userId: PgAttr<alepha2502.TString, typeof PG_REF>;
|
|
7143
|
+
password: alepha2502.TOptional<alepha2502.TString>;
|
|
7144
|
+
provider: alepha2502.TString;
|
|
7145
|
+
providerUserId: alepha2502.TOptional<alepha2502.TString>;
|
|
7146
|
+
providerData: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
5643
7147
|
}>>;
|
|
5644
7148
|
//#endregion
|
|
5645
|
-
//#region ../../../alepha/src/api
|
|
5646
|
-
declare const sessions: EntityPrimitive<
|
|
5647
|
-
id: PgAttr<PgAttr<
|
|
5648
|
-
version: PgAttr<PgAttr<
|
|
5649
|
-
createdAt: PgAttr<PgAttr<
|
|
5650
|
-
updatedAt: PgAttr<PgAttr<
|
|
5651
|
-
refreshToken:
|
|
5652
|
-
userId: PgAttr<
|
|
5653
|
-
expiresAt:
|
|
5654
|
-
ip:
|
|
5655
|
-
userAgent:
|
|
5656
|
-
os:
|
|
5657
|
-
browser:
|
|
5658
|
-
device:
|
|
7149
|
+
//#region ../../../alepha/src/api/users/entities/sessions.d.ts
|
|
7150
|
+
declare const sessions: EntityPrimitive<alepha2502.TObject<{
|
|
7151
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7152
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7153
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7154
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7155
|
+
refreshToken: alepha2502.TString;
|
|
7156
|
+
userId: PgAttr<alepha2502.TString, typeof PG_REF>;
|
|
7157
|
+
expiresAt: alepha2502.TString;
|
|
7158
|
+
ip: alepha2502.TOptional<alepha2502.TString>;
|
|
7159
|
+
userAgent: alepha2502.TOptional<alepha2502.TObject<{
|
|
7160
|
+
os: alepha2502.TString;
|
|
7161
|
+
browser: alepha2502.TString;
|
|
7162
|
+
device: alepha2502.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
5659
7163
|
}>>;
|
|
5660
7164
|
}>>;
|
|
5661
7165
|
type SessionEntity = Static<typeof sessions.schema>;
|
|
5662
7166
|
//#endregion
|
|
5663
|
-
//#region ../../../alepha/src/api
|
|
5664
|
-
declare const users: EntityPrimitive<
|
|
5665
|
-
id: PgAttr<PgAttr<
|
|
5666
|
-
version: PgAttr<PgAttr<
|
|
5667
|
-
createdAt: PgAttr<PgAttr<
|
|
5668
|
-
updatedAt: PgAttr<PgAttr<
|
|
5669
|
-
realm: PgAttr<
|
|
5670
|
-
username:
|
|
5671
|
-
email:
|
|
5672
|
-
phoneNumber:
|
|
5673
|
-
roles: PgAttr<
|
|
5674
|
-
firstName:
|
|
5675
|
-
lastName:
|
|
5676
|
-
picture:
|
|
5677
|
-
enabled: PgAttr<
|
|
5678
|
-
emailVerified: PgAttr<
|
|
7167
|
+
//#region ../../../alepha/src/api/users/entities/users.d.ts
|
|
7168
|
+
declare const users: EntityPrimitive<alepha2502.TObject<{
|
|
7169
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7170
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7171
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7172
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7173
|
+
realm: PgAttr<alepha2502.TString, typeof PG_DEFAULT>;
|
|
7174
|
+
username: alepha2502.TOptional<alepha2502.TString>;
|
|
7175
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
7176
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TString>;
|
|
7177
|
+
roles: PgAttr<alepha2502.TArray<alepha2502.TString>, typeof PG_DEFAULT>;
|
|
7178
|
+
firstName: alepha2502.TOptional<alepha2502.TString>;
|
|
7179
|
+
lastName: alepha2502.TOptional<alepha2502.TString>;
|
|
7180
|
+
picture: alepha2502.TOptional<alepha2502.TString>;
|
|
7181
|
+
enabled: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
7182
|
+
emailVerified: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
5679
7183
|
}>>;
|
|
5680
7184
|
type UserEntity = Static<typeof users.schema>;
|
|
5681
7185
|
//#endregion
|
|
5682
|
-
//#region ../../../alepha/src/api
|
|
7186
|
+
//#region ../../../alepha/src/api/users/primitives/$userRealm.d.ts
|
|
7187
|
+
interface UserRealmOptions {
|
|
7188
|
+
/**
|
|
7189
|
+
* Secret key for signing tokens.
|
|
7190
|
+
*
|
|
7191
|
+
* If not provided, the secret from the SecurityProvider will be used (usually from the APP_SECRET environment variable).
|
|
7192
|
+
*/
|
|
7193
|
+
secret?: string;
|
|
7194
|
+
/**
|
|
7195
|
+
* Realm configuration options.
|
|
7196
|
+
*
|
|
7197
|
+
* It's already pre-configured for user management with admin and user roles.
|
|
7198
|
+
*/
|
|
7199
|
+
realm?: Partial<RealmPrimitiveOptions>;
|
|
7200
|
+
/**
|
|
7201
|
+
* Override entities.
|
|
7202
|
+
*/
|
|
7203
|
+
entities?: {
|
|
7204
|
+
users?: Repository<typeof users.schema>;
|
|
7205
|
+
identities?: Repository<typeof identities.schema>;
|
|
7206
|
+
sessions?: Repository<typeof sessions.schema>;
|
|
7207
|
+
};
|
|
7208
|
+
settings?: Partial<RealmAuthSettings>;
|
|
7209
|
+
identities?: {
|
|
7210
|
+
credentials?: true;
|
|
7211
|
+
google?: true;
|
|
7212
|
+
github?: true;
|
|
7213
|
+
};
|
|
7214
|
+
modules?: {
|
|
7215
|
+
files?: boolean;
|
|
7216
|
+
audits?: boolean;
|
|
7217
|
+
jobs?: boolean;
|
|
7218
|
+
};
|
|
7219
|
+
}
|
|
7220
|
+
//#endregion
|
|
7221
|
+
//#region ../../../alepha/src/api/users/providers/UserRealmProvider.d.ts
|
|
5683
7222
|
interface UserRealmRepositories {
|
|
5684
7223
|
identities: Repository<typeof identities.schema>;
|
|
5685
7224
|
sessions: Repository<typeof sessions.schema>;
|
|
@@ -5692,51 +7231,51 @@ interface UserRealm {
|
|
|
5692
7231
|
}
|
|
5693
7232
|
declare class UserRealmProvider {
|
|
5694
7233
|
protected readonly alepha: Alepha;
|
|
5695
|
-
protected readonly defaultIdentities: Repository<
|
|
5696
|
-
id: PgAttr<PgAttr<
|
|
5697
|
-
version: PgAttr<PgAttr<
|
|
5698
|
-
createdAt: PgAttr<PgAttr<
|
|
5699
|
-
updatedAt: PgAttr<PgAttr<
|
|
5700
|
-
userId: PgAttr<
|
|
5701
|
-
password:
|
|
5702
|
-
provider:
|
|
5703
|
-
providerUserId:
|
|
5704
|
-
providerData:
|
|
7234
|
+
protected readonly defaultIdentities: Repository<alepha2502.TObject<{
|
|
7235
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7236
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7237
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7238
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7239
|
+
userId: PgAttr<alepha2502.TString, typeof PG_REF>;
|
|
7240
|
+
password: alepha2502.TOptional<alepha2502.TString>;
|
|
7241
|
+
provider: alepha2502.TString;
|
|
7242
|
+
providerUserId: alepha2502.TOptional<alepha2502.TString>;
|
|
7243
|
+
providerData: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
5705
7244
|
}>>;
|
|
5706
|
-
protected readonly defaultSessions: Repository<
|
|
5707
|
-
id: PgAttr<PgAttr<
|
|
5708
|
-
version: PgAttr<PgAttr<
|
|
5709
|
-
createdAt: PgAttr<PgAttr<
|
|
5710
|
-
updatedAt: PgAttr<PgAttr<
|
|
5711
|
-
refreshToken:
|
|
5712
|
-
userId: PgAttr<
|
|
5713
|
-
expiresAt:
|
|
5714
|
-
ip:
|
|
5715
|
-
userAgent:
|
|
5716
|
-
os:
|
|
5717
|
-
browser:
|
|
5718
|
-
device:
|
|
7245
|
+
protected readonly defaultSessions: Repository<alepha2502.TObject<{
|
|
7246
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7247
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7248
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7249
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7250
|
+
refreshToken: alepha2502.TString;
|
|
7251
|
+
userId: PgAttr<alepha2502.TString, typeof PG_REF>;
|
|
7252
|
+
expiresAt: alepha2502.TString;
|
|
7253
|
+
ip: alepha2502.TOptional<alepha2502.TString>;
|
|
7254
|
+
userAgent: alepha2502.TOptional<alepha2502.TObject<{
|
|
7255
|
+
os: alepha2502.TString;
|
|
7256
|
+
browser: alepha2502.TString;
|
|
7257
|
+
device: alepha2502.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
5719
7258
|
}>>;
|
|
5720
7259
|
}>>;
|
|
5721
|
-
protected readonly defaultUsers: Repository<
|
|
5722
|
-
id: PgAttr<PgAttr<
|
|
5723
|
-
version: PgAttr<PgAttr<
|
|
5724
|
-
createdAt: PgAttr<PgAttr<
|
|
5725
|
-
updatedAt: PgAttr<PgAttr<
|
|
5726
|
-
realm: PgAttr<
|
|
5727
|
-
username:
|
|
5728
|
-
email:
|
|
5729
|
-
phoneNumber:
|
|
5730
|
-
roles: PgAttr<
|
|
5731
|
-
firstName:
|
|
5732
|
-
lastName:
|
|
5733
|
-
picture:
|
|
5734
|
-
enabled: PgAttr<
|
|
5735
|
-
emailVerified: PgAttr<
|
|
7260
|
+
protected readonly defaultUsers: Repository<alepha2502.TObject<{
|
|
7261
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7262
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7263
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7264
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7265
|
+
realm: PgAttr<alepha2502.TString, typeof PG_DEFAULT>;
|
|
7266
|
+
username: alepha2502.TOptional<alepha2502.TString>;
|
|
7267
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
7268
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TString>;
|
|
7269
|
+
roles: PgAttr<alepha2502.TArray<alepha2502.TString>, typeof PG_DEFAULT>;
|
|
7270
|
+
firstName: alepha2502.TOptional<alepha2502.TString>;
|
|
7271
|
+
lastName: alepha2502.TOptional<alepha2502.TString>;
|
|
7272
|
+
picture: alepha2502.TOptional<alepha2502.TString>;
|
|
7273
|
+
enabled: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
7274
|
+
emailVerified: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
5736
7275
|
}>>;
|
|
5737
7276
|
protected realms: Map<string, UserRealm>;
|
|
5738
7277
|
avatars: BucketPrimitive;
|
|
5739
|
-
protected readonly onConfigure:
|
|
7278
|
+
protected readonly onConfigure: alepha2502.HookPrimitive<"configure">;
|
|
5740
7279
|
register(userRealmName: string, userRealmOptions?: UserRealmOptions): UserRealm;
|
|
5741
7280
|
/**
|
|
5742
7281
|
* Gets a registered realm by name, auto-creating default if needed.
|
|
@@ -5747,32 +7286,32 @@ declare class UserRealmProvider {
|
|
|
5747
7286
|
userRepository(userRealmName?: string): Repository<typeof users.schema>;
|
|
5748
7287
|
}
|
|
5749
7288
|
//#endregion
|
|
5750
|
-
//#region ../../../alepha/src/api
|
|
5751
|
-
declare const sessionQuerySchema:
|
|
5752
|
-
page:
|
|
5753
|
-
size:
|
|
5754
|
-
sort:
|
|
5755
|
-
userId:
|
|
7289
|
+
//#region ../../../alepha/src/api/users/schemas/sessionQuerySchema.d.ts
|
|
7290
|
+
declare const sessionQuerySchema: alepha2502.TObject<{
|
|
7291
|
+
page: alepha2502.TOptional<alepha2502.TInteger>;
|
|
7292
|
+
size: alepha2502.TOptional<alepha2502.TInteger>;
|
|
7293
|
+
sort: alepha2502.TOptional<alepha2502.TString>;
|
|
7294
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
5756
7295
|
}>;
|
|
5757
7296
|
type SessionQuery = Static<typeof sessionQuerySchema>;
|
|
5758
7297
|
//#endregion
|
|
5759
|
-
//#region ../../../alepha/src/api
|
|
7298
|
+
//#region ../../../alepha/src/api/users/services/SessionCrudService.d.ts
|
|
5760
7299
|
declare class SessionCrudService {
|
|
5761
7300
|
protected readonly log: Logger;
|
|
5762
7301
|
protected readonly userRealmProvider: UserRealmProvider;
|
|
5763
|
-
sessions(userRealmName?: string): Repository<
|
|
5764
|
-
id: PgAttr<PgAttr<
|
|
5765
|
-
version: PgAttr<PgAttr<
|
|
5766
|
-
createdAt: PgAttr<PgAttr<
|
|
5767
|
-
updatedAt: PgAttr<PgAttr<
|
|
5768
|
-
refreshToken:
|
|
5769
|
-
userId: PgAttr<
|
|
5770
|
-
expiresAt:
|
|
5771
|
-
ip:
|
|
5772
|
-
userAgent:
|
|
5773
|
-
os:
|
|
5774
|
-
browser:
|
|
5775
|
-
device:
|
|
7302
|
+
sessions(userRealmName?: string): Repository<alepha2502.TObject<{
|
|
7303
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7304
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7305
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7306
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7307
|
+
refreshToken: alepha2502.TString;
|
|
7308
|
+
userId: PgAttr<alepha2502.TString, typeof PG_REF>;
|
|
7309
|
+
expiresAt: alepha2502.TString;
|
|
7310
|
+
ip: alepha2502.TOptional<alepha2502.TString>;
|
|
7311
|
+
userAgent: alepha2502.TOptional<alepha2502.TObject<{
|
|
7312
|
+
os: alepha2502.TString;
|
|
7313
|
+
browser: alepha2502.TString;
|
|
7314
|
+
device: alepha2502.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
5776
7315
|
}>>;
|
|
5777
7316
|
}>>;
|
|
5778
7317
|
/**
|
|
@@ -5789,7 +7328,7 @@ declare class SessionCrudService {
|
|
|
5789
7328
|
deleteSession(id: string, userRealmName?: string): Promise<void>;
|
|
5790
7329
|
}
|
|
5791
7330
|
//#endregion
|
|
5792
|
-
//#region ../../../alepha/src/api
|
|
7331
|
+
//#region ../../../alepha/src/api/users/controllers/SessionController.d.ts
|
|
5793
7332
|
declare class SessionController {
|
|
5794
7333
|
protected readonly url = "/sessions";
|
|
5795
7334
|
protected readonly group = "sessions";
|
|
@@ -5798,26 +7337,26 @@ declare class SessionController {
|
|
|
5798
7337
|
* Find sessions with pagination and filtering.
|
|
5799
7338
|
*/
|
|
5800
7339
|
readonly findSessions: ActionPrimitiveFn<{
|
|
5801
|
-
query:
|
|
5802
|
-
page:
|
|
5803
|
-
size:
|
|
5804
|
-
sort:
|
|
5805
|
-
userId:
|
|
5806
|
-
userRealmName:
|
|
7340
|
+
query: alepha2502.TObject<{
|
|
7341
|
+
page: alepha2502.TOptional<alepha2502.TInteger>;
|
|
7342
|
+
size: alepha2502.TOptional<alepha2502.TInteger>;
|
|
7343
|
+
sort: alepha2502.TOptional<alepha2502.TString>;
|
|
7344
|
+
userId: alepha2502.TOptional<alepha2502.TString>;
|
|
7345
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
5807
7346
|
}>;
|
|
5808
|
-
response:
|
|
5809
|
-
id:
|
|
5810
|
-
version:
|
|
5811
|
-
createdAt:
|
|
5812
|
-
updatedAt:
|
|
5813
|
-
refreshToken:
|
|
5814
|
-
userId:
|
|
5815
|
-
expiresAt:
|
|
5816
|
-
ip:
|
|
5817
|
-
userAgent:
|
|
5818
|
-
os:
|
|
5819
|
-
browser:
|
|
5820
|
-
device:
|
|
7347
|
+
response: alepha2502.TPage<alepha2502.TObject<{
|
|
7348
|
+
id: alepha2502.TString;
|
|
7349
|
+
version: alepha2502.TNumber;
|
|
7350
|
+
createdAt: alepha2502.TString;
|
|
7351
|
+
updatedAt: alepha2502.TString;
|
|
7352
|
+
refreshToken: alepha2502.TString;
|
|
7353
|
+
userId: alepha2502.TString;
|
|
7354
|
+
expiresAt: alepha2502.TString;
|
|
7355
|
+
ip: alepha2502.TOptional<alepha2502.TString>;
|
|
7356
|
+
userAgent: alepha2502.TOptional<alepha2502.TObject<{
|
|
7357
|
+
os: alepha2502.TString;
|
|
7358
|
+
browser: alepha2502.TString;
|
|
7359
|
+
device: alepha2502.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
5821
7360
|
}>>;
|
|
5822
7361
|
}>>;
|
|
5823
7362
|
}>;
|
|
@@ -5825,25 +7364,25 @@ declare class SessionController {
|
|
|
5825
7364
|
* Get a session by ID.
|
|
5826
7365
|
*/
|
|
5827
7366
|
readonly getSession: ActionPrimitiveFn<{
|
|
5828
|
-
params:
|
|
5829
|
-
id:
|
|
7367
|
+
params: alepha2502.TObject<{
|
|
7368
|
+
id: alepha2502.TString;
|
|
5830
7369
|
}>;
|
|
5831
|
-
query:
|
|
5832
|
-
userRealmName:
|
|
7370
|
+
query: alepha2502.TObject<{
|
|
7371
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
5833
7372
|
}>;
|
|
5834
|
-
response:
|
|
5835
|
-
id:
|
|
5836
|
-
version:
|
|
5837
|
-
createdAt:
|
|
5838
|
-
updatedAt:
|
|
5839
|
-
refreshToken:
|
|
5840
|
-
userId:
|
|
5841
|
-
expiresAt:
|
|
5842
|
-
ip:
|
|
5843
|
-
userAgent:
|
|
5844
|
-
os:
|
|
5845
|
-
browser:
|
|
5846
|
-
device:
|
|
7373
|
+
response: alepha2502.TObject<{
|
|
7374
|
+
id: alepha2502.TString;
|
|
7375
|
+
version: alepha2502.TNumber;
|
|
7376
|
+
createdAt: alepha2502.TString;
|
|
7377
|
+
updatedAt: alepha2502.TString;
|
|
7378
|
+
refreshToken: alepha2502.TString;
|
|
7379
|
+
userId: alepha2502.TString;
|
|
7380
|
+
expiresAt: alepha2502.TString;
|
|
7381
|
+
ip: alepha2502.TOptional<alepha2502.TString>;
|
|
7382
|
+
userAgent: alepha2502.TOptional<alepha2502.TObject<{
|
|
7383
|
+
os: alepha2502.TString;
|
|
7384
|
+
browser: alepha2502.TString;
|
|
7385
|
+
device: alepha2502.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
5847
7386
|
}>>;
|
|
5848
7387
|
}>;
|
|
5849
7388
|
}>;
|
|
@@ -5851,72 +7390,72 @@ declare class SessionController {
|
|
|
5851
7390
|
* Delete a session.
|
|
5852
7391
|
*/
|
|
5853
7392
|
readonly deleteSession: ActionPrimitiveFn<{
|
|
5854
|
-
params:
|
|
5855
|
-
id:
|
|
7393
|
+
params: alepha2502.TObject<{
|
|
7394
|
+
id: alepha2502.TString;
|
|
5856
7395
|
}>;
|
|
5857
|
-
query:
|
|
5858
|
-
userRealmName:
|
|
7396
|
+
query: alepha2502.TObject<{
|
|
7397
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
5859
7398
|
}>;
|
|
5860
|
-
response:
|
|
5861
|
-
ok:
|
|
5862
|
-
id:
|
|
5863
|
-
count:
|
|
7399
|
+
response: alepha2502.TObject<{
|
|
7400
|
+
ok: alepha2502.TBoolean;
|
|
7401
|
+
id: alepha2502.TOptional<alepha2502.TUnion<[alepha2502.TString, alepha2502.TInteger]>>;
|
|
7402
|
+
count: alepha2502.TOptional<alepha2502.TNumber>;
|
|
5864
7403
|
}>;
|
|
5865
7404
|
}>;
|
|
5866
7405
|
}
|
|
5867
7406
|
//#endregion
|
|
5868
|
-
//#region ../../../alepha/src/api
|
|
5869
|
-
declare const verifications: EntityPrimitive<
|
|
5870
|
-
id: PgAttr<PgAttr<
|
|
5871
|
-
createdAt: PgAttr<PgAttr<
|
|
5872
|
-
updatedAt: PgAttr<PgAttr<
|
|
5873
|
-
version: PgAttr<PgAttr<
|
|
5874
|
-
type:
|
|
5875
|
-
target:
|
|
5876
|
-
code:
|
|
5877
|
-
verifiedAt:
|
|
5878
|
-
attempts: PgAttr<
|
|
7407
|
+
//#region ../../../alepha/src/api/verifications/entities/verifications.d.ts
|
|
7408
|
+
declare const verifications: EntityPrimitive<alepha2502.TObject<{
|
|
7409
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7410
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7411
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7412
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7413
|
+
type: alepha2502.TUnsafe<"link" | "code">;
|
|
7414
|
+
target: alepha2502.TString;
|
|
7415
|
+
code: alepha2502.TString;
|
|
7416
|
+
verifiedAt: alepha2502.TOptional<alepha2502.TString>;
|
|
7417
|
+
attempts: PgAttr<alepha2502.TInteger, typeof PG_DEFAULT>;
|
|
5879
7418
|
}>>;
|
|
5880
7419
|
type VerificationEntity = Static<typeof verifications.schema>;
|
|
5881
7420
|
//#endregion
|
|
5882
|
-
//#region ../../../alepha/src/api
|
|
5883
|
-
declare const verificationSettingsSchema:
|
|
5884
|
-
code:
|
|
5885
|
-
maxAttempts:
|
|
5886
|
-
codeLength:
|
|
5887
|
-
codeExpiration:
|
|
5888
|
-
verificationCooldown:
|
|
5889
|
-
limitPerDay:
|
|
7421
|
+
//#region ../../../alepha/src/api/verifications/schemas/verificationSettingsSchema.d.ts
|
|
7422
|
+
declare const verificationSettingsSchema: alepha2502.TObject<{
|
|
7423
|
+
code: alepha2502.TObject<{
|
|
7424
|
+
maxAttempts: alepha2502.TInteger;
|
|
7425
|
+
codeLength: alepha2502.TInteger;
|
|
7426
|
+
codeExpiration: alepha2502.TInteger;
|
|
7427
|
+
verificationCooldown: alepha2502.TInteger;
|
|
7428
|
+
limitPerDay: alepha2502.TInteger;
|
|
5890
7429
|
}>;
|
|
5891
|
-
link:
|
|
5892
|
-
maxAttempts:
|
|
5893
|
-
codeExpiration:
|
|
5894
|
-
verificationCooldown:
|
|
5895
|
-
limitPerDay:
|
|
7430
|
+
link: alepha2502.TObject<{
|
|
7431
|
+
maxAttempts: alepha2502.TInteger;
|
|
7432
|
+
codeExpiration: alepha2502.TInteger;
|
|
7433
|
+
verificationCooldown: alepha2502.TInteger;
|
|
7434
|
+
limitPerDay: alepha2502.TInteger;
|
|
5896
7435
|
}>;
|
|
5897
|
-
purgeDays:
|
|
7436
|
+
purgeDays: alepha2502.TInteger;
|
|
5898
7437
|
}>;
|
|
5899
7438
|
type VerificationSettings = Static<typeof verificationSettingsSchema>;
|
|
5900
7439
|
//#endregion
|
|
5901
|
-
//#region ../../../alepha/src/api
|
|
7440
|
+
//#region ../../../alepha/src/api/verifications/parameters/VerificationParameters.d.ts
|
|
5902
7441
|
/**
|
|
5903
7442
|
* Verification settings configuration atom
|
|
5904
7443
|
*/
|
|
5905
|
-
declare const verificationOptions:
|
|
5906
|
-
code:
|
|
5907
|
-
maxAttempts:
|
|
5908
|
-
codeLength:
|
|
5909
|
-
codeExpiration:
|
|
5910
|
-
verificationCooldown:
|
|
5911
|
-
limitPerDay:
|
|
7444
|
+
declare const verificationOptions: alepha2502.Atom<alepha2502.TObject<{
|
|
7445
|
+
code: alepha2502.TObject<{
|
|
7446
|
+
maxAttempts: alepha2502.TInteger;
|
|
7447
|
+
codeLength: alepha2502.TInteger;
|
|
7448
|
+
codeExpiration: alepha2502.TInteger;
|
|
7449
|
+
verificationCooldown: alepha2502.TInteger;
|
|
7450
|
+
limitPerDay: alepha2502.TInteger;
|
|
5912
7451
|
}>;
|
|
5913
|
-
link:
|
|
5914
|
-
maxAttempts:
|
|
5915
|
-
codeExpiration:
|
|
5916
|
-
verificationCooldown:
|
|
5917
|
-
limitPerDay:
|
|
7452
|
+
link: alepha2502.TObject<{
|
|
7453
|
+
maxAttempts: alepha2502.TInteger;
|
|
7454
|
+
codeExpiration: alepha2502.TInteger;
|
|
7455
|
+
verificationCooldown: alepha2502.TInteger;
|
|
7456
|
+
limitPerDay: alepha2502.TInteger;
|
|
5918
7457
|
}>;
|
|
5919
|
-
purgeDays:
|
|
7458
|
+
purgeDays: alepha2502.TInteger;
|
|
5920
7459
|
}>, "alepha.api.verifications.options">;
|
|
5921
7460
|
type VerificationOptions = Static<typeof verificationOptions.schema>;
|
|
5922
7461
|
declare module "alepha" {
|
|
@@ -5944,63 +7483,63 @@ declare class VerificationParameters {
|
|
|
5944
7483
|
get<K$1 extends keyof VerificationSettings>(key: K$1): VerificationSettings[K$1];
|
|
5945
7484
|
}
|
|
5946
7485
|
//#endregion
|
|
5947
|
-
//#region ../../../alepha/src/api
|
|
5948
|
-
declare const requestVerificationCodeResponseSchema:
|
|
5949
|
-
token:
|
|
5950
|
-
codeExpiration:
|
|
5951
|
-
verificationCooldown:
|
|
5952
|
-
maxVerificationAttempts:
|
|
7486
|
+
//#region ../../../alepha/src/api/verifications/schemas/requestVerificationCodeResponseSchema.d.ts
|
|
7487
|
+
declare const requestVerificationCodeResponseSchema: alepha2502.TObject<{
|
|
7488
|
+
token: alepha2502.TString;
|
|
7489
|
+
codeExpiration: alepha2502.TInteger;
|
|
7490
|
+
verificationCooldown: alepha2502.TInteger;
|
|
7491
|
+
maxVerificationAttempts: alepha2502.TInteger;
|
|
5953
7492
|
}>;
|
|
5954
7493
|
type RequestVerificationResponse = Static<typeof requestVerificationCodeResponseSchema>;
|
|
5955
7494
|
//#endregion
|
|
5956
|
-
//#region ../../../alepha/src/api
|
|
5957
|
-
declare const validateVerificationCodeResponseSchema:
|
|
5958
|
-
ok:
|
|
5959
|
-
alreadyVerified:
|
|
7495
|
+
//#region ../../../alepha/src/api/verifications/schemas/validateVerificationCodeResponseSchema.d.ts
|
|
7496
|
+
declare const validateVerificationCodeResponseSchema: alepha2502.TObject<{
|
|
7497
|
+
ok: alepha2502.TBoolean;
|
|
7498
|
+
alreadyVerified: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
5960
7499
|
}>;
|
|
5961
7500
|
type ValidateVerificationCodeResponse = Static<typeof validateVerificationCodeResponseSchema>;
|
|
5962
7501
|
//#endregion
|
|
5963
|
-
//#region ../../../alepha/src/api
|
|
5964
|
-
declare const verificationTypeEnumSchema:
|
|
7502
|
+
//#region ../../../alepha/src/api/verifications/schemas/verificationTypeEnumSchema.d.ts
|
|
7503
|
+
declare const verificationTypeEnumSchema: alepha2502.TUnsafe<"link" | "code">;
|
|
5965
7504
|
type VerificationTypeEnum = Static<typeof verificationTypeEnumSchema>;
|
|
5966
7505
|
//#endregion
|
|
5967
|
-
//#region ../../../alepha/src/api
|
|
7506
|
+
//#region ../../../alepha/src/api/verifications/services/VerificationService.d.ts
|
|
5968
7507
|
declare class VerificationService {
|
|
5969
7508
|
protected readonly log: Logger;
|
|
5970
7509
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
5971
7510
|
protected readonly verificationParameters: VerificationParameters;
|
|
5972
|
-
protected readonly verificationRepository: Repository<
|
|
5973
|
-
id: PgAttr<PgAttr<
|
|
5974
|
-
createdAt: PgAttr<PgAttr<
|
|
5975
|
-
updatedAt: PgAttr<PgAttr<
|
|
5976
|
-
version: PgAttr<PgAttr<
|
|
5977
|
-
type:
|
|
5978
|
-
target:
|
|
5979
|
-
code:
|
|
5980
|
-
verifiedAt:
|
|
5981
|
-
attempts: PgAttr<
|
|
7511
|
+
protected readonly verificationRepository: Repository<alepha2502.TObject<{
|
|
7512
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7513
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7514
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7515
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7516
|
+
type: alepha2502.TUnsafe<"link" | "code">;
|
|
7517
|
+
target: alepha2502.TString;
|
|
7518
|
+
code: alepha2502.TString;
|
|
7519
|
+
verifiedAt: alepha2502.TOptional<alepha2502.TString>;
|
|
7520
|
+
attempts: PgAttr<alepha2502.TInteger, typeof PG_DEFAULT>;
|
|
5982
7521
|
}>>;
|
|
5983
7522
|
findByEntry(entry: VerificationEntry): Promise<VerificationEntity>;
|
|
5984
|
-
findRecentsByEntry(entry: VerificationEntry): Promise<PgStatic<
|
|
5985
|
-
id: PgAttr<PgAttr<
|
|
5986
|
-
createdAt: PgAttr<PgAttr<
|
|
5987
|
-
updatedAt: PgAttr<PgAttr<
|
|
5988
|
-
version: PgAttr<PgAttr<
|
|
5989
|
-
type:
|
|
5990
|
-
target:
|
|
5991
|
-
code:
|
|
5992
|
-
verifiedAt:
|
|
5993
|
-
attempts: PgAttr<
|
|
5994
|
-
}>, PgRelationMap<
|
|
5995
|
-
id: PgAttr<PgAttr<
|
|
5996
|
-
createdAt: PgAttr<PgAttr<
|
|
5997
|
-
updatedAt: PgAttr<PgAttr<
|
|
5998
|
-
version: PgAttr<PgAttr<
|
|
5999
|
-
type:
|
|
6000
|
-
target:
|
|
6001
|
-
code:
|
|
6002
|
-
verifiedAt:
|
|
6003
|
-
attempts: PgAttr<
|
|
7523
|
+
findRecentsByEntry(entry: VerificationEntry): Promise<PgStatic<alepha2502.TObject<{
|
|
7524
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7525
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7526
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7527
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7528
|
+
type: alepha2502.TUnsafe<"link" | "code">;
|
|
7529
|
+
target: alepha2502.TString;
|
|
7530
|
+
code: alepha2502.TString;
|
|
7531
|
+
verifiedAt: alepha2502.TOptional<alepha2502.TString>;
|
|
7532
|
+
attempts: PgAttr<alepha2502.TInteger, typeof PG_DEFAULT>;
|
|
7533
|
+
}>, PgRelationMap<alepha2502.TObject<{
|
|
7534
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7535
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7536
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7537
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7538
|
+
type: alepha2502.TUnsafe<"link" | "code">;
|
|
7539
|
+
target: alepha2502.TString;
|
|
7540
|
+
code: alepha2502.TString;
|
|
7541
|
+
verifiedAt: alepha2502.TOptional<alepha2502.TString>;
|
|
7542
|
+
attempts: PgAttr<alepha2502.TInteger, typeof PG_DEFAULT>;
|
|
6004
7543
|
}>>>[]>;
|
|
6005
7544
|
/**
|
|
6006
7545
|
* Creates a verification entry and returns the token.
|
|
@@ -6017,97 +7556,97 @@ interface VerificationEntry {
|
|
|
6017
7556
|
target: string;
|
|
6018
7557
|
}
|
|
6019
7558
|
//#endregion
|
|
6020
|
-
//#region ../../../alepha/src/api
|
|
7559
|
+
//#region ../../../alepha/src/api/verifications/controllers/VerificationController.d.ts
|
|
6021
7560
|
declare class VerificationController {
|
|
6022
7561
|
protected readonly verificationService: VerificationService;
|
|
6023
7562
|
readonly url = "/verifications";
|
|
6024
7563
|
readonly group = "verifications";
|
|
6025
7564
|
readonly requestVerificationCode: ActionPrimitiveFn<{
|
|
6026
|
-
params:
|
|
6027
|
-
type:
|
|
7565
|
+
params: alepha2502.TObject<{
|
|
7566
|
+
type: alepha2502.TUnsafe<"link" | "code">;
|
|
6028
7567
|
}>;
|
|
6029
|
-
body:
|
|
6030
|
-
target:
|
|
7568
|
+
body: alepha2502.TObject<{
|
|
7569
|
+
target: alepha2502.TString;
|
|
6031
7570
|
}>;
|
|
6032
|
-
response:
|
|
6033
|
-
token:
|
|
6034
|
-
codeExpiration:
|
|
6035
|
-
verificationCooldown:
|
|
6036
|
-
maxVerificationAttempts:
|
|
7571
|
+
response: alepha2502.TObject<{
|
|
7572
|
+
token: alepha2502.TString;
|
|
7573
|
+
codeExpiration: alepha2502.TInteger;
|
|
7574
|
+
verificationCooldown: alepha2502.TInteger;
|
|
7575
|
+
maxVerificationAttempts: alepha2502.TInteger;
|
|
6037
7576
|
}>;
|
|
6038
7577
|
}>;
|
|
6039
7578
|
readonly validateVerificationCode: ActionPrimitiveFn<{
|
|
6040
|
-
params:
|
|
6041
|
-
type:
|
|
7579
|
+
params: alepha2502.TObject<{
|
|
7580
|
+
type: alepha2502.TUnsafe<"link" | "code">;
|
|
6042
7581
|
}>;
|
|
6043
|
-
body:
|
|
6044
|
-
target:
|
|
6045
|
-
token:
|
|
7582
|
+
body: alepha2502.TObject<{
|
|
7583
|
+
target: alepha2502.TString;
|
|
7584
|
+
token: alepha2502.TString;
|
|
6046
7585
|
}>;
|
|
6047
|
-
response:
|
|
6048
|
-
ok:
|
|
6049
|
-
alreadyVerified:
|
|
7586
|
+
response: alepha2502.TObject<{
|
|
7587
|
+
ok: alepha2502.TBoolean;
|
|
7588
|
+
alreadyVerified: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
6050
7589
|
}>;
|
|
6051
7590
|
}>;
|
|
6052
7591
|
}
|
|
6053
7592
|
//#endregion
|
|
6054
|
-
//#region ../../../alepha/src/api
|
|
7593
|
+
//#region ../../../alepha/src/api/users/notifications/UserNotifications.d.ts
|
|
6055
7594
|
declare class UserNotifications {
|
|
6056
|
-
readonly passwordReset: NotificationPrimitive<
|
|
6057
|
-
email:
|
|
6058
|
-
code:
|
|
6059
|
-
expiresInMinutes:
|
|
7595
|
+
readonly passwordReset: NotificationPrimitive<alepha2502.TObject<{
|
|
7596
|
+
email: alepha2502.TString;
|
|
7597
|
+
code: alepha2502.TString;
|
|
7598
|
+
expiresInMinutes: alepha2502.TNumber;
|
|
6060
7599
|
}>>;
|
|
6061
|
-
readonly emailVerification: NotificationPrimitive<
|
|
6062
|
-
email:
|
|
6063
|
-
code:
|
|
6064
|
-
expiresInMinutes:
|
|
7600
|
+
readonly emailVerification: NotificationPrimitive<alepha2502.TObject<{
|
|
7601
|
+
email: alepha2502.TString;
|
|
7602
|
+
code: alepha2502.TString;
|
|
7603
|
+
expiresInMinutes: alepha2502.TNumber;
|
|
6065
7604
|
}>>;
|
|
6066
|
-
readonly phoneVerification: NotificationPrimitive<
|
|
6067
|
-
phoneNumber:
|
|
6068
|
-
code:
|
|
6069
|
-
expiresInMinutes:
|
|
7605
|
+
readonly phoneVerification: NotificationPrimitive<alepha2502.TObject<{
|
|
7606
|
+
phoneNumber: alepha2502.TString;
|
|
7607
|
+
code: alepha2502.TString;
|
|
7608
|
+
expiresInMinutes: alepha2502.TNumber;
|
|
6070
7609
|
}>>;
|
|
6071
|
-
readonly passwordResetLink: NotificationPrimitive<
|
|
6072
|
-
email:
|
|
6073
|
-
resetUrl:
|
|
6074
|
-
expiresInMinutes:
|
|
7610
|
+
readonly passwordResetLink: NotificationPrimitive<alepha2502.TObject<{
|
|
7611
|
+
email: alepha2502.TString;
|
|
7612
|
+
resetUrl: alepha2502.TString;
|
|
7613
|
+
expiresInMinutes: alepha2502.TNumber;
|
|
6075
7614
|
}>>;
|
|
6076
|
-
readonly emailVerificationLink: NotificationPrimitive<
|
|
6077
|
-
email:
|
|
6078
|
-
verifyUrl:
|
|
6079
|
-
expiresInMinutes:
|
|
7615
|
+
readonly emailVerificationLink: NotificationPrimitive<alepha2502.TObject<{
|
|
7616
|
+
email: alepha2502.TString;
|
|
7617
|
+
verifyUrl: alepha2502.TString;
|
|
7618
|
+
expiresInMinutes: alepha2502.TNumber;
|
|
6080
7619
|
}>>;
|
|
6081
7620
|
}
|
|
6082
7621
|
//#endregion
|
|
6083
|
-
//#region ../../../alepha/src/api
|
|
7622
|
+
//#region ../../../alepha/src/api/users/schemas/completePasswordResetRequestSchema.d.ts
|
|
6084
7623
|
/**
|
|
6085
7624
|
* Request schema for completing a password reset.
|
|
6086
7625
|
*
|
|
6087
7626
|
* Requires the intent ID from Phase 1, the verification code,
|
|
6088
7627
|
* and the new password.
|
|
6089
7628
|
*/
|
|
6090
|
-
declare const completePasswordResetRequestSchema:
|
|
6091
|
-
intentId:
|
|
6092
|
-
code:
|
|
6093
|
-
newPassword:
|
|
7629
|
+
declare const completePasswordResetRequestSchema: alepha2502.TObject<{
|
|
7630
|
+
intentId: alepha2502.TString;
|
|
7631
|
+
code: alepha2502.TString;
|
|
7632
|
+
newPassword: alepha2502.TString;
|
|
6094
7633
|
}>;
|
|
6095
7634
|
type CompletePasswordResetRequest = Static<typeof completePasswordResetRequestSchema>;
|
|
6096
7635
|
//#endregion
|
|
6097
|
-
//#region ../../../alepha/src/api
|
|
7636
|
+
//#region ../../../alepha/src/api/users/schemas/passwordResetIntentResponseSchema.d.ts
|
|
6098
7637
|
/**
|
|
6099
7638
|
* Response schema for password reset intent creation.
|
|
6100
7639
|
*
|
|
6101
7640
|
* Contains the intent ID needed for Phase 2 completion,
|
|
6102
7641
|
* along with expiration time.
|
|
6103
7642
|
*/
|
|
6104
|
-
declare const passwordResetIntentResponseSchema:
|
|
6105
|
-
intentId:
|
|
6106
|
-
expiresAt:
|
|
7643
|
+
declare const passwordResetIntentResponseSchema: alepha2502.TObject<{
|
|
7644
|
+
intentId: alepha2502.TString;
|
|
7645
|
+
expiresAt: alepha2502.TString;
|
|
6107
7646
|
}>;
|
|
6108
7647
|
type PasswordResetIntentResponse = Static<typeof passwordResetIntentResponseSchema>;
|
|
6109
7648
|
//#endregion
|
|
6110
|
-
//#region ../../../alepha/src/api
|
|
7649
|
+
//#region ../../../alepha/src/api/users/services/CredentialService.d.ts
|
|
6111
7650
|
/**
|
|
6112
7651
|
* Intent stored in cache during the password reset flow.
|
|
6113
7652
|
*/
|
|
@@ -6126,47 +7665,47 @@ declare class CredentialService {
|
|
|
6126
7665
|
protected readonly userNotifications: UserNotifications;
|
|
6127
7666
|
protected readonly userRealmProvider: UserRealmProvider;
|
|
6128
7667
|
protected readonly intentCache: CachePrimitiveFn<PasswordResetIntent, any[]>;
|
|
6129
|
-
users(userRealmName?: string): Repository<
|
|
6130
|
-
id: PgAttr<PgAttr<
|
|
6131
|
-
version: PgAttr<PgAttr<
|
|
6132
|
-
createdAt: PgAttr<PgAttr<
|
|
6133
|
-
updatedAt: PgAttr<PgAttr<
|
|
6134
|
-
realm: PgAttr<
|
|
6135
|
-
username:
|
|
6136
|
-
email:
|
|
6137
|
-
phoneNumber:
|
|
6138
|
-
roles: PgAttr<
|
|
6139
|
-
firstName:
|
|
6140
|
-
lastName:
|
|
6141
|
-
picture:
|
|
6142
|
-
enabled: PgAttr<
|
|
6143
|
-
emailVerified: PgAttr<
|
|
7668
|
+
users(userRealmName?: string): Repository<alepha2502.TObject<{
|
|
7669
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7670
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7671
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7672
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7673
|
+
realm: PgAttr<alepha2502.TString, typeof PG_DEFAULT>;
|
|
7674
|
+
username: alepha2502.TOptional<alepha2502.TString>;
|
|
7675
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
7676
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TString>;
|
|
7677
|
+
roles: PgAttr<alepha2502.TArray<alepha2502.TString>, typeof PG_DEFAULT>;
|
|
7678
|
+
firstName: alepha2502.TOptional<alepha2502.TString>;
|
|
7679
|
+
lastName: alepha2502.TOptional<alepha2502.TString>;
|
|
7680
|
+
picture: alepha2502.TOptional<alepha2502.TString>;
|
|
7681
|
+
enabled: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
7682
|
+
emailVerified: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
6144
7683
|
}>>;
|
|
6145
|
-
sessions(userRealmName?: string): Repository<
|
|
6146
|
-
id: PgAttr<PgAttr<
|
|
6147
|
-
version: PgAttr<PgAttr<
|
|
6148
|
-
createdAt: PgAttr<PgAttr<
|
|
6149
|
-
updatedAt: PgAttr<PgAttr<
|
|
6150
|
-
refreshToken:
|
|
6151
|
-
userId: PgAttr<
|
|
6152
|
-
expiresAt:
|
|
6153
|
-
ip:
|
|
6154
|
-
userAgent:
|
|
6155
|
-
os:
|
|
6156
|
-
browser:
|
|
6157
|
-
device:
|
|
7684
|
+
sessions(userRealmName?: string): Repository<alepha2502.TObject<{
|
|
7685
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7686
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7687
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7688
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7689
|
+
refreshToken: alepha2502.TString;
|
|
7690
|
+
userId: PgAttr<alepha2502.TString, typeof PG_REF>;
|
|
7691
|
+
expiresAt: alepha2502.TString;
|
|
7692
|
+
ip: alepha2502.TOptional<alepha2502.TString>;
|
|
7693
|
+
userAgent: alepha2502.TOptional<alepha2502.TObject<{
|
|
7694
|
+
os: alepha2502.TString;
|
|
7695
|
+
browser: alepha2502.TString;
|
|
7696
|
+
device: alepha2502.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
6158
7697
|
}>>;
|
|
6159
7698
|
}>>;
|
|
6160
|
-
identities(userRealmName?: string): Repository<
|
|
6161
|
-
id: PgAttr<PgAttr<
|
|
6162
|
-
version: PgAttr<PgAttr<
|
|
6163
|
-
createdAt: PgAttr<PgAttr<
|
|
6164
|
-
updatedAt: PgAttr<PgAttr<
|
|
6165
|
-
userId: PgAttr<
|
|
6166
|
-
password:
|
|
6167
|
-
provider:
|
|
6168
|
-
providerUserId:
|
|
6169
|
-
providerData:
|
|
7699
|
+
identities(userRealmName?: string): Repository<alepha2502.TObject<{
|
|
7700
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7701
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7702
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7703
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7704
|
+
userId: PgAttr<alepha2502.TString, typeof PG_REF>;
|
|
7705
|
+
password: alepha2502.TOptional<alepha2502.TString>;
|
|
7706
|
+
provider: alepha2502.TString;
|
|
7707
|
+
providerUserId: alepha2502.TOptional<alepha2502.TString>;
|
|
7708
|
+
providerData: alepha2502.TOptional<alepha2502.TRecord<string, alepha2502.TAny>>;
|
|
6170
7709
|
}>>;
|
|
6171
7710
|
/**
|
|
6172
7711
|
* Phase 1: Create a password reset intent.
|
|
@@ -6202,42 +7741,42 @@ declare class CredentialService {
|
|
|
6202
7741
|
resetPassword(email: string, token: string, newPassword: string, userRealmName?: string): Promise<void>;
|
|
6203
7742
|
}
|
|
6204
7743
|
//#endregion
|
|
6205
|
-
//#region ../../../alepha/src/api
|
|
6206
|
-
declare const completeRegistrationRequestSchema:
|
|
6207
|
-
intentId:
|
|
6208
|
-
emailCode:
|
|
6209
|
-
phoneCode:
|
|
6210
|
-
captchaToken:
|
|
7744
|
+
//#region ../../../alepha/src/api/users/schemas/completeRegistrationRequestSchema.d.ts
|
|
7745
|
+
declare const completeRegistrationRequestSchema: alepha2502.TObject<{
|
|
7746
|
+
intentId: alepha2502.TString;
|
|
7747
|
+
emailCode: alepha2502.TOptional<alepha2502.TString>;
|
|
7748
|
+
phoneCode: alepha2502.TOptional<alepha2502.TString>;
|
|
7749
|
+
captchaToken: alepha2502.TOptional<alepha2502.TString>;
|
|
6211
7750
|
}>;
|
|
6212
7751
|
type CompleteRegistrationRequest = Static<typeof completeRegistrationRequestSchema>;
|
|
6213
7752
|
//#endregion
|
|
6214
|
-
//#region ../../../alepha/src/api
|
|
7753
|
+
//#region ../../../alepha/src/api/users/schemas/registerRequestSchema.d.ts
|
|
6215
7754
|
/**
|
|
6216
7755
|
* Schema for user registration request body.
|
|
6217
7756
|
* Password is always required, other fields depend on realm settings.
|
|
6218
7757
|
*/
|
|
6219
|
-
declare const registerRequestSchema:
|
|
6220
|
-
password:
|
|
6221
|
-
username:
|
|
6222
|
-
email:
|
|
6223
|
-
phoneNumber:
|
|
6224
|
-
firstName:
|
|
6225
|
-
lastName:
|
|
6226
|
-
picture:
|
|
7758
|
+
declare const registerRequestSchema: alepha2502.TObject<{
|
|
7759
|
+
password: alepha2502.TString;
|
|
7760
|
+
username: alepha2502.TOptional<alepha2502.TString>;
|
|
7761
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
7762
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TString>;
|
|
7763
|
+
firstName: alepha2502.TOptional<alepha2502.TString>;
|
|
7764
|
+
lastName: alepha2502.TOptional<alepha2502.TString>;
|
|
7765
|
+
picture: alepha2502.TOptional<alepha2502.TString>;
|
|
6227
7766
|
}>;
|
|
6228
7767
|
type RegisterRequest = Static<typeof registerRequestSchema>;
|
|
6229
7768
|
//#endregion
|
|
6230
|
-
//#region ../../../alepha/src/api
|
|
6231
|
-
declare const registrationIntentResponseSchema:
|
|
6232
|
-
intentId:
|
|
6233
|
-
expectCaptcha:
|
|
6234
|
-
expectEmailVerification:
|
|
6235
|
-
expectPhoneVerification:
|
|
6236
|
-
expiresAt:
|
|
7769
|
+
//#region ../../../alepha/src/api/users/schemas/registrationIntentResponseSchema.d.ts
|
|
7770
|
+
declare const registrationIntentResponseSchema: alepha2502.TObject<{
|
|
7771
|
+
intentId: alepha2502.TString;
|
|
7772
|
+
expectCaptcha: alepha2502.TBoolean;
|
|
7773
|
+
expectEmailVerification: alepha2502.TBoolean;
|
|
7774
|
+
expectPhoneVerification: alepha2502.TBoolean;
|
|
7775
|
+
expiresAt: alepha2502.TString;
|
|
6237
7776
|
}>;
|
|
6238
7777
|
type RegistrationIntentResponse = Static<typeof registrationIntentResponseSchema>;
|
|
6239
7778
|
//#endregion
|
|
6240
|
-
//#region ../../../alepha/src/api
|
|
7779
|
+
//#region ../../../alepha/src/api/users/services/RegistrationService.d.ts
|
|
6241
7780
|
/**
|
|
6242
7781
|
* Intent stored in cache during the registration flow.
|
|
6243
7782
|
*/
|
|
@@ -6303,71 +7842,71 @@ declare class RegistrationService {
|
|
|
6303
7842
|
protected verifyPhoneCode(phoneNumber: string, code: string): Promise<void>;
|
|
6304
7843
|
}
|
|
6305
7844
|
//#endregion
|
|
6306
|
-
//#region ../../../alepha/src/api
|
|
6307
|
-
declare const createUserSchema:
|
|
6308
|
-
id:
|
|
6309
|
-
email:
|
|
6310
|
-
username:
|
|
6311
|
-
picture:
|
|
6312
|
-
roles:
|
|
6313
|
-
version:
|
|
6314
|
-
createdAt:
|
|
6315
|
-
updatedAt:
|
|
6316
|
-
phoneNumber:
|
|
6317
|
-
firstName:
|
|
6318
|
-
lastName:
|
|
6319
|
-
enabled:
|
|
6320
|
-
emailVerified:
|
|
7845
|
+
//#region ../../../alepha/src/api/users/schemas/createUserSchema.d.ts
|
|
7846
|
+
declare const createUserSchema: alepha2502.TObject<{
|
|
7847
|
+
id: alepha2502.TOptional<PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
|
|
7848
|
+
email: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
7849
|
+
username: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
7850
|
+
picture: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
7851
|
+
roles: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
7852
|
+
version: alepha2502.TOptional<PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
|
|
7853
|
+
createdAt: alepha2502.TOptional<PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
|
|
7854
|
+
updatedAt: alepha2502.TOptional<PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
|
|
7855
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
7856
|
+
firstName: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
7857
|
+
lastName: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
7858
|
+
enabled: alepha2502.TOptional<PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>>;
|
|
7859
|
+
emailVerified: alepha2502.TOptional<PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>>;
|
|
6321
7860
|
}>;
|
|
6322
7861
|
type CreateUser = Static<typeof createUserSchema>;
|
|
6323
7862
|
//#endregion
|
|
6324
|
-
//#region ../../../alepha/src/api
|
|
6325
|
-
declare const updateUserSchema:
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
phoneNumber:
|
|
6331
|
-
firstName:
|
|
6332
|
-
lastName:
|
|
6333
|
-
enabled:
|
|
7863
|
+
//#region ../../../alepha/src/api/users/schemas/updateUserSchema.d.ts
|
|
7864
|
+
declare const updateUserSchema: alepha2502.TObject<{
|
|
7865
|
+
realm: alepha2502.TOptional<PgAttr<alepha2502.TString, typeof PG_DEFAULT>>;
|
|
7866
|
+
email: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
7867
|
+
picture: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
7868
|
+
roles: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
7869
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
7870
|
+
firstName: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
7871
|
+
lastName: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
7872
|
+
enabled: alepha2502.TOptional<PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>>;
|
|
6334
7873
|
}>;
|
|
6335
7874
|
type UpdateUser = Static<typeof updateUserSchema>;
|
|
6336
7875
|
//#endregion
|
|
6337
|
-
//#region ../../../alepha/src/api
|
|
6338
|
-
declare const userQuerySchema:
|
|
6339
|
-
page:
|
|
6340
|
-
size:
|
|
6341
|
-
sort:
|
|
6342
|
-
email:
|
|
6343
|
-
enabled:
|
|
6344
|
-
emailVerified:
|
|
6345
|
-
roles:
|
|
6346
|
-
query:
|
|
7876
|
+
//#region ../../../alepha/src/api/users/schemas/userQuerySchema.d.ts
|
|
7877
|
+
declare const userQuerySchema: alepha2502.TObject<{
|
|
7878
|
+
page: alepha2502.TOptional<alepha2502.TInteger>;
|
|
7879
|
+
size: alepha2502.TOptional<alepha2502.TInteger>;
|
|
7880
|
+
sort: alepha2502.TOptional<alepha2502.TString>;
|
|
7881
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
7882
|
+
enabled: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
7883
|
+
emailVerified: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
7884
|
+
roles: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
7885
|
+
query: alepha2502.TOptional<alepha2502.TString>;
|
|
6347
7886
|
}>;
|
|
6348
7887
|
type UserQuery = Static<typeof userQuerySchema>;
|
|
6349
7888
|
//#endregion
|
|
6350
|
-
//#region ../../../alepha/src/api
|
|
7889
|
+
//#region ../../../alepha/src/api/users/services/UserService.d.ts
|
|
6351
7890
|
declare class UserService {
|
|
6352
7891
|
protected readonly log: Logger;
|
|
6353
7892
|
protected readonly verificationController: HttpVirtualClient<VerificationController>;
|
|
6354
7893
|
protected readonly userNotifications: UserNotifications;
|
|
6355
7894
|
protected readonly userRealmProvider: UserRealmProvider;
|
|
6356
|
-
users(userRealmName?: string): Repository<
|
|
6357
|
-
id: PgAttr<PgAttr<
|
|
6358
|
-
version: PgAttr<PgAttr<
|
|
6359
|
-
createdAt: PgAttr<PgAttr<
|
|
6360
|
-
updatedAt: PgAttr<PgAttr<
|
|
6361
|
-
realm: PgAttr<
|
|
6362
|
-
username:
|
|
6363
|
-
email:
|
|
6364
|
-
phoneNumber:
|
|
6365
|
-
roles: PgAttr<
|
|
6366
|
-
firstName:
|
|
6367
|
-
lastName:
|
|
6368
|
-
picture:
|
|
6369
|
-
enabled: PgAttr<
|
|
6370
|
-
emailVerified: PgAttr<
|
|
7895
|
+
users(userRealmName?: string): Repository<alepha2502.TObject<{
|
|
7896
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7897
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7898
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7899
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7900
|
+
realm: PgAttr<alepha2502.TString, typeof PG_DEFAULT>;
|
|
7901
|
+
username: alepha2502.TOptional<alepha2502.TString>;
|
|
7902
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
7903
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TString>;
|
|
7904
|
+
roles: PgAttr<alepha2502.TArray<alepha2502.TString>, typeof PG_DEFAULT>;
|
|
7905
|
+
firstName: alepha2502.TOptional<alepha2502.TString>;
|
|
7906
|
+
lastName: alepha2502.TOptional<alepha2502.TString>;
|
|
7907
|
+
picture: alepha2502.TOptional<alepha2502.TString>;
|
|
7908
|
+
enabled: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
7909
|
+
emailVerified: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
6371
7910
|
}>>;
|
|
6372
7911
|
/**
|
|
6373
7912
|
* Request email verification for a user.
|
|
@@ -6408,7 +7947,7 @@ declare class UserService {
|
|
|
6408
7947
|
deleteUser(id: string, userRealmName?: string): Promise<void>;
|
|
6409
7948
|
}
|
|
6410
7949
|
//#endregion
|
|
6411
|
-
//#region ../../../alepha/src/api
|
|
7950
|
+
//#region ../../../alepha/src/api/users/controllers/UserController.d.ts
|
|
6412
7951
|
declare class UserController {
|
|
6413
7952
|
protected readonly url = "/users";
|
|
6414
7953
|
protected readonly group = "users";
|
|
@@ -6420,122 +7959,122 @@ declare class UserController {
|
|
|
6420
7959
|
* Validates data, creates verification sessions, and stores intent in cache.
|
|
6421
7960
|
*/
|
|
6422
7961
|
readonly createRegistrationIntent: ActionPrimitiveFn<{
|
|
6423
|
-
body:
|
|
6424
|
-
password:
|
|
6425
|
-
username:
|
|
6426
|
-
email:
|
|
6427
|
-
phoneNumber:
|
|
6428
|
-
firstName:
|
|
6429
|
-
lastName:
|
|
6430
|
-
picture:
|
|
7962
|
+
body: alepha2502.TObject<{
|
|
7963
|
+
password: alepha2502.TString;
|
|
7964
|
+
username: alepha2502.TOptional<alepha2502.TString>;
|
|
7965
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
7966
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TString>;
|
|
7967
|
+
firstName: alepha2502.TOptional<alepha2502.TString>;
|
|
7968
|
+
lastName: alepha2502.TOptional<alepha2502.TString>;
|
|
7969
|
+
picture: alepha2502.TOptional<alepha2502.TString>;
|
|
6431
7970
|
}>;
|
|
6432
|
-
query:
|
|
6433
|
-
userRealmName:
|
|
7971
|
+
query: alepha2502.TObject<{
|
|
7972
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
6434
7973
|
}>;
|
|
6435
|
-
response:
|
|
6436
|
-
intentId:
|
|
6437
|
-
expectCaptcha:
|
|
6438
|
-
expectEmailVerification:
|
|
6439
|
-
expectPhoneVerification:
|
|
6440
|
-
expiresAt:
|
|
7974
|
+
response: alepha2502.TObject<{
|
|
7975
|
+
intentId: alepha2502.TString;
|
|
7976
|
+
expectCaptcha: alepha2502.TBoolean;
|
|
7977
|
+
expectEmailVerification: alepha2502.TBoolean;
|
|
7978
|
+
expectPhoneVerification: alepha2502.TBoolean;
|
|
7979
|
+
expiresAt: alepha2502.TString;
|
|
6441
7980
|
}>;
|
|
6442
7981
|
}>;
|
|
6443
7982
|
/**
|
|
6444
7983
|
* Find users with pagination and filtering.
|
|
6445
7984
|
*/
|
|
6446
7985
|
readonly findUsers: ActionPrimitiveFn<{
|
|
6447
|
-
query:
|
|
6448
|
-
page:
|
|
6449
|
-
size:
|
|
6450
|
-
sort:
|
|
6451
|
-
email:
|
|
6452
|
-
enabled:
|
|
6453
|
-
emailVerified:
|
|
6454
|
-
roles:
|
|
6455
|
-
query:
|
|
6456
|
-
userRealmName:
|
|
7986
|
+
query: alepha2502.TObject<{
|
|
7987
|
+
page: alepha2502.TOptional<alepha2502.TInteger>;
|
|
7988
|
+
size: alepha2502.TOptional<alepha2502.TInteger>;
|
|
7989
|
+
sort: alepha2502.TOptional<alepha2502.TString>;
|
|
7990
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
7991
|
+
enabled: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
7992
|
+
emailVerified: alepha2502.TOptional<alepha2502.TBoolean>;
|
|
7993
|
+
roles: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
7994
|
+
query: alepha2502.TOptional<alepha2502.TString>;
|
|
7995
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
6457
7996
|
}>;
|
|
6458
|
-
response:
|
|
6459
|
-
id: PgAttr<PgAttr<
|
|
6460
|
-
version: PgAttr<PgAttr<
|
|
6461
|
-
createdAt: PgAttr<PgAttr<
|
|
6462
|
-
updatedAt: PgAttr<PgAttr<
|
|
6463
|
-
realm: PgAttr<
|
|
6464
|
-
username:
|
|
6465
|
-
email:
|
|
6466
|
-
phoneNumber:
|
|
6467
|
-
roles: PgAttr<
|
|
6468
|
-
firstName:
|
|
6469
|
-
lastName:
|
|
6470
|
-
picture:
|
|
6471
|
-
enabled: PgAttr<
|
|
6472
|
-
emailVerified: PgAttr<
|
|
7997
|
+
response: alepha2502.TPage<alepha2502.TObject<{
|
|
7998
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7999
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
8000
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
8001
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
8002
|
+
realm: PgAttr<alepha2502.TString, typeof PG_DEFAULT>;
|
|
8003
|
+
username: alepha2502.TOptional<alepha2502.TString>;
|
|
8004
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
8005
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TString>;
|
|
8006
|
+
roles: PgAttr<alepha2502.TArray<alepha2502.TString>, typeof PG_DEFAULT>;
|
|
8007
|
+
firstName: alepha2502.TOptional<alepha2502.TString>;
|
|
8008
|
+
lastName: alepha2502.TOptional<alepha2502.TString>;
|
|
8009
|
+
picture: alepha2502.TOptional<alepha2502.TString>;
|
|
8010
|
+
enabled: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
8011
|
+
emailVerified: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
6473
8012
|
}>>;
|
|
6474
8013
|
}>;
|
|
6475
8014
|
/**
|
|
6476
8015
|
* Get a user by ID.
|
|
6477
8016
|
*/
|
|
6478
8017
|
readonly getUser: ActionPrimitiveFn<{
|
|
6479
|
-
params:
|
|
6480
|
-
id:
|
|
8018
|
+
params: alepha2502.TObject<{
|
|
8019
|
+
id: alepha2502.TString;
|
|
6481
8020
|
}>;
|
|
6482
|
-
query:
|
|
6483
|
-
userRealmName:
|
|
8021
|
+
query: alepha2502.TObject<{
|
|
8022
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
6484
8023
|
}>;
|
|
6485
|
-
response:
|
|
6486
|
-
id: PgAttr<PgAttr<
|
|
6487
|
-
version: PgAttr<PgAttr<
|
|
6488
|
-
createdAt: PgAttr<PgAttr<
|
|
6489
|
-
updatedAt: PgAttr<PgAttr<
|
|
6490
|
-
realm: PgAttr<
|
|
6491
|
-
username:
|
|
6492
|
-
email:
|
|
6493
|
-
phoneNumber:
|
|
6494
|
-
roles: PgAttr<
|
|
6495
|
-
firstName:
|
|
6496
|
-
lastName:
|
|
6497
|
-
picture:
|
|
6498
|
-
enabled: PgAttr<
|
|
6499
|
-
emailVerified: PgAttr<
|
|
8024
|
+
response: alepha2502.TObject<{
|
|
8025
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
8026
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
8027
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
8028
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
8029
|
+
realm: PgAttr<alepha2502.TString, typeof PG_DEFAULT>;
|
|
8030
|
+
username: alepha2502.TOptional<alepha2502.TString>;
|
|
8031
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
8032
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TString>;
|
|
8033
|
+
roles: PgAttr<alepha2502.TArray<alepha2502.TString>, typeof PG_DEFAULT>;
|
|
8034
|
+
firstName: alepha2502.TOptional<alepha2502.TString>;
|
|
8035
|
+
lastName: alepha2502.TOptional<alepha2502.TString>;
|
|
8036
|
+
picture: alepha2502.TOptional<alepha2502.TString>;
|
|
8037
|
+
enabled: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
8038
|
+
emailVerified: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
6500
8039
|
}>;
|
|
6501
8040
|
}>;
|
|
6502
8041
|
/**
|
|
6503
8042
|
* Create a new user.
|
|
6504
8043
|
*/
|
|
6505
8044
|
readonly createUser: ActionPrimitiveFn<{
|
|
6506
|
-
query:
|
|
6507
|
-
userRealmName:
|
|
8045
|
+
query: alepha2502.TObject<{
|
|
8046
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
6508
8047
|
}>;
|
|
6509
|
-
body:
|
|
6510
|
-
id:
|
|
6511
|
-
email:
|
|
6512
|
-
username:
|
|
6513
|
-
picture:
|
|
6514
|
-
roles:
|
|
6515
|
-
version:
|
|
6516
|
-
createdAt:
|
|
6517
|
-
updatedAt:
|
|
6518
|
-
phoneNumber:
|
|
6519
|
-
firstName:
|
|
6520
|
-
lastName:
|
|
6521
|
-
enabled:
|
|
6522
|
-
emailVerified:
|
|
8048
|
+
body: alepha2502.TObject<{
|
|
8049
|
+
id: alepha2502.TOptional<PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
|
|
8050
|
+
email: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
8051
|
+
username: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
8052
|
+
picture: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
8053
|
+
roles: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
8054
|
+
version: alepha2502.TOptional<PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
|
|
8055
|
+
createdAt: alepha2502.TOptional<PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
|
|
8056
|
+
updatedAt: alepha2502.TOptional<PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
|
|
8057
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
8058
|
+
firstName: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
8059
|
+
lastName: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
8060
|
+
enabled: alepha2502.TOptional<PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>>;
|
|
8061
|
+
emailVerified: alepha2502.TOptional<PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>>;
|
|
6523
8062
|
}>;
|
|
6524
|
-
response:
|
|
6525
|
-
id: PgAttr<PgAttr<
|
|
6526
|
-
version: PgAttr<PgAttr<
|
|
6527
|
-
createdAt: PgAttr<PgAttr<
|
|
6528
|
-
updatedAt: PgAttr<PgAttr<
|
|
6529
|
-
realm: PgAttr<
|
|
6530
|
-
username:
|
|
6531
|
-
email:
|
|
6532
|
-
phoneNumber:
|
|
6533
|
-
roles: PgAttr<
|
|
6534
|
-
firstName:
|
|
6535
|
-
lastName:
|
|
6536
|
-
picture:
|
|
6537
|
-
enabled: PgAttr<
|
|
6538
|
-
emailVerified: PgAttr<
|
|
8063
|
+
response: alepha2502.TObject<{
|
|
8064
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
8065
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
8066
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
8067
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
8068
|
+
realm: PgAttr<alepha2502.TString, typeof PG_DEFAULT>;
|
|
8069
|
+
username: alepha2502.TOptional<alepha2502.TString>;
|
|
8070
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
8071
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TString>;
|
|
8072
|
+
roles: PgAttr<alepha2502.TArray<alepha2502.TString>, typeof PG_DEFAULT>;
|
|
8073
|
+
firstName: alepha2502.TOptional<alepha2502.TString>;
|
|
8074
|
+
lastName: alepha2502.TOptional<alepha2502.TString>;
|
|
8075
|
+
picture: alepha2502.TOptional<alepha2502.TString>;
|
|
8076
|
+
enabled: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
8077
|
+
emailVerified: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
6539
8078
|
}>;
|
|
6540
8079
|
}>;
|
|
6541
8080
|
/**
|
|
@@ -6543,80 +8082,80 @@ declare class UserController {
|
|
|
6543
8082
|
* Validates verification codes and creates the user.
|
|
6544
8083
|
*/
|
|
6545
8084
|
readonly createUserFromIntent: ActionPrimitiveFn<{
|
|
6546
|
-
body:
|
|
6547
|
-
intentId:
|
|
6548
|
-
emailCode:
|
|
6549
|
-
phoneCode:
|
|
6550
|
-
captchaToken:
|
|
8085
|
+
body: alepha2502.TObject<{
|
|
8086
|
+
intentId: alepha2502.TString;
|
|
8087
|
+
emailCode: alepha2502.TOptional<alepha2502.TString>;
|
|
8088
|
+
phoneCode: alepha2502.TOptional<alepha2502.TString>;
|
|
8089
|
+
captchaToken: alepha2502.TOptional<alepha2502.TString>;
|
|
6551
8090
|
}>;
|
|
6552
|
-
response:
|
|
6553
|
-
id: PgAttr<PgAttr<
|
|
6554
|
-
version: PgAttr<PgAttr<
|
|
6555
|
-
createdAt: PgAttr<PgAttr<
|
|
6556
|
-
updatedAt: PgAttr<PgAttr<
|
|
6557
|
-
realm: PgAttr<
|
|
6558
|
-
username:
|
|
6559
|
-
email:
|
|
6560
|
-
phoneNumber:
|
|
6561
|
-
roles: PgAttr<
|
|
6562
|
-
firstName:
|
|
6563
|
-
lastName:
|
|
6564
|
-
picture:
|
|
6565
|
-
enabled: PgAttr<
|
|
6566
|
-
emailVerified: PgAttr<
|
|
8091
|
+
response: alepha2502.TObject<{
|
|
8092
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
8093
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
8094
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
8095
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
8096
|
+
realm: PgAttr<alepha2502.TString, typeof PG_DEFAULT>;
|
|
8097
|
+
username: alepha2502.TOptional<alepha2502.TString>;
|
|
8098
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
8099
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TString>;
|
|
8100
|
+
roles: PgAttr<alepha2502.TArray<alepha2502.TString>, typeof PG_DEFAULT>;
|
|
8101
|
+
firstName: alepha2502.TOptional<alepha2502.TString>;
|
|
8102
|
+
lastName: alepha2502.TOptional<alepha2502.TString>;
|
|
8103
|
+
picture: alepha2502.TOptional<alepha2502.TString>;
|
|
8104
|
+
enabled: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
8105
|
+
emailVerified: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
6567
8106
|
}>;
|
|
6568
8107
|
}>;
|
|
6569
8108
|
/**
|
|
6570
8109
|
* Update a user.
|
|
6571
8110
|
*/
|
|
6572
8111
|
readonly updateUser: ActionPrimitiveFn<{
|
|
6573
|
-
params:
|
|
6574
|
-
id:
|
|
8112
|
+
params: alepha2502.TObject<{
|
|
8113
|
+
id: alepha2502.TString;
|
|
6575
8114
|
}>;
|
|
6576
|
-
query:
|
|
6577
|
-
userRealmName:
|
|
8115
|
+
query: alepha2502.TObject<{
|
|
8116
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
6578
8117
|
}>;
|
|
6579
|
-
body:
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
phoneNumber:
|
|
6585
|
-
firstName:
|
|
6586
|
-
lastName:
|
|
6587
|
-
enabled:
|
|
8118
|
+
body: alepha2502.TObject<{
|
|
8119
|
+
realm: alepha2502.TOptional<PgAttr<alepha2502.TString, typeof PG_DEFAULT>>;
|
|
8120
|
+
email: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
8121
|
+
picture: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
8122
|
+
roles: alepha2502.TOptional<alepha2502.TArray<alepha2502.TString>>;
|
|
8123
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
8124
|
+
firstName: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
8125
|
+
lastName: alepha2502.TOptional<alepha2502.TOptional<alepha2502.TString>>;
|
|
8126
|
+
enabled: alepha2502.TOptional<PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>>;
|
|
6588
8127
|
}>;
|
|
6589
|
-
response:
|
|
6590
|
-
id: PgAttr<PgAttr<
|
|
6591
|
-
version: PgAttr<PgAttr<
|
|
6592
|
-
createdAt: PgAttr<PgAttr<
|
|
6593
|
-
updatedAt: PgAttr<PgAttr<
|
|
6594
|
-
realm: PgAttr<
|
|
6595
|
-
username:
|
|
6596
|
-
email:
|
|
6597
|
-
phoneNumber:
|
|
6598
|
-
roles: PgAttr<
|
|
6599
|
-
firstName:
|
|
6600
|
-
lastName:
|
|
6601
|
-
picture:
|
|
6602
|
-
enabled: PgAttr<
|
|
6603
|
-
emailVerified: PgAttr<
|
|
8128
|
+
response: alepha2502.TObject<{
|
|
8129
|
+
id: PgAttr<PgAttr<alepha2502.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
8130
|
+
version: PgAttr<PgAttr<alepha2502.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
8131
|
+
createdAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
8132
|
+
updatedAt: PgAttr<PgAttr<alepha2502.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
8133
|
+
realm: PgAttr<alepha2502.TString, typeof PG_DEFAULT>;
|
|
8134
|
+
username: alepha2502.TOptional<alepha2502.TString>;
|
|
8135
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
8136
|
+
phoneNumber: alepha2502.TOptional<alepha2502.TString>;
|
|
8137
|
+
roles: PgAttr<alepha2502.TArray<alepha2502.TString>, typeof PG_DEFAULT>;
|
|
8138
|
+
firstName: alepha2502.TOptional<alepha2502.TString>;
|
|
8139
|
+
lastName: alepha2502.TOptional<alepha2502.TString>;
|
|
8140
|
+
picture: alepha2502.TOptional<alepha2502.TString>;
|
|
8141
|
+
enabled: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
8142
|
+
emailVerified: PgAttr<alepha2502.TBoolean, typeof PG_DEFAULT>;
|
|
6604
8143
|
}>;
|
|
6605
8144
|
}>;
|
|
6606
8145
|
/**
|
|
6607
8146
|
* Delete a user.
|
|
6608
8147
|
*/
|
|
6609
8148
|
readonly deleteUser: ActionPrimitiveFn<{
|
|
6610
|
-
params:
|
|
6611
|
-
id:
|
|
8149
|
+
params: alepha2502.TObject<{
|
|
8150
|
+
id: alepha2502.TString;
|
|
6612
8151
|
}>;
|
|
6613
|
-
query:
|
|
6614
|
-
userRealmName:
|
|
8152
|
+
query: alepha2502.TObject<{
|
|
8153
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
6615
8154
|
}>;
|
|
6616
|
-
response:
|
|
6617
|
-
ok:
|
|
6618
|
-
id:
|
|
6619
|
-
count:
|
|
8155
|
+
response: alepha2502.TObject<{
|
|
8156
|
+
ok: alepha2502.TBoolean;
|
|
8157
|
+
id: alepha2502.TOptional<alepha2502.TUnion<[alepha2502.TString, alepha2502.TInteger]>>;
|
|
8158
|
+
count: alepha2502.TOptional<alepha2502.TNumber>;
|
|
6620
8159
|
}>;
|
|
6621
8160
|
}>;
|
|
6622
8161
|
/**
|
|
@@ -6624,15 +8163,15 @@ declare class UserController {
|
|
|
6624
8163
|
* Validates email, sends verification code, and stores intent in cache.
|
|
6625
8164
|
*/
|
|
6626
8165
|
readonly createPasswordResetIntent: ActionPrimitiveFn<{
|
|
6627
|
-
query:
|
|
6628
|
-
userRealmName:
|
|
8166
|
+
query: alepha2502.TObject<{
|
|
8167
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
6629
8168
|
}>;
|
|
6630
|
-
body:
|
|
6631
|
-
email:
|
|
8169
|
+
body: alepha2502.TObject<{
|
|
8170
|
+
email: alepha2502.TString;
|
|
6632
8171
|
}>;
|
|
6633
|
-
response:
|
|
6634
|
-
intentId:
|
|
6635
|
-
expiresAt:
|
|
8172
|
+
response: alepha2502.TObject<{
|
|
8173
|
+
intentId: alepha2502.TString;
|
|
8174
|
+
expiresAt: alepha2502.TString;
|
|
6636
8175
|
}>;
|
|
6637
8176
|
}>;
|
|
6638
8177
|
/**
|
|
@@ -6640,61 +8179,61 @@ declare class UserController {
|
|
|
6640
8179
|
* Validates verification code, updates password, and invalidates sessions.
|
|
6641
8180
|
*/
|
|
6642
8181
|
readonly completePasswordReset: ActionPrimitiveFn<{
|
|
6643
|
-
body:
|
|
6644
|
-
intentId:
|
|
6645
|
-
code:
|
|
6646
|
-
newPassword:
|
|
8182
|
+
body: alepha2502.TObject<{
|
|
8183
|
+
intentId: alepha2502.TString;
|
|
8184
|
+
code: alepha2502.TString;
|
|
8185
|
+
newPassword: alepha2502.TString;
|
|
6647
8186
|
}>;
|
|
6648
|
-
response:
|
|
6649
|
-
ok:
|
|
6650
|
-
id:
|
|
6651
|
-
count:
|
|
8187
|
+
response: alepha2502.TObject<{
|
|
8188
|
+
ok: alepha2502.TBoolean;
|
|
8189
|
+
id: alepha2502.TOptional<alepha2502.TUnion<[alepha2502.TString, alepha2502.TInteger]>>;
|
|
8190
|
+
count: alepha2502.TOptional<alepha2502.TNumber>;
|
|
6652
8191
|
}>;
|
|
6653
8192
|
}>;
|
|
6654
8193
|
/**
|
|
6655
8194
|
* @deprecated Use createPasswordResetIntent instead
|
|
6656
8195
|
*/
|
|
6657
8196
|
requestPasswordReset: ActionPrimitiveFn<{
|
|
6658
|
-
query:
|
|
6659
|
-
userRealmName:
|
|
8197
|
+
query: alepha2502.TObject<{
|
|
8198
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
6660
8199
|
}>;
|
|
6661
|
-
body:
|
|
6662
|
-
email:
|
|
8200
|
+
body: alepha2502.TObject<{
|
|
8201
|
+
email: alepha2502.TString;
|
|
6663
8202
|
}>;
|
|
6664
|
-
response:
|
|
6665
|
-
success:
|
|
6666
|
-
message:
|
|
8203
|
+
response: alepha2502.TObject<{
|
|
8204
|
+
success: alepha2502.TBoolean;
|
|
8205
|
+
message: alepha2502.TString;
|
|
6667
8206
|
}>;
|
|
6668
8207
|
}>;
|
|
6669
8208
|
/**
|
|
6670
8209
|
* @deprecated Use completePasswordReset instead
|
|
6671
8210
|
*/
|
|
6672
8211
|
validateResetToken: ActionPrimitiveFn<{
|
|
6673
|
-
query:
|
|
6674
|
-
email:
|
|
6675
|
-
token:
|
|
6676
|
-
userRealmName:
|
|
8212
|
+
query: alepha2502.TObject<{
|
|
8213
|
+
email: alepha2502.TString;
|
|
8214
|
+
token: alepha2502.TString;
|
|
8215
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
6677
8216
|
}>;
|
|
6678
|
-
response:
|
|
6679
|
-
valid:
|
|
6680
|
-
email:
|
|
8217
|
+
response: alepha2502.TObject<{
|
|
8218
|
+
valid: alepha2502.TBoolean;
|
|
8219
|
+
email: alepha2502.TOptional<alepha2502.TString>;
|
|
6681
8220
|
}>;
|
|
6682
8221
|
}>;
|
|
6683
8222
|
/**
|
|
6684
8223
|
* @deprecated Use completePasswordReset instead
|
|
6685
8224
|
*/
|
|
6686
8225
|
resetPassword: ActionPrimitiveFn<{
|
|
6687
|
-
query:
|
|
6688
|
-
userRealmName:
|
|
8226
|
+
query: alepha2502.TObject<{
|
|
8227
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
6689
8228
|
}>;
|
|
6690
|
-
body:
|
|
6691
|
-
email:
|
|
6692
|
-
token:
|
|
6693
|
-
newPassword:
|
|
8229
|
+
body: alepha2502.TObject<{
|
|
8230
|
+
email: alepha2502.TString;
|
|
8231
|
+
token: alepha2502.TString;
|
|
8232
|
+
newPassword: alepha2502.TString;
|
|
6694
8233
|
}>;
|
|
6695
|
-
response:
|
|
6696
|
-
success:
|
|
6697
|
-
message:
|
|
8234
|
+
response: alepha2502.TObject<{
|
|
8235
|
+
success: alepha2502.TBoolean;
|
|
8236
|
+
message: alepha2502.TString;
|
|
6698
8237
|
}>;
|
|
6699
8238
|
}>;
|
|
6700
8239
|
/**
|
|
@@ -6704,17 +8243,17 @@ declare class UserController {
|
|
|
6704
8243
|
* @param verifyUrl - Required when method is "link". The base URL for the verification link. Token and email will be appended as query params.
|
|
6705
8244
|
*/
|
|
6706
8245
|
requestEmailVerification: ActionPrimitiveFn<{
|
|
6707
|
-
query:
|
|
6708
|
-
userRealmName:
|
|
6709
|
-
method:
|
|
6710
|
-
verifyUrl:
|
|
8246
|
+
query: alepha2502.TObject<{
|
|
8247
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
8248
|
+
method: alepha2502.TOptional<alepha2502.TUnsafe<"link" | "code">>;
|
|
8249
|
+
verifyUrl: alepha2502.TOptional<alepha2502.TString>;
|
|
6711
8250
|
}>;
|
|
6712
|
-
body:
|
|
6713
|
-
email:
|
|
8251
|
+
body: alepha2502.TObject<{
|
|
8252
|
+
email: alepha2502.TString;
|
|
6714
8253
|
}>;
|
|
6715
|
-
response:
|
|
6716
|
-
success:
|
|
6717
|
-
message:
|
|
8254
|
+
response: alepha2502.TObject<{
|
|
8255
|
+
success: alepha2502.TBoolean;
|
|
8256
|
+
message: alepha2502.TString;
|
|
6718
8257
|
}>;
|
|
6719
8258
|
}>;
|
|
6720
8259
|
/**
|
|
@@ -6722,66 +8261,32 @@ declare class UserController {
|
|
|
6722
8261
|
* Updates the user's emailVerified status.
|
|
6723
8262
|
*/
|
|
6724
8263
|
verifyEmail: ActionPrimitiveFn<{
|
|
6725
|
-
query:
|
|
6726
|
-
userRealmName:
|
|
8264
|
+
query: alepha2502.TObject<{
|
|
8265
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
6727
8266
|
}>;
|
|
6728
|
-
body:
|
|
6729
|
-
email:
|
|
6730
|
-
token:
|
|
8267
|
+
body: alepha2502.TObject<{
|
|
8268
|
+
email: alepha2502.TString;
|
|
8269
|
+
token: alepha2502.TString;
|
|
6731
8270
|
}>;
|
|
6732
|
-
response:
|
|
6733
|
-
success:
|
|
6734
|
-
message:
|
|
8271
|
+
response: alepha2502.TObject<{
|
|
8272
|
+
success: alepha2502.TBoolean;
|
|
8273
|
+
message: alepha2502.TString;
|
|
6735
8274
|
}>;
|
|
6736
8275
|
}>;
|
|
6737
8276
|
/**
|
|
6738
8277
|
* Check if an email is verified.
|
|
6739
8278
|
*/
|
|
6740
8279
|
checkEmailVerification: ActionPrimitiveFn<{
|
|
6741
|
-
query:
|
|
6742
|
-
email:
|
|
6743
|
-
userRealmName:
|
|
8280
|
+
query: alepha2502.TObject<{
|
|
8281
|
+
email: alepha2502.TString;
|
|
8282
|
+
userRealmName: alepha2502.TOptional<alepha2502.TString>;
|
|
6744
8283
|
}>;
|
|
6745
|
-
response:
|
|
6746
|
-
verified:
|
|
8284
|
+
response: alepha2502.TObject<{
|
|
8285
|
+
verified: alepha2502.TBoolean;
|
|
6747
8286
|
}>;
|
|
6748
8287
|
}>;
|
|
6749
8288
|
}
|
|
6750
8289
|
//#endregion
|
|
6751
|
-
//#region ../../../alepha/src/api-users/primitives/$userRealm.d.ts
|
|
6752
|
-
interface UserRealmOptions {
|
|
6753
|
-
/**
|
|
6754
|
-
* Secret key for signing tokens.
|
|
6755
|
-
*
|
|
6756
|
-
* If not provided, the secret from the SecurityProvider will be used (usually from the APP_SECRET environment variable).
|
|
6757
|
-
*/
|
|
6758
|
-
secret?: string;
|
|
6759
|
-
/**
|
|
6760
|
-
* Realm configuration options.
|
|
6761
|
-
*
|
|
6762
|
-
* It's already pre-configured for user management with admin and user roles.
|
|
6763
|
-
*/
|
|
6764
|
-
realm?: Partial<RealmPrimitiveOptions>;
|
|
6765
|
-
/**
|
|
6766
|
-
* Override entities.
|
|
6767
|
-
*/
|
|
6768
|
-
entities?: {
|
|
6769
|
-
users?: Repository<typeof users.schema>;
|
|
6770
|
-
identities?: Repository<typeof identities.schema>;
|
|
6771
|
-
sessions?: Repository<typeof sessions.schema>;
|
|
6772
|
-
};
|
|
6773
|
-
settings?: Partial<RealmAuthSettings>;
|
|
6774
|
-
identities?: {
|
|
6775
|
-
credentials?: true;
|
|
6776
|
-
google?: true;
|
|
6777
|
-
github?: true;
|
|
6778
|
-
};
|
|
6779
|
-
modules?: {
|
|
6780
|
-
files?: boolean;
|
|
6781
|
-
audits?: boolean;
|
|
6782
|
-
};
|
|
6783
|
-
}
|
|
6784
|
-
//#endregion
|
|
6785
8290
|
//#region ../../src/admin/AdminRouter.d.ts
|
|
6786
8291
|
declare class AdminRouter {
|
|
6787
8292
|
protected readonly router: ReactRouter<object>;
|
|
@@ -6791,6 +8296,10 @@ declare class AdminRouter {
|
|
|
6791
8296
|
protected readonly sessionCtrl: HttpVirtualClient<SessionController>;
|
|
6792
8297
|
protected readonly notificationCtrl: HttpVirtualClient<NotificationController>;
|
|
6793
8298
|
protected readonly fileCtrl: HttpVirtualClient<FileController>;
|
|
8299
|
+
protected readonly configCtrl: HttpVirtualClient<ConfigController>;
|
|
8300
|
+
protected readonly auditCtrl: HttpVirtualClient<AuditController>;
|
|
8301
|
+
protected adminShellProps(): AdminShellProps;
|
|
8302
|
+
protected onNotAuthorized(url: URL): Redirection;
|
|
6794
8303
|
readonly layout: PagePrimitive<PageConfigSchema, {}, TPropsParentDefault>;
|
|
6795
8304
|
readonly adminUsers: PagePrimitive<PageConfigSchema, any, {}>;
|
|
6796
8305
|
readonly adminUserCreate: PagePrimitive<PageConfigSchema, any, {}>;
|
|
@@ -6798,74 +8307,87 @@ declare class AdminRouter {
|
|
|
6798
8307
|
readonly adminUserDetails: PagePrimitive<PageConfigSchema, any, any>;
|
|
6799
8308
|
readonly adminUserSessions: PagePrimitive<PageConfigSchema, any, any>;
|
|
6800
8309
|
readonly adminUserSettings: PagePrimitive<PageConfigSchema, any, any>;
|
|
8310
|
+
readonly adminUserAudits: PagePrimitive<PageConfigSchema, any, any>;
|
|
8311
|
+
readonly adminAudits: PagePrimitive<PageConfigSchema, any, {}>;
|
|
6801
8312
|
readonly adminSessions: PagePrimitive<PageConfigSchema, any, {}>;
|
|
6802
8313
|
readonly adminNotifications: PagePrimitive<PageConfigSchema, any, {}>;
|
|
6803
8314
|
readonly adminFiles: PagePrimitive<PageConfigSchema, any, {}>;
|
|
8315
|
+
readonly adminParameters: PagePrimitive<PageConfigSchema, any, {}>;
|
|
6804
8316
|
}
|
|
6805
8317
|
//#endregion
|
|
6806
|
-
//#region ../../src/admin/
|
|
6807
|
-
|
|
6808
|
-
|
|
8318
|
+
//#region ../../src/admin/components/AdminLayout.d.ts
|
|
8319
|
+
interface AdminLayoutProps {
|
|
8320
|
+
adminShellProps?: AdminShellProps;
|
|
8321
|
+
}
|
|
8322
|
+
declare const AdminLayout: (props: AdminLayoutProps) => react_jsx_runtime0.JSX.Element;
|
|
8323
|
+
//#endregion
|
|
8324
|
+
//#region ../../src/admin/components/audits/AdminAudits.d.ts
|
|
8325
|
+
interface AdminAuditsProps {
|
|
8326
|
+
userRealmName?: string;
|
|
6809
8327
|
}
|
|
8328
|
+
declare const AdminAudits: (props: AdminAuditsProps) => react_jsx_runtime0.JSX.Element;
|
|
6810
8329
|
//#endregion
|
|
6811
|
-
//#region ../../src/admin/components/AdminFiles.d.ts
|
|
8330
|
+
//#region ../../src/admin/components/files/AdminFiles.d.ts
|
|
6812
8331
|
declare const AdminFiles: () => react_jsx_runtime0.JSX.Element;
|
|
6813
8332
|
//#endregion
|
|
6814
|
-
//#region ../../src/admin/components/AdminJobs.d.ts
|
|
8333
|
+
//#region ../../src/admin/components/jobs/AdminJobs.d.ts
|
|
6815
8334
|
declare const AdminJobs: () => react_jsx_runtime0.JSX.Element;
|
|
6816
8335
|
//#endregion
|
|
6817
|
-
//#region ../../src/admin/components/
|
|
6818
|
-
declare const AdminLayout: () => react_jsx_runtime0.JSX.Element;
|
|
6819
|
-
//#endregion
|
|
6820
|
-
//#region ../../src/admin/components/AdminNotifications.d.ts
|
|
8336
|
+
//#region ../../src/admin/components/notifications/AdminNotifications.d.ts
|
|
6821
8337
|
declare const AdminNotifications: () => react_jsx_runtime0.JSX.Element;
|
|
6822
8338
|
//#endregion
|
|
6823
|
-
//#region ../../src/admin/components/AdminParameters.d.ts
|
|
8339
|
+
//#region ../../src/admin/components/parameters/AdminParameters.d.ts
|
|
6824
8340
|
declare const AdminParameters: () => react_jsx_runtime0.JSX.Element;
|
|
6825
8341
|
//#endregion
|
|
6826
|
-
//#region ../../src/admin/components/AdminSessions.d.ts
|
|
8342
|
+
//#region ../../src/admin/components/sessions/AdminSessions.d.ts
|
|
6827
8343
|
interface AdminSessionsProps {
|
|
6828
8344
|
userRealmName?: string;
|
|
6829
8345
|
}
|
|
6830
8346
|
declare const AdminSessions: (props: AdminSessionsProps) => react_jsx_runtime0.JSX.Element;
|
|
6831
8347
|
//#endregion
|
|
6832
|
-
//#region ../../src/admin/components/
|
|
8348
|
+
//#region ../../src/admin/components/users/AdminUserAudits.d.ts
|
|
8349
|
+
interface AdminUserAuditsProps {
|
|
8350
|
+
userRealmName?: string;
|
|
8351
|
+
}
|
|
8352
|
+
declare const AdminUserAudits: (_props: AdminUserAuditsProps) => react_jsx_runtime0.JSX.Element;
|
|
8353
|
+
//#endregion
|
|
8354
|
+
//#region ../../src/admin/components/users/AdminUserCreate.d.ts
|
|
6833
8355
|
interface AdminUserCreateProps {
|
|
6834
8356
|
userRealmName?: string;
|
|
6835
8357
|
}
|
|
6836
8358
|
declare const AdminUserCreate: (props: AdminUserCreateProps) => react_jsx_runtime0.JSX.Element;
|
|
6837
8359
|
//#endregion
|
|
6838
|
-
//#region ../../src/admin/components/AdminUserDetails.d.ts
|
|
8360
|
+
//#region ../../src/admin/components/users/AdminUserDetails.d.ts
|
|
6839
8361
|
interface AdminUserDetailsProps {
|
|
6840
8362
|
userRealmName?: string;
|
|
6841
8363
|
}
|
|
6842
8364
|
declare const AdminUserDetails: (props: AdminUserDetailsProps) => react_jsx_runtime0.JSX.Element;
|
|
6843
8365
|
//#endregion
|
|
6844
|
-
//#region ../../src/admin/components/AdminUserLayout.d.ts
|
|
8366
|
+
//#region ../../src/admin/components/users/AdminUserLayout.d.ts
|
|
6845
8367
|
interface AdminUserLayoutProps {
|
|
6846
8368
|
userRealmName?: string;
|
|
6847
8369
|
}
|
|
6848
8370
|
declare const AdminUserLayout: (props: AdminUserLayoutProps) => react_jsx_runtime0.JSX.Element;
|
|
6849
8371
|
//#endregion
|
|
6850
|
-
//#region ../../src/admin/components/AdminUserSessions.d.ts
|
|
8372
|
+
//#region ../../src/admin/components/users/AdminUserSessions.d.ts
|
|
6851
8373
|
interface AdminUserSessionsProps {
|
|
6852
8374
|
userRealmName?: string;
|
|
6853
8375
|
}
|
|
6854
8376
|
declare const AdminUserSessions: (props: AdminUserSessionsProps) => react_jsx_runtime0.JSX.Element;
|
|
6855
8377
|
//#endregion
|
|
6856
|
-
//#region ../../src/admin/components/AdminUserSettings.d.ts
|
|
8378
|
+
//#region ../../src/admin/components/users/AdminUserSettings.d.ts
|
|
6857
8379
|
interface AdminUserSettingsProps {
|
|
6858
8380
|
userRealmName?: string;
|
|
6859
8381
|
}
|
|
6860
8382
|
declare const AdminUserSettings: (props: AdminUserSettingsProps) => react_jsx_runtime0.JSX.Element;
|
|
6861
8383
|
//#endregion
|
|
6862
|
-
//#region ../../src/admin/components/AdminUsers.d.ts
|
|
8384
|
+
//#region ../../src/admin/components/users/AdminUsers.d.ts
|
|
6863
8385
|
interface AdminUsersProps {
|
|
6864
8386
|
userRealmName?: string;
|
|
6865
8387
|
}
|
|
6866
8388
|
declare const AdminUsers: (props: AdminUsersProps) => react_jsx_runtime0.JSX.Element;
|
|
6867
8389
|
//#endregion
|
|
6868
|
-
//#region ../../src/admin/components/AdminVerifications.d.ts
|
|
8390
|
+
//#region ../../src/admin/components/verifications/AdminVerifications.d.ts
|
|
6869
8391
|
declare const AdminVerifications: () => react_jsx_runtime0.JSX.Element;
|
|
6870
8392
|
//#endregion
|
|
6871
8393
|
//#region ../../src/admin/MainRouter.d.ts
|
|
@@ -6889,7 +8411,7 @@ declare class MainRouter {
|
|
|
6889
8411
|
*
|
|
6890
8412
|
* @module alepha.ui.admin
|
|
6891
8413
|
*/
|
|
6892
|
-
declare const AlephaUIAdmin:
|
|
8414
|
+
declare const AlephaUIAdmin: alepha2502.Service<alepha2502.Module>;
|
|
6893
8415
|
//#endregion
|
|
6894
|
-
export { AdminFiles, AdminJobs, AdminLayout, AdminNotifications, AdminParameters, AdminRouter, AdminSessions,
|
|
8416
|
+
export { AdminAudits, AdminFiles, AdminJobs, AdminLayout, AdminNotifications, AdminParameters, AdminRouter, AdminSessions, AdminUserAudits, AdminUserCreate, AdminUserDetails, AdminUserLayout, AdminUserSessions, AdminUserSettings, AdminUsers, AdminVerifications, AlephaUIAdmin, MainRouter };
|
|
6895
8417
|
//# sourceMappingURL=index.d.ts.map
|