alepha 0.14.4 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -4
- package/dist/api/audits/index.d.ts +619 -731
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/files/index.d.ts +185 -298
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +0 -1
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.d.ts +245 -356
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/notifications/index.d.ts +238 -350
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/parameters/index.d.ts +499 -611
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/users/index.browser.js +1 -2
- package/dist/api/users/index.browser.js.map +1 -1
- package/dist/api/users/index.d.ts +1697 -1804
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +178 -151
- package/dist/api/users/index.js.map +1 -1
- package/dist/api/verifications/index.d.ts +132 -132
- package/dist/api/verifications/index.d.ts.map +1 -1
- package/dist/batch/index.d.ts +122 -122
- package/dist/batch/index.d.ts.map +1 -1
- package/dist/batch/index.js +1 -2
- package/dist/batch/index.js.map +1 -1
- package/dist/bucket/index.d.ts +163 -163
- package/dist/bucket/index.d.ts.map +1 -1
- package/dist/cache/core/index.d.ts +46 -46
- package/dist/cache/core/index.d.ts.map +1 -1
- package/dist/cache/redis/index.d.ts.map +1 -1
- package/dist/cli/index.d.ts +302 -299
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +966 -564
- package/dist/cli/index.js.map +1 -1
- package/dist/command/index.d.ts +303 -299
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +11 -7
- package/dist/command/index.js.map +1 -1
- package/dist/core/index.browser.js +419 -99
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +718 -625
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +420 -99
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +419 -99
- package/dist/core/index.native.js.map +1 -1
- package/dist/datetime/index.d.ts +44 -44
- package/dist/datetime/index.d.ts.map +1 -1
- package/dist/datetime/index.js +4 -4
- package/dist/datetime/index.js.map +1 -1
- package/dist/email/index.d.ts +97 -50
- package/dist/email/index.d.ts.map +1 -1
- package/dist/email/index.js +129 -33
- package/dist/email/index.js.map +1 -1
- package/dist/fake/index.d.ts +7981 -14
- package/dist/fake/index.d.ts.map +1 -1
- package/dist/file/index.d.ts +523 -390
- package/dist/file/index.d.ts.map +1 -1
- package/dist/file/index.js +253 -1
- package/dist/file/index.js.map +1 -1
- package/dist/lock/core/index.d.ts +208 -208
- package/dist/lock/core/index.d.ts.map +1 -1
- package/dist/lock/redis/index.d.ts.map +1 -1
- package/dist/logger/index.d.ts +25 -26
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/mcp/index.d.ts +197 -197
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/orm/chunk-DtkW-qnP.js +38 -0
- package/dist/orm/index.browser.js.map +1 -1
- package/dist/orm/index.bun.js +2814 -0
- package/dist/orm/index.bun.js.map +1 -0
- package/dist/orm/index.d.ts +1205 -1057
- package/dist/orm/index.d.ts.map +1 -1
- package/dist/orm/index.js +2056 -1753
- package/dist/orm/index.js.map +1 -1
- package/dist/queue/core/index.d.ts +248 -248
- package/dist/queue/core/index.d.ts.map +1 -1
- package/dist/queue/redis/index.d.ts.map +1 -1
- package/dist/redis/index.bun.js +285 -0
- package/dist/redis/index.bun.js.map +1 -0
- package/dist/redis/index.d.ts +118 -136
- package/dist/redis/index.d.ts.map +1 -1
- package/dist/redis/index.js +18 -38
- package/dist/redis/index.js.map +1 -1
- package/dist/retry/index.d.ts +69 -69
- package/dist/retry/index.d.ts.map +1 -1
- package/dist/router/index.d.ts +6 -6
- package/dist/router/index.d.ts.map +1 -1
- package/dist/scheduler/index.d.ts +25 -25
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/security/index.browser.js +5 -1
- package/dist/security/index.browser.js.map +1 -1
- package/dist/security/index.d.ts +417 -254
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +386 -86
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.d.ts +277 -277
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +20 -20
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cache/index.d.ts +60 -57
- package/dist/server/cache/index.d.ts.map +1 -1
- package/dist/server/cache/index.js +1 -1
- package/dist/server/cache/index.js.map +1 -1
- package/dist/server/compress/index.d.ts +3 -3
- package/dist/server/compress/index.d.ts.map +1 -1
- package/dist/server/cookies/index.d.ts +6 -6
- package/dist/server/cookies/index.d.ts.map +1 -1
- package/dist/server/cookies/index.js +3 -3
- package/dist/server/cookies/index.js.map +1 -1
- package/dist/server/core/index.d.ts +242 -150
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +288 -122
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/cors/index.d.ts +11 -12
- package/dist/server/cors/index.d.ts.map +1 -1
- package/dist/server/health/index.d.ts +0 -1
- package/dist/server/health/index.d.ts.map +1 -1
- package/dist/server/helmet/index.d.ts +2 -2
- package/dist/server/helmet/index.d.ts.map +1 -1
- package/dist/server/links/index.browser.js.map +1 -1
- package/dist/server/links/index.d.ts +84 -85
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/links/index.js +1 -2
- package/dist/server/links/index.js.map +1 -1
- package/dist/server/metrics/index.d.ts.map +1 -1
- package/dist/server/multipart/index.d.ts +6 -6
- package/dist/server/multipart/index.d.ts.map +1 -1
- package/dist/server/proxy/index.d.ts +102 -103
- package/dist/server/proxy/index.d.ts.map +1 -1
- package/dist/server/rate-limit/index.d.ts +16 -16
- package/dist/server/rate-limit/index.d.ts.map +1 -1
- package/dist/server/static/index.d.ts +44 -44
- package/dist/server/static/index.d.ts.map +1 -1
- package/dist/server/swagger/index.d.ts +48 -49
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/server/swagger/index.js +1 -2
- package/dist/server/swagger/index.js.map +1 -1
- package/dist/sms/index.d.ts +13 -11
- package/dist/sms/index.d.ts.map +1 -1
- package/dist/sms/index.js +7 -7
- package/dist/sms/index.js.map +1 -1
- package/dist/thread/index.d.ts +71 -72
- package/dist/thread/index.d.ts.map +1 -1
- package/dist/topic/core/index.d.ts +318 -318
- package/dist/topic/core/index.d.ts.map +1 -1
- package/dist/topic/redis/index.d.ts +6 -6
- package/dist/topic/redis/index.d.ts.map +1 -1
- package/dist/vite/index.d.ts +5720 -159
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +41 -18
- package/dist/vite/index.js.map +1 -1
- package/dist/websocket/index.browser.js +6 -6
- package/dist/websocket/index.browser.js.map +1 -1
- package/dist/websocket/index.d.ts +247 -247
- package/dist/websocket/index.d.ts.map +1 -1
- package/dist/websocket/index.js +6 -6
- package/dist/websocket/index.js.map +1 -1
- package/package.json +9 -14
- package/src/api/files/controllers/AdminFileStatsController.ts +0 -1
- package/src/api/users/atoms/realmAuthSettingsAtom.ts +5 -0
- package/src/api/users/controllers/{UserRealmController.ts → RealmController.ts} +11 -11
- package/src/api/users/entities/users.ts +1 -1
- package/src/api/users/index.ts +8 -8
- package/src/api/users/primitives/{$userRealm.ts → $realm.ts} +17 -19
- package/src/api/users/providers/{UserRealmProvider.ts → RealmProvider.ts} +26 -30
- package/src/api/users/schemas/{userRealmConfigSchema.ts → realmConfigSchema.ts} +2 -2
- package/src/api/users/services/CredentialService.ts +7 -7
- package/src/api/users/services/IdentityService.ts +4 -4
- package/src/api/users/services/RegistrationService.spec.ts +25 -27
- package/src/api/users/services/RegistrationService.ts +38 -27
- package/src/api/users/services/SessionCrudService.ts +3 -3
- package/src/api/users/services/SessionService.spec.ts +3 -3
- package/src/api/users/services/SessionService.ts +28 -9
- package/src/api/users/services/UserService.ts +7 -7
- package/src/batch/providers/BatchProvider.ts +1 -2
- package/src/cli/apps/AlephaPackageBuilderCli.ts +38 -19
- package/src/cli/assets/apiHelloControllerTs.ts +18 -0
- package/src/cli/assets/apiIndexTs.ts +16 -0
- package/src/cli/assets/claudeMd.ts +303 -0
- package/src/cli/assets/mainBrowserTs.ts +2 -2
- package/src/cli/assets/mainServerTs.ts +24 -0
- package/src/cli/assets/webAppRouterTs.ts +15 -0
- package/src/cli/assets/webHelloComponentTsx.ts +16 -0
- package/src/cli/assets/webIndexTs.ts +16 -0
- package/src/cli/commands/build.ts +41 -21
- package/src/cli/commands/db.ts +21 -18
- package/src/cli/commands/deploy.ts +17 -5
- package/src/cli/commands/dev.ts +13 -17
- package/src/cli/commands/format.ts +8 -2
- package/src/cli/commands/init.ts +74 -29
- package/src/cli/commands/lint.ts +8 -2
- package/src/cli/commands/test.ts +8 -2
- package/src/cli/commands/typecheck.ts +5 -1
- package/src/cli/commands/verify.ts +4 -2
- package/src/cli/services/AlephaCliUtils.ts +39 -600
- package/src/cli/services/PackageManagerUtils.ts +301 -0
- package/src/cli/services/ProjectScaffolder.ts +306 -0
- package/src/command/helpers/Runner.ts +15 -3
- package/src/core/__tests__/Alepha-graph.spec.ts +4 -0
- package/src/core/index.shared.ts +1 -0
- package/src/core/index.ts +2 -0
- package/src/core/primitives/$hook.ts +6 -2
- package/src/core/primitives/$module.spec.ts +4 -0
- package/src/core/providers/AlsProvider.ts +1 -1
- package/src/core/providers/CodecManager.spec.ts +12 -6
- package/src/core/providers/CodecManager.ts +26 -6
- package/src/core/providers/EventManager.ts +169 -13
- package/src/core/providers/KeylessJsonSchemaCodec.spec.ts +621 -0
- package/src/core/providers/KeylessJsonSchemaCodec.ts +407 -0
- package/src/core/providers/StateManager.spec.ts +27 -16
- package/src/email/providers/LocalEmailProvider.spec.ts +111 -87
- package/src/email/providers/LocalEmailProvider.ts +52 -15
- package/src/email/providers/NodemailerEmailProvider.ts +167 -56
- package/src/file/errors/FileError.ts +7 -0
- package/src/file/index.ts +9 -1
- package/src/file/providers/MemoryFileSystemProvider.ts +393 -0
- package/src/orm/index.browser.ts +1 -19
- package/src/orm/index.bun.ts +77 -0
- package/src/orm/index.shared-server.ts +22 -0
- package/src/orm/index.shared.ts +15 -0
- package/src/orm/index.ts +19 -39
- package/src/orm/providers/drivers/BunPostgresProvider.ts +3 -5
- package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -1
- package/src/orm/providers/drivers/CloudflareD1Provider.ts +4 -0
- package/src/orm/providers/drivers/DatabaseProvider.ts +4 -0
- package/src/orm/providers/drivers/PglitePostgresProvider.ts +4 -0
- package/src/orm/services/Repository.ts +8 -0
- package/src/redis/index.bun.ts +35 -0
- package/src/redis/providers/BunRedisProvider.ts +12 -43
- package/src/redis/providers/BunRedisSubscriberProvider.ts +2 -3
- package/src/redis/providers/NodeRedisProvider.ts +16 -34
- package/src/{server/security → security}/__tests__/BasicAuth.spec.ts +11 -11
- package/src/{server/security → security}/__tests__/ServerSecurityProvider-realm.spec.ts +21 -16
- package/src/{server/security/providers → security/__tests__}/ServerSecurityProvider.spec.ts +5 -5
- package/src/security/index.browser.ts +5 -0
- package/src/security/index.ts +90 -7
- package/src/security/primitives/{$realm.spec.ts → $issuer.spec.ts} +11 -11
- package/src/security/primitives/{$realm.ts → $issuer.ts} +20 -17
- package/src/security/primitives/$role.ts +5 -5
- package/src/security/primitives/$serviceAccount.spec.ts +5 -5
- package/src/security/primitives/$serviceAccount.ts +3 -3
- package/src/{server/security → security}/providers/ServerSecurityProvider.ts +5 -7
- package/src/server/auth/primitives/$auth.ts +10 -10
- package/src/server/auth/primitives/$authCredentials.ts +3 -3
- package/src/server/auth/primitives/$authGithub.ts +3 -3
- package/src/server/auth/primitives/$authGoogle.ts +3 -3
- package/src/server/auth/providers/ServerAuthProvider.ts +13 -13
- package/src/server/cache/providers/ServerCacheProvider.ts +1 -1
- package/src/server/cookies/providers/ServerCookiesProvider.ts +3 -3
- package/src/server/core/providers/NodeHttpServerProvider.ts +25 -6
- package/src/server/core/providers/ServerBodyParserProvider.ts +19 -23
- package/src/server/core/providers/ServerLoggerProvider.ts +23 -19
- package/src/server/core/providers/ServerProvider.ts +144 -21
- package/src/server/core/providers/ServerRouterProvider.ts +259 -115
- package/src/server/core/providers/ServerTimingProvider.ts +2 -2
- package/src/server/links/index.ts +1 -1
- package/src/server/links/providers/LinkProvider.ts +1 -1
- package/src/server/swagger/index.ts +1 -1
- package/src/sms/providers/LocalSmsProvider.spec.ts +153 -111
- package/src/sms/providers/LocalSmsProvider.ts +8 -7
- package/src/vite/helpers/boot.ts +28 -17
- package/src/vite/tasks/buildServer.ts +12 -1
- package/src/vite/tasks/devServer.ts +3 -1
- package/src/vite/tasks/generateCloudflare.ts +7 -0
- package/dist/server/security/index.browser.js +0 -13
- package/dist/server/security/index.browser.js.map +0 -1
- package/dist/server/security/index.d.ts +0 -173
- package/dist/server/security/index.d.ts.map +0 -1
- package/dist/server/security/index.js +0 -311
- package/dist/server/security/index.js.map +0 -1
- package/src/cli/assets/appRouterTs.ts +0 -9
- package/src/cli/assets/mainTs.ts +0 -13
- package/src/server/security/index.browser.ts +0 -10
- package/src/server/security/index.ts +0 -94
- /package/src/{server/security → security}/primitives/$basicAuth.ts +0 -0
- /package/src/{server/security → security}/providers/ServerBasicAuthProvider.ts +0 -0
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as alepha52 from "alepha";
|
|
2
2
|
import { Static } from "alepha";
|
|
3
3
|
import * as alepha_server0 from "alepha/server";
|
|
4
4
|
import { DateTimeProvider } from "alepha/datetime";
|
|
5
5
|
import * as alepha_logger0 from "alepha/logger";
|
|
6
|
-
import * as
|
|
6
|
+
import * as alepha_orm56 from "alepha/orm";
|
|
7
7
|
import * as alepha_scheduler0 from "alepha/scheduler";
|
|
8
8
|
|
|
9
9
|
//#region ../../src/api/verifications/entities/verifications.d.ts
|
|
10
|
-
declare const verifications:
|
|
11
|
-
id:
|
|
12
|
-
createdAt:
|
|
13
|
-
updatedAt:
|
|
14
|
-
version:
|
|
15
|
-
type:
|
|
16
|
-
target:
|
|
17
|
-
code:
|
|
18
|
-
verifiedAt:
|
|
19
|
-
attempts:
|
|
10
|
+
declare const verifications: alepha_orm56.EntityPrimitive<alepha52.TObject<{
|
|
11
|
+
id: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_PRIMARY_KEY>, typeof alepha_orm56.PG_DEFAULT>;
|
|
12
|
+
createdAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_CREATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
|
|
13
|
+
updatedAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_UPDATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
|
|
14
|
+
version: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_VERSION>, typeof alepha_orm56.PG_DEFAULT>;
|
|
15
|
+
type: alepha52.TUnsafe<"link" | "code">;
|
|
16
|
+
target: alepha52.TString;
|
|
17
|
+
code: alepha52.TString;
|
|
18
|
+
verifiedAt: alepha52.TOptional<alepha52.TString>;
|
|
19
|
+
attempts: alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_DEFAULT>;
|
|
20
20
|
}>>;
|
|
21
|
-
declare const verificationEntitySchema:
|
|
22
|
-
id:
|
|
23
|
-
createdAt:
|
|
24
|
-
updatedAt:
|
|
25
|
-
version:
|
|
26
|
-
type:
|
|
27
|
-
target:
|
|
28
|
-
code:
|
|
29
|
-
verifiedAt:
|
|
30
|
-
attempts:
|
|
21
|
+
declare const verificationEntitySchema: alepha52.TObject<{
|
|
22
|
+
id: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_PRIMARY_KEY>, typeof alepha_orm56.PG_DEFAULT>;
|
|
23
|
+
createdAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_CREATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
|
|
24
|
+
updatedAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_UPDATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
|
|
25
|
+
version: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_VERSION>, typeof alepha_orm56.PG_DEFAULT>;
|
|
26
|
+
type: alepha52.TUnsafe<"link" | "code">;
|
|
27
|
+
target: alepha52.TString;
|
|
28
|
+
code: alepha52.TString;
|
|
29
|
+
verifiedAt: alepha52.TOptional<alepha52.TString>;
|
|
30
|
+
attempts: alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_DEFAULT>;
|
|
31
31
|
}>;
|
|
32
|
-
declare const verificationEntityInsertSchema:
|
|
33
|
-
id:
|
|
34
|
-
createdAt:
|
|
35
|
-
updatedAt:
|
|
36
|
-
version:
|
|
37
|
-
type:
|
|
38
|
-
target:
|
|
39
|
-
code:
|
|
40
|
-
verifiedAt:
|
|
41
|
-
attempts:
|
|
32
|
+
declare const verificationEntityInsertSchema: alepha_orm56.TObjectInsert<alepha52.TObject<{
|
|
33
|
+
id: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_PRIMARY_KEY>, typeof alepha_orm56.PG_DEFAULT>;
|
|
34
|
+
createdAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_CREATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
|
|
35
|
+
updatedAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_UPDATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
|
|
36
|
+
version: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_VERSION>, typeof alepha_orm56.PG_DEFAULT>;
|
|
37
|
+
type: alepha52.TUnsafe<"link" | "code">;
|
|
38
|
+
target: alepha52.TString;
|
|
39
|
+
code: alepha52.TString;
|
|
40
|
+
verifiedAt: alepha52.TOptional<alepha52.TString>;
|
|
41
|
+
attempts: alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_DEFAULT>;
|
|
42
42
|
}>>;
|
|
43
43
|
type VerificationEntity = Static<typeof verifications.schema>;
|
|
44
44
|
//#endregion
|
|
45
45
|
//#region ../../src/api/verifications/schemas/verificationSettingsSchema.d.ts
|
|
46
|
-
declare const verificationSettingsSchema:
|
|
47
|
-
code:
|
|
48
|
-
maxAttempts:
|
|
49
|
-
codeLength:
|
|
50
|
-
codeExpiration:
|
|
51
|
-
verificationCooldown:
|
|
52
|
-
limitPerDay:
|
|
46
|
+
declare const verificationSettingsSchema: alepha52.TObject<{
|
|
47
|
+
code: alepha52.TObject<{
|
|
48
|
+
maxAttempts: alepha52.TInteger;
|
|
49
|
+
codeLength: alepha52.TInteger;
|
|
50
|
+
codeExpiration: alepha52.TInteger;
|
|
51
|
+
verificationCooldown: alepha52.TInteger;
|
|
52
|
+
limitPerDay: alepha52.TInteger;
|
|
53
53
|
}>;
|
|
54
|
-
link:
|
|
55
|
-
maxAttempts:
|
|
56
|
-
codeExpiration:
|
|
57
|
-
verificationCooldown:
|
|
58
|
-
limitPerDay:
|
|
54
|
+
link: alepha52.TObject<{
|
|
55
|
+
maxAttempts: alepha52.TInteger;
|
|
56
|
+
codeExpiration: alepha52.TInteger;
|
|
57
|
+
verificationCooldown: alepha52.TInteger;
|
|
58
|
+
limitPerDay: alepha52.TInteger;
|
|
59
59
|
}>;
|
|
60
|
-
purgeDays:
|
|
60
|
+
purgeDays: alepha52.TInteger;
|
|
61
61
|
}>;
|
|
62
62
|
type VerificationSettings = Static<typeof verificationSettingsSchema>;
|
|
63
63
|
//#endregion
|
|
@@ -65,21 +65,21 @@ type VerificationSettings = Static<typeof verificationSettingsSchema>;
|
|
|
65
65
|
/**
|
|
66
66
|
* Verification settings configuration atom
|
|
67
67
|
*/
|
|
68
|
-
declare const verificationOptions:
|
|
69
|
-
code:
|
|
70
|
-
maxAttempts:
|
|
71
|
-
codeLength:
|
|
72
|
-
codeExpiration:
|
|
73
|
-
verificationCooldown:
|
|
74
|
-
limitPerDay:
|
|
68
|
+
declare const verificationOptions: alepha52.Atom<alepha52.TObject<{
|
|
69
|
+
code: alepha52.TObject<{
|
|
70
|
+
maxAttempts: alepha52.TInteger;
|
|
71
|
+
codeLength: alepha52.TInteger;
|
|
72
|
+
codeExpiration: alepha52.TInteger;
|
|
73
|
+
verificationCooldown: alepha52.TInteger;
|
|
74
|
+
limitPerDay: alepha52.TInteger;
|
|
75
75
|
}>;
|
|
76
|
-
link:
|
|
77
|
-
maxAttempts:
|
|
78
|
-
codeExpiration:
|
|
79
|
-
verificationCooldown:
|
|
80
|
-
limitPerDay:
|
|
76
|
+
link: alepha52.TObject<{
|
|
77
|
+
maxAttempts: alepha52.TInteger;
|
|
78
|
+
codeExpiration: alepha52.TInteger;
|
|
79
|
+
verificationCooldown: alepha52.TInteger;
|
|
80
|
+
limitPerDay: alepha52.TInteger;
|
|
81
81
|
}>;
|
|
82
|
-
purgeDays:
|
|
82
|
+
purgeDays: alepha52.TInteger;
|
|
83
83
|
}>, "alepha.api.verifications.options">;
|
|
84
84
|
type VerificationOptions = Static<typeof verificationOptions.schema>;
|
|
85
85
|
declare module "alepha" {
|
|
@@ -89,17 +89,17 @@ declare module "alepha" {
|
|
|
89
89
|
}
|
|
90
90
|
declare class VerificationParameters {
|
|
91
91
|
protected readonly options: Readonly<{
|
|
92
|
-
|
|
92
|
+
link: {
|
|
93
93
|
codeExpiration: number;
|
|
94
94
|
verificationCooldown: number;
|
|
95
95
|
maxAttempts: number;
|
|
96
|
-
codeLength: number;
|
|
97
96
|
limitPerDay: number;
|
|
98
97
|
};
|
|
99
|
-
|
|
98
|
+
code: {
|
|
100
99
|
codeExpiration: number;
|
|
101
100
|
verificationCooldown: number;
|
|
102
101
|
maxAttempts: number;
|
|
102
|
+
codeLength: number;
|
|
103
103
|
limitPerDay: number;
|
|
104
104
|
};
|
|
105
105
|
purgeDays: number;
|
|
@@ -108,23 +108,23 @@ declare class VerificationParameters {
|
|
|
108
108
|
}
|
|
109
109
|
//#endregion
|
|
110
110
|
//#region ../../src/api/verifications/schemas/requestVerificationCodeResponseSchema.d.ts
|
|
111
|
-
declare const requestVerificationCodeResponseSchema:
|
|
112
|
-
token:
|
|
113
|
-
codeExpiration:
|
|
114
|
-
verificationCooldown:
|
|
115
|
-
maxVerificationAttempts:
|
|
111
|
+
declare const requestVerificationCodeResponseSchema: alepha52.TObject<{
|
|
112
|
+
token: alepha52.TString;
|
|
113
|
+
codeExpiration: alepha52.TInteger;
|
|
114
|
+
verificationCooldown: alepha52.TInteger;
|
|
115
|
+
maxVerificationAttempts: alepha52.TInteger;
|
|
116
116
|
}>;
|
|
117
117
|
type RequestVerificationResponse = Static<typeof requestVerificationCodeResponseSchema>;
|
|
118
118
|
//#endregion
|
|
119
119
|
//#region ../../src/api/verifications/schemas/validateVerificationCodeResponseSchema.d.ts
|
|
120
|
-
declare const validateVerificationCodeResponseSchema:
|
|
121
|
-
ok:
|
|
122
|
-
alreadyVerified:
|
|
120
|
+
declare const validateVerificationCodeResponseSchema: alepha52.TObject<{
|
|
121
|
+
ok: alepha52.TBoolean;
|
|
122
|
+
alreadyVerified: alepha52.TOptional<alepha52.TBoolean>;
|
|
123
123
|
}>;
|
|
124
124
|
type ValidateVerificationCodeResponse = Static<typeof validateVerificationCodeResponseSchema>;
|
|
125
125
|
//#endregion
|
|
126
126
|
//#region ../../src/api/verifications/schemas/verificationTypeEnumSchema.d.ts
|
|
127
|
-
declare const verificationTypeEnumSchema:
|
|
127
|
+
declare const verificationTypeEnumSchema: alepha52.TUnsafe<"link" | "code">;
|
|
128
128
|
type VerificationTypeEnum = Static<typeof verificationTypeEnumSchema>;
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region ../../src/api/verifications/services/VerificationService.d.ts
|
|
@@ -132,44 +132,44 @@ declare class VerificationService {
|
|
|
132
132
|
protected readonly log: alepha_logger0.Logger;
|
|
133
133
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
134
134
|
protected readonly verificationParameters: VerificationParameters;
|
|
135
|
-
protected readonly verificationRepository:
|
|
136
|
-
id:
|
|
137
|
-
createdAt:
|
|
138
|
-
updatedAt:
|
|
139
|
-
version:
|
|
140
|
-
type:
|
|
141
|
-
target:
|
|
142
|
-
code:
|
|
143
|
-
verifiedAt:
|
|
144
|
-
attempts:
|
|
135
|
+
protected readonly verificationRepository: alepha_orm56.Repository<alepha52.TObject<{
|
|
136
|
+
id: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_PRIMARY_KEY>, typeof alepha_orm56.PG_DEFAULT>;
|
|
137
|
+
createdAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_CREATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
|
|
138
|
+
updatedAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_UPDATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
|
|
139
|
+
version: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_VERSION>, typeof alepha_orm56.PG_DEFAULT>;
|
|
140
|
+
type: alepha52.TUnsafe<"link" | "code">;
|
|
141
|
+
target: alepha52.TString;
|
|
142
|
+
code: alepha52.TString;
|
|
143
|
+
verifiedAt: alepha52.TOptional<alepha52.TString>;
|
|
144
|
+
attempts: alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_DEFAULT>;
|
|
145
145
|
}>>;
|
|
146
146
|
findByEntry(entry: VerificationEntry): Promise<VerificationEntity>;
|
|
147
|
-
findRecentsByEntry(entry: VerificationEntry): Promise<
|
|
148
|
-
id:
|
|
149
|
-
createdAt:
|
|
150
|
-
updatedAt:
|
|
151
|
-
version:
|
|
152
|
-
type:
|
|
153
|
-
target:
|
|
154
|
-
code:
|
|
155
|
-
verifiedAt:
|
|
156
|
-
attempts:
|
|
157
|
-
}>,
|
|
158
|
-
id:
|
|
159
|
-
createdAt:
|
|
160
|
-
updatedAt:
|
|
161
|
-
version:
|
|
162
|
-
type:
|
|
163
|
-
target:
|
|
164
|
-
code:
|
|
165
|
-
verifiedAt:
|
|
166
|
-
attempts:
|
|
147
|
+
findRecentsByEntry(entry: VerificationEntry): Promise<alepha_orm56.PgStatic<alepha52.TObject<{
|
|
148
|
+
id: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_PRIMARY_KEY>, typeof alepha_orm56.PG_DEFAULT>;
|
|
149
|
+
createdAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_CREATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
|
|
150
|
+
updatedAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_UPDATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
|
|
151
|
+
version: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_VERSION>, typeof alepha_orm56.PG_DEFAULT>;
|
|
152
|
+
type: alepha52.TUnsafe<"link" | "code">;
|
|
153
|
+
target: alepha52.TString;
|
|
154
|
+
code: alepha52.TString;
|
|
155
|
+
verifiedAt: alepha52.TOptional<alepha52.TString>;
|
|
156
|
+
attempts: alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_DEFAULT>;
|
|
157
|
+
}>, alepha_orm56.PgRelationMap<alepha52.TObject<{
|
|
158
|
+
id: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_PRIMARY_KEY>, typeof alepha_orm56.PG_DEFAULT>;
|
|
159
|
+
createdAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_CREATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
|
|
160
|
+
updatedAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_UPDATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
|
|
161
|
+
version: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_VERSION>, typeof alepha_orm56.PG_DEFAULT>;
|
|
162
|
+
type: alepha52.TUnsafe<"link" | "code">;
|
|
163
|
+
target: alepha52.TString;
|
|
164
|
+
code: alepha52.TString;
|
|
165
|
+
verifiedAt: alepha52.TOptional<alepha52.TString>;
|
|
166
|
+
attempts: alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_DEFAULT>;
|
|
167
167
|
}>>>[]>;
|
|
168
168
|
/**
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
* Creates a verification entry and returns the token.
|
|
170
|
+
* The caller is responsible for sending notifications with the token.
|
|
171
|
+
* This allows for context-specific notifications (e.g., password reset vs email verification).
|
|
172
|
+
*/
|
|
173
173
|
createVerification(entry: VerificationEntry): Promise<RequestVerificationResponse>;
|
|
174
174
|
verifyCode(entry: VerificationEntry, code: string): Promise<ValidateVerificationCodeResponse>;
|
|
175
175
|
hashCode(code: string): string;
|
|
@@ -186,46 +186,46 @@ declare class VerificationController {
|
|
|
186
186
|
readonly url = "/verifications";
|
|
187
187
|
readonly group = "verifications";
|
|
188
188
|
readonly requestVerificationCode: alepha_server0.ActionPrimitiveFn<{
|
|
189
|
-
params:
|
|
190
|
-
type:
|
|
189
|
+
params: alepha52.TObject<{
|
|
190
|
+
type: alepha52.TUnsafe<"link" | "code">;
|
|
191
191
|
}>;
|
|
192
|
-
body:
|
|
193
|
-
target:
|
|
192
|
+
body: alepha52.TObject<{
|
|
193
|
+
target: alepha52.TString;
|
|
194
194
|
}>;
|
|
195
|
-
response:
|
|
196
|
-
token:
|
|
197
|
-
codeExpiration:
|
|
198
|
-
verificationCooldown:
|
|
199
|
-
maxVerificationAttempts:
|
|
195
|
+
response: alepha52.TObject<{
|
|
196
|
+
token: alepha52.TString;
|
|
197
|
+
codeExpiration: alepha52.TInteger;
|
|
198
|
+
verificationCooldown: alepha52.TInteger;
|
|
199
|
+
maxVerificationAttempts: alepha52.TInteger;
|
|
200
200
|
}>;
|
|
201
201
|
}>;
|
|
202
202
|
readonly validateVerificationCode: alepha_server0.ActionPrimitiveFn<{
|
|
203
|
-
params:
|
|
204
|
-
type:
|
|
203
|
+
params: alepha52.TObject<{
|
|
204
|
+
type: alepha52.TUnsafe<"link" | "code">;
|
|
205
205
|
}>;
|
|
206
|
-
body:
|
|
207
|
-
target:
|
|
208
|
-
token:
|
|
206
|
+
body: alepha52.TObject<{
|
|
207
|
+
target: alepha52.TString;
|
|
208
|
+
token: alepha52.TString;
|
|
209
209
|
}>;
|
|
210
|
-
response:
|
|
211
|
-
ok:
|
|
212
|
-
alreadyVerified:
|
|
210
|
+
response: alepha52.TObject<{
|
|
211
|
+
ok: alepha52.TBoolean;
|
|
212
|
+
alreadyVerified: alepha52.TOptional<alepha52.TBoolean>;
|
|
213
213
|
}>;
|
|
214
214
|
}>;
|
|
215
215
|
}
|
|
216
216
|
//#endregion
|
|
217
217
|
//#region ../../src/api/verifications/jobs/VerificationJobs.d.ts
|
|
218
218
|
declare class VerificationJobs {
|
|
219
|
-
protected readonly verificationRepository:
|
|
220
|
-
id:
|
|
221
|
-
createdAt:
|
|
222
|
-
updatedAt:
|
|
223
|
-
version:
|
|
224
|
-
type:
|
|
225
|
-
target:
|
|
226
|
-
code:
|
|
227
|
-
verifiedAt:
|
|
228
|
-
attempts:
|
|
219
|
+
protected readonly verificationRepository: alepha_orm56.Repository<alepha52.TObject<{
|
|
220
|
+
id: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_PRIMARY_KEY>, typeof alepha_orm56.PG_DEFAULT>;
|
|
221
|
+
createdAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_CREATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
|
|
222
|
+
updatedAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_UPDATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
|
|
223
|
+
version: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_VERSION>, typeof alepha_orm56.PG_DEFAULT>;
|
|
224
|
+
type: alepha52.TUnsafe<"link" | "code">;
|
|
225
|
+
target: alepha52.TString;
|
|
226
|
+
code: alepha52.TString;
|
|
227
|
+
verifiedAt: alepha52.TOptional<alepha52.TString>;
|
|
228
|
+
attempts: alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_DEFAULT>;
|
|
229
229
|
}>>;
|
|
230
230
|
protected readonly verificationParameters: VerificationParameters;
|
|
231
231
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
@@ -242,7 +242,7 @@ declare class VerificationJobs {
|
|
|
242
242
|
*
|
|
243
243
|
* @module alepha.api.verifications
|
|
244
244
|
*/
|
|
245
|
-
declare const AlephaApiVerification:
|
|
245
|
+
declare const AlephaApiVerification: alepha52.Service<alepha52.Module>;
|
|
246
246
|
//#endregion
|
|
247
247
|
export { AlephaApiVerification, RequestVerificationResponse, ValidateVerificationCodeResponse, VerificationController, VerificationEntity, VerificationEntry, VerificationJobs, VerificationOptions, VerificationParameters, VerificationService, VerificationTypeEnum, requestVerificationCodeResponseSchema, validateVerificationCodeResponseSchema, verificationEntityInsertSchema, verificationEntitySchema, verificationOptions, verificationTypeEnumSchema, verifications };
|
|
248
248
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/api/verifications/entities/verifications.ts","../../../src/api/verifications/schemas/verificationSettingsSchema.ts","../../../src/api/verifications/parameters/VerificationParameters.ts","../../../src/api/verifications/schemas/requestVerificationCodeResponseSchema.ts","../../../src/api/verifications/schemas/validateVerificationCodeResponseSchema.ts","../../../src/api/verifications/schemas/verificationTypeEnumSchema.ts","../../../src/api/verifications/services/VerificationService.ts","../../../src/api/verifications/controllers/VerificationController.ts","../../../src/api/verifications/jobs/VerificationJobs.ts","../../../src/api/verifications/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/api/verifications/entities/verifications.ts","../../../src/api/verifications/schemas/verificationSettingsSchema.ts","../../../src/api/verifications/parameters/VerificationParameters.ts","../../../src/api/verifications/schemas/requestVerificationCodeResponseSchema.ts","../../../src/api/verifications/schemas/validateVerificationCodeResponseSchema.ts","../../../src/api/verifications/schemas/verificationTypeEnumSchema.ts","../../../src/api/verifications/services/VerificationService.ts","../../../src/api/verifications/controllers/VerificationController.ts","../../../src/api/verifications/jobs/VerificationJobs.ts","../../../src/api/verifications/index.ts"],"mappings":"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"}
|