@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,99 @@
|
|
|
1
|
+
export declare const PasswordPolicySchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
2
|
+
minimumLength: import("arktype/out/attributes.js").Default<number, 8>;
|
|
3
|
+
maximumLength: import("arktype/out/attributes.js").Default<number, 36>;
|
|
4
|
+
minimumCapital: import("arktype/out/attributes.js").Default<number, 1>;
|
|
5
|
+
minimumLower: import("arktype/out/attributes.js").Default<number, 1>;
|
|
6
|
+
minimumNumber: import("arktype/out/attributes.js").Default<number, 1>;
|
|
7
|
+
minimumSpecial: import("arktype/out/attributes.js").Default<number, 1>;
|
|
8
|
+
}, {}>;
|
|
9
|
+
export declare const PasswordStrategySettingsSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
10
|
+
settings: {
|
|
11
|
+
passwordPolicy: {
|
|
12
|
+
minimumLength: import("arktype/out/attributes.js").Default<number, 8>;
|
|
13
|
+
maximumLength: import("arktype/out/attributes.js").Default<number, 36>;
|
|
14
|
+
minimumCapital: import("arktype/out/attributes.js").Default<number, 1>;
|
|
15
|
+
minimumLower: import("arktype/out/attributes.js").Default<number, 1>;
|
|
16
|
+
minimumNumber: import("arktype/out/attributes.js").Default<number, 1>;
|
|
17
|
+
minimumSpecial: import("arktype/out/attributes.js").Default<number, 1>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}, {}>;
|
|
21
|
+
export declare const PasswordStrategyPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
22
|
+
id: string;
|
|
23
|
+
status: "enabled" | "disabled";
|
|
24
|
+
label: string;
|
|
25
|
+
createdAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
|
|
26
|
+
updatedAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
|
|
27
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
28
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
29
|
+
metadata?: ((In: {
|
|
30
|
+
[x: string]: string | number | boolean;
|
|
31
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
|
|
32
|
+
[x: string]: string | number | boolean;
|
|
33
|
+
} | undefined>) | undefined;
|
|
34
|
+
type: "password";
|
|
35
|
+
settings: {
|
|
36
|
+
passwordPolicy: {
|
|
37
|
+
minimumLength: import("arktype/out/attributes.js").Default<number, 8>;
|
|
38
|
+
maximumLength: import("arktype/out/attributes.js").Default<number, 36>;
|
|
39
|
+
minimumCapital: import("arktype/out/attributes.js").Default<number, 1>;
|
|
40
|
+
minimumLower: import("arktype/out/attributes.js").Default<number, 1>;
|
|
41
|
+
minimumNumber: import("arktype/out/attributes.js").Default<number, 1>;
|
|
42
|
+
minimumSpecial: import("arktype/out/attributes.js").Default<number, 1>;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
}, {}>;
|
|
46
|
+
export type PasswordStrategyPayload = typeof PasswordStrategyPayloadSchema.inferOut;
|
|
47
|
+
export declare const InsertPasswordStrategyPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
48
|
+
label: string;
|
|
49
|
+
status: import("arktype/out/attributes.js").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/out/attributes.js").Out<{
|
|
54
|
+
[x: string]: string | number | boolean;
|
|
55
|
+
} | undefined>) | undefined;
|
|
56
|
+
type: "password";
|
|
57
|
+
settings: {
|
|
58
|
+
passwordPolicy: {
|
|
59
|
+
minimumLength: import("arktype/out/attributes.js").Default<number, 8>;
|
|
60
|
+
maximumLength: import("arktype/out/attributes.js").Default<number, 36>;
|
|
61
|
+
minimumCapital: import("arktype/out/attributes.js").Default<number, 1>;
|
|
62
|
+
minimumLower: import("arktype/out/attributes.js").Default<number, 1>;
|
|
63
|
+
minimumNumber: import("arktype/out/attributes.js").Default<number, 1>;
|
|
64
|
+
minimumSpecial: import("arktype/out/attributes.js").Default<number, 1>;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
}, {}>;
|
|
68
|
+
export type InsertPasswordStrategyPayload = typeof InsertPasswordStrategyPayloadSchema.inferOut;
|
|
69
|
+
export declare const UpdatePasswordStrategyPayloadSchema: import("arktype/out/methods/object.js").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/out/attributes.js").Out<{
|
|
75
|
+
[x: string]: string | number | boolean;
|
|
76
|
+
} | undefined>) | undefined;
|
|
77
|
+
type: "password";
|
|
78
|
+
settings: {
|
|
79
|
+
passwordPolicy: {
|
|
80
|
+
minimumLength: import("arktype/out/attributes.js").Default<number, 8>;
|
|
81
|
+
maximumLength: import("arktype/out/attributes.js").Default<number, 36>;
|
|
82
|
+
minimumCapital: import("arktype/out/attributes.js").Default<number, 1>;
|
|
83
|
+
minimumLower: import("arktype/out/attributes.js").Default<number, 1>;
|
|
84
|
+
minimumNumber: import("arktype/out/attributes.js").Default<number, 1>;
|
|
85
|
+
minimumSpecial: import("arktype/out/attributes.js").Default<number, 1>;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
}, {}>;
|
|
89
|
+
export type UpdatePasswordStrategyPayload = typeof UpdatePasswordStrategyPayloadSchema.inferOut;
|
|
90
|
+
export declare const ForgotPasswordSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
91
|
+
identifier?: string | undefined;
|
|
92
|
+
identifierType?: "email" | "phoneNumber" | undefined;
|
|
93
|
+
}, {}>;
|
|
94
|
+
export declare const VerifyPasswordSchema: import("arktype/out/methods/object.js").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,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerifyPasswordSchema = exports.ForgotPasswordSchema = exports.UpdatePasswordStrategyPayloadSchema = exports.InsertPasswordStrategyPayloadSchema = exports.PasswordStrategyPayloadSchema = exports.PasswordStrategySettingsSchema = exports.PasswordPolicySchema = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
const schema_js_1 = require("../../../../identity/schema/schema.js");
|
|
6
|
+
const base_js_1 = require("../base.js");
|
|
7
|
+
const TypeSchema = (0, arktype_1.type)({
|
|
8
|
+
type: "'password'",
|
|
9
|
+
});
|
|
10
|
+
exports.PasswordPolicySchema = (0, arktype_1.type)({
|
|
11
|
+
minimumLength: arktype_1.type.number.default(8),
|
|
12
|
+
maximumLength: arktype_1.type.number.default(36),
|
|
13
|
+
minimumCapital: arktype_1.type.number.default(1),
|
|
14
|
+
minimumLower: arktype_1.type.number.default(1),
|
|
15
|
+
minimumNumber: arktype_1.type.number.default(1),
|
|
16
|
+
minimumSpecial: arktype_1.type.number.default(1),
|
|
17
|
+
});
|
|
18
|
+
const SettingsSchema = (0, arktype_1.type)({
|
|
19
|
+
passwordPolicy: exports.PasswordPolicySchema,
|
|
20
|
+
});
|
|
21
|
+
exports.PasswordStrategySettingsSchema = (0, arktype_1.type)({
|
|
22
|
+
settings: SettingsSchema,
|
|
23
|
+
});
|
|
24
|
+
exports.PasswordStrategyPayloadSchema = base_js_1.BaseStrategyPayloadSchema.and(TypeSchema).and(exports.PasswordStrategySettingsSchema);
|
|
25
|
+
exports.InsertPasswordStrategyPayloadSchema = base_js_1.BaseInsertStrategyPayloadSchema.and(TypeSchema).and(exports.PasswordStrategySettingsSchema);
|
|
26
|
+
exports.UpdatePasswordStrategyPayloadSchema = base_js_1.BaseUpdateStrategyPayloadSchema.and(TypeSchema).and(exports.PasswordStrategySettingsSchema);
|
|
27
|
+
exports.ForgotPasswordSchema = (0, arktype_1.type)({
|
|
28
|
+
identifier: (0, arktype_1.type)('string').optional(),
|
|
29
|
+
identifierType: schema_js_1.IdentityIdentifierSchema.optional(),
|
|
30
|
+
});
|
|
31
|
+
exports.VerifyPasswordSchema = (0, arktype_1.type)({
|
|
32
|
+
password: (0, arktype_1.type)('string'),
|
|
33
|
+
identifier: (0, arktype_1.type)('string').optional(),
|
|
34
|
+
identifierType: schema_js_1.IdentityIdentifierSchema.optional(),
|
|
35
|
+
});
|
|
@@ -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/out/methods/object.js").ObjectType<{
|
|
17
|
+
digits: import("arktype/out/attributes.js").Default<6 | 7 | 8, 6>;
|
|
18
|
+
period: import("arktype/out/attributes.js").Default<15 | 30 | 60, 30>;
|
|
19
|
+
algorithm: import("arktype/out/attributes.js").Default<string, string>;
|
|
20
|
+
}, {}>;
|
|
21
|
+
export type TOTPStrategySettings = typeof TOTPStrategySettingsSchema.inferOut;
|
|
22
|
+
export declare const TOTPStrategySettingsPropertySchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
23
|
+
settings: {
|
|
24
|
+
digits: import("arktype/out/attributes.js").Default<6 | 7 | 8, 6>;
|
|
25
|
+
period: import("arktype/out/attributes.js").Default<15 | 30 | 60, 30>;
|
|
26
|
+
algorithm: import("arktype/out/attributes.js").Default<string, string>;
|
|
27
|
+
};
|
|
28
|
+
}, {}>;
|
|
29
|
+
export type TOTPStrategySettingsProperty = typeof TOTPStrategySettingsPropertySchema.inferOut;
|
|
30
|
+
export declare const TOTPStrategyPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
31
|
+
id: string;
|
|
32
|
+
status: "enabled" | "disabled";
|
|
33
|
+
label: string;
|
|
34
|
+
createdAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
|
|
35
|
+
updatedAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
|
|
36
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
37
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
38
|
+
metadata?: ((In: {
|
|
39
|
+
[x: string]: string | number | boolean;
|
|
40
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
|
|
41
|
+
[x: string]: string | number | boolean;
|
|
42
|
+
} | undefined>) | undefined;
|
|
43
|
+
type: "totp";
|
|
44
|
+
settings: {
|
|
45
|
+
digits: import("arktype/out/attributes.js").Default<6 | 7 | 8, 6>;
|
|
46
|
+
period: import("arktype/out/attributes.js").Default<15 | 30 | 60, 30>;
|
|
47
|
+
algorithm: import("arktype/out/attributes.js").Default<string, string>;
|
|
48
|
+
};
|
|
49
|
+
}, {}>;
|
|
50
|
+
export type TOTPStrategyPayload = typeof TOTPStrategyPayloadSchema.inferOut;
|
|
51
|
+
export declare const InsertTOTPStrategyPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
52
|
+
label: string;
|
|
53
|
+
status: import("arktype/out/attributes.js").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/out/attributes.js").Out<{
|
|
58
|
+
[x: string]: string | number | boolean;
|
|
59
|
+
} | undefined>) | undefined;
|
|
60
|
+
type: "totp";
|
|
61
|
+
settings: {
|
|
62
|
+
digits: import("arktype/out/attributes.js").Default<6 | 7 | 8, 6>;
|
|
63
|
+
period: import("arktype/out/attributes.js").Default<15 | 30 | 60, 30>;
|
|
64
|
+
algorithm: import("arktype/out/attributes.js").Default<string, string>;
|
|
65
|
+
};
|
|
66
|
+
}, {}>;
|
|
67
|
+
export type InsertTOTPStrategyPayload = typeof InsertTOTPStrategyPayloadSchema.inferOut;
|
|
68
|
+
export declare const UpdateTOTPStrategyPayloadSchema: import("arktype/out/methods/object.js").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/out/attributes.js").Out<{
|
|
74
|
+
[x: string]: string | number | boolean;
|
|
75
|
+
} | undefined>) | undefined;
|
|
76
|
+
type: "totp";
|
|
77
|
+
settings: {
|
|
78
|
+
digits: import("arktype/out/attributes.js").Default<6 | 7 | 8, 6>;
|
|
79
|
+
period: import("arktype/out/attributes.js").Default<15 | 30 | 60, 30>;
|
|
80
|
+
algorithm: import("arktype/out/attributes.js").Default<string, string>;
|
|
81
|
+
};
|
|
82
|
+
}, {}>;
|
|
83
|
+
export type UpdateTOTPStrategyPayload = typeof UpdateTOTPStrategyPayloadSchema.inferOut;
|
|
84
|
+
export declare const RegisterTOTPSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
85
|
+
uri: string;
|
|
86
|
+
token: string;
|
|
87
|
+
}, {}>;
|
|
88
|
+
export declare const VerifyTOTPSchema: import("arktype/out/methods/object.js").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,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerifyTOTPSchema = exports.RegisterTOTPSchema = exports.UpdateTOTPStrategyPayloadSchema = exports.InsertTOTPStrategyPayloadSchema = exports.TOTPStrategyPayloadSchema = exports.TOTPStrategySettingsPropertySchema = exports.TOTPStrategySettingsSchema = exports.TOTPAlgorithm = exports.DEFAULT_PERIOD = exports.DEFAULT_DIGITS = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
const base_js_1 = require("../base.js");
|
|
6
|
+
exports.DEFAULT_DIGITS = 6;
|
|
7
|
+
exports.DEFAULT_PERIOD = 30;
|
|
8
|
+
const TypeSchema = (0, arktype_1.type)({
|
|
9
|
+
type: "'totp'",
|
|
10
|
+
});
|
|
11
|
+
exports.TOTPAlgorithm = {
|
|
12
|
+
DEFAULT: 'SHA256',
|
|
13
|
+
SHA1: 'SHA1',
|
|
14
|
+
SHA224: 'SHA224',
|
|
15
|
+
SHA256: 'SHA256',
|
|
16
|
+
SHA384: 'SHA384',
|
|
17
|
+
SHA512: 'SHA512',
|
|
18
|
+
'SHA3-224': 'SHA3-224',
|
|
19
|
+
'SHA3-256': 'SHA3-256',
|
|
20
|
+
'SHA3-384': 'SHA3-384',
|
|
21
|
+
'SHA3-512': 'SHA3-512',
|
|
22
|
+
};
|
|
23
|
+
exports.TOTPStrategySettingsSchema = (0, arktype_1.type)({
|
|
24
|
+
digits: arktype_1.type.enumerated(6, 7, 8).default(exports.DEFAULT_DIGITS),
|
|
25
|
+
period: arktype_1.type.enumerated(15, 30, 60).default(exports.DEFAULT_PERIOD),
|
|
26
|
+
algorithm: arktype_1.type
|
|
27
|
+
.enumerated(exports.TOTPAlgorithm.SHA1, exports.TOTPAlgorithm.SHA224, exports.TOTPAlgorithm.SHA256, exports.TOTPAlgorithm.SHA384, exports.TOTPAlgorithm.SHA512, exports.TOTPAlgorithm['SHA3-224'], exports.TOTPAlgorithm['SHA3-256'], exports.TOTPAlgorithm['SHA3-384'], exports.TOTPAlgorithm['SHA3-512'])
|
|
28
|
+
.default(exports.TOTPAlgorithm.DEFAULT),
|
|
29
|
+
});
|
|
30
|
+
exports.TOTPStrategySettingsPropertySchema = (0, arktype_1.type)({
|
|
31
|
+
settings: exports.TOTPStrategySettingsSchema,
|
|
32
|
+
});
|
|
33
|
+
exports.TOTPStrategyPayloadSchema = base_js_1.BaseStrategyPayloadSchema.and(TypeSchema).and(exports.TOTPStrategySettingsPropertySchema);
|
|
34
|
+
exports.InsertTOTPStrategyPayloadSchema = base_js_1.BaseInsertStrategyPayloadSchema.and(TypeSchema).and(exports.TOTPStrategySettingsPropertySchema);
|
|
35
|
+
exports.UpdateTOTPStrategyPayloadSchema = base_js_1.BaseUpdateStrategyPayloadSchema.and(TypeSchema).and(exports.TOTPStrategySettingsPropertySchema);
|
|
36
|
+
exports.RegisterTOTPSchema = (0, arktype_1.type)({
|
|
37
|
+
uri: (0, arktype_1.type)('string.url').configure({
|
|
38
|
+
message: 'An authenticator uri is required',
|
|
39
|
+
}),
|
|
40
|
+
token: (0, arktype_1.type)('string').configure({
|
|
41
|
+
message: 'An authenticator token is required',
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
exports.VerifyTOTPSchema = (0, arktype_1.type)({
|
|
45
|
+
token: (0, arktype_1.type)('string').configure({
|
|
46
|
+
message: 'An authenticator token is required',
|
|
47
|
+
}),
|
|
48
|
+
});
|
|
@@ -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,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./schema/schema.js"), exports);
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export declare const PermissionStatus: {
|
|
2
|
+
readonly ENABLED: "enabled";
|
|
3
|
+
readonly DISABLED: "disabled";
|
|
4
|
+
};
|
|
5
|
+
export type AnyPermissionStatus = (typeof PermissionStatus)[keyof typeof PermissionStatus];
|
|
6
|
+
export declare const PermissionIdPropertySchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
7
|
+
id: string;
|
|
8
|
+
}, {}>;
|
|
9
|
+
export type PermissionIdProperty = typeof PermissionIdPropertySchema.inferOut;
|
|
10
|
+
export declare const PermissionPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
status: "enabled" | "disabled";
|
|
14
|
+
createdAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
|
|
15
|
+
updatedAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
|
|
16
|
+
description?: string | undefined;
|
|
17
|
+
apps?: {
|
|
18
|
+
ids?: string[] | undefined;
|
|
19
|
+
count?: number[] | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
roles?: {
|
|
22
|
+
ids?: string[] | undefined;
|
|
23
|
+
count?: number[] | undefined;
|
|
24
|
+
} | undefined;
|
|
25
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
26
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
27
|
+
metadata?: ((In: {
|
|
28
|
+
[x: string]: string | number | boolean;
|
|
29
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
|
|
30
|
+
[x: string]: string | number | boolean;
|
|
31
|
+
} | undefined>) | undefined;
|
|
32
|
+
}, {}>;
|
|
33
|
+
export type PermissionPayload = typeof PermissionPayloadSchema.inferOut;
|
|
34
|
+
export declare const InsertPermissionPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
35
|
+
id: import("arktype/out/attributes.js").Default<string, string>;
|
|
36
|
+
name: string;
|
|
37
|
+
status: import("arktype/out/attributes.js").Default<"enabled" | "disabled", "enabled">;
|
|
38
|
+
description?: string | undefined;
|
|
39
|
+
metadata?: ((In: {
|
|
40
|
+
[x: string]: string | number | boolean;
|
|
41
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
|
|
42
|
+
[x: string]: string | number | boolean;
|
|
43
|
+
} | undefined>) | undefined;
|
|
44
|
+
}, {}>;
|
|
45
|
+
export type InsertPermissionPayload = typeof InsertPermissionPayloadSchema.inferOut;
|
|
46
|
+
export declare const UpdatePermissionPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
47
|
+
name?: string | undefined;
|
|
48
|
+
status?: "enabled" | "disabled" | undefined;
|
|
49
|
+
description?: string | undefined;
|
|
50
|
+
metadata?: ((In: {
|
|
51
|
+
[x: string]: string | number | boolean;
|
|
52
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
|
|
53
|
+
[x: string]: string | number | boolean;
|
|
54
|
+
} | undefined>) | undefined;
|
|
55
|
+
}, {}>;
|
|
56
|
+
export type UpdatePermissionPayload = typeof UpdatePermissionPayloadSchema.inferOut;
|
|
57
|
+
export declare const PermissionAssociationsSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
58
|
+
apps?: string[] | undefined;
|
|
59
|
+
roles?: string[] | undefined;
|
|
60
|
+
}, {}>;
|
|
61
|
+
export type PermissionAssociations = typeof PermissionAssociationsSchema.inferOut;
|
|
62
|
+
export declare const PermissionAssociationReferenceSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
63
|
+
id: string;
|
|
64
|
+
name: string;
|
|
65
|
+
status: "enabled" | "disabled";
|
|
66
|
+
model: "Permission";
|
|
67
|
+
}, {}>;
|
|
68
|
+
export type PermissionAssociationReference = typeof PermissionAssociationReferenceSchema.inferOut;
|
|
69
|
+
//# sourceMappingURL=permission.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission.d.ts","sourceRoot":"","sources":["../../../../src/authorization/schema/permission.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAI3D,eAAO,MAAM,0BAA0B;;MAErC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,0BAA0B,CAAC,QAAQ,CAAC;AAO9E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;MAYC,CAAC;AACtC,MAAM,MAAM,iBAAiB,GAAG,OAAO,uBAAuB,CAAC,QAAQ,CAAC;AAExE,eAAO,MAAM,6BAA6B;;;;;;;;;;MAKL,CAAC;AACtC,MAAM,MAAM,uBAAuB,GACjC,OAAO,6BAA6B,CAAC,QAAQ,CAAC;AAEhD,eAAO,MAAM,6BAA6B;;;;;;;;;MAIL,CAAC;AACtC,MAAM,MAAM,uBAAuB,GACjC,OAAO,6BAA6B,CAAC,QAAQ,CAAC;AAIhD,eAAO,MAAM,4BAA4B;;;MAIvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAChC,OAAO,4BAA4B,CAAC,QAAQ,CAAC;AAE/C,eAAO,MAAM,oCAAoC;;;;;MAG7C,CAAC;AACL,MAAM,MAAM,8BAA8B,GACxC,OAAO,oCAAoC,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PermissionAssociationReferenceSchema = exports.PermissionAssociationsSchema = exports.UpdatePermissionPayloadSchema = exports.InsertPermissionPayloadSchema = exports.PermissionPayloadSchema = exports.PermissionIdPropertySchema = exports.PermissionStatus = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
const index_js_1 = require("../../common/index.js");
|
|
6
|
+
const aggregate_js_1 = require("../../common/schema/aggregate.js");
|
|
7
|
+
const metadata_js_1 = require("../../common/schema/metadata.js");
|
|
8
|
+
const utils_js_1 = require("./utils.js");
|
|
9
|
+
exports.PermissionStatus = {
|
|
10
|
+
ENABLED: 'enabled',
|
|
11
|
+
DISABLED: 'disabled',
|
|
12
|
+
};
|
|
13
|
+
const PermissionIdSchema = arktype_1.type.string;
|
|
14
|
+
exports.PermissionIdPropertySchema = (0, arktype_1.type)({
|
|
15
|
+
id: PermissionIdSchema,
|
|
16
|
+
});
|
|
17
|
+
const StatusSchema = arktype_1.type.enumerated(exports.PermissionStatus.ENABLED, exports.PermissionStatus.DISABLED);
|
|
18
|
+
exports.PermissionPayloadSchema = exports.PermissionIdPropertySchema.and({
|
|
19
|
+
name: (0, arktype_1.type)('string'),
|
|
20
|
+
status: StatusSchema,
|
|
21
|
+
description: (0, arktype_1.type)('string').optional(),
|
|
22
|
+
apps: aggregate_js_1.AggregateSchema.optional(),
|
|
23
|
+
roles: aggregate_js_1.AggregateSchema.optional(),
|
|
24
|
+
createdAt: index_js_1.RequiredDatePayloadSchema,
|
|
25
|
+
updatedAt: index_js_1.RequiredDatePayloadSchema,
|
|
26
|
+
'deletedAt?': index_js_1.OptionalDatePayloadSchema,
|
|
27
|
+
'deactivatedAt?': index_js_1.OptionalDatePayloadSchema,
|
|
28
|
+
})
|
|
29
|
+
.and(exports.PermissionIdPropertySchema)
|
|
30
|
+
.and(metadata_js_1.MetadataPayloadPropertySchema);
|
|
31
|
+
exports.InsertPermissionPayloadSchema = (0, arktype_1.type)({
|
|
32
|
+
id: PermissionIdSchema.default(() => (0, utils_js_1.generatePermissionId)()),
|
|
33
|
+
name: (0, arktype_1.type)('string'),
|
|
34
|
+
status: StatusSchema.default(exports.PermissionStatus.ENABLED),
|
|
35
|
+
description: (0, arktype_1.type)('string').optional(),
|
|
36
|
+
}).and(metadata_js_1.MetadataPayloadPropertySchema);
|
|
37
|
+
exports.UpdatePermissionPayloadSchema = (0, arktype_1.type)({
|
|
38
|
+
name: (0, arktype_1.type)('string').optional(),
|
|
39
|
+
status: StatusSchema.optional(),
|
|
40
|
+
description: (0, arktype_1.type)('string').optional(),
|
|
41
|
+
}).and(metadata_js_1.MetadataPayloadPropertySchema);
|
|
42
|
+
const AssociationSchema = (0, arktype_1.type)('string[] | undefined');
|
|
43
|
+
exports.PermissionAssociationsSchema = (0, arktype_1.type)({
|
|
44
|
+
'+': 'delete',
|
|
45
|
+
apps: AssociationSchema.optional(),
|
|
46
|
+
roles: AssociationSchema.optional(),
|
|
47
|
+
});
|
|
48
|
+
exports.PermissionAssociationReferenceSchema = exports.PermissionPayloadSchema.pick('id', 'name', 'status').and({
|
|
49
|
+
model: "'Permission'",
|
|
50
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export declare const RoleStatus: {
|
|
2
|
+
readonly ENABLED: "enabled";
|
|
3
|
+
readonly DISABLED: "disabled";
|
|
4
|
+
};
|
|
5
|
+
export type AnyRoleStatus = (typeof RoleStatus)[keyof typeof RoleStatus];
|
|
6
|
+
export declare const RoleIdPropertySchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
7
|
+
id: string;
|
|
8
|
+
}, {}>;
|
|
9
|
+
export type RoleIdProperty = typeof RoleIdPropertySchema.inferOut;
|
|
10
|
+
export declare const RolePayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
status: "enabled" | "disabled";
|
|
14
|
+
createdAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
|
|
15
|
+
updatedAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
|
|
16
|
+
description?: string | undefined;
|
|
17
|
+
apps?: {
|
|
18
|
+
ids?: string[] | undefined;
|
|
19
|
+
count?: number[] | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
users?: {
|
|
22
|
+
ids?: string[] | undefined;
|
|
23
|
+
count?: number[] | undefined;
|
|
24
|
+
} | undefined;
|
|
25
|
+
permissions?: {
|
|
26
|
+
ids?: string[] | undefined;
|
|
27
|
+
count?: number[] | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
30
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
31
|
+
metadata?: ((In: {
|
|
32
|
+
[x: string]: string | number | boolean;
|
|
33
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
|
|
34
|
+
[x: string]: string | number | boolean;
|
|
35
|
+
} | undefined>) | undefined;
|
|
36
|
+
}, {}>;
|
|
37
|
+
export type RolePayload = typeof RolePayloadSchema.inferOut;
|
|
38
|
+
export declare const InsertRolePayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
39
|
+
id: import("arktype/out/attributes.js").Default<string, string>;
|
|
40
|
+
name: string;
|
|
41
|
+
status: import("arktype/out/attributes.js").Default<"enabled" | "disabled", "enabled">;
|
|
42
|
+
description?: string | undefined;
|
|
43
|
+
metadata?: ((In: {
|
|
44
|
+
[x: string]: string | number | boolean;
|
|
45
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
|
|
46
|
+
[x: string]: string | number | boolean;
|
|
47
|
+
} | undefined>) | undefined;
|
|
48
|
+
}, {}>;
|
|
49
|
+
export type InsertRolePayload = typeof InsertRolePayloadSchema.inferOut;
|
|
50
|
+
export declare const UpdateRolePayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
51
|
+
name?: string | undefined;
|
|
52
|
+
status?: "enabled" | "disabled" | undefined;
|
|
53
|
+
description?: string | undefined;
|
|
54
|
+
metadata?: ((In: {
|
|
55
|
+
[x: string]: string | number | boolean;
|
|
56
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
|
|
57
|
+
[x: string]: string | number | boolean;
|
|
58
|
+
} | undefined>) | undefined;
|
|
59
|
+
}, {}>;
|
|
60
|
+
export type UpdateRolePayload = typeof UpdateRolePayloadSchema.inferOut;
|
|
61
|
+
export declare const RoleAssociationsSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
62
|
+
apps?: string[] | undefined;
|
|
63
|
+
permissions?: string[] | undefined;
|
|
64
|
+
users?: string[] | undefined;
|
|
65
|
+
}, {}>;
|
|
66
|
+
export type RoleAssociations = typeof RoleAssociationsSchema.inferOut;
|
|
67
|
+
export declare const RoleAssociationReferenceSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
status: "enabled" | "disabled";
|
|
71
|
+
model: "Role";
|
|
72
|
+
}, {}>;
|
|
73
|
+
export type RoleAssociationReference = typeof RoleAssociationReferenceSchema.inferOut;
|
|
74
|
+
//# sourceMappingURL=role.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role.d.ts","sourceRoot":"","sources":["../../../../src/authorization/schema/role.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,UAAU;;;CAGb,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAIzE,eAAO,MAAM,oBAAoB;;MAE/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,oBAAoB,CAAC,QAAQ,CAAC;AAIlE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;MAaO,CAAC;AACtC,MAAM,MAAM,WAAW,GAAG,OAAO,iBAAiB,CAAC,QAAQ,CAAC;AAE5D,eAAO,MAAM,uBAAuB;;;;;;;;;;MAKC,CAAC;AACtC,MAAM,MAAM,iBAAiB,GAAG,OAAO,uBAAuB,CAAC,QAAQ,CAAC;AAExE,eAAO,MAAM,uBAAuB;;;;;;;;;MAIC,CAAC;AACtC,MAAM,MAAM,iBAAiB,GAAG,OAAO,uBAAuB,CAAC,QAAQ,CAAC;AAIxE,eAAO,MAAM,sBAAsB;;;;MAKjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,sBAAsB,CAAC,QAAQ,CAAC;AAEtE,eAAO,MAAM,8BAA8B;;;;;MAMzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAClC,OAAO,8BAA8B,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RoleAssociationReferenceSchema = exports.RoleAssociationsSchema = exports.UpdateRolePayloadSchema = exports.InsertRolePayloadSchema = exports.RolePayloadSchema = exports.RoleIdPropertySchema = exports.RoleStatus = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
const index_js_1 = require("../../common/index.js");
|
|
6
|
+
const aggregate_js_1 = require("../../common/schema/aggregate.js");
|
|
7
|
+
const metadata_js_1 = require("../../common/schema/metadata.js");
|
|
8
|
+
const utils_js_1 = require("./utils.js");
|
|
9
|
+
exports.RoleStatus = {
|
|
10
|
+
ENABLED: 'enabled',
|
|
11
|
+
DISABLED: 'disabled',
|
|
12
|
+
};
|
|
13
|
+
const RoleIdSchema = arktype_1.type.string;
|
|
14
|
+
exports.RoleIdPropertySchema = (0, arktype_1.type)({
|
|
15
|
+
id: RoleIdSchema,
|
|
16
|
+
});
|
|
17
|
+
const StatusSchema = arktype_1.type.enumerated(exports.RoleStatus.ENABLED, exports.RoleStatus.DISABLED);
|
|
18
|
+
exports.RolePayloadSchema = exports.RoleIdPropertySchema.and({
|
|
19
|
+
name: (0, arktype_1.type)('string'),
|
|
20
|
+
status: StatusSchema,
|
|
21
|
+
description: (0, arktype_1.type)('string').optional(),
|
|
22
|
+
apps: aggregate_js_1.AggregateSchema.optional(),
|
|
23
|
+
users: aggregate_js_1.AggregateSchema.optional(),
|
|
24
|
+
permissions: aggregate_js_1.AggregateSchema.optional(),
|
|
25
|
+
createdAt: index_js_1.RequiredDatePayloadSchema,
|
|
26
|
+
updatedAt: index_js_1.RequiredDatePayloadSchema,
|
|
27
|
+
'deletedAt?': index_js_1.OptionalDatePayloadSchema,
|
|
28
|
+
'deactivatedAt?': index_js_1.OptionalDatePayloadSchema,
|
|
29
|
+
})
|
|
30
|
+
.and(exports.RoleIdPropertySchema)
|
|
31
|
+
.and(metadata_js_1.MetadataPayloadPropertySchema);
|
|
32
|
+
exports.InsertRolePayloadSchema = (0, arktype_1.type)({
|
|
33
|
+
id: RoleIdSchema.default(() => (0, utils_js_1.generateRoleId)()),
|
|
34
|
+
name: (0, arktype_1.type)('string'),
|
|
35
|
+
status: StatusSchema.default(exports.RoleStatus.ENABLED),
|
|
36
|
+
description: (0, arktype_1.type)('string').optional(),
|
|
37
|
+
}).and(metadata_js_1.MetadataPayloadPropertySchema);
|
|
38
|
+
exports.UpdateRolePayloadSchema = (0, arktype_1.type)({
|
|
39
|
+
name: (0, arktype_1.type)('string').optional(),
|
|
40
|
+
status: StatusSchema.optional(),
|
|
41
|
+
description: (0, arktype_1.type)('string').optional(),
|
|
42
|
+
}).and(metadata_js_1.MetadataPayloadPropertySchema);
|
|
43
|
+
const AssociationSchema = (0, arktype_1.type)('string[] | undefined');
|
|
44
|
+
exports.RoleAssociationsSchema = (0, arktype_1.type)({
|
|
45
|
+
'+': 'delete',
|
|
46
|
+
apps: AssociationSchema.optional(),
|
|
47
|
+
permissions: AssociationSchema.optional(),
|
|
48
|
+
users: AssociationSchema.optional(),
|
|
49
|
+
});
|
|
50
|
+
exports.RoleAssociationReferenceSchema = exports.RolePayloadSchema.pick('id', 'name', 'status').and({
|
|
51
|
+
model: "'Role'",
|
|
52
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authorization/schema/schema.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAE1B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./permission.js"), exports);
|
|
18
|
+
__exportStar(require("./role.js"), exports);
|
|
19
|
+
__exportStar(require("./utils.js"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const Model: {
|
|
2
|
+
readonly Permission: {
|
|
3
|
+
readonly UIDPrefix: "per";
|
|
4
|
+
};
|
|
5
|
+
readonly Role: {
|
|
6
|
+
readonly UIDPrefix: "rol";
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare function generatePermissionId(): string;
|
|
10
|
+
export declare function generateRoleId(): string;
|
|
11
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/authorization/schema/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;;;;CAOR,CAAC;AAEX,wBAAgB,oBAAoB,WAEnC;AAED,wBAAgB,cAAc,WAE7B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Model = void 0;
|
|
7
|
+
exports.generatePermissionId = generatePermissionId;
|
|
8
|
+
exports.generateRoleId = generateRoleId;
|
|
9
|
+
const ksuid_1 = __importDefault(require("ksuid"));
|
|
10
|
+
exports.Model = {
|
|
11
|
+
Permission: {
|
|
12
|
+
UIDPrefix: 'per',
|
|
13
|
+
},
|
|
14
|
+
Role: {
|
|
15
|
+
UIDPrefix: 'rol',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
function generatePermissionId() {
|
|
19
|
+
return `${exports.Model.Permission.UIDPrefix}_${ksuid_1.default.randomSync().string}`;
|
|
20
|
+
}
|
|
21
|
+
function generateRoleId() {
|
|
22
|
+
return `${exports.Model.Role.UIDPrefix}_${ksuid_1.default.randomSync().string}`;
|
|
23
|
+
}
|