@archlast/server 0.0.1
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/LICENSE +21 -0
- package/README.md +32 -0
- package/dist/admin/auth.d.ts +79 -0
- package/dist/admin/auth.d.ts.map +1 -0
- package/dist/admin/auth.js +487 -0
- package/dist/admin/auth.js.map +1 -0
- package/dist/admin/schema.d.ts +240 -0
- package/dist/admin/schema.d.ts.map +1 -0
- package/dist/admin/schema.js +521 -0
- package/dist/admin/schema.js.map +1 -0
- package/dist/admin/seed.d.ts +9 -0
- package/dist/admin/seed.d.ts.map +1 -0
- package/dist/admin/seed.js +276 -0
- package/dist/admin/seed.js.map +1 -0
- package/dist/auth/api-key-resolver.d.ts +12 -0
- package/dist/auth/api-key-resolver.d.ts.map +1 -0
- package/dist/auth/api-key-resolver.js +24 -0
- package/dist/auth/api-key-resolver.js.map +1 -0
- package/dist/auth/archlast-auth-adapter.d.ts +22 -0
- package/dist/auth/archlast-auth-adapter.d.ts.map +1 -0
- package/dist/auth/archlast-auth-adapter.js +32 -0
- package/dist/auth/archlast-auth-adapter.js.map +1 -0
- package/dist/auth/audit.d.ts +65 -0
- package/dist/auth/audit.d.ts.map +1 -0
- package/dist/auth/audit.js +138 -0
- package/dist/auth/audit.js.map +1 -0
- package/dist/auth/better-auth-adapter.d.ts +35 -0
- package/dist/auth/better-auth-adapter.d.ts.map +1 -0
- package/dist/auth/better-auth-adapter.js +460 -0
- package/dist/auth/better-auth-adapter.js.map +1 -0
- package/dist/auth/better-auth-admin.d.ts +40 -0
- package/dist/auth/better-auth-admin.d.ts.map +1 -0
- package/dist/auth/better-auth-admin.js +80 -0
- package/dist/auth/better-auth-admin.js.map +1 -0
- package/dist/auth/better-auth-api-key-resolver.d.ts +39 -0
- package/dist/auth/better-auth-api-key-resolver.d.ts.map +1 -0
- package/dist/auth/better-auth-api-key-resolver.js +184 -0
- package/dist/auth/better-auth-api-key-resolver.js.map +1 -0
- package/dist/auth/better-auth-instance.d.ts +2464 -0
- package/dist/auth/better-auth-instance.d.ts.map +1 -0
- package/dist/auth/better-auth-instance.js +251 -0
- package/dist/auth/better-auth-instance.js.map +1 -0
- package/dist/auth/better-auth-seed.d.ts +23 -0
- package/dist/auth/better-auth-seed.d.ts.map +1 -0
- package/dist/auth/better-auth-seed.js +316 -0
- package/dist/auth/better-auth-seed.js.map +1 -0
- package/dist/auth/better-auth-session-adapter.d.ts +49 -0
- package/dist/auth/better-auth-session-adapter.d.ts.map +1 -0
- package/dist/auth/better-auth-session-adapter.js +254 -0
- package/dist/auth/better-auth-session-adapter.js.map +1 -0
- package/dist/auth/errors.d.ts +18 -0
- package/dist/auth/errors.d.ts.map +1 -0
- package/dist/auth/errors.js +27 -0
- package/dist/auth/errors.js.map +1 -0
- package/dist/auth/http/handlers.d.ts +17 -0
- package/dist/auth/http/handlers.d.ts.map +1 -0
- package/dist/auth/http/handlers.js +19 -0
- package/dist/auth/http/handlers.js.map +1 -0
- package/dist/auth/interfaces.d.ts +138 -0
- package/dist/auth/interfaces.d.ts.map +1 -0
- package/dist/auth/interfaces.js +105 -0
- package/dist/auth/interfaces.js.map +1 -0
- package/dist/auth/mfa/index.d.ts +6 -0
- package/dist/auth/mfa/index.d.ts.map +1 -0
- package/dist/auth/mfa/index.js +13 -0
- package/dist/auth/mfa/index.js.map +1 -0
- package/dist/auth/mfa/schema.d.ts +32 -0
- package/dist/auth/mfa/schema.d.ts.map +1 -0
- package/dist/auth/mfa/schema.js +35 -0
- package/dist/auth/mfa/schema.js.map +1 -0
- package/dist/auth/mfa/service.d.ts +65 -0
- package/dist/auth/mfa/service.d.ts.map +1 -0
- package/dist/auth/mfa/service.js +255 -0
- package/dist/auth/mfa/service.js.map +1 -0
- package/dist/auth/oauth-proxy.d.ts +58 -0
- package/dist/auth/oauth-proxy.d.ts.map +1 -0
- package/dist/auth/oauth-proxy.js +298 -0
- package/dist/auth/oauth-proxy.js.map +1 -0
- package/dist/auth/otp/index.d.ts +6 -0
- package/dist/auth/otp/index.d.ts.map +1 -0
- package/dist/auth/otp/index.js +13 -0
- package/dist/auth/otp/index.js.map +1 -0
- package/dist/auth/otp/schema.d.ts +32 -0
- package/dist/auth/otp/schema.d.ts.map +1 -0
- package/dist/auth/otp/schema.js +38 -0
- package/dist/auth/otp/schema.js.map +1 -0
- package/dist/auth/otp/service.d.ts +59 -0
- package/dist/auth/otp/service.d.ts.map +1 -0
- package/dist/auth/otp/service.js +183 -0
- package/dist/auth/otp/service.js.map +1 -0
- package/dist/auth/password-recovery.d.ts +61 -0
- package/dist/auth/password-recovery.d.ts.map +1 -0
- package/dist/auth/password-recovery.js +173 -0
- package/dist/auth/password-recovery.js.map +1 -0
- package/dist/auth/resolver.d.ts +29 -0
- package/dist/auth/resolver.d.ts.map +1 -0
- package/dist/auth/resolver.js +78 -0
- package/dist/auth/resolver.js.map +1 -0
- package/dist/auth/role-helpers.d.ts +56 -0
- package/dist/auth/role-helpers.d.ts.map +1 -0
- package/dist/auth/role-helpers.js +103 -0
- package/dist/auth/role-helpers.js.map +1 -0
- package/dist/auth/session-manager.d.ts +21 -0
- package/dist/auth/session-manager.d.ts.map +1 -0
- package/dist/auth/session-manager.js +30 -0
- package/dist/auth/session-manager.js.map +1 -0
- package/dist/auth/session-security.d.ts +14 -0
- package/dist/auth/session-security.d.ts.map +1 -0
- package/dist/auth/session-security.js +26 -0
- package/dist/auth/session-security.js.map +1 -0
- package/dist/auth/system/better-auth-schema.d.ts +144 -0
- package/dist/auth/system/better-auth-schema.d.ts.map +1 -0
- package/dist/auth/system/better-auth-schema.js +250 -0
- package/dist/auth/system/better-auth-schema.js.map +1 -0
- package/dist/auth/system/constants.d.ts +114 -0
- package/dist/auth/system/constants.d.ts.map +1 -0
- package/dist/auth/system/constants.js +205 -0
- package/dist/auth/system/constants.js.map +1 -0
- package/dist/auth/system/cookies.d.ts +83 -0
- package/dist/auth/system/cookies.d.ts.map +1 -0
- package/dist/auth/system/cookies.js +148 -0
- package/dist/auth/system/cookies.js.map +1 -0
- package/dist/auth/system/crypto.d.ts +53 -0
- package/dist/auth/system/crypto.d.ts.map +1 -0
- package/dist/auth/system/crypto.js +188 -0
- package/dist/auth/system/crypto.js.map +1 -0
- package/dist/auth/system/extended-schema.d.ts +145 -0
- package/dist/auth/system/extended-schema.d.ts.map +1 -0
- package/dist/auth/system/extended-schema.js +86 -0
- package/dist/auth/system/extended-schema.js.map +1 -0
- package/dist/auth/system/schema.d.ts +538 -0
- package/dist/auth/system/schema.d.ts.map +1 -0
- package/dist/auth/system/schema.js +306 -0
- package/dist/auth/system/schema.js.map +1 -0
- package/dist/cache/client.d.ts +77 -0
- package/dist/cache/client.d.ts.map +1 -0
- package/dist/cache/client.js +279 -0
- package/dist/cache/client.js.map +1 -0
- package/dist/cache/index.d.ts +9 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +14 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cache/layers.d.ts +125 -0
- package/dist/cache/layers.d.ts.map +1 -0
- package/dist/cache/layers.js +354 -0
- package/dist/cache/layers.js.map +1 -0
- package/dist/cache/manager.d.ts +101 -0
- package/dist/cache/manager.d.ts.map +1 -0
- package/dist/cache/manager.js +423 -0
- package/dist/cache/manager.js.map +1 -0
- package/dist/cache/protocol.d.ts +115 -0
- package/dist/cache/protocol.d.ts.map +1 -0
- package/dist/cache/protocol.js +36 -0
- package/dist/cache/protocol.js.map +1 -0
- package/dist/cache/run-sidecar.d.ts +8 -0
- package/dist/cache/run-sidecar.d.ts.map +1 -0
- package/dist/cache/run-sidecar.js +71 -0
- package/dist/cache/run-sidecar.js.map +1 -0
- package/dist/cache/sidecar-client.d.ts +90 -0
- package/dist/cache/sidecar-client.d.ts.map +1 -0
- package/dist/cache/sidecar-client.js +437 -0
- package/dist/cache/sidecar-client.js.map +1 -0
- package/dist/cache/sidecar-server.d.ts +18 -0
- package/dist/cache/sidecar-server.d.ts.map +1 -0
- package/dist/cache/sidecar-server.js +90 -0
- package/dist/cache/sidecar-server.js.map +1 -0
- package/dist/cache/store.d.ts +90 -0
- package/dist/cache/store.d.ts.map +1 -0
- package/dist/cache/store.js +357 -0
- package/dist/cache/store.js.map +1 -0
- package/dist/cache/strategies.d.ts +52 -0
- package/dist/cache/strategies.d.ts.map +1 -0
- package/dist/cache/strategies.js +13 -0
- package/dist/cache/strategies.js.map +1 -0
- package/dist/cache/utils.d.ts +16 -0
- package/dist/cache/utils.d.ts.map +1 -0
- package/dist/cache/utils.js +101 -0
- package/dist/cache/utils.js.map +1 -0
- package/dist/config/index.d.ts +4 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +20 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/paths.d.ts +16 -0
- package/dist/config/paths.d.ts.map +1 -0
- package/dist/config/paths.js +29 -0
- package/dist/config/paths.js.map +1 -0
- package/dist/config/schema.d.ts +42 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +62 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config/service.d.ts +56 -0
- package/dist/config/service.d.ts.map +1 -0
- package/dist/config/service.js +108 -0
- package/dist/config/service.js.map +1 -0
- package/dist/context.d.ts +48 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +6 -0
- package/dist/context.js.map +1 -0
- package/dist/controllers/admin/admin-tokens.controller.d.ts +159 -0
- package/dist/controllers/admin/admin-tokens.controller.d.ts.map +1 -0
- package/dist/controllers/admin/admin-tokens.controller.js +138 -0
- package/dist/controllers/admin/admin-tokens.controller.js.map +1 -0
- package/dist/controllers/admin/api-keys.controller.d.ts +187 -0
- package/dist/controllers/admin/api-keys.controller.d.ts.map +1 -0
- package/dist/controllers/admin/api-keys.controller.js +124 -0
- package/dist/controllers/admin/api-keys.controller.js.map +1 -0
- package/dist/controllers/admin/app-users.controller.d.ts +376 -0
- package/dist/controllers/admin/app-users.controller.d.ts.map +1 -0
- package/dist/controllers/admin/app-users.controller.js +348 -0
- package/dist/controllers/admin/app-users.controller.js.map +1 -0
- package/dist/controllers/admin/auth.controller.d.ts +285 -0
- package/dist/controllers/admin/auth.controller.d.ts.map +1 -0
- package/dist/controllers/admin/auth.controller.js +221 -0
- package/dist/controllers/admin/auth.controller.js.map +1 -0
- package/dist/controllers/admin/backup.controller.d.ts +250 -0
- package/dist/controllers/admin/backup.controller.d.ts.map +1 -0
- package/dist/controllers/admin/backup.controller.js +316 -0
- package/dist/controllers/admin/backup.controller.js.map +1 -0
- package/dist/controllers/admin/data.controller.d.ts +250 -0
- package/dist/controllers/admin/data.controller.d.ts.map +1 -0
- package/dist/controllers/admin/data.controller.js +240 -0
- package/dist/controllers/admin/data.controller.js.map +1 -0
- package/dist/controllers/admin/provisioning.controller.d.ts +77 -0
- package/dist/controllers/admin/provisioning.controller.d.ts.map +1 -0
- package/dist/controllers/admin/provisioning.controller.js +141 -0
- package/dist/controllers/admin/provisioning.controller.js.map +1 -0
- package/dist/controllers/admin/settings.controller.d.ts +153 -0
- package/dist/controllers/admin/settings.controller.d.ts.map +1 -0
- package/dist/controllers/admin/settings.controller.js +120 -0
- package/dist/controllers/admin/settings.controller.js.map +1 -0
- package/dist/controllers/admin/setup.controller.d.ts +104 -0
- package/dist/controllers/admin/setup.controller.d.ts.map +1 -0
- package/dist/controllers/admin/setup.controller.js +113 -0
- package/dist/controllers/admin/setup.controller.js.map +1 -0
- package/dist/controllers/admin/tenants.controller.d.ts +275 -0
- package/dist/controllers/admin/tenants.controller.d.ts.map +1 -0
- package/dist/controllers/admin/tenants.controller.js +206 -0
- package/dist/controllers/admin/tenants.controller.js.map +1 -0
- package/dist/controllers/admin/users.controller.d.ts +253 -0
- package/dist/controllers/admin/users.controller.d.ts.map +1 -0
- package/dist/controllers/admin/users.controller.js +186 -0
- package/dist/controllers/admin/users.controller.js.map +1 -0
- package/dist/controllers/auth.controller.d.ts +308 -0
- package/dist/controllers/auth.controller.d.ts.map +1 -0
- package/dist/controllers/auth.controller.js +305 -0
- package/dist/controllers/auth.controller.js.map +1 -0
- package/dist/controllers/crud-generator.controller.d.ts +83 -0
- package/dist/controllers/crud-generator.controller.d.ts.map +1 -0
- package/dist/controllers/crud-generator.controller.js +201 -0
- package/dist/controllers/crud-generator.controller.js.map +1 -0
- package/dist/controllers/deployment-events.controller.d.ts +74 -0
- package/dist/controllers/deployment-events.controller.d.ts.map +1 -0
- package/dist/controllers/deployment-events.controller.js +143 -0
- package/dist/controllers/deployment-events.controller.js.map +1 -0
- package/dist/controllers/index.d.ts +18 -0
- package/dist/controllers/index.d.ts.map +1 -0
- package/dist/controllers/index.js +42 -0
- package/dist/controllers/index.js.map +1 -0
- package/dist/controllers/introspection.controller.d.ts +430 -0
- package/dist/controllers/introspection.controller.d.ts.map +1 -0
- package/dist/controllers/introspection.controller.js +358 -0
- package/dist/controllers/introspection.controller.js.map +1 -0
- package/dist/controllers/invite.controller.d.ts +218 -0
- package/dist/controllers/invite.controller.d.ts.map +1 -0
- package/dist/controllers/invite.controller.js +218 -0
- package/dist/controllers/invite.controller.js.map +1 -0
- package/dist/controllers/mfa.controller.d.ts +211 -0
- package/dist/controllers/mfa.controller.d.ts.map +1 -0
- package/dist/controllers/mfa.controller.js +155 -0
- package/dist/controllers/mfa.controller.js.map +1 -0
- package/dist/controllers/otp.controller.d.ts +220 -0
- package/dist/controllers/otp.controller.d.ts.map +1 -0
- package/dist/controllers/otp.controller.js +223 -0
- package/dist/controllers/otp.controller.js.map +1 -0
- package/dist/controllers/storage.controller.d.ts +297 -0
- package/dist/controllers/storage.controller.d.ts.map +1 -0
- package/dist/controllers/storage.controller.js +304 -0
- package/dist/controllers/storage.controller.js.map +1 -0
- package/dist/controllers/system.controller.d.ts +176 -0
- package/dist/controllers/system.controller.d.ts.map +1 -0
- package/dist/controllers/system.controller.js +222 -0
- package/dist/controllers/system.controller.js.map +1 -0
- package/dist/controllers/tenant.controller.d.ts +316 -0
- package/dist/controllers/tenant.controller.d.ts.map +1 -0
- package/dist/controllers/tenant.controller.js +269 -0
- package/dist/controllers/tenant.controller.js.map +1 -0
- package/dist/db/cachedclient.d.ts +69 -0
- package/dist/db/cachedclient.d.ts.map +1 -0
- package/dist/db/cachedclient.js +331 -0
- package/dist/db/cachedclient.js.map +1 -0
- package/dist/db/distributed-client.d.ts +82 -0
- package/dist/db/distributed-client.d.ts.map +1 -0
- package/dist/db/distributed-client.js +477 -0
- package/dist/db/distributed-client.js.map +1 -0
- package/dist/db/factory.d.ts +19 -0
- package/dist/db/factory.d.ts.map +1 -0
- package/dist/db/factory.js +44 -0
- package/dist/db/factory.js.map +1 -0
- package/dist/db/interfaces.d.ts +67 -0
- package/dist/db/interfaces.d.ts.map +1 -0
- package/dist/db/interfaces.js +3 -0
- package/dist/db/interfaces.js.map +1 -0
- package/dist/db/socket-client.d.ts +122 -0
- package/dist/db/socket-client.d.ts.map +1 -0
- package/dist/db/socket-client.js +1092 -0
- package/dist/db/socket-client.js.map +1 -0
- package/dist/db/store-config.d.ts +19 -0
- package/dist/db/store-config.d.ts.map +1 -0
- package/dist/db/store-config.js +65 -0
- package/dist/db/store-config.js.map +1 -0
- package/dist/deployment/function-extractor.d.ts +11 -0
- package/dist/deployment/function-extractor.d.ts.map +1 -0
- package/dist/deployment/function-extractor.js +101 -0
- package/dist/deployment/function-extractor.js.map +1 -0
- package/dist/deployment/handler.d.ts +174 -0
- package/dist/deployment/handler.d.ts.map +1 -0
- package/dist/deployment/handler.js +1437 -0
- package/dist/deployment/handler.js.map +1 -0
- package/dist/deployment/persistence.d.ts +97 -0
- package/dist/deployment/persistence.d.ts.map +1 -0
- package/dist/deployment/persistence.js +238 -0
- package/dist/deployment/persistence.js.map +1 -0
- package/dist/deployment/protocol.d.ts +34 -0
- package/dist/deployment/protocol.d.ts.map +1 -0
- package/dist/deployment/protocol.js +7 -0
- package/dist/deployment/protocol.js.map +1 -0
- package/dist/di/container.d.ts +58 -0
- package/dist/di/container.d.ts.map +1 -0
- package/dist/di/container.js +121 -0
- package/dist/di/container.js.map +1 -0
- package/dist/di/decorators.d.ts +57 -0
- package/dist/di/decorators.d.ts.map +1 -0
- package/dist/di/decorators.js +80 -0
- package/dist/di/decorators.js.map +1 -0
- package/dist/di/index.d.ts +10 -0
- package/dist/di/index.d.ts.map +1 -0
- package/dist/di/index.js +21 -0
- package/dist/di/index.js.map +1 -0
- package/dist/di/resolver.d.ts +26 -0
- package/dist/di/resolver.d.ts.map +1 -0
- package/dist/di/resolver.js +32 -0
- package/dist/di/resolver.js.map +1 -0
- package/dist/docker/compose.d.ts +3 -0
- package/dist/docker/compose.d.ts.map +1 -0
- package/dist/docker/compose.js +106 -0
- package/dist/docker/compose.js.map +1 -0
- package/dist/docker/index.d.ts +4 -0
- package/dist/docker/index.d.ts.map +1 -0
- package/dist/docker/index.js +8 -0
- package/dist/docker/index.js.map +1 -0
- package/dist/docker/manager.d.ts +14 -0
- package/dist/docker/manager.d.ts.map +1 -0
- package/dist/docker/manager.js +76 -0
- package/dist/docker/manager.js.map +1 -0
- package/dist/docker/types.d.ts +18 -0
- package/dist/docker/types.d.ts.map +1 -0
- package/dist/docker/types.js +3 -0
- package/dist/docker/types.js.map +1 -0
- package/dist/email/index.d.ts +6 -0
- package/dist/email/index.d.ts.map +1 -0
- package/dist/email/index.js +25 -0
- package/dist/email/index.js.map +1 -0
- package/dist/email/service.d.ts +89 -0
- package/dist/email/service.d.ts.map +1 -0
- package/dist/email/service.js +215 -0
- package/dist/email/service.js.map +1 -0
- package/dist/email/templates/MagicLinkEmail.d.ts +8 -0
- package/dist/email/templates/MagicLinkEmail.d.ts.map +1 -0
- package/dist/email/templates/MagicLinkEmail.js +84 -0
- package/dist/email/templates/MagicLinkEmail.js.map +1 -0
- package/dist/email/templates/OtpEmail.d.ts +8 -0
- package/dist/email/templates/OtpEmail.d.ts.map +1 -0
- package/dist/email/templates/OtpEmail.js +72 -0
- package/dist/email/templates/OtpEmail.js.map +1 -0
- package/dist/email/templates/PasswordResetEmail.d.ts +9 -0
- package/dist/email/templates/PasswordResetEmail.d.ts.map +1 -0
- package/dist/email/templates/PasswordResetEmail.js +103 -0
- package/dist/email/templates/PasswordResetEmail.js.map +1 -0
- package/dist/email/templates/WelcomeEmail.d.ts +8 -0
- package/dist/email/templates/WelcomeEmail.d.ts.map +1 -0
- package/dist/email/templates/WelcomeEmail.js +94 -0
- package/dist/email/templates/WelcomeEmail.js.map +1 -0
- package/dist/email/templates/index.d.ts +9 -0
- package/dist/email/templates/index.d.ts.map +1 -0
- package/dist/email/templates/index.js +16 -0
- package/dist/email/templates/index.js.map +1 -0
- package/dist/engine/context.d.ts +9 -0
- package/dist/engine/context.d.ts.map +1 -0
- package/dist/engine/context.js +9 -0
- package/dist/engine/context.js.map +1 -0
- package/dist/engine/runner.d.ts +115 -0
- package/dist/engine/runner.d.ts.map +1 -0
- package/dist/engine/runner.js +617 -0
- package/dist/engine/runner.js.map +1 -0
- package/dist/functions/built-in/auth-apikey.d.ts +21 -0
- package/dist/functions/built-in/auth-apikey.d.ts.map +1 -0
- package/dist/functions/built-in/auth-apikey.js +344 -0
- package/dist/functions/built-in/auth-apikey.js.map +1 -0
- package/dist/functions/built-in/auth-email.d.ts +3 -0
- package/dist/functions/built-in/auth-email.d.ts.map +1 -0
- package/dist/functions/built-in/auth-email.js +63 -0
- package/dist/functions/built-in/auth-email.js.map +1 -0
- package/dist/functions/built-in/auth-invite.d.ts +5 -0
- package/dist/functions/built-in/auth-invite.d.ts.map +1 -0
- package/dist/functions/built-in/auth-invite.js +105 -0
- package/dist/functions/built-in/auth-invite.js.map +1 -0
- package/dist/functions/built-in/auth-password.d.ts +4 -0
- package/dist/functions/built-in/auth-password.d.ts.map +1 -0
- package/dist/functions/built-in/auth-password.js +107 -0
- package/dist/functions/built-in/auth-password.js.map +1 -0
- package/dist/functions/built-in/auth-session.d.ts +18 -0
- package/dist/functions/built-in/auth-session.d.ts.map +1 -0
- package/dist/functions/built-in/auth-session.js +221 -0
- package/dist/functions/built-in/auth-session.js.map +1 -0
- package/dist/functions/built-in/auth-signin.d.ts +20 -0
- package/dist/functions/built-in/auth-signin.d.ts.map +1 -0
- package/dist/functions/built-in/auth-signin.js +198 -0
- package/dist/functions/built-in/auth-signin.js.map +1 -0
- package/dist/functions/built-in/auth-signout.d.ts +18 -0
- package/dist/functions/built-in/auth-signout.d.ts.map +1 -0
- package/dist/functions/built-in/auth-signout.js +78 -0
- package/dist/functions/built-in/auth-signout.js.map +1 -0
- package/dist/functions/built-in/auth-signup.d.ts +21 -0
- package/dist/functions/built-in/auth-signup.d.ts.map +1 -0
- package/dist/functions/built-in/auth-signup.js +147 -0
- package/dist/functions/built-in/auth-signup.js.map +1 -0
- package/dist/functions/built-in/auth-tenant.d.ts +3 -0
- package/dist/functions/built-in/auth-tenant.d.ts.map +1 -0
- package/dist/functions/built-in/auth-tenant.js +86 -0
- package/dist/functions/built-in/auth-tenant.js.map +1 -0
- package/dist/functions/built-in/index.d.ts +55 -0
- package/dist/functions/built-in/index.d.ts.map +1 -0
- package/dist/functions/built-in/index.js +181 -0
- package/dist/functions/built-in/index.js.map +1 -0
- package/dist/functions/built-in/system-cache.d.ts +10 -0
- package/dist/functions/built-in/system-cache.d.ts.map +1 -0
- package/dist/functions/built-in/system-cache.js +98 -0
- package/dist/functions/built-in/system-cache.js.map +1 -0
- package/dist/functions/built-in/system-data.d.ts +13 -0
- package/dist/functions/built-in/system-data.d.ts.map +1 -0
- package/dist/functions/built-in/system-data.js +133 -0
- package/dist/functions/built-in/system-data.js.map +1 -0
- package/dist/functions/built-in/system-jobs.d.ts +22 -0
- package/dist/functions/built-in/system-jobs.d.ts.map +1 -0
- package/dist/functions/built-in/system-jobs.js +82 -0
- package/dist/functions/built-in/system-jobs.js.map +1 -0
- package/dist/functions/built-in/system-notifications.d.ts +41 -0
- package/dist/functions/built-in/system-notifications.d.ts.map +1 -0
- package/dist/functions/built-in/system-notifications.js +72 -0
- package/dist/functions/built-in/system-notifications.js.map +1 -0
- package/dist/functions/built-in/system-performance.d.ts +25 -0
- package/dist/functions/built-in/system-performance.d.ts.map +1 -0
- package/dist/functions/built-in/system-performance.js +83 -0
- package/dist/functions/built-in/system-performance.js.map +1 -0
- package/dist/functions/built-in-registry.d.ts +101 -0
- package/dist/functions/built-in-registry.d.ts.map +1 -0
- package/dist/functions/built-in-registry.js +165 -0
- package/dist/functions/built-in-registry.js.map +1 -0
- package/dist/functions/definition.d.ts +206 -0
- package/dist/functions/definition.d.ts.map +1 -0
- package/dist/functions/definition.js +178 -0
- package/dist/functions/definition.js.map +1 -0
- package/dist/functions/types.d.ts +151 -0
- package/dist/functions/types.d.ts.map +1 -0
- package/dist/functions/types.js +3 -0
- package/dist/functions/types.js.map +1 -0
- package/dist/http/context-helper.d.ts +60 -0
- package/dist/http/context-helper.d.ts.map +1 -0
- package/dist/http/context-helper.js +161 -0
- package/dist/http/context-helper.js.map +1 -0
- package/dist/http/definition.d.ts +76 -0
- package/dist/http/definition.d.ts.map +1 -0
- package/dist/http/definition.js +46 -0
- package/dist/http/definition.js.map +1 -0
- package/dist/http/index.d.ts +7 -0
- package/dist/http/index.d.ts.map +1 -0
- package/dist/http/index.js +12 -0
- package/dist/http/index.js.map +1 -0
- package/dist/http/plugins/auth.d.ts +71 -0
- package/dist/http/plugins/auth.d.ts.map +1 -0
- package/dist/http/plugins/auth.js +67 -0
- package/dist/http/plugins/auth.js.map +1 -0
- package/dist/http/plugins/better-auth.d.ts +67 -0
- package/dist/http/plugins/better-auth.d.ts.map +1 -0
- package/dist/http/plugins/better-auth.js +48 -0
- package/dist/http/plugins/better-auth.js.map +1 -0
- package/dist/http/router.d.ts +59 -0
- package/dist/http/router.d.ts.map +1 -0
- package/dist/http/router.js +371 -0
- package/dist/http/router.js.map +1 -0
- package/dist/http/server.d.ts +15 -0
- package/dist/http/server.d.ts.map +1 -0
- package/dist/http/server.js +217 -0
- package/dist/http/server.js.map +1 -0
- package/dist/http/types.d.ts +142 -0
- package/dist/http/types.d.ts.map +1 -0
- package/dist/http/types.js +7 -0
- package/dist/http/types.js.map +1 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +116 -0
- package/dist/index.mjs.map +1 -0
- package/dist/ipc/run-sidecar.d.ts +8 -0
- package/dist/ipc/run-sidecar.d.ts.map +1 -0
- package/dist/ipc/run-sidecar.js +127 -0
- package/dist/ipc/run-sidecar.js.map +1 -0
- package/dist/ipc/socket-bridge.d.ts +114 -0
- package/dist/ipc/socket-bridge.d.ts.map +1 -0
- package/dist/ipc/socket-bridge.js +724 -0
- package/dist/ipc/socket-bridge.js.map +1 -0
- package/dist/jobs/index.d.ts +7 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +10 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/queue.d.ts +62 -0
- package/dist/jobs/queue.d.ts.map +1 -0
- package/dist/jobs/queue.js +192 -0
- package/dist/jobs/queue.js.map +1 -0
- package/dist/jobs/run-scheduler.d.ts +2 -0
- package/dist/jobs/run-scheduler.d.ts.map +1 -0
- package/dist/jobs/run-scheduler.js +245 -0
- package/dist/jobs/run-scheduler.js.map +1 -0
- package/dist/jobs/run-worker.d.ts +2 -0
- package/dist/jobs/run-worker.d.ts.map +1 -0
- package/dist/jobs/run-worker.js +123 -0
- package/dist/jobs/run-worker.js.map +1 -0
- package/dist/jobs/runtime-loader.d.ts +14 -0
- package/dist/jobs/runtime-loader.d.ts.map +1 -0
- package/dist/jobs/runtime-loader.js +122 -0
- package/dist/jobs/runtime-loader.js.map +1 -0
- package/dist/jobs/scheduler-client.d.ts +33 -0
- package/dist/jobs/scheduler-client.d.ts.map +1 -0
- package/dist/jobs/scheduler-client.js +69 -0
- package/dist/jobs/scheduler-client.js.map +1 -0
- package/dist/jobs/scheduler.d.ts +73 -0
- package/dist/jobs/scheduler.d.ts.map +1 -0
- package/dist/jobs/scheduler.js +297 -0
- package/dist/jobs/scheduler.js.map +1 -0
- package/dist/jobs/worker-thread.d.ts +27 -0
- package/dist/jobs/worker-thread.d.ts.map +1 -0
- package/dist/jobs/worker-thread.js +173 -0
- package/dist/jobs/worker-thread.js.map +1 -0
- package/dist/jobs/worker.d.ts +30 -0
- package/dist/jobs/worker.d.ts.map +1 -0
- package/dist/jobs/worker.js +262 -0
- package/dist/jobs/worker.js.map +1 -0
- package/dist/jobs/ws-client.d.ts +23 -0
- package/dist/jobs/ws-client.d.ts.map +1 -0
- package/dist/jobs/ws-client.js +105 -0
- package/dist/jobs/ws-client.js.map +1 -0
- package/dist/linq/async-enumerable.d.ts +91 -0
- package/dist/linq/async-enumerable.d.ts.map +1 -0
- package/dist/linq/async-enumerable.js +176 -0
- package/dist/linq/async-enumerable.js.map +1 -0
- package/dist/linq/enumerable.d.ts +94 -0
- package/dist/linq/enumerable.d.ts.map +1 -0
- package/dist/linq/enumerable.js +210 -0
- package/dist/linq/enumerable.js.map +1 -0
- package/dist/linq/index.d.ts +25 -0
- package/dist/linq/index.d.ts.map +1 -0
- package/dist/linq/index.js +27 -0
- package/dist/linq/index.js.map +1 -0
- package/dist/linq/interfaces.d.ts +23 -0
- package/dist/linq/interfaces.d.ts.map +1 -0
- package/dist/linq/interfaces.js +3 -0
- package/dist/linq/interfaces.js.map +1 -0
- package/dist/logging/logger.d.ts +85 -0
- package/dist/logging/logger.d.ts.map +1 -0
- package/dist/logging/logger.js +217 -0
- package/dist/logging/logger.js.map +1 -0
- package/dist/query/builder.d.ts +91 -0
- package/dist/query/builder.d.ts.map +1 -0
- package/dist/query/builder.js +103 -0
- package/dist/query/builder.js.map +1 -0
- package/dist/query/types.d.ts +112 -0
- package/dist/query/types.d.ts.map +1 -0
- package/dist/query/types.js +3 -0
- package/dist/query/types.js.map +1 -0
- package/dist/reactivity/graph.d.ts +8 -0
- package/dist/reactivity/graph.d.ts.map +1 -0
- package/dist/reactivity/graph.js +51 -0
- package/dist/reactivity/graph.js.map +1 -0
- package/dist/repository/db-set.d.ts +220 -0
- package/dist/repository/db-set.d.ts.map +1 -0
- package/dist/repository/db-set.js +515 -0
- package/dist/repository/db-set.js.map +1 -0
- package/dist/repository/ef-core.d.ts +177 -0
- package/dist/repository/ef-core.d.ts.map +1 -0
- package/dist/repository/ef-core.js +404 -0
- package/dist/repository/ef-core.js.map +1 -0
- package/dist/repository/factory.d.ts +117 -0
- package/dist/repository/factory.d.ts.map +1 -0
- package/dist/repository/factory.js +183 -0
- package/dist/repository/factory.js.map +1 -0
- package/dist/repository/interfaces.d.ts +449 -0
- package/dist/repository/interfaces.d.ts.map +1 -0
- package/dist/repository/interfaces.js +21 -0
- package/dist/repository/interfaces.js.map +1 -0
- package/dist/repository/provider.d.ts +16 -0
- package/dist/repository/provider.d.ts.map +1 -0
- package/dist/repository/provider.js +674 -0
- package/dist/repository/provider.js.map +1 -0
- package/dist/repository/queryable.d.ts +111 -0
- package/dist/repository/queryable.d.ts.map +1 -0
- package/dist/repository/queryable.js +566 -0
- package/dist/repository/queryable.js.map +1 -0
- package/dist/rpc/adapter.d.ts +18 -0
- package/dist/rpc/adapter.d.ts.map +1 -0
- package/dist/rpc/adapter.js +101 -0
- package/dist/rpc/adapter.js.map +1 -0
- package/dist/rpc/router.d.ts +82 -0
- package/dist/rpc/router.d.ts.map +1 -0
- package/dist/rpc/router.js +177 -0
- package/dist/rpc/router.js.map +1 -0
- package/dist/schema/definition.d.ts +51 -0
- package/dist/schema/definition.d.ts.map +1 -0
- package/dist/schema/definition.js +79 -0
- package/dist/schema/definition.js.map +1 -0
- package/dist/schema/input-types.d.ts +88 -0
- package/dist/schema/input-types.d.ts.map +1 -0
- package/dist/schema/input-types.js +81 -0
- package/dist/schema/input-types.js.map +1 -0
- package/dist/schema/modifiers.d.ts +173 -0
- package/dist/schema/modifiers.d.ts.map +1 -0
- package/dist/schema/modifiers.js +218 -0
- package/dist/schema/modifiers.js.map +1 -0
- package/dist/schema/relationship-types.d.ts +109 -0
- package/dist/schema/relationship-types.d.ts.map +1 -0
- package/dist/schema/relationship-types.js +11 -0
- package/dist/schema/relationship-types.js.map +1 -0
- package/dist/schema/type-helpers.d.ts +105 -0
- package/dist/schema/type-helpers.d.ts.map +1 -0
- package/dist/schema/type-helpers.js +215 -0
- package/dist/schema/type-helpers.js.map +1 -0
- package/dist/schema/types.d.ts +144 -0
- package/dist/schema/types.d.ts.map +1 -0
- package/dist/schema/types.js +12 -0
- package/dist/schema/types.js.map +1 -0
- package/dist/schema/validators.d.ts +127 -0
- package/dist/schema/validators.d.ts.map +1 -0
- package/dist/schema/validators.js +164 -0
- package/dist/schema/validators.js.map +1 -0
- package/dist/services/admin/app-users.service.d.ts +138 -0
- package/dist/services/admin/app-users.service.d.ts.map +1 -0
- package/dist/services/admin/app-users.service.js +435 -0
- package/dist/services/admin/app-users.service.js.map +1 -0
- package/dist/services/admin/auth.service.d.ts +104 -0
- package/dist/services/admin/auth.service.d.ts.map +1 -0
- package/dist/services/admin/auth.service.js +208 -0
- package/dist/services/admin/auth.service.js.map +1 -0
- package/dist/services/admin/backup/BackupOrchestrator.d.ts +38 -0
- package/dist/services/admin/backup/BackupOrchestrator.d.ts.map +1 -0
- package/dist/services/admin/backup/BackupOrchestrator.js +350 -0
- package/dist/services/admin/backup/BackupOrchestrator.js.map +1 -0
- package/dist/services/admin/backup/DataStreamer.d.ts +11 -0
- package/dist/services/admin/backup/DataStreamer.d.ts.map +1 -0
- package/dist/services/admin/backup/DataStreamer.js +85 -0
- package/dist/services/admin/backup/DataStreamer.js.map +1 -0
- package/dist/services/admin/backup/LegacyAdapter.d.ts +28 -0
- package/dist/services/admin/backup/LegacyAdapter.d.ts.map +1 -0
- package/dist/services/admin/backup/LegacyAdapter.js +35 -0
- package/dist/services/admin/backup/LegacyAdapter.js.map +1 -0
- package/dist/services/admin/backup/SqliteGenerator.d.ts +15 -0
- package/dist/services/admin/backup/SqliteGenerator.d.ts.map +1 -0
- package/dist/services/admin/backup/SqliteGenerator.js +152 -0
- package/dist/services/admin/backup/SqliteGenerator.js.map +1 -0
- package/dist/services/admin/backup/StorageStreamer.d.ts +17 -0
- package/dist/services/admin/backup/StorageStreamer.d.ts.map +1 -0
- package/dist/services/admin/backup/StorageStreamer.js +117 -0
- package/dist/services/admin/backup/StorageStreamer.js.map +1 -0
- package/dist/services/admin/backup/ZipComposer.d.ts +17 -0
- package/dist/services/admin/backup/ZipComposer.d.ts.map +1 -0
- package/dist/services/admin/backup/ZipComposer.js +95 -0
- package/dist/services/admin/backup/ZipComposer.js.map +1 -0
- package/dist/services/admin/backup/ZipExtractor.d.ts +24 -0
- package/dist/services/admin/backup/ZipExtractor.d.ts.map +1 -0
- package/dist/services/admin/backup/ZipExtractor.js +135 -0
- package/dist/services/admin/backup/ZipExtractor.js.map +1 -0
- package/dist/services/admin/backup/index.d.ts +9 -0
- package/dist/services/admin/backup/index.d.ts.map +1 -0
- package/dist/services/admin/backup/index.js +18 -0
- package/dist/services/admin/backup/index.js.map +1 -0
- package/dist/services/admin/backup/types.d.ts +48 -0
- package/dist/services/admin/backup/types.d.ts.map +1 -0
- package/dist/services/admin/backup/types.js +3 -0
- package/dist/services/admin/backup/types.js.map +1 -0
- package/dist/services/admin/backup.service.d.ts +117 -0
- package/dist/services/admin/backup.service.d.ts.map +1 -0
- package/dist/services/admin/backup.service.js +709 -0
- package/dist/services/admin/backup.service.js.map +1 -0
- package/dist/services/admin/data.service.d.ts +109 -0
- package/dist/services/admin/data.service.d.ts.map +1 -0
- package/dist/services/admin/data.service.js +734 -0
- package/dist/services/admin/data.service.js.map +1 -0
- package/dist/services/admin/tenants.service.d.ts +99 -0
- package/dist/services/admin/tenants.service.d.ts.map +1 -0
- package/dist/services/admin/tenants.service.js +173 -0
- package/dist/services/admin/tenants.service.js.map +1 -0
- package/dist/services/auth.service.d.ts +155 -0
- package/dist/services/auth.service.d.ts.map +1 -0
- package/dist/services/auth.service.js +401 -0
- package/dist/services/auth.service.js.map +1 -0
- package/dist/services/introspection.service.d.ts +262 -0
- package/dist/services/introspection.service.d.ts.map +1 -0
- package/dist/services/introspection.service.js +400 -0
- package/dist/services/introspection.service.js.map +1 -0
- package/dist/services/invite.service.d.ts +87 -0
- package/dist/services/invite.service.d.ts.map +1 -0
- package/dist/services/invite.service.js +216 -0
- package/dist/services/invite.service.js.map +1 -0
- package/dist/services/storage.service.d.ts +79 -0
- package/dist/services/storage.service.d.ts.map +1 -0
- package/dist/services/storage.service.js +209 -0
- package/dist/services/storage.service.js.map +1 -0
- package/dist/services/system.service.d.ts +60 -0
- package/dist/services/system.service.d.ts.map +1 -0
- package/dist/services/system.service.js +176 -0
- package/dist/services/system.service.js.map +1 -0
- package/dist/services/tenant.service.d.ts +112 -0
- package/dist/services/tenant.service.d.ts.map +1 -0
- package/dist/services/tenant.service.js +359 -0
- package/dist/services/tenant.service.js.map +1 -0
- package/dist/settings/index.d.ts +6 -0
- package/dist/settings/index.d.ts.map +1 -0
- package/dist/settings/index.js +13 -0
- package/dist/settings/index.js.map +1 -0
- package/dist/settings/schema.d.ts +39 -0
- package/dist/settings/schema.d.ts.map +1 -0
- package/dist/settings/schema.js +41 -0
- package/dist/settings/schema.js.map +1 -0
- package/dist/settings/service.d.ts +28 -0
- package/dist/settings/service.d.ts.map +1 -0
- package/dist/settings/service.js +133 -0
- package/dist/settings/service.js.map +1 -0
- package/dist/startup/bootstrap.d.ts +13 -0
- package/dist/startup/bootstrap.d.ts.map +1 -0
- package/dist/startup/bootstrap.js +262 -0
- package/dist/startup/bootstrap.js.map +1 -0
- package/dist/startup/cluster-manager.d.ts +59 -0
- package/dist/startup/cluster-manager.d.ts.map +1 -0
- package/dist/startup/cluster-manager.js +238 -0
- package/dist/startup/cluster-manager.js.map +1 -0
- package/dist/startup/process-manager.d.ts +46 -0
- package/dist/startup/process-manager.d.ts.map +1 -0
- package/dist/startup/process-manager.js +288 -0
- package/dist/startup/process-manager.js.map +1 -0
- package/dist/startup/processes.d.mts +15 -0
- package/dist/startup/processes.d.mts.map +1 -0
- package/dist/startup/processes.mjs +162 -0
- package/dist/startup/processes.mjs.map +1 -0
- package/dist/startup.js +42 -0
- package/dist/storage/fs-backend.d.ts +38 -0
- package/dist/storage/fs-backend.d.ts.map +1 -0
- package/dist/storage/fs-backend.js +129 -0
- package/dist/storage/fs-backend.js.map +1 -0
- package/dist/storage/manager.d.ts +88 -0
- package/dist/storage/manager.d.ts.map +1 -0
- package/dist/storage/manager.js +416 -0
- package/dist/storage/manager.js.map +1 -0
- package/dist/storage/s3-backend.d.ts +30 -0
- package/dist/storage/s3-backend.d.ts.map +1 -0
- package/dist/storage/s3-backend.js +65 -0
- package/dist/storage/s3-backend.js.map +1 -0
- package/dist/storage/types.d.ts +56 -0
- package/dist/storage/types.d.ts.map +1 -0
- package/dist/storage/types.js +3 -0
- package/dist/storage/types.js.map +1 -0
- package/dist/utils/http.d.ts +16 -0
- package/dist/utils/http.d.ts.map +1 -0
- package/dist/utils/http.js +61 -0
- package/dist/utils/http.js.map +1 -0
- package/dist/utils/introspection-helpers.d.ts +35 -0
- package/dist/utils/introspection-helpers.d.ts.map +1 -0
- package/dist/utils/introspection-helpers.js +246 -0
- package/dist/utils/introspection-helpers.js.map +1 -0
- package/dist/webhook/definition.d.ts +79 -0
- package/dist/webhook/definition.d.ts.map +1 -0
- package/dist/webhook/definition.js +33 -0
- package/dist/webhook/definition.js.map +1 -0
- package/dist/webhook/guard.d.ts +34 -0
- package/dist/webhook/guard.d.ts.map +1 -0
- package/dist/webhook/guard.js +86 -0
- package/dist/webhook/guard.js.map +1 -0
- package/dist/webhook/index.d.ts +9 -0
- package/dist/webhook/index.d.ts.map +1 -0
- package/dist/webhook/index.js +19 -0
- package/dist/webhook/index.js.map +1 -0
- package/dist/webhook/verifier.d.ts +24 -0
- package/dist/webhook/verifier.d.ts.map +1 -0
- package/dist/webhook/verifier.js +107 -0
- package/dist/webhook/verifier.js.map +1 -0
- package/dist/websocket/server.d.ts +74 -0
- package/dist/websocket/server.d.ts.map +1 -0
- package/dist/websocket/server.js +693 -0
- package/dist/websocket/server.js.map +1 -0
- package/dist/websocket/types.d.ts +53 -0
- package/dist/websocket/types.d.ts.map +1 -0
- package/dist/websocket/types.js +3 -0
- package/dist/websocket/types.js.map +1 -0
- package/dist/websocket/ws-compat.d.ts +26 -0
- package/dist/websocket/ws-compat.d.ts.map +1 -0
- package/dist/websocket/ws-compat.js +35 -0
- package/dist/websocket/ws-compat.js.map +1 -0
- package/docker/README.md +5 -0
- package/package.json +210 -0
- package/scripts/postinstall.js +31 -0
- package/templates/.env.example +55 -0
- package/templates/archlast.config.js +36 -0
- package/templates/docker-compose.dev.yml +8 -0
- package/templates/docker-compose.prod.yml +15 -0
- package/templates/docker-compose.yml +33 -0
|
@@ -0,0 +1,2464 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Better-Auth Instance Configuration
|
|
3
|
+
*
|
|
4
|
+
* This file creates and exports the Better-Auth instance with all plugins configured.
|
|
5
|
+
* It includes:
|
|
6
|
+
* - Email and password authentication
|
|
7
|
+
* - Admin plugin (user management, roles, bans, impersonation)
|
|
8
|
+
* - Username plugin (username-based sign-in)
|
|
9
|
+
* - Anonymous plugin (guest users)
|
|
10
|
+
* - API Key plugin (API key management and authentication)
|
|
11
|
+
* - Organization plugin (multi-tenancy support)
|
|
12
|
+
*/
|
|
13
|
+
import type { IDatabaseClient } from "../db/interfaces.js";
|
|
14
|
+
/**
|
|
15
|
+
* Better-Auth instance options
|
|
16
|
+
*/
|
|
17
|
+
export interface BetterAuthInstanceOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Database client for the adapter
|
|
20
|
+
*/
|
|
21
|
+
db: IDatabaseClient;
|
|
22
|
+
/**
|
|
23
|
+
* Require email verification in production
|
|
24
|
+
*/
|
|
25
|
+
requireEmailVerification?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Base URL for the application (for email links, redirects, etc.)
|
|
28
|
+
*/
|
|
29
|
+
baseURL?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Secret for signing tokens
|
|
32
|
+
*/
|
|
33
|
+
secret?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Allowed origins for API key requests
|
|
36
|
+
* Provide an array of allowed origin strings
|
|
37
|
+
* For development, include localhost and web app URLs
|
|
38
|
+
*/
|
|
39
|
+
allowedOrigins?: string[];
|
|
40
|
+
/**
|
|
41
|
+
* Advanced options
|
|
42
|
+
*/
|
|
43
|
+
advanced?: {
|
|
44
|
+
/**
|
|
45
|
+
* Use number IDs instead of string IDs
|
|
46
|
+
*/
|
|
47
|
+
useNumberId?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Custom ID generation function
|
|
50
|
+
*/
|
|
51
|
+
generateId?: () => string;
|
|
52
|
+
/**
|
|
53
|
+
* Cookie prefix
|
|
54
|
+
*/
|
|
55
|
+
cookiePrefix?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Cross-subdomain cookies
|
|
58
|
+
*/
|
|
59
|
+
crossSubDomainCookies?: {
|
|
60
|
+
enabled: boolean;
|
|
61
|
+
domain?: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Rate limiting
|
|
66
|
+
*/
|
|
67
|
+
rateLimit?: {
|
|
68
|
+
/**
|
|
69
|
+
* Maximum requests per window
|
|
70
|
+
*/
|
|
71
|
+
max: number;
|
|
72
|
+
/**
|
|
73
|
+
* Window in milliseconds
|
|
74
|
+
*/
|
|
75
|
+
window: number;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Session configuration
|
|
79
|
+
*/
|
|
80
|
+
session?: {
|
|
81
|
+
/**
|
|
82
|
+
* Session expiration time in milliseconds
|
|
83
|
+
*/
|
|
84
|
+
expiresIn?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Update session on every request
|
|
87
|
+
*/
|
|
88
|
+
updateAge?: number;
|
|
89
|
+
/**
|
|
90
|
+
* Fresh session duration (for sensitive operations)
|
|
91
|
+
*/
|
|
92
|
+
freshAge?: number;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Account configuration
|
|
96
|
+
*/
|
|
97
|
+
account?: {
|
|
98
|
+
/**
|
|
99
|
+
* Allow multiple accounts per email
|
|
100
|
+
*/
|
|
101
|
+
accountLinking?: {
|
|
102
|
+
enabled: boolean;
|
|
103
|
+
trustedProviders?: string[];
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Account deletion options
|
|
107
|
+
*/
|
|
108
|
+
accountDeletion?: {
|
|
109
|
+
enabled: boolean;
|
|
110
|
+
sendDeleteAccountConfirmation?: (email: string, code: string) => Promise<void>;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* API Key configuration
|
|
115
|
+
*/
|
|
116
|
+
apiKey?: {
|
|
117
|
+
/**
|
|
118
|
+
* Default prefix for API keys
|
|
119
|
+
*/
|
|
120
|
+
defaultPrefix?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Whether to require a name for API keys
|
|
123
|
+
*/
|
|
124
|
+
requireName?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Maximum name length for API keys
|
|
127
|
+
*/
|
|
128
|
+
maximumNameLength?: number;
|
|
129
|
+
/**
|
|
130
|
+
* Enable metadata for API keys
|
|
131
|
+
*/
|
|
132
|
+
enableMetadata?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Default expiration time for API keys (in milliseconds)
|
|
135
|
+
*/
|
|
136
|
+
defaultExpiresIn?: number | null;
|
|
137
|
+
/**
|
|
138
|
+
* Minimum expiration time (in days)
|
|
139
|
+
*/
|
|
140
|
+
minExpiresIn?: number;
|
|
141
|
+
/**
|
|
142
|
+
* Maximum expiration time (in days)
|
|
143
|
+
*/
|
|
144
|
+
maxExpiresIn?: number;
|
|
145
|
+
/**
|
|
146
|
+
* Rate limiting configuration for API keys
|
|
147
|
+
*/
|
|
148
|
+
rateLimit?: {
|
|
149
|
+
enabled?: boolean;
|
|
150
|
+
timeWindow?: number;
|
|
151
|
+
maxRequests?: number;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Header name for API key
|
|
155
|
+
*/
|
|
156
|
+
headerName?: string | string[];
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Create a Better-Auth instance with Archlast adapter and plugins
|
|
161
|
+
*/
|
|
162
|
+
export declare function createBetterAuthInstance(userOptions: BetterAuthInstanceOptions): import("better-auth", { with: { "resolution-mode": "import" } }).Auth<{
|
|
163
|
+
database: any;
|
|
164
|
+
baseURL: string | undefined;
|
|
165
|
+
secret: string;
|
|
166
|
+
trustedOrigins: any;
|
|
167
|
+
emailAndPassword: {
|
|
168
|
+
enabled: true;
|
|
169
|
+
requireEmailVerification: boolean;
|
|
170
|
+
sendResetPassword: ({ user, url, token }: {
|
|
171
|
+
user: import("better-auth", { with: { "resolution-mode": "import" } }).User;
|
|
172
|
+
url: string;
|
|
173
|
+
token: string;
|
|
174
|
+
}) => Promise<void>;
|
|
175
|
+
};
|
|
176
|
+
advanced: {
|
|
177
|
+
generateId: (() => string) | undefined;
|
|
178
|
+
cookiePrefix: string;
|
|
179
|
+
crossSubDomainCookies: {
|
|
180
|
+
enabled: boolean;
|
|
181
|
+
domain?: string;
|
|
182
|
+
} | undefined;
|
|
183
|
+
};
|
|
184
|
+
session: {
|
|
185
|
+
expiresIn: number | undefined;
|
|
186
|
+
updateAge: number | undefined;
|
|
187
|
+
freshAge: number | undefined;
|
|
188
|
+
cookieCache: {
|
|
189
|
+
enabled: true;
|
|
190
|
+
maxAge: number;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
rateLimit: {
|
|
194
|
+
window: number;
|
|
195
|
+
max: number;
|
|
196
|
+
} | undefined;
|
|
197
|
+
socialProviders: {};
|
|
198
|
+
plugins: [{
|
|
199
|
+
id: "admin";
|
|
200
|
+
init(): {
|
|
201
|
+
options: {
|
|
202
|
+
databaseHooks: {
|
|
203
|
+
user: {
|
|
204
|
+
create: {
|
|
205
|
+
before(user: {
|
|
206
|
+
id: string;
|
|
207
|
+
createdAt: Date;
|
|
208
|
+
updatedAt: Date;
|
|
209
|
+
email: string;
|
|
210
|
+
emailVerified: boolean;
|
|
211
|
+
name: string;
|
|
212
|
+
image?: string | null | undefined;
|
|
213
|
+
} & Record<string, unknown>): Promise<{
|
|
214
|
+
data: {
|
|
215
|
+
id: string;
|
|
216
|
+
createdAt: Date;
|
|
217
|
+
updatedAt: Date;
|
|
218
|
+
email: string;
|
|
219
|
+
emailVerified: boolean;
|
|
220
|
+
name: string;
|
|
221
|
+
image?: string | null | undefined;
|
|
222
|
+
role: string;
|
|
223
|
+
};
|
|
224
|
+
}>;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
session: {
|
|
228
|
+
create: {
|
|
229
|
+
before(session: {
|
|
230
|
+
id: string;
|
|
231
|
+
createdAt: Date;
|
|
232
|
+
updatedAt: Date;
|
|
233
|
+
userId: string;
|
|
234
|
+
expiresAt: Date;
|
|
235
|
+
token: string;
|
|
236
|
+
ipAddress?: string | null | undefined;
|
|
237
|
+
userAgent?: string | null | undefined;
|
|
238
|
+
} & Record<string, unknown>, ctx: import("better-auth", { with: { "resolution-mode": "import" } }).GenericEndpointContext | null): Promise<void>;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
hooks: {
|
|
245
|
+
after: {
|
|
246
|
+
matcher(context: import("better-auth", { with: { "resolution-mode": "import" } }).HookEndpointContext): boolean;
|
|
247
|
+
handler: (inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<import("better-auth/plugins", { with: { "resolution-mode": "import" } }).SessionWithImpersonatedBy[] | undefined>;
|
|
248
|
+
}[];
|
|
249
|
+
};
|
|
250
|
+
endpoints: {
|
|
251
|
+
setRole: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/set-role", {
|
|
252
|
+
method: "POST";
|
|
253
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
254
|
+
userId: import("better-auth", { with: { "resolution-mode": "import" } }).ZodCoercedString<unknown>;
|
|
255
|
+
role: import("better-auth", { with: { "resolution-mode": "import" } }).ZodUnion<readonly [import("better-auth", { with: { "resolution-mode": "import" } }).ZodString, import("better-auth", { with: { "resolution-mode": "import" } }).ZodArray<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>]>;
|
|
256
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
257
|
+
requireHeaders: true;
|
|
258
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
259
|
+
session: {
|
|
260
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
261
|
+
session: import("better-auth", { with: { "resolution-mode": "import" } }).Session;
|
|
262
|
+
};
|
|
263
|
+
}>)[];
|
|
264
|
+
metadata: {
|
|
265
|
+
openapi: {
|
|
266
|
+
operationId: string;
|
|
267
|
+
summary: string;
|
|
268
|
+
description: string;
|
|
269
|
+
responses: {
|
|
270
|
+
200: {
|
|
271
|
+
description: string;
|
|
272
|
+
content: {
|
|
273
|
+
"application/json": {
|
|
274
|
+
schema: {
|
|
275
|
+
type: "object";
|
|
276
|
+
properties: {
|
|
277
|
+
user: {
|
|
278
|
+
$ref: string;
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
$Infer: {
|
|
288
|
+
body: {
|
|
289
|
+
userId: string;
|
|
290
|
+
role: "user" | "admin" | ("user" | "admin")[];
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
}, {
|
|
295
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
296
|
+
}>;
|
|
297
|
+
getUser: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/get-user", {
|
|
298
|
+
method: "GET";
|
|
299
|
+
query: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
300
|
+
id: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
|
|
301
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
302
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
303
|
+
session: {
|
|
304
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
305
|
+
session: import("better-auth", { with: { "resolution-mode": "import" } }).Session;
|
|
306
|
+
};
|
|
307
|
+
}>)[];
|
|
308
|
+
metadata: {
|
|
309
|
+
openapi: {
|
|
310
|
+
operationId: string;
|
|
311
|
+
summary: string;
|
|
312
|
+
description: string;
|
|
313
|
+
responses: {
|
|
314
|
+
200: {
|
|
315
|
+
description: string;
|
|
316
|
+
content: {
|
|
317
|
+
"application/json": {
|
|
318
|
+
schema: {
|
|
319
|
+
type: "object";
|
|
320
|
+
properties: {
|
|
321
|
+
user: {
|
|
322
|
+
$ref: string;
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
}, {
|
|
333
|
+
id: string;
|
|
334
|
+
createdAt: Date;
|
|
335
|
+
updatedAt: Date;
|
|
336
|
+
email: string;
|
|
337
|
+
emailVerified: boolean;
|
|
338
|
+
name: string;
|
|
339
|
+
image?: string | null | undefined;
|
|
340
|
+
}>;
|
|
341
|
+
createUser: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/create-user", {
|
|
342
|
+
method: "POST";
|
|
343
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
344
|
+
email: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
|
|
345
|
+
password: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
|
|
346
|
+
name: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
|
|
347
|
+
role: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodUnion<readonly [import("better-auth", { with: { "resolution-mode": "import" } }).ZodString, import("better-auth", { with: { "resolution-mode": "import" } }).ZodArray<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>]>>;
|
|
348
|
+
data: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodRecord<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString, import("better-auth", { with: { "resolution-mode": "import" } }).ZodAny>>;
|
|
349
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
350
|
+
metadata: {
|
|
351
|
+
openapi: {
|
|
352
|
+
operationId: string;
|
|
353
|
+
summary: string;
|
|
354
|
+
description: string;
|
|
355
|
+
responses: {
|
|
356
|
+
200: {
|
|
357
|
+
description: string;
|
|
358
|
+
content: {
|
|
359
|
+
"application/json": {
|
|
360
|
+
schema: {
|
|
361
|
+
type: "object";
|
|
362
|
+
properties: {
|
|
363
|
+
user: {
|
|
364
|
+
$ref: string;
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
$Infer: {
|
|
374
|
+
body: {
|
|
375
|
+
email: string;
|
|
376
|
+
password: string;
|
|
377
|
+
name: string;
|
|
378
|
+
role?: "user" | "admin" | ("user" | "admin")[] | undefined;
|
|
379
|
+
data?: Record<string, any> | undefined;
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
}, {
|
|
384
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
385
|
+
}>;
|
|
386
|
+
adminUpdateUser: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/update-user", {
|
|
387
|
+
method: "POST";
|
|
388
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
389
|
+
userId: import("better-auth", { with: { "resolution-mode": "import" } }).ZodCoercedString<unknown>;
|
|
390
|
+
data: import("better-auth", { with: { "resolution-mode": "import" } }).ZodRecord<import("better-auth", { with: { "resolution-mode": "import" } }).ZodAny, import("better-auth", { with: { "resolution-mode": "import" } }).ZodAny>;
|
|
391
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
392
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
393
|
+
session: {
|
|
394
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
395
|
+
session: import("better-auth", { with: { "resolution-mode": "import" } }).Session;
|
|
396
|
+
};
|
|
397
|
+
}>)[];
|
|
398
|
+
metadata: {
|
|
399
|
+
openapi: {
|
|
400
|
+
operationId: string;
|
|
401
|
+
summary: string;
|
|
402
|
+
description: string;
|
|
403
|
+
responses: {
|
|
404
|
+
200: {
|
|
405
|
+
description: string;
|
|
406
|
+
content: {
|
|
407
|
+
"application/json": {
|
|
408
|
+
schema: {
|
|
409
|
+
type: "object";
|
|
410
|
+
properties: {
|
|
411
|
+
user: {
|
|
412
|
+
$ref: string;
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
}, import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole>;
|
|
423
|
+
listUsers: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/list-users", {
|
|
424
|
+
method: "GET";
|
|
425
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
426
|
+
session: {
|
|
427
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
428
|
+
session: import("better-auth", { with: { "resolution-mode": "import" } }).Session;
|
|
429
|
+
};
|
|
430
|
+
}>)[];
|
|
431
|
+
query: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
432
|
+
searchValue: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>;
|
|
433
|
+
searchField: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodEnum<{
|
|
434
|
+
name: "name";
|
|
435
|
+
email: "email";
|
|
436
|
+
}>>;
|
|
437
|
+
searchOperator: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodEnum<{
|
|
438
|
+
contains: "contains";
|
|
439
|
+
starts_with: "starts_with";
|
|
440
|
+
ends_with: "ends_with";
|
|
441
|
+
}>>;
|
|
442
|
+
limit: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodUnion<[import("better-auth", { with: { "resolution-mode": "import" } }).ZodString, import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber]>>;
|
|
443
|
+
offset: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodUnion<[import("better-auth", { with: { "resolution-mode": "import" } }).ZodString, import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber]>>;
|
|
444
|
+
sortBy: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>;
|
|
445
|
+
sortDirection: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodEnum<{
|
|
446
|
+
asc: "asc";
|
|
447
|
+
desc: "desc";
|
|
448
|
+
}>>;
|
|
449
|
+
filterField: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>;
|
|
450
|
+
filterValue: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodUnion<[import("better-auth", { with: { "resolution-mode": "import" } }).ZodUnion<[import("better-auth", { with: { "resolution-mode": "import" } }).ZodString, import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber]>, import("better-auth", { with: { "resolution-mode": "import" } }).ZodBoolean]>>;
|
|
451
|
+
filterOperator: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodEnum<{
|
|
452
|
+
eq: "eq";
|
|
453
|
+
ne: "ne";
|
|
454
|
+
lt: "lt";
|
|
455
|
+
lte: "lte";
|
|
456
|
+
gt: "gt";
|
|
457
|
+
gte: "gte";
|
|
458
|
+
contains: "contains";
|
|
459
|
+
}>>;
|
|
460
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
461
|
+
metadata: {
|
|
462
|
+
openapi: {
|
|
463
|
+
operationId: string;
|
|
464
|
+
summary: string;
|
|
465
|
+
description: string;
|
|
466
|
+
responses: {
|
|
467
|
+
200: {
|
|
468
|
+
description: string;
|
|
469
|
+
content: {
|
|
470
|
+
"application/json": {
|
|
471
|
+
schema: {
|
|
472
|
+
type: "object";
|
|
473
|
+
properties: {
|
|
474
|
+
users: {
|
|
475
|
+
type: string;
|
|
476
|
+
items: {
|
|
477
|
+
$ref: string;
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
total: {
|
|
481
|
+
type: string;
|
|
482
|
+
};
|
|
483
|
+
limit: {
|
|
484
|
+
type: string;
|
|
485
|
+
};
|
|
486
|
+
offset: {
|
|
487
|
+
type: string;
|
|
488
|
+
};
|
|
489
|
+
};
|
|
490
|
+
required: string[];
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
}, {
|
|
499
|
+
users: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole[];
|
|
500
|
+
total: number;
|
|
501
|
+
limit: number | undefined;
|
|
502
|
+
offset: number | undefined;
|
|
503
|
+
} | {
|
|
504
|
+
users: never[];
|
|
505
|
+
total: number;
|
|
506
|
+
}>;
|
|
507
|
+
listUserSessions: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/list-user-sessions", {
|
|
508
|
+
method: "POST";
|
|
509
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
510
|
+
session: {
|
|
511
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
512
|
+
session: import("better-auth", { with: { "resolution-mode": "import" } }).Session;
|
|
513
|
+
};
|
|
514
|
+
}>)[];
|
|
515
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
516
|
+
userId: import("better-auth", { with: { "resolution-mode": "import" } }).ZodCoercedString<unknown>;
|
|
517
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
518
|
+
metadata: {
|
|
519
|
+
openapi: {
|
|
520
|
+
operationId: string;
|
|
521
|
+
summary: string;
|
|
522
|
+
description: string;
|
|
523
|
+
responses: {
|
|
524
|
+
200: {
|
|
525
|
+
description: string;
|
|
526
|
+
content: {
|
|
527
|
+
"application/json": {
|
|
528
|
+
schema: {
|
|
529
|
+
type: "object";
|
|
530
|
+
properties: {
|
|
531
|
+
sessions: {
|
|
532
|
+
type: string;
|
|
533
|
+
items: {
|
|
534
|
+
$ref: string;
|
|
535
|
+
};
|
|
536
|
+
};
|
|
537
|
+
};
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
};
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
}, {
|
|
546
|
+
sessions: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).SessionWithImpersonatedBy[];
|
|
547
|
+
}>;
|
|
548
|
+
unbanUser: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/unban-user", {
|
|
549
|
+
method: "POST";
|
|
550
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
551
|
+
userId: import("better-auth", { with: { "resolution-mode": "import" } }).ZodCoercedString<unknown>;
|
|
552
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
553
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
554
|
+
session: {
|
|
555
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
556
|
+
session: import("better-auth", { with: { "resolution-mode": "import" } }).Session;
|
|
557
|
+
};
|
|
558
|
+
}>)[];
|
|
559
|
+
metadata: {
|
|
560
|
+
openapi: {
|
|
561
|
+
operationId: string;
|
|
562
|
+
summary: string;
|
|
563
|
+
description: string;
|
|
564
|
+
responses: {
|
|
565
|
+
200: {
|
|
566
|
+
description: string;
|
|
567
|
+
content: {
|
|
568
|
+
"application/json": {
|
|
569
|
+
schema: {
|
|
570
|
+
type: "object";
|
|
571
|
+
properties: {
|
|
572
|
+
user: {
|
|
573
|
+
$ref: string;
|
|
574
|
+
};
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
};
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
}, {
|
|
584
|
+
user: {
|
|
585
|
+
id: string;
|
|
586
|
+
createdAt: Date;
|
|
587
|
+
updatedAt: Date;
|
|
588
|
+
email: string;
|
|
589
|
+
emailVerified: boolean;
|
|
590
|
+
name: string;
|
|
591
|
+
image?: string | null | undefined;
|
|
592
|
+
} & Record<string, any>;
|
|
593
|
+
}>;
|
|
594
|
+
banUser: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/ban-user", {
|
|
595
|
+
method: "POST";
|
|
596
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
597
|
+
userId: import("better-auth", { with: { "resolution-mode": "import" } }).ZodCoercedString<unknown>;
|
|
598
|
+
banReason: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>;
|
|
599
|
+
banExpiresIn: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber>;
|
|
600
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
601
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
602
|
+
session: {
|
|
603
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
604
|
+
session: import("better-auth", { with: { "resolution-mode": "import" } }).Session;
|
|
605
|
+
};
|
|
606
|
+
}>)[];
|
|
607
|
+
metadata: {
|
|
608
|
+
openapi: {
|
|
609
|
+
operationId: string;
|
|
610
|
+
summary: string;
|
|
611
|
+
description: string;
|
|
612
|
+
responses: {
|
|
613
|
+
200: {
|
|
614
|
+
description: string;
|
|
615
|
+
content: {
|
|
616
|
+
"application/json": {
|
|
617
|
+
schema: {
|
|
618
|
+
type: "object";
|
|
619
|
+
properties: {
|
|
620
|
+
user: {
|
|
621
|
+
$ref: string;
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
};
|
|
629
|
+
};
|
|
630
|
+
};
|
|
631
|
+
}, {
|
|
632
|
+
user: {
|
|
633
|
+
id: string;
|
|
634
|
+
createdAt: Date;
|
|
635
|
+
updatedAt: Date;
|
|
636
|
+
email: string;
|
|
637
|
+
emailVerified: boolean;
|
|
638
|
+
name: string;
|
|
639
|
+
image?: string | null | undefined;
|
|
640
|
+
} & Record<string, any>;
|
|
641
|
+
}>;
|
|
642
|
+
impersonateUser: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/impersonate-user", {
|
|
643
|
+
method: "POST";
|
|
644
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
645
|
+
userId: import("better-auth", { with: { "resolution-mode": "import" } }).ZodCoercedString<unknown>;
|
|
646
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
647
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
648
|
+
session: {
|
|
649
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
650
|
+
session: import("better-auth", { with: { "resolution-mode": "import" } }).Session;
|
|
651
|
+
};
|
|
652
|
+
}>)[];
|
|
653
|
+
metadata: {
|
|
654
|
+
openapi: {
|
|
655
|
+
operationId: string;
|
|
656
|
+
summary: string;
|
|
657
|
+
description: string;
|
|
658
|
+
responses: {
|
|
659
|
+
200: {
|
|
660
|
+
description: string;
|
|
661
|
+
content: {
|
|
662
|
+
"application/json": {
|
|
663
|
+
schema: {
|
|
664
|
+
type: "object";
|
|
665
|
+
properties: {
|
|
666
|
+
session: {
|
|
667
|
+
$ref: string;
|
|
668
|
+
};
|
|
669
|
+
user: {
|
|
670
|
+
$ref: string;
|
|
671
|
+
};
|
|
672
|
+
};
|
|
673
|
+
};
|
|
674
|
+
};
|
|
675
|
+
};
|
|
676
|
+
};
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
};
|
|
680
|
+
}, {
|
|
681
|
+
session: {
|
|
682
|
+
id: string;
|
|
683
|
+
createdAt: Date;
|
|
684
|
+
updatedAt: Date;
|
|
685
|
+
userId: string;
|
|
686
|
+
expiresAt: Date;
|
|
687
|
+
token: string;
|
|
688
|
+
ipAddress?: string | null | undefined;
|
|
689
|
+
userAgent?: string | null | undefined;
|
|
690
|
+
};
|
|
691
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
692
|
+
}>;
|
|
693
|
+
stopImpersonating: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/stop-impersonating", {
|
|
694
|
+
method: "POST";
|
|
695
|
+
requireHeaders: true;
|
|
696
|
+
}, {
|
|
697
|
+
session: import("better-auth", { with: { "resolution-mode": "import" } }).Session & Record<string, any>;
|
|
698
|
+
user: import("better-auth", { with: { "resolution-mode": "import" } }).User & Record<string, any>;
|
|
699
|
+
}>;
|
|
700
|
+
revokeUserSession: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/revoke-user-session", {
|
|
701
|
+
method: "POST";
|
|
702
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
703
|
+
sessionToken: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
|
|
704
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
705
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
706
|
+
session: {
|
|
707
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
708
|
+
session: import("better-auth", { with: { "resolution-mode": "import" } }).Session;
|
|
709
|
+
};
|
|
710
|
+
}>)[];
|
|
711
|
+
metadata: {
|
|
712
|
+
openapi: {
|
|
713
|
+
operationId: string;
|
|
714
|
+
summary: string;
|
|
715
|
+
description: string;
|
|
716
|
+
responses: {
|
|
717
|
+
200: {
|
|
718
|
+
description: string;
|
|
719
|
+
content: {
|
|
720
|
+
"application/json": {
|
|
721
|
+
schema: {
|
|
722
|
+
type: "object";
|
|
723
|
+
properties: {
|
|
724
|
+
success: {
|
|
725
|
+
type: string;
|
|
726
|
+
};
|
|
727
|
+
};
|
|
728
|
+
};
|
|
729
|
+
};
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
};
|
|
733
|
+
};
|
|
734
|
+
};
|
|
735
|
+
}, {
|
|
736
|
+
success: boolean;
|
|
737
|
+
}>;
|
|
738
|
+
revokeUserSessions: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/revoke-user-sessions", {
|
|
739
|
+
method: "POST";
|
|
740
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
741
|
+
userId: import("better-auth", { with: { "resolution-mode": "import" } }).ZodCoercedString<unknown>;
|
|
742
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
743
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
744
|
+
session: {
|
|
745
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
746
|
+
session: import("better-auth", { with: { "resolution-mode": "import" } }).Session;
|
|
747
|
+
};
|
|
748
|
+
}>)[];
|
|
749
|
+
metadata: {
|
|
750
|
+
openapi: {
|
|
751
|
+
operationId: string;
|
|
752
|
+
summary: string;
|
|
753
|
+
description: string;
|
|
754
|
+
responses: {
|
|
755
|
+
200: {
|
|
756
|
+
description: string;
|
|
757
|
+
content: {
|
|
758
|
+
"application/json": {
|
|
759
|
+
schema: {
|
|
760
|
+
type: "object";
|
|
761
|
+
properties: {
|
|
762
|
+
success: {
|
|
763
|
+
type: string;
|
|
764
|
+
};
|
|
765
|
+
};
|
|
766
|
+
};
|
|
767
|
+
};
|
|
768
|
+
};
|
|
769
|
+
};
|
|
770
|
+
};
|
|
771
|
+
};
|
|
772
|
+
};
|
|
773
|
+
}, {
|
|
774
|
+
success: boolean;
|
|
775
|
+
}>;
|
|
776
|
+
removeUser: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/remove-user", {
|
|
777
|
+
method: "POST";
|
|
778
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
779
|
+
userId: import("better-auth", { with: { "resolution-mode": "import" } }).ZodCoercedString<unknown>;
|
|
780
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
781
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
782
|
+
session: {
|
|
783
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
784
|
+
session: import("better-auth", { with: { "resolution-mode": "import" } }).Session;
|
|
785
|
+
};
|
|
786
|
+
}>)[];
|
|
787
|
+
metadata: {
|
|
788
|
+
openapi: {
|
|
789
|
+
operationId: string;
|
|
790
|
+
summary: string;
|
|
791
|
+
description: string;
|
|
792
|
+
responses: {
|
|
793
|
+
200: {
|
|
794
|
+
description: string;
|
|
795
|
+
content: {
|
|
796
|
+
"application/json": {
|
|
797
|
+
schema: {
|
|
798
|
+
type: "object";
|
|
799
|
+
properties: {
|
|
800
|
+
success: {
|
|
801
|
+
type: string;
|
|
802
|
+
};
|
|
803
|
+
};
|
|
804
|
+
};
|
|
805
|
+
};
|
|
806
|
+
};
|
|
807
|
+
};
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
};
|
|
811
|
+
}, {
|
|
812
|
+
success: boolean;
|
|
813
|
+
}>;
|
|
814
|
+
setUserPassword: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/set-user-password", {
|
|
815
|
+
method: "POST";
|
|
816
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
817
|
+
newPassword: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
|
|
818
|
+
userId: import("better-auth", { with: { "resolution-mode": "import" } }).ZodCoercedString<unknown>;
|
|
819
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
820
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
821
|
+
session: {
|
|
822
|
+
user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
|
|
823
|
+
session: import("better-auth", { with: { "resolution-mode": "import" } }).Session;
|
|
824
|
+
};
|
|
825
|
+
}>)[];
|
|
826
|
+
metadata: {
|
|
827
|
+
openapi: {
|
|
828
|
+
operationId: string;
|
|
829
|
+
summary: string;
|
|
830
|
+
description: string;
|
|
831
|
+
responses: {
|
|
832
|
+
200: {
|
|
833
|
+
description: string;
|
|
834
|
+
content: {
|
|
835
|
+
"application/json": {
|
|
836
|
+
schema: {
|
|
837
|
+
type: "object";
|
|
838
|
+
properties: {
|
|
839
|
+
status: {
|
|
840
|
+
type: string;
|
|
841
|
+
};
|
|
842
|
+
};
|
|
843
|
+
};
|
|
844
|
+
};
|
|
845
|
+
};
|
|
846
|
+
};
|
|
847
|
+
};
|
|
848
|
+
};
|
|
849
|
+
};
|
|
850
|
+
}, {
|
|
851
|
+
status: boolean;
|
|
852
|
+
}>;
|
|
853
|
+
userHasPermission: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/has-permission", {
|
|
854
|
+
method: "POST";
|
|
855
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodIntersection<import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
856
|
+
userId: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodCoercedString<unknown>>;
|
|
857
|
+
role: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>;
|
|
858
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>, import("better-auth", { with: { "resolution-mode": "import" } }).ZodUnion<readonly [import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
859
|
+
permission: import("better-auth", { with: { "resolution-mode": "import" } }).ZodRecord<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString, import("better-auth", { with: { "resolution-mode": "import" } }).ZodArray<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>>;
|
|
860
|
+
permissions: import("better-auth", { with: { "resolution-mode": "import" } }).ZodUndefined;
|
|
861
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>, import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
862
|
+
permission: import("better-auth", { with: { "resolution-mode": "import" } }).ZodUndefined;
|
|
863
|
+
permissions: import("better-auth", { with: { "resolution-mode": "import" } }).ZodRecord<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString, import("better-auth", { with: { "resolution-mode": "import" } }).ZodArray<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>>;
|
|
864
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>]>>;
|
|
865
|
+
metadata: {
|
|
866
|
+
openapi: {
|
|
867
|
+
description: string;
|
|
868
|
+
requestBody: {
|
|
869
|
+
content: {
|
|
870
|
+
"application/json": {
|
|
871
|
+
schema: {
|
|
872
|
+
type: "object";
|
|
873
|
+
properties: {
|
|
874
|
+
permission: {
|
|
875
|
+
type: string;
|
|
876
|
+
description: string;
|
|
877
|
+
deprecated: boolean;
|
|
878
|
+
};
|
|
879
|
+
permissions: {
|
|
880
|
+
type: string;
|
|
881
|
+
description: string;
|
|
882
|
+
};
|
|
883
|
+
};
|
|
884
|
+
required: string[];
|
|
885
|
+
};
|
|
886
|
+
};
|
|
887
|
+
};
|
|
888
|
+
};
|
|
889
|
+
responses: {
|
|
890
|
+
"200": {
|
|
891
|
+
description: string;
|
|
892
|
+
content: {
|
|
893
|
+
"application/json": {
|
|
894
|
+
schema: {
|
|
895
|
+
type: "object";
|
|
896
|
+
properties: {
|
|
897
|
+
error: {
|
|
898
|
+
type: string;
|
|
899
|
+
};
|
|
900
|
+
success: {
|
|
901
|
+
type: string;
|
|
902
|
+
};
|
|
903
|
+
};
|
|
904
|
+
required: string[];
|
|
905
|
+
};
|
|
906
|
+
};
|
|
907
|
+
};
|
|
908
|
+
};
|
|
909
|
+
};
|
|
910
|
+
};
|
|
911
|
+
$Infer: {
|
|
912
|
+
body: ({
|
|
913
|
+
permission: {
|
|
914
|
+
readonly user?: ("delete" | "list" | "set-role" | "create" | "update" | "get" | "ban" | "impersonate" | "set-password")[] | undefined;
|
|
915
|
+
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
916
|
+
};
|
|
917
|
+
permissions?: never | undefined;
|
|
918
|
+
} | {
|
|
919
|
+
permissions: {
|
|
920
|
+
readonly user?: ("delete" | "list" | "set-role" | "create" | "update" | "get" | "ban" | "impersonate" | "set-password")[] | undefined;
|
|
921
|
+
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
922
|
+
};
|
|
923
|
+
permission?: never | undefined;
|
|
924
|
+
}) & {
|
|
925
|
+
userId?: string | undefined;
|
|
926
|
+
role?: "user" | "admin" | undefined;
|
|
927
|
+
};
|
|
928
|
+
};
|
|
929
|
+
};
|
|
930
|
+
}, {
|
|
931
|
+
error: null;
|
|
932
|
+
success: boolean;
|
|
933
|
+
}>;
|
|
934
|
+
};
|
|
935
|
+
$ERROR_CODES: {
|
|
936
|
+
readonly FAILED_TO_CREATE_USER: "Failed to create user";
|
|
937
|
+
readonly USER_ALREADY_EXISTS: "User already exists.";
|
|
938
|
+
readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
|
|
939
|
+
readonly YOU_CANNOT_BAN_YOURSELF: "You cannot ban yourself";
|
|
940
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: "You are not allowed to change users role";
|
|
941
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: "You are not allowed to create users";
|
|
942
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: "You are not allowed to list users";
|
|
943
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: "You are not allowed to list users sessions";
|
|
944
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: "You are not allowed to ban users";
|
|
945
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: "You are not allowed to impersonate users";
|
|
946
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: "You are not allowed to revoke users sessions";
|
|
947
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: "You are not allowed to delete users";
|
|
948
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: "You are not allowed to set users password";
|
|
949
|
+
readonly BANNED_USER: "You have been banned from this application";
|
|
950
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_GET_USER: "You are not allowed to get user";
|
|
951
|
+
readonly NO_DATA_TO_UPDATE: "No data to update";
|
|
952
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
|
|
953
|
+
readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
|
|
954
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
|
|
955
|
+
readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
|
|
956
|
+
readonly INVALID_ROLE_TYPE: "Invalid role type";
|
|
957
|
+
};
|
|
958
|
+
schema: {
|
|
959
|
+
user: {
|
|
960
|
+
fields: {
|
|
961
|
+
role: {
|
|
962
|
+
type: "string";
|
|
963
|
+
required: false;
|
|
964
|
+
input: false;
|
|
965
|
+
};
|
|
966
|
+
banned: {
|
|
967
|
+
type: "boolean";
|
|
968
|
+
defaultValue: false;
|
|
969
|
+
required: false;
|
|
970
|
+
input: false;
|
|
971
|
+
};
|
|
972
|
+
banReason: {
|
|
973
|
+
type: "string";
|
|
974
|
+
required: false;
|
|
975
|
+
input: false;
|
|
976
|
+
};
|
|
977
|
+
banExpires: {
|
|
978
|
+
type: "date";
|
|
979
|
+
required: false;
|
|
980
|
+
input: false;
|
|
981
|
+
};
|
|
982
|
+
};
|
|
983
|
+
};
|
|
984
|
+
session: {
|
|
985
|
+
fields: {
|
|
986
|
+
impersonatedBy: {
|
|
987
|
+
type: "string";
|
|
988
|
+
required: false;
|
|
989
|
+
};
|
|
990
|
+
};
|
|
991
|
+
};
|
|
992
|
+
};
|
|
993
|
+
options: NoInfer<{
|
|
994
|
+
defaultRole: string;
|
|
995
|
+
adminRoles: string[];
|
|
996
|
+
deleteUserAccount: {
|
|
997
|
+
enabled: boolean;
|
|
998
|
+
sendDeleteAccountConfirmation: () => Promise<void>;
|
|
999
|
+
};
|
|
1000
|
+
}>;
|
|
1001
|
+
}, {
|
|
1002
|
+
id: "username";
|
|
1003
|
+
init(ctx: import("better-auth", { with: { "resolution-mode": "import" } }).AuthContext): {
|
|
1004
|
+
options: {
|
|
1005
|
+
databaseHooks: {
|
|
1006
|
+
user: {
|
|
1007
|
+
create: {
|
|
1008
|
+
before(user: {
|
|
1009
|
+
id: string;
|
|
1010
|
+
createdAt: Date;
|
|
1011
|
+
updatedAt: Date;
|
|
1012
|
+
email: string;
|
|
1013
|
+
emailVerified: boolean;
|
|
1014
|
+
name: string;
|
|
1015
|
+
image?: string | null | undefined;
|
|
1016
|
+
} & Record<string, unknown>, context: import("better-auth", { with: { "resolution-mode": "import" } }).GenericEndpointContext | null): Promise<{
|
|
1017
|
+
data: {
|
|
1018
|
+
displayUsername?: string | undefined;
|
|
1019
|
+
username?: string | undefined;
|
|
1020
|
+
id: string;
|
|
1021
|
+
createdAt: Date;
|
|
1022
|
+
updatedAt: Date;
|
|
1023
|
+
email: string;
|
|
1024
|
+
emailVerified: boolean;
|
|
1025
|
+
name: string;
|
|
1026
|
+
image?: string | null | undefined;
|
|
1027
|
+
};
|
|
1028
|
+
}>;
|
|
1029
|
+
};
|
|
1030
|
+
update: {
|
|
1031
|
+
before(user: Partial<{
|
|
1032
|
+
id: string;
|
|
1033
|
+
createdAt: Date;
|
|
1034
|
+
updatedAt: Date;
|
|
1035
|
+
email: string;
|
|
1036
|
+
emailVerified: boolean;
|
|
1037
|
+
name: string;
|
|
1038
|
+
image?: string | null | undefined;
|
|
1039
|
+
}> & Record<string, unknown>, context: import("better-auth", { with: { "resolution-mode": "import" } }).GenericEndpointContext | null): Promise<{
|
|
1040
|
+
data: {
|
|
1041
|
+
displayUsername?: string | undefined;
|
|
1042
|
+
username?: string | undefined;
|
|
1043
|
+
id? /**
|
|
1044
|
+
* Maximum expiration time (in days)
|
|
1045
|
+
*/: string | undefined;
|
|
1046
|
+
createdAt?: Date | undefined;
|
|
1047
|
+
updatedAt
|
|
1048
|
+
/**
|
|
1049
|
+
* Rate limiting configuration for API keys
|
|
1050
|
+
*/
|
|
1051
|
+
? /**
|
|
1052
|
+
* Rate limiting configuration for API keys
|
|
1053
|
+
*/: Date | undefined;
|
|
1054
|
+
email?: string | undefined;
|
|
1055
|
+
emailVerified?: boolean | undefined;
|
|
1056
|
+
name?: string | undefined;
|
|
1057
|
+
image?: string | null | undefined;
|
|
1058
|
+
};
|
|
1059
|
+
}>;
|
|
1060
|
+
};
|
|
1061
|
+
};
|
|
1062
|
+
};
|
|
1063
|
+
};
|
|
1064
|
+
};
|
|
1065
|
+
endpoints: {
|
|
1066
|
+
signInUsername: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/sign-in/username", {
|
|
1067
|
+
method: "POST";
|
|
1068
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
1069
|
+
username: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
|
|
1070
|
+
password: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
|
|
1071
|
+
rememberMe: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodBoolean>;
|
|
1072
|
+
callbackURL: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>;
|
|
1073
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
1074
|
+
metadata: {
|
|
1075
|
+
openapi: {
|
|
1076
|
+
summary: string;
|
|
1077
|
+
description: string;
|
|
1078
|
+
responses: {
|
|
1079
|
+
200: {
|
|
1080
|
+
description: string;
|
|
1081
|
+
content: {
|
|
1082
|
+
"application/json": {
|
|
1083
|
+
schema: {
|
|
1084
|
+
type: "object";
|
|
1085
|
+
properties: {
|
|
1086
|
+
token: {
|
|
1087
|
+
type: string;
|
|
1088
|
+
description: string;
|
|
1089
|
+
};
|
|
1090
|
+
user: {
|
|
1091
|
+
$ref: string;
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
required: string[];
|
|
1095
|
+
};
|
|
1096
|
+
};
|
|
1097
|
+
};
|
|
1098
|
+
};
|
|
1099
|
+
422: {
|
|
1100
|
+
description: string;
|
|
1101
|
+
content: {
|
|
1102
|
+
"application/json": {
|
|
1103
|
+
schema: {
|
|
1104
|
+
type: "object";
|
|
1105
|
+
properties: {
|
|
1106
|
+
message: {
|
|
1107
|
+
type: string;
|
|
1108
|
+
};
|
|
1109
|
+
};
|
|
1110
|
+
};
|
|
1111
|
+
};
|
|
1112
|
+
};
|
|
1113
|
+
};
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1116
|
+
};
|
|
1117
|
+
}, {
|
|
1118
|
+
token: string;
|
|
1119
|
+
user: {
|
|
1120
|
+
id: string;
|
|
1121
|
+
email: string;
|
|
1122
|
+
emailVerified: boolean;
|
|
1123
|
+
username: string;
|
|
1124
|
+
displayUsername: string;
|
|
1125
|
+
name: string;
|
|
1126
|
+
image: string | null | undefined;
|
|
1127
|
+
createdAt: Date;
|
|
1128
|
+
updatedAt: Date;
|
|
1129
|
+
};
|
|
1130
|
+
} | null>;
|
|
1131
|
+
isUsernameAvailable: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/is-username-available", {
|
|
1132
|
+
method: "POST";
|
|
1133
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
1134
|
+
username: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
|
|
1135
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
1136
|
+
}, {
|
|
1137
|
+
available: boolean;
|
|
1138
|
+
}>;
|
|
1139
|
+
};
|
|
1140
|
+
schema: {
|
|
1141
|
+
user: {
|
|
1142
|
+
fields: {
|
|
1143
|
+
username: {
|
|
1144
|
+
type: "string";
|
|
1145
|
+
required: false;
|
|
1146
|
+
sortable: true;
|
|
1147
|
+
unique: true;
|
|
1148
|
+
returned: true;
|
|
1149
|
+
transform: {
|
|
1150
|
+
input(value: import("better-auth", { with: { "resolution-mode": "import" } }).DBPrimitive): string | number | boolean | Date | unknown[] | Record<string, unknown> | null | undefined;
|
|
1151
|
+
};
|
|
1152
|
+
};
|
|
1153
|
+
displayUsername: {
|
|
1154
|
+
type: "string";
|
|
1155
|
+
required: false;
|
|
1156
|
+
transform: {
|
|
1157
|
+
input(value: import("better-auth", { with: { "resolution-mode": "import" } }).DBPrimitive): string | number | boolean | Date | unknown[] | Record<string, unknown> | null | undefined;
|
|
1158
|
+
};
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
};
|
|
1162
|
+
};
|
|
1163
|
+
hooks: {
|
|
1164
|
+
before: {
|
|
1165
|
+
matcher(context: import("better-auth", { with: { "resolution-mode": "import" } }).HookEndpointContext): boolean;
|
|
1166
|
+
handler: (inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<void>;
|
|
1167
|
+
}[];
|
|
1168
|
+
};
|
|
1169
|
+
options: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UsernameOptions | undefined;
|
|
1170
|
+
$ERROR_CODES: {
|
|
1171
|
+
readonly INVALID_USERNAME_OR_PASSWORD: "Invalid username or password";
|
|
1172
|
+
readonly EMAIL_NOT_VERIFIED: "Email not verified";
|
|
1173
|
+
readonly UNEXPECTED_ERROR: "Unexpected error";
|
|
1174
|
+
readonly USERNAME_IS_ALREADY_TAKEN: "Username is already taken. Please try another.";
|
|
1175
|
+
readonly USERNAME_TOO_SHORT: "Username is too short";
|
|
1176
|
+
readonly USERNAME_TOO_LONG: "Username is too long";
|
|
1177
|
+
readonly INVALID_USERNAME: "Username is invalid";
|
|
1178
|
+
readonly INVALID_DISPLAY_USERNAME: "Display username is invalid";
|
|
1179
|
+
};
|
|
1180
|
+
}, {
|
|
1181
|
+
id: "anonymous";
|
|
1182
|
+
endpoints: {
|
|
1183
|
+
signInAnonymous: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/sign-in/anonymous", {
|
|
1184
|
+
method: "POST";
|
|
1185
|
+
metadata: {
|
|
1186
|
+
openapi: {
|
|
1187
|
+
description: string;
|
|
1188
|
+
responses: {
|
|
1189
|
+
200: {
|
|
1190
|
+
description: string;
|
|
1191
|
+
content: {
|
|
1192
|
+
"application/json": {
|
|
1193
|
+
schema: {
|
|
1194
|
+
type: "object";
|
|
1195
|
+
properties: {
|
|
1196
|
+
user: {
|
|
1197
|
+
$ref: string;
|
|
1198
|
+
};
|
|
1199
|
+
session: {
|
|
1200
|
+
$ref: string;
|
|
1201
|
+
};
|
|
1202
|
+
};
|
|
1203
|
+
};
|
|
1204
|
+
};
|
|
1205
|
+
};
|
|
1206
|
+
};
|
|
1207
|
+
};
|
|
1208
|
+
};
|
|
1209
|
+
};
|
|
1210
|
+
}, {
|
|
1211
|
+
token: string;
|
|
1212
|
+
user: {
|
|
1213
|
+
id: string;
|
|
1214
|
+
email: string;
|
|
1215
|
+
emailVerified: boolean;
|
|
1216
|
+
name: string;
|
|
1217
|
+
createdAt: Date;
|
|
1218
|
+
updatedAt: Date;
|
|
1219
|
+
};
|
|
1220
|
+
} | null>;
|
|
1221
|
+
};
|
|
1222
|
+
hooks: {
|
|
1223
|
+
after: {
|
|
1224
|
+
matcher(ctx: import("better-auth", { with: { "resolution-mode": "import" } }).HookEndpointContext): boolean;
|
|
1225
|
+
handler: (inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<void>;
|
|
1226
|
+
}[];
|
|
1227
|
+
};
|
|
1228
|
+
options: import("../../node_modules/better-auth/dist/plugins/anonymous/types.mjs", { with: { "resolution-mode": "import" } }).AnonymousOptions | undefined;
|
|
1229
|
+
schema: {
|
|
1230
|
+
user: {
|
|
1231
|
+
fields: {
|
|
1232
|
+
isAnonymous: {
|
|
1233
|
+
type: "boolean";
|
|
1234
|
+
required: false;
|
|
1235
|
+
input: false;
|
|
1236
|
+
defaultValue: false;
|
|
1237
|
+
};
|
|
1238
|
+
};
|
|
1239
|
+
};
|
|
1240
|
+
};
|
|
1241
|
+
$ERROR_CODES: {
|
|
1242
|
+
readonly INVALID_EMAIL_FORMAT: "Email was not generated in a valid format";
|
|
1243
|
+
readonly FAILED_TO_CREATE_USER: "Failed to create user";
|
|
1244
|
+
readonly COULD_NOT_CREATE_SESSION: "Could not create session";
|
|
1245
|
+
readonly ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY: "Anonymous users cannot sign in again anonymously";
|
|
1246
|
+
};
|
|
1247
|
+
}, {
|
|
1248
|
+
id: "organization";
|
|
1249
|
+
endpoints: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).OrganizationEndpoints<{
|
|
1250
|
+
allowUserToCreateOrganization: true;
|
|
1251
|
+
creatorRole: string;
|
|
1252
|
+
membershipLimit: number;
|
|
1253
|
+
}>;
|
|
1254
|
+
schema: {
|
|
1255
|
+
organization: {
|
|
1256
|
+
modelName: string;
|
|
1257
|
+
fields: {
|
|
1258
|
+
name: {
|
|
1259
|
+
type: "string";
|
|
1260
|
+
required: true;
|
|
1261
|
+
sortable: true;
|
|
1262
|
+
};
|
|
1263
|
+
slug: {
|
|
1264
|
+
type: "string";
|
|
1265
|
+
required: true;
|
|
1266
|
+
unique: true;
|
|
1267
|
+
sortable: true;
|
|
1268
|
+
};
|
|
1269
|
+
logo: {
|
|
1270
|
+
type: "string";
|
|
1271
|
+
required: false;
|
|
1272
|
+
};
|
|
1273
|
+
createdAt: {
|
|
1274
|
+
type: "date";
|
|
1275
|
+
required: true;
|
|
1276
|
+
};
|
|
1277
|
+
updatedAt: {
|
|
1278
|
+
type: "date";
|
|
1279
|
+
required: false;
|
|
1280
|
+
};
|
|
1281
|
+
};
|
|
1282
|
+
};
|
|
1283
|
+
member: {
|
|
1284
|
+
modelName: string;
|
|
1285
|
+
fields: {
|
|
1286
|
+
organizationId: {
|
|
1287
|
+
type: "string";
|
|
1288
|
+
required: true;
|
|
1289
|
+
references: {
|
|
1290
|
+
model: "organization";
|
|
1291
|
+
field: "id";
|
|
1292
|
+
};
|
|
1293
|
+
};
|
|
1294
|
+
userId: {
|
|
1295
|
+
type: "string";
|
|
1296
|
+
required: true;
|
|
1297
|
+
references: {
|
|
1298
|
+
model: "user";
|
|
1299
|
+
field: "id";
|
|
1300
|
+
};
|
|
1301
|
+
};
|
|
1302
|
+
role: {
|
|
1303
|
+
type: "string";
|
|
1304
|
+
required: true;
|
|
1305
|
+
defaultValue: "member";
|
|
1306
|
+
};
|
|
1307
|
+
createdAt: {
|
|
1308
|
+
type: "date";
|
|
1309
|
+
required: true;
|
|
1310
|
+
};
|
|
1311
|
+
};
|
|
1312
|
+
};
|
|
1313
|
+
invitation: {
|
|
1314
|
+
modelName: string;
|
|
1315
|
+
fields: {
|
|
1316
|
+
organizationId: {
|
|
1317
|
+
type: "string";
|
|
1318
|
+
required: true;
|
|
1319
|
+
references: {
|
|
1320
|
+
model: "organization";
|
|
1321
|
+
field: "id";
|
|
1322
|
+
};
|
|
1323
|
+
};
|
|
1324
|
+
email: {
|
|
1325
|
+
type: "string";
|
|
1326
|
+
required: true;
|
|
1327
|
+
sortable: true;
|
|
1328
|
+
};
|
|
1329
|
+
role: {
|
|
1330
|
+
type: "string";
|
|
1331
|
+
required: true;
|
|
1332
|
+
sortable: true;
|
|
1333
|
+
};
|
|
1334
|
+
status: {
|
|
1335
|
+
type: "string";
|
|
1336
|
+
required: true;
|
|
1337
|
+
sortable: true;
|
|
1338
|
+
defaultValue: "pending";
|
|
1339
|
+
};
|
|
1340
|
+
expiresAt: {
|
|
1341
|
+
type: "date";
|
|
1342
|
+
required: false;
|
|
1343
|
+
};
|
|
1344
|
+
createdAt: {
|
|
1345
|
+
type: "date";
|
|
1346
|
+
required: true;
|
|
1347
|
+
defaultValue: Date;
|
|
1348
|
+
};
|
|
1349
|
+
inviterId: {
|
|
1350
|
+
type: "string";
|
|
1351
|
+
required: true;
|
|
1352
|
+
references: {
|
|
1353
|
+
model: "user";
|
|
1354
|
+
field: "id";
|
|
1355
|
+
};
|
|
1356
|
+
};
|
|
1357
|
+
};
|
|
1358
|
+
};
|
|
1359
|
+
session: {
|
|
1360
|
+
fields: {
|
|
1361
|
+
activeOrganizationId: {
|
|
1362
|
+
type: "string";
|
|
1363
|
+
required: false;
|
|
1364
|
+
};
|
|
1365
|
+
};
|
|
1366
|
+
};
|
|
1367
|
+
};
|
|
1368
|
+
$Infer: {
|
|
1369
|
+
Organization: {
|
|
1370
|
+
id: string;
|
|
1371
|
+
name: string;
|
|
1372
|
+
slug: string;
|
|
1373
|
+
createdAt: Date;
|
|
1374
|
+
logo?: string | null | undefined;
|
|
1375
|
+
metadata?: any;
|
|
1376
|
+
};
|
|
1377
|
+
Invitation: {
|
|
1378
|
+
id: string;
|
|
1379
|
+
organizationId: string;
|
|
1380
|
+
email: string;
|
|
1381
|
+
role: "admin" | "owner" | "member";
|
|
1382
|
+
status: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).InvitationStatus;
|
|
1383
|
+
inviterId: string;
|
|
1384
|
+
expiresAt: Date;
|
|
1385
|
+
createdAt: Date;
|
|
1386
|
+
};
|
|
1387
|
+
Member: {
|
|
1388
|
+
id: string;
|
|
1389
|
+
organizationId: string;
|
|
1390
|
+
role: "admin" | "owner" | "member";
|
|
1391
|
+
createdAt: Date;
|
|
1392
|
+
userId: string;
|
|
1393
|
+
user: {
|
|
1394
|
+
id: string;
|
|
1395
|
+
email: string;
|
|
1396
|
+
name: string;
|
|
1397
|
+
image?: string | undefined;
|
|
1398
|
+
};
|
|
1399
|
+
};
|
|
1400
|
+
Team: any;
|
|
1401
|
+
TeamMember: any;
|
|
1402
|
+
ActiveOrganization: {
|
|
1403
|
+
members: {
|
|
1404
|
+
id: string;
|
|
1405
|
+
organizationId: string;
|
|
1406
|
+
role: "admin" | "owner" | "member";
|
|
1407
|
+
createdAt: Date;
|
|
1408
|
+
userId: string;
|
|
1409
|
+
user: {
|
|
1410
|
+
id: string;
|
|
1411
|
+
email: string;
|
|
1412
|
+
name: string;
|
|
1413
|
+
image?: string | undefined;
|
|
1414
|
+
};
|
|
1415
|
+
}[];
|
|
1416
|
+
invitations: {
|
|
1417
|
+
id: string;
|
|
1418
|
+
organizationId: string;
|
|
1419
|
+
email: string;
|
|
1420
|
+
role: "admin" | "owner" | "member";
|
|
1421
|
+
status: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).InvitationStatus;
|
|
1422
|
+
inviterId: string;
|
|
1423
|
+
expiresAt: Date;
|
|
1424
|
+
createdAt: Date;
|
|
1425
|
+
}[];
|
|
1426
|
+
} & {
|
|
1427
|
+
id: string;
|
|
1428
|
+
name: string;
|
|
1429
|
+
slug: string;
|
|
1430
|
+
createdAt: Date;
|
|
1431
|
+
logo?: string | null | undefined;
|
|
1432
|
+
metadata?: any;
|
|
1433
|
+
};
|
|
1434
|
+
};
|
|
1435
|
+
$ERROR_CODES: {
|
|
1436
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization";
|
|
1437
|
+
readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: "You have reached the maximum number of organizations";
|
|
1438
|
+
readonly ORGANIZATION_ALREADY_EXISTS: "Organization already exists";
|
|
1439
|
+
readonly ORGANIZATION_SLUG_ALREADY_TAKEN: "Organization slug already taken";
|
|
1440
|
+
readonly ORGANIZATION_NOT_FOUND: "Organization not found";
|
|
1441
|
+
readonly USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: "User is not a member of the organization";
|
|
1442
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: "You are not allowed to update this organization";
|
|
1443
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: "You are not allowed to delete this organization";
|
|
1444
|
+
readonly NO_ACTIVE_ORGANIZATION: "No active organization";
|
|
1445
|
+
readonly USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: "User is already a member of this organization";
|
|
1446
|
+
readonly MEMBER_NOT_FOUND: "Member not found";
|
|
1447
|
+
readonly ROLE_NOT_FOUND: "Role not found";
|
|
1448
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: "You are not allowed to create a new team";
|
|
1449
|
+
readonly TEAM_ALREADY_EXISTS: "Team already exists";
|
|
1450
|
+
readonly TEAM_NOT_FOUND: "Team not found";
|
|
1451
|
+
readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: "You cannot leave the organization as the only owner";
|
|
1452
|
+
readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: "You cannot leave the organization without an owner";
|
|
1453
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: "You are not allowed to delete this member";
|
|
1454
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: "You are not allowed to invite users to this organization";
|
|
1455
|
+
readonly USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: "User is already invited to this organization";
|
|
1456
|
+
readonly INVITATION_NOT_FOUND: "Invitation not found";
|
|
1457
|
+
readonly YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: "You are not the recipient of the invitation";
|
|
1458
|
+
readonly EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: "Email verification required before accepting or rejecting invitation";
|
|
1459
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: "You are not allowed to cancel this invitation";
|
|
1460
|
+
readonly INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: "Inviter is no longer a member of the organization";
|
|
1461
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: "You are not allowed to invite a user with this role";
|
|
1462
|
+
readonly FAILED_TO_RETRIEVE_INVITATION: "Failed to retrieve invitation";
|
|
1463
|
+
readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: "You have reached the maximum number of teams";
|
|
1464
|
+
readonly UNABLE_TO_REMOVE_LAST_TEAM: "Unable to remove last team";
|
|
1465
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: "You are not allowed to update this member";
|
|
1466
|
+
readonly ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: "Organization membership limit reached";
|
|
1467
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to create teams in this organization";
|
|
1468
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to delete teams in this organization";
|
|
1469
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: "You are not allowed to update this team";
|
|
1470
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: "You are not allowed to delete this team";
|
|
1471
|
+
readonly INVITATION_LIMIT_REACHED: "Invitation limit reached";
|
|
1472
|
+
readonly TEAM_MEMBER_LIMIT_REACHED: "Team member limit reached";
|
|
1473
|
+
readonly USER_IS_NOT_A_MEMBER_OF_THE_TEAM: "User is not a member of the team";
|
|
1474
|
+
readonly YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: "You are not allowed to list the members of this team";
|
|
1475
|
+
readonly YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: "You do not have an active team";
|
|
1476
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: "You are not allowed to create a new member";
|
|
1477
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: "You are not allowed to remove a team member";
|
|
1478
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: "You are not allowed to access this organization as an owner";
|
|
1479
|
+
readonly YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: "You are not a member of this organization";
|
|
1480
|
+
readonly MISSING_AC_INSTANCE: "Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information";
|
|
1481
|
+
readonly YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: "You must be in an organization to create a role";
|
|
1482
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: "You are not allowed to create a role";
|
|
1483
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: "You are not allowed to update a role";
|
|
1484
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: "You are not allowed to delete a role";
|
|
1485
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: "You are not allowed to read a role";
|
|
1486
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: "You are not allowed to list a role";
|
|
1487
|
+
readonly YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: "You are not allowed to get a role";
|
|
1488
|
+
readonly TOO_MANY_ROLES: "This organization has too many roles";
|
|
1489
|
+
readonly INVALID_RESOURCE: "The provided permission includes an invalid resource";
|
|
1490
|
+
readonly ROLE_NAME_IS_ALREADY_TAKEN: "That role name is already taken";
|
|
1491
|
+
readonly CANNOT_DELETE_A_PRE_DEFINED_ROLE: "Cannot delete a pre-defined role";
|
|
1492
|
+
};
|
|
1493
|
+
options: NoInfer<{
|
|
1494
|
+
allowUserToCreateOrganization: true;
|
|
1495
|
+
creatorRole: string;
|
|
1496
|
+
membershipLimit: number;
|
|
1497
|
+
}>;
|
|
1498
|
+
}, {
|
|
1499
|
+
id: "api-key";
|
|
1500
|
+
$ERROR_CODES: {
|
|
1501
|
+
readonly INVALID_METADATA_TYPE: "metadata must be an object or undefined";
|
|
1502
|
+
readonly REFILL_AMOUNT_AND_INTERVAL_REQUIRED: "refillAmount is required when refillInterval is provided";
|
|
1503
|
+
readonly REFILL_INTERVAL_AND_AMOUNT_REQUIRED: "refillInterval is required when refillAmount is provided";
|
|
1504
|
+
readonly USER_BANNED: "User is banned";
|
|
1505
|
+
readonly UNAUTHORIZED_SESSION: "Unauthorized or invalid session";
|
|
1506
|
+
readonly KEY_NOT_FOUND: "API Key not found";
|
|
1507
|
+
readonly KEY_DISABLED: "API Key is disabled";
|
|
1508
|
+
readonly KEY_EXPIRED: "API Key has expired";
|
|
1509
|
+
readonly USAGE_EXCEEDED: "API Key has reached its usage limit";
|
|
1510
|
+
readonly KEY_NOT_RECOVERABLE: "API Key is not recoverable";
|
|
1511
|
+
readonly EXPIRES_IN_IS_TOO_SMALL: "The expiresIn is smaller than the predefined minimum value.";
|
|
1512
|
+
readonly EXPIRES_IN_IS_TOO_LARGE: "The expiresIn is larger than the predefined maximum value.";
|
|
1513
|
+
readonly INVALID_REMAINING: "The remaining count is either too large or too small.";
|
|
1514
|
+
readonly INVALID_PREFIX_LENGTH: "The prefix length is either too large or too small.";
|
|
1515
|
+
readonly INVALID_NAME_LENGTH: "The name length is either too large or too small.";
|
|
1516
|
+
readonly METADATA_DISABLED: "Metadata is disabled.";
|
|
1517
|
+
readonly RATE_LIMIT_EXCEEDED: "Rate limit exceeded.";
|
|
1518
|
+
readonly NO_VALUES_TO_UPDATE: "No values to update.";
|
|
1519
|
+
readonly KEY_DISABLED_EXPIRATION: "Custom key expiration values are disabled.";
|
|
1520
|
+
readonly INVALID_API_KEY: "Invalid API key.";
|
|
1521
|
+
readonly INVALID_USER_ID_FROM_API_KEY: "The user id from the API key is invalid.";
|
|
1522
|
+
readonly INVALID_API_KEY_GETTER_RETURN_TYPE: "API Key getter returned an invalid key type. Expected string.";
|
|
1523
|
+
readonly SERVER_ONLY_PROPERTY: "The property you're trying to set can only be set from the server auth instance only.";
|
|
1524
|
+
readonly FAILED_TO_UPDATE_API_KEY: "Failed to update API key";
|
|
1525
|
+
readonly NAME_REQUIRED: "API Key name is required.";
|
|
1526
|
+
};
|
|
1527
|
+
hooks: {
|
|
1528
|
+
before: {
|
|
1529
|
+
matcher: (ctx: import("better-auth", { with: { "resolution-mode": "import" } }).HookEndpointContext) => boolean;
|
|
1530
|
+
handler: (inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
1531
|
+
user: {
|
|
1532
|
+
id: string;
|
|
1533
|
+
createdAt: Date;
|
|
1534
|
+
updatedAt: Date;
|
|
1535
|
+
email: string;
|
|
1536
|
+
emailVerified: boolean;
|
|
1537
|
+
name: string;
|
|
1538
|
+
image?: string | null | undefined;
|
|
1539
|
+
};
|
|
1540
|
+
session: {
|
|
1541
|
+
id: string;
|
|
1542
|
+
token: string;
|
|
1543
|
+
userId: string;
|
|
1544
|
+
userAgent: string | null;
|
|
1545
|
+
ipAddress: string | null;
|
|
1546
|
+
createdAt: Date;
|
|
1547
|
+
updatedAt: Date;
|
|
1548
|
+
expiresAt: Date;
|
|
1549
|
+
};
|
|
1550
|
+
} | {
|
|
1551
|
+
context: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions, import("better-auth", { with: { "resolution-mode": "import" } }).AuthContext & {
|
|
1552
|
+
returned?: unknown | undefined;
|
|
1553
|
+
responseHeaders?: Headers | undefined;
|
|
1554
|
+
}>;
|
|
1555
|
+
}>;
|
|
1556
|
+
}[];
|
|
1557
|
+
};
|
|
1558
|
+
endpoints: {
|
|
1559
|
+
createApiKey: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/api-key/create", {
|
|
1560
|
+
method: "POST";
|
|
1561
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
1562
|
+
name: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>;
|
|
1563
|
+
expiresIn: import("better-auth", { with: { "resolution-mode": "import" } }).ZodDefault<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNullable<import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber>>>;
|
|
1564
|
+
userId: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodCoercedString<unknown>>;
|
|
1565
|
+
prefix: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>;
|
|
1566
|
+
remaining: import("better-auth", { with: { "resolution-mode": "import" } }).ZodDefault<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNullable<import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber>>>;
|
|
1567
|
+
metadata: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodAny>;
|
|
1568
|
+
refillAmount: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber>;
|
|
1569
|
+
refillInterval: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber>;
|
|
1570
|
+
rateLimitTimeWindow: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber>;
|
|
1571
|
+
rateLimitMax: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber>;
|
|
1572
|
+
rateLimitEnabled: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodBoolean>;
|
|
1573
|
+
permissions: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodRecord<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString, import("better-auth", { with: { "resolution-mode": "import" } }).ZodArray<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>>>;
|
|
1574
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
1575
|
+
metadata: {
|
|
1576
|
+
openapi: {
|
|
1577
|
+
description: string;
|
|
1578
|
+
responses: {
|
|
1579
|
+
"200": {
|
|
1580
|
+
description: string;
|
|
1581
|
+
content: {
|
|
1582
|
+
"application/json": {
|
|
1583
|
+
schema: {
|
|
1584
|
+
type: "object";
|
|
1585
|
+
properties: {
|
|
1586
|
+
id: {
|
|
1587
|
+
type: string;
|
|
1588
|
+
description: string;
|
|
1589
|
+
};
|
|
1590
|
+
createdAt: {
|
|
1591
|
+
type: string;
|
|
1592
|
+
format: string;
|
|
1593
|
+
description: string;
|
|
1594
|
+
};
|
|
1595
|
+
updatedAt: {
|
|
1596
|
+
type: string;
|
|
1597
|
+
format: string;
|
|
1598
|
+
description: string;
|
|
1599
|
+
};
|
|
1600
|
+
name: {
|
|
1601
|
+
type: string;
|
|
1602
|
+
nullable: boolean;
|
|
1603
|
+
description: string;
|
|
1604
|
+
};
|
|
1605
|
+
prefix: {
|
|
1606
|
+
type: string;
|
|
1607
|
+
nullable: boolean;
|
|
1608
|
+
description: string;
|
|
1609
|
+
};
|
|
1610
|
+
start: {
|
|
1611
|
+
type: string;
|
|
1612
|
+
nullable: boolean;
|
|
1613
|
+
description: string;
|
|
1614
|
+
};
|
|
1615
|
+
key: {
|
|
1616
|
+
type: string;
|
|
1617
|
+
description: string;
|
|
1618
|
+
};
|
|
1619
|
+
enabled: {
|
|
1620
|
+
type: string;
|
|
1621
|
+
description: string;
|
|
1622
|
+
};
|
|
1623
|
+
expiresAt: {
|
|
1624
|
+
type: string;
|
|
1625
|
+
format: string;
|
|
1626
|
+
nullable: boolean;
|
|
1627
|
+
description: string;
|
|
1628
|
+
};
|
|
1629
|
+
userId: {
|
|
1630
|
+
type: string;
|
|
1631
|
+
description: string;
|
|
1632
|
+
};
|
|
1633
|
+
lastRefillAt: {
|
|
1634
|
+
type: string;
|
|
1635
|
+
format: string;
|
|
1636
|
+
nullable: boolean;
|
|
1637
|
+
description: string;
|
|
1638
|
+
};
|
|
1639
|
+
lastRequest: {
|
|
1640
|
+
type: string;
|
|
1641
|
+
format: string;
|
|
1642
|
+
nullable: boolean;
|
|
1643
|
+
description: string;
|
|
1644
|
+
};
|
|
1645
|
+
metadata: {
|
|
1646
|
+
type: string;
|
|
1647
|
+
nullable: boolean;
|
|
1648
|
+
additionalProperties: boolean;
|
|
1649
|
+
description: string;
|
|
1650
|
+
};
|
|
1651
|
+
rateLimitMax: {
|
|
1652
|
+
type: string;
|
|
1653
|
+
nullable: boolean;
|
|
1654
|
+
description: string;
|
|
1655
|
+
};
|
|
1656
|
+
rateLimitTimeWindow: {
|
|
1657
|
+
type: string;
|
|
1658
|
+
nullable: boolean;
|
|
1659
|
+
description: string;
|
|
1660
|
+
};
|
|
1661
|
+
remaining: {
|
|
1662
|
+
type: string;
|
|
1663
|
+
nullable: boolean;
|
|
1664
|
+
description: string;
|
|
1665
|
+
};
|
|
1666
|
+
refillAmount: {
|
|
1667
|
+
type: string;
|
|
1668
|
+
nullable: boolean;
|
|
1669
|
+
description: string;
|
|
1670
|
+
};
|
|
1671
|
+
refillInterval: {
|
|
1672
|
+
type: string;
|
|
1673
|
+
nullable: boolean;
|
|
1674
|
+
description: string;
|
|
1675
|
+
};
|
|
1676
|
+
rateLimitEnabled: {
|
|
1677
|
+
type: string;
|
|
1678
|
+
description: string;
|
|
1679
|
+
};
|
|
1680
|
+
requestCount: {
|
|
1681
|
+
type: string;
|
|
1682
|
+
description: string;
|
|
1683
|
+
};
|
|
1684
|
+
permissions: {
|
|
1685
|
+
type: string;
|
|
1686
|
+
nullable: boolean;
|
|
1687
|
+
additionalProperties: {
|
|
1688
|
+
type: string;
|
|
1689
|
+
items: {
|
|
1690
|
+
type: string;
|
|
1691
|
+
};
|
|
1692
|
+
};
|
|
1693
|
+
description: string;
|
|
1694
|
+
};
|
|
1695
|
+
};
|
|
1696
|
+
required: string[];
|
|
1697
|
+
};
|
|
1698
|
+
};
|
|
1699
|
+
};
|
|
1700
|
+
};
|
|
1701
|
+
};
|
|
1702
|
+
};
|
|
1703
|
+
};
|
|
1704
|
+
}, {
|
|
1705
|
+
key: string;
|
|
1706
|
+
metadata: any;
|
|
1707
|
+
permissions: any;
|
|
1708
|
+
id: string;
|
|
1709
|
+
name: string | null;
|
|
1710
|
+
start: string | null;
|
|
1711
|
+
prefix: string | null;
|
|
1712
|
+
userId: string;
|
|
1713
|
+
refillInterval: number | null;
|
|
1714
|
+
refillAmount: number | null;
|
|
1715
|
+
lastRefillAt: Date | null;
|
|
1716
|
+
enabled: boolean;
|
|
1717
|
+
rateLimitEnabled: boolean;
|
|
1718
|
+
rateLimitTimeWindow: number | null;
|
|
1719
|
+
rateLimitMax: number | null;
|
|
1720
|
+
requestCount: number;
|
|
1721
|
+
remaining: number | null;
|
|
1722
|
+
lastRequest: Date | null;
|
|
1723
|
+
expiresAt: Date | null;
|
|
1724
|
+
createdAt: Date;
|
|
1725
|
+
updatedAt: Date;
|
|
1726
|
+
}>;
|
|
1727
|
+
verifyApiKey: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<string, {
|
|
1728
|
+
method: "POST";
|
|
1729
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
1730
|
+
key: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
|
|
1731
|
+
permissions: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodRecord<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString, import("better-auth", { with: { "resolution-mode": "import" } }).ZodArray<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>>>;
|
|
1732
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
1733
|
+
}, {
|
|
1734
|
+
valid: boolean;
|
|
1735
|
+
error: {
|
|
1736
|
+
message: string | undefined;
|
|
1737
|
+
code: string;
|
|
1738
|
+
};
|
|
1739
|
+
key: null;
|
|
1740
|
+
} | {
|
|
1741
|
+
valid: boolean;
|
|
1742
|
+
error: null;
|
|
1743
|
+
key: Omit<import("better-auth/plugins", { with: { "resolution-mode": "import" } }).ApiKey, "key"> | null;
|
|
1744
|
+
}>;
|
|
1745
|
+
getApiKey: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/api-key/get", {
|
|
1746
|
+
method: "GET";
|
|
1747
|
+
query: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
1748
|
+
id: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
|
|
1749
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
1750
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
1751
|
+
session: {
|
|
1752
|
+
session: Record<string, any> & {
|
|
1753
|
+
id: string;
|
|
1754
|
+
createdAt: Date;
|
|
1755
|
+
updatedAt: Date;
|
|
1756
|
+
userId: string;
|
|
1757
|
+
expiresAt: Date;
|
|
1758
|
+
token: string;
|
|
1759
|
+
ipAddress?: string | null | undefined;
|
|
1760
|
+
userAgent?: string | null | undefined;
|
|
1761
|
+
};
|
|
1762
|
+
user: Record<string, any> & {
|
|
1763
|
+
id: string;
|
|
1764
|
+
createdAt: Date;
|
|
1765
|
+
updatedAt: Date;
|
|
1766
|
+
email: string;
|
|
1767
|
+
emailVerified: boolean;
|
|
1768
|
+
name: string;
|
|
1769
|
+
image?: string | null | undefined;
|
|
1770
|
+
};
|
|
1771
|
+
};
|
|
1772
|
+
}>)[];
|
|
1773
|
+
metadata: {
|
|
1774
|
+
openapi: {
|
|
1775
|
+
description: string;
|
|
1776
|
+
responses: {
|
|
1777
|
+
"200": {
|
|
1778
|
+
description: string;
|
|
1779
|
+
content: {
|
|
1780
|
+
"application/json": {
|
|
1781
|
+
schema: {
|
|
1782
|
+
type: "object";
|
|
1783
|
+
properties: {
|
|
1784
|
+
id: {
|
|
1785
|
+
type: string;
|
|
1786
|
+
description: string;
|
|
1787
|
+
};
|
|
1788
|
+
name: {
|
|
1789
|
+
type: string;
|
|
1790
|
+
nullable: boolean;
|
|
1791
|
+
description: string;
|
|
1792
|
+
};
|
|
1793
|
+
start: {
|
|
1794
|
+
type: string;
|
|
1795
|
+
nullable: boolean;
|
|
1796
|
+
description: string;
|
|
1797
|
+
};
|
|
1798
|
+
prefix: {
|
|
1799
|
+
type: string;
|
|
1800
|
+
nullable: boolean;
|
|
1801
|
+
description: string;
|
|
1802
|
+
};
|
|
1803
|
+
userId: {
|
|
1804
|
+
type: string;
|
|
1805
|
+
description: string;
|
|
1806
|
+
};
|
|
1807
|
+
refillInterval: {
|
|
1808
|
+
type: string;
|
|
1809
|
+
nullable: boolean;
|
|
1810
|
+
description: string;
|
|
1811
|
+
};
|
|
1812
|
+
refillAmount: {
|
|
1813
|
+
type: string;
|
|
1814
|
+
nullable: boolean;
|
|
1815
|
+
description: string;
|
|
1816
|
+
};
|
|
1817
|
+
lastRefillAt: {
|
|
1818
|
+
type: string;
|
|
1819
|
+
format: string;
|
|
1820
|
+
nullable: boolean;
|
|
1821
|
+
description: string;
|
|
1822
|
+
};
|
|
1823
|
+
enabled: {
|
|
1824
|
+
type: string;
|
|
1825
|
+
description: string;
|
|
1826
|
+
default: boolean;
|
|
1827
|
+
};
|
|
1828
|
+
rateLimitEnabled: {
|
|
1829
|
+
type: string;
|
|
1830
|
+
description: string;
|
|
1831
|
+
};
|
|
1832
|
+
rateLimitTimeWindow: {
|
|
1833
|
+
type: string;
|
|
1834
|
+
nullable: boolean;
|
|
1835
|
+
description: string;
|
|
1836
|
+
};
|
|
1837
|
+
rateLimitMax: {
|
|
1838
|
+
type: string;
|
|
1839
|
+
nullable: boolean;
|
|
1840
|
+
description: string;
|
|
1841
|
+
};
|
|
1842
|
+
requestCount: {
|
|
1843
|
+
type: string;
|
|
1844
|
+
description: string;
|
|
1845
|
+
};
|
|
1846
|
+
remaining: {
|
|
1847
|
+
type: string;
|
|
1848
|
+
nullable: boolean;
|
|
1849
|
+
description: string;
|
|
1850
|
+
};
|
|
1851
|
+
lastRequest: {
|
|
1852
|
+
type: string;
|
|
1853
|
+
format: string;
|
|
1854
|
+
nullable: boolean;
|
|
1855
|
+
description: string;
|
|
1856
|
+
};
|
|
1857
|
+
expiresAt: {
|
|
1858
|
+
type: string;
|
|
1859
|
+
format: string;
|
|
1860
|
+
nullable: boolean;
|
|
1861
|
+
description: string;
|
|
1862
|
+
};
|
|
1863
|
+
createdAt: {
|
|
1864
|
+
type: string;
|
|
1865
|
+
format: string;
|
|
1866
|
+
description: string;
|
|
1867
|
+
};
|
|
1868
|
+
updatedAt: {
|
|
1869
|
+
type: string;
|
|
1870
|
+
format: string;
|
|
1871
|
+
description: string;
|
|
1872
|
+
};
|
|
1873
|
+
metadata: {
|
|
1874
|
+
type: string;
|
|
1875
|
+
nullable: boolean;
|
|
1876
|
+
additionalProperties: boolean;
|
|
1877
|
+
description: string;
|
|
1878
|
+
};
|
|
1879
|
+
permissions: {
|
|
1880
|
+
type: string;
|
|
1881
|
+
nullable: boolean;
|
|
1882
|
+
description: string;
|
|
1883
|
+
};
|
|
1884
|
+
};
|
|
1885
|
+
required: string[];
|
|
1886
|
+
};
|
|
1887
|
+
};
|
|
1888
|
+
};
|
|
1889
|
+
};
|
|
1890
|
+
};
|
|
1891
|
+
};
|
|
1892
|
+
};
|
|
1893
|
+
}, {
|
|
1894
|
+
permissions: {
|
|
1895
|
+
[key: string]: string[];
|
|
1896
|
+
} | null;
|
|
1897
|
+
id: string;
|
|
1898
|
+
name: string | null;
|
|
1899
|
+
start: string | null;
|
|
1900
|
+
prefix: string | null;
|
|
1901
|
+
userId: string;
|
|
1902
|
+
refillInterval: number | null;
|
|
1903
|
+
refillAmount: number | null;
|
|
1904
|
+
lastRefillAt: Date | null;
|
|
1905
|
+
enabled: boolean;
|
|
1906
|
+
rateLimitEnabled: boolean;
|
|
1907
|
+
rateLimitTimeWindow: number | null;
|
|
1908
|
+
rateLimitMax: number | null;
|
|
1909
|
+
requestCount: number;
|
|
1910
|
+
remaining: number | null;
|
|
1911
|
+
lastRequest: Date | null;
|
|
1912
|
+
expiresAt: Date | null;
|
|
1913
|
+
createdAt: Date;
|
|
1914
|
+
updatedAt: Date;
|
|
1915
|
+
metadata: Record<string, any> | null;
|
|
1916
|
+
}>;
|
|
1917
|
+
updateApiKey: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/api-key/update", {
|
|
1918
|
+
method: "POST";
|
|
1919
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
1920
|
+
keyId: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
|
|
1921
|
+
userId: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodCoercedString<unknown>>;
|
|
1922
|
+
name: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>;
|
|
1923
|
+
enabled: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodBoolean>;
|
|
1924
|
+
remaining: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber>;
|
|
1925
|
+
refillAmount: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber>;
|
|
1926
|
+
refillInterval: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber>;
|
|
1927
|
+
metadata: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodAny>;
|
|
1928
|
+
expiresIn: import("better-auth", { with: { "resolution-mode": "import" } }).ZodNullable<import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber>>;
|
|
1929
|
+
rateLimitEnabled: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodBoolean>;
|
|
1930
|
+
rateLimitTimeWindow: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber>;
|
|
1931
|
+
rateLimitMax: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodNumber>;
|
|
1932
|
+
permissions: import("better-auth", { with: { "resolution-mode": "import" } }).ZodNullable<import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodRecord<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString, import("better-auth", { with: { "resolution-mode": "import" } }).ZodArray<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>>>>;
|
|
1933
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
1934
|
+
metadata: {
|
|
1935
|
+
openapi: {
|
|
1936
|
+
description: string;
|
|
1937
|
+
responses: {
|
|
1938
|
+
"200": {
|
|
1939
|
+
description: string;
|
|
1940
|
+
content: {
|
|
1941
|
+
"application/json": {
|
|
1942
|
+
schema: {
|
|
1943
|
+
type: "object";
|
|
1944
|
+
properties: {
|
|
1945
|
+
id: {
|
|
1946
|
+
type: string;
|
|
1947
|
+
description: string;
|
|
1948
|
+
};
|
|
1949
|
+
name: {
|
|
1950
|
+
type: string;
|
|
1951
|
+
nullable: boolean;
|
|
1952
|
+
description: string;
|
|
1953
|
+
};
|
|
1954
|
+
start: {
|
|
1955
|
+
type: string;
|
|
1956
|
+
nullable: boolean;
|
|
1957
|
+
description: string;
|
|
1958
|
+
};
|
|
1959
|
+
prefix: {
|
|
1960
|
+
type: string;
|
|
1961
|
+
nullable: boolean;
|
|
1962
|
+
description: string;
|
|
1963
|
+
};
|
|
1964
|
+
userId: {
|
|
1965
|
+
type: string;
|
|
1966
|
+
description: string;
|
|
1967
|
+
};
|
|
1968
|
+
refillInterval: {
|
|
1969
|
+
type: string;
|
|
1970
|
+
nullable: boolean;
|
|
1971
|
+
description: string;
|
|
1972
|
+
};
|
|
1973
|
+
refillAmount: {
|
|
1974
|
+
type: string;
|
|
1975
|
+
nullable: boolean;
|
|
1976
|
+
description: string;
|
|
1977
|
+
};
|
|
1978
|
+
lastRefillAt: {
|
|
1979
|
+
type: string;
|
|
1980
|
+
format: string;
|
|
1981
|
+
nullable: boolean;
|
|
1982
|
+
description: string;
|
|
1983
|
+
};
|
|
1984
|
+
enabled: {
|
|
1985
|
+
type: string;
|
|
1986
|
+
description: string;
|
|
1987
|
+
default: boolean;
|
|
1988
|
+
};
|
|
1989
|
+
rateLimitEnabled: {
|
|
1990
|
+
type: string;
|
|
1991
|
+
description: string;
|
|
1992
|
+
};
|
|
1993
|
+
rateLimitTimeWindow: {
|
|
1994
|
+
type: string;
|
|
1995
|
+
nullable: boolean;
|
|
1996
|
+
description: string;
|
|
1997
|
+
};
|
|
1998
|
+
rateLimitMax: {
|
|
1999
|
+
type: string;
|
|
2000
|
+
nullable: boolean;
|
|
2001
|
+
description: string;
|
|
2002
|
+
};
|
|
2003
|
+
requestCount: {
|
|
2004
|
+
type: string;
|
|
2005
|
+
description: string;
|
|
2006
|
+
};
|
|
2007
|
+
remaining: {
|
|
2008
|
+
type: string;
|
|
2009
|
+
nullable: boolean;
|
|
2010
|
+
description: string;
|
|
2011
|
+
};
|
|
2012
|
+
lastRequest: {
|
|
2013
|
+
type: string;
|
|
2014
|
+
format: string;
|
|
2015
|
+
nullable: boolean;
|
|
2016
|
+
description: string;
|
|
2017
|
+
};
|
|
2018
|
+
expiresAt: {
|
|
2019
|
+
type: string;
|
|
2020
|
+
format: string;
|
|
2021
|
+
nullable: boolean;
|
|
2022
|
+
description: string;
|
|
2023
|
+
};
|
|
2024
|
+
createdAt: {
|
|
2025
|
+
type: string;
|
|
2026
|
+
format: string;
|
|
2027
|
+
description: string;
|
|
2028
|
+
};
|
|
2029
|
+
updatedAt: {
|
|
2030
|
+
type: string;
|
|
2031
|
+
format: string;
|
|
2032
|
+
description: string;
|
|
2033
|
+
};
|
|
2034
|
+
metadata: {
|
|
2035
|
+
type: string;
|
|
2036
|
+
nullable: boolean;
|
|
2037
|
+
additionalProperties: boolean;
|
|
2038
|
+
description: string;
|
|
2039
|
+
};
|
|
2040
|
+
permissions: {
|
|
2041
|
+
type: string;
|
|
2042
|
+
nullable: boolean;
|
|
2043
|
+
description: string;
|
|
2044
|
+
};
|
|
2045
|
+
};
|
|
2046
|
+
required: string[];
|
|
2047
|
+
};
|
|
2048
|
+
};
|
|
2049
|
+
};
|
|
2050
|
+
};
|
|
2051
|
+
};
|
|
2052
|
+
};
|
|
2053
|
+
};
|
|
2054
|
+
}, {
|
|
2055
|
+
permissions: {
|
|
2056
|
+
[key: string]: string[];
|
|
2057
|
+
} | null;
|
|
2058
|
+
id: string;
|
|
2059
|
+
name: string | null;
|
|
2060
|
+
start: string | null;
|
|
2061
|
+
prefix: string | null;
|
|
2062
|
+
userId: string;
|
|
2063
|
+
refillInterval: number | null;
|
|
2064
|
+
refillAmount: number | null;
|
|
2065
|
+
lastRefillAt: Date | null;
|
|
2066
|
+
enabled: boolean;
|
|
2067
|
+
rateLimitEnabled: boolean;
|
|
2068
|
+
rateLimitTimeWindow: number | null;
|
|
2069
|
+
rateLimitMax: number | null;
|
|
2070
|
+
requestCount: number;
|
|
2071
|
+
remaining: number | null;
|
|
2072
|
+
lastRequest: Date | null;
|
|
2073
|
+
expiresAt: Date | null;
|
|
2074
|
+
createdAt: Date;
|
|
2075
|
+
updatedAt: Date;
|
|
2076
|
+
metadata: Record<string, any> | null;
|
|
2077
|
+
}>;
|
|
2078
|
+
deleteApiKey: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/api-key/delete", {
|
|
2079
|
+
method: "POST";
|
|
2080
|
+
body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
|
|
2081
|
+
keyId: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
|
|
2082
|
+
}, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
|
|
2083
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
2084
|
+
session: {
|
|
2085
|
+
session: Record<string, any> & {
|
|
2086
|
+
id: string;
|
|
2087
|
+
createdAt: Date;
|
|
2088
|
+
updatedAt: Date;
|
|
2089
|
+
userId: string;
|
|
2090
|
+
expiresAt: Date;
|
|
2091
|
+
token: string;
|
|
2092
|
+
ipAddress?: string | null | undefined;
|
|
2093
|
+
userAgent?: string | null | undefined;
|
|
2094
|
+
};
|
|
2095
|
+
user: Record<string, any> & {
|
|
2096
|
+
id: string;
|
|
2097
|
+
createdAt: Date;
|
|
2098
|
+
updatedAt: Date;
|
|
2099
|
+
email: string;
|
|
2100
|
+
emailVerified: boolean;
|
|
2101
|
+
name: string;
|
|
2102
|
+
image?: string | null | undefined;
|
|
2103
|
+
};
|
|
2104
|
+
};
|
|
2105
|
+
}>)[];
|
|
2106
|
+
metadata: {
|
|
2107
|
+
openapi: {
|
|
2108
|
+
description: string;
|
|
2109
|
+
requestBody: {
|
|
2110
|
+
content: {
|
|
2111
|
+
"application/json": {
|
|
2112
|
+
schema: {
|
|
2113
|
+
type: "object";
|
|
2114
|
+
properties: {
|
|
2115
|
+
keyId: {
|
|
2116
|
+
type: string;
|
|
2117
|
+
description: string;
|
|
2118
|
+
};
|
|
2119
|
+
};
|
|
2120
|
+
required: string[];
|
|
2121
|
+
};
|
|
2122
|
+
};
|
|
2123
|
+
};
|
|
2124
|
+
};
|
|
2125
|
+
responses: {
|
|
2126
|
+
"200": {
|
|
2127
|
+
description: string;
|
|
2128
|
+
content: {
|
|
2129
|
+
"application/json": {
|
|
2130
|
+
schema: {
|
|
2131
|
+
type: "object";
|
|
2132
|
+
properties: {
|
|
2133
|
+
success: {
|
|
2134
|
+
type: string;
|
|
2135
|
+
description: string;
|
|
2136
|
+
};
|
|
2137
|
+
};
|
|
2138
|
+
required: string[];
|
|
2139
|
+
};
|
|
2140
|
+
};
|
|
2141
|
+
};
|
|
2142
|
+
};
|
|
2143
|
+
};
|
|
2144
|
+
};
|
|
2145
|
+
};
|
|
2146
|
+
}, {
|
|
2147
|
+
success: boolean;
|
|
2148
|
+
}>;
|
|
2149
|
+
listApiKeys: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/api-key/list", {
|
|
2150
|
+
method: "GET";
|
|
2151
|
+
use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
|
|
2152
|
+
session: {
|
|
2153
|
+
session: Record<string, any> & {
|
|
2154
|
+
id: string;
|
|
2155
|
+
createdAt: Date;
|
|
2156
|
+
updatedAt: Date;
|
|
2157
|
+
userId: string;
|
|
2158
|
+
expiresAt: Date;
|
|
2159
|
+
token: string;
|
|
2160
|
+
ipAddress?: string | null | undefined;
|
|
2161
|
+
userAgent?: string | null | undefined;
|
|
2162
|
+
};
|
|
2163
|
+
user: Record<string, any> & {
|
|
2164
|
+
id: string;
|
|
2165
|
+
createdAt: Date;
|
|
2166
|
+
updatedAt: Date;
|
|
2167
|
+
email: string;
|
|
2168
|
+
emailVerified: boolean;
|
|
2169
|
+
name: string;
|
|
2170
|
+
image?: string | null | undefined;
|
|
2171
|
+
};
|
|
2172
|
+
};
|
|
2173
|
+
}>)[];
|
|
2174
|
+
metadata: {
|
|
2175
|
+
openapi: {
|
|
2176
|
+
description: string;
|
|
2177
|
+
responses: {
|
|
2178
|
+
"200": {
|
|
2179
|
+
description: string;
|
|
2180
|
+
content: {
|
|
2181
|
+
"application/json": {
|
|
2182
|
+
schema: {
|
|
2183
|
+
type: "array";
|
|
2184
|
+
items: {
|
|
2185
|
+
type: string;
|
|
2186
|
+
properties: {
|
|
2187
|
+
id: {
|
|
2188
|
+
type: string;
|
|
2189
|
+
description: string;
|
|
2190
|
+
};
|
|
2191
|
+
name: {
|
|
2192
|
+
type: string;
|
|
2193
|
+
nullable: boolean;
|
|
2194
|
+
description: string;
|
|
2195
|
+
};
|
|
2196
|
+
start: {
|
|
2197
|
+
type: string;
|
|
2198
|
+
nullable: boolean;
|
|
2199
|
+
description: string;
|
|
2200
|
+
};
|
|
2201
|
+
prefix: {
|
|
2202
|
+
type: string;
|
|
2203
|
+
nullable: boolean;
|
|
2204
|
+
description: string;
|
|
2205
|
+
};
|
|
2206
|
+
userId: {
|
|
2207
|
+
type: string;
|
|
2208
|
+
description: string;
|
|
2209
|
+
};
|
|
2210
|
+
refillInterval: {
|
|
2211
|
+
type: string;
|
|
2212
|
+
nullable: boolean;
|
|
2213
|
+
description: string;
|
|
2214
|
+
};
|
|
2215
|
+
refillAmount: {
|
|
2216
|
+
type: string;
|
|
2217
|
+
nullable: boolean;
|
|
2218
|
+
description: string;
|
|
2219
|
+
};
|
|
2220
|
+
lastRefillAt: {
|
|
2221
|
+
type: string;
|
|
2222
|
+
format: string;
|
|
2223
|
+
nullable: boolean;
|
|
2224
|
+
description: string;
|
|
2225
|
+
};
|
|
2226
|
+
enabled: {
|
|
2227
|
+
type: string;
|
|
2228
|
+
description: string;
|
|
2229
|
+
default: boolean;
|
|
2230
|
+
};
|
|
2231
|
+
rateLimitEnabled: {
|
|
2232
|
+
type: string;
|
|
2233
|
+
description: string;
|
|
2234
|
+
};
|
|
2235
|
+
rateLimitTimeWindow: {
|
|
2236
|
+
type: string;
|
|
2237
|
+
nullable: boolean;
|
|
2238
|
+
description: string;
|
|
2239
|
+
};
|
|
2240
|
+
rateLimitMax: {
|
|
2241
|
+
type: string;
|
|
2242
|
+
nullable: boolean;
|
|
2243
|
+
description: string;
|
|
2244
|
+
};
|
|
2245
|
+
requestCount: {
|
|
2246
|
+
type: string;
|
|
2247
|
+
description: string;
|
|
2248
|
+
};
|
|
2249
|
+
remaining: {
|
|
2250
|
+
type: string;
|
|
2251
|
+
nullable: boolean;
|
|
2252
|
+
description: string;
|
|
2253
|
+
};
|
|
2254
|
+
lastRequest: {
|
|
2255
|
+
type: string;
|
|
2256
|
+
format: string;
|
|
2257
|
+
nullable: boolean;
|
|
2258
|
+
description: string;
|
|
2259
|
+
};
|
|
2260
|
+
expiresAt: {
|
|
2261
|
+
type: string;
|
|
2262
|
+
format: string;
|
|
2263
|
+
nullable: boolean;
|
|
2264
|
+
description: string;
|
|
2265
|
+
};
|
|
2266
|
+
createdAt: {
|
|
2267
|
+
type: string;
|
|
2268
|
+
format: string;
|
|
2269
|
+
description: string;
|
|
2270
|
+
};
|
|
2271
|
+
updatedAt: {
|
|
2272
|
+
type: string;
|
|
2273
|
+
format: string;
|
|
2274
|
+
description: string;
|
|
2275
|
+
};
|
|
2276
|
+
metadata: {
|
|
2277
|
+
type: string;
|
|
2278
|
+
nullable: boolean;
|
|
2279
|
+
additionalProperties: boolean;
|
|
2280
|
+
description: string;
|
|
2281
|
+
};
|
|
2282
|
+
permissions: {
|
|
2283
|
+
type: string;
|
|
2284
|
+
nullable: boolean;
|
|
2285
|
+
description: string;
|
|
2286
|
+
};
|
|
2287
|
+
};
|
|
2288
|
+
required: string[];
|
|
2289
|
+
};
|
|
2290
|
+
};
|
|
2291
|
+
};
|
|
2292
|
+
};
|
|
2293
|
+
};
|
|
2294
|
+
};
|
|
2295
|
+
};
|
|
2296
|
+
};
|
|
2297
|
+
}, {
|
|
2298
|
+
permissions: {
|
|
2299
|
+
[key: string]: string[];
|
|
2300
|
+
} | null;
|
|
2301
|
+
id: string;
|
|
2302
|
+
name: string | null;
|
|
2303
|
+
start: string | null;
|
|
2304
|
+
prefix: string | null;
|
|
2305
|
+
userId: string;
|
|
2306
|
+
refillInterval: number | null;
|
|
2307
|
+
refillAmount: number | null;
|
|
2308
|
+
lastRefillAt: Date | null;
|
|
2309
|
+
enabled: boolean;
|
|
2310
|
+
rateLimitEnabled: boolean;
|
|
2311
|
+
rateLimitTimeWindow: number | null;
|
|
2312
|
+
rateLimitMax: number | null;
|
|
2313
|
+
requestCount: number;
|
|
2314
|
+
remaining: number | null;
|
|
2315
|
+
lastRequest: Date | null;
|
|
2316
|
+
expiresAt: Date | null;
|
|
2317
|
+
createdAt: Date;
|
|
2318
|
+
updatedAt: Date;
|
|
2319
|
+
metadata: Record<string, any> | null;
|
|
2320
|
+
}[]>;
|
|
2321
|
+
deleteAllExpiredApiKeys: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<string, {
|
|
2322
|
+
method: "POST";
|
|
2323
|
+
}, {
|
|
2324
|
+
success: boolean;
|
|
2325
|
+
error: unknown;
|
|
2326
|
+
}>;
|
|
2327
|
+
};
|
|
2328
|
+
schema: {
|
|
2329
|
+
apikey: {
|
|
2330
|
+
fields: {
|
|
2331
|
+
name: {
|
|
2332
|
+
type: "string";
|
|
2333
|
+
required: false;
|
|
2334
|
+
input: false;
|
|
2335
|
+
};
|
|
2336
|
+
start: {
|
|
2337
|
+
type: "string";
|
|
2338
|
+
required: false;
|
|
2339
|
+
input: false;
|
|
2340
|
+
};
|
|
2341
|
+
prefix: {
|
|
2342
|
+
type: "string";
|
|
2343
|
+
required: false;
|
|
2344
|
+
input: false;
|
|
2345
|
+
};
|
|
2346
|
+
key: {
|
|
2347
|
+
type: "string";
|
|
2348
|
+
required: true;
|
|
2349
|
+
input: false;
|
|
2350
|
+
index: true;
|
|
2351
|
+
};
|
|
2352
|
+
userId: {
|
|
2353
|
+
type: "string";
|
|
2354
|
+
references: {
|
|
2355
|
+
model: string;
|
|
2356
|
+
field: string;
|
|
2357
|
+
onDelete: "cascade";
|
|
2358
|
+
};
|
|
2359
|
+
required: true;
|
|
2360
|
+
input: false;
|
|
2361
|
+
index: true;
|
|
2362
|
+
};
|
|
2363
|
+
refillInterval: {
|
|
2364
|
+
type: "number";
|
|
2365
|
+
required: false;
|
|
2366
|
+
input: false;
|
|
2367
|
+
};
|
|
2368
|
+
refillAmount: {
|
|
2369
|
+
type: "number";
|
|
2370
|
+
required: false;
|
|
2371
|
+
input: false;
|
|
2372
|
+
};
|
|
2373
|
+
lastRefillAt: {
|
|
2374
|
+
type: "date";
|
|
2375
|
+
required: false;
|
|
2376
|
+
input: false;
|
|
2377
|
+
};
|
|
2378
|
+
enabled: {
|
|
2379
|
+
type: "boolean";
|
|
2380
|
+
required: false;
|
|
2381
|
+
input: false;
|
|
2382
|
+
defaultValue: true;
|
|
2383
|
+
};
|
|
2384
|
+
rateLimitEnabled: {
|
|
2385
|
+
type: "boolean";
|
|
2386
|
+
required: false;
|
|
2387
|
+
input: false;
|
|
2388
|
+
defaultValue: true;
|
|
2389
|
+
};
|
|
2390
|
+
rateLimitTimeWindow: {
|
|
2391
|
+
type: "number";
|
|
2392
|
+
required: false;
|
|
2393
|
+
input: false;
|
|
2394
|
+
defaultValue: number;
|
|
2395
|
+
};
|
|
2396
|
+
rateLimitMax: {
|
|
2397
|
+
type: "number";
|
|
2398
|
+
required: false;
|
|
2399
|
+
input: false;
|
|
2400
|
+
defaultValue: number;
|
|
2401
|
+
};
|
|
2402
|
+
requestCount: {
|
|
2403
|
+
type: "number";
|
|
2404
|
+
required: false;
|
|
2405
|
+
input: false;
|
|
2406
|
+
defaultValue: number;
|
|
2407
|
+
};
|
|
2408
|
+
remaining: {
|
|
2409
|
+
type: "number";
|
|
2410
|
+
required: false;
|
|
2411
|
+
input: false;
|
|
2412
|
+
};
|
|
2413
|
+
lastRequest: {
|
|
2414
|
+
type: "date";
|
|
2415
|
+
required: false;
|
|
2416
|
+
input: false;
|
|
2417
|
+
};
|
|
2418
|
+
expiresAt: {
|
|
2419
|
+
type: "date";
|
|
2420
|
+
required: false;
|
|
2421
|
+
input: false;
|
|
2422
|
+
};
|
|
2423
|
+
createdAt: {
|
|
2424
|
+
type: "date";
|
|
2425
|
+
required: true;
|
|
2426
|
+
input: false;
|
|
2427
|
+
};
|
|
2428
|
+
updatedAt: {
|
|
2429
|
+
type: "date";
|
|
2430
|
+
required: true;
|
|
2431
|
+
input: false;
|
|
2432
|
+
};
|
|
2433
|
+
permissions: {
|
|
2434
|
+
type: "string";
|
|
2435
|
+
required: false;
|
|
2436
|
+
input: false;
|
|
2437
|
+
};
|
|
2438
|
+
metadata: {
|
|
2439
|
+
type: "string";
|
|
2440
|
+
required: false;
|
|
2441
|
+
input: true;
|
|
2442
|
+
transform: {
|
|
2443
|
+
input(value: import("better-auth", { with: { "resolution-mode": "import" } }).DBPrimitive): string;
|
|
2444
|
+
output(value: import("better-auth", { with: { "resolution-mode": "import" } }).DBPrimitive): any;
|
|
2445
|
+
};
|
|
2446
|
+
};
|
|
2447
|
+
};
|
|
2448
|
+
};
|
|
2449
|
+
};
|
|
2450
|
+
options: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).ApiKeyOptions | undefined;
|
|
2451
|
+
}];
|
|
2452
|
+
databaseHooks: {
|
|
2453
|
+
user: {
|
|
2454
|
+
create: {
|
|
2455
|
+
after: (user: any) => Promise<void>;
|
|
2456
|
+
};
|
|
2457
|
+
};
|
|
2458
|
+
};
|
|
2459
|
+
}>;
|
|
2460
|
+
/**
|
|
2461
|
+
* Export the auth instance type for use in other modules
|
|
2462
|
+
*/
|
|
2463
|
+
export type BetterAuthInstance = ReturnType<typeof createBetterAuthInstance>;
|
|
2464
|
+
//# sourceMappingURL=better-auth-instance.d.ts.map
|