@go-mondo/identity-sdk 0.0.1 → 0.0.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yaml +105 -0
- package/.release-please-manifest.json +3 -1
- package/.tsbuildinfo/cjs.json +1 -0
- package/.tsbuildinfo/esm.json +1 -0
- package/.vscode/settings.json +41 -0
- package/CHANGELOG.md +38 -0
- package/biome.json +1 -1
- package/dist/cjs/action/index.d.ts +2 -0
- package/dist/cjs/action/index.d.ts.map +1 -0
- package/dist/cjs/action/index.js +17 -0
- package/dist/cjs/action/schema/base.d.ts +21 -0
- package/dist/cjs/action/schema/base.d.ts.map +1 -0
- package/dist/cjs/action/schema/base.js +19 -0
- package/dist/cjs/action/schema/operations/set-password.d.ts +31 -0
- package/dist/cjs/action/schema/operations/set-password.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/set-password.js +18 -0
- package/dist/cjs/action/schema/operations/sign-up-verification.d.ts +22 -0
- package/dist/cjs/action/schema/operations/sign-up-verification.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/sign-up-verification.js +15 -0
- package/dist/cjs/action/schema/operations/sign-up.d.ts +44 -0
- package/dist/cjs/action/schema/operations/sign-up.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/sign-up.js +21 -0
- package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts +20 -0
- package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/user-attribute-verification.js +13 -0
- package/dist/cjs/action/schema/schema.d.ts +92 -0
- package/dist/cjs/action/schema/schema.d.ts.map +1 -0
- package/dist/cjs/action/schema/schema.js +40 -0
- package/dist/cjs/activity/index.d.ts +2 -0
- package/dist/cjs/activity/index.d.ts.map +1 -0
- package/dist/cjs/activity/index.js +17 -0
- package/dist/cjs/activity/schema/base.d.ts +54 -0
- package/dist/cjs/activity/schema/base.d.ts.map +1 -0
- package/dist/cjs/activity/schema/base.js +34 -0
- package/dist/cjs/activity/schema/schema.d.ts +156 -0
- package/dist/cjs/activity/schema/schema.d.ts.map +1 -0
- package/dist/cjs/activity/schema/schema.js +54 -0
- package/dist/cjs/activity/schema/types/authentication.d.ts +29 -0
- package/dist/cjs/activity/schema/types/authentication.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/authentication.js +16 -0
- package/dist/cjs/activity/schema/types/authorization.d.ts +29 -0
- package/dist/cjs/activity/schema/types/authorization.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/authorization.js +17 -0
- package/dist/cjs/activity/schema/types/note.d.ts +51 -0
- package/dist/cjs/activity/schema/types/note.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/note.js +17 -0
- package/dist/cjs/activity/schema/types/operation.d.ts +31 -0
- package/dist/cjs/activity/schema/types/operation.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/operation.js +18 -0
- package/dist/cjs/activity/schema/types/unknown.d.ts +22 -0
- package/dist/cjs/activity/schema/types/unknown.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/unknown.js +9 -0
- package/dist/cjs/activity/schema/utils.d.ts +7 -0
- package/dist/cjs/activity/schema/utils.d.ts.map +1 -0
- package/dist/cjs/activity/schema/utils.js +16 -0
- package/dist/cjs/app/index.d.ts +2 -0
- package/dist/cjs/app/index.d.ts.map +1 -0
- package/dist/cjs/app/index.js +17 -0
- package/dist/cjs/app/schema/app.d.ts +58 -0
- package/dist/cjs/app/schema/app.d.ts.map +1 -0
- package/dist/cjs/app/schema/app.js +43 -0
- package/dist/cjs/app/schema/authorization.d.ts +37 -0
- package/dist/cjs/app/schema/authorization.d.ts.map +1 -0
- package/dist/cjs/app/schema/authorization.js +44 -0
- package/dist/cjs/app/schema/oauth.d.ts +30 -0
- package/dist/cjs/app/schema/oauth.d.ts.map +1 -0
- package/dist/cjs/app/schema/oauth.js +21 -0
- package/dist/cjs/app/schema/oidc.d.ts +28 -0
- package/dist/cjs/app/schema/oidc.d.ts.map +1 -0
- package/dist/cjs/app/schema/oidc.js +13 -0
- package/dist/cjs/app/schema/registration.d.ts +22 -0
- package/dist/cjs/app/schema/registration.d.ts.map +1 -0
- package/dist/cjs/app/schema/registration.js +16 -0
- package/dist/cjs/app/schema/saml.d.ts +28 -0
- package/dist/cjs/app/schema/saml.d.ts.map +1 -0
- package/dist/cjs/app/schema/saml.js +13 -0
- package/dist/cjs/app/schema/schema.d.ts +8 -0
- package/dist/cjs/app/schema/schema.d.ts.map +1 -0
- package/dist/cjs/app/schema/schema.js +23 -0
- package/dist/cjs/app/schema/utils.d.ts +11 -0
- package/dist/cjs/app/schema/utils.d.ts.map +1 -0
- package/dist/cjs/app/schema/utils.js +23 -0
- package/dist/cjs/association/index.d.ts +2 -0
- package/dist/cjs/association/index.d.ts.map +1 -0
- package/dist/cjs/association/index.js +17 -0
- package/dist/cjs/association/schema/association.d.ts +82 -0
- package/dist/cjs/association/schema/association.d.ts.map +1 -0
- package/dist/cjs/association/schema/association.js +26 -0
- package/dist/cjs/association/schema/schema.d.ts +2 -0
- package/dist/cjs/association/schema/schema.d.ts.map +1 -0
- package/dist/cjs/association/schema/schema.js +17 -0
- package/dist/cjs/authentication/index.d.ts +2 -0
- package/dist/cjs/authentication/index.d.ts.map +1 -0
- package/dist/cjs/authentication/index.js +17 -0
- package/dist/cjs/authentication/schema/factors.d.ts +48 -0
- package/dist/cjs/authentication/schema/factors.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/factors.js +28 -0
- package/dist/cjs/authentication/schema/factors.test.d.ts +2 -0
- package/dist/cjs/authentication/schema/factors.test.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/factors.test.js +123 -0
- package/dist/cjs/authentication/schema/provider.d.ts +27 -0
- package/dist/cjs/authentication/schema/provider.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/provider.js +24 -0
- package/dist/cjs/authentication/schema/schema.d.ts +6 -0
- package/dist/cjs/authentication/schema/schema.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/schema.js +21 -0
- package/dist/cjs/authentication/schema/session.d.ts +59 -0
- package/dist/cjs/authentication/schema/session.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/session.js +46 -0
- package/dist/cjs/authentication/schema/settings.d.ts +46 -0
- package/dist/cjs/authentication/schema/settings.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/settings.js +16 -0
- package/dist/cjs/authentication/schema/strategy/base.d.ts +54 -0
- package/dist/cjs/authentication/schema/strategy/base.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/base.js +39 -0
- package/dist/cjs/authentication/schema/strategy/schema.d.ts +158 -0
- package/dist/cjs/authentication/schema/strategy/schema.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/schema.js +39 -0
- package/dist/cjs/authentication/schema/strategy/types/email.d.ts +44 -0
- package/dist/cjs/authentication/schema/strategy/types/email.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/types/email.js +20 -0
- package/dist/cjs/authentication/schema/strategy/types/password.d.ts +99 -0
- package/dist/cjs/authentication/schema/strategy/types/password.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/types/password.js +35 -0
- package/dist/cjs/authentication/schema/strategy/types/totp.d.ts +91 -0
- package/dist/cjs/authentication/schema/strategy/types/totp.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/types/totp.js +48 -0
- package/dist/cjs/authorization/index.d.ts +6 -0
- package/dist/cjs/authorization/index.d.ts.map +1 -0
- package/dist/cjs/authorization/index.js +21 -0
- package/dist/cjs/authorization/permissions/resources.d.ts +20 -0
- package/dist/cjs/authorization/permissions/resources.d.ts.map +1 -0
- package/dist/cjs/authorization/permissions/resources.js +57 -0
- package/dist/cjs/authorization/permissions/schema.d.ts +104 -0
- package/dist/cjs/authorization/permissions/schema.d.ts.map +1 -0
- package/dist/cjs/authorization/permissions/schema.js +66 -0
- package/dist/cjs/authorization/roles/resources.d.ts +20 -0
- package/dist/cjs/authorization/roles/resources.d.ts.map +1 -0
- package/dist/cjs/authorization/roles/resources.js +57 -0
- package/dist/cjs/authorization/roles/schema.d.ts +113 -0
- package/dist/cjs/authorization/roles/schema.d.ts.map +1 -0
- package/dist/cjs/authorization/roles/schema.js +72 -0
- package/dist/cjs/authorization/utils.d.ts +11 -0
- package/dist/cjs/authorization/utils.d.ts.map +1 -0
- package/dist/cjs/authorization/utils.js +23 -0
- package/dist/cjs/common/errors/http.d.ts +17 -0
- package/dist/cjs/common/errors/http.d.ts.map +1 -0
- package/dist/cjs/common/errors/http.js +18 -0
- package/dist/cjs/common/errors/validation.d.ts +11 -0
- package/dist/cjs/common/errors/validation.d.ts.map +1 -0
- package/dist/cjs/common/errors/validation.js +12 -0
- package/dist/cjs/common/index.d.ts +6 -0
- package/dist/cjs/common/index.d.ts.map +1 -0
- package/dist/cjs/common/index.js +21 -0
- package/dist/cjs/common/resources/authorization.d.ts +2 -0
- package/dist/cjs/common/resources/authorization.d.ts.map +1 -0
- package/dist/cjs/common/resources/authorization.js +2 -0
- package/dist/cjs/common/resources/init.d.ts +16 -0
- package/dist/cjs/common/resources/init.d.ts.map +1 -0
- package/dist/cjs/common/resources/init.js +38 -0
- package/dist/cjs/common/resources/operations.d.ts +7 -0
- package/dist/cjs/common/resources/operations.d.ts.map +1 -0
- package/dist/cjs/common/resources/operations.js +90 -0
- package/dist/cjs/common/resources/utils.d.ts +18 -0
- package/dist/cjs/common/resources/utils.d.ts.map +1 -0
- package/dist/cjs/common/resources/utils.js +96 -0
- package/dist/cjs/common/schema/aggregate.d.ts +6 -0
- package/dist/cjs/common/schema/aggregate.d.ts.map +1 -0
- package/dist/cjs/common/schema/aggregate.js +8 -0
- package/dist/cjs/common/schema/collection.d.ts +18 -0
- package/dist/cjs/common/schema/collection.d.ts.map +1 -0
- package/dist/cjs/common/schema/collection.js +10 -0
- package/dist/cjs/common/schema/dates.d.ts +39 -0
- package/dist/cjs/common/schema/dates.d.ts.map +1 -0
- package/dist/cjs/common/schema/dates.js +34 -0
- package/dist/cjs/common/schema/dates.test.d.ts +2 -0
- package/dist/cjs/common/schema/dates.test.d.ts.map +1 -0
- package/dist/cjs/common/schema/dates.test.js +33 -0
- package/dist/cjs/common/schema/jwt.d.ts +21 -0
- package/dist/cjs/common/schema/jwt.d.ts.map +1 -0
- package/dist/cjs/common/schema/jwt.js +24 -0
- package/dist/cjs/common/schema/metadata.d.ts +47 -0
- package/dist/cjs/common/schema/metadata.d.ts.map +1 -0
- package/dist/cjs/common/schema/metadata.js +88 -0
- package/dist/cjs/common/schema/metadata.test.d.ts +2 -0
- package/dist/cjs/common/schema/metadata.test.d.ts.map +1 -0
- package/dist/cjs/common/schema/metadata.test.js +62 -0
- package/dist/cjs/common/schema/pagination.d.ts +6 -0
- package/dist/cjs/common/schema/pagination.d.ts.map +1 -0
- package/dist/cjs/common/schema/pagination.js +8 -0
- package/dist/cjs/common/schema/schema.d.ts +8 -0
- package/dist/cjs/common/schema/schema.d.ts.map +1 -0
- package/dist/cjs/common/schema/schema.js +23 -0
- package/dist/cjs/common/schema/sets.d.ts +3 -0
- package/dist/cjs/common/schema/sets.d.ts.map +1 -0
- package/dist/cjs/common/schema/sets.js +9 -0
- package/dist/cjs/customer/index.d.ts +4 -0
- package/dist/cjs/customer/index.d.ts.map +1 -0
- package/dist/cjs/customer/index.js +19 -0
- package/dist/cjs/customer/schema/organization.d.ts +54 -0
- package/dist/cjs/customer/schema/organization.d.ts.map +1 -0
- package/dist/cjs/customer/schema/organization.js +40 -0
- package/dist/cjs/customer/schema/schema.d.ts +4 -0
- package/dist/cjs/customer/schema/schema.d.ts.map +1 -0
- package/dist/cjs/customer/schema/schema.js +19 -0
- package/dist/cjs/customer/schema/utils.d.ts +11 -0
- package/dist/cjs/customer/schema/utils.d.ts.map +1 -0
- package/dist/cjs/customer/schema/utils.js +23 -0
- package/dist/cjs/customer/users/resources.d.ts +20 -0
- package/dist/cjs/customer/users/resources.d.ts.map +1 -0
- package/dist/cjs/customer/users/resources.js +57 -0
- package/dist/cjs/customer/users/schema.d.ts +151 -0
- package/dist/cjs/customer/users/schema.d.ts.map +1 -0
- package/dist/cjs/customer/users/schema.js +91 -0
- package/dist/cjs/customer/users/schema.test.d.ts +2 -0
- package/dist/cjs/customer/users/schema.test.d.ts.map +1 -0
- package/dist/cjs/customer/users/schema.test.js +57 -0
- package/dist/cjs/identity/index.d.ts +2 -0
- package/dist/cjs/identity/index.d.ts.map +1 -0
- package/dist/cjs/identity/index.js +17 -0
- package/dist/cjs/identity/schema/schema.d.ts +7 -0
- package/dist/cjs/identity/schema/schema.d.ts.map +1 -0
- package/dist/cjs/identity/schema/schema.js +9 -0
- package/dist/cjs/oauth/authorize/index.d.ts +2 -0
- package/dist/cjs/oauth/authorize/index.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/index.js +17 -0
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.d.ts +29 -0
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.js +34 -0
- package/dist/cjs/oauth/authorize/schema/grants/implicit.d.ts +11 -0
- package/dist/cjs/oauth/authorize/schema/grants/implicit.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/schema/grants/implicit.js +21 -0
- package/dist/cjs/oauth/authorize/schema/schema.d.ts +42 -0
- package/dist/cjs/oauth/authorize/schema/schema.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/schema/schema.js +25 -0
- package/dist/cjs/oauth/common/schema.d.ts +62 -0
- package/dist/cjs/oauth/common/schema.d.ts.map +1 -0
- package/dist/cjs/oauth/common/schema.js +54 -0
- package/dist/cjs/oauth/index.d.ts +4 -0
- package/dist/cjs/oauth/index.d.ts.map +1 -0
- package/dist/cjs/oauth/index.js +49 -0
- package/dist/cjs/oauth/token/index.d.ts +2 -0
- package/dist/cjs/oauth/token/index.d.ts.map +1 -0
- package/dist/cjs/oauth/token/index.js +17 -0
- package/dist/cjs/oauth/token/schema/grants/authorization-code.d.ts +10 -0
- package/dist/cjs/oauth/token/schema/grants/authorization-code.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/grants/authorization-code.js +20 -0
- package/dist/cjs/oauth/token/schema/grants/client-credentials.d.ts +21 -0
- package/dist/cjs/oauth/token/schema/grants/client-credentials.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/grants/client-credentials.js +25 -0
- package/dist/cjs/oauth/token/schema/grants/refresh-token.d.ts +9 -0
- package/dist/cjs/oauth/token/schema/grants/refresh-token.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/grants/refresh-token.js +17 -0
- package/dist/cjs/oauth/token/schema/schema.d.ts +28 -0
- package/dist/cjs/oauth/token/schema/schema.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/schema.js +27 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/workspace/index.d.ts +2 -0
- package/dist/cjs/workspace/index.d.ts.map +1 -0
- package/dist/cjs/workspace/index.js +17 -0
- package/dist/cjs/workspace/schema/authorization.d.ts +31 -0
- package/dist/cjs/workspace/schema/authorization.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/authorization.js +22 -0
- package/dist/cjs/workspace/schema/branding.d.ts +38 -0
- package/dist/cjs/workspace/schema/branding.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/branding.js +25 -0
- package/dist/cjs/workspace/schema/membership.d.ts +25 -0
- package/dist/cjs/workspace/schema/membership.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/membership.js +19 -0
- package/dist/cjs/workspace/schema/registration.d.ts +28 -0
- package/dist/cjs/workspace/schema/registration.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/registration.js +22 -0
- package/dist/cjs/workspace/schema/schema.d.ts +10 -0
- package/dist/cjs/workspace/schema/schema.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/schema.js +25 -0
- package/dist/cjs/workspace/schema/settings.d.ts +23 -0
- package/dist/cjs/workspace/schema/settings.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/settings.js +15 -0
- package/dist/cjs/workspace/schema/tenant.d.ts +57 -0
- package/dist/cjs/workspace/schema/tenant.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/tenant.js +26 -0
- package/dist/cjs/workspace/schema/user-notification.d.ts +62 -0
- package/dist/cjs/workspace/schema/user-notification.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/user-notification.js +44 -0
- package/dist/cjs/workspace/schema/user-preferences.d.ts +26 -0
- package/dist/cjs/workspace/schema/user-preferences.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/user-preferences.js +19 -0
- package/dist/cjs/workspace/schema/utils.d.ts +15 -0
- package/dist/cjs/workspace/schema/utils.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/utils.js +64 -0
- package/dist/esm/action/index.d.ts +2 -0
- package/dist/esm/action/index.d.ts.map +1 -0
- package/dist/esm/action/index.js +1 -0
- package/dist/esm/action/schema/base.d.ts +21 -0
- package/dist/esm/action/schema/base.d.ts.map +1 -0
- package/dist/esm/action/schema/base.js +16 -0
- package/dist/esm/action/schema/operations/set-password.d.ts +31 -0
- package/dist/esm/action/schema/operations/set-password.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/set-password.js +15 -0
- package/dist/esm/action/schema/operations/sign-up-verification.d.ts +22 -0
- package/dist/esm/action/schema/operations/sign-up-verification.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/sign-up-verification.js +12 -0
- package/dist/esm/action/schema/operations/sign-up.d.ts +44 -0
- package/dist/esm/action/schema/operations/sign-up.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/sign-up.js +18 -0
- package/dist/esm/action/schema/operations/user-attribute-verification.d.ts +20 -0
- package/dist/esm/action/schema/operations/user-attribute-verification.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/user-attribute-verification.js +10 -0
- package/dist/esm/action/schema/schema.d.ts +92 -0
- package/dist/esm/action/schema/schema.d.ts.map +1 -0
- package/dist/esm/action/schema/schema.js +21 -0
- package/dist/esm/activity/index.d.ts +2 -0
- package/dist/esm/activity/index.d.ts.map +1 -0
- package/dist/esm/activity/index.js +1 -0
- package/dist/esm/activity/schema/base.d.ts +54 -0
- package/dist/esm/activity/schema/base.d.ts.map +1 -0
- package/dist/esm/activity/schema/base.js +31 -0
- package/dist/esm/activity/schema/schema.d.ts +156 -0
- package/dist/esm/activity/schema/schema.d.ts.map +1 -0
- package/dist/esm/activity/schema/schema.js +33 -0
- package/dist/esm/activity/schema/types/authentication.d.ts +29 -0
- package/dist/esm/activity/schema/types/authentication.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/authentication.js +13 -0
- package/dist/esm/activity/schema/types/authorization.d.ts +29 -0
- package/dist/esm/activity/schema/types/authorization.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/authorization.js +14 -0
- package/dist/esm/activity/schema/types/note.d.ts +51 -0
- package/dist/esm/activity/schema/types/note.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/note.js +14 -0
- package/dist/esm/activity/schema/types/operation.d.ts +31 -0
- package/dist/esm/activity/schema/types/operation.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/operation.js +15 -0
- package/dist/esm/activity/schema/types/unknown.d.ts +22 -0
- package/dist/esm/activity/schema/types/unknown.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/unknown.js +6 -0
- package/dist/esm/activity/schema/utils.d.ts +7 -0
- package/dist/esm/activity/schema/utils.d.ts.map +1 -0
- package/dist/esm/activity/schema/utils.js +9 -0
- package/dist/esm/app/index.d.ts +2 -0
- package/dist/esm/app/index.d.ts.map +1 -0
- package/dist/esm/app/index.js +1 -0
- package/dist/esm/app/schema/app.d.ts +58 -0
- package/dist/esm/app/schema/app.d.ts.map +1 -0
- package/dist/esm/app/schema/app.js +40 -0
- package/dist/esm/app/schema/authorization.d.ts +37 -0
- package/dist/esm/app/schema/authorization.d.ts.map +1 -0
- package/dist/esm/app/schema/authorization.js +41 -0
- package/dist/esm/app/schema/oauth.d.ts +30 -0
- package/dist/esm/app/schema/oauth.d.ts.map +1 -0
- package/dist/esm/app/schema/oauth.js +18 -0
- package/dist/esm/app/schema/oidc.d.ts +28 -0
- package/dist/esm/app/schema/oidc.d.ts.map +1 -0
- package/dist/esm/app/schema/oidc.js +10 -0
- package/dist/esm/app/schema/registration.d.ts +22 -0
- package/dist/esm/app/schema/registration.d.ts.map +1 -0
- package/dist/esm/app/schema/registration.js +13 -0
- package/dist/esm/app/schema/saml.d.ts +28 -0
- package/dist/esm/app/schema/saml.d.ts.map +1 -0
- package/dist/esm/app/schema/saml.js +10 -0
- package/dist/esm/app/schema/schema.d.ts +8 -0
- package/dist/esm/app/schema/schema.d.ts.map +1 -0
- package/dist/esm/app/schema/schema.js +7 -0
- package/dist/esm/app/schema/utils.d.ts +11 -0
- package/dist/esm/app/schema/utils.d.ts.map +1 -0
- package/dist/esm/app/schema/utils.js +15 -0
- package/dist/esm/association/index.d.ts +2 -0
- package/dist/esm/association/index.d.ts.map +1 -0
- package/dist/esm/association/index.js +1 -0
- package/dist/esm/association/schema/association.d.ts +82 -0
- package/dist/esm/association/schema/association.d.ts.map +1 -0
- package/dist/esm/association/schema/association.js +23 -0
- package/dist/esm/association/schema/schema.d.ts +2 -0
- package/dist/esm/association/schema/schema.d.ts.map +1 -0
- package/dist/esm/association/schema/schema.js +1 -0
- package/dist/esm/authentication/index.d.ts +2 -0
- package/dist/esm/authentication/index.d.ts.map +1 -0
- package/dist/esm/authentication/index.js +1 -0
- package/dist/esm/authentication/schema/factors.d.ts +48 -0
- package/dist/esm/authentication/schema/factors.d.ts.map +1 -0
- package/dist/esm/authentication/schema/factors.js +25 -0
- package/dist/esm/authentication/schema/factors.test.d.ts +2 -0
- package/dist/esm/authentication/schema/factors.test.d.ts.map +1 -0
- package/dist/esm/authentication/schema/factors.test.js +121 -0
- package/dist/esm/authentication/schema/provider.d.ts +27 -0
- package/dist/esm/authentication/schema/provider.d.ts.map +1 -0
- package/dist/esm/authentication/schema/provider.js +21 -0
- package/dist/esm/authentication/schema/schema.d.ts +6 -0
- package/dist/esm/authentication/schema/schema.d.ts.map +1 -0
- package/dist/esm/authentication/schema/schema.js +5 -0
- package/dist/esm/authentication/schema/session.d.ts +59 -0
- package/dist/esm/authentication/schema/session.d.ts.map +1 -0
- package/dist/esm/authentication/schema/session.js +43 -0
- package/dist/esm/authentication/schema/settings.d.ts +46 -0
- package/dist/esm/authentication/schema/settings.d.ts.map +1 -0
- package/dist/esm/authentication/schema/settings.js +13 -0
- package/dist/esm/authentication/schema/strategy/base.d.ts +54 -0
- package/dist/esm/authentication/schema/strategy/base.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/base.js +36 -0
- package/dist/esm/authentication/schema/strategy/schema.d.ts +158 -0
- package/dist/esm/authentication/schema/strategy/schema.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/schema.js +13 -0
- package/dist/esm/authentication/schema/strategy/types/email.d.ts +44 -0
- package/dist/esm/authentication/schema/strategy/types/email.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/types/email.js +17 -0
- package/dist/esm/authentication/schema/strategy/types/password.d.ts +99 -0
- package/dist/esm/authentication/schema/strategy/types/password.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/types/password.js +32 -0
- package/dist/esm/authentication/schema/strategy/types/totp.d.ts +91 -0
- package/dist/esm/authentication/schema/strategy/types/totp.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/types/totp.js +45 -0
- package/dist/esm/authorization/index.d.ts +6 -0
- package/dist/esm/authorization/index.d.ts.map +1 -0
- package/dist/esm/authorization/index.js +5 -0
- package/dist/esm/authorization/permissions/resources.d.ts +20 -0
- package/dist/esm/authorization/permissions/resources.d.ts.map +1 -0
- package/dist/esm/authorization/permissions/resources.js +48 -0
- package/dist/esm/authorization/permissions/schema.d.ts +104 -0
- package/dist/esm/authorization/permissions/schema.d.ts.map +1 -0
- package/dist/esm/authorization/permissions/schema.js +63 -0
- package/dist/esm/authorization/roles/resources.d.ts +20 -0
- package/dist/esm/authorization/roles/resources.d.ts.map +1 -0
- package/dist/esm/authorization/roles/resources.js +48 -0
- package/dist/esm/authorization/roles/schema.d.ts +113 -0
- package/dist/esm/authorization/roles/schema.d.ts.map +1 -0
- package/dist/esm/authorization/roles/schema.js +69 -0
- package/dist/esm/authorization/utils.d.ts +11 -0
- package/dist/esm/authorization/utils.d.ts.map +1 -0
- package/dist/esm/authorization/utils.js +15 -0
- package/dist/esm/common/errors/http.d.ts +17 -0
- package/dist/esm/common/errors/http.d.ts.map +1 -0
- package/dist/esm/common/errors/http.js +14 -0
- package/dist/esm/common/errors/validation.d.ts +11 -0
- package/dist/esm/common/errors/validation.d.ts.map +1 -0
- package/dist/esm/common/errors/validation.js +8 -0
- package/dist/esm/common/index.d.ts +6 -0
- package/dist/esm/common/index.d.ts.map +1 -0
- package/dist/esm/common/index.js +5 -0
- package/dist/esm/common/resources/authorization.d.ts +2 -0
- package/dist/esm/common/resources/authorization.d.ts.map +1 -0
- package/dist/esm/common/resources/authorization.js +1 -0
- package/dist/esm/common/resources/init.d.ts +16 -0
- package/dist/esm/common/resources/init.d.ts.map +1 -0
- package/dist/esm/common/resources/init.js +34 -0
- package/dist/esm/common/resources/operations.d.ts +7 -0
- package/dist/esm/common/resources/operations.d.ts.map +1 -0
- package/dist/esm/common/resources/operations.js +83 -0
- package/dist/esm/common/resources/utils.d.ts +18 -0
- package/dist/esm/common/resources/utils.d.ts.map +1 -0
- package/dist/esm/common/resources/utils.js +86 -0
- package/dist/esm/common/schema/aggregate.d.ts +6 -0
- package/dist/esm/common/schema/aggregate.d.ts.map +1 -0
- package/dist/esm/common/schema/aggregate.js +5 -0
- package/dist/esm/common/schema/collection.d.ts +18 -0
- package/dist/esm/common/schema/collection.d.ts.map +1 -0
- package/dist/esm/common/schema/collection.js +7 -0
- package/dist/esm/common/schema/dates.d.ts +39 -0
- package/dist/esm/common/schema/dates.d.ts.map +1 -0
- package/dist/esm/common/schema/dates.js +31 -0
- package/dist/esm/common/schema/dates.test.d.ts +2 -0
- package/dist/esm/common/schema/dates.test.d.ts.map +1 -0
- package/dist/esm/common/schema/dates.test.js +31 -0
- package/dist/esm/common/schema/jwt.d.ts +21 -0
- package/dist/esm/common/schema/jwt.d.ts.map +1 -0
- package/dist/esm/common/schema/jwt.js +21 -0
- package/dist/esm/common/schema/metadata.d.ts +47 -0
- package/dist/esm/common/schema/metadata.d.ts.map +1 -0
- package/dist/esm/common/schema/metadata.js +83 -0
- package/dist/esm/common/schema/metadata.test.d.ts +2 -0
- package/dist/esm/common/schema/metadata.test.d.ts.map +1 -0
- package/dist/esm/common/schema/metadata.test.js +60 -0
- package/dist/esm/common/schema/pagination.d.ts +6 -0
- package/dist/esm/common/schema/pagination.d.ts.map +1 -0
- package/dist/esm/common/schema/pagination.js +5 -0
- package/dist/esm/common/schema/schema.d.ts +8 -0
- package/dist/esm/common/schema/schema.d.ts.map +1 -0
- package/dist/esm/common/schema/schema.js +7 -0
- package/dist/esm/common/schema/sets.d.ts +3 -0
- package/dist/esm/common/schema/sets.d.ts.map +1 -0
- package/dist/esm/common/schema/sets.js +6 -0
- package/dist/esm/customer/index.d.ts +4 -0
- package/dist/esm/customer/index.d.ts.map +1 -0
- package/dist/esm/customer/index.js +3 -0
- package/dist/esm/customer/schema/organization.d.ts +54 -0
- package/dist/esm/customer/schema/organization.d.ts.map +1 -0
- package/dist/esm/customer/schema/organization.js +37 -0
- package/dist/esm/customer/schema/schema.d.ts +4 -0
- package/dist/esm/customer/schema/schema.d.ts.map +1 -0
- package/dist/esm/customer/schema/schema.js +3 -0
- package/dist/esm/customer/schema/utils.d.ts +11 -0
- package/dist/esm/customer/schema/utils.d.ts.map +1 -0
- package/dist/esm/customer/schema/utils.js +15 -0
- package/dist/esm/customer/users/resources.d.ts +20 -0
- package/dist/esm/customer/users/resources.d.ts.map +1 -0
- package/dist/esm/customer/users/resources.js +48 -0
- package/dist/esm/customer/users/schema.d.ts +151 -0
- package/dist/esm/customer/users/schema.d.ts.map +1 -0
- package/dist/esm/customer/users/schema.js +88 -0
- package/dist/esm/customer/users/schema.test.d.ts +2 -0
- package/dist/esm/customer/users/schema.test.d.ts.map +1 -0
- package/dist/esm/customer/users/schema.test.js +55 -0
- package/dist/esm/identity/index.d.ts +2 -0
- package/dist/esm/identity/index.d.ts.map +1 -0
- package/dist/esm/identity/index.js +1 -0
- package/dist/esm/identity/schema/schema.d.ts +7 -0
- package/dist/esm/identity/schema/schema.d.ts.map +1 -0
- package/dist/esm/identity/schema/schema.js +6 -0
- package/dist/esm/oauth/authorize/index.d.ts +2 -0
- package/dist/esm/oauth/authorize/index.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/index.js +1 -0
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.d.ts +29 -0
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.js +31 -0
- package/dist/esm/oauth/authorize/schema/grants/implicit.d.ts +11 -0
- package/dist/esm/oauth/authorize/schema/grants/implicit.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/schema/grants/implicit.js +18 -0
- package/dist/esm/oauth/authorize/schema/schema.d.ts +42 -0
- package/dist/esm/oauth/authorize/schema/schema.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/schema/schema.js +8 -0
- package/dist/esm/oauth/common/schema.d.ts +62 -0
- package/dist/esm/oauth/common/schema.d.ts.map +1 -0
- package/dist/esm/oauth/common/schema.js +51 -0
- package/dist/esm/oauth/index.d.ts +4 -0
- package/dist/esm/oauth/index.d.ts.map +1 -0
- package/dist/esm/oauth/index.js +3 -0
- package/dist/esm/oauth/token/index.d.ts +2 -0
- package/dist/esm/oauth/token/index.d.ts.map +1 -0
- package/dist/esm/oauth/token/index.js +1 -0
- package/dist/esm/oauth/token/schema/grants/authorization-code.d.ts +10 -0
- package/dist/esm/oauth/token/schema/grants/authorization-code.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/grants/authorization-code.js +17 -0
- package/dist/esm/oauth/token/schema/grants/client-credentials.d.ts +21 -0
- package/dist/esm/oauth/token/schema/grants/client-credentials.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/grants/client-credentials.js +22 -0
- package/dist/esm/oauth/token/schema/grants/refresh-token.d.ts +9 -0
- package/dist/esm/oauth/token/schema/grants/refresh-token.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/grants/refresh-token.js +14 -0
- package/dist/esm/oauth/token/schema/schema.d.ts +28 -0
- package/dist/esm/oauth/token/schema/schema.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/schema.js +10 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/workspace/index.d.ts +2 -0
- package/dist/esm/workspace/index.d.ts.map +1 -0
- package/dist/esm/workspace/index.js +1 -0
- package/dist/esm/workspace/schema/authorization.d.ts +31 -0
- package/dist/esm/workspace/schema/authorization.d.ts.map +1 -0
- package/dist/esm/workspace/schema/authorization.js +19 -0
- package/dist/esm/workspace/schema/branding.d.ts +38 -0
- package/dist/esm/workspace/schema/branding.d.ts.map +1 -0
- package/dist/esm/workspace/schema/branding.js +22 -0
- package/dist/esm/workspace/schema/membership.d.ts +25 -0
- package/dist/esm/workspace/schema/membership.d.ts.map +1 -0
- package/dist/esm/workspace/schema/membership.js +16 -0
- package/dist/esm/workspace/schema/registration.d.ts +28 -0
- package/dist/esm/workspace/schema/registration.d.ts.map +1 -0
- package/dist/esm/workspace/schema/registration.js +19 -0
- package/dist/esm/workspace/schema/schema.d.ts +10 -0
- package/dist/esm/workspace/schema/schema.d.ts.map +1 -0
- package/dist/esm/workspace/schema/schema.js +9 -0
- package/dist/esm/workspace/schema/settings.d.ts +23 -0
- package/dist/esm/workspace/schema/settings.d.ts.map +1 -0
- package/dist/esm/workspace/schema/settings.js +12 -0
- package/dist/esm/workspace/schema/tenant.d.ts +57 -0
- package/dist/esm/workspace/schema/tenant.d.ts.map +1 -0
- package/dist/esm/workspace/schema/tenant.js +23 -0
- package/dist/esm/workspace/schema/user-notification.d.ts +62 -0
- package/dist/esm/workspace/schema/user-notification.d.ts.map +1 -0
- package/dist/esm/workspace/schema/user-notification.js +41 -0
- package/dist/esm/workspace/schema/user-preferences.d.ts +26 -0
- package/dist/esm/workspace/schema/user-preferences.d.ts.map +1 -0
- package/dist/esm/workspace/schema/user-preferences.js +16 -0
- package/dist/esm/workspace/schema/utils.d.ts +15 -0
- package/dist/esm/workspace/schema/utils.d.ts.map +1 -0
- package/dist/esm/workspace/schema/utils.js +22 -0
- package/package.json +50 -55
- package/release-please-config.json +13 -3
- package/tsconfig.esm.json +1 -1
- package/tsconfig.json +26 -0
|
@@ -0,0 +1,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("./schema/schema.js"), exports);
|
|
18
|
+
__exportStar(require("./users/resources.js"), exports);
|
|
19
|
+
__exportStar(require("./users/schema.js"), exports);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare const OrganizationStatus: {
|
|
2
|
+
readonly ACTIVE: "active";
|
|
3
|
+
readonly SUSPENDED: "suspended";
|
|
4
|
+
};
|
|
5
|
+
export type AnyOrganizationStatus = (typeof OrganizationStatus)[keyof typeof OrganizationStatus];
|
|
6
|
+
export declare const OrganizationIdSchema: import("arktype/out/methods/string.js").StringType<string, {}>;
|
|
7
|
+
export type OrganizationId = typeof OrganizationIdSchema.inferOut;
|
|
8
|
+
export declare const OrganizationIdPropertySchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
9
|
+
id: string;
|
|
10
|
+
}, {}>;
|
|
11
|
+
export type OrganizationIdProperty = typeof OrganizationIdPropertySchema.inferOut;
|
|
12
|
+
export declare const OrganizationPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
13
|
+
status: import("arktype/out/attributes.js").Default<"active" | "suspended", "active">;
|
|
14
|
+
name: string;
|
|
15
|
+
createdAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
|
|
16
|
+
updatedAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
|
|
17
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
18
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
19
|
+
id: string;
|
|
20
|
+
metadata?: ((In: {
|
|
21
|
+
[x: string]: string | number | boolean;
|
|
22
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
|
|
23
|
+
[x: string]: string | number | boolean;
|
|
24
|
+
} | undefined>) | undefined;
|
|
25
|
+
}, {}>;
|
|
26
|
+
export type OrganizationPayload = typeof OrganizationPayloadSchema.inferOut;
|
|
27
|
+
export declare const InsertOrganizationPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
28
|
+
id: import("arktype/out/attributes.js").Default<string, string>;
|
|
29
|
+
name: string;
|
|
30
|
+
status?: "active" | "suspended" | 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
|
+
} | null>) | undefined;
|
|
36
|
+
}, {}>;
|
|
37
|
+
export type InsertOrganizationPayload = typeof InsertOrganizationPayloadSchema.inferOut;
|
|
38
|
+
export declare const UpdateOrganizationPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
39
|
+
status?: "active" | "suspended" | null | undefined;
|
|
40
|
+
name?: string | null | undefined;
|
|
41
|
+
metadata?: ((In: {
|
|
42
|
+
[x: string]: string | number | boolean;
|
|
43
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
|
|
44
|
+
[x: string]: string | number | boolean;
|
|
45
|
+
} | null>) | undefined;
|
|
46
|
+
}, {}>;
|
|
47
|
+
export type UpdateOrganizationPayload = typeof UpdateOrganizationPayloadSchema.inferOut;
|
|
48
|
+
export declare const OrganizationAssociationReferenceSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
model: "Organization";
|
|
52
|
+
}, {}>;
|
|
53
|
+
export type OrganizationAssociationReference = typeof OrganizationAssociationReferenceSchema.inferOut;
|
|
54
|
+
//# sourceMappingURL=organization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../../../src/customer/schema/organization.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AACX,MAAM,MAAM,qBAAqB,GAC/B,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAE/D,eAAO,MAAM,oBAAoB,gEAAc,CAAC;AAChD,MAAM,MAAM,cAAc,GAAG,OAAO,oBAAoB,CAAC,QAAQ,CAAC;AAElE,eAAO,MAAM,4BAA4B;;MAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAChC,OAAO,4BAA4B,CAAC,QAAQ,CAAC;AAS/C,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;MASD,CAAC;AACtC,MAAM,MAAM,mBAAmB,GAAG,OAAO,yBAAyB,CAAC,QAAQ,CAAC;AAE5E,eAAO,MAAM,+BAA+B;;;;;;;;;MAID,CAAC;AAC5C,MAAM,MAAM,yBAAyB,GACnC,OAAO,+BAA+B,CAAC,QAAQ,CAAC;AAElD,eAAO,MAAM,+BAA+B;;;;;;;;MAGD,CAAC;AAC5C,MAAM,MAAM,yBAAyB,GACnC,OAAO,+BAA+B,CAAC,QAAQ,CAAC;AAElD,eAAO,MAAM,sCAAsC;;;;MAMhD,CAAC;AACJ,MAAM,MAAM,gCAAgC,GAC1C,OAAO,sCAAsC,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrganizationAssociationReferenceSchema = exports.UpdateOrganizationPayloadSchema = exports.InsertOrganizationPayloadSchema = exports.OrganizationPayloadSchema = exports.OrganizationIdPropertySchema = exports.OrganizationIdSchema = exports.OrganizationStatus = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
const index_js_1 = require("../../common/index.js");
|
|
6
|
+
const metadata_js_1 = require("../../common/schema/metadata.js");
|
|
7
|
+
const utils_js_1 = require("./utils.js");
|
|
8
|
+
exports.OrganizationStatus = {
|
|
9
|
+
ACTIVE: 'active',
|
|
10
|
+
SUSPENDED: 'suspended',
|
|
11
|
+
};
|
|
12
|
+
exports.OrganizationIdSchema = arktype_1.type.string;
|
|
13
|
+
exports.OrganizationIdPropertySchema = (0, arktype_1.type)({
|
|
14
|
+
id: exports.OrganizationIdSchema,
|
|
15
|
+
});
|
|
16
|
+
const OrganizationNameSchema = arktype_1.type.string;
|
|
17
|
+
const StatusSchema = arktype_1.type.enumerated(exports.OrganizationStatus.ACTIVE, exports.OrganizationStatus.SUSPENDED);
|
|
18
|
+
exports.OrganizationPayloadSchema = (0, arktype_1.type)({
|
|
19
|
+
status: StatusSchema.default(exports.OrganizationStatus.ACTIVE),
|
|
20
|
+
name: OrganizationNameSchema,
|
|
21
|
+
createdAt: index_js_1.RequiredDatePayloadSchema,
|
|
22
|
+
updatedAt: index_js_1.RequiredDatePayloadSchema,
|
|
23
|
+
'deletedAt?': index_js_1.OptionalDatePayloadSchema,
|
|
24
|
+
'deactivatedAt?': index_js_1.OptionalDatePayloadSchema,
|
|
25
|
+
})
|
|
26
|
+
.and(exports.OrganizationIdPropertySchema)
|
|
27
|
+
.and(metadata_js_1.MetadataPayloadPropertySchema);
|
|
28
|
+
exports.InsertOrganizationPayloadSchema = (0, arktype_1.type)({
|
|
29
|
+
id: exports.OrganizationIdSchema.default(() => (0, utils_js_1.generateOrganizationId)()),
|
|
30
|
+
status: StatusSchema.optional(),
|
|
31
|
+
name: OrganizationNameSchema,
|
|
32
|
+
}).and(metadata_js_1.UpsertMetadataPayloadPropertySchema);
|
|
33
|
+
exports.UpdateOrganizationPayloadSchema = (0, arktype_1.type)({
|
|
34
|
+
status: StatusSchema.or(arktype_1.type.null).optional(),
|
|
35
|
+
name: OrganizationNameSchema.or(arktype_1.type.null).optional(),
|
|
36
|
+
}).and(metadata_js_1.UpsertMetadataPayloadPropertySchema);
|
|
37
|
+
exports.OrganizationAssociationReferenceSchema = exports.OrganizationIdPropertySchema.and((0, arktype_1.type)({
|
|
38
|
+
name: arktype_1.type.string,
|
|
39
|
+
model: "'Organization'",
|
|
40
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/customer/schema/schema.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAElC,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("../users/schema.js"), exports);
|
|
18
|
+
__exportStar(require("./organization.js"), exports);
|
|
19
|
+
__exportStar(require("./utils.js"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const Model: {
|
|
2
|
+
readonly Organization: {
|
|
3
|
+
readonly UIDPrefix: "org";
|
|
4
|
+
};
|
|
5
|
+
readonly User: {
|
|
6
|
+
readonly UIDPrefix: "usr";
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare function generateUserId(): string;
|
|
10
|
+
export declare function generateOrganizationId(): string;
|
|
11
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/customer/schema/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;;;;CAOR,CAAC;AAEX,wBAAgB,cAAc,WAE7B;AAED,wBAAgB,sBAAsB,WAErC"}
|
|
@@ -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.generateUserId = generateUserId;
|
|
8
|
+
exports.generateOrganizationId = generateOrganizationId;
|
|
9
|
+
const ksuid_1 = __importDefault(require("ksuid"));
|
|
10
|
+
exports.Model = {
|
|
11
|
+
Organization: {
|
|
12
|
+
UIDPrefix: 'org',
|
|
13
|
+
},
|
|
14
|
+
User: {
|
|
15
|
+
UIDPrefix: 'usr',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
function generateUserId() {
|
|
19
|
+
return `${exports.Model.User.UIDPrefix}_${ksuid_1.default.randomSync().string}`;
|
|
20
|
+
}
|
|
21
|
+
function generateOrganizationId() {
|
|
22
|
+
return `${exports.Model.Organization.UIDPrefix}_${ksuid_1.default.randomSync().string}`;
|
|
23
|
+
}
|
|
@@ -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 InsertUserInput, type UpdateUserInput, type User } from './schema.js';
|
|
5
|
+
export declare class UserResources {
|
|
6
|
+
private readonly instance;
|
|
7
|
+
constructor(instance: MondoIdentity);
|
|
8
|
+
static buildPath(id?: string): string;
|
|
9
|
+
listItems(pagination?: Pagination): Promise<PaginationCollection<User>>;
|
|
10
|
+
getItem(id: string): Promise<User>;
|
|
11
|
+
insertItem(item: InsertUserInput): Promise<User>;
|
|
12
|
+
updateItem(id: string, item: UpdateUserInput): Promise<User>;
|
|
13
|
+
deleteItem(id: string): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export declare function listUsers(instance: MondoIdentity, pagination?: Pagination): Promise<PaginationCollection<User>>;
|
|
16
|
+
export declare function getUser(instance: MondoIdentity, id: string): Promise<User>;
|
|
17
|
+
export declare function insertUser(instance: MondoIdentity, item: InsertUserInput): Promise<User>;
|
|
18
|
+
export declare function updateUser(instance: MondoIdentity, id: string, item: UpdateUserInput): Promise<User>;
|
|
19
|
+
export declare function deleteUser(instance: MondoIdentity, id: string): Promise<void>;
|
|
20
|
+
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/customer/users/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;AACpE,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,eAAe,EAEpB,KAAK,IAAI,EAEV,MAAM,aAAa,CAAC;AAIrB,qBAAa,aAAa;IACL,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,IAAI,CAAC,CAAC;IAI/B,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlC,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhD,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5D,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7C;AAED,wBAAsB,SAAS,CAC7B,QAAQ,EAAE,aAAa,EACvB,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAWrC;AAED,wBAAsB,OAAO,CAC3B,QAAQ,EAAE,aAAa,EACvB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC,CASf;AAED,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,IAAI,CAAC,CAYf;AAED,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,aAAa,EACvB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,IAAI,CAAC,CAYf;AAED,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,aAAa,EACvB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC,CAKf"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserResources = void 0;
|
|
4
|
+
exports.listUsers = listUsers;
|
|
5
|
+
exports.getUser = getUser;
|
|
6
|
+
exports.insertUser = insertUser;
|
|
7
|
+
exports.updateUser = updateUser;
|
|
8
|
+
exports.deleteUser = deleteUser;
|
|
9
|
+
const operations_js_1 = require("../../common/resources/operations.js");
|
|
10
|
+
const utils_js_1 = require("../../common/resources/utils.js");
|
|
11
|
+
const collection_js_1 = require("../../common/schema/collection.js");
|
|
12
|
+
const schema_js_1 = require("./schema.js");
|
|
13
|
+
const PATH = '/v1/customers/users';
|
|
14
|
+
class UserResources {
|
|
15
|
+
instance;
|
|
16
|
+
constructor(instance) {
|
|
17
|
+
this.instance = instance;
|
|
18
|
+
}
|
|
19
|
+
static buildPath(id) {
|
|
20
|
+
if (id?.startsWith(PATH)) {
|
|
21
|
+
return id;
|
|
22
|
+
}
|
|
23
|
+
return [PATH, id].filter(Boolean).join('/');
|
|
24
|
+
}
|
|
25
|
+
listItems(pagination) {
|
|
26
|
+
return listUsers(this.instance, pagination);
|
|
27
|
+
}
|
|
28
|
+
getItem(id) {
|
|
29
|
+
return getUser(this.instance, id);
|
|
30
|
+
}
|
|
31
|
+
insertItem(item) {
|
|
32
|
+
return insertUser(this.instance, item);
|
|
33
|
+
}
|
|
34
|
+
updateItem(id, item) {
|
|
35
|
+
return updateUser(this.instance, id, item);
|
|
36
|
+
}
|
|
37
|
+
deleteItem(id) {
|
|
38
|
+
return deleteUser(this.instance, id);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.UserResources = UserResources;
|
|
42
|
+
async function listUsers(instance, pagination) {
|
|
43
|
+
const url = (0, utils_js_1.addPaginationToURL)(new URL(UserResources.buildPath(), instance.config.host), pagination);
|
|
44
|
+
return (0, utils_js_1.parseEgressSchema)((0, collection_js_1.PaginationCollectionSchema)(schema_js_1.UserSchema)(await (0, operations_js_1.getItemWithAuthorization)(url, instance.authorizer)));
|
|
45
|
+
}
|
|
46
|
+
async function getUser(instance, id) {
|
|
47
|
+
return (0, utils_js_1.parseEgressSchema)((0, schema_js_1.UserSchema)(await (0, operations_js_1.getItemWithAuthorization)(new URL(UserResources.buildPath(id), instance.config.host), instance.authorizer)));
|
|
48
|
+
}
|
|
49
|
+
async function insertUser(instance, item) {
|
|
50
|
+
return (0, utils_js_1.parseEgressSchema)((0, schema_js_1.UserSchema)(await (0, operations_js_1.insertItemWithAuthorization)(new URL(UserResources.buildPath(), instance.config.host), instance.authorizer, (0, utils_js_1.parseEgressSchema)(schema_js_1.InsertUserPayloadSchema.onUndeclaredKey('delete')(item)))));
|
|
51
|
+
}
|
|
52
|
+
async function updateUser(instance, id, item) {
|
|
53
|
+
return (0, utils_js_1.parseEgressSchema)((0, schema_js_1.UserSchema)(await (0, operations_js_1.updateItemWithAuthorization)(new URL(UserResources.buildPath(id), instance.config.host), instance.authorizer, (0, utils_js_1.parseEgressSchema)(schema_js_1.UpdateUserPayloadSchema.onUndeclaredKey('delete')(item)))));
|
|
54
|
+
}
|
|
55
|
+
async function deleteUser(instance, id) {
|
|
56
|
+
await (0, operations_js_1.deleteItemWithAuthorization)(new URL(UserResources.buildPath(id), instance.config.host), instance.authorizer);
|
|
57
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
export declare const VerifiableAttribute: {
|
|
2
|
+
readonly EMAIL: "email";
|
|
3
|
+
readonly PHONE_NUMBER: "phoneNumber";
|
|
4
|
+
};
|
|
5
|
+
export type AnyVerifiableAttribute = (typeof VerifiableAttribute)[keyof typeof VerifiableAttribute];
|
|
6
|
+
export declare const UserStatus: {
|
|
7
|
+
readonly ACTIVE: "active";
|
|
8
|
+
readonly SUSPENDED: "suspended";
|
|
9
|
+
readonly UNVERIFIED: "unverified";
|
|
10
|
+
};
|
|
11
|
+
export type AnyUserStatus = (typeof UserStatus)[keyof typeof UserStatus];
|
|
12
|
+
export declare const UserNamePropertiesSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
13
|
+
givenName?: string | undefined;
|
|
14
|
+
middleName?: string | undefined;
|
|
15
|
+
familyName?: string | undefined;
|
|
16
|
+
honorificPrefix?: string | undefined;
|
|
17
|
+
honorificSuffix?: string | undefined;
|
|
18
|
+
}, {}>;
|
|
19
|
+
export type UserNameProperties = typeof UserNamePropertiesSchema.inferOut;
|
|
20
|
+
export declare const UpsertUserNamePropertiesSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
21
|
+
givenName?: string | null | undefined;
|
|
22
|
+
middleName?: string | null | undefined;
|
|
23
|
+
familyName?: string | null | undefined;
|
|
24
|
+
honorificPrefix?: string | null | undefined;
|
|
25
|
+
honorificSuffix?: string | null | undefined;
|
|
26
|
+
}, {}>;
|
|
27
|
+
export declare const UserIdSchema: import("arktype/out/methods/string.js").StringType<string, {}>;
|
|
28
|
+
export type UserId = typeof UserIdSchema.inferOut;
|
|
29
|
+
export declare const UserIdPropertySchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
30
|
+
id: string;
|
|
31
|
+
}, {}>;
|
|
32
|
+
export type UserIdProperty = typeof UserIdPropertySchema.inferOut;
|
|
33
|
+
export declare const RequiredEmailSchema: import("arktype/out/methods/string.js").StringType<string, {}>;
|
|
34
|
+
export declare const RequiredPhoneNumberSchema: import("arktype/out/methods/string.js").StringType<string, {}>;
|
|
35
|
+
export declare const VerifiedEmailOrPhonePropertiesSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
36
|
+
email?: ((In: string | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
37
|
+
verifiedEmail?: boolean | undefined;
|
|
38
|
+
phoneNumber?: string | undefined;
|
|
39
|
+
verifiedPhoneNumber?: boolean | undefined;
|
|
40
|
+
}, {}>;
|
|
41
|
+
export declare const EmailOrPhonePropertiesSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
42
|
+
email?: ((In: string | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
43
|
+
phoneNumber?: string | undefined;
|
|
44
|
+
}, {}>;
|
|
45
|
+
export declare const UserAssociationsSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
46
|
+
roles?: string[] | undefined;
|
|
47
|
+
}, {}>;
|
|
48
|
+
export type UserAssociations = typeof UserAssociationsSchema.inferOut;
|
|
49
|
+
export declare const UserSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
50
|
+
id: string;
|
|
51
|
+
givenName?: string | undefined;
|
|
52
|
+
middleName?: string | undefined;
|
|
53
|
+
familyName?: string | undefined;
|
|
54
|
+
honorificPrefix?: string | undefined;
|
|
55
|
+
honorificSuffix?: string | undefined;
|
|
56
|
+
email?: ((In: string | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
57
|
+
verifiedEmail?: boolean | undefined;
|
|
58
|
+
phoneNumber?: string | undefined;
|
|
59
|
+
verifiedPhoneNumber?: boolean | undefined;
|
|
60
|
+
status: "active" | "suspended" | "unverified";
|
|
61
|
+
roles?: {
|
|
62
|
+
ids?: string[] | undefined;
|
|
63
|
+
count?: number | undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
createdAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
|
|
66
|
+
updatedAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
|
|
67
|
+
lastLogin?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
|
|
68
|
+
deletedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
|
|
69
|
+
deactivatedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
|
|
70
|
+
metadata: (In: import("arktype/out/attributes.js").Default<unknown, Map<string, string | number | boolean>>) => import("arktype/out/attributes.js").Out<Map<string, string | number | boolean> | Map<string, any>>;
|
|
71
|
+
}, {}>;
|
|
72
|
+
export type UserProperties = typeof UserSchema.inferIn;
|
|
73
|
+
export type User = typeof UserSchema.inferOut;
|
|
74
|
+
export declare const UserPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
75
|
+
id: string;
|
|
76
|
+
givenName?: string | undefined;
|
|
77
|
+
middleName?: string | undefined;
|
|
78
|
+
familyName?: string | undefined;
|
|
79
|
+
honorificPrefix?: string | undefined;
|
|
80
|
+
honorificSuffix?: string | undefined;
|
|
81
|
+
email?: ((In: string | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
82
|
+
verifiedEmail?: boolean | undefined;
|
|
83
|
+
phoneNumber?: string | undefined;
|
|
84
|
+
verifiedPhoneNumber?: boolean | undefined;
|
|
85
|
+
status: "active" | "suspended" | "unverified";
|
|
86
|
+
roles?: {
|
|
87
|
+
ids?: string[] | undefined;
|
|
88
|
+
count?: number | undefined;
|
|
89
|
+
} | undefined;
|
|
90
|
+
createdAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
|
|
91
|
+
updatedAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
|
|
92
|
+
lastLogin?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
93
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
94
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
95
|
+
metadata?: ((In: {
|
|
96
|
+
[x: string]: string | number | boolean;
|
|
97
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
|
|
98
|
+
[x: string]: string | number | boolean;
|
|
99
|
+
} | undefined>) | undefined;
|
|
100
|
+
}, {}>;
|
|
101
|
+
export type UserPayload = typeof UserPayloadSchema.inferOut;
|
|
102
|
+
export declare const InsertUserPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
103
|
+
id: import("arktype/out/attributes.js").Default<string, string>;
|
|
104
|
+
suspended?: boolean | undefined;
|
|
105
|
+
givenName?: string | undefined;
|
|
106
|
+
middleName?: string | undefined;
|
|
107
|
+
familyName?: string | undefined;
|
|
108
|
+
honorificPrefix?: string | undefined;
|
|
109
|
+
honorificSuffix?: string | undefined;
|
|
110
|
+
email?: ((In: string | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
111
|
+
verifiedEmail?: boolean | undefined;
|
|
112
|
+
phoneNumber?: string | undefined;
|
|
113
|
+
verifiedPhoneNumber?: boolean | undefined;
|
|
114
|
+
roles?: string[] | undefined;
|
|
115
|
+
metadata?: ((In: {
|
|
116
|
+
[x: string]: string | number | boolean;
|
|
117
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
|
|
118
|
+
[x: string]: string | number | boolean;
|
|
119
|
+
} | null>) | undefined;
|
|
120
|
+
}, {}>;
|
|
121
|
+
export type InsertUserInput = typeof InsertUserPayloadSchema.inferIn;
|
|
122
|
+
export type InsertUserPayload = typeof InsertUserPayloadSchema.inferOut;
|
|
123
|
+
export declare const UpdateUserPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
124
|
+
suspended?: boolean | undefined;
|
|
125
|
+
givenName?: string | null | undefined;
|
|
126
|
+
middleName?: string | null | undefined;
|
|
127
|
+
familyName?: string | null | undefined;
|
|
128
|
+
honorificPrefix?: string | null | undefined;
|
|
129
|
+
honorificSuffix?: string | null | undefined;
|
|
130
|
+
metadata?: ((In: {
|
|
131
|
+
[x: string]: string | number | boolean;
|
|
132
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
|
|
133
|
+
[x: string]: string | number | boolean;
|
|
134
|
+
} | null>) | undefined;
|
|
135
|
+
}, {}>;
|
|
136
|
+
export type UpdateUserInput = typeof UpdateUserPayloadSchema.inferIn;
|
|
137
|
+
export type UpdateUserPayload = typeof UpdateUserPayloadSchema.inferOut;
|
|
138
|
+
export declare const UserAssociationReferenceSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
139
|
+
id: string;
|
|
140
|
+
givenName?: string | undefined;
|
|
141
|
+
middleName?: string | undefined;
|
|
142
|
+
familyName?: string | undefined;
|
|
143
|
+
honorificPrefix?: string | undefined;
|
|
144
|
+
honorificSuffix?: string | undefined;
|
|
145
|
+
email?: ((In: string | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
|
|
146
|
+
phoneNumber?: string | undefined;
|
|
147
|
+
status: "active" | "suspended" | "unverified";
|
|
148
|
+
model: "User";
|
|
149
|
+
}, {}>;
|
|
150
|
+
export type UserAssociationReference = typeof UserAssociationReferenceSchema.inferOut;
|
|
151
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/customer/users/schema.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAQzE,eAAO,MAAM,wBAAwB;;;;;;MAMnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,wBAAwB,CAAC,QAAQ,CAAC;AAE1E,eAAO,MAAM,8BAA8B;;;;;;MAMzC,CAAC;AAEH,eAAO,MAAM,YAAY,gEAAc,CAAC;AACxC,MAAM,MAAM,MAAM,GAAG,OAAO,YAAY,CAAC,QAAQ,CAAC;AAElD,eAAO,MAAM,oBAAoB;;MAE/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,oBAAoB,CAAC,QAAQ,CAAC;AAElE,eAAO,MAAM,mBAAmB,gEAAuB,CAAC;AACxD,eAAO,MAAM,yBAAyB,gEAAiB,CAAC;AAOxD,eAAO,MAAM,oCAAoC;;;;;MAK/C,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;MAGvC,CAAC;AAIH,eAAO,MAAM,sBAAsB;;MAEjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,sBAAsB,CAAC,QAAQ,CAAC;AAStE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;MAMU,CAAC;AAClC,MAAM,MAAM,cAAc,GAAG,OAAO,UAAU,CAAC,OAAO,CAAC;AACvD,MAAM,MAAM,IAAI,GAAG,OAAO,UAAU,CAAC,QAAQ,CAAC;AAE9C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;MAMO,CAAC;AACtC,MAAM,MAAM,WAAW,GAAG,OAAO,iBAAiB,CAAC,QAAQ,CAAC;AAE5D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;MAOO,CAAC;AAC5C,MAAM,MAAM,eAAe,GAAG,OAAO,uBAAuB,CAAC,OAAO,CAAC;AACrE,MAAM,MAAM,iBAAiB,GAAG,OAAO,uBAAuB,CAAC,QAAQ,CAAC;AAExE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;MAIO,CAAC;AAC5C,MAAM,MAAM,eAAe,GAAG,OAAO,uBAAuB,CAAC,OAAO,CAAC;AACrE,MAAM,MAAM,iBAAiB,GAAG,OAAO,uBAAuB,CAAC,QAAQ,CAAC;AAExE,eAAO,MAAM,8BAA8B;;;;;;;;;;;MAS1C,CAAC;AACF,MAAM,MAAM,wBAAwB,GAClC,OAAO,8BAA8B,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserAssociationReferenceSchema = exports.UpdateUserPayloadSchema = exports.InsertUserPayloadSchema = exports.UserPayloadSchema = exports.UserSchema = exports.UserAssociationsSchema = exports.EmailOrPhonePropertiesSchema = exports.VerifiedEmailOrPhonePropertiesSchema = exports.RequiredPhoneNumberSchema = exports.RequiredEmailSchema = exports.UserIdPropertySchema = exports.UserIdSchema = exports.UpsertUserNamePropertiesSchema = exports.UserNamePropertiesSchema = exports.UserStatus = exports.VerifiableAttribute = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
const aggregate_js_1 = require("../../common/schema/aggregate.js");
|
|
6
|
+
const dates_js_1 = require("../../common/schema/dates.js");
|
|
7
|
+
const metadata_js_1 = require("../../common/schema/metadata.js");
|
|
8
|
+
const utils_js_1 = require("../schema/utils.js");
|
|
9
|
+
exports.VerifiableAttribute = {
|
|
10
|
+
EMAIL: 'email',
|
|
11
|
+
PHONE_NUMBER: 'phoneNumber',
|
|
12
|
+
};
|
|
13
|
+
exports.UserStatus = {
|
|
14
|
+
ACTIVE: 'active',
|
|
15
|
+
SUSPENDED: 'suspended',
|
|
16
|
+
UNVERIFIED: 'unverified',
|
|
17
|
+
};
|
|
18
|
+
const UserStatusSchema = arktype_1.type.enumerated(exports.UserStatus.ACTIVE, exports.UserStatus.SUSPENDED, exports.UserStatus.UNVERIFIED);
|
|
19
|
+
exports.UserNamePropertiesSchema = (0, arktype_1.type)({
|
|
20
|
+
givenName: (0, arktype_1.type)('string | undefined').or('undefined').optional(),
|
|
21
|
+
middleName: (0, arktype_1.type)('string | undefined').optional(),
|
|
22
|
+
familyName: (0, arktype_1.type)('string | undefined').optional(),
|
|
23
|
+
honorificPrefix: (0, arktype_1.type)('string | undefined').optional(),
|
|
24
|
+
honorificSuffix: (0, arktype_1.type)('string | undefined').optional(),
|
|
25
|
+
});
|
|
26
|
+
exports.UpsertUserNamePropertiesSchema = (0, arktype_1.type)({
|
|
27
|
+
givenName: (0, arktype_1.type)('string | undefined | null').optional(),
|
|
28
|
+
middleName: (0, arktype_1.type)('string | undefined | null').optional(),
|
|
29
|
+
familyName: (0, arktype_1.type)('string | undefined | null').optional(),
|
|
30
|
+
honorificPrefix: (0, arktype_1.type)('string | undefined | null').optional(),
|
|
31
|
+
honorificSuffix: (0, arktype_1.type)('string | undefined | null').optional(),
|
|
32
|
+
});
|
|
33
|
+
exports.UserIdSchema = arktype_1.type.string;
|
|
34
|
+
exports.UserIdPropertySchema = (0, arktype_1.type)({
|
|
35
|
+
id: exports.UserIdSchema,
|
|
36
|
+
});
|
|
37
|
+
exports.RequiredEmailSchema = (0, arktype_1.type)('string.email');
|
|
38
|
+
exports.RequiredPhoneNumberSchema = (0, arktype_1.type)('string');
|
|
39
|
+
const EmailSchema = exports.RequiredEmailSchema.or('undefined').pipe((v) => v != null ? v : undefined);
|
|
40
|
+
const PhoneNumberSchema = exports.RequiredPhoneNumberSchema.or('undefined');
|
|
41
|
+
exports.VerifiedEmailOrPhonePropertiesSchema = (0, arktype_1.type)({
|
|
42
|
+
email: EmailSchema.optional(),
|
|
43
|
+
verifiedEmail: (0, arktype_1.type)('boolean').or('undefined').optional(),
|
|
44
|
+
phoneNumber: PhoneNumberSchema.optional(),
|
|
45
|
+
verifiedPhoneNumber: (0, arktype_1.type)('boolean').or('undefined').optional(),
|
|
46
|
+
});
|
|
47
|
+
exports.EmailOrPhonePropertiesSchema = (0, arktype_1.type)({
|
|
48
|
+
email: EmailSchema.optional(),
|
|
49
|
+
phoneNumber: PhoneNumberSchema.optional(),
|
|
50
|
+
});
|
|
51
|
+
const UserRoleAssociationSchema = (0, arktype_1.type)('string[] | undefined');
|
|
52
|
+
exports.UserAssociationsSchema = (0, arktype_1.type)({
|
|
53
|
+
roles: UserRoleAssociationSchema.optional(),
|
|
54
|
+
});
|
|
55
|
+
const BaseSchema = exports.UserIdPropertySchema.and(exports.UserNamePropertiesSchema)
|
|
56
|
+
.and(exports.VerifiedEmailOrPhonePropertiesSchema)
|
|
57
|
+
.and({
|
|
58
|
+
status: UserStatusSchema,
|
|
59
|
+
roles: aggregate_js_1.AggregateSchema.or(arktype_1.type.undefined).optional(),
|
|
60
|
+
});
|
|
61
|
+
exports.UserSchema = BaseSchema.and({
|
|
62
|
+
lastLogin: dates_js_1.OptionalDateSchema.optional(),
|
|
63
|
+
createdAt: dates_js_1.RequiredDateSchema,
|
|
64
|
+
updatedAt: dates_js_1.RequiredDateSchema,
|
|
65
|
+
'deletedAt?': dates_js_1.OptionalDateSchema,
|
|
66
|
+
'deactivatedAt?': dates_js_1.OptionalDateSchema,
|
|
67
|
+
}).and(metadata_js_1.MetadataMapPropertySchema);
|
|
68
|
+
exports.UserPayloadSchema = BaseSchema.and({
|
|
69
|
+
lastLogin: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
70
|
+
createdAt: dates_js_1.RequiredDatePayloadSchema,
|
|
71
|
+
updatedAt: dates_js_1.RequiredDatePayloadSchema,
|
|
72
|
+
'deletedAt?': dates_js_1.OptionalDatePayloadSchema,
|
|
73
|
+
'deactivatedAt?': dates_js_1.OptionalDatePayloadSchema,
|
|
74
|
+
}).and(metadata_js_1.MetadataPayloadPropertySchema);
|
|
75
|
+
exports.InsertUserPayloadSchema = (0, arktype_1.type)({
|
|
76
|
+
suspended: arktype_1.type.boolean.optional(),
|
|
77
|
+
id: exports.UserIdSchema.default(() => (0, utils_js_1.generateUserId)()),
|
|
78
|
+
})
|
|
79
|
+
.and(exports.UserNamePropertiesSchema)
|
|
80
|
+
.and(exports.VerifiedEmailOrPhonePropertiesSchema)
|
|
81
|
+
.and(exports.UserAssociationsSchema)
|
|
82
|
+
.and(metadata_js_1.UpsertMetadataPayloadPropertySchema);
|
|
83
|
+
exports.UpdateUserPayloadSchema = (0, arktype_1.type)({
|
|
84
|
+
suspended: arktype_1.type.boolean.optional(),
|
|
85
|
+
})
|
|
86
|
+
.and(exports.UpsertUserNamePropertiesSchema)
|
|
87
|
+
.and(metadata_js_1.UpsertMetadataPayloadPropertySchema);
|
|
88
|
+
exports.UserAssociationReferenceSchema = exports.UserIdPropertySchema.and(exports.UserNamePropertiesSchema).and(exports.EmailOrPhonePropertiesSchema.and((0, arktype_1.type)({
|
|
89
|
+
status: UserStatusSchema,
|
|
90
|
+
model: "'User'",
|
|
91
|
+
})));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.test.d.ts","sourceRoot":"","sources":["../../../../src/customer/users/schema.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const arktype_1 = require("arktype");
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
const schema_js_1 = require("./schema.js");
|
|
6
|
+
(0, vitest_1.describe)('Customer - User', () => {
|
|
7
|
+
(0, vitest_1.describe)('User Payload', () => {
|
|
8
|
+
(0, vitest_1.test)('should parse attributes successfully', async () => {
|
|
9
|
+
const item = {
|
|
10
|
+
foo: 'bar',
|
|
11
|
+
id: '123',
|
|
12
|
+
phoneNumber: '123',
|
|
13
|
+
status: schema_js_1.UserStatus.ACTIVE,
|
|
14
|
+
createdAt: new Date(),
|
|
15
|
+
updatedAt: new Date(),
|
|
16
|
+
};
|
|
17
|
+
const result = (0, schema_js_1.UserPayloadSchema)(item);
|
|
18
|
+
if (result instanceof arktype_1.type.errors) {
|
|
19
|
+
console.log(result.summary);
|
|
20
|
+
}
|
|
21
|
+
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
22
|
+
(0, vitest_1.expect)(result?.metadata).to.undefined;
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
(0, vitest_1.describe)('Insert User Payload', () => {
|
|
26
|
+
(0, vitest_1.test)('should parse attributes successfully', async () => {
|
|
27
|
+
const item = {
|
|
28
|
+
foo: 'bar',
|
|
29
|
+
id: '123',
|
|
30
|
+
phoneNumber: '123',
|
|
31
|
+
};
|
|
32
|
+
const result = (0, schema_js_1.InsertUserPayloadSchema)(item);
|
|
33
|
+
if (result instanceof arktype_1.type.errors) {
|
|
34
|
+
console.log(result.summary);
|
|
35
|
+
}
|
|
36
|
+
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
37
|
+
(0, vitest_1.expect)(result?.metadata).to.undefined;
|
|
38
|
+
});
|
|
39
|
+
(0, vitest_1.test)('should serialize successfully', async () => {
|
|
40
|
+
const item = {
|
|
41
|
+
foo: 'bar',
|
|
42
|
+
id: '123',
|
|
43
|
+
phoneNumber: '123',
|
|
44
|
+
metadata: new Map(),
|
|
45
|
+
// status: UserStatus.ACTIVE,
|
|
46
|
+
// createdAt: new Date(),
|
|
47
|
+
// updatedAt: new Date(),
|
|
48
|
+
};
|
|
49
|
+
const result = (0, schema_js_1.InsertUserPayloadSchema)(item);
|
|
50
|
+
if (result instanceof arktype_1.type.errors) {
|
|
51
|
+
console.log(result.summary);
|
|
52
|
+
}
|
|
53
|
+
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
54
|
+
(0, vitest_1.expect)(result?.metadata).to.null;
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/identity/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,7 @@
|
|
|
1
|
+
export declare const IdentityIdentifier: {
|
|
2
|
+
readonly EMAIL: "email";
|
|
3
|
+
readonly PHONE_NUMBER: "phoneNumber";
|
|
4
|
+
};
|
|
5
|
+
export type AnyIdentityIdentifier = (typeof IdentityIdentifier)[keyof typeof IdentityIdentifier];
|
|
6
|
+
export declare const IdentityIdentifierSchema: import("arktype/out/methods/string").StringType<"email" | "phoneNumber", {}>;
|
|
7
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/identity/schema/schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAC/B,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAE/D,eAAO,MAAM,wBAAwB,8EAGpC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IdentityIdentifierSchema = exports.IdentityIdentifier = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
exports.IdentityIdentifier = {
|
|
6
|
+
EMAIL: 'email',
|
|
7
|
+
PHONE_NUMBER: 'phoneNumber',
|
|
8
|
+
};
|
|
9
|
+
exports.IdentityIdentifierSchema = arktype_1.type.enumerated(exports.IdentityIdentifier.EMAIL, exports.IdentityIdentifier.PHONE_NUMBER);
|