alepha 0.18.2 → 0.18.3
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/assets/devtools-ui/200.html +2 -2
- package/assets/devtools-ui/200.html.br +0 -0
- package/assets/devtools-ui/404.html +2 -2
- package/assets/devtools-ui/404.html.br +0 -0
- package/assets/devtools-ui/{asset.BfSBZ5Dd.css → asset.hG_f8HuK.css} +1 -1
- package/assets/devtools-ui/asset.hG_f8HuK.css.br +0 -0
- package/assets/devtools-ui/chunk.B3au4Lhg.js +1 -0
- package/assets/devtools-ui/chunk.B3au4Lhg.js.br +0 -0
- package/assets/devtools-ui/chunk.BLOrlnMB.js +1 -0
- package/assets/devtools-ui/chunk.BLOrlnMB.js.br +0 -0
- package/assets/devtools-ui/chunk.BLR01ljW.js +1 -0
- package/assets/devtools-ui/chunk.BLR01ljW.js.br +0 -0
- package/assets/devtools-ui/chunk.BTXaIUlA.js +1 -0
- package/assets/devtools-ui/chunk.BTXaIUlA.js.br +0 -0
- package/assets/devtools-ui/{chunk.lJL-lgnW.js → chunk.BhJaxmm8.js} +1 -1
- package/assets/devtools-ui/chunk.BhJaxmm8.js.br +0 -0
- package/assets/devtools-ui/chunk.BtoNxFuL.js +1 -0
- package/assets/devtools-ui/chunk.BtoNxFuL.js.br +0 -0
- package/assets/devtools-ui/chunk.C8YUV2Wd.js +1 -0
- package/assets/devtools-ui/chunk.C8YUV2Wd.js.br +0 -0
- package/assets/devtools-ui/{chunk.M6wyKO_3.js → chunk.CBbIgDzE.js} +2 -2
- package/assets/devtools-ui/chunk.CBbIgDzE.js.br +0 -0
- package/assets/devtools-ui/chunk.CFqIniwA.js +1 -0
- package/assets/devtools-ui/chunk.CFqIniwA.js.br +0 -0
- package/assets/devtools-ui/chunk.CLFF7f7-.js +1 -0
- package/assets/devtools-ui/chunk.CLFF7f7-.js.br +0 -0
- package/assets/devtools-ui/chunk.CRsBbA10.js +1 -0
- package/assets/devtools-ui/chunk.CRsBbA10.js.br +0 -0
- package/assets/devtools-ui/{chunk.DbEH1oOB.js → chunk.CZPo6v95.js} +1 -1
- package/assets/devtools-ui/chunk.CZPo6v95.js.br +0 -0
- package/assets/devtools-ui/chunk.D0fWgNos.js +1 -0
- package/assets/devtools-ui/chunk.D0fWgNos.js.br +1 -0
- package/assets/devtools-ui/chunk.D7-0ziQ6.js +1 -0
- package/assets/devtools-ui/chunk.D7-0ziQ6.js.br +0 -0
- package/assets/devtools-ui/chunk.DAewe0vm.js +1 -0
- package/assets/devtools-ui/chunk.DAewe0vm.js.br +0 -0
- package/assets/devtools-ui/chunk.DJRQEYqK.js +1 -0
- package/assets/devtools-ui/chunk.DJRQEYqK.js.br +0 -0
- package/assets/devtools-ui/{chunk.CZl6J9DF.js → chunk.DMAxv14p.js} +1 -1
- package/assets/devtools-ui/chunk.DMAxv14p.js.br +0 -0
- package/assets/devtools-ui/{chunk.BT2IiBkZ.js → chunk.DMImnNjU.js} +1 -1
- package/assets/devtools-ui/chunk.DMImnNjU.js.br +0 -0
- package/assets/devtools-ui/chunk.DeeQsidk.js +9 -0
- package/assets/devtools-ui/chunk.DeeQsidk.js.br +0 -0
- package/assets/devtools-ui/chunk.DqEwn9Vj.js +7 -0
- package/assets/devtools-ui/chunk.DqEwn9Vj.js.br +0 -0
- package/assets/devtools-ui/chunk.Dt8OsQey.js +1 -0
- package/assets/devtools-ui/chunk.Dt8OsQey.js.br +0 -0
- package/assets/devtools-ui/{chunk.B9pX3zit.js → chunk.Dtp8oa_f.js} +1 -1
- package/assets/devtools-ui/chunk.Dtp8oa_f.js.br +0 -0
- package/assets/devtools-ui/chunk.Dx3JzAYM.js +1 -0
- package/assets/devtools-ui/chunk.Dx3JzAYM.js.br +0 -0
- package/assets/devtools-ui/chunk.GCOj1-5E.js +1 -0
- package/assets/devtools-ui/chunk.GCOj1-5E.js.br +0 -0
- package/assets/devtools-ui/chunk.IC1LD8BH.js +1 -0
- package/assets/devtools-ui/chunk.IC1LD8BH.js.br +0 -0
- package/assets/devtools-ui/chunk.IwuB_TqW.js +1 -0
- package/assets/devtools-ui/chunk.IwuB_TqW.js.br +0 -0
- package/assets/devtools-ui/chunk.Qqapj2zq.js +1 -0
- package/assets/devtools-ui/chunk.Qqapj2zq.js.br +0 -0
- package/assets/devtools-ui/{chunk.C79YouPp.js → chunk.TKKKndOy.js} +1 -1
- package/assets/devtools-ui/chunk.TKKKndOy.js.br +0 -0
- package/assets/devtools-ui/chunk.YHTVhFQT.js +1 -0
- package/assets/devtools-ui/chunk.YHTVhFQT.js.br +0 -0
- package/assets/devtools-ui/chunk.fnod6uEi.js +1 -0
- package/assets/devtools-ui/chunk.fnod6uEi.js.br +0 -0
- package/assets/devtools-ui/chunk.mOCRmXjo.js +1 -0
- package/assets/devtools-ui/chunk.mOCRmXjo.js.br +0 -0
- package/assets/devtools-ui/chunk.qZTNEAK0.js +1 -0
- package/assets/devtools-ui/chunk.qZTNEAK0.js.br +0 -0
- package/assets/devtools-ui/chunk.rc9m0y4-.js +1 -0
- package/assets/devtools-ui/chunk.rc9m0y4-.js.br +0 -0
- package/assets/devtools-ui/entry.Cxc5QLCU.js +80 -0
- package/assets/devtools-ui/entry.Cxc5QLCU.js.br +0 -0
- package/assets/devtools-ui/index.html +2 -2
- package/assets/devtools-ui/index.html.br +0 -0
- package/assets/swagger-ui/swagger-ui-bundle.js +1 -1
- package/assets/swagger-ui/swagger-ui.css +1 -1
- package/dist/api/audits/index.d.ts +61 -5
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/files/index.d.ts +61 -5
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/jobs/index.d.ts +61 -5
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/jobs/index.js +4 -2
- package/dist/api/jobs/index.js.map +1 -1
- package/dist/api/keys/index.d.ts +5 -5
- package/dist/api/notifications/index.browser.js +44 -1
- package/dist/api/notifications/index.browser.js.map +1 -1
- package/dist/api/notifications/index.d.ts +187 -2
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/notifications/index.js +143 -8
- package/dist/api/notifications/index.js.map +1 -1
- package/dist/api/parameters/index.d.ts +61 -5
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/users/index.d.ts +330 -93
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +27 -36
- package/dist/api/users/index.js.map +1 -1
- package/dist/cli/config/index.d.ts +46 -0
- package/dist/cli/config/index.d.ts.map +1 -0
- package/dist/cli/config/index.js +20 -0
- package/dist/cli/config/index.js.map +1 -0
- package/dist/cli/core/index.d.ts +69 -66
- package/dist/cli/core/index.d.ts.map +1 -1
- package/dist/cli/core/index.js +329 -196
- package/dist/cli/core/index.js.map +1 -1
- package/dist/cli/platform/index.d.ts +302 -63
- package/dist/cli/platform/index.d.ts.map +1 -1
- package/dist/cli/platform/index.js +455 -25
- package/dist/cli/platform/index.js.map +1 -1
- package/dist/core/index.browser.js +125 -87
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +62 -53
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +125 -87
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +125 -87
- package/dist/core/index.native.js.map +1 -1
- package/dist/core/index.workerd.js +125 -87
- package/dist/core/index.workerd.js.map +1 -1
- package/dist/crypto/index.d.ts +18 -1
- package/dist/crypto/index.d.ts.map +1 -1
- package/dist/crypto/index.js +29 -3
- package/dist/crypto/index.js.map +1 -1
- package/dist/devtools/index.js +3 -12
- package/dist/devtools/index.js.map +1 -1
- package/dist/logger/index.d.ts +10 -1
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +19 -9
- package/dist/logger/index.js.map +1 -1
- package/dist/orm/core/index.browser.js +57 -1
- package/dist/orm/core/index.browser.js.map +1 -1
- package/dist/orm/core/index.bun.js +378 -19
- package/dist/orm/core/index.bun.js.map +1 -1
- package/dist/orm/core/index.d.ts +328 -9
- package/dist/orm/core/index.d.ts.map +1 -1
- package/dist/orm/core/index.js +384 -21
- package/dist/orm/core/index.js.map +1 -1
- package/dist/orm/postgres/index.bun.js +49 -17
- package/dist/orm/postgres/index.bun.js.map +1 -1
- package/dist/orm/postgres/index.d.ts +47 -21
- package/dist/orm/postgres/index.d.ts.map +1 -1
- package/dist/orm/postgres/index.js +52 -17
- package/dist/orm/postgres/index.js.map +1 -1
- package/dist/react/core/index.d.ts +1 -1
- package/dist/react/core/index.d.ts.map +1 -1
- package/dist/react/core/index.js +6 -1
- package/dist/react/core/index.js.map +1 -1
- package/dist/react/form/index.d.ts +28 -18
- package/dist/react/form/index.d.ts.map +1 -1
- package/dist/react/form/index.js +92 -56
- package/dist/react/form/index.js.map +1 -1
- package/dist/react/router/index.browser.js +448 -116
- package/dist/react/router/index.browser.js.map +1 -1
- package/dist/react/router/index.d.ts +102 -40
- package/dist/react/router/index.d.ts.map +1 -1
- package/dist/react/router/index.js +453 -92
- package/dist/react/router/index.js.map +1 -1
- package/dist/security/index.d.ts +3 -11
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +6 -11
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.d.ts +22 -24
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +102 -82
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cookies/index.d.ts +7 -4
- package/dist/server/cookies/index.d.ts.map +1 -1
- package/dist/server/cookies/index.js +13 -12
- package/dist/server/cookies/index.js.map +1 -1
- package/dist/server/core/index.d.ts +288 -4
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +375 -2
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/links/index.browser.js +10 -71
- package/dist/server/links/index.browser.js.map +1 -1
- package/dist/server/links/index.d.ts +32 -49
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/links/index.js +73 -100
- package/dist/server/links/index.js.map +1 -1
- package/dist/system/index.browser.js +221 -2
- package/dist/system/index.browser.js.map +1 -1
- package/dist/system/index.d.ts +63 -1
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js +221 -1
- package/dist/system/index.js.map +1 -1
- package/dist/system/index.workerd.js +224 -4
- package/dist/system/index.workerd.js.map +1 -1
- package/package.json +10 -5
- package/src/api/jobs/providers/JobProvider.ts +6 -3
- package/src/api/notifications/controllers/AdminNotificationController.ts +83 -0
- package/src/api/notifications/index.browser.ts +3 -0
- package/src/api/notifications/index.ts +14 -2
- package/src/api/notifications/jobs/NotificationJobs.ts +11 -2
- package/src/api/notifications/schemas/notificationDetailResourceSchema.ts +20 -0
- package/src/api/notifications/schemas/notificationQuerySchema.ts +19 -0
- package/src/api/notifications/schemas/notificationResourceSchema.ts +18 -0
- package/src/api/notifications/services/NotificationSenderService.ts +15 -2
- package/src/api/users/atoms/realmAuthSettingsAtom.ts +28 -32
- package/src/api/users/buckets/UserBuckets.ts +1 -1
- package/src/api/users/jobs/UserJobs.ts +1 -1
- package/src/api/users/primitives/$realm.ts +8 -49
- package/src/api/users/providers/RealmProvider.ts +2 -3
- package/src/api/users/services/RegistrationService.spec.ts +7 -7
- package/src/api/users/services/RegistrationService.ts +3 -3
- package/src/api/users/services/SessionService.spec.ts +4 -4
- package/src/api/users/services/SessionService.ts +3 -3
- package/src/cli/{core → config}/defineConfig.ts +14 -20
- package/src/cli/config/index.ts +1 -0
- package/src/cli/core/commands/db.ts +65 -1
- package/src/cli/core/commands/dev.ts +1 -0
- package/src/cli/core/commands/init.ts +2 -192
- package/src/cli/core/index.ts +34 -11
- package/src/cli/core/providers/ViteDevServerProvider.ts +52 -13
- package/src/cli/core/services/PackageManagerUtils.ts +43 -21
- package/src/cli/core/services/ProjectScaffolder.ts +214 -2
- package/src/cli/core/services/ViteUtils.ts +57 -0
- package/src/cli/core/tasks/BuildClientTask.ts +7 -2
- package/src/cli/core/tasks/BuildCloudflareTask.ts +4 -12
- package/src/cli/core/tasks/BuildServerTask.ts +2 -0
- package/src/cli/core/tasks/BuildVercelTask.ts +165 -168
- package/src/cli/core/templates/alephaConfigTs.ts +1 -1
- package/src/cli/core/templates/apiAppSecurityTs.ts +5 -8
- package/src/cli/core/templates/tsconfigJson.ts +6 -1
- package/src/cli/platform/adapters/CloudflareAdapter.spec.ts +1 -1
- package/src/cli/platform/adapters/CloudflareAdapter.ts +30 -29
- package/src/cli/platform/atoms/platformOptions.ts +21 -0
- package/src/cli/platform/commands/SecretsCommand.spec.ts +298 -0
- package/src/cli/platform/commands/SecretsCommand.ts +283 -0
- package/src/cli/platform/commands/platform.ts +12 -0
- package/src/cli/platform/index.ts +14 -28
- package/src/cli/platform/providers/GitHubSecretStore.spec.ts +153 -0
- package/src/cli/platform/providers/GitHubSecretStore.ts +112 -0
- package/src/cli/platform/providers/MemorySecretStore.ts +114 -0
- package/src/cli/platform/providers/SecretStoreProvider.ts +39 -0
- package/src/cli/platform/schemas/cloudflare.ts +2 -0
- package/src/cli/platform/services/CloudflareApi.ts +5 -2
- package/src/cli/platform/services/DockerComposeGenerator.spec.ts +115 -0
- package/src/cli/platform/services/DockerComposeGenerator.ts +46 -1
- package/src/cli/platform/services/SecretFilterService.spec.ts +111 -0
- package/src/cli/platform/services/SecretFilterService.ts +54 -0
- package/src/core/Alepha.ts +94 -25
- package/src/core/__tests__/Alepha-parseEnv.spec.ts +20 -0
- package/src/core/primitives/$memoize.ts +38 -26
- package/src/core/providers/AlsProvider.ts +2 -0
- package/src/core/providers/EventManager.ts +4 -0
- package/src/core/providers/KeylessJsonSchemaCodec.spec.ts +1 -4
- package/src/core/providers/KeylessJsonSchemaCodec.ts +19 -125
- package/src/core/providers/SchemaValidator.spec.ts +36 -0
- package/src/core/providers/SchemaValidator.ts +9 -0
- package/src/crypto/index.ts +6 -1
- package/src/crypto/providers/SecretProvider.ts +36 -0
- package/src/devtools/providers/DevToolsProvider.ts +3 -12
- package/src/logger/index.ts +33 -6
- package/src/logger/providers/PrettyFormatterProvider.ts +5 -3
- package/src/orm/__tests__/orm-next-tests.ts +492 -0
- package/src/orm/__tests__/orm-next.spec.ts +140 -0
- package/src/orm/core/constants/PG_SYMBOLS.ts +17 -0
- package/src/orm/core/index.bun.ts +3 -6
- package/src/orm/core/index.shared-server.ts +2 -0
- package/src/orm/core/index.shared.ts +2 -0
- package/src/orm/core/index.ts +5 -7
- package/src/orm/core/interfaces/AggregateQuery.ts +103 -0
- package/src/orm/core/interfaces/PgQueryWhere.ts +7 -0
- package/src/orm/core/primitives/$entity.ts +8 -0
- package/src/orm/core/primitives/$repository.ts +6 -3
- package/src/orm/core/primitives/$view.ts +88 -0
- package/src/orm/core/providers/DbCacheProvider.ts +66 -0
- package/src/orm/core/providers/DrizzleKitProvider.ts +42 -0
- package/src/orm/core/providers/drivers/BunSqliteProvider.ts +2 -3
- package/src/orm/core/providers/drivers/CloudflareD1Provider.ts +12 -0
- package/src/orm/core/providers/drivers/DatabaseProvider.ts +39 -0
- package/src/orm/core/providers/drivers/NodeSqliteProvider.ts +2 -3
- package/src/orm/core/schemas/databaseEnvSchema.ts +31 -0
- package/src/orm/core/schemas/insertSchema.ts +13 -3
- package/src/orm/core/schemas/updateSchema.ts +14 -3
- package/src/orm/core/services/ModelBuilder.ts +26 -14
- package/src/orm/core/services/QueryManager.ts +13 -0
- package/src/orm/core/services/Repository.ts +307 -5
- package/src/orm/core/services/SqliteModelBuilder.ts +38 -0
- package/src/orm/postgres/index.bun.ts +4 -7
- package/src/orm/postgres/index.ts +4 -7
- package/src/orm/postgres/providers/BunPostgresProvider.ts +12 -2
- package/src/orm/postgres/providers/NodePostgresProvider.ts +7 -0
- package/src/orm/postgres/providers/PglitePostgresProvider.ts +10 -17
- package/src/orm/postgres/providers/PostgresProvider.ts +7 -36
- package/src/orm/postgres/schemas/postgresEnvSchema.ts +32 -0
- package/src/orm/postgres/services/PostgresModelBuilder.ts +40 -0
- package/src/react/core/components/ErrorBoundary.tsx +5 -2
- package/src/react/form/hooks/useFieldValue.ts +34 -0
- package/src/react/form/hooks/useForm.browser.spec.tsx +94 -9
- package/src/react/form/hooks/useForm.ts +14 -2
- package/src/react/form/hooks/useFormState.ts +10 -10
- package/src/react/form/hooks/useFormValues.ts +29 -0
- package/src/react/form/index.ts +3 -1
- package/src/react/form/services/FormModel.ts +53 -122
- package/src/react/router/components/ErrorViewer.tsx +333 -34
- package/src/react/router/components/NestedView.tsx +10 -3
- package/src/react/router/primitives/$page.browser.spec.tsx +34 -0
- package/src/react/router/primitives/$page.spec.tsx +20 -0
- package/src/react/router/primitives/$page.ts +24 -0
- package/src/react/router/providers/ReactBrowserRouterProvider.ts +14 -2
- package/src/react/router/providers/ReactPageProvider.ts +156 -73
- package/src/react/router/providers/ReactServerProvider.ts +40 -2
- package/src/react/router/providers/ReactServerTemplateProvider.ts +13 -1
- package/src/security/providers/SecurityProvider.ts +5 -27
- package/src/server/auth/primitives/$auth.ts +52 -19
- package/src/server/auth/providers/ServerAuthProvider.ts +145 -139
- package/src/server/cookies/providers/ServerCookiesProvider.ts +12 -24
- package/src/server/core/index.ts +3 -1
- package/src/server/core/primitives/$sse.spec.ts +315 -0
- package/src/server/core/primitives/$sse.ts +715 -0
- package/src/server/links/index.browser.ts +1 -3
- package/src/server/links/index.ts +0 -3
- package/src/server/links/providers/LinkProvider.spec.ts +12 -21
- package/src/server/links/providers/LinkProvider.ts +20 -52
- package/src/server/links/providers/ServerLinksProvider.spec.ts +106 -0
- package/src/server/links/providers/ServerLinksProvider.ts +113 -73
- package/src/server/links/schemas/apiLinksResponseSchema.ts +4 -21
- package/src/server/links/services/BatchCollector.ts +5 -3
- package/src/system/index.browser.ts +1 -0
- package/src/system/index.ts +3 -0
- package/src/system/index.workerd.ts +39 -1
- package/src/system/providers/WorkerdFileSystemProvider.ts +365 -0
- package/assets/devtools-ui/asset.BfSBZ5Dd.css.br +0 -0
- package/assets/devtools-ui/chunk.2NYaoqWt.js +0 -1
- package/assets/devtools-ui/chunk.2NYaoqWt.js.br +0 -0
- package/assets/devtools-ui/chunk.B052Z_xQ.js +0 -1
- package/assets/devtools-ui/chunk.B052Z_xQ.js.br +0 -0
- package/assets/devtools-ui/chunk.B4kVY90C.js +0 -1
- package/assets/devtools-ui/chunk.B4kVY90C.js.br +0 -0
- package/assets/devtools-ui/chunk.B7QJXctB.js +0 -1
- package/assets/devtools-ui/chunk.B7QJXctB.js.br +0 -0
- package/assets/devtools-ui/chunk.B9pX3zit.js.br +0 -0
- package/assets/devtools-ui/chunk.BKF9JxIo.js +0 -1
- package/assets/devtools-ui/chunk.BKF9JxIo.js.br +0 -0
- package/assets/devtools-ui/chunk.BOHgdTP-.js +0 -1
- package/assets/devtools-ui/chunk.BOHgdTP-.js.br +0 -0
- package/assets/devtools-ui/chunk.BOVFxkYC.js +0 -1
- package/assets/devtools-ui/chunk.BOVFxkYC.js.br +0 -0
- package/assets/devtools-ui/chunk.BR842zj5.js +0 -1
- package/assets/devtools-ui/chunk.BR842zj5.js.br +0 -0
- package/assets/devtools-ui/chunk.BT2IiBkZ.js.br +0 -0
- package/assets/devtools-ui/chunk.C79YouPp.js.br +0 -0
- package/assets/devtools-ui/chunk.C8mlBrjW.js +0 -9
- package/assets/devtools-ui/chunk.C8mlBrjW.js.br +0 -0
- package/assets/devtools-ui/chunk.CK0ow3AZ.js +0 -1
- package/assets/devtools-ui/chunk.CK0ow3AZ.js.br +0 -0
- package/assets/devtools-ui/chunk.CZl6J9DF.js.br +0 -0
- package/assets/devtools-ui/chunk.CdNr0YzS.js +0 -1
- package/assets/devtools-ui/chunk.CdNr0YzS.js.br +0 -0
- package/assets/devtools-ui/chunk.Ce6_6iIF.js +0 -1
- package/assets/devtools-ui/chunk.Ce6_6iIF.js.br +0 -0
- package/assets/devtools-ui/chunk.CpyDMr6O.js +0 -1
- package/assets/devtools-ui/chunk.CpyDMr6O.js.br +0 -0
- package/assets/devtools-ui/chunk.CyPmvPnY.js +0 -1
- package/assets/devtools-ui/chunk.CyPmvPnY.js.br +0 -0
- package/assets/devtools-ui/chunk.DTI_geWu.js +0 -1
- package/assets/devtools-ui/chunk.DTI_geWu.js.br +0 -0
- package/assets/devtools-ui/chunk.DbEH1oOB.js.br +0 -0
- package/assets/devtools-ui/chunk.Ddeqj5gv.js +0 -1
- package/assets/devtools-ui/chunk.Ddeqj5gv.js.br +0 -0
- package/assets/devtools-ui/chunk.DpRnB4vJ.js +0 -1
- package/assets/devtools-ui/chunk.DpRnB4vJ.js.br +0 -0
- package/assets/devtools-ui/chunk.DxPGTlsg.js +0 -1
- package/assets/devtools-ui/chunk.DxPGTlsg.js.br +0 -0
- package/assets/devtools-ui/chunk.G7_MMBJS.js +0 -1
- package/assets/devtools-ui/chunk.G7_MMBJS.js.br +0 -0
- package/assets/devtools-ui/chunk.M6wyKO_3.js.br +0 -0
- package/assets/devtools-ui/chunk.OUxNGmQ6.js +0 -1
- package/assets/devtools-ui/chunk.OUxNGmQ6.js.br +0 -0
- package/assets/devtools-ui/chunk.T1kle-fF.js +0 -1
- package/assets/devtools-ui/chunk.T1kle-fF.js.br +0 -0
- package/assets/devtools-ui/chunk.WjpsbQAv.js +0 -1
- package/assets/devtools-ui/chunk.WjpsbQAv.js.br +0 -0
- package/assets/devtools-ui/chunk.c6YgVx86.js +0 -1
- package/assets/devtools-ui/chunk.c6YgVx86.js.br +0 -0
- package/assets/devtools-ui/chunk.dwU3E_MU.js +0 -1
- package/assets/devtools-ui/chunk.dwU3E_MU.js.br +0 -0
- package/assets/devtools-ui/chunk.lJL-lgnW.js.br +0 -0
- package/assets/devtools-ui/chunk.lPWRmvA-.js +0 -7
- package/assets/devtools-ui/chunk.lPWRmvA-.js.br +0 -0
- package/assets/devtools-ui/chunk.p3HJvugM.js +0 -1
- package/assets/devtools-ui/chunk.p3HJvugM.js.br +0 -0
- package/assets/devtools-ui/chunk.r_Xoa_CI.js +0 -1
- package/assets/devtools-ui/chunk.r_Xoa_CI.js.br +0 -0
- package/assets/devtools-ui/chunk.sRNuTYXb.js +0 -1
- package/assets/devtools-ui/chunk.sRNuTYXb.js.br +0 -0
- package/assets/devtools-ui/chunk.tUjcyX5C.js +0 -1
- package/assets/devtools-ui/chunk.tUjcyX5C.js.br +0 -0
- package/assets/devtools-ui/chunk.thjBxvCA.js +0 -1
- package/assets/devtools-ui/chunk.thjBxvCA.js.br +0 -0
- package/assets/devtools-ui/entry.GYhBVRpC.js +0 -78
- package/assets/devtools-ui/entry.GYhBVRpC.js.br +0 -0
- package/src/server/links/services/DefinitionsPool.spec.ts +0 -86
- package/src/server/links/services/DefinitionsPool.ts +0 -43
|
@@ -17,6 +17,7 @@ import * as alepha_api_jobs0 from "alepha/api/jobs";
|
|
|
17
17
|
import * as alepha_api_parameters0 from "alepha/api/parameters";
|
|
18
18
|
import { VerificationController } from "alepha/api/verifications";
|
|
19
19
|
import "drizzle-orm/d1";
|
|
20
|
+
import * as typebox from "typebox";
|
|
20
21
|
import * as drizzle_orm0 from "drizzle-orm";
|
|
21
22
|
import { BuildExtraConfigColumns, SQL, SQLWrapper } from "drizzle-orm";
|
|
22
23
|
import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
|
|
@@ -26,29 +27,32 @@ import { LibSQLDatabase } from "drizzle-orm/libsql";
|
|
|
26
27
|
import { MySql2Database } from "drizzle-orm/mysql2";
|
|
27
28
|
import { SingleStoreDriverDatabase } from "drizzle-orm/singlestore";
|
|
28
29
|
import { ConnectionOptions } from "tls";
|
|
29
|
-
import * as typebox from "typebox";
|
|
30
30
|
import "drizzle-orm/sqlite-core";
|
|
31
31
|
import { FileController } from "alepha/api/files";
|
|
32
32
|
|
|
33
33
|
//#region \0rolldown/runtime.js
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region ../../src/api/users/atoms/realmAuthSettingsAtom.d.ts
|
|
36
|
+
/**
|
|
37
|
+
* Tri-state field requirement for realm auth settings.
|
|
38
|
+
*
|
|
39
|
+
* - `"none"`: Field is disabled and not shown.
|
|
40
|
+
* - `"optional"`: Field is shown but not required.
|
|
41
|
+
* - `"required"`: Field is shown and required.
|
|
42
|
+
*/
|
|
43
|
+
type FieldRequirement = "none" | "optional" | "required";
|
|
36
44
|
declare const realmAuthSettingsAtom: alepha.Atom<alepha.TObject<{
|
|
37
45
|
displayName: alepha.TOptional<alepha.TString>;
|
|
38
46
|
description: alepha.TOptional<alepha.TString>;
|
|
39
47
|
logoUrl: alepha.TOptional<alepha.TString>;
|
|
40
48
|
registrationAllowed: alepha.TBoolean;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
usernameEnabled: alepha.TBoolean;
|
|
44
|
-
usernameRequired: alepha.TBoolean;
|
|
49
|
+
email: alepha.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
50
|
+
username: alepha.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
45
51
|
usernameRegExp: alepha.TString;
|
|
46
|
-
|
|
47
|
-
phoneRequired: alepha.TBoolean;
|
|
52
|
+
phoneNumber: alepha.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
48
53
|
verifyEmailRequired: alepha.TBoolean;
|
|
49
54
|
verifyPhoneRequired: alepha.TBoolean;
|
|
50
|
-
|
|
51
|
-
firstNameLastNameRequired: alepha.TBoolean;
|
|
55
|
+
firstNameLastName: alepha.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
52
56
|
resetPasswordAllowed: alepha.TBoolean;
|
|
53
57
|
adminEmails: alepha.TArray<alepha.TString>;
|
|
54
58
|
adminUsernames: alepha.TArray<alepha.TString>;
|
|
@@ -66,12 +70,15 @@ type RealmAuthSettings = Static<typeof realmAuthSettingsAtom.schema>;
|
|
|
66
70
|
/**
|
|
67
71
|
* Transforms a TObject schema for insert operations.
|
|
68
72
|
* All default properties at the root level are made optional.
|
|
73
|
+
* Generated columns are excluded entirely.
|
|
69
74
|
*
|
|
70
75
|
* @example
|
|
71
|
-
* Before: { name: string; age: number(default=0); }
|
|
76
|
+
* Before: { name: string; age: number(default=0); fullName: generated }
|
|
72
77
|
* After: { name: string; age?: number; }
|
|
73
78
|
*/
|
|
74
|
-
type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"]
|
|
79
|
+
type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"] as T["properties"][K] extends {
|
|
80
|
+
[PG_GENERATED]: any;
|
|
81
|
+
} ? never : K]: T["properties"][K] extends {
|
|
75
82
|
[PG_DEFAULT]: any;
|
|
76
83
|
} | {
|
|
77
84
|
"~optional": true;
|
|
@@ -81,13 +88,15 @@ type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"]]:
|
|
|
81
88
|
/**
|
|
82
89
|
* Transforms a TObject schema for update operations.
|
|
83
90
|
* All optional properties at the root level are made nullable (i.e., `T | null`).
|
|
84
|
-
*
|
|
91
|
+
* Generated columns are excluded entirely.
|
|
85
92
|
*
|
|
86
93
|
* @example
|
|
87
|
-
* Before: { name?: string; age: number; }
|
|
94
|
+
* Before: { name?: string; age: number; fullName: generated }
|
|
88
95
|
* After: { name?: string | null; age: number; }
|
|
89
96
|
*/
|
|
90
|
-
type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"]
|
|
97
|
+
type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"] as T["properties"][K] extends {
|
|
98
|
+
[PG_GENERATED]: any;
|
|
99
|
+
} ? never : K]: T["properties"][K] extends TOptional<infer U> ? TOptional<TUnion<[U, TNull]>> : T["properties"][K] }>;
|
|
91
100
|
//#endregion
|
|
92
101
|
//#region ../../src/orm/core/primitives/$entity.d.ts
|
|
93
102
|
interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
|
|
@@ -116,6 +125,10 @@ interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
|
|
|
116
125
|
* Custom name for the index. If not provided, generates name automatically.
|
|
117
126
|
*/
|
|
118
127
|
name?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Partial index condition. Only rows matching this SQL expression are indexed.
|
|
130
|
+
*/
|
|
131
|
+
where?: SQL;
|
|
119
132
|
} | {
|
|
120
133
|
/**
|
|
121
134
|
* Multiple columns for composite index (order matters for query optimization).
|
|
@@ -129,6 +142,10 @@ interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
|
|
|
129
142
|
* Custom name for the index. If not provided, generates name automatically.
|
|
130
143
|
*/
|
|
131
144
|
name?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Partial index condition. Only rows matching this SQL expression are indexed.
|
|
147
|
+
*/
|
|
148
|
+
where?: SQL;
|
|
132
149
|
})[];
|
|
133
150
|
/**
|
|
134
151
|
* Foreign key constraints to maintain referential integrity.
|
|
@@ -238,6 +255,7 @@ declare const PG_VERSION: unique symbol;
|
|
|
238
255
|
declare const PG_IDENTITY: unique symbol;
|
|
239
256
|
declare const PG_ENUM: unique symbol;
|
|
240
257
|
declare const PG_REF: unique symbol;
|
|
258
|
+
declare const PG_GENERATED: unique symbol;
|
|
241
259
|
/**
|
|
242
260
|
* @deprecated Use `PG_IDENTITY` instead.
|
|
243
261
|
*/
|
|
@@ -252,6 +270,7 @@ type PgSymbols = {
|
|
|
252
270
|
[PG_IDENTITY]: PgIdentityOptions;
|
|
253
271
|
[PG_REF]: PgRefOptions;
|
|
254
272
|
[PG_ENUM]: PgEnumOptions;
|
|
273
|
+
[PG_GENERATED]: PgGeneratedOptions;
|
|
255
274
|
/**
|
|
256
275
|
* @deprecated Use `PG_IDENTITY` instead.
|
|
257
276
|
*/
|
|
@@ -267,6 +286,18 @@ interface PgEnumOptions {
|
|
|
267
286
|
name?: string;
|
|
268
287
|
description?: string;
|
|
269
288
|
}
|
|
289
|
+
interface PgGeneratedOptions {
|
|
290
|
+
/**
|
|
291
|
+
* SQL expression for the generated column.
|
|
292
|
+
*/
|
|
293
|
+
expression: SQL;
|
|
294
|
+
/**
|
|
295
|
+
* Storage mode for the generated column.
|
|
296
|
+
* - `"stored"` — value is computed on write and stored on disk (default for PostgreSQL).
|
|
297
|
+
* - `"virtual"` — value is computed on read (default for SQLite).
|
|
298
|
+
*/
|
|
299
|
+
mode?: "stored" | "virtual";
|
|
300
|
+
}
|
|
270
301
|
interface PgRefOptions {
|
|
271
302
|
ref: () => {
|
|
272
303
|
name: string;
|
|
@@ -821,6 +852,12 @@ type PgQueryWhereConditions<T extends TObject, Relations extends PgRelationMap<T
|
|
|
821
852
|
* @see notExists for the inverse of this test
|
|
822
853
|
*/
|
|
823
854
|
exists?: SQLWrapper;
|
|
855
|
+
/**
|
|
856
|
+
* Test whether a subquery evaluates to have no rows.
|
|
857
|
+
*
|
|
858
|
+
* @see exists for the inverse of this test
|
|
859
|
+
*/
|
|
860
|
+
notExists?: SQLWrapper;
|
|
824
861
|
};
|
|
825
862
|
type PgQueryWhereRelations<Relations extends PgRelationMap<TObject> | undefined = undefined> = Relations extends PgRelationMap<TObject> ? { [K in keyof Relations]?: PgQueryWhere<Relations[K]["join"]["schema"], Relations[K]["with"]> } : {};
|
|
826
863
|
//#endregion
|
|
@@ -837,6 +874,136 @@ interface PgAttrField {
|
|
|
837
874
|
one?: boolean;
|
|
838
875
|
}
|
|
839
876
|
//#endregion
|
|
877
|
+
//#region ../../src/orm/core/interfaces/AggregateQuery.d.ts
|
|
878
|
+
type AggregateOp = "count" | "sum" | "avg" | "min" | "max";
|
|
879
|
+
/**
|
|
880
|
+
* Select definition for aggregate queries.
|
|
881
|
+
* - `true` means select the column value as-is (used for groupBy columns).
|
|
882
|
+
* - `{ sum: true, avg: true, ... }` means compute those aggregations.
|
|
883
|
+
*/
|
|
884
|
+
type AggregateColumnSelect = true | Partial<Record<AggregateOp, true>>;
|
|
885
|
+
type AggregateSelect<T extends TObject> = { [K in keyof Static<T>]?: AggregateColumnSelect };
|
|
886
|
+
/**
|
|
887
|
+
* Maps a single column's select definition to its result type.
|
|
888
|
+
* - `true` → original column type
|
|
889
|
+
* - `{ sum: true, avg: true }` → `{ sum: number; avg: number }`
|
|
890
|
+
*/
|
|
891
|
+
type AggregateColumnResult<TValue, TSelect> = TSelect extends true ? TValue : { [Op in AggregateOp as TSelect extends Record<Op, true> ? Op : never]: number };
|
|
892
|
+
/**
|
|
893
|
+
* Result type for an aggregate query.
|
|
894
|
+
*/
|
|
895
|
+
type AggregateResult<T extends TObject, S extends AggregateSelect<T>> = { [K in keyof S & keyof Static<T>]: AggregateColumnResult<Static<T>[K], NonNullable<S[K]>> };
|
|
896
|
+
/**
|
|
897
|
+
* HAVING clause for aggregate queries.
|
|
898
|
+
* Only applies to columns with aggregate operations (not `true`).
|
|
899
|
+
*/
|
|
900
|
+
type AggregateHaving<T extends TObject, S extends AggregateSelect<T>> = { [K in keyof S & keyof Static<T>]?: S[K] extends true ? never : { [Op in AggregateOp as S[K] extends Record<Op, true> ? Op : never]?: {
|
|
901
|
+
gt?: number;
|
|
902
|
+
gte?: number;
|
|
903
|
+
lt?: number;
|
|
904
|
+
lte?: number;
|
|
905
|
+
eq?: number;
|
|
906
|
+
ne?: number;
|
|
907
|
+
} } };
|
|
908
|
+
/**
|
|
909
|
+
* Full aggregate query definition.
|
|
910
|
+
*/
|
|
911
|
+
interface AggregateQuery<T extends TObject, S extends AggregateSelect<T>> {
|
|
912
|
+
/**
|
|
913
|
+
* Columns and aggregate operations to select.
|
|
914
|
+
*/
|
|
915
|
+
select: S;
|
|
916
|
+
/**
|
|
917
|
+
* WHERE clause to filter rows before aggregation.
|
|
918
|
+
*/
|
|
919
|
+
where?: PgQueryWhereOrSQL<T>;
|
|
920
|
+
/**
|
|
921
|
+
* Columns to group by.
|
|
922
|
+
*/
|
|
923
|
+
groupBy?: (keyof Static<T>)[];
|
|
924
|
+
/**
|
|
925
|
+
* HAVING clause to filter groups after aggregation.
|
|
926
|
+
*/
|
|
927
|
+
having?: AggregateHaving<T, S>;
|
|
928
|
+
/**
|
|
929
|
+
* Order results. Supports dot notation for aggregate columns (e.g. "amount.sum").
|
|
930
|
+
*/
|
|
931
|
+
orderBy?: string | {
|
|
932
|
+
column: string;
|
|
933
|
+
direction: "asc" | "desc";
|
|
934
|
+
} | Array<{
|
|
935
|
+
column: string;
|
|
936
|
+
direction: "asc" | "desc";
|
|
937
|
+
}>;
|
|
938
|
+
/**
|
|
939
|
+
* Limit the number of results.
|
|
940
|
+
*/
|
|
941
|
+
limit?: number;
|
|
942
|
+
/**
|
|
943
|
+
* Offset for pagination.
|
|
944
|
+
*/
|
|
945
|
+
offset?: number;
|
|
946
|
+
}
|
|
947
|
+
//#endregion
|
|
948
|
+
//#region ../../src/orm/core/primitives/$view.d.ts
|
|
949
|
+
interface ViewPrimitiveOptions<T extends TObject> {
|
|
950
|
+
/**
|
|
951
|
+
* The database view name.
|
|
952
|
+
*/
|
|
953
|
+
name: string;
|
|
954
|
+
/**
|
|
955
|
+
* TypeBox schema defining the view's columns.
|
|
956
|
+
*/
|
|
957
|
+
schema: T;
|
|
958
|
+
/**
|
|
959
|
+
* SQL query that defines the view.
|
|
960
|
+
*/
|
|
961
|
+
query: SQL;
|
|
962
|
+
/**
|
|
963
|
+
* Whether this is a materialized view (PostgreSQL only).
|
|
964
|
+
* Materialized views store results on disk and can be refreshed.
|
|
965
|
+
*/
|
|
966
|
+
materialized?: boolean;
|
|
967
|
+
}
|
|
968
|
+
declare class ViewPrimitive<T extends TObject = TObject> {
|
|
969
|
+
readonly options: ViewPrimitiveOptions<T>;
|
|
970
|
+
readonly isView = true;
|
|
971
|
+
constructor(options: ViewPrimitiveOptions<T>);
|
|
972
|
+
get name(): string;
|
|
973
|
+
get schema(): T;
|
|
974
|
+
get materialized(): boolean;
|
|
975
|
+
}
|
|
976
|
+
//#endregion
|
|
977
|
+
//#region ../../src/orm/core/providers/DbCacheProvider.d.ts
|
|
978
|
+
/**
|
|
979
|
+
* Database query cache using a simple in-memory Map.
|
|
980
|
+
*
|
|
981
|
+
* Uses `{tableName}:{cacheKey}` as the storage key.
|
|
982
|
+
* Provides per-table invalidation for write-through cache busting.
|
|
983
|
+
*
|
|
984
|
+
* This is intentionally self-contained (no external cache dependencies)
|
|
985
|
+
* so the ORM module does not force `AlephaCache` on all consumers.
|
|
986
|
+
*/
|
|
987
|
+
declare class DbCacheProvider {
|
|
988
|
+
protected readonly store: Map<string, {
|
|
989
|
+
value: unknown;
|
|
990
|
+
expiresAt?: number;
|
|
991
|
+
}>;
|
|
992
|
+
protected storeKey(tableName: string, cacheKey: string): string;
|
|
993
|
+
/**
|
|
994
|
+
* Get a cached query result.
|
|
995
|
+
*/
|
|
996
|
+
get<T>(tableName: string, cacheKey: string): Promise<T | undefined>;
|
|
997
|
+
/**
|
|
998
|
+
* Store a query result in the cache.
|
|
999
|
+
*/
|
|
1000
|
+
set<T>(tableName: string, cacheKey: string, value: T, ttl?: number): Promise<void>;
|
|
1001
|
+
/**
|
|
1002
|
+
* Invalidate all cached queries for a table.
|
|
1003
|
+
*/
|
|
1004
|
+
invalidateTable(tableName: string): Promise<void>;
|
|
1005
|
+
}
|
|
1006
|
+
//#endregion
|
|
840
1007
|
//#region ../../src/orm/core/primitives/$sequence.d.ts
|
|
841
1008
|
interface SequencePrimitiveOptions extends PgSequenceOptions {
|
|
842
1009
|
/**
|
|
@@ -889,6 +1056,13 @@ declare abstract class ModelBuilder {
|
|
|
889
1056
|
schemas: Map<string, unknown>;
|
|
890
1057
|
schema: string;
|
|
891
1058
|
}): void;
|
|
1059
|
+
/**
|
|
1060
|
+
* Build a view from a view primitive.
|
|
1061
|
+
*/
|
|
1062
|
+
abstract buildView(view: ViewPrimitive, options: {
|
|
1063
|
+
tables: Map<string, unknown>;
|
|
1064
|
+
schema: string;
|
|
1065
|
+
}): void;
|
|
892
1066
|
/**
|
|
893
1067
|
* Build a sequence from a sequence primitive.
|
|
894
1068
|
*/
|
|
@@ -5755,6 +5929,17 @@ declare class DrizzleKitProvider {
|
|
|
5755
5929
|
* The actual schema is applied at migration execution time via `search_path`.
|
|
5756
5930
|
*/
|
|
5757
5931
|
getModelsWithoutSchema(provider: DatabaseProvider): Record<string, unknown>;
|
|
5932
|
+
/**
|
|
5933
|
+
* Preview schema push without executing any statements.
|
|
5934
|
+
*
|
|
5935
|
+
* Returns the SQL statements that would be executed, warnings, and
|
|
5936
|
+
* whether data loss would occur. Does NOT execute any SQL.
|
|
5937
|
+
*/
|
|
5938
|
+
dryRunPush(provider: DatabaseProvider): Promise<{
|
|
5939
|
+
statements: string[];
|
|
5940
|
+
warnings: string[];
|
|
5941
|
+
hasDataLoss: boolean;
|
|
5942
|
+
}>;
|
|
5758
5943
|
protected pushSqlite(kit: typeof api_d_exports, models: Record<string, unknown>, provider: DatabaseProvider): Promise<void>;
|
|
5759
5944
|
/**
|
|
5760
5945
|
* Push schema changes to PostgreSQL using Drizzle Kit's pushSchema with schema filters.
|
|
@@ -5815,6 +6000,12 @@ declare abstract class DatabaseProvider {
|
|
|
5815
6000
|
protected readonly sequencePrimitives: SequencePrimitive[];
|
|
5816
6001
|
get name(): string;
|
|
5817
6002
|
get driver(): string;
|
|
6003
|
+
/**
|
|
6004
|
+
* Whether this driver supports SQL-level transactions (BEGIN/COMMIT/ROLLBACK).
|
|
6005
|
+
*
|
|
6006
|
+
* Drivers that do not (e.g. PGlite, Cloudflare D1) should override to `false`.
|
|
6007
|
+
*/
|
|
6008
|
+
get supportsTransactions(): boolean;
|
|
5818
6009
|
/**
|
|
5819
6010
|
* Raw database connection handle (e.g. DatabaseSync, bun:sqlite Database).
|
|
5820
6011
|
* Override in providers that expose native connections for introspection.
|
|
@@ -5836,6 +6027,7 @@ declare abstract class DatabaseProvider {
|
|
|
5836
6027
|
protected parseOperation(sql: string): string;
|
|
5837
6028
|
table<T extends TObject>(entity: EntityPrimitive<T>): PgTableWithColumns<SchemaToTableConfig<T>>;
|
|
5838
6029
|
registerEntity(entity: EntityPrimitive): void;
|
|
6030
|
+
registerView(view: ViewPrimitive): void;
|
|
5839
6031
|
registerSequence(sequence: SequencePrimitive): void;
|
|
5840
6032
|
/**
|
|
5841
6033
|
* Rebuild all models into fresh maps using a different schema.
|
|
@@ -5990,6 +6182,7 @@ declare abstract class Repository$1<T extends TObject> {
|
|
|
5990
6182
|
protected readonly relationManager: PgRelationManager;
|
|
5991
6183
|
protected readonly queryManager: QueryManager;
|
|
5992
6184
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
6185
|
+
protected readonly dbCache: DbCacheProvider;
|
|
5993
6186
|
protected readonly alepha: Alepha;
|
|
5994
6187
|
static of<T extends TObject>(entity: EntityPrimitive<T>, provider?: typeof DatabaseProvider): new () => Repository$1<T>;
|
|
5995
6188
|
constructor(entity: EntityPrimitive<T>, provider?: typeof DatabaseProvider);
|
|
@@ -6013,6 +6206,10 @@ declare abstract class Repository$1<T extends TObject> {
|
|
|
6013
6206
|
* Get SQL table name. (from Drizzle table object)
|
|
6014
6207
|
*/
|
|
6015
6208
|
get tableName(): string;
|
|
6209
|
+
/**
|
|
6210
|
+
* Whether this repository is backed by a view (read-only).
|
|
6211
|
+
*/
|
|
6212
|
+
get isReadOnly(): boolean;
|
|
6016
6213
|
/**
|
|
6017
6214
|
* Getter for the database connection from the database provider.
|
|
6018
6215
|
*
|
|
@@ -6244,6 +6441,21 @@ declare abstract class Repository$1<T extends TObject> {
|
|
|
6244
6441
|
* Count entities.
|
|
6245
6442
|
*/
|
|
6246
6443
|
count(where?: PgQueryWhereOrSQL<T>, opts?: StatementOptions): Promise<number>;
|
|
6444
|
+
/**
|
|
6445
|
+
* Execute an aggregate query with type-safe select, groupBy, and having.
|
|
6446
|
+
*
|
|
6447
|
+
* @example
|
|
6448
|
+
* ```ts
|
|
6449
|
+
* const result = await repo.aggregate({
|
|
6450
|
+
* select: { category: true, amount: { sum: true, avg: true } },
|
|
6451
|
+
* groupBy: ["category"],
|
|
6452
|
+
* having: { amount: { sum: { gt: 100 } } },
|
|
6453
|
+
* orderBy: { column: "amount.sum", direction: "desc" },
|
|
6454
|
+
* });
|
|
6455
|
+
* // result: Array<{ category: string; amount: { sum: number; avg: number } }>
|
|
6456
|
+
* ```
|
|
6457
|
+
*/
|
|
6458
|
+
aggregate<S extends AggregateSelect<T>>(query: AggregateQuery<T, S>, opts?: StatementOptions): Promise<AggregateResult<T, S>[]>;
|
|
6247
6459
|
protected errorPatterns: {
|
|
6248
6460
|
conflict: string[];
|
|
6249
6461
|
foreignKey: string[];
|
|
@@ -6269,6 +6481,18 @@ declare abstract class Repository$1<T extends TObject> {
|
|
|
6269
6481
|
* Clean a row with joins recursively
|
|
6270
6482
|
*/
|
|
6271
6483
|
protected cleanWithJoins<T extends TObject>(row: Record<string, unknown>, schema: T, joins: PgJoin[], parentPath?: string): Static<T>;
|
|
6484
|
+
/**
|
|
6485
|
+
* Throw if this repository is read-only (backed by a view).
|
|
6486
|
+
*/
|
|
6487
|
+
protected assertWritable(): void;
|
|
6488
|
+
/**
|
|
6489
|
+
* Refresh a materialized view. PostgreSQL only.
|
|
6490
|
+
*/
|
|
6491
|
+
refresh(): Promise<void>;
|
|
6492
|
+
/**
|
|
6493
|
+
* Build a cache key from method name and query parameters.
|
|
6494
|
+
*/
|
|
6495
|
+
protected buildCacheKey(method: string, query: any): string;
|
|
6272
6496
|
/**
|
|
6273
6497
|
* Convert a where clause to SQL.
|
|
6274
6498
|
*/
|
|
@@ -6316,9 +6540,59 @@ interface StatementOptions {
|
|
|
6316
6540
|
* Force the current time.
|
|
6317
6541
|
*/
|
|
6318
6542
|
now?: DateTime | string;
|
|
6543
|
+
/**
|
|
6544
|
+
* Cache configuration for query results.
|
|
6545
|
+
*
|
|
6546
|
+
* When set, results are stored in an in-memory cache keyed by query parameters.
|
|
6547
|
+
* Any write to this table automatically invalidates all cached queries.
|
|
6548
|
+
*
|
|
6549
|
+
* @example
|
|
6550
|
+
* ```ts
|
|
6551
|
+
* await repo.findMany(query, { cache: { ttl: 60_000 } });
|
|
6552
|
+
* ```
|
|
6553
|
+
*/
|
|
6554
|
+
cache?: {
|
|
6555
|
+
/**
|
|
6556
|
+
* Time-to-live in milliseconds.
|
|
6557
|
+
*/
|
|
6558
|
+
ttl?: number;
|
|
6559
|
+
/**
|
|
6560
|
+
* Custom cache key. If not provided, a key is derived from the query.
|
|
6561
|
+
*/
|
|
6562
|
+
key?: string;
|
|
6563
|
+
};
|
|
6319
6564
|
}
|
|
6320
6565
|
type WithSQL<T> = { [P in keyof T]?: T[P] | SQL };
|
|
6321
6566
|
//#endregion
|
|
6567
|
+
//#region ../../src/orm/core/schemas/databaseEnvSchema.d.ts
|
|
6568
|
+
/**
|
|
6569
|
+
* Base database environment schema.
|
|
6570
|
+
*
|
|
6571
|
+
* Defines the `DATABASE_URL` connection string used by all ORM providers
|
|
6572
|
+
* to determine the database driver and connection target.
|
|
6573
|
+
*
|
|
6574
|
+
* Supported URL formats:
|
|
6575
|
+
* - `sqlite://:memory:` or `sqlite://./path/to/db` — SQLite (Node.js or Bun)
|
|
6576
|
+
* - `postgres://user:password@host:port/database` — PostgreSQL (Node.js or Bun)
|
|
6577
|
+
* - `pglite://:memory:` or `pglite://./path` — PGlite (embedded Postgres)
|
|
6578
|
+
* - `d1://BINDING_NAME` — Cloudflare D1
|
|
6579
|
+
* - `hyperdrive://BINDING_NAME` — Cloudflare Hyperdrive
|
|
6580
|
+
*/
|
|
6581
|
+
declare const databaseEnvSchema: alepha.TObject<{
|
|
6582
|
+
DATABASE_URL: alepha.TOptional<alepha.TString>;
|
|
6583
|
+
/**
|
|
6584
|
+
* Enable or disable push-based schema synchronization (drizzle-kit push).
|
|
6585
|
+
*
|
|
6586
|
+
* Defaults to `true` in development and test, `false` in production.
|
|
6587
|
+
* Set to `false` in development to skip automatic schema sync
|
|
6588
|
+
* (e.g. when managing migrations manually).
|
|
6589
|
+
*/
|
|
6590
|
+
DATABASE_SYNC: alepha.TOptional<alepha.TBoolean>;
|
|
6591
|
+
}>;
|
|
6592
|
+
declare module "alepha" {
|
|
6593
|
+
interface Env extends Partial<Static<typeof databaseEnvSchema>> {}
|
|
6594
|
+
} //# sourceMappingURL=databaseEnvSchema.d.ts.map
|
|
6595
|
+
//#endregion
|
|
6322
6596
|
//#region ../../src/api/users/audits/UserAudits.d.ts
|
|
6323
6597
|
type AuditContext = Omit<CreateAudit, "type" | "action">;
|
|
6324
6598
|
/**
|
|
@@ -6365,11 +6639,11 @@ declare class UserAudits {
|
|
|
6365
6639
|
requestId?: string | undefined;
|
|
6366
6640
|
errorMessage?: string | undefined;
|
|
6367
6641
|
type: string;
|
|
6368
|
-
id: string;
|
|
6369
|
-
createdAt: string;
|
|
6370
6642
|
action: string;
|
|
6371
6643
|
severity: "info" | "warning" | "critical";
|
|
6372
6644
|
success: boolean;
|
|
6645
|
+
id: string;
|
|
6646
|
+
createdAt: string;
|
|
6373
6647
|
}>;
|
|
6374
6648
|
/**
|
|
6375
6649
|
* Record an authentication-related audit event.
|
|
@@ -6407,11 +6681,11 @@ declare class UserAudits {
|
|
|
6407
6681
|
requestId?: string | undefined;
|
|
6408
6682
|
errorMessage?: string | undefined;
|
|
6409
6683
|
type: string;
|
|
6410
|
-
id: string;
|
|
6411
|
-
createdAt: string;
|
|
6412
6684
|
action: string;
|
|
6413
6685
|
severity: "info" | "warning" | "critical";
|
|
6414
6686
|
success: boolean;
|
|
6687
|
+
id: string;
|
|
6688
|
+
createdAt: string;
|
|
6415
6689
|
}>;
|
|
6416
6690
|
/**
|
|
6417
6691
|
* Record a generic audit event.
|
|
@@ -6449,11 +6723,11 @@ declare class UserAudits {
|
|
|
6449
6723
|
requestId?: string | undefined;
|
|
6450
6724
|
errorMessage?: string | undefined;
|
|
6451
6725
|
type: string;
|
|
6452
|
-
id: string;
|
|
6453
|
-
createdAt: string;
|
|
6454
6726
|
action: string;
|
|
6455
6727
|
severity: "info" | "warning" | "critical";
|
|
6456
6728
|
success: boolean;
|
|
6729
|
+
id: string;
|
|
6730
|
+
createdAt: string;
|
|
6457
6731
|
}>;
|
|
6458
6732
|
}
|
|
6459
6733
|
//#endregion
|
|
@@ -6464,7 +6738,7 @@ declare class UserAudits {
|
|
|
6464
6738
|
* This service provides file storage for user-related files such as:
|
|
6465
6739
|
* - User avatars/profile pictures
|
|
6466
6740
|
*
|
|
6467
|
-
* It is lazy-loaded when the `
|
|
6741
|
+
* It is lazy-loaded when the `avatars` feature is enabled in the realm.
|
|
6468
6742
|
*/
|
|
6469
6743
|
declare class UserBuckets {
|
|
6470
6744
|
/**
|
|
@@ -6543,11 +6817,11 @@ type RealmPrimitive = IssuerPrimitive & WithLinkFn & WithLoginFn;
|
|
|
6543
6817
|
declare const $realm: (options?: RealmOptions) => RealmPrimitive;
|
|
6544
6818
|
interface RealmFeatures {
|
|
6545
6819
|
/**
|
|
6546
|
-
* Enable
|
|
6820
|
+
* Enable session purge functionality for cleaning up expired sessions.
|
|
6547
6821
|
*
|
|
6548
6822
|
* @default false
|
|
6549
6823
|
*/
|
|
6550
|
-
|
|
6824
|
+
sessionPurge?: boolean;
|
|
6551
6825
|
/**
|
|
6552
6826
|
* Enable notification system for password reset, verification emails, etc.
|
|
6553
6827
|
*
|
|
@@ -6570,25 +6844,6 @@ interface RealmFeatures {
|
|
|
6570
6844
|
* @default false
|
|
6571
6845
|
*/
|
|
6572
6846
|
apiKeys?: boolean;
|
|
6573
|
-
/**
|
|
6574
|
-
* Enable OAuth2 Authorization Server for third-party client authentication.
|
|
6575
|
-
*
|
|
6576
|
-
* When enabled, Alepha acts as an OAuth2 Authorization Server, allowing
|
|
6577
|
-
* third-party applications to authenticate users via standard OAuth2 flows:
|
|
6578
|
-
* - Authorization Code + PKCE (OAuth 2.1)
|
|
6579
|
-
* - Client Credentials (machine-to-machine)
|
|
6580
|
-
* - Refresh Token
|
|
6581
|
-
*
|
|
6582
|
-
* Also provides:
|
|
6583
|
-
* - Token introspection (RFC 7662)
|
|
6584
|
-
* - Token revocation (RFC 7009)
|
|
6585
|
-
* - AS metadata (RFC 8414)
|
|
6586
|
-
* - Protected Resource metadata (RFC 9728)
|
|
6587
|
-
* - MCP-compatible OAuth2 flow
|
|
6588
|
-
*
|
|
6589
|
-
* @default false
|
|
6590
|
-
*/
|
|
6591
|
-
clients?: boolean;
|
|
6592
6847
|
/**
|
|
6593
6848
|
* Enable runtime configuration management.
|
|
6594
6849
|
*
|
|
@@ -6598,23 +6853,17 @@ interface RealmFeatures {
|
|
|
6598
6853
|
*/
|
|
6599
6854
|
parameters?: boolean;
|
|
6600
6855
|
/**
|
|
6601
|
-
* Enable
|
|
6856
|
+
* Enable avatar uploads for user profiles.
|
|
6602
6857
|
*
|
|
6603
6858
|
* @default false
|
|
6604
6859
|
*/
|
|
6605
|
-
|
|
6860
|
+
avatars?: boolean;
|
|
6606
6861
|
/**
|
|
6607
6862
|
* Enable audit trail for compliance and event logging.
|
|
6608
6863
|
*
|
|
6609
6864
|
* @default false
|
|
6610
6865
|
*/
|
|
6611
6866
|
audits?: boolean;
|
|
6612
|
-
/**
|
|
6613
|
-
* Enable organization management to group users.
|
|
6614
|
-
*
|
|
6615
|
-
* @default false
|
|
6616
|
-
*/
|
|
6617
|
-
organizations?: boolean;
|
|
6618
6867
|
}
|
|
6619
6868
|
interface RealmOptions {
|
|
6620
6869
|
/**
|
|
@@ -6777,11 +7026,11 @@ declare class AdminIdentityController {
|
|
|
6777
7026
|
userRealmName: alepha.TOptional<alepha.TString>;
|
|
6778
7027
|
}>;
|
|
6779
7028
|
response: alepha.TPage<alepha.TObject<{
|
|
7029
|
+
userId: PgAttr<alepha.TString, typeof PG_REF>;
|
|
6780
7030
|
id: PgAttr<PgAttr<alepha.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
6781
|
-
version: PgAttr<PgAttr<alepha.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
6782
7031
|
createdAt: PgAttr<PgAttr<alepha.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7032
|
+
version: PgAttr<PgAttr<alepha.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
6783
7033
|
updatedAt: PgAttr<PgAttr<alepha.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
6784
|
-
userId: PgAttr<alepha.TString, typeof PG_REF>;
|
|
6785
7034
|
provider: alepha.TString;
|
|
6786
7035
|
providerUserId: alepha.TOptional<alepha.TString>;
|
|
6787
7036
|
providerData: alepha.TOptional<alepha.TRecord<string, alepha.TAny>>;
|
|
@@ -6798,11 +7047,11 @@ declare class AdminIdentityController {
|
|
|
6798
7047
|
userRealmName: alepha.TOptional<alepha.TString>;
|
|
6799
7048
|
}>;
|
|
6800
7049
|
response: alepha.TObject<{
|
|
7050
|
+
userId: PgAttr<alepha.TString, typeof PG_REF>;
|
|
6801
7051
|
id: PgAttr<PgAttr<alepha.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
6802
|
-
version: PgAttr<PgAttr<alepha.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
6803
7052
|
createdAt: PgAttr<PgAttr<alepha.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
7053
|
+
version: PgAttr<PgAttr<alepha.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
6804
7054
|
updatedAt: PgAttr<PgAttr<alepha.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
6805
|
-
userId: PgAttr<alepha.TString, typeof PG_REF>;
|
|
6806
7055
|
provider: alepha.TString;
|
|
6807
7056
|
providerUserId: alepha.TOptional<alepha.TString>;
|
|
6808
7057
|
providerData: alepha.TOptional<alepha.TRecord<string, alepha.TAny>>;
|
|
@@ -6975,14 +7224,14 @@ declare class UserNotifications {
|
|
|
6975
7224
|
//#endregion
|
|
6976
7225
|
//#region ../../src/api/users/schemas/createUserSchema.d.ts
|
|
6977
7226
|
declare const createUserSchema: alepha.TObject<{
|
|
6978
|
-
enabled: alepha.TOptional<PgAttr<alepha.TBoolean, typeof PG_DEFAULT>>;
|
|
6979
7227
|
email: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
7228
|
+
username: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
6980
7229
|
phoneNumber: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
6981
7230
|
id: alepha.TOptional<PgAttr<PgAttr<alepha.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
|
|
6982
|
-
version: alepha.TOptional<PgAttr<PgAttr<alepha.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
|
|
6983
7231
|
createdAt: alepha.TOptional<PgAttr<PgAttr<alepha.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
|
|
7232
|
+
enabled: alepha.TOptional<PgAttr<alepha.TBoolean, typeof PG_DEFAULT>>;
|
|
7233
|
+
version: alepha.TOptional<PgAttr<PgAttr<alepha.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
|
|
6984
7234
|
updatedAt: alepha.TOptional<PgAttr<PgAttr<alepha.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
|
|
6985
|
-
username: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
6986
7235
|
roles: alepha.TOptional<alepha.TArray<alepha.TString>>;
|
|
6987
7236
|
firstName: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
6988
7237
|
lastName: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
@@ -6993,9 +7242,9 @@ type CreateUser = Static<typeof createUserSchema>;
|
|
|
6993
7242
|
//#endregion
|
|
6994
7243
|
//#region ../../src/api/users/schemas/updateUserSchema.d.ts
|
|
6995
7244
|
declare const updateUserSchema: alepha.TObject<{
|
|
6996
|
-
enabled: alepha.TOptional<PgAttr<alepha.TBoolean, typeof PG_DEFAULT>>;
|
|
6997
7245
|
email: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
6998
7246
|
phoneNumber: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
7247
|
+
enabled: alepha.TOptional<PgAttr<alepha.TBoolean, typeof PG_DEFAULT>>;
|
|
6999
7248
|
realm: alepha.TOptional<PgAttr<alepha.TString, typeof PG_DEFAULT>>;
|
|
7000
7249
|
roles: alepha.TOptional<alepha.TArray<alepha.TString>>;
|
|
7001
7250
|
firstName: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
@@ -7152,14 +7401,14 @@ declare class AdminUserController {
|
|
|
7152
7401
|
userRealmName: alepha.TOptional<alepha.TString>;
|
|
7153
7402
|
}>;
|
|
7154
7403
|
body: alepha.TObject<{
|
|
7155
|
-
enabled: alepha.TOptional<PgAttr<alepha.TBoolean, typeof PG_DEFAULT>>;
|
|
7156
7404
|
email: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
7405
|
+
username: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
7157
7406
|
phoneNumber: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
7158
7407
|
id: alepha.TOptional<PgAttr<PgAttr<alepha.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
|
|
7159
|
-
version: alepha.TOptional<PgAttr<PgAttr<alepha.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
|
|
7160
7408
|
createdAt: alepha.TOptional<PgAttr<PgAttr<alepha.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
|
|
7409
|
+
enabled: alepha.TOptional<PgAttr<alepha.TBoolean, typeof PG_DEFAULT>>;
|
|
7410
|
+
version: alepha.TOptional<PgAttr<PgAttr<alepha.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
|
|
7161
7411
|
updatedAt: alepha.TOptional<PgAttr<PgAttr<alepha.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
|
|
7162
|
-
username: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
7163
7412
|
roles: alepha.TOptional<alepha.TArray<alepha.TString>>;
|
|
7164
7413
|
firstName: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
7165
7414
|
lastName: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
@@ -7194,9 +7443,9 @@ declare class AdminUserController {
|
|
|
7194
7443
|
userRealmName: alepha.TOptional<alepha.TString>;
|
|
7195
7444
|
}>;
|
|
7196
7445
|
body: alepha.TObject<{
|
|
7197
|
-
enabled: alepha.TOptional<PgAttr<alepha.TBoolean, typeof PG_DEFAULT>>;
|
|
7198
7446
|
email: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
7199
7447
|
phoneNumber: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
7448
|
+
enabled: alepha.TOptional<PgAttr<alepha.TBoolean, typeof PG_DEFAULT>>;
|
|
7200
7449
|
realm: alepha.TOptional<PgAttr<alepha.TString, typeof PG_DEFAULT>>;
|
|
7201
7450
|
roles: alepha.TOptional<alepha.TArray<alepha.TString>>;
|
|
7202
7451
|
firstName: alepha.TOptional<alepha.TOptional<alepha.TString>>;
|
|
@@ -7262,17 +7511,13 @@ declare class RealmController {
|
|
|
7262
7511
|
description: alepha.TOptional<alepha.TString>;
|
|
7263
7512
|
logoUrl: alepha.TOptional<alepha.TString>;
|
|
7264
7513
|
registrationAllowed: alepha.TBoolean;
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
usernameEnabled: alepha.TBoolean;
|
|
7268
|
-
usernameRequired: alepha.TBoolean;
|
|
7514
|
+
email: alepha.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
7515
|
+
username: alepha.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
7269
7516
|
usernameRegExp: alepha.TString;
|
|
7270
|
-
|
|
7271
|
-
phoneRequired: alepha.TBoolean;
|
|
7517
|
+
phoneNumber: alepha.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
7272
7518
|
verifyEmailRequired: alepha.TBoolean;
|
|
7273
7519
|
verifyPhoneRequired: alepha.TBoolean;
|
|
7274
|
-
|
|
7275
|
-
firstNameLastNameRequired: alepha.TBoolean;
|
|
7520
|
+
firstNameLastName: alepha.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
7276
7521
|
resetPasswordAllowed: alepha.TBoolean;
|
|
7277
7522
|
adminEmails: alepha.TArray<alepha.TString>;
|
|
7278
7523
|
adminUsernames: alepha.TArray<alepha.TString>;
|
|
@@ -7729,7 +7974,7 @@ declare class UserController {
|
|
|
7729
7974
|
* - Verification code cleanup
|
|
7730
7975
|
* - Inactive user notifications
|
|
7731
7976
|
*
|
|
7732
|
-
* It is lazy-loaded when the `
|
|
7977
|
+
* It is lazy-loaded when the `sessionPurge` feature is enabled in the realm.
|
|
7733
7978
|
*/
|
|
7734
7979
|
declare class UserJobs {
|
|
7735
7980
|
protected readonly log: alepha_logger0.Logger;
|
|
@@ -7777,17 +8022,13 @@ declare class UserParameters {
|
|
|
7777
8022
|
description: typebox.TOptional<typebox.TString>;
|
|
7778
8023
|
logoUrl: typebox.TOptional<typebox.TString>;
|
|
7779
8024
|
registrationAllowed: typebox.TBoolean;
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
usernameEnabled: typebox.TBoolean;
|
|
7783
|
-
usernameRequired: typebox.TBoolean;
|
|
8025
|
+
email: typebox.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
8026
|
+
username: typebox.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
7784
8027
|
usernameRegExp: typebox.TString;
|
|
7785
|
-
|
|
7786
|
-
phoneRequired: typebox.TBoolean;
|
|
8028
|
+
phoneNumber: typebox.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
7787
8029
|
verifyEmailRequired: typebox.TBoolean;
|
|
7788
8030
|
verifyPhoneRequired: typebox.TBoolean;
|
|
7789
|
-
|
|
7790
|
-
firstNameLastNameRequired: typebox.TBoolean;
|
|
8031
|
+
firstNameLastName: typebox.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
7791
8032
|
resetPasswordAllowed: typebox.TBoolean;
|
|
7792
8033
|
adminEmails: typebox.TArray<typebox.TString>;
|
|
7793
8034
|
adminUsernames: typebox.TArray<typebox.TString>;
|
|
@@ -7803,11 +8044,11 @@ declare class UserParameters {
|
|
|
7803
8044
|
//#endregion
|
|
7804
8045
|
//#region ../../src/api/users/schemas/identityResourceSchema.d.ts
|
|
7805
8046
|
declare const identityResourceSchema: alepha.TObject<{
|
|
8047
|
+
userId: PgAttr<alepha.TString, typeof PG_REF>;
|
|
7806
8048
|
id: PgAttr<PgAttr<alepha.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
7807
|
-
version: PgAttr<PgAttr<alepha.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7808
8049
|
createdAt: PgAttr<PgAttr<alepha.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
8050
|
+
version: PgAttr<PgAttr<alepha.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
7809
8051
|
updatedAt: PgAttr<PgAttr<alepha.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
7810
|
-
userId: PgAttr<alepha.TString, typeof PG_REF>;
|
|
7811
8052
|
provider: alepha.TString;
|
|
7812
8053
|
providerUserId: alepha.TOptional<alepha.TString>;
|
|
7813
8054
|
providerData: alepha.TOptional<alepha.TRecord<string, alepha.TAny>>;
|
|
@@ -7828,17 +8069,13 @@ declare const realmConfigSchema: alepha.TObject<{
|
|
|
7828
8069
|
description: alepha.TOptional<alepha.TString>;
|
|
7829
8070
|
logoUrl: alepha.TOptional<alepha.TString>;
|
|
7830
8071
|
registrationAllowed: alepha.TBoolean;
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
usernameEnabled: alepha.TBoolean;
|
|
7834
|
-
usernameRequired: alepha.TBoolean;
|
|
8072
|
+
email: alepha.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
8073
|
+
username: alepha.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
7835
8074
|
usernameRegExp: alepha.TString;
|
|
7836
|
-
|
|
7837
|
-
phoneRequired: alepha.TBoolean;
|
|
8075
|
+
phoneNumber: alepha.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
7838
8076
|
verifyEmailRequired: alepha.TBoolean;
|
|
7839
8077
|
verifyPhoneRequired: alepha.TBoolean;
|
|
7840
|
-
|
|
7841
|
-
firstNameLastNameRequired: alepha.TBoolean;
|
|
8078
|
+
firstNameLastName: alepha.TUnion<[typebox.TLiteral<"none">, typebox.TLiteral<"optional">, typebox.TLiteral<"required">]>;
|
|
7842
8079
|
resetPasswordAllowed: alepha.TBoolean;
|
|
7843
8080
|
adminEmails: alepha.TArray<alepha.TString>;
|
|
7844
8081
|
adminUsernames: alepha.TArray<alepha.TString>;
|
|
@@ -8031,15 +8268,15 @@ declare class SessionService {
|
|
|
8031
8268
|
deleteSession(refreshToken: string, userRealmName?: string): Promise<void>;
|
|
8032
8269
|
link(provider: string, profile: OAuth2Profile, userRealmName?: string): Promise<{
|
|
8033
8270
|
email?: string | undefined;
|
|
8034
|
-
phoneNumber?: string | undefined;
|
|
8035
8271
|
username?: string | undefined;
|
|
8272
|
+
phoneNumber?: string | undefined;
|
|
8036
8273
|
firstName?: string | undefined;
|
|
8037
8274
|
lastName?: string | undefined;
|
|
8038
8275
|
picture?: string | undefined;
|
|
8039
|
-
enabled: boolean;
|
|
8040
8276
|
id: string;
|
|
8041
|
-
version: number;
|
|
8042
8277
|
createdAt: string;
|
|
8278
|
+
enabled: boolean;
|
|
8279
|
+
version: number;
|
|
8043
8280
|
updatedAt: string;
|
|
8044
8281
|
realm: string;
|
|
8045
8282
|
roles: string[];
|
|
@@ -8094,5 +8331,5 @@ declare class SessionService {
|
|
|
8094
8331
|
*/
|
|
8095
8332
|
declare const AlephaApiUsers: alepha.Service<alepha.Module>;
|
|
8096
8333
|
//#endregion
|
|
8097
|
-
export { $realm, AdminIdentityController, AdminSessionController, AdminUserController, AlephaApiUsers, CompletePasswordResetRequest, CompleteRegistrationRequest, CreateUser, CredentialService, DEFAULT_USER_REALM_NAME, IdentityEntity, IdentityQuery, IdentityResource, IdentityService, LoginInput, PasswordResetIntentResponse, Realm, RealmAuthSettings, RealmConfig, RealmController, RealmFeatures, RealmOptions, RealmPrimitive, RealmProvider, RealmRepositories, RegisterInput, RegistrationIntentResponse, RegistrationService, ResetPasswordInput, ResetPasswordRequest, SessionCrudService, SessionEntity, SessionQuery, SessionResource, SessionService, UpdateUser, UserAudits, UserBuckets, UserController, UserEntity, UserJobs, UserNotifications, UserParameters, UserQuery, UserResource, UserService, completePasswordResetRequestSchema, completeRegistrationRequestSchema, createUserSchema, identities, identityQuerySchema, identityResourceSchema, loginSchema, passwordResetIntentResponseSchema, realmAuthSettingsAtom, realmConfigSchema, registerSchema, registrationIntentResponseSchema, resetPasswordRequestSchema, resetPasswordSchema, sessionQuerySchema, sessionResourceSchema, sessions, updateUserSchema, userQuerySchema, userResourceSchema, users };
|
|
8334
|
+
export { $realm, AdminIdentityController, AdminSessionController, AdminUserController, AlephaApiUsers, CompletePasswordResetRequest, CompleteRegistrationRequest, CreateUser, CredentialService, DEFAULT_USER_REALM_NAME, FieldRequirement, IdentityEntity, IdentityQuery, IdentityResource, IdentityService, LoginInput, PasswordResetIntentResponse, Realm, RealmAuthSettings, RealmConfig, RealmController, RealmFeatures, RealmOptions, RealmPrimitive, RealmProvider, RealmRepositories, RegisterInput, RegistrationIntentResponse, RegistrationService, ResetPasswordInput, ResetPasswordRequest, SessionCrudService, SessionEntity, SessionQuery, SessionResource, SessionService, UpdateUser, UserAudits, UserBuckets, UserController, UserEntity, UserJobs, UserNotifications, UserParameters, UserQuery, UserResource, UserService, completePasswordResetRequestSchema, completeRegistrationRequestSchema, createUserSchema, identities, identityQuerySchema, identityResourceSchema, loginSchema, passwordResetIntentResponseSchema, realmAuthSettingsAtom, realmConfigSchema, registerSchema, registrationIntentResponseSchema, resetPasswordRequestSchema, resetPasswordSchema, sessionQuerySchema, sessionResourceSchema, sessions, updateUserSchema, userQuerySchema, userResourceSchema, users };
|
|
8098
8335
|
//# sourceMappingURL=index.d.ts.map
|