@go-mondo/identity-sdk 0.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.tsbuildinfo/cjs.json +1 -0
- package/.tsbuildinfo/esm.json +1 -0
- package/CHANGELOG.md +63 -0
- package/README.md +3 -0
- package/lib/cjs/action/index.d.ts +2 -0
- package/lib/cjs/action/index.d.ts.map +1 -0
- package/lib/cjs/action/index.js +17 -0
- package/lib/cjs/action/schema/base.d.ts +21 -0
- package/lib/cjs/action/schema/base.d.ts.map +1 -0
- package/lib/cjs/action/schema/base.js +19 -0
- package/lib/cjs/action/schema/operations/set-password.d.ts +31 -0
- package/lib/cjs/action/schema/operations/set-password.d.ts.map +1 -0
- package/lib/cjs/action/schema/operations/set-password.js +18 -0
- package/lib/cjs/action/schema/operations/sign-up-verification.d.ts +22 -0
- package/lib/cjs/action/schema/operations/sign-up-verification.d.ts.map +1 -0
- package/lib/cjs/action/schema/operations/sign-up-verification.js +15 -0
- package/lib/cjs/action/schema/operations/sign-up.d.ts +44 -0
- package/lib/cjs/action/schema/operations/sign-up.d.ts.map +1 -0
- package/lib/cjs/action/schema/operations/sign-up.js +21 -0
- package/lib/cjs/action/schema/operations/user-attribute-verification.d.ts +20 -0
- package/lib/cjs/action/schema/operations/user-attribute-verification.d.ts.map +1 -0
- package/lib/cjs/action/schema/operations/user-attribute-verification.js +13 -0
- package/lib/cjs/action/schema/schema.d.ts +92 -0
- package/lib/cjs/action/schema/schema.d.ts.map +1 -0
- package/lib/cjs/action/schema/schema.js +40 -0
- package/lib/cjs/activity/index.d.ts +2 -0
- package/lib/cjs/activity/index.d.ts.map +1 -0
- package/lib/cjs/activity/index.js +17 -0
- package/lib/cjs/activity/schema/base.d.ts +54 -0
- package/lib/cjs/activity/schema/base.d.ts.map +1 -0
- package/lib/cjs/activity/schema/base.js +34 -0
- package/lib/cjs/activity/schema/schema.d.ts +156 -0
- package/lib/cjs/activity/schema/schema.d.ts.map +1 -0
- package/lib/cjs/activity/schema/schema.js +54 -0
- package/lib/cjs/activity/schema/types/authentication.d.ts +29 -0
- package/lib/cjs/activity/schema/types/authentication.d.ts.map +1 -0
- package/lib/cjs/activity/schema/types/authentication.js +16 -0
- package/lib/cjs/activity/schema/types/authorization.d.ts +29 -0
- package/lib/cjs/activity/schema/types/authorization.d.ts.map +1 -0
- package/lib/cjs/activity/schema/types/authorization.js +17 -0
- package/lib/cjs/activity/schema/types/note.d.ts +51 -0
- package/lib/cjs/activity/schema/types/note.d.ts.map +1 -0
- package/lib/cjs/activity/schema/types/note.js +17 -0
- package/lib/cjs/activity/schema/types/operation.d.ts +31 -0
- package/lib/cjs/activity/schema/types/operation.d.ts.map +1 -0
- package/lib/cjs/activity/schema/types/operation.js +18 -0
- package/lib/cjs/activity/schema/types/unknown.d.ts +22 -0
- package/lib/cjs/activity/schema/types/unknown.d.ts.map +1 -0
- package/lib/cjs/activity/schema/types/unknown.js +9 -0
- package/lib/cjs/activity/schema/utils.d.ts +7 -0
- package/lib/cjs/activity/schema/utils.d.ts.map +1 -0
- package/lib/cjs/activity/schema/utils.js +16 -0
- package/lib/cjs/app/index.d.ts +2 -0
- package/lib/cjs/app/index.d.ts.map +1 -0
- package/lib/cjs/app/index.js +17 -0
- package/lib/cjs/app/schema/app.d.ts +58 -0
- package/lib/cjs/app/schema/app.d.ts.map +1 -0
- package/lib/cjs/app/schema/app.js +43 -0
- package/lib/cjs/app/schema/authorization.d.ts +37 -0
- package/lib/cjs/app/schema/authorization.d.ts.map +1 -0
- package/lib/cjs/app/schema/authorization.js +44 -0
- package/lib/cjs/app/schema/oauth.d.ts +30 -0
- package/lib/cjs/app/schema/oauth.d.ts.map +1 -0
- package/lib/cjs/app/schema/oauth.js +21 -0
- package/lib/cjs/app/schema/oidc.d.ts +28 -0
- package/lib/cjs/app/schema/oidc.d.ts.map +1 -0
- package/lib/cjs/app/schema/oidc.js +13 -0
- package/lib/cjs/app/schema/registration.d.ts +22 -0
- package/lib/cjs/app/schema/registration.d.ts.map +1 -0
- package/lib/cjs/app/schema/registration.js +16 -0
- package/lib/cjs/app/schema/saml.d.ts +28 -0
- package/lib/cjs/app/schema/saml.d.ts.map +1 -0
- package/lib/cjs/app/schema/saml.js +13 -0
- package/lib/cjs/app/schema/schema.d.ts +8 -0
- package/lib/cjs/app/schema/schema.d.ts.map +1 -0
- package/lib/cjs/app/schema/schema.js +23 -0
- package/lib/cjs/app/schema/utils.d.ts +11 -0
- package/lib/cjs/app/schema/utils.d.ts.map +1 -0
- package/lib/cjs/app/schema/utils.js +23 -0
- package/lib/cjs/association/index.d.ts +2 -0
- package/lib/cjs/association/index.d.ts.map +1 -0
- package/lib/cjs/association/index.js +17 -0
- package/lib/cjs/association/schema/association.d.ts +79 -0
- package/lib/cjs/association/schema/association.d.ts.map +1 -0
- package/lib/cjs/association/schema/association.js +26 -0
- package/lib/cjs/association/schema/schema.d.ts +2 -0
- package/lib/cjs/association/schema/schema.d.ts.map +1 -0
- package/lib/cjs/association/schema/schema.js +17 -0
- package/lib/cjs/authentication/index.d.ts +2 -0
- package/lib/cjs/authentication/index.d.ts.map +1 -0
- package/lib/cjs/authentication/index.js +17 -0
- package/lib/cjs/authentication/schema/factors.d.ts +48 -0
- package/lib/cjs/authentication/schema/factors.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/factors.js +28 -0
- package/lib/cjs/authentication/schema/factors.test.d.ts +2 -0
- package/lib/cjs/authentication/schema/factors.test.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/factors.test.js +123 -0
- package/lib/cjs/authentication/schema/provider.d.ts +27 -0
- package/lib/cjs/authentication/schema/provider.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/provider.js +24 -0
- package/lib/cjs/authentication/schema/schema.d.ts +6 -0
- package/lib/cjs/authentication/schema/schema.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/schema.js +21 -0
- package/lib/cjs/authentication/schema/session.d.ts +59 -0
- package/lib/cjs/authentication/schema/session.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/session.js +46 -0
- package/lib/cjs/authentication/schema/settings.d.ts +46 -0
- package/lib/cjs/authentication/schema/settings.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/settings.js +16 -0
- package/lib/cjs/authentication/schema/strategy/base.d.ts +43 -0
- package/lib/cjs/authentication/schema/strategy/base.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/strategy/base.js +31 -0
- package/lib/cjs/authentication/schema/strategy/schema.d.ts +169 -0
- package/lib/cjs/authentication/schema/strategy/schema.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/strategy/schema.js +46 -0
- package/lib/cjs/authentication/schema/strategy/types/email.d.ts +44 -0
- package/lib/cjs/authentication/schema/strategy/types/email.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/strategy/types/email.js +20 -0
- package/lib/cjs/authentication/schema/strategy/types/password.d.ts +99 -0
- package/lib/cjs/authentication/schema/strategy/types/password.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/strategy/types/password.js +35 -0
- package/lib/cjs/authentication/schema/strategy/types/totp.d.ts +91 -0
- package/lib/cjs/authentication/schema/strategy/types/totp.d.ts.map +1 -0
- package/lib/cjs/authentication/schema/strategy/types/totp.js +48 -0
- package/lib/cjs/authorization/index.d.ts +2 -0
- package/lib/cjs/authorization/index.d.ts.map +1 -0
- package/lib/cjs/authorization/index.js +17 -0
- package/lib/cjs/authorization/schema/permission.d.ts +69 -0
- package/lib/cjs/authorization/schema/permission.d.ts.map +1 -0
- package/lib/cjs/authorization/schema/permission.js +50 -0
- package/lib/cjs/authorization/schema/role.d.ts +74 -0
- package/lib/cjs/authorization/schema/role.d.ts.map +1 -0
- package/lib/cjs/authorization/schema/role.js +52 -0
- package/lib/cjs/authorization/schema/schema.d.ts +4 -0
- package/lib/cjs/authorization/schema/schema.d.ts.map +1 -0
- package/lib/cjs/authorization/schema/schema.js +19 -0
- package/lib/cjs/authorization/schema/utils.d.ts +11 -0
- package/lib/cjs/authorization/schema/utils.d.ts.map +1 -0
- package/lib/cjs/authorization/schema/utils.js +23 -0
- package/lib/cjs/common/index.d.ts +2 -0
- package/lib/cjs/common/index.d.ts.map +1 -0
- package/lib/cjs/common/index.js +17 -0
- package/lib/cjs/common/schema/aggregate.d.ts +6 -0
- package/lib/cjs/common/schema/aggregate.d.ts.map +1 -0
- package/lib/cjs/common/schema/aggregate.js +8 -0
- package/lib/cjs/common/schema/dates.d.ts +39 -0
- package/lib/cjs/common/schema/dates.d.ts.map +1 -0
- package/lib/cjs/common/schema/dates.js +34 -0
- package/lib/cjs/common/schema/dates.test.d.ts +2 -0
- package/lib/cjs/common/schema/dates.test.d.ts.map +1 -0
- package/lib/cjs/common/schema/dates.test.js +33 -0
- package/lib/cjs/common/schema/jwt.d.ts +21 -0
- package/lib/cjs/common/schema/jwt.d.ts.map +1 -0
- package/lib/cjs/common/schema/jwt.js +24 -0
- package/lib/cjs/common/schema/metadata.d.ts +42 -0
- package/lib/cjs/common/schema/metadata.d.ts.map +1 -0
- package/lib/cjs/common/schema/metadata.js +88 -0
- package/lib/cjs/common/schema/metadata.test.d.ts +2 -0
- package/lib/cjs/common/schema/metadata.test.d.ts.map +1 -0
- package/lib/cjs/common/schema/metadata.test.js +62 -0
- package/lib/cjs/common/schema/schema.d.ts +5 -0
- package/lib/cjs/common/schema/schema.d.ts.map +1 -0
- package/lib/cjs/common/schema/schema.js +20 -0
- package/lib/cjs/customer/index.d.ts +2 -0
- package/lib/cjs/customer/index.d.ts.map +1 -0
- package/lib/cjs/customer/index.js +17 -0
- package/lib/cjs/customer/schema/organization.d.ts +54 -0
- package/lib/cjs/customer/schema/organization.d.ts.map +1 -0
- package/lib/cjs/customer/schema/organization.js +40 -0
- package/lib/cjs/customer/schema/schema.d.ts +4 -0
- package/lib/cjs/customer/schema/schema.d.ts.map +1 -0
- package/lib/cjs/customer/schema/schema.js +19 -0
- package/lib/cjs/customer/schema/user.d.ts +122 -0
- package/lib/cjs/customer/schema/user.d.ts.map +1 -0
- package/lib/cjs/customer/schema/user.js +83 -0
- package/lib/cjs/customer/schema/user.test.d.ts +2 -0
- package/lib/cjs/customer/schema/user.test.d.ts.map +1 -0
- package/lib/cjs/customer/schema/user.test.js +57 -0
- package/lib/cjs/customer/schema/utils.d.ts +11 -0
- package/lib/cjs/customer/schema/utils.d.ts.map +1 -0
- package/lib/cjs/customer/schema/utils.js +23 -0
- package/lib/cjs/identity/index.d.ts +2 -0
- package/lib/cjs/identity/index.d.ts.map +1 -0
- package/lib/cjs/identity/index.js +17 -0
- package/lib/cjs/identity/schema/schema.d.ts +7 -0
- package/lib/cjs/identity/schema/schema.d.ts.map +1 -0
- package/lib/cjs/identity/schema/schema.js +9 -0
- package/lib/cjs/oauth/index.d.ts +2 -0
- package/lib/cjs/oauth/index.d.ts.map +1 -0
- package/lib/cjs/oauth/index.js +17 -0
- package/lib/cjs/oauth/schema/schema.d.ts +8 -0
- package/lib/cjs/oauth/schema/schema.d.ts.map +1 -0
- package/lib/cjs/oauth/schema/schema.js +9 -0
- package/lib/cjs/package.json +1 -0
- package/lib/cjs/workspace/index.d.ts +2 -0
- package/lib/cjs/workspace/index.d.ts.map +1 -0
- package/lib/cjs/workspace/index.js +17 -0
- package/lib/cjs/workspace/schema/authorization.d.ts +31 -0
- package/lib/cjs/workspace/schema/authorization.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/authorization.js +22 -0
- package/lib/cjs/workspace/schema/branding.d.ts +38 -0
- package/lib/cjs/workspace/schema/branding.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/branding.js +25 -0
- package/lib/cjs/workspace/schema/membership.d.ts +25 -0
- package/lib/cjs/workspace/schema/membership.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/membership.js +19 -0
- package/lib/cjs/workspace/schema/registration.d.ts +28 -0
- package/lib/cjs/workspace/schema/registration.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/registration.js +22 -0
- package/lib/cjs/workspace/schema/schema.d.ts +10 -0
- package/lib/cjs/workspace/schema/schema.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/schema.js +25 -0
- package/lib/cjs/workspace/schema/settings.d.ts +23 -0
- package/lib/cjs/workspace/schema/settings.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/settings.js +15 -0
- package/lib/cjs/workspace/schema/tenant.d.ts +57 -0
- package/lib/cjs/workspace/schema/tenant.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/tenant.js +26 -0
- package/lib/cjs/workspace/schema/user-notification.d.ts +62 -0
- package/lib/cjs/workspace/schema/user-notification.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/user-notification.js +44 -0
- package/lib/cjs/workspace/schema/user-preferences.d.ts +26 -0
- package/lib/cjs/workspace/schema/user-preferences.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/user-preferences.js +19 -0
- package/lib/cjs/workspace/schema/utils.d.ts +15 -0
- package/lib/cjs/workspace/schema/utils.d.ts.map +1 -0
- package/lib/cjs/workspace/schema/utils.js +64 -0
- package/lib/esm/action/index.d.ts +2 -0
- package/lib/esm/action/index.d.ts.map +1 -0
- package/lib/esm/action/index.js +1 -0
- package/lib/esm/action/schema/base.d.ts +21 -0
- package/lib/esm/action/schema/base.d.ts.map +1 -0
- package/lib/esm/action/schema/base.js +16 -0
- package/lib/esm/action/schema/operations/set-password.d.ts +31 -0
- package/lib/esm/action/schema/operations/set-password.d.ts.map +1 -0
- package/lib/esm/action/schema/operations/set-password.js +15 -0
- package/lib/esm/action/schema/operations/sign-up-verification.d.ts +22 -0
- package/lib/esm/action/schema/operations/sign-up-verification.d.ts.map +1 -0
- package/lib/esm/action/schema/operations/sign-up-verification.js +12 -0
- package/lib/esm/action/schema/operations/sign-up.d.ts +44 -0
- package/lib/esm/action/schema/operations/sign-up.d.ts.map +1 -0
- package/lib/esm/action/schema/operations/sign-up.js +18 -0
- package/lib/esm/action/schema/operations/user-attribute-verification.d.ts +20 -0
- package/lib/esm/action/schema/operations/user-attribute-verification.d.ts.map +1 -0
- package/lib/esm/action/schema/operations/user-attribute-verification.js +10 -0
- package/lib/esm/action/schema/schema.d.ts +92 -0
- package/lib/esm/action/schema/schema.d.ts.map +1 -0
- package/lib/esm/action/schema/schema.js +21 -0
- package/lib/esm/activity/index.d.ts +2 -0
- package/lib/esm/activity/index.d.ts.map +1 -0
- package/lib/esm/activity/index.js +1 -0
- package/lib/esm/activity/schema/base.d.ts +54 -0
- package/lib/esm/activity/schema/base.d.ts.map +1 -0
- package/lib/esm/activity/schema/base.js +31 -0
- package/lib/esm/activity/schema/schema.d.ts +156 -0
- package/lib/esm/activity/schema/schema.d.ts.map +1 -0
- package/lib/esm/activity/schema/schema.js +33 -0
- package/lib/esm/activity/schema/types/authentication.d.ts +29 -0
- package/lib/esm/activity/schema/types/authentication.d.ts.map +1 -0
- package/lib/esm/activity/schema/types/authentication.js +13 -0
- package/lib/esm/activity/schema/types/authorization.d.ts +29 -0
- package/lib/esm/activity/schema/types/authorization.d.ts.map +1 -0
- package/lib/esm/activity/schema/types/authorization.js +14 -0
- package/lib/esm/activity/schema/types/note.d.ts +51 -0
- package/lib/esm/activity/schema/types/note.d.ts.map +1 -0
- package/lib/esm/activity/schema/types/note.js +14 -0
- package/lib/esm/activity/schema/types/operation.d.ts +31 -0
- package/lib/esm/activity/schema/types/operation.d.ts.map +1 -0
- package/lib/esm/activity/schema/types/operation.js +15 -0
- package/lib/esm/activity/schema/types/unknown.d.ts +22 -0
- package/lib/esm/activity/schema/types/unknown.d.ts.map +1 -0
- package/lib/esm/activity/schema/types/unknown.js +6 -0
- package/lib/esm/activity/schema/utils.d.ts +7 -0
- package/lib/esm/activity/schema/utils.d.ts.map +1 -0
- package/lib/esm/activity/schema/utils.js +9 -0
- package/lib/esm/app/index.d.ts +2 -0
- package/lib/esm/app/index.d.ts.map +1 -0
- package/lib/esm/app/index.js +1 -0
- package/lib/esm/app/schema/app.d.ts +58 -0
- package/lib/esm/app/schema/app.d.ts.map +1 -0
- package/lib/esm/app/schema/app.js +40 -0
- package/lib/esm/app/schema/authorization.d.ts +37 -0
- package/lib/esm/app/schema/authorization.d.ts.map +1 -0
- package/lib/esm/app/schema/authorization.js +41 -0
- package/lib/esm/app/schema/oauth.d.ts +30 -0
- package/lib/esm/app/schema/oauth.d.ts.map +1 -0
- package/lib/esm/app/schema/oauth.js +18 -0
- package/lib/esm/app/schema/oidc.d.ts +28 -0
- package/lib/esm/app/schema/oidc.d.ts.map +1 -0
- package/lib/esm/app/schema/oidc.js +10 -0
- package/lib/esm/app/schema/registration.d.ts +22 -0
- package/lib/esm/app/schema/registration.d.ts.map +1 -0
- package/lib/esm/app/schema/registration.js +13 -0
- package/lib/esm/app/schema/saml.d.ts +28 -0
- package/lib/esm/app/schema/saml.d.ts.map +1 -0
- package/lib/esm/app/schema/saml.js +10 -0
- package/lib/esm/app/schema/schema.d.ts +8 -0
- package/lib/esm/app/schema/schema.d.ts.map +1 -0
- package/lib/esm/app/schema/schema.js +7 -0
- package/lib/esm/app/schema/utils.d.ts +11 -0
- package/lib/esm/app/schema/utils.d.ts.map +1 -0
- package/lib/esm/app/schema/utils.js +15 -0
- package/lib/esm/association/index.d.ts +2 -0
- package/lib/esm/association/index.d.ts.map +1 -0
- package/lib/esm/association/index.js +1 -0
- package/lib/esm/association/schema/association.d.ts +79 -0
- package/lib/esm/association/schema/association.d.ts.map +1 -0
- package/lib/esm/association/schema/association.js +23 -0
- package/lib/esm/association/schema/schema.d.ts +2 -0
- package/lib/esm/association/schema/schema.d.ts.map +1 -0
- package/lib/esm/association/schema/schema.js +1 -0
- package/lib/esm/authentication/index.d.ts +2 -0
- package/lib/esm/authentication/index.d.ts.map +1 -0
- package/lib/esm/authentication/index.js +1 -0
- package/lib/esm/authentication/schema/factors.d.ts +48 -0
- package/lib/esm/authentication/schema/factors.d.ts.map +1 -0
- package/lib/esm/authentication/schema/factors.js +25 -0
- package/lib/esm/authentication/schema/factors.test.d.ts +2 -0
- package/lib/esm/authentication/schema/factors.test.d.ts.map +1 -0
- package/lib/esm/authentication/schema/factors.test.js +121 -0
- package/lib/esm/authentication/schema/provider.d.ts +27 -0
- package/lib/esm/authentication/schema/provider.d.ts.map +1 -0
- package/lib/esm/authentication/schema/provider.js +21 -0
- package/lib/esm/authentication/schema/schema.d.ts +6 -0
- package/lib/esm/authentication/schema/schema.d.ts.map +1 -0
- package/lib/esm/authentication/schema/schema.js +5 -0
- package/lib/esm/authentication/schema/session.d.ts +59 -0
- package/lib/esm/authentication/schema/session.d.ts.map +1 -0
- package/lib/esm/authentication/schema/session.js +43 -0
- package/lib/esm/authentication/schema/settings.d.ts +46 -0
- package/lib/esm/authentication/schema/settings.d.ts.map +1 -0
- package/lib/esm/authentication/schema/settings.js +13 -0
- package/lib/esm/authentication/schema/strategy/base.d.ts +43 -0
- package/lib/esm/authentication/schema/strategy/base.d.ts.map +1 -0
- package/lib/esm/authentication/schema/strategy/base.js +28 -0
- package/lib/esm/authentication/schema/strategy/schema.d.ts +169 -0
- package/lib/esm/authentication/schema/strategy/schema.d.ts.map +1 -0
- package/lib/esm/authentication/schema/strategy/schema.js +22 -0
- package/lib/esm/authentication/schema/strategy/types/email.d.ts +44 -0
- package/lib/esm/authentication/schema/strategy/types/email.d.ts.map +1 -0
- package/lib/esm/authentication/schema/strategy/types/email.js +17 -0
- package/lib/esm/authentication/schema/strategy/types/password.d.ts +99 -0
- package/lib/esm/authentication/schema/strategy/types/password.d.ts.map +1 -0
- package/lib/esm/authentication/schema/strategy/types/password.js +32 -0
- package/lib/esm/authentication/schema/strategy/types/totp.d.ts +91 -0
- package/lib/esm/authentication/schema/strategy/types/totp.d.ts.map +1 -0
- package/lib/esm/authentication/schema/strategy/types/totp.js +45 -0
- package/lib/esm/authorization/index.d.ts +2 -0
- package/lib/esm/authorization/index.d.ts.map +1 -0
- package/lib/esm/authorization/index.js +1 -0
- package/lib/esm/authorization/schema/permission.d.ts +69 -0
- package/lib/esm/authorization/schema/permission.d.ts.map +1 -0
- package/lib/esm/authorization/schema/permission.js +47 -0
- package/lib/esm/authorization/schema/role.d.ts +74 -0
- package/lib/esm/authorization/schema/role.d.ts.map +1 -0
- package/lib/esm/authorization/schema/role.js +49 -0
- package/lib/esm/authorization/schema/schema.d.ts +4 -0
- package/lib/esm/authorization/schema/schema.d.ts.map +1 -0
- package/lib/esm/authorization/schema/schema.js +3 -0
- package/lib/esm/authorization/schema/utils.d.ts +11 -0
- package/lib/esm/authorization/schema/utils.d.ts.map +1 -0
- package/lib/esm/authorization/schema/utils.js +15 -0
- package/lib/esm/common/index.d.ts +2 -0
- package/lib/esm/common/index.d.ts.map +1 -0
- package/lib/esm/common/index.js +1 -0
- package/lib/esm/common/schema/aggregate.d.ts +6 -0
- package/lib/esm/common/schema/aggregate.d.ts.map +1 -0
- package/lib/esm/common/schema/aggregate.js +5 -0
- package/lib/esm/common/schema/dates.d.ts +39 -0
- package/lib/esm/common/schema/dates.d.ts.map +1 -0
- package/lib/esm/common/schema/dates.js +31 -0
- package/lib/esm/common/schema/dates.test.d.ts +2 -0
- package/lib/esm/common/schema/dates.test.d.ts.map +1 -0
- package/lib/esm/common/schema/dates.test.js +31 -0
- package/lib/esm/common/schema/jwt.d.ts +21 -0
- package/lib/esm/common/schema/jwt.d.ts.map +1 -0
- package/lib/esm/common/schema/jwt.js +21 -0
- package/lib/esm/common/schema/metadata.d.ts +42 -0
- package/lib/esm/common/schema/metadata.d.ts.map +1 -0
- package/lib/esm/common/schema/metadata.js +83 -0
- package/lib/esm/common/schema/metadata.test.d.ts +2 -0
- package/lib/esm/common/schema/metadata.test.d.ts.map +1 -0
- package/lib/esm/common/schema/metadata.test.js +60 -0
- package/lib/esm/common/schema/schema.d.ts +5 -0
- package/lib/esm/common/schema/schema.d.ts.map +1 -0
- package/lib/esm/common/schema/schema.js +4 -0
- package/lib/esm/customer/index.d.ts +2 -0
- package/lib/esm/customer/index.d.ts.map +1 -0
- package/lib/esm/customer/index.js +1 -0
- package/lib/esm/customer/schema/organization.d.ts +54 -0
- package/lib/esm/customer/schema/organization.d.ts.map +1 -0
- package/lib/esm/customer/schema/organization.js +37 -0
- package/lib/esm/customer/schema/schema.d.ts +4 -0
- package/lib/esm/customer/schema/schema.d.ts.map +1 -0
- package/lib/esm/customer/schema/schema.js +3 -0
- package/lib/esm/customer/schema/user.d.ts +122 -0
- package/lib/esm/customer/schema/user.d.ts.map +1 -0
- package/lib/esm/customer/schema/user.js +80 -0
- package/lib/esm/customer/schema/user.test.d.ts +2 -0
- package/lib/esm/customer/schema/user.test.d.ts.map +1 -0
- package/lib/esm/customer/schema/user.test.js +55 -0
- package/lib/esm/customer/schema/utils.d.ts +11 -0
- package/lib/esm/customer/schema/utils.d.ts.map +1 -0
- package/lib/esm/customer/schema/utils.js +15 -0
- package/lib/esm/identity/index.d.ts +2 -0
- package/lib/esm/identity/index.d.ts.map +1 -0
- package/lib/esm/identity/index.js +1 -0
- package/lib/esm/identity/schema/schema.d.ts +7 -0
- package/lib/esm/identity/schema/schema.d.ts.map +1 -0
- package/lib/esm/identity/schema/schema.js +6 -0
- package/lib/esm/oauth/index.d.ts +2 -0
- package/lib/esm/oauth/index.d.ts.map +1 -0
- package/lib/esm/oauth/index.js +1 -0
- package/lib/esm/oauth/schema/schema.d.ts +8 -0
- package/lib/esm/oauth/schema/schema.d.ts.map +1 -0
- package/lib/esm/oauth/schema/schema.js +6 -0
- package/lib/esm/package.json +1 -0
- package/lib/esm/workspace/index.d.ts +2 -0
- package/lib/esm/workspace/index.d.ts.map +1 -0
- package/lib/esm/workspace/index.js +1 -0
- package/lib/esm/workspace/schema/authorization.d.ts +31 -0
- package/lib/esm/workspace/schema/authorization.d.ts.map +1 -0
- package/lib/esm/workspace/schema/authorization.js +19 -0
- package/lib/esm/workspace/schema/branding.d.ts +38 -0
- package/lib/esm/workspace/schema/branding.d.ts.map +1 -0
- package/lib/esm/workspace/schema/branding.js +22 -0
- package/lib/esm/workspace/schema/membership.d.ts +25 -0
- package/lib/esm/workspace/schema/membership.d.ts.map +1 -0
- package/lib/esm/workspace/schema/membership.js +16 -0
- package/lib/esm/workspace/schema/registration.d.ts +28 -0
- package/lib/esm/workspace/schema/registration.d.ts.map +1 -0
- package/lib/esm/workspace/schema/registration.js +19 -0
- package/lib/esm/workspace/schema/schema.d.ts +10 -0
- package/lib/esm/workspace/schema/schema.d.ts.map +1 -0
- package/lib/esm/workspace/schema/schema.js +9 -0
- package/lib/esm/workspace/schema/settings.d.ts +23 -0
- package/lib/esm/workspace/schema/settings.d.ts.map +1 -0
- package/lib/esm/workspace/schema/settings.js +12 -0
- package/lib/esm/workspace/schema/tenant.d.ts +57 -0
- package/lib/esm/workspace/schema/tenant.d.ts.map +1 -0
- package/lib/esm/workspace/schema/tenant.js +23 -0
- package/lib/esm/workspace/schema/user-notification.d.ts +62 -0
- package/lib/esm/workspace/schema/user-notification.d.ts.map +1 -0
- package/lib/esm/workspace/schema/user-notification.js +41 -0
- package/lib/esm/workspace/schema/user-preferences.d.ts +26 -0
- package/lib/esm/workspace/schema/user-preferences.d.ts.map +1 -0
- package/lib/esm/workspace/schema/user-preferences.js +16 -0
- package/lib/esm/workspace/schema/utils.d.ts +15 -0
- package/lib/esm/workspace/schema/utils.d.ts.map +1 -0
- package/lib/esm/workspace/schema/utils.js +22 -0
- package/package.json +155 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/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 @@
|
|
|
1
|
+
{"version":3,"file":"aggregate.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/aggregate.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;MAG1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,eAAe,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AggregateSchema = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
exports.AggregateSchema = (0, arktype_1.type)({
|
|
6
|
+
ids: (0, arktype_1.type)('string[]').optional(),
|
|
7
|
+
count: (0, arktype_1.type)('number[]').optional(),
|
|
8
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const RequiredDateSchema: import("arktype/out/methods/object").ObjectType<Date | ((In: string) => import("arktype/out/attributes").To<Date>), {}>;
|
|
2
|
+
export declare const OptionalDateSchema: import("arktype/out/methods/base").BaseType<Date | ((In: string) => import("arktype/out/attributes").To<Date>) | undefined, {}>;
|
|
3
|
+
export type AnyRequiredDateType = typeof RequiredDateSchema.inferIn;
|
|
4
|
+
export type RequiredDate = typeof RequiredDateSchema.inferOut;
|
|
5
|
+
export type AnyOptionalDate = typeof OptionalDateSchema.inferIn;
|
|
6
|
+
export type OptionalDate = typeof OptionalDateSchema.inferOut;
|
|
7
|
+
export declare const RequiredDatePayloadSchema: import("arktype/out/methods/object").ObjectType<(In: string | Date) => import("arktype/out/attributes").Out<string>, {}>;
|
|
8
|
+
export declare const OptionalDatePayloadSchema: import("arktype/out/methods/object").ObjectType<(In: string | Date | undefined) => import("arktype/out/attributes").Out<string | undefined>, {}>;
|
|
9
|
+
export type RequiredDatePayload = typeof RequiredDatePayloadSchema.inferOut;
|
|
10
|
+
export type OptionalDatePayload = typeof OptionalDatePayloadSchema.inferOut;
|
|
11
|
+
/**
|
|
12
|
+
* Created At
|
|
13
|
+
*/
|
|
14
|
+
export declare const CreatedAtPropertyPayloadSchema: import("arktype/out/methods/object").ObjectType<{
|
|
15
|
+
createdAt: (In: string | Date) => import("arktype/out/attributes").Out<string>;
|
|
16
|
+
}, {}>;
|
|
17
|
+
export type CreatedAtPropertyPayload = typeof CreatedAtPropertyPayloadSchema.inferOut;
|
|
18
|
+
/**
|
|
19
|
+
* Updated At
|
|
20
|
+
*/
|
|
21
|
+
export declare const UpdatedAtPropertyPayloadSchema: import("arktype/out/methods/object").ObjectType<{
|
|
22
|
+
updatedAt: (In: string | Date) => import("arktype/out/attributes").Out<string>;
|
|
23
|
+
}, {}>;
|
|
24
|
+
export type UpdatedAtPropertyPayload = typeof UpdatedAtPropertyPayloadSchema.inferOut;
|
|
25
|
+
/**
|
|
26
|
+
* Deleted At
|
|
27
|
+
*/
|
|
28
|
+
export declare const DeletedAtPropertyPayloadSchema: import("arktype/out/methods/object").ObjectType<{
|
|
29
|
+
deletedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes").Out<string | undefined>) | undefined;
|
|
30
|
+
}, {}>;
|
|
31
|
+
export type DeletedAtPropertyPayload = typeof DeletedAtPropertyPayloadSchema.inferOut;
|
|
32
|
+
/**
|
|
33
|
+
* Deactivated At
|
|
34
|
+
*/
|
|
35
|
+
export declare const DeactivatedAtPropertyPayloadSchema: import("arktype/out/methods/object").ObjectType<{
|
|
36
|
+
deactivatedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes").Out<string | undefined>) | undefined;
|
|
37
|
+
}, {}>;
|
|
38
|
+
export type DeactivatedAtPropertyPayload = typeof DeactivatedAtPropertyPayloadSchema.inferOut;
|
|
39
|
+
//# sourceMappingURL=dates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dates.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/dates.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,yHAA2C,CAAC;AAC3E,eAAO,MAAM,kBAAkB,iIAAqC,CAAC;AAErE,MAAM,MAAM,mBAAmB,GAAG,OAAO,kBAAkB,CAAC,OAAO,CAAC;AACpE,MAAM,MAAM,YAAY,GAAG,OAAO,kBAAkB,CAAC,QAAQ,CAAC;AAE9D,MAAM,MAAM,eAAe,GAAG,OAAO,kBAAkB,CAAC,OAAO,CAAC;AAChE,MAAM,MAAM,YAAY,GAAG,OAAO,kBAAkB,CAAC,QAAQ,CAAC;AAG9D,eAAO,MAAM,yBAAyB,0HAErC,CAAC;AACF,eAAO,MAAM,yBAAyB,kJAErC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,OAAO,yBAAyB,CAAC,QAAQ,CAAC;AAC5E,MAAM,MAAM,mBAAmB,GAAG,OAAO,yBAAyB,CAAC,QAAQ,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,8BAA8B;;MAEzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAClC,OAAO,8BAA8B,CAAC,QAAQ,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,8BAA8B;;MAEzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAClC,OAAO,8BAA8B,CAAC,QAAQ,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,8BAA8B;;MAEzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAClC,OAAO,8BAA8B,CAAC,QAAQ,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,kCAAkC;;MAE7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GACtC,OAAO,kCAAkC,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeactivatedAtPropertyPayloadSchema = exports.DeletedAtPropertyPayloadSchema = exports.UpdatedAtPropertyPayloadSchema = exports.CreatedAtPropertyPayloadSchema = exports.OptionalDatePayloadSchema = exports.RequiredDatePayloadSchema = exports.OptionalDateSchema = exports.RequiredDateSchema = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
// Normalizing to a Date object
|
|
6
|
+
exports.RequiredDateSchema = (0, arktype_1.type)('Date').or('string.date.iso.parse');
|
|
7
|
+
exports.OptionalDateSchema = exports.RequiredDateSchema.or('undefined');
|
|
8
|
+
// What the class property is serialized to
|
|
9
|
+
exports.RequiredDatePayloadSchema = exports.RequiredDateSchema.pipe.try((d) => d.toISOString());
|
|
10
|
+
exports.OptionalDatePayloadSchema = exports.OptionalDateSchema.pipe.try((d) => d?.toISOString());
|
|
11
|
+
/**
|
|
12
|
+
* Created At
|
|
13
|
+
*/
|
|
14
|
+
exports.CreatedAtPropertyPayloadSchema = (0, arktype_1.type)({
|
|
15
|
+
createdAt: exports.RequiredDatePayloadSchema,
|
|
16
|
+
});
|
|
17
|
+
/**
|
|
18
|
+
* Updated At
|
|
19
|
+
*/
|
|
20
|
+
exports.UpdatedAtPropertyPayloadSchema = (0, arktype_1.type)({
|
|
21
|
+
updatedAt: exports.RequiredDatePayloadSchema,
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* Deleted At
|
|
25
|
+
*/
|
|
26
|
+
exports.DeletedAtPropertyPayloadSchema = (0, arktype_1.type)({
|
|
27
|
+
'deletedAt?': exports.OptionalDatePayloadSchema,
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* Deactivated At
|
|
31
|
+
*/
|
|
32
|
+
exports.DeactivatedAtPropertyPayloadSchema = (0, arktype_1.type)({
|
|
33
|
+
'deactivatedAt?': exports.OptionalDatePayloadSchema,
|
|
34
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dates.test.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/dates.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const arktype_1 = require("arktype");
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
const dates_js_1 = require("./dates.js");
|
|
6
|
+
(0, vitest_1.describe)('Common - Dates', () => {
|
|
7
|
+
(0, vitest_1.describe)('Date Schema', () => {
|
|
8
|
+
(0, vitest_1.test)('should accept an iso string', async () => {
|
|
9
|
+
const result = (0, dates_js_1.RequiredDateSchema)(new Date().toISOString());
|
|
10
|
+
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
11
|
+
(0, vitest_1.expect)(result).toBeInstanceOf(Date);
|
|
12
|
+
});
|
|
13
|
+
(0, vitest_1.test)('should accept a Date object', async () => {
|
|
14
|
+
const result = (0, dates_js_1.RequiredDateSchema)(new Date());
|
|
15
|
+
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
16
|
+
(0, vitest_1.expect)(result).toBeInstanceOf(Date);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
(0, vitest_1.describe)('Payload Schema', () => {
|
|
20
|
+
(0, vitest_1.test)('should parse a Date to an ISO string', async () => {
|
|
21
|
+
const iso = new Date().toISOString();
|
|
22
|
+
const result = (0, dates_js_1.RequiredDatePayloadSchema)(new Date(iso));
|
|
23
|
+
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
24
|
+
(0, vitest_1.expect)(result).to.equal(iso);
|
|
25
|
+
});
|
|
26
|
+
(0, vitest_1.test)('should parse an ISO to an ISO string', async () => {
|
|
27
|
+
const iso = new Date().toISOString();
|
|
28
|
+
const result = (0, dates_js_1.RequiredDatePayloadSchema)(iso);
|
|
29
|
+
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
30
|
+
(0, vitest_1.expect)(result).to.equal(iso);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ref: https://datatracker.ietf.org/doc/html/rfc7518#section-3.1
|
|
3
|
+
*/
|
|
4
|
+
export declare const Algorithm: {
|
|
5
|
+
DEFAULT: string;
|
|
6
|
+
HS256: string;
|
|
7
|
+
HS384: string;
|
|
8
|
+
HS512: string;
|
|
9
|
+
RS256: string;
|
|
10
|
+
RS384: string;
|
|
11
|
+
RS512: string;
|
|
12
|
+
ES256: string;
|
|
13
|
+
ES384: string;
|
|
14
|
+
ES512: string;
|
|
15
|
+
PS256: string;
|
|
16
|
+
PS384: string;
|
|
17
|
+
PS512: string;
|
|
18
|
+
};
|
|
19
|
+
export type AnyAlgorithm = (typeof Algorithm)[keyof typeof Algorithm];
|
|
20
|
+
export declare const AlgorithmSchema: import("arktype/out/methods/string").StringType<string, {}>;
|
|
21
|
+
//# sourceMappingURL=jwt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/jwt.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;CAerB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEtE,eAAO,MAAM,eAAe,6DAY3B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AlgorithmSchema = exports.Algorithm = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
/**
|
|
6
|
+
* Ref: https://datatracker.ietf.org/doc/html/rfc7518#section-3.1
|
|
7
|
+
*/
|
|
8
|
+
exports.Algorithm = {
|
|
9
|
+
// DEFAULT: 'ES256',
|
|
10
|
+
DEFAULT: 'RS256',
|
|
11
|
+
HS256: 'HS256',
|
|
12
|
+
HS384: 'HS384',
|
|
13
|
+
HS512: 'HS512',
|
|
14
|
+
RS256: 'RS256',
|
|
15
|
+
RS384: 'RS384',
|
|
16
|
+
RS512: 'RS512',
|
|
17
|
+
ES256: 'ES256',
|
|
18
|
+
ES384: 'ES384',
|
|
19
|
+
ES512: 'ES512',
|
|
20
|
+
PS256: 'PS256',
|
|
21
|
+
PS384: 'PS384',
|
|
22
|
+
PS512: 'PS512',
|
|
23
|
+
};
|
|
24
|
+
exports.AlgorithmSchema = arktype_1.type.enumerated(exports.Algorithm.HS256, exports.Algorithm.HS384, exports.Algorithm.HS512, exports.Algorithm.RS256, exports.Algorithm.RS384, exports.Algorithm.RS512, exports.Algorithm.ES256, exports.Algorithm.ES384, exports.Algorithm.PS256, exports.Algorithm.PS384, exports.Algorithm.PS512);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Record
|
|
3
|
+
*/
|
|
4
|
+
declare const MetadataRecordSchema: import("arktype/out/methods/object").ObjectType<{
|
|
5
|
+
[x: string]: string | number | boolean;
|
|
6
|
+
}, {}>;
|
|
7
|
+
type MetadataRecord = typeof MetadataRecordSchema.inferOut;
|
|
8
|
+
/**
|
|
9
|
+
* Map
|
|
10
|
+
*/
|
|
11
|
+
declare const MetadataMapSchema: import("arktype/out/methods/object").ObjectType<Map<string, string | number | boolean>, {}>;
|
|
12
|
+
export type MetadataMap = typeof MetadataMapSchema.inferOut;
|
|
13
|
+
export declare const MetadataPayloadSchema: import("arktype/out/methods/object").ObjectType<(In: {
|
|
14
|
+
[x: string]: string | number | boolean;
|
|
15
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes").Out<{
|
|
16
|
+
[x: string]: string | number | boolean;
|
|
17
|
+
} | undefined>, {}>;
|
|
18
|
+
export type MetadataPayload = typeof MetadataPayloadSchema.inferOut;
|
|
19
|
+
export declare const MetadataPayloadPropertySchema: import("arktype/out/methods/object").ObjectType<{
|
|
20
|
+
metadata?: ((In: {
|
|
21
|
+
[x: string]: string | number | boolean;
|
|
22
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes").Out<{
|
|
23
|
+
[x: string]: string | number | boolean;
|
|
24
|
+
} | undefined>) | undefined;
|
|
25
|
+
}, {}>;
|
|
26
|
+
export type MetadataPayloadProperty = typeof MetadataPayloadPropertySchema.inferOut;
|
|
27
|
+
export declare const UpsertMetadataPayloadPropertySchema: import("arktype/out/methods/object").ObjectType<{
|
|
28
|
+
metadata?: ((In: {
|
|
29
|
+
[x: string]: string | number | boolean;
|
|
30
|
+
} | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes").Out<{
|
|
31
|
+
[x: string]: string | number | boolean;
|
|
32
|
+
} | null>) | undefined;
|
|
33
|
+
}, {}>;
|
|
34
|
+
export type UpsertMetadataPayloadProperty = typeof UpsertMetadataPayloadPropertySchema.inferOut;
|
|
35
|
+
export declare function buildMetadataPayload(map: MetadataMap | MetadataRecord): MetadataRecord | undefined;
|
|
36
|
+
export declare function buildUpsertMetadataPayload(map: MetadataMap | MetadataRecord): MetadataRecord | null;
|
|
37
|
+
export declare const MetadataMapPropertySchema: import("arktype/out/methods/object").ObjectType<{
|
|
38
|
+
metadata: (In: import("arktype/out/attributes").Default<unknown, Map<string, string | number | boolean>>) => import("arktype/out/attributes").Out<Map<string, string | number | boolean> | Map<string, any>>;
|
|
39
|
+
}, {}>;
|
|
40
|
+
export type MetadataMapProperty = typeof MetadataMapPropertySchema.inferOut;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/metadata.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,QAAA,MAAM,oBAAoB;;MAA4C,CAAC;AACvE,KAAK,cAAc,GAAG,OAAO,oBAAoB,CAAC,QAAQ,CAAC;AAE3D;;GAEG;AACH,QAAA,MAAM,iBAAiB,6FAEtB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG,OAAO,iBAAiB,CAAC,QAAQ,CAAC;AAoB5D,eAAO,MAAM,qBAAqB;;;;mBAG6B,CAAC;AAChE,MAAM,MAAM,eAAe,GAAG,OAAO,qBAAqB,CAAC,QAAQ,CAAC;AAEpE,eAAO,MAAM,6BAA6B;;;;;;MAExC,CAAC;AACH,MAAM,MAAM,uBAAuB,GACjC,OAAO,6BAA6B,CAAC,QAAQ,CAAC;AAOhD,eAAO,MAAM,mCAAmC;;;;;;MAE9C,CAAC;AACH,MAAM,MAAM,6BAA6B,GACvC,OAAO,mCAAmC,CAAC,QAAQ,CAAC;AAEtD,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,WAAW,GAAG,cAAc,GAChC,cAAc,GAAG,SAAS,CAgB5B;AAED,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,WAAW,GAAG,cAAc,GAChC,cAAc,GAAG,IAAI,CAgBvB;AAQD,eAAO,MAAM,yBAAyB;;MAEpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,yBAAyB,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MetadataMapPropertySchema = exports.UpsertMetadataPayloadPropertySchema = exports.MetadataPayloadPropertySchema = exports.MetadataPayloadSchema = void 0;
|
|
4
|
+
exports.buildMetadataPayload = buildMetadataPayload;
|
|
5
|
+
exports.buildUpsertMetadataPayload = buildUpsertMetadataPayload;
|
|
6
|
+
const arktype_1 = require("arktype");
|
|
7
|
+
/**
|
|
8
|
+
* Value
|
|
9
|
+
*/
|
|
10
|
+
const MetadataValueSchema = (0, arktype_1.type)('string | number | boolean');
|
|
11
|
+
/**
|
|
12
|
+
* Record
|
|
13
|
+
*/
|
|
14
|
+
const MetadataRecordSchema = (0, arktype_1.type)({ '[string]': MetadataValueSchema });
|
|
15
|
+
/**
|
|
16
|
+
* Map
|
|
17
|
+
*/
|
|
18
|
+
const MetadataMapSchema = arktype_1.type.instanceOf((Map));
|
|
19
|
+
/**
|
|
20
|
+
* Record To Map
|
|
21
|
+
*/
|
|
22
|
+
const MetadataMapMatch = (0, arktype_1.match)({
|
|
23
|
+
undefined: () => new Map(),
|
|
24
|
+
})
|
|
25
|
+
.case(MetadataMapSchema, (s) => new Map(s))
|
|
26
|
+
.case(MetadataMapSchema, (s) => new Map(Object.entries(s || {}).map(([key, value]) => [key, value])))
|
|
27
|
+
.default(() => new Map());
|
|
28
|
+
exports.MetadataPayloadSchema = (0, arktype_1.type)('undefined | null')
|
|
29
|
+
.or(MetadataMapSchema)
|
|
30
|
+
.or(MetadataRecordSchema)
|
|
31
|
+
.pipe((map) => (map ? buildMetadataPayload(map) : undefined));
|
|
32
|
+
exports.MetadataPayloadPropertySchema = (0, arktype_1.type)({
|
|
33
|
+
'metadata?': exports.MetadataPayloadSchema,
|
|
34
|
+
});
|
|
35
|
+
const UpsertMetadataPayloadSchema = (0, arktype_1.type)('undefined | null')
|
|
36
|
+
.or(MetadataMapSchema)
|
|
37
|
+
.or(MetadataRecordSchema)
|
|
38
|
+
.pipe((map) => (map ? buildUpsertMetadataPayload(map) || null : null));
|
|
39
|
+
exports.UpsertMetadataPayloadPropertySchema = (0, arktype_1.type)({
|
|
40
|
+
'metadata?': UpsertMetadataPayloadSchema,
|
|
41
|
+
});
|
|
42
|
+
function buildMetadataPayload(map) {
|
|
43
|
+
if (!(map instanceof Map)) {
|
|
44
|
+
return map;
|
|
45
|
+
}
|
|
46
|
+
const result = Array.from(map.entries()).reduce((result, [key, value]) => {
|
|
47
|
+
if (value == null || value === '') {
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
Object.assign(result, { [key]: value });
|
|
51
|
+
return result;
|
|
52
|
+
}, {});
|
|
53
|
+
return Object.keys(result).length ? result : undefined;
|
|
54
|
+
}
|
|
55
|
+
function buildUpsertMetadataPayload(map) {
|
|
56
|
+
if (!(map instanceof Map)) {
|
|
57
|
+
return map;
|
|
58
|
+
}
|
|
59
|
+
const result = Array.from(map.entries()).reduce((result, [key, value]) => {
|
|
60
|
+
if (value == null || value === '') {
|
|
61
|
+
return result;
|
|
62
|
+
}
|
|
63
|
+
Object.assign(result, { [key]: value });
|
|
64
|
+
return result;
|
|
65
|
+
}, {});
|
|
66
|
+
return Object.keys(result).length ? result : null;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Map
|
|
70
|
+
*/
|
|
71
|
+
const ToMetadataMapSchema = MetadataMapMatch.default(() => new Map());
|
|
72
|
+
exports.MetadataMapPropertySchema = (0, arktype_1.type)({
|
|
73
|
+
metadata: ToMetadataMapSchema,
|
|
74
|
+
});
|
|
75
|
+
// export const metadataAttributeScope = scope({
|
|
76
|
+
// metadata: MetadataAttributeMatch.default(
|
|
77
|
+
// () => new Map<string, typeof MetadataAttributeValueSchema.inferOut>(),
|
|
78
|
+
// ),
|
|
79
|
+
// });
|
|
80
|
+
// export const metadataPropertyScope = scope({
|
|
81
|
+
// 'metadata?': MetadataPropertyItemSchema,
|
|
82
|
+
// });
|
|
83
|
+
// export const serializedMetadataScope = scope({
|
|
84
|
+
// metadata: SerializedMetadataSchema,
|
|
85
|
+
// });
|
|
86
|
+
// export const storageMetadataScope = scope({
|
|
87
|
+
// metadata: StorageMetadataSchema,
|
|
88
|
+
// });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.test.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/metadata.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const arktype_1 = require("arktype");
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
const metadata_js_1 = require("./metadata.js");
|
|
6
|
+
(0, vitest_1.describe)('Common - Metadata', () => {
|
|
7
|
+
(0, vitest_1.describe)('Map Property Schema', () => {
|
|
8
|
+
(0, vitest_1.test)('should parse a record to a map', async () => {
|
|
9
|
+
const result = (0, metadata_js_1.MetadataMapPropertySchema)({
|
|
10
|
+
metadata: { foo: 'bar' },
|
|
11
|
+
});
|
|
12
|
+
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
13
|
+
(0, vitest_1.expect)(result?.metadata).toBeInstanceOf(Map);
|
|
14
|
+
});
|
|
15
|
+
(0, vitest_1.test)('should parse undefined property to a map', async () => {
|
|
16
|
+
const result = (0, metadata_js_1.MetadataMapPropertySchema)({
|
|
17
|
+
metadata: undefined,
|
|
18
|
+
});
|
|
19
|
+
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
20
|
+
(0, vitest_1.expect)(result?.metadata).toBeInstanceOf(Map);
|
|
21
|
+
});
|
|
22
|
+
(0, vitest_1.test)('should parse undefined to a map', async () => {
|
|
23
|
+
const result = (0, metadata_js_1.MetadataMapPropertySchema)({});
|
|
24
|
+
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
25
|
+
(0, vitest_1.expect)(result?.metadata).toBeInstanceOf(Map);
|
|
26
|
+
});
|
|
27
|
+
(0, vitest_1.test)('should parse map to a map', async () => {
|
|
28
|
+
const result = (0, metadata_js_1.MetadataMapPropertySchema)({
|
|
29
|
+
metadata: new Map([['foo', 'bar']]),
|
|
30
|
+
});
|
|
31
|
+
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
32
|
+
(0, vitest_1.expect)(result?.metadata).toBeInstanceOf(Map);
|
|
33
|
+
});
|
|
34
|
+
(0, vitest_1.test)('should parse null to a map', async () => {
|
|
35
|
+
const result = (0, metadata_js_1.MetadataMapPropertySchema)({
|
|
36
|
+
metadata: null,
|
|
37
|
+
});
|
|
38
|
+
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
39
|
+
(0, vitest_1.expect)(result?.metadata).toBeInstanceOf(Map);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
(0, vitest_1.describe)('Payload', () => {
|
|
43
|
+
(0, vitest_1.test)('should parse map to record', async () => {
|
|
44
|
+
const result = (0, metadata_js_1.MetadataPayloadPropertySchema)({
|
|
45
|
+
metadata: new Map([
|
|
46
|
+
['foo', 'bar'],
|
|
47
|
+
['baz', 0],
|
|
48
|
+
]),
|
|
49
|
+
});
|
|
50
|
+
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
51
|
+
(0, vitest_1.expect)(result?.metadata?.foo).to.equal('bar');
|
|
52
|
+
(0, vitest_1.expect)(result?.metadata?.baz).to.equal(0);
|
|
53
|
+
});
|
|
54
|
+
(0, vitest_1.test)('should return undefined if map is empty', async () => {
|
|
55
|
+
const result = (0, metadata_js_1.MetadataPayloadPropertySchema)({
|
|
56
|
+
metadata: new Map(),
|
|
57
|
+
});
|
|
58
|
+
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
59
|
+
(0, vitest_1.expect)(result?.metadata).is.undefined;
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/schema.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./aggregate.js"), exports);
|
|
18
|
+
__exportStar(require("./dates.js"), exports);
|
|
19
|
+
__exportStar(require("./jwt.js"), exports);
|
|
20
|
+
__exportStar(require("./metadata.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/customer/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,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,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAE1B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./organization.js"), exports);
|
|
18
|
+
__exportStar(require("./user.js"), exports);
|
|
19
|
+
__exportStar(require("./utils.js"), exports);
|