@go-mondo/identity-sdk 0.0.2-beta.5 → 0.0.2-beta.7
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/.release-please-manifest.json +1 -1
- package/.tsbuildinfo/cjs.json +1 -1
- package/.tsbuildinfo/esm.json +1 -1
- package/CHANGELOG.md +14 -0
- package/dist/cjs/action/schema/base.d.ts +12 -5
- package/dist/cjs/action/schema/base.d.ts.map +1 -1
- package/dist/cjs/action/schema/base.js +8 -3
- package/dist/cjs/action/schema/operations/set-password.d.ts +11 -11
- package/dist/cjs/action/schema/operations/set-password.js +2 -2
- package/dist/cjs/action/schema/operations/sign-up-verification.d.ts +5 -5
- package/dist/cjs/action/schema/operations/sign-up-verification.js +1 -1
- package/dist/cjs/action/schema/operations/sign-up.d.ts +7 -7
- package/dist/cjs/action/schema/operations/sign-up.js +12 -12
- package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts +5 -5
- package/dist/cjs/action/schema/operations/user-attribute-verification.js +1 -1
- package/dist/cjs/action/schema/schema.d.ts +27 -34
- package/dist/cjs/action/schema/schema.d.ts.map +1 -1
- package/dist/cjs/action/schema/schema.js +2 -7
- package/dist/cjs/activity/index.d.ts +1 -0
- package/dist/cjs/activity/index.d.ts.map +1 -1
- package/dist/cjs/activity/index.js +1 -0
- package/dist/cjs/activity/resources.d.ts +13 -0
- package/dist/cjs/activity/resources.d.ts.map +1 -0
- package/dist/cjs/activity/resources.js +29 -0
- package/dist/cjs/activity/schema/base.d.ts +23 -7
- package/dist/cjs/activity/schema/base.d.ts.map +1 -1
- package/dist/cjs/activity/schema/base.js +12 -2
- package/dist/cjs/activity/schema/schema.d.ts +123 -29
- package/dist/cjs/activity/schema/schema.d.ts.map +1 -1
- package/dist/cjs/activity/schema/schema.js +5 -2
- package/dist/cjs/activity/schema/types/authentication.d.ts +28 -5
- package/dist/cjs/activity/schema/types/authentication.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/authentication.js +5 -2
- package/dist/cjs/activity/schema/types/authorization.d.ts +28 -5
- package/dist/cjs/activity/schema/types/authorization.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/authorization.js +6 -4
- package/dist/cjs/activity/schema/types/note.d.ts +27 -7
- package/dist/cjs/activity/schema/types/note.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/note.js +4 -2
- package/dist/cjs/activity/schema/types/operation.d.ts +27 -5
- package/dist/cjs/activity/schema/types/operation.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/operation.js +4 -2
- package/dist/cjs/activity/schema/types/unknown.d.ts +25 -5
- package/dist/cjs/activity/schema/types/unknown.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/unknown.js +4 -2
- package/dist/cjs/app/authorization/resources.d.ts +12 -0
- package/dist/cjs/app/authorization/resources.d.ts.map +1 -0
- package/dist/cjs/app/authorization/resources.js +35 -0
- package/dist/cjs/app/authorization/schema.d.ts +54 -0
- package/dist/cjs/app/authorization/schema.d.ts.map +1 -0
- package/dist/cjs/app/{schema/authorization.js → authorization/schema.js} +31 -15
- package/dist/cjs/app/index.d.ts +13 -1
- package/dist/cjs/app/index.d.ts.map +1 -1
- package/dist/cjs/app/index.js +20 -1
- package/dist/cjs/app/oauth/resources.d.ts +12 -0
- package/dist/cjs/app/oauth/resources.d.ts.map +1 -0
- package/dist/cjs/app/oauth/resources.js +35 -0
- package/dist/cjs/app/{schema/oauth.d.ts → oauth/schema.d.ts} +18 -6
- package/dist/cjs/app/oauth/schema.d.ts.map +1 -0
- package/dist/cjs/app/{schema/oauth.js → oauth/schema.js} +10 -3
- package/dist/cjs/app/oidc/resources.d.ts +16 -0
- package/dist/cjs/app/oidc/resources.d.ts.map +1 -0
- package/dist/cjs/app/oidc/resources.js +49 -0
- package/dist/cjs/app/{schema/oidc.d.ts → oidc/schema.d.ts} +19 -9
- package/dist/cjs/app/oidc/schema.d.ts.map +1 -0
- package/dist/cjs/app/{schema/oidc.js → oidc/schema.js} +7 -2
- package/dist/cjs/app/registration/resources.d.ts +12 -0
- package/dist/cjs/app/registration/resources.d.ts.map +1 -0
- package/dist/cjs/app/registration/resources.js +35 -0
- package/dist/cjs/app/{schema/registration.d.ts → registration/schema.d.ts} +16 -6
- package/dist/cjs/app/registration/schema.d.ts.map +1 -0
- package/dist/cjs/app/{schema/registration.js → registration/schema.js} +9 -2
- package/dist/cjs/app/resources.d.ts +21 -0
- package/dist/cjs/app/resources.d.ts.map +1 -0
- package/dist/cjs/app/resources.js +57 -0
- package/dist/cjs/app/saml/resources.d.ts +16 -0
- package/dist/cjs/app/saml/resources.d.ts.map +1 -0
- package/dist/cjs/app/saml/resources.js +49 -0
- package/dist/cjs/app/{schema/saml.d.ts → saml/schema.d.ts} +19 -9
- package/dist/cjs/app/saml/schema.d.ts.map +1 -0
- package/dist/cjs/app/{schema/saml.js → saml/schema.js} +7 -2
- package/dist/cjs/app/{schema/app.d.ts → schema.d.ts} +24 -9
- package/dist/cjs/app/schema.d.ts.map +1 -0
- package/dist/cjs/app/{schema/app.js → schema.js} +12 -4
- package/dist/cjs/app/utils.d.ts.map +1 -0
- package/dist/cjs/association/index.d.ts +2 -1
- package/dist/cjs/association/index.d.ts.map +1 -1
- package/dist/cjs/association/index.js +2 -1
- package/dist/cjs/association/resources.d.ts +23 -0
- package/dist/cjs/association/resources.d.ts.map +1 -0
- package/dist/cjs/association/resources.js +51 -0
- package/dist/cjs/association/schema.d.ts +147 -0
- package/dist/cjs/association/schema.d.ts.map +1 -0
- package/dist/cjs/association/{schema/association.js → schema.js} +21 -5
- package/dist/cjs/authentication/{schema/factors.d.ts → factors/schema.d.ts} +12 -3
- package/dist/cjs/authentication/factors/schema.d.ts.map +1 -0
- package/dist/cjs/authentication/{schema/factors.js → factors/schema.js} +6 -2
- package/dist/cjs/authentication/factors/schema.test.d.ts +2 -0
- package/dist/cjs/authentication/factors/schema.test.d.ts.map +1 -0
- package/dist/cjs/authentication/{schema/factors.test.js → factors/schema.test.js} +17 -17
- package/dist/cjs/authentication/index.d.ts +8 -1
- package/dist/cjs/authentication/index.d.ts.map +1 -1
- package/dist/cjs/authentication/index.js +13 -1
- package/dist/cjs/authentication/{schema/provider.d.ts → providers/schema.d.ts} +5 -5
- package/dist/cjs/authentication/providers/schema.d.ts.map +1 -0
- package/dist/cjs/authentication/{schema/provider.js → providers/schema.js} +1 -1
- package/dist/cjs/authentication/resources.d.ts +2 -0
- package/dist/cjs/authentication/resources.d.ts.map +1 -0
- package/dist/cjs/authentication/resources.js +4 -0
- package/dist/cjs/authentication/sessions/resources.d.ts +21 -0
- package/dist/cjs/authentication/sessions/resources.d.ts.map +1 -0
- package/dist/cjs/authentication/sessions/resources.js +43 -0
- package/dist/cjs/authentication/sessions/schema.d.ts +81 -0
- package/dist/cjs/authentication/sessions/schema.d.ts.map +1 -0
- package/dist/cjs/authentication/{schema/session.js → sessions/schema.js} +16 -7
- package/dist/cjs/authentication/settings/resources.d.ts +12 -0
- package/dist/cjs/authentication/settings/resources.d.ts.map +1 -0
- package/dist/cjs/authentication/settings/resources.js +32 -0
- package/dist/cjs/authentication/{schema/settings.d.ts → settings/schema.d.ts} +31 -8
- package/dist/cjs/authentication/settings/schema.d.ts.map +1 -0
- package/dist/cjs/authentication/{schema/settings.js → settings/schema.js} +11 -4
- package/dist/cjs/authentication/strategies/resources.d.ts +20 -0
- package/dist/cjs/authentication/strategies/resources.d.ts.map +1 -0
- package/dist/cjs/authentication/strategies/resources.js +58 -0
- package/dist/cjs/authentication/{schema/strategy → strategies/schema}/base.d.ts +17 -7
- package/dist/cjs/authentication/strategies/schema/base.d.ts.map +1 -0
- package/dist/cjs/authentication/{schema/strategy → strategies/schema}/base.js +10 -2
- package/dist/cjs/authentication/{schema/strategy → strategies/schema}/schema.d.ts +102 -53
- package/dist/cjs/authentication/strategies/schema/schema.d.ts.map +1 -0
- package/dist/cjs/authentication/{schema/strategy → strategies/schema}/schema.js +2 -1
- package/dist/cjs/authentication/{schema/strategy → strategies/schema}/types/email.d.ts +27 -9
- package/dist/cjs/authentication/strategies/schema/types/email.d.ts.map +1 -0
- package/dist/cjs/authentication/{schema/strategy → strategies/schema}/types/email.js +4 -3
- package/dist/cjs/authentication/{schema/strategy → strategies/schema}/types/password.d.ts +76 -43
- package/dist/cjs/authentication/strategies/schema/types/password.d.ts.map +1 -0
- package/dist/cjs/authentication/strategies/schema/types/password.js +52 -0
- package/dist/cjs/authentication/{schema/strategy → strategies/schema}/types/totp.d.ts +33 -13
- package/dist/cjs/authentication/strategies/schema/types/totp.d.ts.map +1 -0
- package/dist/cjs/authentication/{schema/strategy → strategies/schema}/types/totp.js +12 -3
- package/dist/cjs/authorization/index.d.ts.map +1 -1
- package/dist/cjs/authorization/index.js +2 -0
- package/dist/cjs/authorization/permissions/resources.d.ts +2 -2
- package/dist/cjs/authorization/permissions/resources.d.ts.map +1 -1
- package/dist/cjs/authorization/permissions/resources.js +1 -1
- package/dist/cjs/authorization/permissions/schema.d.ts +8 -8
- package/dist/cjs/authorization/roles/resources.d.ts +2 -2
- package/dist/cjs/authorization/roles/resources.d.ts.map +1 -1
- package/dist/cjs/authorization/roles/resources.js +1 -1
- package/dist/cjs/authorization/roles/schema.d.ts +8 -8
- package/dist/cjs/common/index.d.ts +1 -0
- package/dist/cjs/common/index.d.ts.map +1 -1
- package/dist/cjs/common/index.js +6 -0
- package/dist/cjs/common/schema/dates.d.ts +7 -7
- package/dist/cjs/common/schema/dates.d.ts.map +1 -1
- package/dist/cjs/common/schema/metadata.d.ts +8 -6
- package/dist/cjs/common/schema/metadata.d.ts.map +1 -1
- package/dist/cjs/common/schema/schema.d.ts +2 -1
- package/dist/cjs/common/schema/schema.d.ts.map +1 -1
- package/dist/cjs/common/schema/schema.js +2 -1
- package/dist/cjs/common/schema/schema.test.d.ts +2 -0
- package/dist/cjs/common/schema/schema.test.d.ts.map +1 -0
- package/dist/cjs/common/schema/schema.test.js +35 -0
- package/dist/cjs/common/schema/sets.d.ts +2 -2
- package/dist/cjs/common/schema/sets.d.ts.map +1 -1
- package/dist/cjs/common/schema/url.d.ts +2 -0
- package/dist/cjs/common/schema/url.d.ts.map +1 -0
- package/dist/cjs/common/schema/url.js +12 -0
- package/dist/cjs/customer/index.d.ts +1 -0
- package/dist/cjs/customer/index.d.ts.map +1 -1
- package/dist/cjs/customer/index.js +1 -0
- package/dist/cjs/customer/schema/organization.d.ts +7 -7
- package/dist/cjs/customer/users/resources.d.ts +2 -2
- package/dist/cjs/customer/users/resources.d.ts.map +1 -1
- package/dist/cjs/customer/users/resources.js +2 -2
- package/dist/cjs/customer/users/schema.d.ts +10 -11
- package/dist/cjs/customer/users/schema.d.ts.map +1 -1
- package/dist/cjs/customer/users/schema.js +1 -3
- package/dist/cjs/customer/users/schema.test.js +2 -0
- package/dist/cjs/customer/users/utils.d.ts +10 -0
- package/dist/cjs/customer/users/utils.d.ts.map +1 -0
- package/dist/cjs/customer/users/utils.js +33 -0
- package/dist/cjs/identity/index.d.ts +1 -1
- package/dist/cjs/identity/index.d.ts.map +1 -1
- package/dist/cjs/identity/index.js +1 -1
- package/dist/cjs/identity/schema.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.js +9 -9
- package/dist/cjs/oauth/common/schema.d.ts +6 -0
- package/dist/cjs/oauth/common/schema.d.ts.map +1 -1
- package/dist/cjs/oauth/common/schema.js +7 -1
- package/dist/cjs/oauth/index.d.ts +1 -1
- package/dist/cjs/oauth/index.d.ts.map +1 -1
- package/dist/cjs/oauth/index.js +2 -1
- package/dist/cjs/oauth/token/schema/grants/client-credentials.js +6 -6
- package/dist/cjs/oauth/token/schema/grants/refresh-token.js +4 -4
- package/dist/cjs/workspace/{schema/authorization.d.ts → authorization/schema.d.ts} +6 -6
- package/dist/cjs/workspace/authorization/schema.d.ts.map +1 -0
- package/dist/cjs/workspace/{schema/branding.d.ts → branding/schema.d.ts} +6 -6
- package/dist/cjs/workspace/branding/schema.d.ts.map +1 -0
- package/dist/cjs/workspace/index.d.ts +8 -1
- package/dist/cjs/workspace/index.d.ts.map +1 -1
- package/dist/cjs/workspace/index.js +8 -1
- package/dist/cjs/workspace/{schema/membership.d.ts → membership/schema.d.ts} +6 -6
- package/dist/cjs/workspace/membership/schema.d.ts.map +1 -0
- package/dist/cjs/workspace/{schema/registration.d.ts → registration/schema.d.ts} +6 -6
- package/dist/cjs/workspace/registration/schema.d.ts.map +1 -0
- package/dist/cjs/workspace/{schema/registration.js → registration/schema.js} +1 -1
- package/dist/cjs/workspace/{schema/settings.d.ts → settings/schema.d.ts} +6 -6
- package/dist/cjs/workspace/settings/schema.d.ts.map +1 -0
- package/dist/cjs/workspace/{schema/tenant.d.ts → tenant/schema.d.ts} +11 -11
- package/dist/cjs/workspace/{schema/tenant.d.ts.map → tenant/schema.d.ts.map} +1 -1
- package/dist/cjs/workspace/{schema/tenant.js → tenant/schema.js} +3 -3
- package/dist/cjs/workspace/{schema/user-notification.d.ts → user/notifications/schema.d.ts} +8 -8
- package/dist/cjs/workspace/user/notifications/schema.d.ts.map +1 -0
- package/dist/cjs/workspace/{schema/user-notification.js → user/notifications/schema.js} +4 -4
- package/dist/cjs/workspace/{schema/user-preferences.d.ts → user/preferences/schema.d.ts} +6 -6
- package/dist/cjs/workspace/user/preferences/schema.d.ts.map +1 -0
- package/dist/cjs/workspace/{schema/user-preferences.js → user/preferences/schema.js} +2 -2
- package/dist/cjs/workspace/user/schema.d.ts +3 -0
- package/dist/cjs/workspace/user/schema.d.ts.map +1 -0
- package/dist/cjs/{association/schema → workspace/user}/schema.js +2 -1
- package/dist/cjs/workspace/utils.d.ts.map +1 -0
- package/dist/esm/action/schema/base.d.ts +12 -5
- package/dist/esm/action/schema/base.d.ts.map +1 -1
- package/dist/esm/action/schema/base.js +6 -1
- package/dist/esm/action/schema/operations/set-password.d.ts +11 -11
- package/dist/esm/action/schema/operations/set-password.js +2 -2
- package/dist/esm/action/schema/operations/sign-up-verification.d.ts +5 -5
- package/dist/esm/action/schema/operations/sign-up-verification.js +1 -1
- package/dist/esm/action/schema/operations/sign-up.d.ts +7 -7
- package/dist/esm/action/schema/operations/sign-up.js +1 -1
- package/dist/esm/action/schema/operations/user-attribute-verification.d.ts +5 -5
- package/dist/esm/action/schema/operations/user-attribute-verification.js +1 -1
- package/dist/esm/action/schema/schema.d.ts +27 -34
- package/dist/esm/action/schema/schema.d.ts.map +1 -1
- package/dist/esm/action/schema/schema.js +1 -7
- package/dist/esm/activity/index.d.ts +1 -0
- package/dist/esm/activity/index.d.ts.map +1 -1
- package/dist/esm/activity/index.js +1 -0
- package/dist/esm/activity/resources.d.ts +13 -0
- package/dist/esm/activity/resources.d.ts.map +1 -0
- package/dist/esm/activity/resources.js +24 -0
- package/dist/esm/activity/schema/base.d.ts +23 -7
- package/dist/esm/activity/schema/base.d.ts.map +1 -1
- package/dist/esm/activity/schema/base.js +13 -3
- package/dist/esm/activity/schema/schema.d.ts +123 -29
- package/dist/esm/activity/schema/schema.d.ts.map +1 -1
- package/dist/esm/activity/schema/schema.js +9 -6
- package/dist/esm/activity/schema/types/authentication.d.ts +28 -5
- package/dist/esm/activity/schema/types/authentication.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/authentication.js +5 -2
- package/dist/esm/activity/schema/types/authorization.d.ts +28 -5
- package/dist/esm/activity/schema/types/authorization.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/authorization.js +6 -4
- package/dist/esm/activity/schema/types/note.d.ts +27 -7
- package/dist/esm/activity/schema/types/note.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/note.js +4 -2
- package/dist/esm/activity/schema/types/operation.d.ts +27 -5
- package/dist/esm/activity/schema/types/operation.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/operation.js +4 -2
- package/dist/esm/activity/schema/types/unknown.d.ts +25 -5
- package/dist/esm/activity/schema/types/unknown.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/unknown.js +4 -2
- package/dist/esm/app/authorization/resources.d.ts +12 -0
- package/dist/esm/app/authorization/resources.d.ts.map +1 -0
- package/dist/esm/app/authorization/resources.js +29 -0
- package/dist/esm/app/authorization/schema.d.ts +54 -0
- package/dist/esm/app/authorization/schema.d.ts.map +1 -0
- package/dist/esm/app/{schema/authorization.js → authorization/schema.js} +32 -16
- package/dist/esm/app/index.d.ts +13 -1
- package/dist/esm/app/index.d.ts.map +1 -1
- package/dist/esm/app/index.js +20 -1
- package/dist/esm/app/oauth/resources.d.ts +12 -0
- package/dist/esm/app/oauth/resources.d.ts.map +1 -0
- package/dist/esm/app/oauth/resources.js +29 -0
- package/dist/esm/app/{schema/oauth.d.ts → oauth/schema.d.ts} +18 -6
- package/dist/esm/app/oauth/schema.d.ts.map +1 -0
- package/dist/esm/app/oauth/schema.js +25 -0
- package/dist/esm/app/oidc/resources.d.ts +16 -0
- package/dist/esm/app/oidc/resources.d.ts.map +1 -0
- package/dist/esm/app/oidc/resources.js +41 -0
- package/dist/esm/app/{schema/oidc.d.ts → oidc/schema.d.ts} +19 -9
- package/dist/esm/app/oidc/schema.d.ts.map +1 -0
- package/dist/esm/app/oidc/schema.js +15 -0
- package/dist/esm/app/registration/resources.d.ts +12 -0
- package/dist/esm/app/registration/resources.d.ts.map +1 -0
- package/dist/esm/app/registration/resources.js +29 -0
- package/dist/esm/app/registration/schema.d.ts +32 -0
- package/dist/esm/app/registration/schema.d.ts.map +1 -0
- package/dist/esm/app/{schema/registration.js → registration/schema.js} +10 -3
- package/dist/esm/app/resources.d.ts +21 -0
- package/dist/esm/app/resources.d.ts.map +1 -0
- package/dist/esm/app/resources.js +48 -0
- package/dist/esm/app/saml/resources.d.ts +16 -0
- package/dist/esm/app/saml/resources.d.ts.map +1 -0
- package/dist/esm/app/saml/resources.js +41 -0
- package/dist/esm/app/{schema/saml.d.ts → saml/schema.d.ts} +19 -9
- package/dist/esm/app/saml/schema.d.ts.map +1 -0
- package/dist/esm/app/saml/schema.js +15 -0
- package/dist/esm/app/{schema/app.d.ts → schema.d.ts} +24 -9
- package/dist/esm/app/schema.d.ts.map +1 -0
- package/dist/esm/app/{schema/app.js → schema.js} +11 -3
- package/dist/esm/app/utils.d.ts.map +1 -0
- package/dist/esm/association/index.d.ts +2 -1
- package/dist/esm/association/index.d.ts.map +1 -1
- package/dist/esm/association/index.js +2 -1
- package/dist/esm/association/resources.d.ts +23 -0
- package/dist/esm/association/resources.d.ts.map +1 -0
- package/dist/esm/association/resources.js +44 -0
- package/dist/esm/association/schema.d.ts +147 -0
- package/dist/esm/association/schema.d.ts.map +1 -0
- package/dist/esm/association/schema.js +39 -0
- package/dist/esm/authentication/{schema/factors.d.ts → factors/schema.d.ts} +12 -3
- package/dist/esm/authentication/factors/schema.d.ts.map +1 -0
- package/dist/esm/authentication/{schema/factors.js → factors/schema.js} +5 -1
- package/dist/esm/authentication/factors/schema.test.d.ts +2 -0
- package/dist/esm/authentication/factors/schema.test.d.ts.map +1 -0
- package/dist/esm/authentication/{schema/factors.test.js → factors/schema.test.js} +1 -1
- package/dist/esm/authentication/index.d.ts +8 -1
- package/dist/esm/authentication/index.d.ts.map +1 -1
- package/dist/esm/authentication/index.js +13 -1
- package/dist/esm/authentication/{schema/provider.d.ts → providers/schema.d.ts} +5 -5
- package/dist/esm/authentication/providers/schema.d.ts.map +1 -0
- package/dist/esm/authentication/{schema/provider.js → providers/schema.js} +1 -1
- package/dist/esm/authentication/resources.d.ts +2 -0
- package/dist/esm/authentication/resources.d.ts.map +1 -0
- package/dist/esm/authentication/resources.js +1 -0
- package/dist/esm/authentication/sessions/resources.d.ts +21 -0
- package/dist/esm/authentication/sessions/resources.d.ts.map +1 -0
- package/dist/esm/authentication/sessions/resources.js +37 -0
- package/dist/esm/authentication/sessions/schema.d.ts +81 -0
- package/dist/esm/authentication/sessions/schema.d.ts.map +1 -0
- package/dist/esm/authentication/{schema/session.js → sessions/schema.js} +17 -8
- package/dist/esm/authentication/settings/resources.d.ts +12 -0
- package/dist/esm/authentication/settings/resources.d.ts.map +1 -0
- package/dist/esm/authentication/settings/resources.js +26 -0
- package/dist/esm/authentication/{schema/settings.d.ts → settings/schema.d.ts} +31 -8
- package/dist/esm/authentication/settings/schema.d.ts.map +1 -0
- package/dist/esm/authentication/settings/schema.js +20 -0
- package/dist/esm/authentication/strategies/resources.d.ts +20 -0
- package/dist/esm/authentication/strategies/resources.d.ts.map +1 -0
- package/dist/esm/authentication/strategies/resources.js +49 -0
- package/dist/esm/authentication/{schema/strategy → strategies/schema}/base.d.ts +17 -7
- package/dist/esm/authentication/strategies/schema/base.d.ts.map +1 -0
- package/dist/esm/authentication/{schema/strategy → strategies/schema}/base.js +11 -3
- package/dist/esm/authentication/{schema/strategy → strategies/schema}/schema.d.ts +102 -53
- package/dist/esm/authentication/strategies/schema/schema.d.ts.map +1 -0
- package/dist/esm/authentication/{schema/strategy → strategies/schema}/schema.js +4 -3
- package/dist/esm/authentication/{schema/strategy → strategies/schema}/types/email.d.ts +27 -9
- package/dist/esm/authentication/strategies/schema/types/email.d.ts.map +1 -0
- package/dist/esm/authentication/{schema/strategy → strategies/schema}/types/email.js +4 -3
- package/dist/esm/authentication/{schema/strategy → strategies/schema}/types/password.d.ts +76 -43
- package/dist/esm/authentication/strategies/schema/types/password.d.ts.map +1 -0
- package/dist/esm/authentication/strategies/schema/types/password.js +49 -0
- package/dist/esm/authentication/{schema/strategy → strategies/schema}/types/totp.d.ts +33 -13
- package/dist/esm/authentication/strategies/schema/types/totp.d.ts.map +1 -0
- package/dist/esm/authentication/{schema/strategy → strategies/schema}/types/totp.js +12 -3
- package/dist/esm/authorization/index.d.ts.map +1 -1
- package/dist/esm/authorization/index.js +2 -0
- package/dist/esm/authorization/permissions/resources.d.ts +2 -2
- package/dist/esm/authorization/permissions/resources.d.ts.map +1 -1
- package/dist/esm/authorization/permissions/resources.js +1 -1
- package/dist/esm/authorization/permissions/schema.d.ts +8 -8
- package/dist/esm/authorization/roles/resources.d.ts +2 -2
- package/dist/esm/authorization/roles/resources.d.ts.map +1 -1
- package/dist/esm/authorization/roles/resources.js +1 -1
- package/dist/esm/authorization/roles/schema.d.ts +8 -8
- package/dist/esm/common/index.d.ts +1 -0
- package/dist/esm/common/index.d.ts.map +1 -1
- package/dist/esm/common/index.js +1 -0
- package/dist/esm/common/schema/dates.d.ts +7 -7
- package/dist/esm/common/schema/dates.d.ts.map +1 -1
- package/dist/esm/common/schema/metadata.d.ts +8 -6
- package/dist/esm/common/schema/metadata.d.ts.map +1 -1
- package/dist/esm/common/schema/schema.d.ts +2 -1
- package/dist/esm/common/schema/schema.d.ts.map +1 -1
- package/dist/esm/common/schema/schema.js +2 -1
- package/dist/esm/common/schema/schema.test.d.ts +2 -0
- package/dist/esm/common/schema/schema.test.d.ts.map +1 -0
- package/dist/esm/common/schema/schema.test.js +33 -0
- package/dist/esm/common/schema/sets.d.ts +2 -2
- package/dist/esm/common/schema/sets.d.ts.map +1 -1
- package/dist/esm/common/schema/url.d.ts +2 -0
- package/dist/esm/common/schema/url.d.ts.map +1 -0
- package/dist/esm/common/schema/url.js +9 -0
- package/dist/esm/customer/index.d.ts +1 -0
- package/dist/esm/customer/index.d.ts.map +1 -1
- package/dist/esm/customer/index.js +1 -0
- package/dist/esm/customer/schema/organization.d.ts +7 -7
- package/dist/esm/customer/users/resources.d.ts +2 -2
- package/dist/esm/customer/users/resources.d.ts.map +1 -1
- package/dist/esm/customer/users/resources.js +3 -3
- package/dist/esm/customer/users/schema.d.ts +10 -11
- package/dist/esm/customer/users/schema.d.ts.map +1 -1
- package/dist/esm/customer/users/schema.js +1 -3
- package/dist/esm/customer/users/schema.test.js +2 -0
- package/dist/esm/customer/users/utils.d.ts +10 -0
- package/dist/esm/customer/users/utils.d.ts.map +1 -0
- package/dist/esm/customer/users/utils.js +27 -0
- package/dist/esm/identity/index.d.ts +1 -1
- package/dist/esm/identity/index.d.ts.map +1 -1
- package/dist/esm/identity/index.js +1 -1
- package/dist/esm/identity/schema.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.js +1 -1
- package/dist/esm/oauth/common/schema.d.ts +6 -0
- package/dist/esm/oauth/common/schema.d.ts.map +1 -1
- package/dist/esm/oauth/common/schema.js +6 -0
- package/dist/esm/oauth/index.d.ts +1 -1
- package/dist/esm/oauth/index.d.ts.map +1 -1
- package/dist/esm/oauth/index.js +1 -1
- package/dist/esm/oauth/token/schema/grants/client-credentials.js +1 -1
- package/dist/esm/oauth/token/schema/grants/refresh-token.js +1 -1
- package/dist/esm/workspace/{schema/authorization.d.ts → authorization/schema.d.ts} +6 -6
- package/dist/esm/workspace/authorization/schema.d.ts.map +1 -0
- package/dist/esm/workspace/{schema/branding.d.ts → branding/schema.d.ts} +6 -6
- package/dist/esm/workspace/branding/schema.d.ts.map +1 -0
- package/dist/esm/workspace/index.d.ts +8 -1
- package/dist/esm/workspace/index.d.ts.map +1 -1
- package/dist/esm/workspace/index.js +8 -1
- package/dist/esm/workspace/{schema/membership.d.ts → membership/schema.d.ts} +6 -6
- package/dist/esm/workspace/membership/schema.d.ts.map +1 -0
- package/dist/esm/workspace/{schema/registration.d.ts → registration/schema.d.ts} +6 -6
- package/dist/esm/workspace/registration/schema.d.ts.map +1 -0
- package/dist/esm/workspace/{schema/registration.js → registration/schema.js} +1 -1
- package/dist/esm/workspace/{schema/settings.d.ts → settings/schema.d.ts} +6 -6
- package/dist/esm/workspace/settings/schema.d.ts.map +1 -0
- package/dist/esm/workspace/{schema/tenant.d.ts → tenant/schema.d.ts} +11 -11
- package/dist/esm/workspace/{schema/tenant.d.ts.map → tenant/schema.d.ts.map} +1 -1
- package/dist/esm/workspace/{schema/tenant.js → tenant/schema.js} +2 -2
- package/dist/esm/workspace/{schema/user-notification.d.ts → user/notifications/schema.d.ts} +8 -8
- package/dist/esm/workspace/user/notifications/schema.d.ts.map +1 -0
- package/dist/esm/workspace/{schema/user-notification.js → user/notifications/schema.js} +4 -4
- package/dist/esm/workspace/{schema/user-preferences.d.ts → user/preferences/schema.d.ts} +6 -6
- package/dist/esm/workspace/user/preferences/schema.d.ts.map +1 -0
- package/dist/esm/workspace/{schema/user-preferences.js → user/preferences/schema.js} +2 -2
- package/dist/esm/workspace/user/schema.d.ts +3 -0
- package/dist/esm/workspace/user/schema.d.ts.map +1 -0
- package/dist/esm/workspace/user/schema.js +2 -0
- package/dist/esm/workspace/utils.d.ts.map +1 -0
- package/package.json +6 -6
- package/dist/cjs/app/schema/app.d.ts.map +0 -1
- package/dist/cjs/app/schema/authorization.d.ts +0 -37
- package/dist/cjs/app/schema/authorization.d.ts.map +0 -1
- package/dist/cjs/app/schema/oauth.d.ts.map +0 -1
- package/dist/cjs/app/schema/oidc.d.ts.map +0 -1
- package/dist/cjs/app/schema/registration.d.ts.map +0 -1
- package/dist/cjs/app/schema/saml.d.ts.map +0 -1
- package/dist/cjs/app/schema/schema.d.ts +0 -8
- package/dist/cjs/app/schema/schema.d.ts.map +0 -1
- package/dist/cjs/app/schema/schema.js +0 -23
- package/dist/cjs/app/schema/utils.d.ts.map +0 -1
- package/dist/cjs/association/schema/association.d.ts +0 -82
- package/dist/cjs/association/schema/association.d.ts.map +0 -1
- package/dist/cjs/association/schema/schema.d.ts +0 -2
- package/dist/cjs/association/schema/schema.d.ts.map +0 -1
- package/dist/cjs/authentication/schema/factors.d.ts.map +0 -1
- package/dist/cjs/authentication/schema/factors.test.d.ts +0 -2
- package/dist/cjs/authentication/schema/factors.test.d.ts.map +0 -1
- package/dist/cjs/authentication/schema/provider.d.ts.map +0 -1
- package/dist/cjs/authentication/schema/schema.d.ts +0 -6
- package/dist/cjs/authentication/schema/schema.d.ts.map +0 -1
- package/dist/cjs/authentication/schema/schema.js +0 -21
- package/dist/cjs/authentication/schema/session.d.ts +0 -59
- package/dist/cjs/authentication/schema/session.d.ts.map +0 -1
- package/dist/cjs/authentication/schema/settings.d.ts.map +0 -1
- package/dist/cjs/authentication/schema/strategy/base.d.ts.map +0 -1
- package/dist/cjs/authentication/schema/strategy/schema.d.ts.map +0 -1
- package/dist/cjs/authentication/schema/strategy/types/email.d.ts.map +0 -1
- package/dist/cjs/authentication/schema/strategy/types/password.d.ts.map +0 -1
- package/dist/cjs/authentication/schema/strategy/types/password.js +0 -35
- package/dist/cjs/authentication/schema/strategy/types/totp.d.ts.map +0 -1
- package/dist/cjs/identity/schema/schema.d.ts.map +0 -1
- package/dist/cjs/workspace/schema/authorization.d.ts.map +0 -1
- package/dist/cjs/workspace/schema/branding.d.ts.map +0 -1
- package/dist/cjs/workspace/schema/membership.d.ts.map +0 -1
- package/dist/cjs/workspace/schema/registration.d.ts.map +0 -1
- package/dist/cjs/workspace/schema/schema.d.ts +0 -10
- package/dist/cjs/workspace/schema/schema.d.ts.map +0 -1
- package/dist/cjs/workspace/schema/schema.js +0 -25
- package/dist/cjs/workspace/schema/settings.d.ts.map +0 -1
- package/dist/cjs/workspace/schema/user-notification.d.ts.map +0 -1
- package/dist/cjs/workspace/schema/user-preferences.d.ts.map +0 -1
- package/dist/cjs/workspace/schema/utils.d.ts.map +0 -1
- package/dist/esm/app/schema/app.d.ts.map +0 -1
- package/dist/esm/app/schema/authorization.d.ts +0 -37
- package/dist/esm/app/schema/authorization.d.ts.map +0 -1
- package/dist/esm/app/schema/oauth.d.ts.map +0 -1
- package/dist/esm/app/schema/oauth.js +0 -18
- package/dist/esm/app/schema/oidc.d.ts.map +0 -1
- package/dist/esm/app/schema/oidc.js +0 -10
- package/dist/esm/app/schema/registration.d.ts +0 -22
- package/dist/esm/app/schema/registration.d.ts.map +0 -1
- package/dist/esm/app/schema/saml.d.ts.map +0 -1
- package/dist/esm/app/schema/saml.js +0 -10
- package/dist/esm/app/schema/schema.d.ts +0 -8
- package/dist/esm/app/schema/schema.d.ts.map +0 -1
- package/dist/esm/app/schema/schema.js +0 -7
- package/dist/esm/app/schema/utils.d.ts.map +0 -1
- package/dist/esm/association/schema/association.d.ts +0 -82
- package/dist/esm/association/schema/association.d.ts.map +0 -1
- package/dist/esm/association/schema/association.js +0 -23
- package/dist/esm/association/schema/schema.d.ts +0 -2
- package/dist/esm/association/schema/schema.d.ts.map +0 -1
- package/dist/esm/association/schema/schema.js +0 -1
- package/dist/esm/authentication/schema/factors.d.ts.map +0 -1
- package/dist/esm/authentication/schema/factors.test.d.ts +0 -2
- package/dist/esm/authentication/schema/factors.test.d.ts.map +0 -1
- package/dist/esm/authentication/schema/provider.d.ts.map +0 -1
- package/dist/esm/authentication/schema/schema.d.ts +0 -6
- package/dist/esm/authentication/schema/schema.d.ts.map +0 -1
- package/dist/esm/authentication/schema/schema.js +0 -5
- package/dist/esm/authentication/schema/session.d.ts +0 -59
- package/dist/esm/authentication/schema/session.d.ts.map +0 -1
- package/dist/esm/authentication/schema/settings.d.ts.map +0 -1
- package/dist/esm/authentication/schema/settings.js +0 -13
- package/dist/esm/authentication/schema/strategy/base.d.ts.map +0 -1
- package/dist/esm/authentication/schema/strategy/schema.d.ts.map +0 -1
- package/dist/esm/authentication/schema/strategy/types/email.d.ts.map +0 -1
- package/dist/esm/authentication/schema/strategy/types/password.d.ts.map +0 -1
- package/dist/esm/authentication/schema/strategy/types/password.js +0 -32
- package/dist/esm/authentication/schema/strategy/types/totp.d.ts.map +0 -1
- package/dist/esm/identity/schema/schema.d.ts.map +0 -1
- package/dist/esm/workspace/schema/authorization.d.ts.map +0 -1
- package/dist/esm/workspace/schema/branding.d.ts.map +0 -1
- package/dist/esm/workspace/schema/membership.d.ts.map +0 -1
- package/dist/esm/workspace/schema/registration.d.ts.map +0 -1
- package/dist/esm/workspace/schema/schema.d.ts +0 -10
- package/dist/esm/workspace/schema/schema.d.ts.map +0 -1
- package/dist/esm/workspace/schema/schema.js +0 -9
- package/dist/esm/workspace/schema/settings.d.ts.map +0 -1
- package/dist/esm/workspace/schema/user-notification.d.ts.map +0 -1
- package/dist/esm/workspace/schema/user-preferences.d.ts.map +0 -1
- package/dist/esm/workspace/schema/utils.d.ts.map +0 -1
- package/dist/cjs/app/{schema/utils.d.ts → utils.d.ts} +0 -0
- package/dist/cjs/app/{schema/utils.js → utils.js} +0 -0
- package/dist/cjs/identity/{schema/schema.d.ts → schema.d.ts} +0 -0
- package/dist/cjs/identity/{schema/schema.js → schema.js} +0 -0
- package/dist/cjs/workspace/{schema/authorization.js → authorization/schema.js} +0 -0
- package/dist/cjs/workspace/{schema/branding.js → branding/schema.js} +0 -0
- package/dist/cjs/workspace/{schema/membership.js → membership/schema.js} +0 -0
- package/dist/cjs/workspace/{schema/settings.js → settings/schema.js} +0 -0
- package/dist/cjs/workspace/{schema/utils.d.ts → utils.d.ts} +0 -0
- package/dist/cjs/workspace/{schema/utils.js → utils.js} +1 -1
- package/dist/esm/app/{schema/utils.d.ts → utils.d.ts} +0 -0
- package/dist/esm/app/{schema/utils.js → utils.js} +0 -0
- package/dist/esm/identity/{schema/schema.d.ts → schema.d.ts} +0 -0
- package/dist/esm/identity/{schema/schema.js → schema.js} +0 -0
- package/dist/esm/workspace/{schema/authorization.js → authorization/schema.js} +0 -0
- package/dist/esm/workspace/{schema/branding.js → branding/schema.js} +0 -0
- package/dist/esm/workspace/{schema/membership.js → membership/schema.js} +0 -0
- package/dist/esm/workspace/{schema/settings.js → settings/schema.js} +0 -0
- package/dist/esm/workspace/{schema/utils.d.ts → utils.d.ts} +0 -0
- package/dist/esm/workspace/{schema/utils.js → utils.js} +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { getItemWithAuthorization, insertItemWithAuthorization, } from '../../common/resources/operations.js';
|
|
2
|
+
import { parseEgressSchema } from '../../common/resources/utils.js';
|
|
3
|
+
import { PATH } from '../resources.js';
|
|
4
|
+
import { SettingsSchema, UpsertSettingsPayloadSchema, } from './schema.js';
|
|
5
|
+
const RESOURCE = 'settings';
|
|
6
|
+
export class SettingsResources {
|
|
7
|
+
instance;
|
|
8
|
+
constructor(instance) {
|
|
9
|
+
this.instance = instance;
|
|
10
|
+
}
|
|
11
|
+
static buildPath() {
|
|
12
|
+
return [PATH, RESOURCE].filter(Boolean).join('/');
|
|
13
|
+
}
|
|
14
|
+
getItem() {
|
|
15
|
+
return getSettings(this.instance);
|
|
16
|
+
}
|
|
17
|
+
upsertItem(item) {
|
|
18
|
+
return upsertSettings(this.instance, item);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export async function getSettings(instance) {
|
|
22
|
+
return parseEgressSchema(SettingsSchema(await getItemWithAuthorization(new URL(SettingsResources.buildPath(), instance.config.host), instance.authorizer)));
|
|
23
|
+
}
|
|
24
|
+
export async function upsertSettings(instance, item) {
|
|
25
|
+
return parseEgressSchema(SettingsSchema(await insertItemWithAuthorization(new URL(SettingsResources.buildPath(), instance.config.host), instance.authorizer, parseEgressSchema(UpsertSettingsPayloadSchema.onUndeclaredKey('delete')(item)))));
|
|
26
|
+
}
|
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
export declare const SettingsSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
2
|
+
createdAt: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
3
|
+
updatedAt: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
4
|
+
factors?: ((In: {
|
|
5
|
+
id: string;
|
|
6
|
+
nextFactors?: {
|
|
7
|
+
id: string;
|
|
8
|
+
nextFactors?: /*elided*/ any[] | null | undefined;
|
|
9
|
+
}[] | null | undefined;
|
|
10
|
+
}[] | null | undefined) => import("arktype").Out<{
|
|
11
|
+
id: string;
|
|
12
|
+
nextFactors?: {
|
|
13
|
+
id: string;
|
|
14
|
+
nextFactors?: /*elided*/ any[] | null | undefined;
|
|
15
|
+
}[] | null | undefined;
|
|
16
|
+
}[] | undefined>) | undefined;
|
|
17
|
+
deletedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
18
|
+
deactivatedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
19
|
+
metadata: (In: import("arktype/internal/attributes.ts").Default<unknown, Map<string, string | number | boolean>>) => import("arktype").Out<Map<string, string | number | boolean> | Map<string, any>>;
|
|
20
|
+
}, {}>;
|
|
21
|
+
export type SettingsProperties = typeof SettingsSchema.inferIn;
|
|
22
|
+
export type Settings = typeof SettingsSchema.inferOut;
|
|
1
23
|
export declare const SettingsPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
2
24
|
factors?: ((In: {
|
|
3
25
|
id: string;
|
|
@@ -5,19 +27,19 @@ export declare const SettingsPayloadSchema: import("arktype/internal/methods/obj
|
|
|
5
27
|
id: string;
|
|
6
28
|
nextFactors?: /*elided*/ any[] | null | undefined;
|
|
7
29
|
}[] | null | undefined;
|
|
8
|
-
}[] | null | undefined) => import("arktype
|
|
30
|
+
}[] | null | undefined) => import("arktype").Out<{
|
|
9
31
|
id: string;
|
|
10
32
|
nextFactors?: {
|
|
11
33
|
id: string;
|
|
12
34
|
nextFactors?: /*elided*/ any[] | null | undefined;
|
|
13
35
|
}[] | null | undefined;
|
|
14
36
|
}[] | undefined>) | undefined;
|
|
15
|
-
updatedAt?: ((In: string | Date | undefined) => import("arktype
|
|
16
|
-
deletedAt?: ((In: string | Date | undefined) => import("arktype
|
|
17
|
-
deactivatedAt?: ((In: string | Date | undefined) => import("arktype
|
|
37
|
+
updatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
38
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
39
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
18
40
|
metadata?: ((In: {
|
|
19
41
|
[x: string]: string | number | boolean;
|
|
20
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype
|
|
42
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
21
43
|
[x: string]: string | number | boolean;
|
|
22
44
|
} | undefined>) | undefined;
|
|
23
45
|
}, {}>;
|
|
@@ -29,7 +51,7 @@ export declare const UpsertSettingsPayloadSchema: import("arktype/internal/metho
|
|
|
29
51
|
id: string;
|
|
30
52
|
nextFactors?: /*elided*/ any[] | null | undefined;
|
|
31
53
|
}[] | null | undefined;
|
|
32
|
-
}[] | null | undefined) => import("arktype
|
|
54
|
+
}[] | null | undefined) => import("arktype").Out<{
|
|
33
55
|
id: string;
|
|
34
56
|
nextFactors?: {
|
|
35
57
|
id: string;
|
|
@@ -38,9 +60,10 @@ export declare const UpsertSettingsPayloadSchema: import("arktype/internal/metho
|
|
|
38
60
|
}[] | undefined>) | undefined;
|
|
39
61
|
metadata?: ((In: {
|
|
40
62
|
[x: string]: string | number | boolean;
|
|
41
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype
|
|
63
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
42
64
|
[x: string]: string | number | boolean;
|
|
43
65
|
} | null>) | undefined;
|
|
44
66
|
}, {}>;
|
|
67
|
+
export type UpsertSettingsInput = typeof UpsertSettingsPayloadSchema.inferIn;
|
|
45
68
|
export type UpsertSettingsPayload = typeof UpsertSettingsPayloadSchema.inferOut;
|
|
46
|
-
//# sourceMappingURL=
|
|
69
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/settings/schema.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;MAMM,CAAC;AAClC,MAAM,MAAM,kBAAkB,GAAG,OAAO,cAAc,CAAC,OAAO,CAAC;AAC/D,MAAM,MAAM,QAAQ,GAAG,OAAO,cAAc,CAAC,QAAQ,CAAC;AAEtD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;MAKG,CAAC;AACtC,MAAM,MAAM,eAAe,GAAG,OAAO,qBAAqB,CAAC,QAAQ,CAAC;AAEpE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;MAEG,CAAC;AAC5C,MAAM,MAAM,mBAAmB,GAAG,OAAO,2BAA2B,CAAC,OAAO,CAAC;AAC7E,MAAM,MAAM,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type } from 'arktype';
|
|
2
|
+
import { OptionalDatePayloadSchema, OptionalDateSchema, RequiredDateSchema, } from '../../common/schema/dates.js';
|
|
3
|
+
import { MetadataMapPropertySchema, MetadataPayloadPropertySchema, UpsertMetadataPayloadPropertySchema, } from '../../common/schema/metadata.js';
|
|
4
|
+
import { AuthenticationFactorsSchema } from '../factors/schema.js';
|
|
5
|
+
export const SettingsSchema = type({
|
|
6
|
+
factors: AuthenticationFactorsSchema.optional(),
|
|
7
|
+
createdAt: RequiredDateSchema,
|
|
8
|
+
updatedAt: RequiredDateSchema,
|
|
9
|
+
deletedAt: OptionalDateSchema.optional(),
|
|
10
|
+
deactivatedAt: OptionalDateSchema.optional(),
|
|
11
|
+
}).and(MetadataMapPropertySchema);
|
|
12
|
+
export const SettingsPayloadSchema = type({
|
|
13
|
+
factors: AuthenticationFactorsSchema.optional(),
|
|
14
|
+
'updatedAt?': OptionalDatePayloadSchema,
|
|
15
|
+
'deletedAt?': OptionalDatePayloadSchema,
|
|
16
|
+
'deactivatedAt?': OptionalDatePayloadSchema,
|
|
17
|
+
}).and(MetadataPayloadPropertySchema);
|
|
18
|
+
export const UpsertSettingsPayloadSchema = type({
|
|
19
|
+
factors: AuthenticationFactorsSchema.optional(),
|
|
20
|
+
}).and(UpsertMetadataPayloadPropertySchema);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { MondoIdentity } from '../../common/resources/init.js';
|
|
2
|
+
import { type PaginationCollection } from '../../common/schema/collection.js';
|
|
3
|
+
import type { Pagination } from '../../common/schema/pagination.js';
|
|
4
|
+
import { type InsertStrategyInput, type Strategy, type UpdateStrategyInput } from './schema/schema.js';
|
|
5
|
+
export declare class StrategyResources {
|
|
6
|
+
private readonly instance;
|
|
7
|
+
constructor(instance: MondoIdentity);
|
|
8
|
+
static buildPath(id?: string): string;
|
|
9
|
+
listItems(pagination?: Pagination): Promise<PaginationCollection<Strategy>>;
|
|
10
|
+
getItem(id: string): Promise<Strategy>;
|
|
11
|
+
insertItem(item: InsertStrategyInput): Promise<Strategy>;
|
|
12
|
+
updateItem(id: string, item: UpdateStrategyInput): Promise<Strategy>;
|
|
13
|
+
deleteItem(id: string): Promise<Strategy>;
|
|
14
|
+
}
|
|
15
|
+
export declare function listStrategies(instance: MondoIdentity, pagination?: Pagination): Promise<PaginationCollection<Strategy>>;
|
|
16
|
+
export declare function getStrategy(instance: MondoIdentity, id: string): Promise<Strategy>;
|
|
17
|
+
export declare function insertStrategy(instance: MondoIdentity, item: InsertStrategyInput): Promise<Strategy>;
|
|
18
|
+
export declare function updateStrategy(instance: MondoIdentity, id: string, item: UpdateStrategyInput): Promise<Strategy>;
|
|
19
|
+
export declare function deleteStrategy(instance: MondoIdentity, id: string): Promise<Strategy>;
|
|
20
|
+
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/authentication/strategies/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAWpE,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAEpE,OAAO,EACL,KAAK,mBAAmB,EAExB,KAAK,QAAQ,EAEb,KAAK,mBAAmB,EAEzB,MAAM,oBAAoB,CAAC;AAI5B,qBAAa,iBAAiB;IACT,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,aAAa;IAE3D,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;IAQ9B,SAAS,CACd,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAInC,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAItC,UAAU,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIxD,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIpE,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAGjD;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,aAAa,EACvB,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAWzC;AAED,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,aAAa,EACvB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,QAAQ,CAAC,CASnB;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,QAAQ,CAAC,CAYnB;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,aAAa,EACvB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,QAAQ,CAAC,CAYnB;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,aAAa,EACvB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,QAAQ,CAAC,CASnB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { deleteItemWithAuthorization, getItemWithAuthorization, insertItemWithAuthorization, updateItemWithAuthorization, } from '../../common/resources/operations.js';
|
|
2
|
+
import { addPaginationToURL, parseEgressSchema, } from '../../common/resources/utils.js';
|
|
3
|
+
import { PaginationCollectionSchema, } from '../../common/schema/collection.js';
|
|
4
|
+
import { PATH } from '../resources.js';
|
|
5
|
+
import { InsertStrategyPayloadSchema, StrategySchema, UpdateStrategyPayloadSchema, } from './schema/schema.js';
|
|
6
|
+
const RESOURCE = 'strategies';
|
|
7
|
+
export class StrategyResources {
|
|
8
|
+
instance;
|
|
9
|
+
constructor(instance) {
|
|
10
|
+
this.instance = instance;
|
|
11
|
+
}
|
|
12
|
+
static buildPath(id) {
|
|
13
|
+
if (id?.startsWith(PATH)) {
|
|
14
|
+
return id;
|
|
15
|
+
}
|
|
16
|
+
return [PATH, id].filter(Boolean).join('/');
|
|
17
|
+
}
|
|
18
|
+
listItems(pagination) {
|
|
19
|
+
return listStrategies(this.instance, pagination);
|
|
20
|
+
}
|
|
21
|
+
getItem(id) {
|
|
22
|
+
return getStrategy(this.instance, id);
|
|
23
|
+
}
|
|
24
|
+
insertItem(item) {
|
|
25
|
+
return insertStrategy(this.instance, item);
|
|
26
|
+
}
|
|
27
|
+
updateItem(id, item) {
|
|
28
|
+
return updateStrategy(this.instance, id, item);
|
|
29
|
+
}
|
|
30
|
+
deleteItem(id) {
|
|
31
|
+
return deleteStrategy(this.instance, id);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export async function listStrategies(instance, pagination) {
|
|
35
|
+
const url = addPaginationToURL(new URL(StrategyResources.buildPath(), instance.config.host), pagination);
|
|
36
|
+
return parseEgressSchema(PaginationCollectionSchema(StrategySchema)(await getItemWithAuthorization(url, instance.authorizer)));
|
|
37
|
+
}
|
|
38
|
+
export async function getStrategy(instance, id) {
|
|
39
|
+
return parseEgressSchema(StrategySchema(await getItemWithAuthorization(new URL(StrategyResources.buildPath(id), instance.config.host), instance.authorizer)));
|
|
40
|
+
}
|
|
41
|
+
export async function insertStrategy(instance, item) {
|
|
42
|
+
return parseEgressSchema(StrategySchema(await insertItemWithAuthorization(new URL(StrategyResources.buildPath(), instance.config.host), instance.authorizer, parseEgressSchema(InsertStrategyPayloadSchema.onUndeclaredKey('delete')(item)))));
|
|
43
|
+
}
|
|
44
|
+
export async function updateStrategy(instance, id, item) {
|
|
45
|
+
return parseEgressSchema(StrategySchema(await updateItemWithAuthorization(new URL(StrategyResources.buildPath(id), instance.config.host), instance.authorizer, parseEgressSchema(UpdateStrategyPayloadSchema.onUndeclaredKey('delete')(item)))));
|
|
46
|
+
}
|
|
47
|
+
export async function deleteStrategy(instance, id) {
|
|
48
|
+
return parseEgressSchema(StrategySchema(await deleteItemWithAuthorization(new URL(StrategyResources.buildPath(id), instance.config.host), instance.authorizer)));
|
|
49
|
+
}
|
|
@@ -18,17 +18,27 @@ export type StrategyIdProperty = typeof StrategyIdPropertySchema.inferOut;
|
|
|
18
18
|
export declare const StrategyStatusSchema: import("arktype/internal/methods/string.ts").StringType<"enabled" | "disabled", {}>;
|
|
19
19
|
export declare const StrategyTypeSchema: import("arktype/internal/methods/string.ts").StringType<"email" | "password" | "totp", {}>;
|
|
20
20
|
export declare const StrategyLabelSchema: import("arktype/internal/methods/string.ts").StringType<string, {}>;
|
|
21
|
+
export declare const BaseStrategySchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
22
|
+
id: string;
|
|
23
|
+
status: "enabled" | "disabled";
|
|
24
|
+
label: string;
|
|
25
|
+
createdAt: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
26
|
+
updatedAt: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
27
|
+
deletedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
28
|
+
deactivatedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
29
|
+
metadata: (In: import("arktype/internal/attributes.ts").Default<unknown, Map<string, string | number | boolean>>) => import("arktype").Out<Map<string, string | number | boolean> | Map<string, any>>;
|
|
30
|
+
}, {}>;
|
|
21
31
|
export declare const BaseStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
22
32
|
id: string;
|
|
23
33
|
status: "enabled" | "disabled";
|
|
24
34
|
label: string;
|
|
25
|
-
createdAt: (In: string | Date) => import("arktype
|
|
26
|
-
updatedAt: (In: string | Date) => import("arktype
|
|
27
|
-
deletedAt?: ((In: string | Date | undefined) => import("arktype
|
|
28
|
-
deactivatedAt?: ((In: string | Date | undefined) => import("arktype
|
|
35
|
+
createdAt: (In: string | Date) => import("arktype").Out<string>;
|
|
36
|
+
updatedAt: (In: string | Date) => import("arktype").Out<string>;
|
|
37
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
38
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
29
39
|
metadata?: ((In: {
|
|
30
40
|
[x: string]: string | number | boolean;
|
|
31
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype
|
|
41
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
32
42
|
[x: string]: string | number | boolean;
|
|
33
43
|
} | undefined>) | undefined;
|
|
34
44
|
}, {}>;
|
|
@@ -38,7 +48,7 @@ export declare const BaseInsertStrategyPayloadSchema: import("arktype/internal/m
|
|
|
38
48
|
id?: string | undefined;
|
|
39
49
|
metadata?: ((In: {
|
|
40
50
|
[x: string]: string | number | boolean;
|
|
41
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype
|
|
51
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
42
52
|
[x: string]: string | number | boolean;
|
|
43
53
|
} | undefined>) | undefined;
|
|
44
54
|
}, {}>;
|
|
@@ -47,7 +57,7 @@ export declare const BaseUpdateStrategyPayloadSchema: import("arktype/internal/m
|
|
|
47
57
|
status?: "enabled" | "disabled" | undefined;
|
|
48
58
|
metadata?: ((In: {
|
|
49
59
|
[x: string]: string | number | boolean;
|
|
50
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype
|
|
60
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
51
61
|
[x: string]: string | number | boolean;
|
|
52
62
|
} | undefined>) | undefined;
|
|
53
63
|
}, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/authentication/strategies/schema/base.ts"],"names":[],"mappings":"AAYA,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;AAOlD,eAAO,MAAM,kBAAkB;;;;;;;;;MAKE,CAAC;AAElC,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;MAKD,CAAC;AAEtC,eAAO,MAAM,+BAA+B;;;;;;;;;MAIP,CAAC;AAEtC,eAAO,MAAM,+BAA+B;;;;;;;;MAGP,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type } from 'arktype';
|
|
2
|
-
import { OptionalDatePayloadSchema, RequiredDatePayloadSchema, } from '../../../common/index.js';
|
|
3
|
-
import { MetadataPayloadPropertySchema } from '../../../common/schema/metadata.js';
|
|
2
|
+
import { OptionalDatePayloadSchema, OptionalDateSchema, RequiredDatePayloadSchema, RequiredDateSchema, } from '../../../common/index.js';
|
|
3
|
+
import { MetadataMapPropertySchema, MetadataPayloadPropertySchema, } from '../../../common/schema/metadata.js';
|
|
4
4
|
export const StrategyType = {
|
|
5
5
|
EMAIL: 'email',
|
|
6
6
|
PASSWORD: 'password',
|
|
@@ -17,9 +17,17 @@ export const StrategyIdPropertySchema = type({
|
|
|
17
17
|
export const StrategyStatusSchema = type.enumerated(StrategyStatus.ENABLED, StrategyStatus.DISABLED);
|
|
18
18
|
export const StrategyTypeSchema = type.enumerated(StrategyType.EMAIL, StrategyType.PASSWORD, StrategyType.TOTP);
|
|
19
19
|
export const StrategyLabelSchema = type('string');
|
|
20
|
-
|
|
20
|
+
const BaseSchema = StrategyIdPropertySchema.and({
|
|
21
21
|
status: StrategyStatusSchema,
|
|
22
22
|
label: StrategyLabelSchema,
|
|
23
|
+
});
|
|
24
|
+
export const BaseStrategySchema = BaseSchema.and({
|
|
25
|
+
createdAt: RequiredDateSchema,
|
|
26
|
+
updatedAt: RequiredDateSchema,
|
|
27
|
+
deletedAt: OptionalDateSchema.optional(),
|
|
28
|
+
deactivatedAt: OptionalDateSchema.optional(),
|
|
29
|
+
}).and(MetadataMapPropertySchema);
|
|
30
|
+
export const BaseStrategyPayloadSchema = BaseSchema.and({
|
|
23
31
|
createdAt: RequiredDatePayloadSchema,
|
|
24
32
|
updatedAt: RequiredDatePayloadSchema,
|
|
25
33
|
'deletedAt?': OptionalDatePayloadSchema,
|
|
@@ -2,107 +2,109 @@
|
|
|
2
2
|
* Union(s)
|
|
3
3
|
*/
|
|
4
4
|
export declare const InsertStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
5
|
+
type: "email";
|
|
5
6
|
label: string;
|
|
6
7
|
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
7
8
|
id?: string | undefined;
|
|
8
9
|
metadata?: ((In: {
|
|
9
10
|
[x: string]: string | number | boolean;
|
|
10
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype
|
|
11
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
11
12
|
[x: string]: string | number | boolean;
|
|
12
13
|
} | undefined>) | undefined;
|
|
13
|
-
type: "email";
|
|
14
14
|
} | {
|
|
15
|
+
type: "password";
|
|
15
16
|
label: string;
|
|
16
17
|
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
17
18
|
id?: string | undefined;
|
|
18
19
|
metadata?: ((In: {
|
|
19
20
|
[x: string]: string | number | boolean;
|
|
20
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype
|
|
21
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
21
22
|
[x: string]: string | number | boolean;
|
|
22
23
|
} | undefined>) | undefined;
|
|
23
|
-
|
|
24
|
-
settings: {
|
|
24
|
+
settings?: {
|
|
25
25
|
passwordPolicy: {
|
|
26
|
-
minimumLength: import("arktype/internal/attributes.ts").Default<number,
|
|
27
|
-
maximumLength: import("arktype/internal/attributes.ts").Default<number,
|
|
28
|
-
minimumCapital: import("arktype/internal/attributes.ts").Default<number,
|
|
29
|
-
minimumLower: import("arktype/internal/attributes.ts").Default<number,
|
|
30
|
-
minimumNumber: import("arktype/internal/attributes.ts").Default<number,
|
|
31
|
-
minimumSpecial: import("arktype/internal/attributes.ts").Default<number,
|
|
26
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
27
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
28
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
29
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
30
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
31
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
32
32
|
};
|
|
33
|
-
};
|
|
33
|
+
} | undefined;
|
|
34
34
|
} | {
|
|
35
|
+
type: "totp";
|
|
35
36
|
label: string;
|
|
36
37
|
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
37
38
|
id?: string | undefined;
|
|
38
39
|
metadata?: ((In: {
|
|
39
40
|
[x: string]: string | number | boolean;
|
|
40
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype
|
|
41
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
41
42
|
[x: string]: string | number | boolean;
|
|
42
43
|
} | undefined>) | undefined;
|
|
43
|
-
|
|
44
|
-
settings: {
|
|
44
|
+
settings?: {
|
|
45
45
|
digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
|
|
46
46
|
period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
|
|
47
47
|
algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
|
|
48
|
-
};
|
|
48
|
+
} | undefined;
|
|
49
49
|
}, {}>;
|
|
50
|
+
export type InsertStrategyInput = typeof InsertStrategyPayloadSchema.inferIn;
|
|
50
51
|
export type InsertStrategyPayload = typeof InsertStrategyPayloadSchema.inferOut;
|
|
51
52
|
export declare const UpdateStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
53
|
+
type: "email";
|
|
52
54
|
label?: string | undefined;
|
|
53
55
|
status?: "enabled" | "disabled" | undefined;
|
|
54
56
|
metadata?: ((In: {
|
|
55
57
|
[x: string]: string | number | boolean;
|
|
56
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype
|
|
58
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
57
59
|
[x: string]: string | number | boolean;
|
|
58
60
|
} | undefined>) | undefined;
|
|
59
|
-
type: "email";
|
|
60
61
|
} | {
|
|
62
|
+
type: "password";
|
|
61
63
|
label?: string | undefined;
|
|
62
64
|
status?: "enabled" | "disabled" | undefined;
|
|
63
65
|
metadata?: ((In: {
|
|
64
66
|
[x: string]: string | number | boolean;
|
|
65
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype
|
|
67
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
66
68
|
[x: string]: string | number | boolean;
|
|
67
69
|
} | undefined>) | undefined;
|
|
68
|
-
|
|
69
|
-
settings: {
|
|
70
|
+
settings?: {
|
|
70
71
|
passwordPolicy: {
|
|
71
|
-
minimumLength: import("arktype/internal/attributes.ts").Default<number,
|
|
72
|
-
maximumLength: import("arktype/internal/attributes.ts").Default<number,
|
|
73
|
-
minimumCapital: import("arktype/internal/attributes.ts").Default<number,
|
|
74
|
-
minimumLower: import("arktype/internal/attributes.ts").Default<number,
|
|
75
|
-
minimumNumber: import("arktype/internal/attributes.ts").Default<number,
|
|
76
|
-
minimumSpecial: import("arktype/internal/attributes.ts").Default<number,
|
|
72
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
73
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
74
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
75
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
76
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
77
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
77
78
|
};
|
|
78
|
-
};
|
|
79
|
+
} | undefined;
|
|
79
80
|
} | {
|
|
81
|
+
type: "totp";
|
|
80
82
|
label?: string | undefined;
|
|
81
83
|
status?: "enabled" | "disabled" | undefined;
|
|
82
84
|
metadata?: ((In: {
|
|
83
85
|
[x: string]: string | number | boolean;
|
|
84
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype
|
|
86
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
85
87
|
[x: string]: string | number | boolean;
|
|
86
88
|
} | undefined>) | undefined;
|
|
87
|
-
|
|
88
|
-
settings: {
|
|
89
|
+
settings?: {
|
|
89
90
|
digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
|
|
90
91
|
period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
|
|
91
92
|
algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
|
|
92
|
-
};
|
|
93
|
+
} | undefined;
|
|
93
94
|
}, {}>;
|
|
95
|
+
export type UpdateStrategyInput = typeof UpdateStrategyPayloadSchema.inferIn;
|
|
94
96
|
export type UpdateStrategyPayload = typeof UpdateStrategyPayloadSchema.inferOut;
|
|
95
97
|
export declare const StrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
96
98
|
id: string;
|
|
97
99
|
status: "enabled" | "disabled";
|
|
98
100
|
label: string;
|
|
99
|
-
createdAt: (In: string | Date) => import("arktype
|
|
100
|
-
updatedAt: (In: string | Date) => import("arktype
|
|
101
|
-
deletedAt?: ((In: string | Date | undefined) => import("arktype
|
|
102
|
-
deactivatedAt?: ((In: string | Date | undefined) => import("arktype
|
|
101
|
+
createdAt: (In: string | Date) => import("arktype").Out<string>;
|
|
102
|
+
updatedAt: (In: string | Date) => import("arktype").Out<string>;
|
|
103
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
104
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
103
105
|
metadata?: ((In: {
|
|
104
106
|
[x: string]: string | number | boolean;
|
|
105
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype
|
|
107
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
106
108
|
[x: string]: string | number | boolean;
|
|
107
109
|
} | undefined>) | undefined;
|
|
108
110
|
type: "email";
|
|
@@ -110,37 +112,37 @@ export declare const StrategyPayloadSchema: import("arktype/internal/methods/obj
|
|
|
110
112
|
id: string;
|
|
111
113
|
status: "enabled" | "disabled";
|
|
112
114
|
label: string;
|
|
113
|
-
createdAt: (In: string | Date) => import("arktype
|
|
114
|
-
updatedAt: (In: string | Date) => import("arktype
|
|
115
|
-
deletedAt?: ((In: string | Date | undefined) => import("arktype
|
|
116
|
-
deactivatedAt?: ((In: string | Date | undefined) => import("arktype
|
|
115
|
+
createdAt: (In: string | Date) => import("arktype").Out<string>;
|
|
116
|
+
updatedAt: (In: string | Date) => import("arktype").Out<string>;
|
|
117
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
118
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
117
119
|
metadata?: ((In: {
|
|
118
120
|
[x: string]: string | number | boolean;
|
|
119
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype
|
|
121
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
120
122
|
[x: string]: string | number | boolean;
|
|
121
123
|
} | undefined>) | undefined;
|
|
122
124
|
type: "password";
|
|
123
125
|
settings: {
|
|
124
126
|
passwordPolicy: {
|
|
125
|
-
minimumLength: import("arktype/internal/attributes.ts").Default<number,
|
|
126
|
-
maximumLength: import("arktype/internal/attributes.ts").Default<number,
|
|
127
|
-
minimumCapital: import("arktype/internal/attributes.ts").Default<number,
|
|
128
|
-
minimumLower: import("arktype/internal/attributes.ts").Default<number,
|
|
129
|
-
minimumNumber: import("arktype/internal/attributes.ts").Default<number,
|
|
130
|
-
minimumSpecial: import("arktype/internal/attributes.ts").Default<number,
|
|
127
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
128
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
129
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
130
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
131
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
132
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
131
133
|
};
|
|
132
134
|
};
|
|
133
135
|
} | {
|
|
134
136
|
id: string;
|
|
135
137
|
status: "enabled" | "disabled";
|
|
136
138
|
label: string;
|
|
137
|
-
createdAt: (In: string | Date) => import("arktype
|
|
138
|
-
updatedAt: (In: string | Date) => import("arktype
|
|
139
|
-
deletedAt?: ((In: string | Date | undefined) => import("arktype
|
|
140
|
-
deactivatedAt?: ((In: string | Date | undefined) => import("arktype
|
|
139
|
+
createdAt: (In: string | Date) => import("arktype").Out<string>;
|
|
140
|
+
updatedAt: (In: string | Date) => import("arktype").Out<string>;
|
|
141
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
142
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
141
143
|
metadata?: ((In: {
|
|
142
144
|
[x: string]: string | number | boolean;
|
|
143
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype
|
|
145
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
144
146
|
[x: string]: string | number | boolean;
|
|
145
147
|
} | undefined>) | undefined;
|
|
146
148
|
type: "totp";
|
|
@@ -151,6 +153,53 @@ export declare const StrategyPayloadSchema: import("arktype/internal/methods/obj
|
|
|
151
153
|
};
|
|
152
154
|
}, {}>;
|
|
153
155
|
export type StrategyPayload = typeof StrategyPayloadSchema.inferOut;
|
|
156
|
+
export declare const StrategySchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
157
|
+
id: string;
|
|
158
|
+
status: "enabled" | "disabled";
|
|
159
|
+
label: string;
|
|
160
|
+
createdAt: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
161
|
+
updatedAt: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
162
|
+
deletedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
163
|
+
deactivatedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
164
|
+
metadata: (In: import("arktype/internal/attributes.ts").Default<unknown, Map<string, string | number | boolean>>) => import("arktype").Out<Map<string, string | number | boolean> | Map<string, any>>;
|
|
165
|
+
type: "email";
|
|
166
|
+
} | {
|
|
167
|
+
id: string;
|
|
168
|
+
status: "enabled" | "disabled";
|
|
169
|
+
label: string;
|
|
170
|
+
createdAt: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
171
|
+
updatedAt: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
172
|
+
deletedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
173
|
+
deactivatedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
174
|
+
metadata: (In: import("arktype/internal/attributes.ts").Default<unknown, Map<string, string | number | boolean>>) => import("arktype").Out<Map<string, string | number | boolean> | Map<string, any>>;
|
|
175
|
+
type: "password";
|
|
176
|
+
settings: {
|
|
177
|
+
passwordPolicy: {
|
|
178
|
+
minimumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
179
|
+
maximumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
180
|
+
minimumCapital: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
181
|
+
minimumLower: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
182
|
+
minimumNumber: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
183
|
+
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
} | {
|
|
187
|
+
id: string;
|
|
188
|
+
status: "enabled" | "disabled";
|
|
189
|
+
label: string;
|
|
190
|
+
createdAt: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
191
|
+
updatedAt: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
192
|
+
deletedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
193
|
+
deactivatedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
194
|
+
metadata: (In: import("arktype/internal/attributes.ts").Default<unknown, Map<string, string | number | boolean>>) => import("arktype").Out<Map<string, string | number | boolean> | Map<string, any>>;
|
|
195
|
+
type: "totp";
|
|
196
|
+
settings: {
|
|
197
|
+
digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
|
|
198
|
+
period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
|
|
199
|
+
algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
|
|
200
|
+
};
|
|
201
|
+
}, {}>;
|
|
202
|
+
export type Strategy = typeof StrategySchema.inferOut;
|
|
154
203
|
export { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseUpdateStrategyPayloadSchema, StrategyIdPropertySchema, StrategyIdSchema, StrategyLabelSchema, StrategyStatus, StrategyStatusSchema, StrategyType, type AnyStrategyStatus, type AnyStrategyType, type StrategyId, type StrategyIdProperty, } from './base.js';
|
|
155
204
|
export * from './types/email.js';
|
|
156
205
|
export * from './types/password.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/authentication/strategies/schema/schema.ts"],"names":[],"mappings":"AAmBA;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAGrC,CAAC;AACJ,MAAM,MAAM,mBAAmB,GAAG,OAAO,2BAA2B,CAAC,OAAO,CAAC;AAC7E,MAAM,MAAM,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,QAAQ,CAAC;AAEhF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAGrC,CAAC;AACJ,MAAM,MAAM,mBAAmB,GAAG,OAAO,2BAA2B,CAAC,OAAO,CAAC;AAC7E,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,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAC4C,CAAC;AACxE,MAAM,MAAM,QAAQ,GAAG,OAAO,cAAc,CAAC,QAAQ,CAAC;AAEtD,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"}
|
|
@@ -1,12 +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';
|
|
1
|
+
import { EmailStrategyPayloadSchema, EmailStrategySchema, InsertEmailStrategyPayloadSchema, UpdateEmailStrategyPayloadSchema, } from './types/email.js';
|
|
2
|
+
import { InsertPasswordStrategyPayloadSchema, PasswordStrategyPayloadSchema, PasswordStrategySchema, UpdatePasswordStrategyPayloadSchema, } from './types/password.js';
|
|
3
|
+
import { InsertTOTPStrategyPayloadSchema, TOTPStrategyPayloadSchema, TOTPStrategySchema, UpdateTOTPStrategyPayloadSchema, } from './types/totp.js';
|
|
4
4
|
/**
|
|
5
5
|
* Union(s)
|
|
6
6
|
*/
|
|
7
7
|
export const InsertStrategyPayloadSchema = InsertPasswordStrategyPayloadSchema.or(InsertEmailStrategyPayloadSchema).or(InsertTOTPStrategyPayloadSchema);
|
|
8
8
|
export const UpdateStrategyPayloadSchema = UpdatePasswordStrategyPayloadSchema.or(UpdateEmailStrategyPayloadSchema).or(UpdateTOTPStrategyPayloadSchema);
|
|
9
9
|
export const StrategyPayloadSchema = PasswordStrategyPayloadSchema.or(EmailStrategyPayloadSchema.or(TOTPStrategyPayloadSchema));
|
|
10
|
+
export const StrategySchema = PasswordStrategySchema.or(EmailStrategySchema).or(TOTPStrategySchema);
|
|
10
11
|
export { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseUpdateStrategyPayloadSchema, StrategyIdPropertySchema, StrategyIdSchema, StrategyLabelSchema, StrategyStatus, StrategyStatusSchema, StrategyType, } from './base.js';
|
|
11
12
|
export * from './types/email.js';
|
|
12
13
|
export * from './types/password.js';
|