@go-mondo/identity-sdk 0.0.1-beta.2
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/.tsbuildinfo/cjs.json +1 -0
- package/.tsbuildinfo/esm.json +1 -0
- package/CHANGELOG.md +63 -0
- package/README.md +3 -0
- package/lib/cjs/action/index.d.ts +2 -0
- package/lib/cjs/action/index.d.ts.map +1 -0
- package/lib/cjs/action/index.js +17 -0
- package/lib/cjs/action/schema/base.d.ts +21 -0
- package/lib/cjs/action/schema/base.d.ts.map +1 -0
- package/lib/cjs/action/schema/base.js +19 -0
- package/lib/cjs/action/schema/operations/set-password.d.ts +31 -0
- package/lib/cjs/action/schema/operations/set-password.d.ts.map +1 -0
- package/lib/cjs/action/schema/operations/set-password.js +18 -0
- package/lib/cjs/action/schema/operations/sign-up-verification.d.ts +22 -0
- package/lib/cjs/action/schema/operations/sign-up-verification.d.ts.map +1 -0
- package/lib/cjs/action/schema/operations/sign-up-verification.js +15 -0
- package/lib/cjs/action/schema/operations/sign-up.d.ts +44 -0
- package/lib/cjs/action/schema/operations/sign-up.d.ts.map +1 -0
- package/lib/cjs/action/schema/operations/sign-up.js +21 -0
- package/lib/cjs/action/schema/operations/user-attribute-verification.d.ts +20 -0
- package/lib/cjs/action/schema/operations/user-attribute-verification.d.ts.map +1 -0
- package/lib/cjs/action/schema/operations/user-attribute-verification.js +13 -0
- package/lib/cjs/action/schema/schema.d.ts +92 -0
- package/lib/cjs/action/schema/schema.d.ts.map +1 -0
- package/lib/cjs/action/schema/schema.js +40 -0
- package/lib/cjs/activity/index.d.ts +2 -0
- package/lib/cjs/activity/index.d.ts.map +1 -0
- package/lib/cjs/activity/index.js +17 -0
- package/lib/cjs/activity/schema/base.d.ts +54 -0
- package/lib/cjs/activity/schema/base.d.ts.map +1 -0
- package/lib/cjs/activity/schema/base.js +34 -0
- package/lib/cjs/activity/schema/schema.d.ts +156 -0
- package/lib/cjs/activity/schema/schema.d.ts.map +1 -0
- package/lib/cjs/activity/schema/schema.js +54 -0
- package/lib/cjs/activity/schema/types/authentication.d.ts +29 -0
- package/lib/cjs/activity/schema/types/authentication.d.ts.map +1 -0
- package/lib/cjs/activity/schema/types/authentication.js +16 -0
- package/lib/cjs/activity/schema/types/authorization.d.ts +29 -0
- package/lib/cjs/activity/schema/types/authorization.d.ts.map +1 -0
- package/lib/cjs/activity/schema/types/authorization.js +17 -0
- package/lib/cjs/activity/schema/types/note.d.ts +51 -0
- package/lib/cjs/activity/schema/types/note.d.ts.map +1 -0
- package/lib/cjs/activity/schema/types/note.js +17 -0
- package/lib/cjs/activity/schema/types/operation.d.ts +31 -0
- package/lib/cjs/activity/schema/types/operation.d.ts.map +1 -0
- package/lib/cjs/activity/schema/types/operation.js +18 -0
- package/lib/cjs/activity/schema/types/unknown.d.ts +22 -0
- package/lib/cjs/activity/schema/types/unknown.d.ts.map +1 -0
- package/lib/cjs/activity/schema/types/unknown.js +9 -0
- package/lib/cjs/activity/schema/utils.d.ts +7 -0
- package/lib/cjs/activity/schema/utils.d.ts.map +1 -0
- package/lib/cjs/activity/schema/utils.js +16 -0
- package/lib/cjs/app/index.d.ts +2 -0
- package/lib/cjs/app/index.d.ts.map +1 -0
- package/lib/cjs/app/index.js +17 -0
- package/lib/cjs/app/schema/app.d.ts +58 -0
- package/lib/cjs/app/schema/app.d.ts.map +1 -0
- package/lib/cjs/app/schema/app.js +43 -0
- package/lib/cjs/app/schema/authorization.d.ts +37 -0
- package/lib/cjs/app/schema/authorization.d.ts.map +1 -0
- package/lib/cjs/app/schema/authorization.js +44 -0
- package/lib/cjs/app/schema/oauth.d.ts +30 -0
- package/lib/cjs/app/schema/oauth.d.ts.map +1 -0
- package/lib/cjs/app/schema/oauth.js +21 -0
- package/lib/cjs/app/schema/oidc.d.ts +28 -0
- package/lib/cjs/app/schema/oidc.d.ts.map +1 -0
- package/lib/cjs/app/schema/oidc.js +13 -0
- package/lib/cjs/app/schema/registration.d.ts +22 -0
- package/lib/cjs/app/schema/registration.d.ts.map +1 -0
- package/lib/cjs/app/schema/registration.js +16 -0
- package/lib/cjs/app/schema/saml.d.ts +28 -0
- package/lib/cjs/app/schema/saml.d.ts.map +1 -0
- package/lib/cjs/app/schema/saml.js +13 -0
- package/lib/cjs/app/schema/schema.d.ts +8 -0
- package/lib/cjs/app/schema/schema.d.ts.map +1 -0
- package/lib/cjs/app/schema/schema.js +23 -0
- package/lib/cjs/app/schema/utils.d.ts +11 -0
- package/lib/cjs/app/schema/utils.d.ts.map +1 -0
- package/lib/cjs/app/schema/utils.js +23 -0
- package/lib/cjs/association/index.d.ts +2 -0
- package/lib/cjs/association/index.d.ts.map +1 -0
- package/lib/cjs/association/index.js +17 -0
- package/lib/cjs/association/schema/association.d.ts +79 -0
- package/lib/cjs/association/schema/association.d.ts.map +1 -0
- package/lib/cjs/association/schema/association.js +26 -0
- package/lib/cjs/association/schema/schema.d.ts +2 -0
- package/lib/cjs/association/schema/schema.d.ts.map +1 -0
- package/lib/cjs/association/schema/schema.js +17 -0
- package/lib/cjs/authentication/index.d.ts +2 -0
- package/lib/cjs/authentication/index.d.ts.map +1 -0
- package/lib/cjs/authentication/index.js +17 -0
- package/lib/cjs/authentication/schema/factors.d.ts +48 -0
- package/lib/cjs/authentication/schema/factors.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/factors.js +28 -0
- package/lib/cjs/authentication/schema/factors.test.d.ts +2 -0
- package/lib/cjs/authentication/schema/factors.test.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/factors.test.js +123 -0
- package/lib/cjs/authentication/schema/provider.d.ts +27 -0
- package/lib/cjs/authentication/schema/provider.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/provider.js +24 -0
- package/lib/cjs/authentication/schema/schema.d.ts +6 -0
- package/lib/cjs/authentication/schema/schema.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/schema.js +21 -0
- package/lib/cjs/authentication/schema/session.d.ts +59 -0
- package/lib/cjs/authentication/schema/session.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/session.js +46 -0
- package/lib/cjs/authentication/schema/settings.d.ts +46 -0
- package/lib/cjs/authentication/schema/settings.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/settings.js +16 -0
- package/lib/cjs/authentication/schema/strategy/base.d.ts +43 -0
- package/lib/cjs/authentication/schema/strategy/base.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/strategy/base.js +31 -0
- package/lib/cjs/authentication/schema/strategy/schema.d.ts +169 -0
- package/lib/cjs/authentication/schema/strategy/schema.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/strategy/schema.js +46 -0
- package/lib/cjs/authentication/schema/strategy/types/email.d.ts +44 -0
- package/lib/cjs/authentication/schema/strategy/types/email.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/strategy/types/email.js +20 -0
- package/lib/cjs/authentication/schema/strategy/types/password.d.ts +99 -0
- package/lib/cjs/authentication/schema/strategy/types/password.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/strategy/types/password.js +35 -0
- package/lib/cjs/authentication/schema/strategy/types/totp.d.ts +91 -0
- package/lib/cjs/authentication/schema/strategy/types/totp.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/strategy/types/totp.js +48 -0
- package/lib/cjs/authorization/index.d.ts +2 -0
- package/lib/cjs/authorization/index.d.ts.map +1 -0
- package/lib/cjs/authorization/index.js +17 -0
- package/lib/cjs/authorization/schema/permission.d.ts +69 -0
- package/lib/cjs/authorization/schema/permission.d.ts.map +1 -0
- package/lib/cjs/authorization/schema/permission.js +50 -0
- package/lib/cjs/authorization/schema/role.d.ts +74 -0
- package/lib/cjs/authorization/schema/role.d.ts.map +1 -0
- package/lib/cjs/authorization/schema/role.js +52 -0
- package/lib/cjs/authorization/schema/schema.d.ts +4 -0
- package/lib/cjs/authorization/schema/schema.d.ts.map +1 -0
- package/lib/cjs/authorization/schema/schema.js +19 -0
- package/lib/cjs/authorization/schema/utils.d.ts +11 -0
- package/lib/cjs/authorization/schema/utils.d.ts.map +1 -0
- package/lib/cjs/authorization/schema/utils.js +23 -0
- package/lib/cjs/common/index.d.ts +2 -0
- package/lib/cjs/common/index.d.ts.map +1 -0
- package/lib/cjs/common/index.js +17 -0
- package/lib/cjs/common/schema/aggregate.d.ts +6 -0
- package/lib/cjs/common/schema/aggregate.d.ts.map +1 -0
- package/lib/cjs/common/schema/aggregate.js +8 -0
- package/lib/cjs/common/schema/dates.d.ts +39 -0
- package/lib/cjs/common/schema/dates.d.ts.map +1 -0
- package/lib/cjs/common/schema/dates.js +34 -0
- package/lib/cjs/common/schema/dates.test.d.ts +2 -0
- package/lib/cjs/common/schema/dates.test.d.ts.map +1 -0
- package/lib/cjs/common/schema/dates.test.js +33 -0
- package/lib/cjs/common/schema/jwt.d.ts +21 -0
- package/lib/cjs/common/schema/jwt.d.ts.map +1 -0
- package/lib/cjs/common/schema/jwt.js +24 -0
- package/lib/cjs/common/schema/metadata.d.ts +42 -0
- package/lib/cjs/common/schema/metadata.d.ts.map +1 -0
- package/lib/cjs/common/schema/metadata.js +88 -0
- package/lib/cjs/common/schema/metadata.test.d.ts +2 -0
- package/lib/cjs/common/schema/metadata.test.d.ts.map +1 -0
- package/lib/cjs/common/schema/metadata.test.js +62 -0
- package/lib/cjs/common/schema/schema.d.ts +5 -0
- package/lib/cjs/common/schema/schema.d.ts.map +1 -0
- package/lib/cjs/common/schema/schema.js +20 -0
- package/lib/cjs/customer/index.d.ts +2 -0
- package/lib/cjs/customer/index.d.ts.map +1 -0
- package/lib/cjs/customer/index.js +17 -0
- package/lib/cjs/customer/schema/organization.d.ts +54 -0
- package/lib/cjs/customer/schema/organization.d.ts.map +1 -0
- package/lib/cjs/customer/schema/organization.js +40 -0
- package/lib/cjs/customer/schema/schema.d.ts +4 -0
- package/lib/cjs/customer/schema/schema.d.ts.map +1 -0
- package/lib/cjs/customer/schema/schema.js +19 -0
- package/lib/cjs/customer/schema/user.d.ts +122 -0
- package/lib/cjs/customer/schema/user.d.ts.map +1 -0
- package/lib/cjs/customer/schema/user.js +83 -0
- package/lib/cjs/customer/schema/user.test.d.ts +2 -0
- package/lib/cjs/customer/schema/user.test.d.ts.map +1 -0
- package/lib/cjs/customer/schema/user.test.js +57 -0
- package/lib/cjs/customer/schema/utils.d.ts +11 -0
- package/lib/cjs/customer/schema/utils.d.ts.map +1 -0
- package/lib/cjs/customer/schema/utils.js +23 -0
- package/lib/cjs/identity/index.d.ts +2 -0
- package/lib/cjs/identity/index.d.ts.map +1 -0
- package/lib/cjs/identity/index.js +17 -0
- package/lib/cjs/identity/schema/schema.d.ts +7 -0
- package/lib/cjs/identity/schema/schema.d.ts.map +1 -0
- package/lib/cjs/identity/schema/schema.js +9 -0
- package/lib/cjs/oauth/index.d.ts +2 -0
- package/lib/cjs/oauth/index.d.ts.map +1 -0
- package/lib/cjs/oauth/index.js +17 -0
- package/lib/cjs/oauth/schema/schema.d.ts +8 -0
- package/lib/cjs/oauth/schema/schema.d.ts.map +1 -0
- package/lib/cjs/oauth/schema/schema.js +9 -0
- package/lib/cjs/package.json +1 -0
- package/lib/cjs/workspace/index.d.ts +2 -0
- package/lib/cjs/workspace/index.d.ts.map +1 -0
- package/lib/cjs/workspace/index.js +17 -0
- package/lib/cjs/workspace/schema/authorization.d.ts +31 -0
- package/lib/cjs/workspace/schema/authorization.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/authorization.js +22 -0
- package/lib/cjs/workspace/schema/branding.d.ts +38 -0
- package/lib/cjs/workspace/schema/branding.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/branding.js +25 -0
- package/lib/cjs/workspace/schema/membership.d.ts +25 -0
- package/lib/cjs/workspace/schema/membership.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/membership.js +19 -0
- package/lib/cjs/workspace/schema/registration.d.ts +28 -0
- package/lib/cjs/workspace/schema/registration.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/registration.js +22 -0
- package/lib/cjs/workspace/schema/schema.d.ts +10 -0
- package/lib/cjs/workspace/schema/schema.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/schema.js +25 -0
- package/lib/cjs/workspace/schema/settings.d.ts +23 -0
- package/lib/cjs/workspace/schema/settings.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/settings.js +15 -0
- package/lib/cjs/workspace/schema/tenant.d.ts +57 -0
- package/lib/cjs/workspace/schema/tenant.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/tenant.js +26 -0
- package/lib/cjs/workspace/schema/user-notification.d.ts +62 -0
- package/lib/cjs/workspace/schema/user-notification.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/user-notification.js +44 -0
- package/lib/cjs/workspace/schema/user-preferences.d.ts +26 -0
- package/lib/cjs/workspace/schema/user-preferences.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/user-preferences.js +19 -0
- package/lib/cjs/workspace/schema/utils.d.ts +15 -0
- package/lib/cjs/workspace/schema/utils.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/utils.js +64 -0
- package/lib/esm/action/index.d.ts +2 -0
- package/lib/esm/action/index.d.ts.map +1 -0
- package/lib/esm/action/index.js +1 -0
- package/lib/esm/action/schema/base.d.ts +21 -0
- package/lib/esm/action/schema/base.d.ts.map +1 -0
- package/lib/esm/action/schema/base.js +16 -0
- package/lib/esm/action/schema/operations/set-password.d.ts +31 -0
- package/lib/esm/action/schema/operations/set-password.d.ts.map +1 -0
- package/lib/esm/action/schema/operations/set-password.js +15 -0
- package/lib/esm/action/schema/operations/sign-up-verification.d.ts +22 -0
- package/lib/esm/action/schema/operations/sign-up-verification.d.ts.map +1 -0
- package/lib/esm/action/schema/operations/sign-up-verification.js +12 -0
- package/lib/esm/action/schema/operations/sign-up.d.ts +44 -0
- package/lib/esm/action/schema/operations/sign-up.d.ts.map +1 -0
- package/lib/esm/action/schema/operations/sign-up.js +18 -0
- package/lib/esm/action/schema/operations/user-attribute-verification.d.ts +20 -0
- package/lib/esm/action/schema/operations/user-attribute-verification.d.ts.map +1 -0
- package/lib/esm/action/schema/operations/user-attribute-verification.js +10 -0
- package/lib/esm/action/schema/schema.d.ts +92 -0
- package/lib/esm/action/schema/schema.d.ts.map +1 -0
- package/lib/esm/action/schema/schema.js +21 -0
- package/lib/esm/activity/index.d.ts +2 -0
- package/lib/esm/activity/index.d.ts.map +1 -0
- package/lib/esm/activity/index.js +1 -0
- package/lib/esm/activity/schema/base.d.ts +54 -0
- package/lib/esm/activity/schema/base.d.ts.map +1 -0
- package/lib/esm/activity/schema/base.js +31 -0
- package/lib/esm/activity/schema/schema.d.ts +156 -0
- package/lib/esm/activity/schema/schema.d.ts.map +1 -0
- package/lib/esm/activity/schema/schema.js +33 -0
- package/lib/esm/activity/schema/types/authentication.d.ts +29 -0
- package/lib/esm/activity/schema/types/authentication.d.ts.map +1 -0
- package/lib/esm/activity/schema/types/authentication.js +13 -0
- package/lib/esm/activity/schema/types/authorization.d.ts +29 -0
- package/lib/esm/activity/schema/types/authorization.d.ts.map +1 -0
- package/lib/esm/activity/schema/types/authorization.js +14 -0
- package/lib/esm/activity/schema/types/note.d.ts +51 -0
- package/lib/esm/activity/schema/types/note.d.ts.map +1 -0
- package/lib/esm/activity/schema/types/note.js +14 -0
- package/lib/esm/activity/schema/types/operation.d.ts +31 -0
- package/lib/esm/activity/schema/types/operation.d.ts.map +1 -0
- package/lib/esm/activity/schema/types/operation.js +15 -0
- package/lib/esm/activity/schema/types/unknown.d.ts +22 -0
- package/lib/esm/activity/schema/types/unknown.d.ts.map +1 -0
- package/lib/esm/activity/schema/types/unknown.js +6 -0
- package/lib/esm/activity/schema/utils.d.ts +7 -0
- package/lib/esm/activity/schema/utils.d.ts.map +1 -0
- package/lib/esm/activity/schema/utils.js +9 -0
- package/lib/esm/app/index.d.ts +2 -0
- package/lib/esm/app/index.d.ts.map +1 -0
- package/lib/esm/app/index.js +1 -0
- package/lib/esm/app/schema/app.d.ts +58 -0
- package/lib/esm/app/schema/app.d.ts.map +1 -0
- package/lib/esm/app/schema/app.js +40 -0
- package/lib/esm/app/schema/authorization.d.ts +37 -0
- package/lib/esm/app/schema/authorization.d.ts.map +1 -0
- package/lib/esm/app/schema/authorization.js +41 -0
- package/lib/esm/app/schema/oauth.d.ts +30 -0
- package/lib/esm/app/schema/oauth.d.ts.map +1 -0
- package/lib/esm/app/schema/oauth.js +18 -0
- package/lib/esm/app/schema/oidc.d.ts +28 -0
- package/lib/esm/app/schema/oidc.d.ts.map +1 -0
- package/lib/esm/app/schema/oidc.js +10 -0
- package/lib/esm/app/schema/registration.d.ts +22 -0
- package/lib/esm/app/schema/registration.d.ts.map +1 -0
- package/lib/esm/app/schema/registration.js +13 -0
- package/lib/esm/app/schema/saml.d.ts +28 -0
- package/lib/esm/app/schema/saml.d.ts.map +1 -0
- package/lib/esm/app/schema/saml.js +10 -0
- package/lib/esm/app/schema/schema.d.ts +8 -0
- package/lib/esm/app/schema/schema.d.ts.map +1 -0
- package/lib/esm/app/schema/schema.js +7 -0
- package/lib/esm/app/schema/utils.d.ts +11 -0
- package/lib/esm/app/schema/utils.d.ts.map +1 -0
- package/lib/esm/app/schema/utils.js +15 -0
- package/lib/esm/association/index.d.ts +2 -0
- package/lib/esm/association/index.d.ts.map +1 -0
- package/lib/esm/association/index.js +1 -0
- package/lib/esm/association/schema/association.d.ts +79 -0
- package/lib/esm/association/schema/association.d.ts.map +1 -0
- package/lib/esm/association/schema/association.js +23 -0
- package/lib/esm/association/schema/schema.d.ts +2 -0
- package/lib/esm/association/schema/schema.d.ts.map +1 -0
- package/lib/esm/association/schema/schema.js +1 -0
- package/lib/esm/authentication/index.d.ts +2 -0
- package/lib/esm/authentication/index.d.ts.map +1 -0
- package/lib/esm/authentication/index.js +1 -0
- package/lib/esm/authentication/schema/factors.d.ts +48 -0
- package/lib/esm/authentication/schema/factors.d.ts.map +1 -0
- package/lib/esm/authentication/schema/factors.js +25 -0
- package/lib/esm/authentication/schema/factors.test.d.ts +2 -0
- package/lib/esm/authentication/schema/factors.test.d.ts.map +1 -0
- package/lib/esm/authentication/schema/factors.test.js +121 -0
- package/lib/esm/authentication/schema/provider.d.ts +27 -0
- package/lib/esm/authentication/schema/provider.d.ts.map +1 -0
- package/lib/esm/authentication/schema/provider.js +21 -0
- package/lib/esm/authentication/schema/schema.d.ts +6 -0
- package/lib/esm/authentication/schema/schema.d.ts.map +1 -0
- package/lib/esm/authentication/schema/schema.js +5 -0
- package/lib/esm/authentication/schema/session.d.ts +59 -0
- package/lib/esm/authentication/schema/session.d.ts.map +1 -0
- package/lib/esm/authentication/schema/session.js +43 -0
- package/lib/esm/authentication/schema/settings.d.ts +46 -0
- package/lib/esm/authentication/schema/settings.d.ts.map +1 -0
- package/lib/esm/authentication/schema/settings.js +13 -0
- package/lib/esm/authentication/schema/strategy/base.d.ts +43 -0
- package/lib/esm/authentication/schema/strategy/base.d.ts.map +1 -0
- package/lib/esm/authentication/schema/strategy/base.js +28 -0
- package/lib/esm/authentication/schema/strategy/schema.d.ts +169 -0
- package/lib/esm/authentication/schema/strategy/schema.d.ts.map +1 -0
- package/lib/esm/authentication/schema/strategy/schema.js +22 -0
- package/lib/esm/authentication/schema/strategy/types/email.d.ts +44 -0
- package/lib/esm/authentication/schema/strategy/types/email.d.ts.map +1 -0
- package/lib/esm/authentication/schema/strategy/types/email.js +17 -0
- package/lib/esm/authentication/schema/strategy/types/password.d.ts +99 -0
- package/lib/esm/authentication/schema/strategy/types/password.d.ts.map +1 -0
- package/lib/esm/authentication/schema/strategy/types/password.js +32 -0
- package/lib/esm/authentication/schema/strategy/types/totp.d.ts +91 -0
- package/lib/esm/authentication/schema/strategy/types/totp.d.ts.map +1 -0
- package/lib/esm/authentication/schema/strategy/types/totp.js +45 -0
- package/lib/esm/authorization/index.d.ts +2 -0
- package/lib/esm/authorization/index.d.ts.map +1 -0
- package/lib/esm/authorization/index.js +1 -0
- package/lib/esm/authorization/schema/permission.d.ts +69 -0
- package/lib/esm/authorization/schema/permission.d.ts.map +1 -0
- package/lib/esm/authorization/schema/permission.js +47 -0
- package/lib/esm/authorization/schema/role.d.ts +74 -0
- package/lib/esm/authorization/schema/role.d.ts.map +1 -0
- package/lib/esm/authorization/schema/role.js +49 -0
- package/lib/esm/authorization/schema/schema.d.ts +4 -0
- package/lib/esm/authorization/schema/schema.d.ts.map +1 -0
- package/lib/esm/authorization/schema/schema.js +3 -0
- package/lib/esm/authorization/schema/utils.d.ts +11 -0
- package/lib/esm/authorization/schema/utils.d.ts.map +1 -0
- package/lib/esm/authorization/schema/utils.js +15 -0
- package/lib/esm/common/index.d.ts +2 -0
- package/lib/esm/common/index.d.ts.map +1 -0
- package/lib/esm/common/index.js +1 -0
- package/lib/esm/common/schema/aggregate.d.ts +6 -0
- package/lib/esm/common/schema/aggregate.d.ts.map +1 -0
- package/lib/esm/common/schema/aggregate.js +5 -0
- package/lib/esm/common/schema/dates.d.ts +39 -0
- package/lib/esm/common/schema/dates.d.ts.map +1 -0
- package/lib/esm/common/schema/dates.js +31 -0
- package/lib/esm/common/schema/dates.test.d.ts +2 -0
- package/lib/esm/common/schema/dates.test.d.ts.map +1 -0
- package/lib/esm/common/schema/dates.test.js +31 -0
- package/lib/esm/common/schema/jwt.d.ts +21 -0
- package/lib/esm/common/schema/jwt.d.ts.map +1 -0
- package/lib/esm/common/schema/jwt.js +21 -0
- package/lib/esm/common/schema/metadata.d.ts +42 -0
- package/lib/esm/common/schema/metadata.d.ts.map +1 -0
- package/lib/esm/common/schema/metadata.js +83 -0
- package/lib/esm/common/schema/metadata.test.d.ts +2 -0
- package/lib/esm/common/schema/metadata.test.d.ts.map +1 -0
- package/lib/esm/common/schema/metadata.test.js +60 -0
- package/lib/esm/common/schema/schema.d.ts +5 -0
- package/lib/esm/common/schema/schema.d.ts.map +1 -0
- package/lib/esm/common/schema/schema.js +4 -0
- package/lib/esm/customer/index.d.ts +2 -0
- package/lib/esm/customer/index.d.ts.map +1 -0
- package/lib/esm/customer/index.js +1 -0
- package/lib/esm/customer/schema/organization.d.ts +54 -0
- package/lib/esm/customer/schema/organization.d.ts.map +1 -0
- package/lib/esm/customer/schema/organization.js +37 -0
- package/lib/esm/customer/schema/schema.d.ts +4 -0
- package/lib/esm/customer/schema/schema.d.ts.map +1 -0
- package/lib/esm/customer/schema/schema.js +3 -0
- package/lib/esm/customer/schema/user.d.ts +122 -0
- package/lib/esm/customer/schema/user.d.ts.map +1 -0
- package/lib/esm/customer/schema/user.js +80 -0
- package/lib/esm/customer/schema/user.test.d.ts +2 -0
- package/lib/esm/customer/schema/user.test.d.ts.map +1 -0
- package/lib/esm/customer/schema/user.test.js +55 -0
- package/lib/esm/customer/schema/utils.d.ts +11 -0
- package/lib/esm/customer/schema/utils.d.ts.map +1 -0
- package/lib/esm/customer/schema/utils.js +15 -0
- package/lib/esm/identity/index.d.ts +2 -0
- package/lib/esm/identity/index.d.ts.map +1 -0
- package/lib/esm/identity/index.js +1 -0
- package/lib/esm/identity/schema/schema.d.ts +7 -0
- package/lib/esm/identity/schema/schema.d.ts.map +1 -0
- package/lib/esm/identity/schema/schema.js +6 -0
- package/lib/esm/oauth/index.d.ts +2 -0
- package/lib/esm/oauth/index.d.ts.map +1 -0
- package/lib/esm/oauth/index.js +1 -0
- package/lib/esm/oauth/schema/schema.d.ts +8 -0
- package/lib/esm/oauth/schema/schema.d.ts.map +1 -0
- package/lib/esm/oauth/schema/schema.js +6 -0
- package/lib/esm/package.json +1 -0
- package/lib/esm/workspace/index.d.ts +2 -0
- package/lib/esm/workspace/index.d.ts.map +1 -0
- package/lib/esm/workspace/index.js +1 -0
- package/lib/esm/workspace/schema/authorization.d.ts +31 -0
- package/lib/esm/workspace/schema/authorization.d.ts.map +1 -0
- package/lib/esm/workspace/schema/authorization.js +19 -0
- package/lib/esm/workspace/schema/branding.d.ts +38 -0
- package/lib/esm/workspace/schema/branding.d.ts.map +1 -0
- package/lib/esm/workspace/schema/branding.js +22 -0
- package/lib/esm/workspace/schema/membership.d.ts +25 -0
- package/lib/esm/workspace/schema/membership.d.ts.map +1 -0
- package/lib/esm/workspace/schema/membership.js +16 -0
- package/lib/esm/workspace/schema/registration.d.ts +28 -0
- package/lib/esm/workspace/schema/registration.d.ts.map +1 -0
- package/lib/esm/workspace/schema/registration.js +19 -0
- package/lib/esm/workspace/schema/schema.d.ts +10 -0
- package/lib/esm/workspace/schema/schema.d.ts.map +1 -0
- package/lib/esm/workspace/schema/schema.js +9 -0
- package/lib/esm/workspace/schema/settings.d.ts +23 -0
- package/lib/esm/workspace/schema/settings.d.ts.map +1 -0
- package/lib/esm/workspace/schema/settings.js +12 -0
- package/lib/esm/workspace/schema/tenant.d.ts +57 -0
- package/lib/esm/workspace/schema/tenant.d.ts.map +1 -0
- package/lib/esm/workspace/schema/tenant.js +23 -0
- package/lib/esm/workspace/schema/user-notification.d.ts +62 -0
- package/lib/esm/workspace/schema/user-notification.d.ts.map +1 -0
- package/lib/esm/workspace/schema/user-notification.js +41 -0
- package/lib/esm/workspace/schema/user-preferences.d.ts +26 -0
- package/lib/esm/workspace/schema/user-preferences.d.ts.map +1 -0
- package/lib/esm/workspace/schema/user-preferences.js +16 -0
- package/lib/esm/workspace/schema/utils.d.ts +15 -0
- package/lib/esm/workspace/schema/utils.d.ts.map +1 -0
- package/lib/esm/workspace/schema/utils.js +22 -0
- package/package.json +155 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const StrategyIdSchema: import("arktype/internal/methods/string.ts").StringType<string, {}>;
|
|
2
|
+
export type StrategyId = typeof StrategyIdSchema.inferOut;
|
|
3
|
+
export declare const StrategyIdPropertySchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
4
|
+
id: string;
|
|
5
|
+
}, {}>;
|
|
6
|
+
export type StrategyIdProperty = typeof StrategyIdPropertySchema.inferOut;
|
|
7
|
+
export declare const StrategyStatusSchema: import("arktype/internal/methods/string.ts").StringType<"enabled" | "disabled", {}>;
|
|
8
|
+
export declare const StrategyTypeSchema: import("arktype/internal/methods/string.ts").StringType<"email" | "password" | "totp", {}>;
|
|
9
|
+
export declare const StrategyLabelSchema: import("arktype/internal/methods/string.ts").StringType<string, {}>;
|
|
10
|
+
export declare const BaseStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
11
|
+
id: string;
|
|
12
|
+
status: "enabled" | "disabled";
|
|
13
|
+
label: string;
|
|
14
|
+
createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
15
|
+
updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
16
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
17
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
18
|
+
metadata?: ((In: {
|
|
19
|
+
[x: string]: string | number | boolean;
|
|
20
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
21
|
+
[x: string]: string | number | boolean;
|
|
22
|
+
} | undefined>) | undefined;
|
|
23
|
+
}, {}>;
|
|
24
|
+
export declare const BaseInsertStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
25
|
+
label: string;
|
|
26
|
+
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
27
|
+
id?: string | undefined;
|
|
28
|
+
metadata?: ((In: {
|
|
29
|
+
[x: string]: string | number | boolean;
|
|
30
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
31
|
+
[x: string]: string | number | boolean;
|
|
32
|
+
} | undefined>) | undefined;
|
|
33
|
+
}, {}>;
|
|
34
|
+
export declare const BaseUpdateStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
35
|
+
label?: string | undefined;
|
|
36
|
+
status?: "enabled" | "disabled" | undefined;
|
|
37
|
+
metadata?: ((In: {
|
|
38
|
+
[x: string]: string | number | boolean;
|
|
39
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
40
|
+
[x: string]: string | number | boolean;
|
|
41
|
+
} | undefined>) | undefined;
|
|
42
|
+
}, {}>;
|
|
43
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/authentication/schema/strategy/base.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,gBAAgB,qEAAc,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,OAAO,gBAAgB,CAAC,QAAQ,CAAC;AAE1D,eAAO,MAAM,wBAAwB;;MAEnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,wBAAwB,CAAC,QAAQ,CAAC;AAE1E,eAAO,MAAM,oBAAoB,qFAGhC,CAAC;AACF,eAAO,MAAM,kBAAkB,4FAI9B,CAAC;AACF,eAAO,MAAM,mBAAmB,qEAAiB,CAAC;AAElD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;MAOD,CAAC;AAEtC,eAAO,MAAM,+BAA+B;;;;;;;;;MAIP,CAAC;AAEtC,eAAO,MAAM,+BAA+B;;;;;;;;MAGP,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type } from 'arktype';
|
|
2
|
+
import { OptionalDatePayloadSchema, RequiredDatePayloadSchema, } from '../../../common/index.js';
|
|
3
|
+
import { MetadataPayloadPropertySchema } from '../../../common/schema/metadata.js';
|
|
4
|
+
import { StrategyStatus, StrategyType } from './schema.js';
|
|
5
|
+
export const StrategyIdSchema = type.string;
|
|
6
|
+
export const StrategyIdPropertySchema = type({
|
|
7
|
+
id: StrategyIdSchema,
|
|
8
|
+
});
|
|
9
|
+
export const StrategyStatusSchema = type.enumerated(StrategyStatus.ENABLED, StrategyStatus.DISABLED);
|
|
10
|
+
export const StrategyTypeSchema = type.enumerated(StrategyType.EMAIL, StrategyType.PASSWORD, StrategyType.TOTP);
|
|
11
|
+
export const StrategyLabelSchema = type('string');
|
|
12
|
+
export const BaseStrategyPayloadSchema = StrategyIdPropertySchema.and({
|
|
13
|
+
status: StrategyStatusSchema,
|
|
14
|
+
label: StrategyLabelSchema,
|
|
15
|
+
createdAt: RequiredDatePayloadSchema,
|
|
16
|
+
updatedAt: RequiredDatePayloadSchema,
|
|
17
|
+
'deletedAt?': OptionalDatePayloadSchema,
|
|
18
|
+
'deactivatedAt?': OptionalDatePayloadSchema,
|
|
19
|
+
}).and(MetadataPayloadPropertySchema);
|
|
20
|
+
export const BaseInsertStrategyPayloadSchema = type({
|
|
21
|
+
id: StrategyIdSchema.optional(),
|
|
22
|
+
label: StrategyLabelSchema,
|
|
23
|
+
status: StrategyStatusSchema.default(StrategyStatus.ENABLED),
|
|
24
|
+
}).and(MetadataPayloadPropertySchema);
|
|
25
|
+
export const BaseUpdateStrategyPayloadSchema = type({
|
|
26
|
+
label: StrategyLabelSchema.optional(),
|
|
27
|
+
status: StrategyStatusSchema.optional(),
|
|
28
|
+
}).and(MetadataPayloadPropertySchema);
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
export declare const StrategyType: {
|
|
2
|
+
readonly EMAIL: "email";
|
|
3
|
+
readonly PASSWORD: "password";
|
|
4
|
+
readonly TOTP: "totp";
|
|
5
|
+
};
|
|
6
|
+
export type AnyStrategyType = (typeof StrategyType)[keyof typeof StrategyType];
|
|
7
|
+
export declare const StrategyStatus: {
|
|
8
|
+
readonly ENABLED: "enabled";
|
|
9
|
+
readonly DISABLED: "disabled";
|
|
10
|
+
};
|
|
11
|
+
export type AnyStrategyStatus = (typeof StrategyStatus)[keyof typeof StrategyStatus];
|
|
12
|
+
/**
|
|
13
|
+
* Union(s)
|
|
14
|
+
*/
|
|
15
|
+
export declare const InsertStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
16
|
+
label: string;
|
|
17
|
+
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
18
|
+
id?: string | undefined;
|
|
19
|
+
metadata?: ((In: {
|
|
20
|
+
[x: string]: string | number | boolean;
|
|
21
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
22
|
+
[x: string]: string | number | boolean;
|
|
23
|
+
} | undefined>) | undefined;
|
|
24
|
+
type: "email";
|
|
25
|
+
} | {
|
|
26
|
+
label: string;
|
|
27
|
+
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
28
|
+
id?: string | undefined;
|
|
29
|
+
metadata?: ((In: {
|
|
30
|
+
[x: string]: string | number | boolean;
|
|
31
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
32
|
+
[x: string]: string | number | boolean;
|
|
33
|
+
} | undefined>) | undefined;
|
|
34
|
+
type: "password";
|
|
35
|
+
settings: {
|
|
36
|
+
passwordPolicy: {
|
|
37
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, 8>;
|
|
38
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, 36>;
|
|
39
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
40
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
41
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
42
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
} | {
|
|
46
|
+
label: string;
|
|
47
|
+
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
48
|
+
id?: string | undefined;
|
|
49
|
+
metadata?: ((In: {
|
|
50
|
+
[x: string]: string | number | boolean;
|
|
51
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
52
|
+
[x: string]: string | number | boolean;
|
|
53
|
+
} | undefined>) | undefined;
|
|
54
|
+
type: "totp";
|
|
55
|
+
settings: {
|
|
56
|
+
digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
|
|
57
|
+
period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
|
|
58
|
+
algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
|
|
59
|
+
};
|
|
60
|
+
}, {}>;
|
|
61
|
+
export type InsertStrategyPayload = typeof InsertStrategyPayloadSchema.inferOut;
|
|
62
|
+
export declare const UpdateStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
63
|
+
label?: string | undefined;
|
|
64
|
+
status?: "enabled" | "disabled" | undefined;
|
|
65
|
+
metadata?: ((In: {
|
|
66
|
+
[x: string]: string | number | boolean;
|
|
67
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
68
|
+
[x: string]: string | number | boolean;
|
|
69
|
+
} | undefined>) | undefined;
|
|
70
|
+
type: "email";
|
|
71
|
+
} | {
|
|
72
|
+
label?: string | undefined;
|
|
73
|
+
status?: "enabled" | "disabled" | undefined;
|
|
74
|
+
metadata?: ((In: {
|
|
75
|
+
[x: string]: string | number | boolean;
|
|
76
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
77
|
+
[x: string]: string | number | boolean;
|
|
78
|
+
} | undefined>) | undefined;
|
|
79
|
+
type: "password";
|
|
80
|
+
settings: {
|
|
81
|
+
passwordPolicy: {
|
|
82
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, 8>;
|
|
83
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, 36>;
|
|
84
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
85
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
86
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
87
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
} | {
|
|
91
|
+
label?: string | undefined;
|
|
92
|
+
status?: "enabled" | "disabled" | undefined;
|
|
93
|
+
metadata?: ((In: {
|
|
94
|
+
[x: string]: string | number | boolean;
|
|
95
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
96
|
+
[x: string]: string | number | boolean;
|
|
97
|
+
} | undefined>) | undefined;
|
|
98
|
+
type: "totp";
|
|
99
|
+
settings: {
|
|
100
|
+
digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
|
|
101
|
+
period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
|
|
102
|
+
algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
|
|
103
|
+
};
|
|
104
|
+
}, {}>;
|
|
105
|
+
export type UpdateStrategyPayload = typeof UpdateStrategyPayloadSchema.inferOut;
|
|
106
|
+
export declare const StrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
107
|
+
id: string;
|
|
108
|
+
status: "enabled" | "disabled";
|
|
109
|
+
label: string;
|
|
110
|
+
createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
111
|
+
updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
112
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
113
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
114
|
+
metadata?: ((In: {
|
|
115
|
+
[x: string]: string | number | boolean;
|
|
116
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
117
|
+
[x: string]: string | number | boolean;
|
|
118
|
+
} | undefined>) | undefined;
|
|
119
|
+
type: "email";
|
|
120
|
+
} | {
|
|
121
|
+
id: string;
|
|
122
|
+
status: "enabled" | "disabled";
|
|
123
|
+
label: string;
|
|
124
|
+
createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
125
|
+
updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
126
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
127
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
128
|
+
metadata?: ((In: {
|
|
129
|
+
[x: string]: string | number | boolean;
|
|
130
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
131
|
+
[x: string]: string | number | boolean;
|
|
132
|
+
} | undefined>) | undefined;
|
|
133
|
+
type: "password";
|
|
134
|
+
settings: {
|
|
135
|
+
passwordPolicy: {
|
|
136
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, 8>;
|
|
137
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, 36>;
|
|
138
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
139
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
140
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
141
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
} | {
|
|
145
|
+
id: string;
|
|
146
|
+
status: "enabled" | "disabled";
|
|
147
|
+
label: string;
|
|
148
|
+
createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
149
|
+
updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
150
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
151
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
152
|
+
metadata?: ((In: {
|
|
153
|
+
[x: string]: string | number | boolean;
|
|
154
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
155
|
+
[x: string]: string | number | boolean;
|
|
156
|
+
} | undefined>) | undefined;
|
|
157
|
+
type: "totp";
|
|
158
|
+
settings: {
|
|
159
|
+
digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
|
|
160
|
+
period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
|
|
161
|
+
algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
|
|
162
|
+
};
|
|
163
|
+
}, {}>;
|
|
164
|
+
export type StrategyPayload = typeof StrategyPayloadSchema.inferOut;
|
|
165
|
+
export { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseUpdateStrategyPayloadSchema, StrategyIdPropertySchema, StrategyIdSchema, StrategyLabelSchema, StrategyStatusSchema, type StrategyId, type StrategyIdProperty, } from './base.js';
|
|
166
|
+
export * from './types/email.js';
|
|
167
|
+
export * from './types/password.js';
|
|
168
|
+
export * from './types/totp.js';
|
|
169
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/authentication/schema/strategy/schema.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE/E,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAGrC,CAAC;AACJ,MAAM,MAAM,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,QAAQ,CAAC;AAEhF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAGrC,CAAC;AACJ,MAAM,MAAM,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,QAAQ,CAAC;AAEhF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEjC,CAAC;AACF,MAAM,MAAM,eAAe,GAAG,OAAO,qBAAqB,CAAC,QAAQ,CAAC;AAEpE,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,+BAA+B,EAC/B,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,KAAK,UAAU,EACf,KAAK,kBAAkB,GACxB,MAAM,WAAW,CAAC;AACnB,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EmailStrategyPayloadSchema, InsertEmailStrategyPayloadSchema, UpdateEmailStrategyPayloadSchema, } from './types/email.js';
|
|
2
|
+
import { InsertPasswordStrategyPayloadSchema, PasswordStrategyPayloadSchema, UpdatePasswordStrategyPayloadSchema, } from './types/password.js';
|
|
3
|
+
import { InsertTOTPStrategyPayloadSchema, TOTPStrategyPayloadSchema, UpdateTOTPStrategyPayloadSchema, } from './types/totp.js';
|
|
4
|
+
export const StrategyType = {
|
|
5
|
+
EMAIL: 'email',
|
|
6
|
+
PASSWORD: 'password',
|
|
7
|
+
TOTP: 'totp',
|
|
8
|
+
};
|
|
9
|
+
export const StrategyStatus = {
|
|
10
|
+
ENABLED: 'enabled',
|
|
11
|
+
DISABLED: 'disabled',
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Union(s)
|
|
15
|
+
*/
|
|
16
|
+
export const InsertStrategyPayloadSchema = InsertPasswordStrategyPayloadSchema.or(InsertEmailStrategyPayloadSchema).or(InsertTOTPStrategyPayloadSchema);
|
|
17
|
+
export const UpdateStrategyPayloadSchema = UpdatePasswordStrategyPayloadSchema.or(UpdateEmailStrategyPayloadSchema).or(UpdateTOTPStrategyPayloadSchema);
|
|
18
|
+
export const StrategyPayloadSchema = PasswordStrategyPayloadSchema.or(EmailStrategyPayloadSchema.or(TOTPStrategyPayloadSchema));
|
|
19
|
+
export { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseUpdateStrategyPayloadSchema, StrategyIdPropertySchema, StrategyIdSchema, StrategyLabelSchema, StrategyStatusSchema, } from './base.js';
|
|
20
|
+
export * from './types/email.js';
|
|
21
|
+
export * from './types/password.js';
|
|
22
|
+
export * from './types/totp.js';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const EmailStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
2
|
+
id: string;
|
|
3
|
+
status: "enabled" | "disabled";
|
|
4
|
+
label: string;
|
|
5
|
+
createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
6
|
+
updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
7
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
8
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
9
|
+
metadata?: ((In: {
|
|
10
|
+
[x: string]: string | number | boolean;
|
|
11
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
12
|
+
[x: string]: string | number | boolean;
|
|
13
|
+
} | undefined>) | undefined;
|
|
14
|
+
type: "email";
|
|
15
|
+
}, {}>;
|
|
16
|
+
export declare const InsertEmailStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
17
|
+
label: string;
|
|
18
|
+
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
19
|
+
id?: string | undefined;
|
|
20
|
+
metadata?: ((In: {
|
|
21
|
+
[x: string]: string | number | boolean;
|
|
22
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
23
|
+
[x: string]: string | number | boolean;
|
|
24
|
+
} | undefined>) | undefined;
|
|
25
|
+
type: "email";
|
|
26
|
+
}, {}>;
|
|
27
|
+
export declare const UpdateEmailStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
28
|
+
label?: string | undefined;
|
|
29
|
+
status?: "enabled" | "disabled" | undefined;
|
|
30
|
+
metadata?: ((In: {
|
|
31
|
+
[x: string]: string | number | boolean;
|
|
32
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
33
|
+
[x: string]: string | number | boolean;
|
|
34
|
+
} | undefined>) | undefined;
|
|
35
|
+
type: "email";
|
|
36
|
+
}, {}>;
|
|
37
|
+
export declare const VerifyEmailSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
38
|
+
code: string;
|
|
39
|
+
email?: string | undefined;
|
|
40
|
+
}, {}>;
|
|
41
|
+
export declare const SendEmailVerificationCodeSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
42
|
+
email?: string | undefined;
|
|
43
|
+
}, {}>;
|
|
44
|
+
//# sourceMappingURL=email.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/schema/strategy/types/email.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;MACI,CAAC;AAE5C,eAAO,MAAM,gCAAgC;;;;;;;;;;MACI,CAAC;AAElD,eAAO,MAAM,gCAAgC;;;;;;;;;MACI,CAAC;AAElD,eAAO,MAAM,iBAAiB;;;MAK5B,CAAC;AAEH,eAAO,MAAM,+BAA+B;;MAE1C,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type } from 'arktype';
|
|
2
|
+
import { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseUpdateStrategyPayloadSchema, } from '../base.js';
|
|
3
|
+
const TypeSchema = type({
|
|
4
|
+
type: "'email'",
|
|
5
|
+
});
|
|
6
|
+
export const EmailStrategyPayloadSchema = BaseStrategyPayloadSchema.and(TypeSchema);
|
|
7
|
+
export const InsertEmailStrategyPayloadSchema = BaseInsertStrategyPayloadSchema.and(TypeSchema);
|
|
8
|
+
export const UpdateEmailStrategyPayloadSchema = BaseUpdateStrategyPayloadSchema.and(TypeSchema);
|
|
9
|
+
export const VerifyEmailSchema = type({
|
|
10
|
+
email: type('string.email').optional(),
|
|
11
|
+
code: type('string').configure({
|
|
12
|
+
message: 'A verification code is required',
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
export const SendEmailVerificationCodeSchema = type({
|
|
16
|
+
email: type('string.email').optional(),
|
|
17
|
+
});
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export declare const PasswordPolicySchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
2
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, 8>;
|
|
3
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, 36>;
|
|
4
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
5
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
6
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
7
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
8
|
+
}, {}>;
|
|
9
|
+
export declare const PasswordStrategySettingsSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
10
|
+
settings: {
|
|
11
|
+
passwordPolicy: {
|
|
12
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, 8>;
|
|
13
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, 36>;
|
|
14
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
15
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
16
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
17
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}, {}>;
|
|
21
|
+
export declare const PasswordStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
22
|
+
id: string;
|
|
23
|
+
status: "enabled" | "disabled";
|
|
24
|
+
label: string;
|
|
25
|
+
createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
26
|
+
updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
27
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
28
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
29
|
+
metadata?: ((In: {
|
|
30
|
+
[x: string]: string | number | boolean;
|
|
31
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
32
|
+
[x: string]: string | number | boolean;
|
|
33
|
+
} | undefined>) | undefined;
|
|
34
|
+
type: "password";
|
|
35
|
+
settings: {
|
|
36
|
+
passwordPolicy: {
|
|
37
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, 8>;
|
|
38
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, 36>;
|
|
39
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
40
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
41
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
42
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
}, {}>;
|
|
46
|
+
export type PasswordStrategyPayload = typeof PasswordStrategyPayloadSchema.inferOut;
|
|
47
|
+
export declare const InsertPasswordStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
48
|
+
label: string;
|
|
49
|
+
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
50
|
+
id?: string | undefined;
|
|
51
|
+
metadata?: ((In: {
|
|
52
|
+
[x: string]: string | number | boolean;
|
|
53
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
54
|
+
[x: string]: string | number | boolean;
|
|
55
|
+
} | undefined>) | undefined;
|
|
56
|
+
type: "password";
|
|
57
|
+
settings: {
|
|
58
|
+
passwordPolicy: {
|
|
59
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, 8>;
|
|
60
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, 36>;
|
|
61
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
62
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
63
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
64
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
}, {}>;
|
|
68
|
+
export type InsertPasswordStrategyPayload = typeof InsertPasswordStrategyPayloadSchema.inferOut;
|
|
69
|
+
export declare const UpdatePasswordStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
70
|
+
label?: string | undefined;
|
|
71
|
+
status?: "enabled" | "disabled" | undefined;
|
|
72
|
+
metadata?: ((In: {
|
|
73
|
+
[x: string]: string | number | boolean;
|
|
74
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
75
|
+
[x: string]: string | number | boolean;
|
|
76
|
+
} | undefined>) | undefined;
|
|
77
|
+
type: "password";
|
|
78
|
+
settings: {
|
|
79
|
+
passwordPolicy: {
|
|
80
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, 8>;
|
|
81
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, 36>;
|
|
82
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
83
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
84
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
85
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
}, {}>;
|
|
89
|
+
export type UpdatePasswordStrategyPayload = typeof UpdatePasswordStrategyPayloadSchema.inferOut;
|
|
90
|
+
export declare const ForgotPasswordSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
91
|
+
identifier?: string | undefined;
|
|
92
|
+
identifierType?: "email" | "phoneNumber" | undefined;
|
|
93
|
+
}, {}>;
|
|
94
|
+
export declare const VerifyPasswordSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
95
|
+
password: string;
|
|
96
|
+
identifier?: string | undefined;
|
|
97
|
+
identifierType?: "email" | "phoneNumber" | undefined;
|
|
98
|
+
}, {}>;
|
|
99
|
+
//# sourceMappingURL=password.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/schema/strategy/types/password.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,oBAAoB;;;;;;;MAO/B,CAAC;AAMH,eAAO,MAAM,8BAA8B;;;;;;;;;;;MAEzC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;MAEL,CAAC;AACtC,MAAM,MAAM,uBAAuB,GACjC,OAAO,6BAA6B,CAAC,QAAQ,CAAC;AAEhD,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;MAG7C,CAAC;AACJ,MAAM,MAAM,6BAA6B,GACvC,OAAO,mCAAmC,CAAC,QAAQ,CAAC;AAEtD,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;MAG7C,CAAC;AACJ,MAAM,MAAM,6BAA6B,GACvC,OAAO,mCAAmC,CAAC,QAAQ,CAAC;AAEtD,eAAO,MAAM,oBAAoB;;;MAG/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;MAI/B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type } from 'arktype';
|
|
2
|
+
import { IdentityIdentifierSchema } from '../../../../identity/schema/schema.js';
|
|
3
|
+
import { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseUpdateStrategyPayloadSchema, } from '../base.js';
|
|
4
|
+
const TypeSchema = type({
|
|
5
|
+
type: "'password'",
|
|
6
|
+
});
|
|
7
|
+
export const PasswordPolicySchema = type({
|
|
8
|
+
minimumLength: type.number.default(8),
|
|
9
|
+
maximumLength: type.number.default(36),
|
|
10
|
+
minimumCapital: type.number.default(1),
|
|
11
|
+
minimumLower: type.number.default(1),
|
|
12
|
+
minimumNumber: type.number.default(1),
|
|
13
|
+
minimumSpecial: type.number.default(1),
|
|
14
|
+
});
|
|
15
|
+
const SettingsSchema = type({
|
|
16
|
+
passwordPolicy: PasswordPolicySchema,
|
|
17
|
+
});
|
|
18
|
+
export const PasswordStrategySettingsSchema = type({
|
|
19
|
+
settings: SettingsSchema,
|
|
20
|
+
});
|
|
21
|
+
export const PasswordStrategyPayloadSchema = BaseStrategyPayloadSchema.and(TypeSchema).and(PasswordStrategySettingsSchema);
|
|
22
|
+
export const InsertPasswordStrategyPayloadSchema = BaseInsertStrategyPayloadSchema.and(TypeSchema).and(PasswordStrategySettingsSchema);
|
|
23
|
+
export const UpdatePasswordStrategyPayloadSchema = BaseUpdateStrategyPayloadSchema.and(TypeSchema).and(PasswordStrategySettingsSchema);
|
|
24
|
+
export const ForgotPasswordSchema = type({
|
|
25
|
+
identifier: type('string').optional(),
|
|
26
|
+
identifierType: IdentityIdentifierSchema.optional(),
|
|
27
|
+
});
|
|
28
|
+
export const VerifyPasswordSchema = type({
|
|
29
|
+
password: type('string'),
|
|
30
|
+
identifier: type('string').optional(),
|
|
31
|
+
identifierType: IdentityIdentifierSchema.optional(),
|
|
32
|
+
});
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export declare const DEFAULT_DIGITS = 6;
|
|
2
|
+
export declare const DEFAULT_PERIOD = 30;
|
|
3
|
+
export declare const TOTPAlgorithm: {
|
|
4
|
+
DEFAULT: string;
|
|
5
|
+
SHA1: string;
|
|
6
|
+
SHA224: string;
|
|
7
|
+
SHA256: string;
|
|
8
|
+
SHA384: string;
|
|
9
|
+
SHA512: string;
|
|
10
|
+
'SHA3-224': string;
|
|
11
|
+
'SHA3-256': string;
|
|
12
|
+
'SHA3-384': string;
|
|
13
|
+
'SHA3-512': string;
|
|
14
|
+
};
|
|
15
|
+
export type AnyTOTPAlgorithm = (typeof TOTPAlgorithm)[keyof typeof TOTPAlgorithm];
|
|
16
|
+
export declare const TOTPStrategySettingsSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
17
|
+
digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
|
|
18
|
+
period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
|
|
19
|
+
algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
|
|
20
|
+
}, {}>;
|
|
21
|
+
export type TOTPStrategySettings = typeof TOTPStrategySettingsSchema.inferOut;
|
|
22
|
+
export declare const TOTPStrategySettingsPropertySchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
23
|
+
settings: {
|
|
24
|
+
digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
|
|
25
|
+
period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
|
|
26
|
+
algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
|
|
27
|
+
};
|
|
28
|
+
}, {}>;
|
|
29
|
+
export type TOTPStrategySettingsProperty = typeof TOTPStrategySettingsPropertySchema.inferOut;
|
|
30
|
+
export declare const TOTPStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
31
|
+
id: string;
|
|
32
|
+
status: "enabled" | "disabled";
|
|
33
|
+
label: string;
|
|
34
|
+
createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
35
|
+
updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
36
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
37
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
38
|
+
metadata?: ((In: {
|
|
39
|
+
[x: string]: string | number | boolean;
|
|
40
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
41
|
+
[x: string]: string | number | boolean;
|
|
42
|
+
} | undefined>) | undefined;
|
|
43
|
+
type: "totp";
|
|
44
|
+
settings: {
|
|
45
|
+
digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
|
|
46
|
+
period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
|
|
47
|
+
algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
|
|
48
|
+
};
|
|
49
|
+
}, {}>;
|
|
50
|
+
export type TOTPStrategyPayload = typeof TOTPStrategyPayloadSchema.inferOut;
|
|
51
|
+
export declare const InsertTOTPStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
52
|
+
label: string;
|
|
53
|
+
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
54
|
+
id?: string | undefined;
|
|
55
|
+
metadata?: ((In: {
|
|
56
|
+
[x: string]: string | number | boolean;
|
|
57
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
58
|
+
[x: string]: string | number | boolean;
|
|
59
|
+
} | undefined>) | undefined;
|
|
60
|
+
type: "totp";
|
|
61
|
+
settings: {
|
|
62
|
+
digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
|
|
63
|
+
period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
|
|
64
|
+
algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
|
|
65
|
+
};
|
|
66
|
+
}, {}>;
|
|
67
|
+
export type InsertTOTPStrategyPayload = typeof InsertTOTPStrategyPayloadSchema.inferOut;
|
|
68
|
+
export declare const UpdateTOTPStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
69
|
+
label?: string | undefined;
|
|
70
|
+
status?: "enabled" | "disabled" | undefined;
|
|
71
|
+
metadata?: ((In: {
|
|
72
|
+
[x: string]: string | number | boolean;
|
|
73
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
74
|
+
[x: string]: string | number | boolean;
|
|
75
|
+
} | undefined>) | undefined;
|
|
76
|
+
type: "totp";
|
|
77
|
+
settings: {
|
|
78
|
+
digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
|
|
79
|
+
period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
|
|
80
|
+
algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
|
|
81
|
+
};
|
|
82
|
+
}, {}>;
|
|
83
|
+
export type UpdateTOTPStrategyPayload = typeof UpdateTOTPStrategyPayloadSchema.inferOut;
|
|
84
|
+
export declare const RegisterTOTPSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
85
|
+
uri: string;
|
|
86
|
+
token: string;
|
|
87
|
+
}, {}>;
|
|
88
|
+
export declare const VerifyTOTPSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
89
|
+
token: string;
|
|
90
|
+
}, {}>;
|
|
91
|
+
//# sourceMappingURL=totp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"totp.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/schema/strategy/types/totp.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,cAAc,IAAI,CAAC;AAChC,eAAO,MAAM,cAAc,KAAK,CAAC;AAMjC,eAAO,MAAM,aAAa;;;;;;;;;;;CAWzB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAErD,eAAO,MAAM,0BAA0B;;;;MAgBrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,0BAA0B,CAAC,QAAQ,CAAC;AAE9E,eAAO,MAAM,kCAAkC;;;;;;MAE7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GACtC,OAAO,kCAAkC,CAAC,QAAQ,CAAC;AAErD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;MAEG,CAAC;AAC1C,MAAM,MAAM,mBAAmB,GAAG,OAAO,yBAAyB,CAAC,QAAQ,CAAC;AAE5E,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;MAGzC,CAAC;AACJ,MAAM,MAAM,yBAAyB,GACnC,OAAO,+BAA+B,CAAC,QAAQ,CAAC;AAElD,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;MAGzC,CAAC;AACJ,MAAM,MAAM,yBAAyB,GACnC,OAAO,+BAA+B,CAAC,QAAQ,CAAC;AAElD,eAAO,MAAM,kBAAkB;;;MAO7B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;MAI3B,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type } from 'arktype';
|
|
2
|
+
import { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseUpdateStrategyPayloadSchema, } from '../base.js';
|
|
3
|
+
export const DEFAULT_DIGITS = 6;
|
|
4
|
+
export const DEFAULT_PERIOD = 30;
|
|
5
|
+
const TypeSchema = type({
|
|
6
|
+
type: "'totp'",
|
|
7
|
+
});
|
|
8
|
+
export const TOTPAlgorithm = {
|
|
9
|
+
DEFAULT: 'SHA256',
|
|
10
|
+
SHA1: 'SHA1',
|
|
11
|
+
SHA224: 'SHA224',
|
|
12
|
+
SHA256: 'SHA256',
|
|
13
|
+
SHA384: 'SHA384',
|
|
14
|
+
SHA512: 'SHA512',
|
|
15
|
+
'SHA3-224': 'SHA3-224',
|
|
16
|
+
'SHA3-256': 'SHA3-256',
|
|
17
|
+
'SHA3-384': 'SHA3-384',
|
|
18
|
+
'SHA3-512': 'SHA3-512',
|
|
19
|
+
};
|
|
20
|
+
export const TOTPStrategySettingsSchema = type({
|
|
21
|
+
digits: type.enumerated(6, 7, 8).default(DEFAULT_DIGITS),
|
|
22
|
+
period: type.enumerated(15, 30, 60).default(DEFAULT_PERIOD),
|
|
23
|
+
algorithm: type
|
|
24
|
+
.enumerated(TOTPAlgorithm.SHA1, TOTPAlgorithm.SHA224, TOTPAlgorithm.SHA256, TOTPAlgorithm.SHA384, TOTPAlgorithm.SHA512, TOTPAlgorithm['SHA3-224'], TOTPAlgorithm['SHA3-256'], TOTPAlgorithm['SHA3-384'], TOTPAlgorithm['SHA3-512'])
|
|
25
|
+
.default(TOTPAlgorithm.DEFAULT),
|
|
26
|
+
});
|
|
27
|
+
export const TOTPStrategySettingsPropertySchema = type({
|
|
28
|
+
settings: TOTPStrategySettingsSchema,
|
|
29
|
+
});
|
|
30
|
+
export const TOTPStrategyPayloadSchema = BaseStrategyPayloadSchema.and(TypeSchema).and(TOTPStrategySettingsPropertySchema);
|
|
31
|
+
export const InsertTOTPStrategyPayloadSchema = BaseInsertStrategyPayloadSchema.and(TypeSchema).and(TOTPStrategySettingsPropertySchema);
|
|
32
|
+
export const UpdateTOTPStrategyPayloadSchema = BaseUpdateStrategyPayloadSchema.and(TypeSchema).and(TOTPStrategySettingsPropertySchema);
|
|
33
|
+
export const RegisterTOTPSchema = type({
|
|
34
|
+
uri: type('string.url').configure({
|
|
35
|
+
message: 'An authenticator uri is required',
|
|
36
|
+
}),
|
|
37
|
+
token: type('string').configure({
|
|
38
|
+
message: 'An authenticator token is required',
|
|
39
|
+
}),
|
|
40
|
+
});
|
|
41
|
+
export const VerifyTOTPSchema = type({
|
|
42
|
+
token: type('string').configure({
|
|
43
|
+
message: 'An authenticator token is required',
|
|
44
|
+
}),
|
|
45
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/authorization/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './schema/schema.js';
|