@go-mondo/identity-sdk 0.0.1 → 0.0.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yaml +105 -0
- package/.release-please-manifest.json +3 -1
- package/.tsbuildinfo/cjs.json +1 -0
- package/.tsbuildinfo/esm.json +1 -0
- package/.vscode/settings.json +41 -0
- package/CHANGELOG.md +38 -0
- package/biome.json +1 -1
- package/dist/cjs/action/index.d.ts +2 -0
- package/dist/cjs/action/index.d.ts.map +1 -0
- package/dist/cjs/action/index.js +17 -0
- package/dist/cjs/action/schema/base.d.ts +21 -0
- package/dist/cjs/action/schema/base.d.ts.map +1 -0
- package/dist/cjs/action/schema/base.js +19 -0
- package/dist/cjs/action/schema/operations/set-password.d.ts +31 -0
- package/dist/cjs/action/schema/operations/set-password.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/set-password.js +18 -0
- package/dist/cjs/action/schema/operations/sign-up-verification.d.ts +22 -0
- package/dist/cjs/action/schema/operations/sign-up-verification.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/sign-up-verification.js +15 -0
- package/dist/cjs/action/schema/operations/sign-up.d.ts +44 -0
- package/dist/cjs/action/schema/operations/sign-up.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/sign-up.js +21 -0
- package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts +20 -0
- package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/user-attribute-verification.js +13 -0
- package/dist/cjs/action/schema/schema.d.ts +92 -0
- package/dist/cjs/action/schema/schema.d.ts.map +1 -0
- package/dist/cjs/action/schema/schema.js +40 -0
- package/dist/cjs/activity/index.d.ts +2 -0
- package/dist/cjs/activity/index.d.ts.map +1 -0
- package/dist/cjs/activity/index.js +17 -0
- package/dist/cjs/activity/schema/base.d.ts +54 -0
- package/dist/cjs/activity/schema/base.d.ts.map +1 -0
- package/dist/cjs/activity/schema/base.js +34 -0
- package/dist/cjs/activity/schema/schema.d.ts +156 -0
- package/dist/cjs/activity/schema/schema.d.ts.map +1 -0
- package/dist/cjs/activity/schema/schema.js +54 -0
- package/dist/cjs/activity/schema/types/authentication.d.ts +29 -0
- package/dist/cjs/activity/schema/types/authentication.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/authentication.js +16 -0
- package/dist/cjs/activity/schema/types/authorization.d.ts +29 -0
- package/dist/cjs/activity/schema/types/authorization.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/authorization.js +17 -0
- package/dist/cjs/activity/schema/types/note.d.ts +51 -0
- package/dist/cjs/activity/schema/types/note.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/note.js +17 -0
- package/dist/cjs/activity/schema/types/operation.d.ts +31 -0
- package/dist/cjs/activity/schema/types/operation.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/operation.js +18 -0
- package/dist/cjs/activity/schema/types/unknown.d.ts +22 -0
- package/dist/cjs/activity/schema/types/unknown.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/unknown.js +9 -0
- package/dist/cjs/activity/schema/utils.d.ts +7 -0
- package/dist/cjs/activity/schema/utils.d.ts.map +1 -0
- package/dist/cjs/activity/schema/utils.js +16 -0
- package/dist/cjs/app/index.d.ts +2 -0
- package/dist/cjs/app/index.d.ts.map +1 -0
- package/dist/cjs/app/index.js +17 -0
- package/dist/cjs/app/schema/app.d.ts +58 -0
- package/dist/cjs/app/schema/app.d.ts.map +1 -0
- package/dist/cjs/app/schema/app.js +43 -0
- package/dist/cjs/app/schema/authorization.d.ts +37 -0
- package/dist/cjs/app/schema/authorization.d.ts.map +1 -0
- package/dist/cjs/app/schema/authorization.js +44 -0
- package/dist/cjs/app/schema/oauth.d.ts +30 -0
- package/dist/cjs/app/schema/oauth.d.ts.map +1 -0
- package/dist/cjs/app/schema/oauth.js +21 -0
- package/dist/cjs/app/schema/oidc.d.ts +28 -0
- package/dist/cjs/app/schema/oidc.d.ts.map +1 -0
- package/dist/cjs/app/schema/oidc.js +13 -0
- package/dist/cjs/app/schema/registration.d.ts +22 -0
- package/dist/cjs/app/schema/registration.d.ts.map +1 -0
- package/dist/cjs/app/schema/registration.js +16 -0
- package/dist/cjs/app/schema/saml.d.ts +28 -0
- package/dist/cjs/app/schema/saml.d.ts.map +1 -0
- package/dist/cjs/app/schema/saml.js +13 -0
- package/dist/cjs/app/schema/schema.d.ts +8 -0
- package/dist/cjs/app/schema/schema.d.ts.map +1 -0
- package/dist/cjs/app/schema/schema.js +23 -0
- package/dist/cjs/app/schema/utils.d.ts +11 -0
- package/dist/cjs/app/schema/utils.d.ts.map +1 -0
- package/dist/cjs/app/schema/utils.js +23 -0
- package/dist/cjs/association/index.d.ts +2 -0
- package/dist/cjs/association/index.d.ts.map +1 -0
- package/dist/cjs/association/index.js +17 -0
- package/dist/cjs/association/schema/association.d.ts +82 -0
- package/dist/cjs/association/schema/association.d.ts.map +1 -0
- package/dist/cjs/association/schema/association.js +26 -0
- package/dist/cjs/association/schema/schema.d.ts +2 -0
- package/dist/cjs/association/schema/schema.d.ts.map +1 -0
- package/dist/cjs/association/schema/schema.js +17 -0
- package/dist/cjs/authentication/index.d.ts +2 -0
- package/dist/cjs/authentication/index.d.ts.map +1 -0
- package/dist/cjs/authentication/index.js +17 -0
- package/dist/cjs/authentication/schema/factors.d.ts +48 -0
- package/dist/cjs/authentication/schema/factors.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/factors.js +28 -0
- package/dist/cjs/authentication/schema/factors.test.d.ts +2 -0
- package/dist/cjs/authentication/schema/factors.test.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/factors.test.js +123 -0
- package/dist/cjs/authentication/schema/provider.d.ts +27 -0
- package/dist/cjs/authentication/schema/provider.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/provider.js +24 -0
- package/dist/cjs/authentication/schema/schema.d.ts +6 -0
- package/dist/cjs/authentication/schema/schema.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/schema.js +21 -0
- package/dist/cjs/authentication/schema/session.d.ts +59 -0
- package/dist/cjs/authentication/schema/session.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/session.js +46 -0
- package/dist/cjs/authentication/schema/settings.d.ts +46 -0
- package/dist/cjs/authentication/schema/settings.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/settings.js +16 -0
- package/dist/cjs/authentication/schema/strategy/base.d.ts +54 -0
- package/dist/cjs/authentication/schema/strategy/base.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/base.js +39 -0
- package/dist/cjs/authentication/schema/strategy/schema.d.ts +158 -0
- package/dist/cjs/authentication/schema/strategy/schema.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/schema.js +39 -0
- package/dist/cjs/authentication/schema/strategy/types/email.d.ts +44 -0
- package/dist/cjs/authentication/schema/strategy/types/email.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/types/email.js +20 -0
- package/dist/cjs/authentication/schema/strategy/types/password.d.ts +99 -0
- package/dist/cjs/authentication/schema/strategy/types/password.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/types/password.js +35 -0
- package/dist/cjs/authentication/schema/strategy/types/totp.d.ts +91 -0
- package/dist/cjs/authentication/schema/strategy/types/totp.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/types/totp.js +48 -0
- package/dist/cjs/authorization/index.d.ts +6 -0
- package/dist/cjs/authorization/index.d.ts.map +1 -0
- package/dist/cjs/authorization/index.js +21 -0
- package/dist/cjs/authorization/permissions/resources.d.ts +20 -0
- package/dist/cjs/authorization/permissions/resources.d.ts.map +1 -0
- package/dist/cjs/authorization/permissions/resources.js +57 -0
- package/dist/cjs/authorization/permissions/schema.d.ts +104 -0
- package/dist/cjs/authorization/permissions/schema.d.ts.map +1 -0
- package/dist/cjs/authorization/permissions/schema.js +66 -0
- package/dist/cjs/authorization/roles/resources.d.ts +20 -0
- package/dist/cjs/authorization/roles/resources.d.ts.map +1 -0
- package/dist/cjs/authorization/roles/resources.js +57 -0
- package/dist/cjs/authorization/roles/schema.d.ts +113 -0
- package/dist/cjs/authorization/roles/schema.d.ts.map +1 -0
- package/dist/cjs/authorization/roles/schema.js +72 -0
- package/dist/cjs/authorization/utils.d.ts +11 -0
- package/dist/cjs/authorization/utils.d.ts.map +1 -0
- package/dist/cjs/authorization/utils.js +23 -0
- package/dist/cjs/common/errors/http.d.ts +17 -0
- package/dist/cjs/common/errors/http.d.ts.map +1 -0
- package/dist/cjs/common/errors/http.js +18 -0
- package/dist/cjs/common/errors/validation.d.ts +11 -0
- package/dist/cjs/common/errors/validation.d.ts.map +1 -0
- package/dist/cjs/common/errors/validation.js +12 -0
- package/dist/cjs/common/index.d.ts +6 -0
- package/dist/cjs/common/index.d.ts.map +1 -0
- package/dist/cjs/common/index.js +21 -0
- package/dist/cjs/common/resources/authorization.d.ts +2 -0
- package/dist/cjs/common/resources/authorization.d.ts.map +1 -0
- package/dist/cjs/common/resources/authorization.js +2 -0
- package/dist/cjs/common/resources/init.d.ts +16 -0
- package/dist/cjs/common/resources/init.d.ts.map +1 -0
- package/dist/cjs/common/resources/init.js +38 -0
- package/dist/cjs/common/resources/operations.d.ts +7 -0
- package/dist/cjs/common/resources/operations.d.ts.map +1 -0
- package/dist/cjs/common/resources/operations.js +90 -0
- package/dist/cjs/common/resources/utils.d.ts +18 -0
- package/dist/cjs/common/resources/utils.d.ts.map +1 -0
- package/dist/cjs/common/resources/utils.js +96 -0
- package/dist/cjs/common/schema/aggregate.d.ts +6 -0
- package/dist/cjs/common/schema/aggregate.d.ts.map +1 -0
- package/dist/cjs/common/schema/aggregate.js +8 -0
- package/dist/cjs/common/schema/collection.d.ts +18 -0
- package/dist/cjs/common/schema/collection.d.ts.map +1 -0
- package/dist/cjs/common/schema/collection.js +10 -0
- package/dist/cjs/common/schema/dates.d.ts +39 -0
- package/dist/cjs/common/schema/dates.d.ts.map +1 -0
- package/dist/cjs/common/schema/dates.js +34 -0
- package/dist/cjs/common/schema/dates.test.d.ts +2 -0
- package/dist/cjs/common/schema/dates.test.d.ts.map +1 -0
- package/dist/cjs/common/schema/dates.test.js +33 -0
- package/dist/cjs/common/schema/jwt.d.ts +21 -0
- package/dist/cjs/common/schema/jwt.d.ts.map +1 -0
- package/dist/cjs/common/schema/jwt.js +24 -0
- package/dist/cjs/common/schema/metadata.d.ts +47 -0
- package/dist/cjs/common/schema/metadata.d.ts.map +1 -0
- package/dist/cjs/common/schema/metadata.js +88 -0
- package/dist/cjs/common/schema/metadata.test.d.ts +2 -0
- package/dist/cjs/common/schema/metadata.test.d.ts.map +1 -0
- package/dist/cjs/common/schema/metadata.test.js +62 -0
- package/dist/cjs/common/schema/pagination.d.ts +6 -0
- package/dist/cjs/common/schema/pagination.d.ts.map +1 -0
- package/dist/cjs/common/schema/pagination.js +8 -0
- package/dist/cjs/common/schema/schema.d.ts +8 -0
- package/dist/cjs/common/schema/schema.d.ts.map +1 -0
- package/dist/cjs/common/schema/schema.js +23 -0
- package/dist/cjs/common/schema/sets.d.ts +3 -0
- package/dist/cjs/common/schema/sets.d.ts.map +1 -0
- package/dist/cjs/common/schema/sets.js +9 -0
- package/dist/cjs/customer/index.d.ts +4 -0
- package/dist/cjs/customer/index.d.ts.map +1 -0
- package/dist/cjs/customer/index.js +19 -0
- package/dist/cjs/customer/schema/organization.d.ts +54 -0
- package/dist/cjs/customer/schema/organization.d.ts.map +1 -0
- package/dist/cjs/customer/schema/organization.js +40 -0
- package/dist/cjs/customer/schema/schema.d.ts +4 -0
- package/dist/cjs/customer/schema/schema.d.ts.map +1 -0
- package/dist/cjs/customer/schema/schema.js +19 -0
- package/dist/cjs/customer/schema/utils.d.ts +11 -0
- package/dist/cjs/customer/schema/utils.d.ts.map +1 -0
- package/dist/cjs/customer/schema/utils.js +23 -0
- package/dist/cjs/customer/users/resources.d.ts +20 -0
- package/dist/cjs/customer/users/resources.d.ts.map +1 -0
- package/dist/cjs/customer/users/resources.js +57 -0
- package/dist/cjs/customer/users/schema.d.ts +151 -0
- package/dist/cjs/customer/users/schema.d.ts.map +1 -0
- package/dist/cjs/customer/users/schema.js +91 -0
- package/dist/cjs/customer/users/schema.test.d.ts +2 -0
- package/dist/cjs/customer/users/schema.test.d.ts.map +1 -0
- package/dist/cjs/customer/users/schema.test.js +57 -0
- package/dist/cjs/identity/index.d.ts +2 -0
- package/dist/cjs/identity/index.d.ts.map +1 -0
- package/dist/cjs/identity/index.js +17 -0
- package/dist/cjs/identity/schema/schema.d.ts +7 -0
- package/dist/cjs/identity/schema/schema.d.ts.map +1 -0
- package/dist/cjs/identity/schema/schema.js +9 -0
- package/dist/cjs/oauth/authorize/index.d.ts +2 -0
- package/dist/cjs/oauth/authorize/index.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/index.js +17 -0
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.d.ts +29 -0
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.js +34 -0
- package/dist/cjs/oauth/authorize/schema/grants/implicit.d.ts +11 -0
- package/dist/cjs/oauth/authorize/schema/grants/implicit.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/schema/grants/implicit.js +21 -0
- package/dist/cjs/oauth/authorize/schema/schema.d.ts +42 -0
- package/dist/cjs/oauth/authorize/schema/schema.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/schema/schema.js +25 -0
- package/dist/cjs/oauth/common/schema.d.ts +62 -0
- package/dist/cjs/oauth/common/schema.d.ts.map +1 -0
- package/dist/cjs/oauth/common/schema.js +54 -0
- package/dist/cjs/oauth/index.d.ts +4 -0
- package/dist/cjs/oauth/index.d.ts.map +1 -0
- package/dist/cjs/oauth/index.js +49 -0
- package/dist/cjs/oauth/token/index.d.ts +2 -0
- package/dist/cjs/oauth/token/index.d.ts.map +1 -0
- package/dist/cjs/oauth/token/index.js +17 -0
- package/dist/cjs/oauth/token/schema/grants/authorization-code.d.ts +10 -0
- package/dist/cjs/oauth/token/schema/grants/authorization-code.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/grants/authorization-code.js +20 -0
- package/dist/cjs/oauth/token/schema/grants/client-credentials.d.ts +21 -0
- package/dist/cjs/oauth/token/schema/grants/client-credentials.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/grants/client-credentials.js +25 -0
- package/dist/cjs/oauth/token/schema/grants/refresh-token.d.ts +9 -0
- package/dist/cjs/oauth/token/schema/grants/refresh-token.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/grants/refresh-token.js +17 -0
- package/dist/cjs/oauth/token/schema/schema.d.ts +28 -0
- package/dist/cjs/oauth/token/schema/schema.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/schema.js +27 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/workspace/index.d.ts +2 -0
- package/dist/cjs/workspace/index.d.ts.map +1 -0
- package/dist/cjs/workspace/index.js +17 -0
- package/dist/cjs/workspace/schema/authorization.d.ts +31 -0
- package/dist/cjs/workspace/schema/authorization.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/authorization.js +22 -0
- package/dist/cjs/workspace/schema/branding.d.ts +38 -0
- package/dist/cjs/workspace/schema/branding.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/branding.js +25 -0
- package/dist/cjs/workspace/schema/membership.d.ts +25 -0
- package/dist/cjs/workspace/schema/membership.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/membership.js +19 -0
- package/dist/cjs/workspace/schema/registration.d.ts +28 -0
- package/dist/cjs/workspace/schema/registration.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/registration.js +22 -0
- package/dist/cjs/workspace/schema/schema.d.ts +10 -0
- package/dist/cjs/workspace/schema/schema.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/schema.js +25 -0
- package/dist/cjs/workspace/schema/settings.d.ts +23 -0
- package/dist/cjs/workspace/schema/settings.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/settings.js +15 -0
- package/dist/cjs/workspace/schema/tenant.d.ts +57 -0
- package/dist/cjs/workspace/schema/tenant.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/tenant.js +26 -0
- package/dist/cjs/workspace/schema/user-notification.d.ts +62 -0
- package/dist/cjs/workspace/schema/user-notification.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/user-notification.js +44 -0
- package/dist/cjs/workspace/schema/user-preferences.d.ts +26 -0
- package/dist/cjs/workspace/schema/user-preferences.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/user-preferences.js +19 -0
- package/dist/cjs/workspace/schema/utils.d.ts +15 -0
- package/dist/cjs/workspace/schema/utils.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/utils.js +64 -0
- package/dist/esm/action/index.d.ts +2 -0
- package/dist/esm/action/index.d.ts.map +1 -0
- package/dist/esm/action/index.js +1 -0
- package/dist/esm/action/schema/base.d.ts +21 -0
- package/dist/esm/action/schema/base.d.ts.map +1 -0
- package/dist/esm/action/schema/base.js +16 -0
- package/dist/esm/action/schema/operations/set-password.d.ts +31 -0
- package/dist/esm/action/schema/operations/set-password.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/set-password.js +15 -0
- package/dist/esm/action/schema/operations/sign-up-verification.d.ts +22 -0
- package/dist/esm/action/schema/operations/sign-up-verification.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/sign-up-verification.js +12 -0
- package/dist/esm/action/schema/operations/sign-up.d.ts +44 -0
- package/dist/esm/action/schema/operations/sign-up.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/sign-up.js +18 -0
- package/dist/esm/action/schema/operations/user-attribute-verification.d.ts +20 -0
- package/dist/esm/action/schema/operations/user-attribute-verification.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/user-attribute-verification.js +10 -0
- package/dist/esm/action/schema/schema.d.ts +92 -0
- package/dist/esm/action/schema/schema.d.ts.map +1 -0
- package/dist/esm/action/schema/schema.js +21 -0
- package/dist/esm/activity/index.d.ts +2 -0
- package/dist/esm/activity/index.d.ts.map +1 -0
- package/dist/esm/activity/index.js +1 -0
- package/dist/esm/activity/schema/base.d.ts +54 -0
- package/dist/esm/activity/schema/base.d.ts.map +1 -0
- package/dist/esm/activity/schema/base.js +31 -0
- package/dist/esm/activity/schema/schema.d.ts +156 -0
- package/dist/esm/activity/schema/schema.d.ts.map +1 -0
- package/dist/esm/activity/schema/schema.js +33 -0
- package/dist/esm/activity/schema/types/authentication.d.ts +29 -0
- package/dist/esm/activity/schema/types/authentication.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/authentication.js +13 -0
- package/dist/esm/activity/schema/types/authorization.d.ts +29 -0
- package/dist/esm/activity/schema/types/authorization.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/authorization.js +14 -0
- package/dist/esm/activity/schema/types/note.d.ts +51 -0
- package/dist/esm/activity/schema/types/note.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/note.js +14 -0
- package/dist/esm/activity/schema/types/operation.d.ts +31 -0
- package/dist/esm/activity/schema/types/operation.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/operation.js +15 -0
- package/dist/esm/activity/schema/types/unknown.d.ts +22 -0
- package/dist/esm/activity/schema/types/unknown.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/unknown.js +6 -0
- package/dist/esm/activity/schema/utils.d.ts +7 -0
- package/dist/esm/activity/schema/utils.d.ts.map +1 -0
- package/dist/esm/activity/schema/utils.js +9 -0
- package/dist/esm/app/index.d.ts +2 -0
- package/dist/esm/app/index.d.ts.map +1 -0
- package/dist/esm/app/index.js +1 -0
- package/dist/esm/app/schema/app.d.ts +58 -0
- package/dist/esm/app/schema/app.d.ts.map +1 -0
- package/dist/esm/app/schema/app.js +40 -0
- package/dist/esm/app/schema/authorization.d.ts +37 -0
- package/dist/esm/app/schema/authorization.d.ts.map +1 -0
- package/dist/esm/app/schema/authorization.js +41 -0
- package/dist/esm/app/schema/oauth.d.ts +30 -0
- package/dist/esm/app/schema/oauth.d.ts.map +1 -0
- package/dist/esm/app/schema/oauth.js +18 -0
- package/dist/esm/app/schema/oidc.d.ts +28 -0
- package/dist/esm/app/schema/oidc.d.ts.map +1 -0
- package/dist/esm/app/schema/oidc.js +10 -0
- package/dist/esm/app/schema/registration.d.ts +22 -0
- package/dist/esm/app/schema/registration.d.ts.map +1 -0
- package/dist/esm/app/schema/registration.js +13 -0
- package/dist/esm/app/schema/saml.d.ts +28 -0
- package/dist/esm/app/schema/saml.d.ts.map +1 -0
- package/dist/esm/app/schema/saml.js +10 -0
- package/dist/esm/app/schema/schema.d.ts +8 -0
- package/dist/esm/app/schema/schema.d.ts.map +1 -0
- package/dist/esm/app/schema/schema.js +7 -0
- package/dist/esm/app/schema/utils.d.ts +11 -0
- package/dist/esm/app/schema/utils.d.ts.map +1 -0
- package/dist/esm/app/schema/utils.js +15 -0
- package/dist/esm/association/index.d.ts +2 -0
- package/dist/esm/association/index.d.ts.map +1 -0
- package/dist/esm/association/index.js +1 -0
- package/dist/esm/association/schema/association.d.ts +82 -0
- package/dist/esm/association/schema/association.d.ts.map +1 -0
- package/dist/esm/association/schema/association.js +23 -0
- package/dist/esm/association/schema/schema.d.ts +2 -0
- package/dist/esm/association/schema/schema.d.ts.map +1 -0
- package/dist/esm/association/schema/schema.js +1 -0
- package/dist/esm/authentication/index.d.ts +2 -0
- package/dist/esm/authentication/index.d.ts.map +1 -0
- package/dist/esm/authentication/index.js +1 -0
- package/dist/esm/authentication/schema/factors.d.ts +48 -0
- package/dist/esm/authentication/schema/factors.d.ts.map +1 -0
- package/dist/esm/authentication/schema/factors.js +25 -0
- package/dist/esm/authentication/schema/factors.test.d.ts +2 -0
- package/dist/esm/authentication/schema/factors.test.d.ts.map +1 -0
- package/dist/esm/authentication/schema/factors.test.js +121 -0
- package/dist/esm/authentication/schema/provider.d.ts +27 -0
- package/dist/esm/authentication/schema/provider.d.ts.map +1 -0
- package/dist/esm/authentication/schema/provider.js +21 -0
- package/dist/esm/authentication/schema/schema.d.ts +6 -0
- package/dist/esm/authentication/schema/schema.d.ts.map +1 -0
- package/dist/esm/authentication/schema/schema.js +5 -0
- package/dist/esm/authentication/schema/session.d.ts +59 -0
- package/dist/esm/authentication/schema/session.d.ts.map +1 -0
- package/dist/esm/authentication/schema/session.js +43 -0
- package/dist/esm/authentication/schema/settings.d.ts +46 -0
- package/dist/esm/authentication/schema/settings.d.ts.map +1 -0
- package/dist/esm/authentication/schema/settings.js +13 -0
- package/dist/esm/authentication/schema/strategy/base.d.ts +54 -0
- package/dist/esm/authentication/schema/strategy/base.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/base.js +36 -0
- package/dist/esm/authentication/schema/strategy/schema.d.ts +158 -0
- package/dist/esm/authentication/schema/strategy/schema.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/schema.js +13 -0
- package/dist/esm/authentication/schema/strategy/types/email.d.ts +44 -0
- package/dist/esm/authentication/schema/strategy/types/email.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/types/email.js +17 -0
- package/dist/esm/authentication/schema/strategy/types/password.d.ts +99 -0
- package/dist/esm/authentication/schema/strategy/types/password.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/types/password.js +32 -0
- package/dist/esm/authentication/schema/strategy/types/totp.d.ts +91 -0
- package/dist/esm/authentication/schema/strategy/types/totp.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/types/totp.js +45 -0
- package/dist/esm/authorization/index.d.ts +6 -0
- package/dist/esm/authorization/index.d.ts.map +1 -0
- package/dist/esm/authorization/index.js +5 -0
- package/dist/esm/authorization/permissions/resources.d.ts +20 -0
- package/dist/esm/authorization/permissions/resources.d.ts.map +1 -0
- package/dist/esm/authorization/permissions/resources.js +48 -0
- package/dist/esm/authorization/permissions/schema.d.ts +104 -0
- package/dist/esm/authorization/permissions/schema.d.ts.map +1 -0
- package/dist/esm/authorization/permissions/schema.js +63 -0
- package/dist/esm/authorization/roles/resources.d.ts +20 -0
- package/dist/esm/authorization/roles/resources.d.ts.map +1 -0
- package/dist/esm/authorization/roles/resources.js +48 -0
- package/dist/esm/authorization/roles/schema.d.ts +113 -0
- package/dist/esm/authorization/roles/schema.d.ts.map +1 -0
- package/dist/esm/authorization/roles/schema.js +69 -0
- package/dist/esm/authorization/utils.d.ts +11 -0
- package/dist/esm/authorization/utils.d.ts.map +1 -0
- package/dist/esm/authorization/utils.js +15 -0
- package/dist/esm/common/errors/http.d.ts +17 -0
- package/dist/esm/common/errors/http.d.ts.map +1 -0
- package/dist/esm/common/errors/http.js +14 -0
- package/dist/esm/common/errors/validation.d.ts +11 -0
- package/dist/esm/common/errors/validation.d.ts.map +1 -0
- package/dist/esm/common/errors/validation.js +8 -0
- package/dist/esm/common/index.d.ts +6 -0
- package/dist/esm/common/index.d.ts.map +1 -0
- package/dist/esm/common/index.js +5 -0
- package/dist/esm/common/resources/authorization.d.ts +2 -0
- package/dist/esm/common/resources/authorization.d.ts.map +1 -0
- package/dist/esm/common/resources/authorization.js +1 -0
- package/dist/esm/common/resources/init.d.ts +16 -0
- package/dist/esm/common/resources/init.d.ts.map +1 -0
- package/dist/esm/common/resources/init.js +34 -0
- package/dist/esm/common/resources/operations.d.ts +7 -0
- package/dist/esm/common/resources/operations.d.ts.map +1 -0
- package/dist/esm/common/resources/operations.js +83 -0
- package/dist/esm/common/resources/utils.d.ts +18 -0
- package/dist/esm/common/resources/utils.d.ts.map +1 -0
- package/dist/esm/common/resources/utils.js +86 -0
- package/dist/esm/common/schema/aggregate.d.ts +6 -0
- package/dist/esm/common/schema/aggregate.d.ts.map +1 -0
- package/dist/esm/common/schema/aggregate.js +5 -0
- package/dist/esm/common/schema/collection.d.ts +18 -0
- package/dist/esm/common/schema/collection.d.ts.map +1 -0
- package/dist/esm/common/schema/collection.js +7 -0
- package/dist/esm/common/schema/dates.d.ts +39 -0
- package/dist/esm/common/schema/dates.d.ts.map +1 -0
- package/dist/esm/common/schema/dates.js +31 -0
- package/dist/esm/common/schema/dates.test.d.ts +2 -0
- package/dist/esm/common/schema/dates.test.d.ts.map +1 -0
- package/dist/esm/common/schema/dates.test.js +31 -0
- package/dist/esm/common/schema/jwt.d.ts +21 -0
- package/dist/esm/common/schema/jwt.d.ts.map +1 -0
- package/dist/esm/common/schema/jwt.js +21 -0
- package/dist/esm/common/schema/metadata.d.ts +47 -0
- package/dist/esm/common/schema/metadata.d.ts.map +1 -0
- package/dist/esm/common/schema/metadata.js +83 -0
- package/dist/esm/common/schema/metadata.test.d.ts +2 -0
- package/dist/esm/common/schema/metadata.test.d.ts.map +1 -0
- package/dist/esm/common/schema/metadata.test.js +60 -0
- package/dist/esm/common/schema/pagination.d.ts +6 -0
- package/dist/esm/common/schema/pagination.d.ts.map +1 -0
- package/dist/esm/common/schema/pagination.js +5 -0
- package/dist/esm/common/schema/schema.d.ts +8 -0
- package/dist/esm/common/schema/schema.d.ts.map +1 -0
- package/dist/esm/common/schema/schema.js +7 -0
- package/dist/esm/common/schema/sets.d.ts +3 -0
- package/dist/esm/common/schema/sets.d.ts.map +1 -0
- package/dist/esm/common/schema/sets.js +6 -0
- package/dist/esm/customer/index.d.ts +4 -0
- package/dist/esm/customer/index.d.ts.map +1 -0
- package/dist/esm/customer/index.js +3 -0
- package/dist/esm/customer/schema/organization.d.ts +54 -0
- package/dist/esm/customer/schema/organization.d.ts.map +1 -0
- package/dist/esm/customer/schema/organization.js +37 -0
- package/dist/esm/customer/schema/schema.d.ts +4 -0
- package/dist/esm/customer/schema/schema.d.ts.map +1 -0
- package/dist/esm/customer/schema/schema.js +3 -0
- package/dist/esm/customer/schema/utils.d.ts +11 -0
- package/dist/esm/customer/schema/utils.d.ts.map +1 -0
- package/dist/esm/customer/schema/utils.js +15 -0
- package/dist/esm/customer/users/resources.d.ts +20 -0
- package/dist/esm/customer/users/resources.d.ts.map +1 -0
- package/dist/esm/customer/users/resources.js +48 -0
- package/dist/esm/customer/users/schema.d.ts +151 -0
- package/dist/esm/customer/users/schema.d.ts.map +1 -0
- package/dist/esm/customer/users/schema.js +88 -0
- package/dist/esm/customer/users/schema.test.d.ts +2 -0
- package/dist/esm/customer/users/schema.test.d.ts.map +1 -0
- package/dist/esm/customer/users/schema.test.js +55 -0
- package/dist/esm/identity/index.d.ts +2 -0
- package/dist/esm/identity/index.d.ts.map +1 -0
- package/dist/esm/identity/index.js +1 -0
- package/dist/esm/identity/schema/schema.d.ts +7 -0
- package/dist/esm/identity/schema/schema.d.ts.map +1 -0
- package/dist/esm/identity/schema/schema.js +6 -0
- package/dist/esm/oauth/authorize/index.d.ts +2 -0
- package/dist/esm/oauth/authorize/index.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/index.js +1 -0
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.d.ts +29 -0
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.js +31 -0
- package/dist/esm/oauth/authorize/schema/grants/implicit.d.ts +11 -0
- package/dist/esm/oauth/authorize/schema/grants/implicit.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/schema/grants/implicit.js +18 -0
- package/dist/esm/oauth/authorize/schema/schema.d.ts +42 -0
- package/dist/esm/oauth/authorize/schema/schema.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/schema/schema.js +8 -0
- package/dist/esm/oauth/common/schema.d.ts +62 -0
- package/dist/esm/oauth/common/schema.d.ts.map +1 -0
- package/dist/esm/oauth/common/schema.js +51 -0
- package/dist/esm/oauth/index.d.ts +4 -0
- package/dist/esm/oauth/index.d.ts.map +1 -0
- package/dist/esm/oauth/index.js +3 -0
- package/dist/esm/oauth/token/index.d.ts +2 -0
- package/dist/esm/oauth/token/index.d.ts.map +1 -0
- package/dist/esm/oauth/token/index.js +1 -0
- package/dist/esm/oauth/token/schema/grants/authorization-code.d.ts +10 -0
- package/dist/esm/oauth/token/schema/grants/authorization-code.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/grants/authorization-code.js +17 -0
- package/dist/esm/oauth/token/schema/grants/client-credentials.d.ts +21 -0
- package/dist/esm/oauth/token/schema/grants/client-credentials.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/grants/client-credentials.js +22 -0
- package/dist/esm/oauth/token/schema/grants/refresh-token.d.ts +9 -0
- package/dist/esm/oauth/token/schema/grants/refresh-token.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/grants/refresh-token.js +14 -0
- package/dist/esm/oauth/token/schema/schema.d.ts +28 -0
- package/dist/esm/oauth/token/schema/schema.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/schema.js +10 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/workspace/index.d.ts +2 -0
- package/dist/esm/workspace/index.d.ts.map +1 -0
- package/dist/esm/workspace/index.js +1 -0
- package/dist/esm/workspace/schema/authorization.d.ts +31 -0
- package/dist/esm/workspace/schema/authorization.d.ts.map +1 -0
- package/dist/esm/workspace/schema/authorization.js +19 -0
- package/dist/esm/workspace/schema/branding.d.ts +38 -0
- package/dist/esm/workspace/schema/branding.d.ts.map +1 -0
- package/dist/esm/workspace/schema/branding.js +22 -0
- package/dist/esm/workspace/schema/membership.d.ts +25 -0
- package/dist/esm/workspace/schema/membership.d.ts.map +1 -0
- package/dist/esm/workspace/schema/membership.js +16 -0
- package/dist/esm/workspace/schema/registration.d.ts +28 -0
- package/dist/esm/workspace/schema/registration.d.ts.map +1 -0
- package/dist/esm/workspace/schema/registration.js +19 -0
- package/dist/esm/workspace/schema/schema.d.ts +10 -0
- package/dist/esm/workspace/schema/schema.d.ts.map +1 -0
- package/dist/esm/workspace/schema/schema.js +9 -0
- package/dist/esm/workspace/schema/settings.d.ts +23 -0
- package/dist/esm/workspace/schema/settings.d.ts.map +1 -0
- package/dist/esm/workspace/schema/settings.js +12 -0
- package/dist/esm/workspace/schema/tenant.d.ts +57 -0
- package/dist/esm/workspace/schema/tenant.d.ts.map +1 -0
- package/dist/esm/workspace/schema/tenant.js +23 -0
- package/dist/esm/workspace/schema/user-notification.d.ts +62 -0
- package/dist/esm/workspace/schema/user-notification.d.ts.map +1 -0
- package/dist/esm/workspace/schema/user-notification.js +41 -0
- package/dist/esm/workspace/schema/user-preferences.d.ts +26 -0
- package/dist/esm/workspace/schema/user-preferences.d.ts.map +1 -0
- package/dist/esm/workspace/schema/user-preferences.js +16 -0
- package/dist/esm/workspace/schema/utils.d.ts +15 -0
- package/dist/esm/workspace/schema/utils.d.ts.map +1 -0
- package/dist/esm/workspace/schema/utils.js +22 -0
- package/package.json +50 -55
- package/release-please-config.json +13 -3
- package/tsconfig.esm.json +1 -1
- package/tsconfig.json +26 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { type } from 'arktype';
|
|
2
|
+
import { describe, expect, test } from 'vitest';
|
|
3
|
+
import { AuthenticationFactorPayloadSchema, AuthenticationFactorsPayloadSchema, UpsertAuthenticationFactorsPayloadSchema, } from './factors.js';
|
|
4
|
+
describe('Authentication - Factors', () => {
|
|
5
|
+
describe('Schema', () => {
|
|
6
|
+
test('should parse response payload successfully', async () => {
|
|
7
|
+
expect(AuthenticationFactorsPayloadSchema({
|
|
8
|
+
createdAt: new Date(),
|
|
9
|
+
updatedAt: new Date(),
|
|
10
|
+
factors: [
|
|
11
|
+
{
|
|
12
|
+
id: '123',
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
})).not.toBeInstanceOf(type.errors);
|
|
16
|
+
// Undefined factors
|
|
17
|
+
expect(AuthenticationFactorsPayloadSchema({
|
|
18
|
+
createdAt: new Date(),
|
|
19
|
+
updatedAt: new Date(),
|
|
20
|
+
factors: undefined,
|
|
21
|
+
})).not.toBeInstanceOf(type.errors);
|
|
22
|
+
});
|
|
23
|
+
test('should parse upsert payload successfully', async () => {
|
|
24
|
+
expect(UpsertAuthenticationFactorsPayloadSchema({
|
|
25
|
+
factors: [
|
|
26
|
+
{
|
|
27
|
+
id: '123',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
})).not.toBeInstanceOf(type.errors);
|
|
31
|
+
// Null factors
|
|
32
|
+
expect(UpsertAuthenticationFactorsPayloadSchema({
|
|
33
|
+
factors: null,
|
|
34
|
+
})).not.toBeInstanceOf(type.errors);
|
|
35
|
+
// Undefined factors
|
|
36
|
+
expect(UpsertAuthenticationFactorsPayloadSchema({
|
|
37
|
+
factors: undefined,
|
|
38
|
+
})).not.toBeInstanceOf(type.errors);
|
|
39
|
+
});
|
|
40
|
+
test('should throw error for invalid factors', async () => {
|
|
41
|
+
// Factor object
|
|
42
|
+
expect(AuthenticationFactorsPayloadSchema({
|
|
43
|
+
createdAt: new Date(),
|
|
44
|
+
updatedAt: new Date(),
|
|
45
|
+
factors: { id: '123' },
|
|
46
|
+
})).toBeInstanceOf(type.errors);
|
|
47
|
+
// Factor array of string
|
|
48
|
+
expect(AuthenticationFactorsPayloadSchema({
|
|
49
|
+
createdAt: new Date(),
|
|
50
|
+
updatedAt: new Date(),
|
|
51
|
+
factors: ['123'],
|
|
52
|
+
})).toBeInstanceOf(type.errors);
|
|
53
|
+
});
|
|
54
|
+
test('should accept various next factors types', async () => {
|
|
55
|
+
// Undefined
|
|
56
|
+
expect(AuthenticationFactorPayloadSchema({
|
|
57
|
+
id: '123',
|
|
58
|
+
nextFactors: undefined,
|
|
59
|
+
})).not.toBeInstanceOf(type.errors);
|
|
60
|
+
// Array
|
|
61
|
+
expect(AuthenticationFactorPayloadSchema({
|
|
62
|
+
id: '123',
|
|
63
|
+
nextFactors: [
|
|
64
|
+
{
|
|
65
|
+
id: '456',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
})).not.toBeInstanceOf(type.errors);
|
|
69
|
+
// Deeply nested array
|
|
70
|
+
expect(AuthenticationFactorPayloadSchema({
|
|
71
|
+
id: '123',
|
|
72
|
+
nextFactors: [
|
|
73
|
+
{
|
|
74
|
+
id: '456',
|
|
75
|
+
nextFactors: [
|
|
76
|
+
{
|
|
77
|
+
id: '456',
|
|
78
|
+
nextFactors: [
|
|
79
|
+
{
|
|
80
|
+
id: '456',
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
})).not.toBeInstanceOf(type.errors);
|
|
88
|
+
});
|
|
89
|
+
test('should throw error for invalid factor id', async () => {
|
|
90
|
+
// Number
|
|
91
|
+
expect(AuthenticationFactorsPayloadSchema({
|
|
92
|
+
id: 123,
|
|
93
|
+
})).toBeInstanceOf(type.errors);
|
|
94
|
+
// Null
|
|
95
|
+
expect(AuthenticationFactorsPayloadSchema({
|
|
96
|
+
id: null,
|
|
97
|
+
})).toBeInstanceOf(type.errors);
|
|
98
|
+
// Undefined
|
|
99
|
+
expect(AuthenticationFactorsPayloadSchema({
|
|
100
|
+
id: undefined,
|
|
101
|
+
})).toBeInstanceOf(type.errors);
|
|
102
|
+
});
|
|
103
|
+
test('should throw error for invalid next factors', async () => {
|
|
104
|
+
// String
|
|
105
|
+
expect(AuthenticationFactorsPayloadSchema({
|
|
106
|
+
id: '123',
|
|
107
|
+
nextFactors: '123',
|
|
108
|
+
})).toBeInstanceOf(type.errors);
|
|
109
|
+
// Object
|
|
110
|
+
expect(AuthenticationFactorsPayloadSchema({
|
|
111
|
+
id: '123',
|
|
112
|
+
nextFactors: { id: '123' },
|
|
113
|
+
})).toBeInstanceOf(type.errors);
|
|
114
|
+
// Array
|
|
115
|
+
expect(AuthenticationFactorsPayloadSchema({
|
|
116
|
+
id: '123',
|
|
117
|
+
nextFactors: ['123'],
|
|
118
|
+
})).toBeInstanceOf(type.errors);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const ProviderType: {
|
|
2
|
+
readonly MONDO: "mondo";
|
|
3
|
+
};
|
|
4
|
+
export type AnyProviderType = (typeof ProviderType)[keyof typeof ProviderType];
|
|
5
|
+
export declare const ProviderIdSchema: import("arktype/internal/methods/string.ts").StringType<string, {}>;
|
|
6
|
+
export type ProviderId = typeof ProviderIdSchema.inferOut;
|
|
7
|
+
export declare const ProviderIdPropertySchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
8
|
+
id: string;
|
|
9
|
+
}, {}>;
|
|
10
|
+
export type ProviderIdProperty = typeof ProviderIdPropertySchema.inferOut;
|
|
11
|
+
export declare const ProviderTypeSchema: import("arktype/internal/methods/string.ts").StringType<"mondo", {}>;
|
|
12
|
+
export declare const ProviderPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
13
|
+
id: string;
|
|
14
|
+
type: "mondo";
|
|
15
|
+
user: string;
|
|
16
|
+
strategy: string;
|
|
17
|
+
updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
18
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
19
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | 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
|
+
}, {}>;
|
|
26
|
+
export type ProviderPayload = typeof ProviderPayloadSchema.inferOut;
|
|
27
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/authentication/schema/provider.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,YAAY;;CAEf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE/E,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,kBAAkB,sEAAsC,CAAC;AAEtE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;MAOG,CAAC;AACtC,MAAM,MAAM,eAAe,GAAG,OAAO,qBAAqB,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type } from 'arktype';
|
|
2
|
+
import { OptionalDatePayloadSchema, RequiredDatePayloadSchema, } from '../../common/schema/dates.js';
|
|
3
|
+
import { MetadataPayloadPropertySchema } from '../../common/schema/metadata.js';
|
|
4
|
+
import { UserIdSchema } from '../../customer/users/schema.js';
|
|
5
|
+
import { StrategyIdSchema } from './strategy/base.js';
|
|
6
|
+
export const ProviderType = {
|
|
7
|
+
MONDO: 'mondo',
|
|
8
|
+
};
|
|
9
|
+
export const ProviderIdSchema = type.string;
|
|
10
|
+
export const ProviderIdPropertySchema = type({
|
|
11
|
+
id: ProviderIdSchema,
|
|
12
|
+
});
|
|
13
|
+
export const ProviderTypeSchema = type.enumerated(ProviderType.MONDO);
|
|
14
|
+
export const ProviderPayloadSchema = ProviderIdPropertySchema.and({
|
|
15
|
+
type: ProviderTypeSchema,
|
|
16
|
+
user: UserIdSchema,
|
|
17
|
+
strategy: StrategyIdSchema,
|
|
18
|
+
updatedAt: RequiredDatePayloadSchema,
|
|
19
|
+
'deletedAt?': OptionalDatePayloadSchema,
|
|
20
|
+
'deactivatedAt?': OptionalDatePayloadSchema,
|
|
21
|
+
}).and(MetadataPayloadPropertySchema);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/schema/schema.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export declare const SessionStatus: {
|
|
2
|
+
readonly INITIATED: "initiated";
|
|
3
|
+
readonly AUTHENTICATED: "authenticated";
|
|
4
|
+
readonly PENDING: "pending";
|
|
5
|
+
};
|
|
6
|
+
export type AnySessionStatus = (typeof SessionStatus)[keyof typeof SessionStatus];
|
|
7
|
+
export declare const SessionIdSchema: import("arktype/internal/methods/string.ts").StringType<string, {}>;
|
|
8
|
+
export type SessionId = typeof SessionIdSchema.inferOut;
|
|
9
|
+
export declare const SessionIdPropertySchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
10
|
+
id: string;
|
|
11
|
+
}, {}>;
|
|
12
|
+
export type SessionIdProperty = typeof SessionIdPropertySchema.inferOut;
|
|
13
|
+
export declare const SessionStatusSchema: import("arktype/internal/methods/string.ts").StringType<"initiated" | "authenticated" | "pending", {}>;
|
|
14
|
+
export declare const AuthenticationFactorSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
15
|
+
id: string;
|
|
16
|
+
type: "email" | "password" | "totp";
|
|
17
|
+
settings?: Record<string, unknown> | undefined;
|
|
18
|
+
state?: string | undefined;
|
|
19
|
+
}, {}>;
|
|
20
|
+
export type AuthenticationFactor = typeof AuthenticationFactorSchema.inferOut;
|
|
21
|
+
export declare const AuthenticationFactorHistorySchema: import("arktype/internal/methods/object.ts").ObjectType<(In: string[] | Set<string> | undefined) => import("arktype/internal/attributes.ts").Out<string[] | Set<string> | undefined>, {}>;
|
|
22
|
+
export type AuthenticationFactorHistory = typeof AuthenticationFactorHistorySchema.inferOut;
|
|
23
|
+
export declare const SessionPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
24
|
+
id: string;
|
|
25
|
+
status: "initiated" | "authenticated" | "pending";
|
|
26
|
+
expiresAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
27
|
+
createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
28
|
+
updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
29
|
+
user?: string | undefined;
|
|
30
|
+
userAgent?: string | undefined;
|
|
31
|
+
sourceIp?: string | undefined;
|
|
32
|
+
factors?: {
|
|
33
|
+
id: string;
|
|
34
|
+
type: "email" | "password" | "totp";
|
|
35
|
+
settings?: Record<string, unknown> | undefined;
|
|
36
|
+
state?: string | undefined;
|
|
37
|
+
}[] | undefined;
|
|
38
|
+
factorHistory?: ((In: string[] | Set<string> | undefined) => import("arktype/internal/attributes.ts").Out<string[] | Set<string> | undefined>) | undefined;
|
|
39
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
40
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
41
|
+
metadata?: ((In: {
|
|
42
|
+
[x: string]: string | number | boolean;
|
|
43
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
44
|
+
[x: string]: string | number | boolean;
|
|
45
|
+
} | undefined>) | undefined;
|
|
46
|
+
}, {}>;
|
|
47
|
+
export type SessionPayload = typeof SessionPayloadSchema.inferOut;
|
|
48
|
+
export declare const SessionAssociationReferenceSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
49
|
+
id: string;
|
|
50
|
+
status: "initiated" | "authenticated" | "pending";
|
|
51
|
+
expiresAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
52
|
+
createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
53
|
+
user?: string | undefined;
|
|
54
|
+
userAgent?: string | undefined;
|
|
55
|
+
sourceIp?: string | undefined;
|
|
56
|
+
model: "Session";
|
|
57
|
+
}, {}>;
|
|
58
|
+
export type SessionAssociationReference = typeof SessionAssociationReferenceSchema.inferOut;
|
|
59
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/authentication/schema/session.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAErD,eAAO,MAAM,eAAe,qEAAc,CAAC;AAC3C,MAAM,MAAM,SAAS,GAAG,OAAO,eAAe,CAAC,QAAQ,CAAC;AAExD,eAAO,MAAM,uBAAuB;;MAElC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,uBAAuB,CAAC,QAAQ,CAAC;AAExE,eAAO,MAAM,mBAAmB,wGAI/B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;MAKrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,0BAA0B,CAAC,QAAQ,CAAC;AAM9E,eAAO,MAAM,iCAAiC,2LAK3C,CAAC;AACJ,MAAM,MAAM,2BAA2B,GACrC,OAAO,iCAAiC,CAAC,QAAQ,CAAC;AAEpD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;MAYI,CAAC;AACtC,MAAM,MAAM,cAAc,GAAG,OAAO,oBAAoB,CAAC,QAAQ,CAAC;AAElE,eAAO,MAAM,iCAAiC;;;;;;;;;MAU5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GACrC,OAAO,iCAAiC,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type } from 'arktype';
|
|
2
|
+
import { OptionalDatePayloadSchema, RequiredDatePayloadSchema, } from '../../common/schema/dates.js';
|
|
3
|
+
import { MetadataPayloadPropertySchema } from '../../common/schema/metadata.js';
|
|
4
|
+
import { UserIdSchema } from '../../customer/users/schema.js';
|
|
5
|
+
import { StrategyIdSchema, StrategyTypeSchema } from './strategy/base.js';
|
|
6
|
+
export const SessionStatus = {
|
|
7
|
+
INITIATED: 'initiated', // Session was created, but no activity has been taken
|
|
8
|
+
AUTHENTICATED: 'authenticated', // Session is authenticated
|
|
9
|
+
PENDING: 'pending', // Session is in the process of authenticating
|
|
10
|
+
};
|
|
11
|
+
export const SessionIdSchema = type.string;
|
|
12
|
+
export const SessionIdPropertySchema = type({
|
|
13
|
+
id: SessionIdSchema,
|
|
14
|
+
});
|
|
15
|
+
export const SessionStatusSchema = type.enumerated(SessionStatus.INITIATED, SessionStatus.AUTHENTICATED, SessionStatus.PENDING);
|
|
16
|
+
export const AuthenticationFactorSchema = type({
|
|
17
|
+
id: StrategyIdSchema,
|
|
18
|
+
type: StrategyTypeSchema,
|
|
19
|
+
settings: type('Record<string, unknown> | undefined').optional(),
|
|
20
|
+
state: type('string | undefined').optional(),
|
|
21
|
+
});
|
|
22
|
+
const AuthenticationFactorHistoryArraySchema = StrategyIdSchema.array();
|
|
23
|
+
const AuthenticationFactorHistorySetSchema = type.instanceOf((Set));
|
|
24
|
+
export const AuthenticationFactorHistorySchema = type('undefined')
|
|
25
|
+
.or(AuthenticationFactorHistoryArraySchema)
|
|
26
|
+
.or(AuthenticationFactorHistorySetSchema)
|
|
27
|
+
.pipe((s) => (s instanceof Set ? Array.from(s) : s)?.length ? s : undefined);
|
|
28
|
+
export const SessionPayloadSchema = SessionIdPropertySchema.and({
|
|
29
|
+
status: SessionStatusSchema,
|
|
30
|
+
user: UserIdSchema.or('undefined').optional(),
|
|
31
|
+
userAgent: type('string | undefined').optional(),
|
|
32
|
+
sourceIp: type('string.ip.v4 | string.ip.v6 | undefined').optional(),
|
|
33
|
+
factors: AuthenticationFactorSchema.array().or('undefined').optional(),
|
|
34
|
+
factorHistory: AuthenticationFactorHistorySchema.optional(),
|
|
35
|
+
expiresAt: RequiredDatePayloadSchema,
|
|
36
|
+
createdAt: RequiredDatePayloadSchema,
|
|
37
|
+
updatedAt: RequiredDatePayloadSchema,
|
|
38
|
+
'deletedAt?': OptionalDatePayloadSchema,
|
|
39
|
+
'deactivatedAt?': OptionalDatePayloadSchema,
|
|
40
|
+
}).and(MetadataPayloadPropertySchema);
|
|
41
|
+
export const SessionAssociationReferenceSchema = SessionPayloadSchema.pick('id', 'status', 'user', 'userAgent', 'sourceIp', 'createdAt', 'expiresAt').and({
|
|
42
|
+
model: "'Session'",
|
|
43
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const SettingsPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
2
|
+
factors?: ((In: {
|
|
3
|
+
id: string;
|
|
4
|
+
nextFactors?: {
|
|
5
|
+
id: string;
|
|
6
|
+
nextFactors?: /*elided*/ any[] | null | undefined;
|
|
7
|
+
}[] | null | undefined;
|
|
8
|
+
}[] | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
9
|
+
id: string;
|
|
10
|
+
nextFactors?: {
|
|
11
|
+
id: string;
|
|
12
|
+
nextFactors?: /*elided*/ any[] | null | undefined;
|
|
13
|
+
}[] | null | undefined;
|
|
14
|
+
}[] | undefined>) | undefined;
|
|
15
|
+
updatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
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 type SettingsPayload = typeof SettingsPayloadSchema.inferOut;
|
|
25
|
+
export declare const UpsertSettingsPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
26
|
+
factors?: ((In: {
|
|
27
|
+
id: string;
|
|
28
|
+
nextFactors?: {
|
|
29
|
+
id: string;
|
|
30
|
+
nextFactors?: /*elided*/ any[] | null | undefined;
|
|
31
|
+
}[] | null | undefined;
|
|
32
|
+
}[] | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
33
|
+
id: string;
|
|
34
|
+
nextFactors?: {
|
|
35
|
+
id: string;
|
|
36
|
+
nextFactors?: /*elided*/ any[] | null | undefined;
|
|
37
|
+
}[] | null | undefined;
|
|
38
|
+
}[] | undefined>) | undefined;
|
|
39
|
+
metadata?: ((In: {
|
|
40
|
+
[x: string]: string | number | boolean;
|
|
41
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
42
|
+
[x: string]: string | number | boolean;
|
|
43
|
+
} | null>) | undefined;
|
|
44
|
+
}, {}>;
|
|
45
|
+
export type UpsertSettingsPayload = typeof UpsertSettingsPayloadSchema.inferOut;
|
|
46
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/authentication/schema/settings.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;MAMG,CAAC;AACtC,MAAM,MAAM,eAAe,GAAG,OAAO,qBAAqB,CAAC,QAAQ,CAAC;AAEpE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;MAEG,CAAC;AAC5C,MAAM,MAAM,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type } from 'arktype';
|
|
2
|
+
import { OptionalDatePayloadSchema } from '../../common/schema/dates.js';
|
|
3
|
+
import { MetadataPayloadPropertySchema, UpsertMetadataPayloadPropertySchema, } from '../../common/schema/metadata.js';
|
|
4
|
+
import { AuthenticationFactorsSchema } from './factors.js';
|
|
5
|
+
export const SettingsPayloadSchema = type({
|
|
6
|
+
factors: AuthenticationFactorsSchema.optional(),
|
|
7
|
+
'updatedAt?': OptionalDatePayloadSchema,
|
|
8
|
+
'deletedAt?': OptionalDatePayloadSchema,
|
|
9
|
+
'deactivatedAt?': OptionalDatePayloadSchema,
|
|
10
|
+
}).and(MetadataPayloadPropertySchema);
|
|
11
|
+
export const UpsertSettingsPayloadSchema = type({
|
|
12
|
+
factors: AuthenticationFactorsSchema.optional(),
|
|
13
|
+
}).and(UpsertMetadataPayloadPropertySchema);
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
export declare const StrategyIdSchema: import("arktype/internal/methods/string.ts").StringType<string, {}>;
|
|
13
|
+
export type StrategyId = typeof StrategyIdSchema.inferOut;
|
|
14
|
+
export declare const StrategyIdPropertySchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
15
|
+
id: string;
|
|
16
|
+
}, {}>;
|
|
17
|
+
export type StrategyIdProperty = typeof StrategyIdPropertySchema.inferOut;
|
|
18
|
+
export declare const StrategyStatusSchema: import("arktype/internal/methods/string.ts").StringType<"enabled" | "disabled", {}>;
|
|
19
|
+
export declare const StrategyTypeSchema: import("arktype/internal/methods/string.ts").StringType<"email" | "password" | "totp", {}>;
|
|
20
|
+
export declare const StrategyLabelSchema: import("arktype/internal/methods/string.ts").StringType<string, {}>;
|
|
21
|
+
export declare const BaseStrategyPayloadSchema: 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
|
+
}, {}>;
|
|
35
|
+
export declare const BaseInsertStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
36
|
+
label: string;
|
|
37
|
+
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
38
|
+
id?: string | undefined;
|
|
39
|
+
metadata?: ((In: {
|
|
40
|
+
[x: string]: string | number | boolean;
|
|
41
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
42
|
+
[x: string]: string | number | boolean;
|
|
43
|
+
} | undefined>) | undefined;
|
|
44
|
+
}, {}>;
|
|
45
|
+
export declare const BaseUpdateStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
46
|
+
label?: string | undefined;
|
|
47
|
+
status?: "enabled" | "disabled" | undefined;
|
|
48
|
+
metadata?: ((In: {
|
|
49
|
+
[x: string]: string | number | boolean;
|
|
50
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
51
|
+
[x: string]: string | number | boolean;
|
|
52
|
+
} | undefined>) | undefined;
|
|
53
|
+
}, {}>;
|
|
54
|
+
//# 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":"AAOA,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,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,36 @@
|
|
|
1
|
+
import { type } from 'arktype';
|
|
2
|
+
import { OptionalDatePayloadSchema, RequiredDatePayloadSchema, } from '../../../common/index.js';
|
|
3
|
+
import { MetadataPayloadPropertySchema } from '../../../common/schema/metadata.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
|
+
export const StrategyIdSchema = type.string;
|
|
14
|
+
export const StrategyIdPropertySchema = type({
|
|
15
|
+
id: StrategyIdSchema,
|
|
16
|
+
});
|
|
17
|
+
export const StrategyStatusSchema = type.enumerated(StrategyStatus.ENABLED, StrategyStatus.DISABLED);
|
|
18
|
+
export const StrategyTypeSchema = type.enumerated(StrategyType.EMAIL, StrategyType.PASSWORD, StrategyType.TOTP);
|
|
19
|
+
export const StrategyLabelSchema = type('string');
|
|
20
|
+
export const BaseStrategyPayloadSchema = StrategyIdPropertySchema.and({
|
|
21
|
+
status: StrategyStatusSchema,
|
|
22
|
+
label: StrategyLabelSchema,
|
|
23
|
+
createdAt: RequiredDatePayloadSchema,
|
|
24
|
+
updatedAt: RequiredDatePayloadSchema,
|
|
25
|
+
'deletedAt?': OptionalDatePayloadSchema,
|
|
26
|
+
'deactivatedAt?': OptionalDatePayloadSchema,
|
|
27
|
+
}).and(MetadataPayloadPropertySchema);
|
|
28
|
+
export const BaseInsertStrategyPayloadSchema = type({
|
|
29
|
+
id: StrategyIdSchema.optional(),
|
|
30
|
+
label: StrategyLabelSchema,
|
|
31
|
+
status: StrategyStatusSchema.default(StrategyStatus.ENABLED),
|
|
32
|
+
}).and(MetadataPayloadPropertySchema);
|
|
33
|
+
export const BaseUpdateStrategyPayloadSchema = type({
|
|
34
|
+
label: StrategyLabelSchema.optional(),
|
|
35
|
+
status: StrategyStatusSchema.optional(),
|
|
36
|
+
}).and(MetadataPayloadPropertySchema);
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Union(s)
|
|
3
|
+
*/
|
|
4
|
+
export declare const InsertStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
5
|
+
label: string;
|
|
6
|
+
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
7
|
+
id?: string | undefined;
|
|
8
|
+
metadata?: ((In: {
|
|
9
|
+
[x: string]: string | number | boolean;
|
|
10
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
11
|
+
[x: string]: string | number | boolean;
|
|
12
|
+
} | undefined>) | undefined;
|
|
13
|
+
type: "email";
|
|
14
|
+
} | {
|
|
15
|
+
label: string;
|
|
16
|
+
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
17
|
+
id?: string | 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
|
+
type: "password";
|
|
24
|
+
settings: {
|
|
25
|
+
passwordPolicy: {
|
|
26
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, 8>;
|
|
27
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, 36>;
|
|
28
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
29
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
30
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
31
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
} | {
|
|
35
|
+
label: string;
|
|
36
|
+
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
37
|
+
id?: string | 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 InsertStrategyPayload = typeof InsertStrategyPayloadSchema.inferOut;
|
|
51
|
+
export declare const UpdateStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
52
|
+
label?: string | undefined;
|
|
53
|
+
status?: "enabled" | "disabled" | undefined;
|
|
54
|
+
metadata?: ((In: {
|
|
55
|
+
[x: string]: string | number | boolean;
|
|
56
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
57
|
+
[x: string]: string | number | boolean;
|
|
58
|
+
} | undefined>) | undefined;
|
|
59
|
+
type: "email";
|
|
60
|
+
} | {
|
|
61
|
+
label?: string | undefined;
|
|
62
|
+
status?: "enabled" | "disabled" | undefined;
|
|
63
|
+
metadata?: ((In: {
|
|
64
|
+
[x: string]: string | number | boolean;
|
|
65
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
66
|
+
[x: string]: string | number | boolean;
|
|
67
|
+
} | undefined>) | undefined;
|
|
68
|
+
type: "password";
|
|
69
|
+
settings: {
|
|
70
|
+
passwordPolicy: {
|
|
71
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, 8>;
|
|
72
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, 36>;
|
|
73
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
74
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
75
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
76
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
} | {
|
|
80
|
+
label?: string | undefined;
|
|
81
|
+
status?: "enabled" | "disabled" | undefined;
|
|
82
|
+
metadata?: ((In: {
|
|
83
|
+
[x: string]: string | number | boolean;
|
|
84
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
85
|
+
[x: string]: string | number | boolean;
|
|
86
|
+
} | undefined>) | undefined;
|
|
87
|
+
type: "totp";
|
|
88
|
+
settings: {
|
|
89
|
+
digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
|
|
90
|
+
period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
|
|
91
|
+
algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
|
|
92
|
+
};
|
|
93
|
+
}, {}>;
|
|
94
|
+
export type UpdateStrategyPayload = typeof UpdateStrategyPayloadSchema.inferOut;
|
|
95
|
+
export declare const StrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
96
|
+
id: string;
|
|
97
|
+
status: "enabled" | "disabled";
|
|
98
|
+
label: string;
|
|
99
|
+
createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
100
|
+
updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
101
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
102
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
103
|
+
metadata?: ((In: {
|
|
104
|
+
[x: string]: string | number | boolean;
|
|
105
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
106
|
+
[x: string]: string | number | boolean;
|
|
107
|
+
} | undefined>) | undefined;
|
|
108
|
+
type: "email";
|
|
109
|
+
} | {
|
|
110
|
+
id: string;
|
|
111
|
+
status: "enabled" | "disabled";
|
|
112
|
+
label: string;
|
|
113
|
+
createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
114
|
+
updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
115
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
116
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
117
|
+
metadata?: ((In: {
|
|
118
|
+
[x: string]: string | number | boolean;
|
|
119
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
120
|
+
[x: string]: string | number | boolean;
|
|
121
|
+
} | undefined>) | undefined;
|
|
122
|
+
type: "password";
|
|
123
|
+
settings: {
|
|
124
|
+
passwordPolicy: {
|
|
125
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, 8>;
|
|
126
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, 36>;
|
|
127
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
128
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
129
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
130
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
} | {
|
|
134
|
+
id: string;
|
|
135
|
+
status: "enabled" | "disabled";
|
|
136
|
+
label: string;
|
|
137
|
+
createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
138
|
+
updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
|
|
139
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
140
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
|
|
141
|
+
metadata?: ((In: {
|
|
142
|
+
[x: string]: string | number | boolean;
|
|
143
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
|
|
144
|
+
[x: string]: string | number | boolean;
|
|
145
|
+
} | undefined>) | undefined;
|
|
146
|
+
type: "totp";
|
|
147
|
+
settings: {
|
|
148
|
+
digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
|
|
149
|
+
period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
|
|
150
|
+
algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
|
|
151
|
+
};
|
|
152
|
+
}, {}>;
|
|
153
|
+
export type StrategyPayload = typeof StrategyPayloadSchema.inferOut;
|
|
154
|
+
export { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseUpdateStrategyPayloadSchema, StrategyIdPropertySchema, StrategyIdSchema, StrategyLabelSchema, StrategyStatus, StrategyStatusSchema, StrategyType, type AnyStrategyStatus, type AnyStrategyType, type StrategyId, type StrategyIdProperty, } from './base.js';
|
|
155
|
+
export * from './types/email.js';
|
|
156
|
+
export * from './types/password.js';
|
|
157
|
+
export * from './types/totp.js';
|
|
158
|
+
//# 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;;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,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,eAAe,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,13 @@
|
|
|
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
|
+
/**
|
|
5
|
+
* Union(s)
|
|
6
|
+
*/
|
|
7
|
+
export const InsertStrategyPayloadSchema = InsertPasswordStrategyPayloadSchema.or(InsertEmailStrategyPayloadSchema).or(InsertTOTPStrategyPayloadSchema);
|
|
8
|
+
export const UpdateStrategyPayloadSchema = UpdatePasswordStrategyPayloadSchema.or(UpdateEmailStrategyPayloadSchema).or(UpdateTOTPStrategyPayloadSchema);
|
|
9
|
+
export const StrategyPayloadSchema = PasswordStrategyPayloadSchema.or(EmailStrategyPayloadSchema.or(TOTPStrategyPayloadSchema));
|
|
10
|
+
export { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseUpdateStrategyPayloadSchema, StrategyIdPropertySchema, StrategyIdSchema, StrategyLabelSchema, StrategyStatus, StrategyStatusSchema, StrategyType, } from './base.js';
|
|
11
|
+
export * from './types/email.js';
|
|
12
|
+
export * from './types/password.js';
|
|
13
|
+
export * from './types/totp.js';
|