@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/auth/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ActionMenuConfig, ActionMenuItem, ActionProps } from "@alepha/ui";
|
|
2
|
-
import * as
|
|
2
|
+
import * as alepha1159 from "alepha";
|
|
3
3
|
import { Alepha, AlephaError, Async, FileLike, InstantiableClass, LogLevel, LoggerInterface, Page, PageQuery, Primitive, PrimitiveArgs, Service, Static, StaticEncode, StreamLike, TArray, TFile, TNull, TObject, TOptional, TRecord, TSchema, TStream, TString, TUnion, TVoid } from "alepha";
|
|
4
4
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
import { FC, ReactNode } from "react";
|
|
@@ -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: alepha1159.TObject<{
|
|
29
|
+
id: alepha1159.TString;
|
|
30
|
+
name: alepha1159.TOptional<alepha1159.TString>;
|
|
31
|
+
email: alepha1159.TOptional<alepha1159.TString>;
|
|
32
|
+
username: alepha1159.TOptional<alepha1159.TString>;
|
|
33
|
+
picture: alepha1159.TOptional<alepha1159.TString>;
|
|
34
|
+
sessionId: alepha1159.TOptional<alepha1159.TString>;
|
|
35
|
+
organizations: alepha1159.TOptional<alepha1159.TArray<alepha1159.TString>>;
|
|
36
|
+
roles: alepha1159.TOptional<alepha1159.TArray<alepha1159.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: alepha1159.TObject<{
|
|
42
|
+
error: alepha1159.TString;
|
|
43
|
+
status: alepha1159.TInteger;
|
|
44
|
+
message: alepha1159.TString;
|
|
45
|
+
details: alepha1159.TOptional<alepha1159.TString>;
|
|
46
|
+
requestId: alepha1159.TOptional<alepha1159.TString>;
|
|
47
|
+
cause: alepha1159.TOptional<alepha1159.TObject<{
|
|
48
|
+
name: alepha1159.TString;
|
|
49
|
+
message: alepha1159.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: alepha1159.TObject<{
|
|
289
|
+
level: alepha1159.TUnsafe<"TRACE" | "SILENT" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
290
|
+
message: alepha1159.TString;
|
|
291
|
+
service: alepha1159.TString;
|
|
292
|
+
module: alepha1159.TString;
|
|
293
|
+
context: alepha1159.TOptional<alepha1159.TString>;
|
|
294
|
+
app: alepha1159.TOptional<alepha1159.TString>;
|
|
295
|
+
data: alepha1159.TOptional<alepha1159.TAny>;
|
|
296
|
+
timestamp: alepha1159.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: alepha1159.HookPrimitive<"start">;
|
|
312
|
+
protected readonly onStop: alepha1159.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: alepha1159.TObject<{
|
|
445
445
|
/**
|
|
446
446
|
* Default log level for the application.
|
|
447
447
|
*
|
|
@@ -458,17 +458,17 @@ declare const envSchema$9: alepha1178.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: alepha1159.TOptional<alepha1159.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: alepha1159.TOptional<alepha1159.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: alepha1159.HookPrimitive<"server:onRequest">;
|
|
506
|
+
readonly onResponse: alepha1159.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: alepha1159.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: alepha1159.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,32 +908,32 @@ 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/primitives/$route.d.ts
|
|
911
|
+
//#region ../../../alepha/src/server/core/primitives/$route.d.ts
|
|
912
912
|
interface RoutePrimitiveOptions<TConfig extends RequestConfigSchema = RequestConfigSchema> extends ServerRoute<TConfig> {}
|
|
913
913
|
declare class RoutePrimitive<TConfig extends RequestConfigSchema> extends Primitive<RoutePrimitiveOptions<TConfig>> {
|
|
914
914
|
protected readonly serverRouterProvider: ServerRouterProvider;
|
|
915
915
|
protected onInit(): void;
|
|
916
916
|
}
|
|
917
917
|
//#endregion
|
|
918
|
-
//#region ../../../alepha/src/server/providers/BunHttpServerProvider.d.ts
|
|
919
|
-
declare const envSchema$
|
|
920
|
-
SERVER_PORT:
|
|
921
|
-
SERVER_HOST:
|
|
918
|
+
//#region ../../../alepha/src/server/core/providers/BunHttpServerProvider.d.ts
|
|
919
|
+
declare const envSchema$9: alepha1159.TObject<{
|
|
920
|
+
SERVER_PORT: alepha1159.TInteger;
|
|
921
|
+
SERVER_HOST: alepha1159.TString;
|
|
922
922
|
}>;
|
|
923
923
|
declare module "alepha" {
|
|
924
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
924
|
+
interface Env extends Partial<Static<typeof envSchema$9>> {}
|
|
925
925
|
}
|
|
926
926
|
//#endregion
|
|
927
|
-
//#region ../../../alepha/src/server/providers/NodeHttpServerProvider.d.ts
|
|
928
|
-
declare const envSchema$
|
|
929
|
-
SERVER_PORT:
|
|
930
|
-
SERVER_HOST:
|
|
927
|
+
//#region ../../../alepha/src/server/core/providers/NodeHttpServerProvider.d.ts
|
|
928
|
+
declare const envSchema$8: alepha1159.TObject<{
|
|
929
|
+
SERVER_PORT: alepha1159.TInteger;
|
|
930
|
+
SERVER_HOST: alepha1159.TString;
|
|
931
931
|
}>;
|
|
932
932
|
declare module "alepha" {
|
|
933
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
933
|
+
interface Env extends Partial<Static<typeof envSchema$8>> {}
|
|
934
934
|
}
|
|
935
935
|
//#endregion
|
|
936
|
-
//#region ../../../alepha/src/server/index.d.ts
|
|
936
|
+
//#region ../../../alepha/src/server/core/index.d.ts
|
|
937
937
|
declare module "alepha" {
|
|
938
938
|
interface State {
|
|
939
939
|
"alepha.node.server"?: Server;
|
|
@@ -1011,24 +1011,24 @@ interface UserAccountToken extends UserAccount {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
//#endregion
|
|
1013
1013
|
//#region ../../../alepha/src/security/schemas/permissionSchema.d.ts
|
|
1014
|
-
declare const permissionSchema:
|
|
1015
|
-
name:
|
|
1016
|
-
group:
|
|
1017
|
-
description:
|
|
1018
|
-
method:
|
|
1019
|
-
path:
|
|
1014
|
+
declare const permissionSchema: alepha1159.TObject<{
|
|
1015
|
+
name: alepha1159.TString;
|
|
1016
|
+
group: alepha1159.TOptional<alepha1159.TString>;
|
|
1017
|
+
description: alepha1159.TOptional<alepha1159.TString>;
|
|
1018
|
+
method: alepha1159.TOptional<alepha1159.TString>;
|
|
1019
|
+
path: alepha1159.TOptional<alepha1159.TString>;
|
|
1020
1020
|
}>;
|
|
1021
1021
|
type Permission = Static<typeof permissionSchema>;
|
|
1022
1022
|
//#endregion
|
|
1023
1023
|
//#region ../../../alepha/src/security/schemas/roleSchema.d.ts
|
|
1024
|
-
declare const roleSchema:
|
|
1025
|
-
name:
|
|
1026
|
-
description:
|
|
1027
|
-
default:
|
|
1028
|
-
permissions:
|
|
1029
|
-
name:
|
|
1030
|
-
ownership:
|
|
1031
|
-
exclude:
|
|
1024
|
+
declare const roleSchema: alepha1159.TObject<{
|
|
1025
|
+
name: alepha1159.TString;
|
|
1026
|
+
description: alepha1159.TOptional<alepha1159.TString>;
|
|
1027
|
+
default: alepha1159.TOptional<alepha1159.TBoolean>;
|
|
1028
|
+
permissions: alepha1159.TArray<alepha1159.TObject<{
|
|
1029
|
+
name: alepha1159.TString;
|
|
1030
|
+
ownership: alepha1159.TOptional<alepha1159.TBoolean>;
|
|
1031
|
+
exclude: alepha1159.TOptional<alepha1159.TArray<alepha1159.TString>>;
|
|
1032
1032
|
}>>;
|
|
1033
1033
|
}>;
|
|
1034
1034
|
type Role = Static<typeof roleSchema>;
|
|
@@ -1100,11 +1100,11 @@ interface JwtParseResult {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
//#endregion
|
|
1102
1102
|
//#region ../../../alepha/src/security/providers/SecurityProvider.d.ts
|
|
1103
|
-
declare const envSchema$
|
|
1104
|
-
APP_SECRET:
|
|
1103
|
+
declare const envSchema$7: alepha1159.TObject<{
|
|
1104
|
+
APP_SECRET: alepha1159.TString;
|
|
1105
1105
|
}>;
|
|
1106
1106
|
declare module "alepha" {
|
|
1107
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
1107
|
+
interface Env extends Partial<Static<typeof envSchema$7>> {}
|
|
1108
1108
|
}
|
|
1109
1109
|
declare class SecurityProvider {
|
|
1110
1110
|
protected readonly UNKNOWN_USER_NAME = "Anonymous User";
|
|
@@ -1125,7 +1125,7 @@ declare class SecurityProvider {
|
|
|
1125
1125
|
* The realms configured for the security provider.
|
|
1126
1126
|
*/
|
|
1127
1127
|
protected readonly realms: Realm[];
|
|
1128
|
-
protected start:
|
|
1128
|
+
protected start: alepha1159.HookPrimitive<"start">;
|
|
1129
1129
|
/**
|
|
1130
1130
|
* Adds a role to one or more realms.
|
|
1131
1131
|
*
|
|
@@ -1374,13 +1374,6 @@ interface ServiceAccountPrimitive {
|
|
|
1374
1374
|
token: () => Promise<string>;
|
|
1375
1375
|
}
|
|
1376
1376
|
//#endregion
|
|
1377
|
-
//#region ../../../alepha/src/security/providers/CryptoProvider.d.ts
|
|
1378
|
-
declare class CryptoProvider {
|
|
1379
|
-
hashPassword(password: string): Promise<string>;
|
|
1380
|
-
verifyPassword(password: string, stored: string): Promise<boolean>;
|
|
1381
|
-
randomUUID(): string;
|
|
1382
|
-
}
|
|
1383
|
-
//#endregion
|
|
1384
1377
|
//#region ../../../alepha/src/security/index.d.ts
|
|
1385
1378
|
declare module "alepha" {
|
|
1386
1379
|
interface Hooks {
|
|
@@ -1403,19 +1396,19 @@ declare module "alepha" {
|
|
|
1403
1396
|
* @module alepha.security
|
|
1404
1397
|
*/
|
|
1405
1398
|
//#endregion
|
|
1406
|
-
//#region ../../../alepha/src/server
|
|
1399
|
+
//#region ../../../alepha/src/server/security/providers/ServerBasicAuthProvider.d.ts
|
|
1407
1400
|
interface BasicAuthOptions {
|
|
1408
1401
|
username: string;
|
|
1409
1402
|
password: string;
|
|
1410
1403
|
}
|
|
1411
1404
|
//#endregion
|
|
1412
|
-
//#region ../../../alepha/src/server
|
|
1405
|
+
//#region ../../../alepha/src/server/security/providers/ServerSecurityProvider.d.ts
|
|
1413
1406
|
type ServerRouteSecure = {
|
|
1414
1407
|
realm?: string;
|
|
1415
1408
|
basic?: BasicAuthOptions;
|
|
1416
1409
|
};
|
|
1417
1410
|
//#endregion
|
|
1418
|
-
//#region ../../../alepha/src/server
|
|
1411
|
+
//#region ../../../alepha/src/server/security/index.d.ts
|
|
1419
1412
|
declare module "alepha" {
|
|
1420
1413
|
interface State {
|
|
1421
1414
|
/**
|
|
@@ -1467,30 +1460,30 @@ declare module "alepha/server" {
|
|
|
1467
1460
|
* @module alepha.server.security
|
|
1468
1461
|
*/
|
|
1469
1462
|
//#endregion
|
|
1470
|
-
//#region ../../../alepha/src/server
|
|
1471
|
-
declare const apiLinkSchema:
|
|
1472
|
-
name:
|
|
1473
|
-
group:
|
|
1474
|
-
path:
|
|
1475
|
-
method:
|
|
1476
|
-
requestBodyType:
|
|
1477
|
-
service:
|
|
1463
|
+
//#region ../../../alepha/src/server/links/schemas/apiLinksResponseSchema.d.ts
|
|
1464
|
+
declare const apiLinkSchema: alepha1159.TObject<{
|
|
1465
|
+
name: alepha1159.TString;
|
|
1466
|
+
group: alepha1159.TOptional<alepha1159.TString>;
|
|
1467
|
+
path: alepha1159.TString;
|
|
1468
|
+
method: alepha1159.TOptional<alepha1159.TString>;
|
|
1469
|
+
requestBodyType: alepha1159.TOptional<alepha1159.TString>;
|
|
1470
|
+
service: alepha1159.TOptional<alepha1159.TString>;
|
|
1478
1471
|
}>;
|
|
1479
|
-
declare const apiLinksResponseSchema:
|
|
1480
|
-
prefix:
|
|
1481
|
-
links:
|
|
1482
|
-
name:
|
|
1483
|
-
group:
|
|
1484
|
-
path:
|
|
1485
|
-
method:
|
|
1486
|
-
requestBodyType:
|
|
1487
|
-
service:
|
|
1472
|
+
declare const apiLinksResponseSchema: alepha1159.TObject<{
|
|
1473
|
+
prefix: alepha1159.TOptional<alepha1159.TString>;
|
|
1474
|
+
links: alepha1159.TArray<alepha1159.TObject<{
|
|
1475
|
+
name: alepha1159.TString;
|
|
1476
|
+
group: alepha1159.TOptional<alepha1159.TString>;
|
|
1477
|
+
path: alepha1159.TString;
|
|
1478
|
+
method: alepha1159.TOptional<alepha1159.TString>;
|
|
1479
|
+
requestBodyType: alepha1159.TOptional<alepha1159.TString>;
|
|
1480
|
+
service: alepha1159.TOptional<alepha1159.TString>;
|
|
1488
1481
|
}>>;
|
|
1489
1482
|
}>;
|
|
1490
1483
|
type ApiLinksResponse = Static<typeof apiLinksResponseSchema>;
|
|
1491
1484
|
type ApiLink = Static<typeof apiLinkSchema>;
|
|
1492
1485
|
//#endregion
|
|
1493
|
-
//#region ../../../alepha/src/server
|
|
1486
|
+
//#region ../../../alepha/src/server/links/providers/LinkProvider.d.ts
|
|
1494
1487
|
/**
|
|
1495
1488
|
* Browser, SSR friendly, service to handle links.
|
|
1496
1489
|
*/
|
|
@@ -1557,7 +1550,7 @@ interface VirtualAction<T$1 extends RequestConfigSchema> extends Pick<ActionPrim
|
|
|
1557
1550
|
can: () => boolean;
|
|
1558
1551
|
}
|
|
1559
1552
|
//#endregion
|
|
1560
|
-
//#region ../../../alepha/src/server
|
|
1553
|
+
//#region ../../../alepha/src/server/proxy/primitives/$proxy.d.ts
|
|
1561
1554
|
type ProxyPrimitiveOptions = {
|
|
1562
1555
|
/**
|
|
1563
1556
|
* Path pattern to match for proxying requests.
|
|
@@ -1675,18 +1668,18 @@ type ProxyPrimitiveOptions = {
|
|
|
1675
1668
|
rewrite?: (url: URL) => void;
|
|
1676
1669
|
};
|
|
1677
1670
|
//#endregion
|
|
1678
|
-
//#region ../../../alepha/src/server
|
|
1671
|
+
//#region ../../../alepha/src/server/proxy/providers/ServerProxyProvider.d.ts
|
|
1679
1672
|
declare class ServerProxyProvider {
|
|
1680
1673
|
protected readonly log: Logger;
|
|
1681
1674
|
protected readonly routerProvider: ServerRouterProvider;
|
|
1682
1675
|
protected readonly alepha: Alepha;
|
|
1683
|
-
protected readonly configure:
|
|
1676
|
+
protected readonly configure: alepha1159.HookPrimitive<"configure">;
|
|
1684
1677
|
createProxy(options: ProxyPrimitiveOptions): void;
|
|
1685
1678
|
createProxyHandler(target: string, options: Omit<ProxyPrimitiveOptions, "path">): ServerHandler;
|
|
1686
1679
|
private getRawRequestBody;
|
|
1687
1680
|
}
|
|
1688
1681
|
//#endregion
|
|
1689
|
-
//#region ../../../alepha/src/server
|
|
1682
|
+
//#region ../../../alepha/src/server/links/primitives/$remote.d.ts
|
|
1690
1683
|
interface RemotePrimitiveOptions {
|
|
1691
1684
|
/**
|
|
1692
1685
|
* The URL of the remote service.
|
|
@@ -1873,7 +1866,7 @@ interface RetryPrimitiveFn<T$1 extends (...args: any[]) => any> extends RetryPri
|
|
|
1873
1866
|
(...args: Parameters<T$1>): Promise<ReturnType<T$1>>;
|
|
1874
1867
|
}
|
|
1875
1868
|
//#endregion
|
|
1876
|
-
//#region ../../../alepha/src/server
|
|
1869
|
+
//#region ../../../alepha/src/server/links/providers/RemotePrimitiveProvider.d.ts
|
|
1877
1870
|
declare class RemotePrimitiveProvider {
|
|
1878
1871
|
protected readonly env: {
|
|
1879
1872
|
SERVER_API_PREFIX: string;
|
|
@@ -1884,8 +1877,8 @@ declare class RemotePrimitiveProvider {
|
|
|
1884
1877
|
protected readonly remotes: Array<ServerRemote>;
|
|
1885
1878
|
protected readonly log: Logger;
|
|
1886
1879
|
getRemotes(): ServerRemote[];
|
|
1887
|
-
readonly configure:
|
|
1888
|
-
readonly start:
|
|
1880
|
+
readonly configure: alepha1159.HookPrimitive<"configure">;
|
|
1881
|
+
readonly start: alepha1159.HookPrimitive<"start">;
|
|
1889
1882
|
registerRemote(value: RemotePrimitive): Promise<void>;
|
|
1890
1883
|
protected readonly fetchLinks: RetryPrimitiveFn<(opts: FetchLinksOptions) => Promise<ApiLinksResponse>>;
|
|
1891
1884
|
}
|
|
@@ -1943,7 +1936,7 @@ interface ServerRemote {
|
|
|
1943
1936
|
prefix: string;
|
|
1944
1937
|
}
|
|
1945
1938
|
//#endregion
|
|
1946
|
-
//#region ../../../alepha/src/server
|
|
1939
|
+
//#region ../../../alepha/src/server/links/providers/ServerLinksProvider.d.ts
|
|
1947
1940
|
declare class ServerLinksProvider {
|
|
1948
1941
|
protected readonly env: {
|
|
1949
1942
|
SERVER_API_PREFIX: string;
|
|
@@ -1953,22 +1946,22 @@ declare class ServerLinksProvider {
|
|
|
1953
1946
|
protected readonly remoteProvider: RemotePrimitiveProvider;
|
|
1954
1947
|
protected readonly serverTimingProvider: ServerTimingProvider;
|
|
1955
1948
|
get prefix(): string;
|
|
1956
|
-
readonly onRoute:
|
|
1949
|
+
readonly onRoute: alepha1159.HookPrimitive<"configure">;
|
|
1957
1950
|
/**
|
|
1958
1951
|
* First API - Get all API links for the user.
|
|
1959
1952
|
*
|
|
1960
1953
|
* This is based on the user's permissions.
|
|
1961
1954
|
*/
|
|
1962
1955
|
readonly links: RoutePrimitive<{
|
|
1963
|
-
response:
|
|
1964
|
-
prefix:
|
|
1965
|
-
links:
|
|
1966
|
-
name:
|
|
1967
|
-
group:
|
|
1968
|
-
path:
|
|
1969
|
-
method:
|
|
1970
|
-
requestBodyType:
|
|
1971
|
-
service:
|
|
1956
|
+
response: alepha1159.TObject<{
|
|
1957
|
+
prefix: alepha1159.TOptional<alepha1159.TString>;
|
|
1958
|
+
links: alepha1159.TArray<alepha1159.TObject<{
|
|
1959
|
+
name: alepha1159.TString;
|
|
1960
|
+
group: alepha1159.TOptional<alepha1159.TString>;
|
|
1961
|
+
path: alepha1159.TString;
|
|
1962
|
+
method: alepha1159.TOptional<alepha1159.TString>;
|
|
1963
|
+
requestBodyType: alepha1159.TOptional<alepha1159.TString>;
|
|
1964
|
+
service: alepha1159.TOptional<alepha1159.TString>;
|
|
1972
1965
|
}>>;
|
|
1973
1966
|
}>;
|
|
1974
1967
|
}>;
|
|
@@ -1979,10 +1972,10 @@ declare class ServerLinksProvider {
|
|
|
1979
1972
|
* I mean for 150+ links, you got 50ms of serialization time.
|
|
1980
1973
|
*/
|
|
1981
1974
|
readonly schema: RoutePrimitive<{
|
|
1982
|
-
params:
|
|
1983
|
-
name:
|
|
1975
|
+
params: alepha1159.TObject<{
|
|
1976
|
+
name: alepha1159.TString;
|
|
1984
1977
|
}>;
|
|
1985
|
-
response:
|
|
1978
|
+
response: alepha1159.TRecord<string, alepha1159.TAny>;
|
|
1986
1979
|
}>;
|
|
1987
1980
|
getSchemaByName(name: string, options?: GetApiLinksOptions): Promise<RequestConfigSchema>;
|
|
1988
1981
|
/**
|
|
@@ -1996,7 +1989,7 @@ interface GetApiLinksOptions {
|
|
|
1996
1989
|
authorization?: string;
|
|
1997
1990
|
}
|
|
1998
1991
|
//#endregion
|
|
1999
|
-
//#region ../../../alepha/src/server
|
|
1992
|
+
//#region ../../../alepha/src/server/links/index.d.ts
|
|
2000
1993
|
declare module "alepha" {
|
|
2001
1994
|
interface State {
|
|
2002
1995
|
/**
|
|
@@ -2020,7 +2013,7 @@ declare module "alepha" {
|
|
|
2020
2013
|
* @module alepha.server.links
|
|
2021
2014
|
*/
|
|
2022
2015
|
//#endregion
|
|
2023
|
-
//#region ../../../alepha/src/server
|
|
2016
|
+
//#region ../../../alepha/src/server/cache/providers/ServerCacheProvider.d.ts
|
|
2024
2017
|
declare module "alepha/server" {
|
|
2025
2018
|
interface ServerRoute {
|
|
2026
2019
|
/**
|
|
@@ -2135,11 +2128,11 @@ declare class Redirection extends Error {
|
|
|
2135
2128
|
}
|
|
2136
2129
|
//#endregion
|
|
2137
2130
|
//#region ../../../react/src/core/providers/ReactPageProvider.d.ts
|
|
2138
|
-
declare const envSchema$
|
|
2139
|
-
REACT_STRICT_MODE:
|
|
2131
|
+
declare const envSchema$6: alepha1159.TObject<{
|
|
2132
|
+
REACT_STRICT_MODE: alepha1159.TBoolean;
|
|
2140
2133
|
}>;
|
|
2141
2134
|
declare module "alepha" {
|
|
2142
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
2135
|
+
interface Env extends Partial<Static<typeof envSchema$6>> {}
|
|
2143
2136
|
}
|
|
2144
2137
|
interface PageRouteEntry extends Omit<PagePrimitiveOptions, "children" | "parent"> {
|
|
2145
2138
|
children?: PageRouteEntry[];
|
|
@@ -2230,10 +2223,10 @@ interface PagePrimitiveOptions<TConfig extends PageConfigSchema = PageConfigSche
|
|
|
2230
2223
|
* Load data before rendering the page.
|
|
2231
2224
|
*
|
|
2232
2225
|
* This function receives
|
|
2233
|
-
* - the request context
|
|
2226
|
+
* - the request context (params, query, etc.)
|
|
2234
2227
|
* - the parent props (if page has a parent)
|
|
2235
2228
|
*
|
|
2236
|
-
* In SSR, the returned data will be serialized and sent to the client, then reused during the client-side hydration.
|
|
2229
|
+
* > In SSR, the returned data will be serialized and sent to the client, then reused during the client-side hydration.
|
|
2237
2230
|
*
|
|
2238
2231
|
* Resolve can be stopped by throwing an error, which will be handled by the `errorHandler` function.
|
|
2239
2232
|
* It's common to throw a `NotFoundError` to display a 404 page.
|
|
@@ -2241,6 +2234,12 @@ interface PagePrimitiveOptions<TConfig extends PageConfigSchema = PageConfigSche
|
|
|
2241
2234
|
* RedirectError can be thrown to redirect the user to another page.
|
|
2242
2235
|
*/
|
|
2243
2236
|
resolve?: (context: PageResolve<TConfig, TPropsParent>) => Async<TProps>;
|
|
2237
|
+
/**
|
|
2238
|
+
* Default props to pass to the component when rendering the page.
|
|
2239
|
+
*
|
|
2240
|
+
* Resolved props from the `resolve` function will override these default props.
|
|
2241
|
+
*/
|
|
2242
|
+
props?: () => Partial<TProps>;
|
|
2244
2243
|
/**
|
|
2245
2244
|
* The component to render when the page is loaded.
|
|
2246
2245
|
*
|
|
@@ -2266,6 +2265,12 @@ interface PagePrimitiveOptions<TConfig extends PageConfigSchema = PageConfigSche
|
|
|
2266
2265
|
* Define a parent page for nested routing.
|
|
2267
2266
|
*/
|
|
2268
2267
|
parent?: PagePrimitive<PageConfigSchema, TPropsParent, any>;
|
|
2268
|
+
/**
|
|
2269
|
+
* Function to determine if the page can be accessed.
|
|
2270
|
+
*
|
|
2271
|
+
* If it returns false, the page will not be accessible and a 403 Forbidden error will be returned.
|
|
2272
|
+
* This function can be used to implement permission-based access control.
|
|
2273
|
+
*/
|
|
2269
2274
|
can?: () => boolean;
|
|
2270
2275
|
/**
|
|
2271
2276
|
* Catch any error from the `resolve` function or during `rendering`.
|
|
@@ -2434,17 +2439,17 @@ type CssAnimation = {
|
|
|
2434
2439
|
};
|
|
2435
2440
|
//#endregion
|
|
2436
2441
|
//#region ../../../react/src/core/providers/ReactBrowserProvider.d.ts
|
|
2437
|
-
declare const envSchema$
|
|
2438
|
-
REACT_ROOT_ID:
|
|
2442
|
+
declare const envSchema$5: alepha1159.TObject<{
|
|
2443
|
+
REACT_ROOT_ID: alepha1159.TString;
|
|
2439
2444
|
}>;
|
|
2440
2445
|
declare module "alepha" {
|
|
2441
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
2446
|
+
interface Env extends Partial<Static<typeof envSchema$5>> {}
|
|
2442
2447
|
}
|
|
2443
2448
|
/**
|
|
2444
2449
|
* React browser renderer configuration atom
|
|
2445
2450
|
*/
|
|
2446
|
-
declare const reactBrowserOptions:
|
|
2447
|
-
scrollRestoration:
|
|
2451
|
+
declare const reactBrowserOptions: alepha1159.Atom<alepha1159.TObject<{
|
|
2452
|
+
scrollRestoration: alepha1159.TUnsafe<"top" | "manual">;
|
|
2448
2453
|
}>, "alepha.react.browser.options">;
|
|
2449
2454
|
type ReactBrowserRendererOptions = Static<typeof reactBrowserOptions.schema>;
|
|
2450
2455
|
declare module "alepha" {
|
|
@@ -2916,25 +2921,25 @@ declare class FileDetector {
|
|
|
2916
2921
|
}
|
|
2917
2922
|
//#endregion
|
|
2918
2923
|
//#region ../../../react/src/core/providers/ReactServerProvider.d.ts
|
|
2919
|
-
declare const envSchema$
|
|
2920
|
-
REACT_SSR_ENABLED:
|
|
2921
|
-
REACT_ROOT_ID:
|
|
2922
|
-
REACT_SERVER_TEMPLATE: alepha1178.TOptional<alepha1178.TString>;
|
|
2924
|
+
declare const envSchema$4: alepha1159.TObject<{
|
|
2925
|
+
REACT_SSR_ENABLED: alepha1159.TOptional<alepha1159.TBoolean>;
|
|
2926
|
+
REACT_ROOT_ID: alepha1159.TString;
|
|
2923
2927
|
}>;
|
|
2924
2928
|
declare module "alepha" {
|
|
2925
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
2929
|
+
interface Env extends Partial<Static<typeof envSchema$4>> {}
|
|
2926
2930
|
interface State {
|
|
2927
2931
|
"alepha.react.server.ssr"?: boolean;
|
|
2932
|
+
"alepha.react.server.template"?: string;
|
|
2928
2933
|
}
|
|
2929
2934
|
}
|
|
2930
2935
|
/**
|
|
2931
2936
|
* React server provider configuration atom
|
|
2932
2937
|
*/
|
|
2933
|
-
declare const reactServerOptions:
|
|
2934
|
-
publicDir:
|
|
2935
|
-
staticServer:
|
|
2936
|
-
disabled:
|
|
2937
|
-
path:
|
|
2938
|
+
declare const reactServerOptions: alepha1159.Atom<alepha1159.TObject<{
|
|
2939
|
+
publicDir: alepha1159.TString;
|
|
2940
|
+
staticServer: alepha1159.TObject<{
|
|
2941
|
+
disabled: alepha1159.TBoolean;
|
|
2942
|
+
path: alepha1159.TString;
|
|
2938
2943
|
}>;
|
|
2939
2944
|
}>, "alepha.react.server.options">;
|
|
2940
2945
|
type ReactServerProviderOptions = Static<typeof reactServerOptions.schema>;
|
|
@@ -3047,35 +3052,35 @@ declare module "alepha" {
|
|
|
3047
3052
|
* @module alepha.react
|
|
3048
3053
|
*/
|
|
3049
3054
|
//#endregion
|
|
3050
|
-
//#region ../../../alepha/src/server
|
|
3051
|
-
declare const authenticationProviderSchema:
|
|
3052
|
-
name:
|
|
3053
|
-
type:
|
|
3055
|
+
//#region ../../../alepha/src/server/auth/schemas/authenticationProviderSchema.d.ts
|
|
3056
|
+
declare const authenticationProviderSchema: alepha1159.TObject<{
|
|
3057
|
+
name: alepha1159.TString;
|
|
3058
|
+
type: alepha1159.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
|
|
3054
3059
|
}>;
|
|
3055
3060
|
type AuthenticationProvider = Static<typeof authenticationProviderSchema>;
|
|
3056
3061
|
//#endregion
|
|
3057
|
-
//#region ../../../alepha/src/server
|
|
3058
|
-
declare const tokensSchema:
|
|
3059
|
-
provider:
|
|
3060
|
-
access_token:
|
|
3061
|
-
issued_at:
|
|
3062
|
-
expires_in:
|
|
3063
|
-
refresh_token:
|
|
3064
|
-
refresh_token_expires_in:
|
|
3065
|
-
refresh_expires_in:
|
|
3066
|
-
id_token:
|
|
3067
|
-
scope:
|
|
3062
|
+
//#region ../../../alepha/src/server/auth/schemas/tokensSchema.d.ts
|
|
3063
|
+
declare const tokensSchema: alepha1159.TObject<{
|
|
3064
|
+
provider: alepha1159.TString;
|
|
3065
|
+
access_token: alepha1159.TString;
|
|
3066
|
+
issued_at: alepha1159.TNumber;
|
|
3067
|
+
expires_in: alepha1159.TOptional<alepha1159.TNumber>;
|
|
3068
|
+
refresh_token: alepha1159.TOptional<alepha1159.TString>;
|
|
3069
|
+
refresh_token_expires_in: alepha1159.TOptional<alepha1159.TNumber>;
|
|
3070
|
+
refresh_expires_in: alepha1159.TOptional<alepha1159.TNumber>;
|
|
3071
|
+
id_token: alepha1159.TOptional<alepha1159.TString>;
|
|
3072
|
+
scope: alepha1159.TOptional<alepha1159.TString>;
|
|
3068
3073
|
}>;
|
|
3069
3074
|
type Tokens = Static<typeof tokensSchema>;
|
|
3070
3075
|
//#endregion
|
|
3071
|
-
//#region ../../../alepha/src/server
|
|
3076
|
+
//#region ../../../alepha/src/server/cookies/services/CookieParser.d.ts
|
|
3072
3077
|
declare class CookieParser {
|
|
3073
3078
|
parseRequestCookies(header: string): Record<string, string>;
|
|
3074
3079
|
serializeResponseCookies(cookies: Record<string, Cookie | null>, isHttps: boolean): string[];
|
|
3075
3080
|
cookieToString(name: string, cookie: Cookie, isHttps?: boolean): string;
|
|
3076
3081
|
}
|
|
3077
3082
|
//#endregion
|
|
3078
|
-
//#region ../../../alepha/src/server
|
|
3083
|
+
//#region ../../../alepha/src/server/cookies/providers/ServerCookiesProvider.d.ts
|
|
3079
3084
|
declare class ServerCookiesProvider {
|
|
3080
3085
|
protected readonly alepha: Alepha;
|
|
3081
3086
|
protected readonly log: Logger;
|
|
@@ -3088,9 +3093,9 @@ declare class ServerCookiesProvider {
|
|
|
3088
3093
|
protected readonly IV_LENGTH = 16;
|
|
3089
3094
|
protected readonly AUTH_TAG_LENGTH = 16;
|
|
3090
3095
|
protected readonly SIGNATURE_LENGTH = 32;
|
|
3091
|
-
readonly onRequest:
|
|
3092
|
-
readonly onAction:
|
|
3093
|
-
readonly onSend:
|
|
3096
|
+
readonly onRequest: alepha1159.HookPrimitive<"server:onRequest">;
|
|
3097
|
+
readonly onAction: alepha1159.HookPrimitive<"action:onRequest">;
|
|
3098
|
+
readonly onSend: alepha1159.HookPrimitive<"server:onSend">;
|
|
3094
3099
|
protected getCookiesFromContext(cookies?: Cookies): Cookies;
|
|
3095
3100
|
getCookie<T$1 extends TSchema>(name: string, options: CookiePrimitiveOptions<T$1>, contextCookies?: Cookies): Static<T$1> | undefined;
|
|
3096
3101
|
setCookie<T$1 extends TSchema>(name: string, options: CookiePrimitiveOptions<T$1>, data: Static<T$1>, contextCookies?: Cookies): void;
|
|
@@ -3101,7 +3106,7 @@ declare class ServerCookiesProvider {
|
|
|
3101
3106
|
protected sign(data: string): string;
|
|
3102
3107
|
}
|
|
3103
3108
|
//#endregion
|
|
3104
|
-
//#region ../../../alepha/src/server
|
|
3109
|
+
//#region ../../../alepha/src/server/cookies/primitives/$cookie.d.ts
|
|
3105
3110
|
interface CookiePrimitiveOptions<T$1 extends TSchema> {
|
|
3106
3111
|
/** The schema for the cookie's value, used for validation and type safety. */
|
|
3107
3112
|
schema: T$1;
|
|
@@ -3154,7 +3159,7 @@ interface Cookie {
|
|
|
3154
3159
|
domain?: string;
|
|
3155
3160
|
}
|
|
3156
3161
|
//#endregion
|
|
3157
|
-
//#region ../../../alepha/src/server
|
|
3162
|
+
//#region ../../../alepha/src/server/cookies/index.d.ts
|
|
3158
3163
|
declare module "alepha/server" {
|
|
3159
3164
|
interface ServerRequest {
|
|
3160
3165
|
cookies: Cookies;
|
|
@@ -3171,41 +3176,42 @@ declare module "alepha/server" {
|
|
|
3171
3176
|
* @module alepha.server.cookies
|
|
3172
3177
|
*/
|
|
3173
3178
|
//#endregion
|
|
3174
|
-
//#region ../../../alepha/src/server
|
|
3179
|
+
//#region ../../../alepha/src/server/auth/providers/ServerAuthProvider.d.ts
|
|
3175
3180
|
declare class ServerAuthProvider {
|
|
3176
3181
|
protected readonly log: Logger;
|
|
3177
3182
|
protected readonly alepha: Alepha;
|
|
3178
3183
|
protected readonly serverCookiesProvider: ServerCookiesProvider;
|
|
3179
3184
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
3180
3185
|
protected readonly serverLinksProvider: ServerLinksProvider;
|
|
3181
|
-
protected readonly authorizationCode: AbstractCookiePrimitive<
|
|
3182
|
-
provider:
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3186
|
+
protected readonly authorizationCode: AbstractCookiePrimitive<alepha1159.TObject<{
|
|
3187
|
+
provider: alepha1159.TString;
|
|
3188
|
+
realm: alepha1159.TOptional<alepha1159.TString>;
|
|
3189
|
+
codeVerifier: alepha1159.TOptional<alepha1159.TString>;
|
|
3190
|
+
redirectUri: alepha1159.TOptional<alepha1159.TString>;
|
|
3191
|
+
state: alepha1159.TOptional<alepha1159.TString>;
|
|
3192
|
+
nonce: alepha1159.TOptional<alepha1159.TString>;
|
|
3187
3193
|
}>>;
|
|
3188
|
-
readonly tokens: AbstractCookiePrimitive<
|
|
3189
|
-
provider:
|
|
3190
|
-
access_token:
|
|
3191
|
-
issued_at:
|
|
3192
|
-
expires_in:
|
|
3193
|
-
refresh_token:
|
|
3194
|
-
refresh_token_expires_in:
|
|
3195
|
-
refresh_expires_in:
|
|
3196
|
-
id_token:
|
|
3197
|
-
scope:
|
|
3194
|
+
readonly tokens: AbstractCookiePrimitive<alepha1159.TObject<{
|
|
3195
|
+
provider: alepha1159.TString;
|
|
3196
|
+
access_token: alepha1159.TString;
|
|
3197
|
+
issued_at: alepha1159.TNumber;
|
|
3198
|
+
expires_in: alepha1159.TOptional<alepha1159.TNumber>;
|
|
3199
|
+
refresh_token: alepha1159.TOptional<alepha1159.TString>;
|
|
3200
|
+
refresh_token_expires_in: alepha1159.TOptional<alepha1159.TNumber>;
|
|
3201
|
+
refresh_expires_in: alepha1159.TOptional<alepha1159.TNumber>;
|
|
3202
|
+
id_token: alepha1159.TOptional<alepha1159.TString>;
|
|
3203
|
+
scope: alepha1159.TOptional<alepha1159.TString>;
|
|
3198
3204
|
}>>;
|
|
3199
3205
|
get identities(): Array<AuthPrimitive>;
|
|
3200
3206
|
getAuthenticationProviders(filters?: {
|
|
3201
3207
|
realmName?: string;
|
|
3202
3208
|
}): AuthenticationProvider[];
|
|
3203
|
-
protected readonly configure:
|
|
3209
|
+
protected readonly configure: alepha1159.HookPrimitive<"configure">;
|
|
3204
3210
|
protected getAccessTokens(tokens: Tokens): string | undefined;
|
|
3205
3211
|
/**
|
|
3206
3212
|
* Fill request headers with access token from cookies or fallback to provider's fallback function.
|
|
3207
3213
|
*/
|
|
3208
|
-
protected readonly onRequest:
|
|
3214
|
+
protected readonly onRequest: alepha1159.HookPrimitive<"server:onRequest">;
|
|
3209
3215
|
/**
|
|
3210
3216
|
* Convert cookies to tokens.
|
|
3211
3217
|
* If the tokens are expired, try to refresh them using the refresh token.
|
|
@@ -3216,26 +3222,26 @@ declare class ServerAuthProvider {
|
|
|
3216
3222
|
* Get user information.
|
|
3217
3223
|
*/
|
|
3218
3224
|
readonly userinfo: RoutePrimitive<{
|
|
3219
|
-
response:
|
|
3220
|
-
user:
|
|
3221
|
-
id:
|
|
3222
|
-
name:
|
|
3223
|
-
email:
|
|
3224
|
-
username:
|
|
3225
|
-
picture:
|
|
3226
|
-
sessionId:
|
|
3227
|
-
organizations:
|
|
3228
|
-
roles:
|
|
3225
|
+
response: alepha1159.TObject<{
|
|
3226
|
+
user: alepha1159.TOptional<alepha1159.TObject<{
|
|
3227
|
+
id: alepha1159.TString;
|
|
3228
|
+
name: alepha1159.TOptional<alepha1159.TString>;
|
|
3229
|
+
email: alepha1159.TOptional<alepha1159.TString>;
|
|
3230
|
+
username: alepha1159.TOptional<alepha1159.TString>;
|
|
3231
|
+
picture: alepha1159.TOptional<alepha1159.TString>;
|
|
3232
|
+
sessionId: alepha1159.TOptional<alepha1159.TString>;
|
|
3233
|
+
organizations: alepha1159.TOptional<alepha1159.TArray<alepha1159.TString>>;
|
|
3234
|
+
roles: alepha1159.TOptional<alepha1159.TArray<alepha1159.TString>>;
|
|
3229
3235
|
}>>;
|
|
3230
|
-
api:
|
|
3231
|
-
prefix:
|
|
3232
|
-
links:
|
|
3233
|
-
name:
|
|
3234
|
-
group:
|
|
3235
|
-
path:
|
|
3236
|
-
method:
|
|
3237
|
-
requestBodyType:
|
|
3238
|
-
service:
|
|
3236
|
+
api: alepha1159.TObject<{
|
|
3237
|
+
prefix: alepha1159.TOptional<alepha1159.TString>;
|
|
3238
|
+
links: alepha1159.TArray<alepha1159.TObject<{
|
|
3239
|
+
name: alepha1159.TString;
|
|
3240
|
+
group: alepha1159.TOptional<alepha1159.TString>;
|
|
3241
|
+
path: alepha1159.TString;
|
|
3242
|
+
method: alepha1159.TOptional<alepha1159.TString>;
|
|
3243
|
+
requestBodyType: alepha1159.TOptional<alepha1159.TString>;
|
|
3244
|
+
service: alepha1159.TOptional<alepha1159.TString>;
|
|
3239
3245
|
}>>;
|
|
3240
3246
|
}>;
|
|
3241
3247
|
}>;
|
|
@@ -3244,65 +3250,66 @@ declare class ServerAuthProvider {
|
|
|
3244
3250
|
* Refresh a token for internal providers.
|
|
3245
3251
|
*/
|
|
3246
3252
|
readonly refresh: RoutePrimitive<{
|
|
3247
|
-
query:
|
|
3248
|
-
provider:
|
|
3253
|
+
query: alepha1159.TObject<{
|
|
3254
|
+
provider: alepha1159.TString;
|
|
3249
3255
|
}>;
|
|
3250
|
-
body:
|
|
3251
|
-
refresh_token:
|
|
3252
|
-
access_token:
|
|
3256
|
+
body: alepha1159.TObject<{
|
|
3257
|
+
refresh_token: alepha1159.TString;
|
|
3258
|
+
access_token: alepha1159.TOptional<alepha1159.TString>;
|
|
3253
3259
|
}>;
|
|
3254
|
-
response:
|
|
3255
|
-
provider:
|
|
3256
|
-
access_token:
|
|
3257
|
-
issued_at:
|
|
3258
|
-
expires_in:
|
|
3259
|
-
refresh_token:
|
|
3260
|
-
refresh_token_expires_in:
|
|
3261
|
-
refresh_expires_in:
|
|
3262
|
-
id_token:
|
|
3263
|
-
scope:
|
|
3260
|
+
response: alepha1159.TObject<{
|
|
3261
|
+
provider: alepha1159.TString;
|
|
3262
|
+
access_token: alepha1159.TString;
|
|
3263
|
+
issued_at: alepha1159.TNumber;
|
|
3264
|
+
expires_in: alepha1159.TOptional<alepha1159.TNumber>;
|
|
3265
|
+
refresh_token: alepha1159.TOptional<alepha1159.TString>;
|
|
3266
|
+
refresh_token_expires_in: alepha1159.TOptional<alepha1159.TNumber>;
|
|
3267
|
+
refresh_expires_in: alepha1159.TOptional<alepha1159.TNumber>;
|
|
3268
|
+
id_token: alepha1159.TOptional<alepha1159.TString>;
|
|
3269
|
+
scope: alepha1159.TOptional<alepha1159.TString>;
|
|
3264
3270
|
}>;
|
|
3265
3271
|
}>;
|
|
3266
3272
|
/**
|
|
3267
3273
|
* Login for local password-based authentication.
|
|
3268
3274
|
*/
|
|
3269
3275
|
readonly token: RoutePrimitive<{
|
|
3270
|
-
query:
|
|
3271
|
-
provider:
|
|
3276
|
+
query: alepha1159.TObject<{
|
|
3277
|
+
provider: alepha1159.TString;
|
|
3278
|
+
realm: alepha1159.TOptional<alepha1159.TString>;
|
|
3272
3279
|
}>;
|
|
3273
|
-
body:
|
|
3274
|
-
username:
|
|
3275
|
-
password:
|
|
3280
|
+
body: alepha1159.TObject<{
|
|
3281
|
+
username: alepha1159.TString;
|
|
3282
|
+
password: alepha1159.TString;
|
|
3276
3283
|
}>;
|
|
3277
|
-
response:
|
|
3278
|
-
provider:
|
|
3279
|
-
access_token:
|
|
3280
|
-
issued_at:
|
|
3281
|
-
expires_in:
|
|
3282
|
-
refresh_token:
|
|
3283
|
-
refresh_token_expires_in:
|
|
3284
|
-
refresh_expires_in:
|
|
3285
|
-
id_token:
|
|
3286
|
-
scope:
|
|
3287
|
-
user:
|
|
3288
|
-
id:
|
|
3289
|
-
name:
|
|
3290
|
-
email:
|
|
3291
|
-
username:
|
|
3292
|
-
picture:
|
|
3293
|
-
sessionId:
|
|
3294
|
-
organizations:
|
|
3295
|
-
roles:
|
|
3284
|
+
response: alepha1159.TObject<{
|
|
3285
|
+
provider: alepha1159.TString;
|
|
3286
|
+
access_token: alepha1159.TString;
|
|
3287
|
+
issued_at: alepha1159.TNumber;
|
|
3288
|
+
expires_in: alepha1159.TOptional<alepha1159.TNumber>;
|
|
3289
|
+
refresh_token: alepha1159.TOptional<alepha1159.TString>;
|
|
3290
|
+
refresh_token_expires_in: alepha1159.TOptional<alepha1159.TNumber>;
|
|
3291
|
+
refresh_expires_in: alepha1159.TOptional<alepha1159.TNumber>;
|
|
3292
|
+
id_token: alepha1159.TOptional<alepha1159.TString>;
|
|
3293
|
+
scope: alepha1159.TOptional<alepha1159.TString>;
|
|
3294
|
+
user: alepha1159.TObject<{
|
|
3295
|
+
id: alepha1159.TString;
|
|
3296
|
+
name: alepha1159.TOptional<alepha1159.TString>;
|
|
3297
|
+
email: alepha1159.TOptional<alepha1159.TString>;
|
|
3298
|
+
username: alepha1159.TOptional<alepha1159.TString>;
|
|
3299
|
+
picture: alepha1159.TOptional<alepha1159.TString>;
|
|
3300
|
+
sessionId: alepha1159.TOptional<alepha1159.TString>;
|
|
3301
|
+
organizations: alepha1159.TOptional<alepha1159.TArray<alepha1159.TString>>;
|
|
3302
|
+
roles: alepha1159.TOptional<alepha1159.TArray<alepha1159.TString>>;
|
|
3296
3303
|
}>;
|
|
3297
|
-
api:
|
|
3298
|
-
prefix:
|
|
3299
|
-
links:
|
|
3300
|
-
name:
|
|
3301
|
-
group:
|
|
3302
|
-
path:
|
|
3303
|
-
method:
|
|
3304
|
-
requestBodyType:
|
|
3305
|
-
service:
|
|
3304
|
+
api: alepha1159.TObject<{
|
|
3305
|
+
prefix: alepha1159.TOptional<alepha1159.TString>;
|
|
3306
|
+
links: alepha1159.TArray<alepha1159.TObject<{
|
|
3307
|
+
name: alepha1159.TString;
|
|
3308
|
+
group: alepha1159.TOptional<alepha1159.TString>;
|
|
3309
|
+
path: alepha1159.TString;
|
|
3310
|
+
method: alepha1159.TOptional<alepha1159.TString>;
|
|
3311
|
+
requestBodyType: alepha1159.TOptional<alepha1159.TString>;
|
|
3312
|
+
service: alepha1159.TOptional<alepha1159.TString>;
|
|
3306
3313
|
}>>;
|
|
3307
3314
|
}>;
|
|
3308
3315
|
}>;
|
|
@@ -3311,9 +3318,10 @@ declare class ServerAuthProvider {
|
|
|
3311
3318
|
* Oauth2/OIDC login route.
|
|
3312
3319
|
*/
|
|
3313
3320
|
readonly login: RoutePrimitive<{
|
|
3314
|
-
query:
|
|
3315
|
-
provider:
|
|
3316
|
-
|
|
3321
|
+
query: alepha1159.TObject<{
|
|
3322
|
+
provider: alepha1159.TString;
|
|
3323
|
+
realm: alepha1159.TOptional<alepha1159.TString>;
|
|
3324
|
+
redirect_uri: alepha1159.TOptional<alepha1159.TString>;
|
|
3317
3325
|
}>;
|
|
3318
3326
|
}>;
|
|
3319
3327
|
/**
|
|
@@ -3325,13 +3333,20 @@ declare class ServerAuthProvider {
|
|
|
3325
3333
|
* Logout route for OAuth2/OIDC providers.
|
|
3326
3334
|
*/
|
|
3327
3335
|
readonly logout: RoutePrimitive<{
|
|
3328
|
-
query:
|
|
3329
|
-
post_logout_redirect_uri:
|
|
3336
|
+
query: alepha1159.TObject<{
|
|
3337
|
+
post_logout_redirect_uri: alepha1159.TOptional<alepha1159.TString>;
|
|
3330
3338
|
}>;
|
|
3331
3339
|
}>;
|
|
3340
|
+
/**
|
|
3341
|
+
* Find an auth provider by name and optionally by realm.
|
|
3342
|
+
* When realm is specified, it filters providers by both name and realm.
|
|
3343
|
+
* This enables multi-realm setups where multiple providers share the same name (e.g., "credentials").
|
|
3344
|
+
*/
|
|
3332
3345
|
protected provider(opts: string | {
|
|
3333
3346
|
provider: string;
|
|
3347
|
+
realm?: string;
|
|
3334
3348
|
}): AuthPrimitive;
|
|
3349
|
+
protected getTokens(cookies?: Cookies): Tokens | undefined;
|
|
3335
3350
|
protected setTokens(tokens: Tokens, cookies?: Cookies): void;
|
|
3336
3351
|
}
|
|
3337
3352
|
interface OAuth2Profile {
|
|
@@ -3365,7 +3380,7 @@ interface OAuth2Profile {
|
|
|
3365
3380
|
[key: string]: unknown;
|
|
3366
3381
|
}
|
|
3367
3382
|
//#endregion
|
|
3368
|
-
//#region ../../../alepha/src/server
|
|
3383
|
+
//#region ../../../alepha/src/server/auth/primitives/$auth.d.ts
|
|
3369
3384
|
type AuthPrimitiveOptions = {
|
|
3370
3385
|
/**
|
|
3371
3386
|
* Name of the identity provider.
|
|
@@ -3525,6 +3540,7 @@ declare class AuthPrimitive extends Primitive<AuthPrimitiveOptions> {
|
|
|
3525
3540
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
3526
3541
|
oauth?: Configuration;
|
|
3527
3542
|
get name(): string;
|
|
3543
|
+
get realm(): RealmPrimitive | undefined;
|
|
3528
3544
|
get jwks_uri(): string;
|
|
3529
3545
|
get scope(): string | undefined;
|
|
3530
3546
|
get redirect_uri(): string | undefined;
|
|
@@ -3545,7 +3561,7 @@ type AccessToken = string | {
|
|
|
3545
3561
|
token: () => Async<string>;
|
|
3546
3562
|
};
|
|
3547
3563
|
//#endregion
|
|
3548
|
-
//#region ../../../alepha/src/server
|
|
3564
|
+
//#region ../../../alepha/src/server/auth/index.d.ts
|
|
3549
3565
|
declare module "alepha" {
|
|
3550
3566
|
interface State {
|
|
3551
3567
|
/**
|
|
@@ -3579,8 +3595,8 @@ declare class ReactAuth {
|
|
|
3579
3595
|
protected readonly alepha: Alepha;
|
|
3580
3596
|
protected readonly httpClient: HttpClient;
|
|
3581
3597
|
protected readonly linkProvider: LinkProvider;
|
|
3582
|
-
protected readonly onBeginTransition:
|
|
3583
|
-
protected readonly onFetchRequest:
|
|
3598
|
+
protected readonly onBeginTransition: alepha1159.HookPrimitive<"react:transition:begin">;
|
|
3599
|
+
protected readonly onFetchRequest: alepha1159.HookPrimitive<"client:onRequest">;
|
|
3584
3600
|
/**
|
|
3585
3601
|
* Get the current authenticated user.
|
|
3586
3602
|
*
|
|
@@ -3603,6 +3619,7 @@ declare class ReactAuth {
|
|
|
3603
3619
|
username?: string;
|
|
3604
3620
|
password?: string;
|
|
3605
3621
|
redirect?: string;
|
|
3622
|
+
realm?: string;
|
|
3606
3623
|
[extra: string]: any;
|
|
3607
3624
|
}): Promise<Tokens>;
|
|
3608
3625
|
logout(): void;
|
|
@@ -3621,26 +3638,29 @@ declare module "@alepha/react" {
|
|
|
3621
3638
|
* @module alepha.react.auth
|
|
3622
3639
|
*/
|
|
3623
3640
|
//#endregion
|
|
3624
|
-
//#region ../../../alepha/src/api
|
|
3625
|
-
declare const realmAuthSettingsAtom:
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3641
|
+
//#region ../../../alepha/src/api/users/atoms/realmAuthSettingsAtom.d.ts
|
|
3642
|
+
declare const realmAuthSettingsAtom: alepha1159.Atom<alepha1159.TObject<{
|
|
3643
|
+
displayName: alepha1159.TOptional<alepha1159.TString>;
|
|
3644
|
+
description: alepha1159.TOptional<alepha1159.TString>;
|
|
3645
|
+
logoUrl: alepha1159.TOptional<alepha1159.TString>;
|
|
3646
|
+
registrationAllowed: alepha1159.TBoolean;
|
|
3647
|
+
emailEnabled: alepha1159.TBoolean;
|
|
3648
|
+
emailRequired: alepha1159.TBoolean;
|
|
3649
|
+
usernameEnabled: alepha1159.TBoolean;
|
|
3650
|
+
usernameRequired: alepha1159.TBoolean;
|
|
3651
|
+
phoneEnabled: alepha1159.TBoolean;
|
|
3652
|
+
phoneRequired: alepha1159.TBoolean;
|
|
3653
|
+
verifyEmailRequired: alepha1159.TBoolean;
|
|
3654
|
+
verifyPhoneRequired: alepha1159.TBoolean;
|
|
3655
|
+
firstNameLastNameEnabled: alepha1159.TBoolean;
|
|
3656
|
+
firstNameLastNameRequired: alepha1159.TBoolean;
|
|
3657
|
+
resetPasswordAllowed: alepha1159.TBoolean;
|
|
3658
|
+
passwordPolicy: alepha1159.TObject<{
|
|
3659
|
+
minLength: alepha1159.TInteger;
|
|
3660
|
+
requireUppercase: alepha1159.TBoolean;
|
|
3661
|
+
requireLowercase: alepha1159.TBoolean;
|
|
3662
|
+
requireNumbers: alepha1159.TBoolean;
|
|
3663
|
+
requireSpecialCharacters: alepha1159.TBoolean;
|
|
3644
3664
|
}>;
|
|
3645
3665
|
}>, "alepha.api.users.realmAuthSettings">;
|
|
3646
3666
|
type RealmAuthSettings = Static<typeof realmAuthSettingsAtom.schema>;
|
|
@@ -4536,11 +4556,11 @@ declare class DrizzleKitProvider {
|
|
|
4536
4556
|
*/
|
|
4537
4557
|
importDrizzleKit(): typeof DrizzleKit;
|
|
4538
4558
|
}
|
|
4539
|
-
declare const devMigrationsSchema:
|
|
4540
|
-
id:
|
|
4541
|
-
name:
|
|
4542
|
-
snapshot:
|
|
4543
|
-
created_at:
|
|
4559
|
+
declare const devMigrationsSchema: alepha1159.TObject<{
|
|
4560
|
+
id: alepha1159.TNumber;
|
|
4561
|
+
name: alepha1159.TString;
|
|
4562
|
+
snapshot: alepha1159.TString;
|
|
4563
|
+
created_at: alepha1159.TString;
|
|
4544
4564
|
}>;
|
|
4545
4565
|
type DevMigrations = Static<typeof devMigrationsSchema>;
|
|
4546
4566
|
//#endregion
|
|
@@ -4737,7 +4757,7 @@ declare class QueryManager {
|
|
|
4737
4757
|
createPagination<T$1>(entities: T$1[], limit?: number, offset?: number, sort?: Array<{
|
|
4738
4758
|
column: string;
|
|
4739
4759
|
direction: "asc" | "desc";
|
|
4740
|
-
}>):
|
|
4760
|
+
}>): alepha1159.Page<T$1>;
|
|
4741
4761
|
}
|
|
4742
4762
|
interface PgJoin {
|
|
4743
4763
|
table: string;
|
|
@@ -4908,11 +4928,15 @@ declare abstract class Repository<T$1 extends TObject> {
|
|
|
4908
4928
|
/**
|
|
4909
4929
|
* Create many entities.
|
|
4910
4930
|
*
|
|
4931
|
+
* Inserts are batched in chunks of 1000 to avoid hitting database limits.
|
|
4932
|
+
*
|
|
4911
4933
|
* @param values The entities to create.
|
|
4912
4934
|
* @param opts The statement options.
|
|
4913
4935
|
* @returns The created entities.
|
|
4914
4936
|
*/
|
|
4915
|
-
createMany(values: Array<Static<TObjectInsert<T$1>>>, opts?: StatementOptions
|
|
4937
|
+
createMany(values: Array<Static<TObjectInsert<T$1>>>, opts?: StatementOptions & {
|
|
4938
|
+
batchSize?: number;
|
|
4939
|
+
}): Promise<Static<T$1>[]>;
|
|
4916
4940
|
/**
|
|
4917
4941
|
* Find an entity and update it.
|
|
4918
4942
|
*/
|
|
@@ -5041,19 +5065,19 @@ interface StatementOptions {
|
|
|
5041
5065
|
now?: DateTime | string;
|
|
5042
5066
|
}
|
|
5043
5067
|
//#endregion
|
|
5044
|
-
//#region ../../../alepha/src/lock/primitives/$lock.d.ts
|
|
5045
|
-
declare const envSchema$
|
|
5046
|
-
LOCK_PREFIX_KEY:
|
|
5068
|
+
//#region ../../../alepha/src/lock/core/primitives/$lock.d.ts
|
|
5069
|
+
declare const envSchema$3: alepha1159.TObject<{
|
|
5070
|
+
LOCK_PREFIX_KEY: alepha1159.TString;
|
|
5047
5071
|
}>;
|
|
5048
5072
|
declare module "alepha" {
|
|
5049
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
5073
|
+
interface Env extends Partial<Static<typeof envSchema$3>> {}
|
|
5050
5074
|
}
|
|
5051
5075
|
//#endregion
|
|
5052
5076
|
//#region ../../../alepha/src/orm/providers/drivers/NodePostgresProvider.d.ts
|
|
5053
5077
|
declare module "alepha" {
|
|
5054
|
-
interface Env extends Partial<Static<typeof envSchema$
|
|
5078
|
+
interface Env extends Partial<Static<typeof envSchema$2>> {}
|
|
5055
5079
|
}
|
|
5056
|
-
declare const envSchema$
|
|
5080
|
+
declare const envSchema$2: alepha1159.TObject<{
|
|
5057
5081
|
/**
|
|
5058
5082
|
* Main configuration for database connection.
|
|
5059
5083
|
* Accept a string in the format of a Postgres connection URL.
|
|
@@ -5061,21 +5085,21 @@ declare const envSchema$1: alepha1178.TObject<{
|
|
|
5061
5085
|
* or
|
|
5062
5086
|
* Example: postgres://user:password@localhost:5432/database?sslmode=require
|
|
5063
5087
|
*/
|
|
5064
|
-
DATABASE_URL:
|
|
5088
|
+
DATABASE_URL: alepha1159.TOptional<alepha1159.TString>;
|
|
5065
5089
|
/**
|
|
5066
5090
|
* In addition to the DATABASE_URL, you can specify the postgres schema name.
|
|
5067
5091
|
*
|
|
5068
5092
|
* It will monkey patch drizzle tables.
|
|
5069
5093
|
*/
|
|
5070
|
-
POSTGRES_SCHEMA:
|
|
5094
|
+
POSTGRES_SCHEMA: alepha1159.TOptional<alepha1159.TString>;
|
|
5071
5095
|
}>;
|
|
5072
5096
|
//#endregion
|
|
5073
5097
|
//#region ../../../alepha/src/orm/providers/drivers/NodeSqliteProvider.d.ts
|
|
5074
5098
|
/**
|
|
5075
5099
|
* Configuration options for the Node.js SQLite database provider.
|
|
5076
5100
|
*/
|
|
5077
|
-
declare const nodeSqliteOptions:
|
|
5078
|
-
path:
|
|
5101
|
+
declare const nodeSqliteOptions: alepha1159.Atom<alepha1159.TObject<{
|
|
5102
|
+
path: alepha1159.TOptional<alepha1159.TString>;
|
|
5079
5103
|
}>, "alepha.postgres.node-sqlite.options">;
|
|
5080
5104
|
type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
|
|
5081
5105
|
declare module "alepha" {
|
|
@@ -5158,17 +5182,17 @@ declare module "alepha" {
|
|
|
5158
5182
|
}
|
|
5159
5183
|
}
|
|
5160
5184
|
//#endregion
|
|
5161
|
-
//#region ../../../alepha/src/api
|
|
5162
|
-
declare const identities: EntityPrimitive<
|
|
5163
|
-
id: PgAttr<PgAttr<
|
|
5164
|
-
version: PgAttr<PgAttr<
|
|
5165
|
-
createdAt: PgAttr<PgAttr<
|
|
5166
|
-
updatedAt: PgAttr<PgAttr<
|
|
5167
|
-
userId: PgAttr<
|
|
5168
|
-
password:
|
|
5169
|
-
provider:
|
|
5170
|
-
providerUserId:
|
|
5171
|
-
providerData:
|
|
5185
|
+
//#region ../../../alepha/src/api/users/entities/identities.d.ts
|
|
5186
|
+
declare const identities: EntityPrimitive<alepha1159.TObject<{
|
|
5187
|
+
id: PgAttr<PgAttr<alepha1159.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
5188
|
+
version: PgAttr<PgAttr<alepha1159.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
5189
|
+
createdAt: PgAttr<PgAttr<alepha1159.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
5190
|
+
updatedAt: PgAttr<PgAttr<alepha1159.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
5191
|
+
userId: PgAttr<alepha1159.TString, typeof PG_REF>;
|
|
5192
|
+
password: alepha1159.TOptional<alepha1159.TString>;
|
|
5193
|
+
provider: alepha1159.TString;
|
|
5194
|
+
providerUserId: alepha1159.TOptional<alepha1159.TString>;
|
|
5195
|
+
providerData: alepha1159.TOptional<alepha1159.TRecord<string, alepha1159.TAny>>;
|
|
5172
5196
|
}>>;
|
|
5173
5197
|
//#endregion
|
|
5174
5198
|
//#region ../../../alepha/src/bucket/providers/FileStorageProvider.d.ts
|
|
@@ -5395,8 +5419,8 @@ interface BucketFileOptions {
|
|
|
5395
5419
|
/**
|
|
5396
5420
|
* Local file storage configuration atom
|
|
5397
5421
|
*/
|
|
5398
|
-
declare const localFileStorageOptions:
|
|
5399
|
-
storagePath:
|
|
5422
|
+
declare const localFileStorageOptions: alepha1159.Atom<alepha1159.TObject<{
|
|
5423
|
+
storagePath: alepha1159.TString;
|
|
5400
5424
|
}>, "alepha.bucket.local.options">;
|
|
5401
5425
|
type LocalFileStorageProviderOptions = Static<typeof localFileStorageOptions.schema>;
|
|
5402
5426
|
declare module "alepha" {
|
|
@@ -5439,42 +5463,77 @@ declare module "alepha" {
|
|
|
5439
5463
|
* @module alepha.bucket
|
|
5440
5464
|
*/
|
|
5441
5465
|
//#endregion
|
|
5442
|
-
//#region ../../../alepha/src/api
|
|
5443
|
-
declare const sessions: EntityPrimitive<
|
|
5444
|
-
id: PgAttr<PgAttr<
|
|
5445
|
-
version: PgAttr<PgAttr<
|
|
5446
|
-
createdAt: PgAttr<PgAttr<
|
|
5447
|
-
updatedAt: PgAttr<PgAttr<
|
|
5448
|
-
refreshToken:
|
|
5449
|
-
userId: PgAttr<
|
|
5450
|
-
expiresAt:
|
|
5451
|
-
ip:
|
|
5452
|
-
userAgent:
|
|
5453
|
-
os:
|
|
5454
|
-
browser:
|
|
5455
|
-
device:
|
|
5466
|
+
//#region ../../../alepha/src/api/users/entities/sessions.d.ts
|
|
5467
|
+
declare const sessions: EntityPrimitive<alepha1159.TObject<{
|
|
5468
|
+
id: PgAttr<PgAttr<alepha1159.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
5469
|
+
version: PgAttr<PgAttr<alepha1159.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
5470
|
+
createdAt: PgAttr<PgAttr<alepha1159.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
5471
|
+
updatedAt: PgAttr<PgAttr<alepha1159.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
5472
|
+
refreshToken: alepha1159.TString;
|
|
5473
|
+
userId: PgAttr<alepha1159.TString, typeof PG_REF>;
|
|
5474
|
+
expiresAt: alepha1159.TString;
|
|
5475
|
+
ip: alepha1159.TOptional<alepha1159.TString>;
|
|
5476
|
+
userAgent: alepha1159.TOptional<alepha1159.TObject<{
|
|
5477
|
+
os: alepha1159.TString;
|
|
5478
|
+
browser: alepha1159.TString;
|
|
5479
|
+
device: alepha1159.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
5456
5480
|
}>>;
|
|
5457
5481
|
}>>;
|
|
5458
5482
|
//#endregion
|
|
5459
|
-
//#region ../../../alepha/src/api
|
|
5460
|
-
declare const users: EntityPrimitive<
|
|
5461
|
-
id: PgAttr<PgAttr<
|
|
5462
|
-
version: PgAttr<PgAttr<
|
|
5463
|
-
createdAt: PgAttr<PgAttr<
|
|
5464
|
-
updatedAt: PgAttr<PgAttr<
|
|
5465
|
-
realm: PgAttr<
|
|
5466
|
-
username:
|
|
5467
|
-
email:
|
|
5468
|
-
phoneNumber:
|
|
5469
|
-
roles: PgAttr<
|
|
5470
|
-
firstName:
|
|
5471
|
-
lastName:
|
|
5472
|
-
picture:
|
|
5473
|
-
enabled: PgAttr<
|
|
5474
|
-
emailVerified: PgAttr<
|
|
5483
|
+
//#region ../../../alepha/src/api/users/entities/users.d.ts
|
|
5484
|
+
declare const users: EntityPrimitive<alepha1159.TObject<{
|
|
5485
|
+
id: PgAttr<PgAttr<alepha1159.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
5486
|
+
version: PgAttr<PgAttr<alepha1159.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
5487
|
+
createdAt: PgAttr<PgAttr<alepha1159.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
5488
|
+
updatedAt: PgAttr<PgAttr<alepha1159.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
5489
|
+
realm: PgAttr<alepha1159.TString, typeof PG_DEFAULT>;
|
|
5490
|
+
username: alepha1159.TOptional<alepha1159.TString>;
|
|
5491
|
+
email: alepha1159.TOptional<alepha1159.TString>;
|
|
5492
|
+
phoneNumber: alepha1159.TOptional<alepha1159.TString>;
|
|
5493
|
+
roles: PgAttr<alepha1159.TArray<alepha1159.TString>, typeof PG_DEFAULT>;
|
|
5494
|
+
firstName: alepha1159.TOptional<alepha1159.TString>;
|
|
5495
|
+
lastName: alepha1159.TOptional<alepha1159.TString>;
|
|
5496
|
+
picture: alepha1159.TOptional<alepha1159.TString>;
|
|
5497
|
+
enabled: PgAttr<alepha1159.TBoolean, typeof PG_DEFAULT>;
|
|
5498
|
+
emailVerified: PgAttr<alepha1159.TBoolean, typeof PG_DEFAULT>;
|
|
5475
5499
|
}>>;
|
|
5476
5500
|
//#endregion
|
|
5477
|
-
//#region ../../../alepha/src/api
|
|
5501
|
+
//#region ../../../alepha/src/api/users/primitives/$userRealm.d.ts
|
|
5502
|
+
interface UserRealmOptions {
|
|
5503
|
+
/**
|
|
5504
|
+
* Secret key for signing tokens.
|
|
5505
|
+
*
|
|
5506
|
+
* If not provided, the secret from the SecurityProvider will be used (usually from the APP_SECRET environment variable).
|
|
5507
|
+
*/
|
|
5508
|
+
secret?: string;
|
|
5509
|
+
/**
|
|
5510
|
+
* Realm configuration options.
|
|
5511
|
+
*
|
|
5512
|
+
* It's already pre-configured for user management with admin and user roles.
|
|
5513
|
+
*/
|
|
5514
|
+
realm?: Partial<RealmPrimitiveOptions>;
|
|
5515
|
+
/**
|
|
5516
|
+
* Override entities.
|
|
5517
|
+
*/
|
|
5518
|
+
entities?: {
|
|
5519
|
+
users?: Repository<typeof users.schema>;
|
|
5520
|
+
identities?: Repository<typeof identities.schema>;
|
|
5521
|
+
sessions?: Repository<typeof sessions.schema>;
|
|
5522
|
+
};
|
|
5523
|
+
settings?: Partial<RealmAuthSettings>;
|
|
5524
|
+
identities?: {
|
|
5525
|
+
credentials?: true;
|
|
5526
|
+
google?: true;
|
|
5527
|
+
github?: true;
|
|
5528
|
+
};
|
|
5529
|
+
modules?: {
|
|
5530
|
+
files?: boolean;
|
|
5531
|
+
audits?: boolean;
|
|
5532
|
+
jobs?: boolean;
|
|
5533
|
+
};
|
|
5534
|
+
}
|
|
5535
|
+
//#endregion
|
|
5536
|
+
//#region ../../../alepha/src/api/users/providers/UserRealmProvider.d.ts
|
|
5478
5537
|
interface UserRealmRepositories {
|
|
5479
5538
|
identities: Repository<typeof identities.schema>;
|
|
5480
5539
|
sessions: Repository<typeof sessions.schema>;
|
|
@@ -5487,51 +5546,51 @@ interface UserRealm {
|
|
|
5487
5546
|
}
|
|
5488
5547
|
declare class UserRealmProvider {
|
|
5489
5548
|
protected readonly alepha: Alepha;
|
|
5490
|
-
protected readonly defaultIdentities: Repository<
|
|
5491
|
-
id: PgAttr<PgAttr<
|
|
5492
|
-
version: PgAttr<PgAttr<
|
|
5493
|
-
createdAt: PgAttr<PgAttr<
|
|
5494
|
-
updatedAt: PgAttr<PgAttr<
|
|
5495
|
-
userId: PgAttr<
|
|
5496
|
-
password:
|
|
5497
|
-
provider:
|
|
5498
|
-
providerUserId:
|
|
5499
|
-
providerData:
|
|
5549
|
+
protected readonly defaultIdentities: Repository<alepha1159.TObject<{
|
|
5550
|
+
id: PgAttr<PgAttr<alepha1159.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
5551
|
+
version: PgAttr<PgAttr<alepha1159.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
5552
|
+
createdAt: PgAttr<PgAttr<alepha1159.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
5553
|
+
updatedAt: PgAttr<PgAttr<alepha1159.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
5554
|
+
userId: PgAttr<alepha1159.TString, typeof PG_REF>;
|
|
5555
|
+
password: alepha1159.TOptional<alepha1159.TString>;
|
|
5556
|
+
provider: alepha1159.TString;
|
|
5557
|
+
providerUserId: alepha1159.TOptional<alepha1159.TString>;
|
|
5558
|
+
providerData: alepha1159.TOptional<alepha1159.TRecord<string, alepha1159.TAny>>;
|
|
5500
5559
|
}>>;
|
|
5501
|
-
protected readonly defaultSessions: Repository<
|
|
5502
|
-
id: PgAttr<PgAttr<
|
|
5503
|
-
version: PgAttr<PgAttr<
|
|
5504
|
-
createdAt: PgAttr<PgAttr<
|
|
5505
|
-
updatedAt: PgAttr<PgAttr<
|
|
5506
|
-
refreshToken:
|
|
5507
|
-
userId: PgAttr<
|
|
5508
|
-
expiresAt:
|
|
5509
|
-
ip:
|
|
5510
|
-
userAgent:
|
|
5511
|
-
os:
|
|
5512
|
-
browser:
|
|
5513
|
-
device:
|
|
5560
|
+
protected readonly defaultSessions: Repository<alepha1159.TObject<{
|
|
5561
|
+
id: PgAttr<PgAttr<alepha1159.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
5562
|
+
version: PgAttr<PgAttr<alepha1159.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
5563
|
+
createdAt: PgAttr<PgAttr<alepha1159.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
5564
|
+
updatedAt: PgAttr<PgAttr<alepha1159.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
5565
|
+
refreshToken: alepha1159.TString;
|
|
5566
|
+
userId: PgAttr<alepha1159.TString, typeof PG_REF>;
|
|
5567
|
+
expiresAt: alepha1159.TString;
|
|
5568
|
+
ip: alepha1159.TOptional<alepha1159.TString>;
|
|
5569
|
+
userAgent: alepha1159.TOptional<alepha1159.TObject<{
|
|
5570
|
+
os: alepha1159.TString;
|
|
5571
|
+
browser: alepha1159.TString;
|
|
5572
|
+
device: alepha1159.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
5514
5573
|
}>>;
|
|
5515
5574
|
}>>;
|
|
5516
|
-
protected readonly defaultUsers: Repository<
|
|
5517
|
-
id: PgAttr<PgAttr<
|
|
5518
|
-
version: PgAttr<PgAttr<
|
|
5519
|
-
createdAt: PgAttr<PgAttr<
|
|
5520
|
-
updatedAt: PgAttr<PgAttr<
|
|
5521
|
-
realm: PgAttr<
|
|
5522
|
-
username:
|
|
5523
|
-
email:
|
|
5524
|
-
phoneNumber:
|
|
5525
|
-
roles: PgAttr<
|
|
5526
|
-
firstName:
|
|
5527
|
-
lastName:
|
|
5528
|
-
picture:
|
|
5529
|
-
enabled: PgAttr<
|
|
5530
|
-
emailVerified: PgAttr<
|
|
5575
|
+
protected readonly defaultUsers: Repository<alepha1159.TObject<{
|
|
5576
|
+
id: PgAttr<PgAttr<alepha1159.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
5577
|
+
version: PgAttr<PgAttr<alepha1159.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
5578
|
+
createdAt: PgAttr<PgAttr<alepha1159.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
5579
|
+
updatedAt: PgAttr<PgAttr<alepha1159.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
5580
|
+
realm: PgAttr<alepha1159.TString, typeof PG_DEFAULT>;
|
|
5581
|
+
username: alepha1159.TOptional<alepha1159.TString>;
|
|
5582
|
+
email: alepha1159.TOptional<alepha1159.TString>;
|
|
5583
|
+
phoneNumber: alepha1159.TOptional<alepha1159.TString>;
|
|
5584
|
+
roles: PgAttr<alepha1159.TArray<alepha1159.TString>, typeof PG_DEFAULT>;
|
|
5585
|
+
firstName: alepha1159.TOptional<alepha1159.TString>;
|
|
5586
|
+
lastName: alepha1159.TOptional<alepha1159.TString>;
|
|
5587
|
+
picture: alepha1159.TOptional<alepha1159.TString>;
|
|
5588
|
+
enabled: PgAttr<alepha1159.TBoolean, typeof PG_DEFAULT>;
|
|
5589
|
+
emailVerified: PgAttr<alepha1159.TBoolean, typeof PG_DEFAULT>;
|
|
5531
5590
|
}>>;
|
|
5532
5591
|
protected realms: Map<string, UserRealm>;
|
|
5533
5592
|
avatars: BucketPrimitive;
|
|
5534
|
-
protected readonly onConfigure:
|
|
5593
|
+
protected readonly onConfigure: alepha1159.HookPrimitive<"configure">;
|
|
5535
5594
|
register(userRealmName: string, userRealmOptions?: UserRealmOptions): UserRealm;
|
|
5536
5595
|
/**
|
|
5537
5596
|
* Gets a registered realm by name, auto-creating default if needed.
|
|
@@ -5542,25 +5601,25 @@ declare class UserRealmProvider {
|
|
|
5542
5601
|
userRepository(userRealmName?: string): Repository<typeof users.schema>;
|
|
5543
5602
|
}
|
|
5544
5603
|
//#endregion
|
|
5545
|
-
//#region ../../../alepha/src/api
|
|
5604
|
+
//#region ../../../alepha/src/api/verifications/parameters/VerificationParameters.d.ts
|
|
5546
5605
|
/**
|
|
5547
5606
|
* Verification settings configuration atom
|
|
5548
5607
|
*/
|
|
5549
|
-
declare const verificationOptions:
|
|
5550
|
-
code:
|
|
5551
|
-
maxAttempts:
|
|
5552
|
-
codeLength:
|
|
5553
|
-
codeExpiration:
|
|
5554
|
-
verificationCooldown:
|
|
5555
|
-
limitPerDay:
|
|
5608
|
+
declare const verificationOptions: alepha1159.Atom<alepha1159.TObject<{
|
|
5609
|
+
code: alepha1159.TObject<{
|
|
5610
|
+
maxAttempts: alepha1159.TInteger;
|
|
5611
|
+
codeLength: alepha1159.TInteger;
|
|
5612
|
+
codeExpiration: alepha1159.TInteger;
|
|
5613
|
+
verificationCooldown: alepha1159.TInteger;
|
|
5614
|
+
limitPerDay: alepha1159.TInteger;
|
|
5556
5615
|
}>;
|
|
5557
|
-
link:
|
|
5558
|
-
maxAttempts:
|
|
5559
|
-
codeExpiration:
|
|
5560
|
-
verificationCooldown:
|
|
5561
|
-
limitPerDay:
|
|
5616
|
+
link: alepha1159.TObject<{
|
|
5617
|
+
maxAttempts: alepha1159.TInteger;
|
|
5618
|
+
codeExpiration: alepha1159.TInteger;
|
|
5619
|
+
verificationCooldown: alepha1159.TInteger;
|
|
5620
|
+
limitPerDay: alepha1159.TInteger;
|
|
5562
5621
|
}>;
|
|
5563
|
-
purgeDays:
|
|
5622
|
+
purgeDays: alepha1159.TInteger;
|
|
5564
5623
|
}>, "alepha.api.verifications.options">;
|
|
5565
5624
|
type VerificationOptions = Static<typeof verificationOptions.schema>;
|
|
5566
5625
|
declare module "alepha" {
|
|
@@ -5569,6 +5628,44 @@ declare module "alepha" {
|
|
|
5569
5628
|
}
|
|
5570
5629
|
}
|
|
5571
5630
|
//#endregion
|
|
5631
|
+
//#region ../../../alepha/src/scheduler/primitives/$scheduler.d.ts
|
|
5632
|
+
declare const envSchema$1: alepha1159.TObject<{
|
|
5633
|
+
SCHEDULER_PREFIX: alepha1159.TOptional<alepha1159.TString>;
|
|
5634
|
+
}>;
|
|
5635
|
+
declare module "alepha" {
|
|
5636
|
+
interface Env extends Partial<Static<typeof envSchema$1>> {}
|
|
5637
|
+
}
|
|
5638
|
+
//#endregion
|
|
5639
|
+
//#region ../../../alepha/src/scheduler/index.d.ts
|
|
5640
|
+
declare module "alepha" {
|
|
5641
|
+
interface Hooks {
|
|
5642
|
+
"scheduler:begin": {
|
|
5643
|
+
name: string;
|
|
5644
|
+
now: DateTime;
|
|
5645
|
+
context: string;
|
|
5646
|
+
};
|
|
5647
|
+
"scheduler:success": {
|
|
5648
|
+
name: string;
|
|
5649
|
+
context: string;
|
|
5650
|
+
};
|
|
5651
|
+
"scheduler:error": {
|
|
5652
|
+
name: string;
|
|
5653
|
+
error: Error;
|
|
5654
|
+
context: string;
|
|
5655
|
+
};
|
|
5656
|
+
"scheduler:end": {
|
|
5657
|
+
name: string;
|
|
5658
|
+
context: string;
|
|
5659
|
+
};
|
|
5660
|
+
}
|
|
5661
|
+
}
|
|
5662
|
+
/**
|
|
5663
|
+
* Generic interface for scheduling tasks.
|
|
5664
|
+
*
|
|
5665
|
+
* @see {@link $scheduler}
|
|
5666
|
+
* @module alepha.scheduler
|
|
5667
|
+
*/
|
|
5668
|
+
//#endregion
|
|
5572
5669
|
//#region ../../../alepha/src/email/providers/EmailProvider.d.ts
|
|
5573
5670
|
/**
|
|
5574
5671
|
* Email provider interface.
|
|
@@ -5664,45 +5761,35 @@ declare module "alepha" {
|
|
|
5664
5761
|
* @module alepha.sms
|
|
5665
5762
|
*/
|
|
5666
5763
|
//#endregion
|
|
5667
|
-
//#region ../../../alepha/src/api
|
|
5668
|
-
declare const notificationServiceEnvSchema:
|
|
5669
|
-
NOTIFICATION_QUEUE:
|
|
5764
|
+
//#region ../../../alepha/src/api/notifications/services/NotificationService.d.ts
|
|
5765
|
+
declare const notificationServiceEnvSchema: alepha1159.TObject<{
|
|
5766
|
+
NOTIFICATION_QUEUE: alepha1159.TOptional<alepha1159.TBoolean>;
|
|
5670
5767
|
}>;
|
|
5671
5768
|
declare module "alepha" {
|
|
5672
5769
|
interface Env extends Partial<Static<typeof notificationServiceEnvSchema>> {}
|
|
5673
5770
|
}
|
|
5674
5771
|
//#endregion
|
|
5675
|
-
//#region ../../../alepha/src/queue/providers/WorkerProvider.d.ts
|
|
5676
|
-
declare const envSchema:
|
|
5677
|
-
/**
|
|
5678
|
-
* The timeout in seconds for blocking job acquisition.
|
|
5679
|
-
* Workers will check for shutdown after each timeout period.
|
|
5680
|
-
*/
|
|
5681
|
-
QUEUE_WORKER_BLOCKING_TIMEOUT: alepha1178.TInteger;
|
|
5772
|
+
//#region ../../../alepha/src/queue/core/providers/WorkerProvider.d.ts
|
|
5773
|
+
declare const envSchema: alepha1159.TObject<{
|
|
5682
5774
|
/**
|
|
5683
|
-
* The
|
|
5684
|
-
* Useful only if you are doing a lot of I/O.
|
|
5685
|
-
*/
|
|
5686
|
-
QUEUE_WORKER_CONCURRENCY: alepha1178.TInteger;
|
|
5687
|
-
/**
|
|
5688
|
-
* Interval in milliseconds for renewing job locks during processing.
|
|
5689
|
-
* Should be less than the job's lock duration.
|
|
5775
|
+
* The interval in milliseconds to wait before checking for new messages.
|
|
5690
5776
|
*/
|
|
5691
|
-
|
|
5777
|
+
QUEUE_WORKER_INTERVAL: alepha1159.TInteger;
|
|
5692
5778
|
/**
|
|
5693
|
-
*
|
|
5779
|
+
* The maximum interval in milliseconds to wait before checking for new messages.
|
|
5694
5780
|
*/
|
|
5695
|
-
|
|
5781
|
+
QUEUE_WORKER_MAX_INTERVAL: alepha1159.TInteger;
|
|
5696
5782
|
/**
|
|
5697
|
-
*
|
|
5783
|
+
* The number of workers to run concurrently. Defaults to 1.
|
|
5784
|
+
* Useful only if you are doing a lot of I/O.
|
|
5698
5785
|
*/
|
|
5699
|
-
|
|
5786
|
+
QUEUE_WORKER_CONCURRENCY: alepha1159.TInteger;
|
|
5700
5787
|
}>;
|
|
5701
5788
|
declare module "alepha" {
|
|
5702
5789
|
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
5703
5790
|
}
|
|
5704
5791
|
//#endregion
|
|
5705
|
-
//#region ../../../alepha/src/api
|
|
5792
|
+
//#region ../../../alepha/src/api/users/controllers/UserRealmController.d.ts
|
|
5706
5793
|
/**
|
|
5707
5794
|
* Controller for exposing realm configuration.
|
|
5708
5795
|
* Uses $route instead of $action to keep endpoints hidden from API documentation.
|
|
@@ -5711,123 +5798,94 @@ declare class UserRealmController {
|
|
|
5711
5798
|
protected readonly url = "/realms";
|
|
5712
5799
|
protected readonly userRealmProvider: UserRealmProvider;
|
|
5713
5800
|
protected readonly serverAuthProvider: ServerAuthProvider;
|
|
5714
|
-
protected readonly cryptoProvider: CryptoProvider;
|
|
5715
5801
|
/**
|
|
5716
5802
|
* Get realm configuration settings.
|
|
5717
5803
|
* This endpoint is not exposed in the API documentation.
|
|
5718
5804
|
*/
|
|
5719
5805
|
readonly getRealmConfig: ActionPrimitiveFn<{
|
|
5720
|
-
query:
|
|
5721
|
-
userRealmName:
|
|
5806
|
+
query: alepha1159.TObject<{
|
|
5807
|
+
userRealmName: alepha1159.TOptional<alepha1159.TString>;
|
|
5722
5808
|
}>;
|
|
5723
|
-
response:
|
|
5724
|
-
settings:
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5809
|
+
response: alepha1159.TObject<{
|
|
5810
|
+
settings: alepha1159.TObject<{
|
|
5811
|
+
displayName: alepha1159.TOptional<alepha1159.TString>;
|
|
5812
|
+
description: alepha1159.TOptional<alepha1159.TString>;
|
|
5813
|
+
logoUrl: alepha1159.TOptional<alepha1159.TString>;
|
|
5814
|
+
registrationAllowed: alepha1159.TBoolean;
|
|
5815
|
+
emailEnabled: alepha1159.TBoolean;
|
|
5816
|
+
emailRequired: alepha1159.TBoolean;
|
|
5817
|
+
usernameEnabled: alepha1159.TBoolean;
|
|
5818
|
+
usernameRequired: alepha1159.TBoolean;
|
|
5819
|
+
phoneEnabled: alepha1159.TBoolean;
|
|
5820
|
+
phoneRequired: alepha1159.TBoolean;
|
|
5821
|
+
verifyEmailRequired: alepha1159.TBoolean;
|
|
5822
|
+
verifyPhoneRequired: alepha1159.TBoolean;
|
|
5823
|
+
firstNameLastNameEnabled: alepha1159.TBoolean;
|
|
5824
|
+
firstNameLastNameRequired: alepha1159.TBoolean;
|
|
5825
|
+
resetPasswordAllowed: alepha1159.TBoolean;
|
|
5826
|
+
passwordPolicy: alepha1159.TObject<{
|
|
5827
|
+
minLength: alepha1159.TInteger;
|
|
5828
|
+
requireUppercase: alepha1159.TBoolean;
|
|
5829
|
+
requireLowercase: alepha1159.TBoolean;
|
|
5830
|
+
requireNumbers: alepha1159.TBoolean;
|
|
5831
|
+
requireSpecialCharacters: alepha1159.TBoolean;
|
|
5743
5832
|
}>;
|
|
5744
5833
|
}>;
|
|
5745
|
-
realmName:
|
|
5746
|
-
authenticationMethods:
|
|
5747
|
-
name:
|
|
5748
|
-
type:
|
|
5834
|
+
realmName: alepha1159.TString;
|
|
5835
|
+
authenticationMethods: alepha1159.TArray<alepha1159.TObject<{
|
|
5836
|
+
name: alepha1159.TString;
|
|
5837
|
+
type: alepha1159.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
|
|
5749
5838
|
}>>;
|
|
5750
5839
|
}>;
|
|
5751
5840
|
}>;
|
|
5752
5841
|
readonly checkUsernameAvailability: ActionPrimitiveFn<{
|
|
5753
|
-
query:
|
|
5754
|
-
userRealmName:
|
|
5842
|
+
query: alepha1159.TObject<{
|
|
5843
|
+
userRealmName: alepha1159.TOptional<alepha1159.TString>;
|
|
5755
5844
|
}>;
|
|
5756
|
-
body:
|
|
5757
|
-
username:
|
|
5845
|
+
body: alepha1159.TObject<{
|
|
5846
|
+
username: alepha1159.TString;
|
|
5758
5847
|
}>;
|
|
5759
|
-
response:
|
|
5760
|
-
available:
|
|
5848
|
+
response: alepha1159.TObject<{
|
|
5849
|
+
available: alepha1159.TBoolean;
|
|
5761
5850
|
}>;
|
|
5762
5851
|
}>;
|
|
5763
5852
|
}
|
|
5764
5853
|
//#endregion
|
|
5765
|
-
//#region ../../../alepha/src/api
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
credentials?: true;
|
|
5790
|
-
google?: true;
|
|
5791
|
-
github?: true;
|
|
5792
|
-
};
|
|
5793
|
-
modules?: {
|
|
5794
|
-
files?: boolean;
|
|
5795
|
-
audits?: boolean;
|
|
5796
|
-
};
|
|
5797
|
-
}
|
|
5798
|
-
//#endregion
|
|
5799
|
-
//#region ../../../alepha/src/api-users/schemas/userRealmConfigSchema.d.ts
|
|
5800
|
-
declare const userRealmConfigSchema: alepha1178.TObject<{
|
|
5801
|
-
settings: alepha1178.TObject<{
|
|
5802
|
-
registrationAllowed: alepha1178.TBoolean;
|
|
5803
|
-
emailEnabled: alepha1178.TBoolean;
|
|
5804
|
-
emailRequired: alepha1178.TBoolean;
|
|
5805
|
-
usernameEnabled: alepha1178.TBoolean;
|
|
5806
|
-
usernameRequired: alepha1178.TBoolean;
|
|
5807
|
-
phoneEnabled: alepha1178.TBoolean;
|
|
5808
|
-
phoneRequired: alepha1178.TBoolean;
|
|
5809
|
-
verifyEmailRequired: alepha1178.TBoolean;
|
|
5810
|
-
verifyPhoneRequired: alepha1178.TBoolean;
|
|
5811
|
-
firstNameLastNameEnabled: alepha1178.TBoolean;
|
|
5812
|
-
firstNameLastNameRequired: alepha1178.TBoolean;
|
|
5813
|
-
resetPasswordAllowed: alepha1178.TBoolean;
|
|
5814
|
-
passwordPolicy: alepha1178.TObject<{
|
|
5815
|
-
minLength: alepha1178.TInteger;
|
|
5816
|
-
requireUppercase: alepha1178.TBoolean;
|
|
5817
|
-
requireLowercase: alepha1178.TBoolean;
|
|
5818
|
-
requireNumbers: alepha1178.TBoolean;
|
|
5819
|
-
requireSpecialCharacters: alepha1178.TBoolean;
|
|
5854
|
+
//#region ../../../alepha/src/api/users/schemas/userRealmConfigSchema.d.ts
|
|
5855
|
+
declare const userRealmConfigSchema: alepha1159.TObject<{
|
|
5856
|
+
settings: alepha1159.TObject<{
|
|
5857
|
+
displayName: alepha1159.TOptional<alepha1159.TString>;
|
|
5858
|
+
description: alepha1159.TOptional<alepha1159.TString>;
|
|
5859
|
+
logoUrl: alepha1159.TOptional<alepha1159.TString>;
|
|
5860
|
+
registrationAllowed: alepha1159.TBoolean;
|
|
5861
|
+
emailEnabled: alepha1159.TBoolean;
|
|
5862
|
+
emailRequired: alepha1159.TBoolean;
|
|
5863
|
+
usernameEnabled: alepha1159.TBoolean;
|
|
5864
|
+
usernameRequired: alepha1159.TBoolean;
|
|
5865
|
+
phoneEnabled: alepha1159.TBoolean;
|
|
5866
|
+
phoneRequired: alepha1159.TBoolean;
|
|
5867
|
+
verifyEmailRequired: alepha1159.TBoolean;
|
|
5868
|
+
verifyPhoneRequired: alepha1159.TBoolean;
|
|
5869
|
+
firstNameLastNameEnabled: alepha1159.TBoolean;
|
|
5870
|
+
firstNameLastNameRequired: alepha1159.TBoolean;
|
|
5871
|
+
resetPasswordAllowed: alepha1159.TBoolean;
|
|
5872
|
+
passwordPolicy: alepha1159.TObject<{
|
|
5873
|
+
minLength: alepha1159.TInteger;
|
|
5874
|
+
requireUppercase: alepha1159.TBoolean;
|
|
5875
|
+
requireLowercase: alepha1159.TBoolean;
|
|
5876
|
+
requireNumbers: alepha1159.TBoolean;
|
|
5877
|
+
requireSpecialCharacters: alepha1159.TBoolean;
|
|
5820
5878
|
}>;
|
|
5821
5879
|
}>;
|
|
5822
|
-
realmName:
|
|
5823
|
-
authenticationMethods:
|
|
5824
|
-
name:
|
|
5825
|
-
type:
|
|
5880
|
+
realmName: alepha1159.TString;
|
|
5881
|
+
authenticationMethods: alepha1159.TArray<alepha1159.TObject<{
|
|
5882
|
+
name: alepha1159.TString;
|
|
5883
|
+
type: alepha1159.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
|
|
5826
5884
|
}>>;
|
|
5827
5885
|
}>;
|
|
5828
5886
|
type UserRealmConfig = Static<typeof userRealmConfigSchema>;
|
|
5829
5887
|
//#endregion
|
|
5830
|
-
//#region ../../../alepha/src/api
|
|
5888
|
+
//#region ../../../alepha/src/api/files/index.d.ts
|
|
5831
5889
|
declare module "alepha/bucket" {
|
|
5832
5890
|
interface BucketFileOptions {
|
|
5833
5891
|
/**
|
|
@@ -5865,12 +5923,16 @@ declare class AuthRouter {
|
|
|
5865
5923
|
protected readonly auth: ReactAuth;
|
|
5866
5924
|
layout: PagePrimitive<PageConfigSchema, any, TPropsParentDefault>;
|
|
5867
5925
|
login: PagePrimitive<{
|
|
5868
|
-
query:
|
|
5869
|
-
r:
|
|
5926
|
+
query: alepha1159.TObject<{
|
|
5927
|
+
r: alepha1159.TOptional<alepha1159.TString>;
|
|
5928
|
+
realm: alepha1159.TOptional<alepha1159.TString>;
|
|
5870
5929
|
}>;
|
|
5871
5930
|
}, {
|
|
5872
5931
|
realmConfig: {
|
|
5873
5932
|
settings: {
|
|
5933
|
+
description?: string | undefined;
|
|
5934
|
+
displayName?: string | undefined;
|
|
5935
|
+
logoUrl?: string | undefined;
|
|
5874
5936
|
registrationAllowed: boolean;
|
|
5875
5937
|
emailEnabled: boolean;
|
|
5876
5938
|
emailRequired: boolean;
|
|
@@ -5899,12 +5961,16 @@ declare class AuthRouter {
|
|
|
5899
5961
|
};
|
|
5900
5962
|
}, TPropsParentDefault>;
|
|
5901
5963
|
register: PagePrimitive<{
|
|
5902
|
-
query:
|
|
5903
|
-
r:
|
|
5964
|
+
query: alepha1159.TObject<{
|
|
5965
|
+
r: alepha1159.TOptional<alepha1159.TString>;
|
|
5966
|
+
realm: alepha1159.TOptional<alepha1159.TString>;
|
|
5904
5967
|
}>;
|
|
5905
5968
|
}, {
|
|
5906
5969
|
realmConfig: {
|
|
5907
5970
|
settings: {
|
|
5971
|
+
description?: string | undefined;
|
|
5972
|
+
displayName?: string | undefined;
|
|
5973
|
+
logoUrl?: string | undefined;
|
|
5908
5974
|
registrationAllowed: boolean;
|
|
5909
5975
|
emailEnabled: boolean;
|
|
5910
5976
|
emailRequired: boolean;
|
|
@@ -5933,12 +5999,16 @@ declare class AuthRouter {
|
|
|
5933
5999
|
};
|
|
5934
6000
|
}, TPropsParentDefault>;
|
|
5935
6001
|
resetPassword: PagePrimitive<{
|
|
5936
|
-
query:
|
|
5937
|
-
r:
|
|
6002
|
+
query: alepha1159.TObject<{
|
|
6003
|
+
r: alepha1159.TOptional<alepha1159.TString>;
|
|
6004
|
+
realm: alepha1159.TOptional<alepha1159.TString>;
|
|
5938
6005
|
}>;
|
|
5939
6006
|
}, {
|
|
5940
6007
|
realmConfig: {
|
|
5941
6008
|
settings: {
|
|
6009
|
+
description?: string | undefined;
|
|
6010
|
+
displayName?: string | undefined;
|
|
6011
|
+
logoUrl?: string | undefined;
|
|
5942
6012
|
registrationAllowed: boolean;
|
|
5943
6013
|
emailEnabled: boolean;
|
|
5944
6014
|
emailRequired: boolean;
|
|
@@ -5967,14 +6037,17 @@ declare class AuthRouter {
|
|
|
5967
6037
|
};
|
|
5968
6038
|
}, TPropsParentDefault>;
|
|
5969
6039
|
verifyEmail: PagePrimitive<{
|
|
5970
|
-
query:
|
|
5971
|
-
email:
|
|
5972
|
-
token:
|
|
6040
|
+
query: alepha1159.TObject<{
|
|
6041
|
+
email: alepha1159.TOptional<alepha1159.TString>;
|
|
6042
|
+
token: alepha1159.TOptional<alepha1159.TString>;
|
|
5973
6043
|
}>;
|
|
5974
6044
|
}, any, TPropsParentDefault>;
|
|
5975
6045
|
logout: PagePrimitive<PageConfigSchema, {}, TPropsParentDefault>;
|
|
5976
|
-
protected loadRealmConfig(): Promise<{
|
|
6046
|
+
protected loadRealmConfig(userRealmName?: string): Promise<{
|
|
5977
6047
|
settings: {
|
|
6048
|
+
description?: string | undefined;
|
|
6049
|
+
displayName?: string | undefined;
|
|
6050
|
+
logoUrl?: string | undefined;
|
|
5978
6051
|
registrationAllowed: boolean;
|
|
5979
6052
|
emailEnabled: boolean;
|
|
5980
6053
|
emailRequired: boolean;
|
|
@@ -6056,7 +6129,7 @@ declare const VerifyEmail: (_props: VerifyEmailProps) => react_jsx_runtime0.JSX.
|
|
|
6056
6129
|
*
|
|
6057
6130
|
* @module alepha.ui.auth
|
|
6058
6131
|
*/
|
|
6059
|
-
declare const AlephaUIAuth:
|
|
6132
|
+
declare const AlephaUIAuth: alepha1159.Service<alepha1159.Module>;
|
|
6060
6133
|
//#endregion
|
|
6061
6134
|
export { AlephaUIAuth, AuthRouter, Login, Register, ResetPassword, UserButton, type UserButtonProps, VerifyEmail };
|
|
6062
6135
|
//# sourceMappingURL=index.d.ts.map
|