@go-mondo/identity-sdk 0.0.2-beta.12 → 0.0.2-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-please-manifest.json +1 -1
- package/.tsbuildinfo/cjs.json +1 -1
- package/.tsbuildinfo/esm.json +1 -1
- package/CHANGELOG.md +7 -0
- package/dist/cjs/action/schema/base.d.ts +22 -20
- package/dist/cjs/action/schema/base.d.ts.map +1 -1
- package/dist/cjs/action/schema/base.js +15 -8
- package/dist/cjs/action/schema/base.test.js +50 -34
- package/dist/cjs/action/schema/operations/set-password.d.ts +30 -30
- package/dist/cjs/action/schema/operations/set-password.d.ts.map +1 -1
- package/dist/cjs/action/schema/operations/set-password.js +9 -8
- package/dist/cjs/action/schema/operations/set-password.test.js +30 -29
- package/dist/cjs/action/schema/operations/sign-up-verification.d.ts +21 -21
- package/dist/cjs/action/schema/operations/sign-up-verification.d.ts.map +1 -1
- package/dist/cjs/action/schema/operations/sign-up-verification.js +8 -7
- package/dist/cjs/action/schema/operations/sign-up-verification.test.js +28 -29
- package/dist/cjs/action/schema/operations/sign-up.d.ts +40 -43
- package/dist/cjs/action/schema/operations/sign-up.d.ts.map +1 -1
- package/dist/cjs/action/schema/operations/sign-up.js +24 -15
- package/dist/cjs/action/schema/operations/sign-up.test.js +33 -34
- package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts +19 -19
- package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts.map +1 -1
- package/dist/cjs/action/schema/operations/user-attribute-verification.js +6 -5
- package/dist/cjs/action/schema/operations/user-attribute-verification.test.js +25 -26
- package/dist/cjs/action/schema/schema.d.ts +70 -76
- package/dist/cjs/action/schema/schema.d.ts.map +1 -1
- package/dist/cjs/action/schema/schema.test.js +26 -27
- package/dist/cjs/activity/resources.d.ts.map +1 -1
- package/dist/cjs/activity/resources.js +1 -1
- package/dist/cjs/activity/schema/base.d.ts +88 -69
- package/dist/cjs/activity/schema/base.d.ts.map +1 -1
- package/dist/cjs/activity/schema/base.js +30 -18
- package/dist/cjs/activity/schema/base.test.js +85 -55
- package/dist/cjs/activity/schema/schema.d.ts +293 -226
- package/dist/cjs/activity/schema/schema.d.ts.map +1 -1
- package/dist/cjs/activity/schema/schema.test.js +47 -48
- package/dist/cjs/activity/schema/types/authentication.d.ts +64 -46
- package/dist/cjs/activity/schema/types/authentication.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/authentication.js +16 -7
- package/dist/cjs/activity/schema/types/authentication.test.js +37 -38
- package/dist/cjs/activity/schema/types/authorization.d.ts +64 -46
- package/dist/cjs/activity/schema/types/authorization.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/authorization.js +16 -7
- package/dist/cjs/activity/schema/types/authorization.test.js +41 -42
- package/dist/cjs/activity/schema/types/note.d.ts +83 -70
- package/dist/cjs/activity/schema/types/note.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/note.js +20 -12
- package/dist/cjs/activity/schema/types/note.test.js +48 -49
- package/dist/cjs/activity/schema/types/operation.d.ts +64 -45
- package/dist/cjs/activity/schema/types/operation.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/operation.js +19 -8
- package/dist/cjs/activity/schema/types/operation.test.js +34 -35
- package/dist/cjs/activity/schema/types/unknown.d.ts +50 -41
- package/dist/cjs/activity/schema/types/unknown.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/unknown.js +12 -6
- package/dist/cjs/activity/schema/types/unknown.test.js +29 -30
- package/dist/cjs/app/authorization/resources.d.ts.map +1 -1
- package/dist/cjs/app/authorization/resources.js +2 -3
- package/dist/cjs/app/authorization/schema.d.ts +96 -52
- package/dist/cjs/app/authorization/schema.d.ts.map +1 -1
- package/dist/cjs/app/authorization/schema.js +61 -52
- package/dist/cjs/app/authorization/schema.test.js +96 -71
- package/dist/cjs/app/oauth/resources.d.ts.map +1 -1
- package/dist/cjs/app/oauth/resources.js +2 -3
- package/dist/cjs/app/oauth/schema.d.ts +34 -41
- package/dist/cjs/app/oauth/schema.d.ts.map +1 -1
- package/dist/cjs/app/oauth/schema.js +23 -17
- package/dist/cjs/app/oauth/schema.test.js +38 -39
- package/dist/cjs/app/oidc/resources.d.ts.map +1 -1
- package/dist/cjs/app/oidc/resources.js +4 -5
- package/dist/cjs/app/oidc/schema.d.ts +26 -37
- package/dist/cjs/app/oidc/schema.d.ts.map +1 -1
- package/dist/cjs/app/oidc/schema.js +17 -12
- package/dist/cjs/app/oidc/schema.test.js +45 -26
- package/dist/cjs/app/registration/resources.d.ts.map +1 -1
- package/dist/cjs/app/registration/resources.js +2 -3
- package/dist/cjs/app/registration/schema.d.ts +24 -31
- package/dist/cjs/app/registration/schema.d.ts.map +1 -1
- package/dist/cjs/app/registration/schema.js +23 -16
- package/dist/cjs/app/registration/schema.test.js +68 -150
- package/dist/cjs/app/resources.d.ts.map +1 -1
- package/dist/cjs/app/resources.js +5 -5
- package/dist/cjs/app/saml/resources.d.ts.map +1 -1
- package/dist/cjs/app/saml/resources.js +4 -5
- package/dist/cjs/app/saml/schema.d.ts +26 -37
- package/dist/cjs/app/saml/schema.d.ts.map +1 -1
- package/dist/cjs/app/saml/schema.js +17 -12
- package/dist/cjs/app/schema.d.ts +72 -68
- package/dist/cjs/app/schema.d.ts.map +1 -1
- package/dist/cjs/app/schema.js +34 -27
- package/dist/cjs/app/schema.test.js +38 -41
- package/dist/cjs/association/resources.d.ts.map +1 -1
- package/dist/cjs/association/resources.js +3 -5
- package/dist/cjs/association/schema.d.ts +225 -181
- package/dist/cjs/association/schema.d.ts.map +1 -1
- package/dist/cjs/association/schema.js +28 -22
- package/dist/cjs/association/schema.test.js +36 -28
- package/dist/cjs/authentication/factors/schema.d.ts +18 -55
- package/dist/cjs/authentication/factors/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/factors/schema.js +21 -23
- package/dist/cjs/authentication/factors/schema.test.js +33 -34
- package/dist/cjs/authentication/providers/schema.d.ts +23 -22
- package/dist/cjs/authentication/providers/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/providers/schema.js +10 -8
- package/dist/cjs/authentication/sessions/resources.d.ts.map +1 -1
- package/dist/cjs/authentication/sessions/resources.js +2 -2
- package/dist/cjs/authentication/sessions/schema.d.ts +101 -74
- package/dist/cjs/authentication/sessions/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/sessions/schema.js +56 -25
- package/dist/cjs/authentication/settings/resources.d.ts.map +1 -1
- package/dist/cjs/authentication/settings/resources.js +2 -3
- package/dist/cjs/authentication/settings/schema.d.ts +25 -68
- package/dist/cjs/authentication/settings/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/settings/schema.js +13 -10
- package/dist/cjs/authentication/settings/schema.test.js +28 -19
- package/dist/cjs/authentication/strategies/resources.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/resources.js +5 -5
- package/dist/cjs/authentication/strategies/schema/base.d.ts +59 -51
- package/dist/cjs/authentication/strategies/schema/base.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/base.js +26 -15
- package/dist/cjs/authentication/strategies/schema/schema.d.ts +206 -197
- package/dist/cjs/authentication/strategies/schema/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/types/email.d.ts +61 -60
- package/dist/cjs/authentication/strategies/schema/types/email.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/types/email.js +24 -14
- package/dist/cjs/authentication/strategies/schema/types/email.test.js +49 -50
- package/dist/cjs/authentication/strategies/schema/types/password.d.ts +129 -122
- package/dist/cjs/authentication/strategies/schema/types/password.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/types/password.js +33 -25
- package/dist/cjs/authentication/strategies/schema/types/totp.d.ts +107 -94
- package/dist/cjs/authentication/strategies/schema/types/totp.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/types/totp.js +50 -26
- package/dist/cjs/authorization/permissions/resources.d.ts.map +1 -1
- package/dist/cjs/authorization/permissions/resources.js +5 -5
- package/dist/cjs/authorization/permissions/schema.d.ts +92 -88
- package/dist/cjs/authorization/permissions/schema.d.ts.map +1 -1
- package/dist/cjs/authorization/permissions/schema.js +38 -28
- package/dist/cjs/authorization/permissions/schema.test.js +57 -59
- package/dist/cjs/authorization/roles/resources.d.ts.map +1 -1
- package/dist/cjs/authorization/roles/resources.js +5 -5
- package/dist/cjs/authorization/roles/schema.d.ts +102 -98
- package/dist/cjs/authorization/roles/schema.d.ts.map +1 -1
- package/dist/cjs/authorization/roles/schema.js +35 -32
- package/dist/cjs/authorization/roles/schema.test.js +58 -59
- package/dist/cjs/authorization/schema.d.ts +7 -6
- package/dist/cjs/authorization/schema.d.ts.map +1 -1
- package/dist/cjs/authorization/schema.js +9 -3
- package/dist/cjs/common/resources/init.d.ts +7 -6
- package/dist/cjs/common/resources/init.d.ts.map +1 -1
- package/dist/cjs/common/resources/init.js +17 -9
- package/dist/cjs/common/resources/utils.d.ts +0 -9
- package/dist/cjs/common/resources/utils.d.ts.map +1 -1
- package/dist/cjs/common/resources/utils.js +0 -26
- package/dist/cjs/common/resources/utils.test.js +0 -29
- package/dist/cjs/common/schema/aggregate.d.ts +6 -5
- package/dist/cjs/common/schema/aggregate.d.ts.map +1 -1
- package/dist/cjs/common/schema/aggregate.js +4 -4
- package/dist/cjs/common/schema/aggregate.test.js +21 -22
- package/dist/cjs/common/schema/collection.d.ts +11 -10
- package/dist/cjs/common/schema/collection.d.ts.map +1 -1
- package/dist/cjs/common/schema/collection.js +6 -4
- package/dist/cjs/common/schema/collection.test.js +66 -48
- package/dist/cjs/common/schema/dates.d.ts +27 -26
- package/dist/cjs/common/schema/dates.d.ts.map +1 -1
- package/dist/cjs/common/schema/dates.js +17 -11
- package/dist/cjs/common/schema/dates.test.js +24 -13
- package/dist/cjs/common/schema/id.d.ts +2 -1
- package/dist/cjs/common/schema/id.d.ts.map +1 -1
- package/dist/cjs/common/schema/id.js +2 -2
- package/dist/cjs/common/schema/id.test.js +70 -38
- package/dist/cjs/common/schema/jwt.d.ts +27 -14
- package/dist/cjs/common/schema/jwt.d.ts.map +1 -1
- package/dist/cjs/common/schema/jwt.js +14 -2
- package/dist/cjs/common/schema/jwt.test.js +25 -19
- package/dist/cjs/common/schema/metadata.d.ts +24 -41
- package/dist/cjs/common/schema/metadata.d.ts.map +1 -1
- package/dist/cjs/common/schema/metadata.js +38 -37
- package/dist/cjs/common/schema/metadata.test.js +36 -37
- package/dist/cjs/common/schema/pagination.d.ts +6 -5
- package/dist/cjs/common/schema/pagination.d.ts.map +1 -1
- package/dist/cjs/common/schema/pagination.js +4 -4
- package/dist/cjs/common/schema/pagination.test.js +19 -20
- package/dist/cjs/common/schema/schema.d.ts +4 -4
- package/dist/cjs/common/schema/schema.d.ts.map +1 -1
- package/dist/cjs/common/schema/schema.js +6 -5
- package/dist/cjs/common/schema/schema.test.js +9 -15
- package/dist/cjs/common/schema/sets.d.ts +3 -2
- package/dist/cjs/common/schema/sets.d.ts.map +1 -1
- package/dist/cjs/common/schema/sets.js +9 -6
- package/dist/cjs/common/schema/sets.test.js +52 -43
- package/dist/cjs/customer/organization/schema.d.ts +44 -46
- package/dist/cjs/customer/organization/schema.d.ts.map +1 -1
- package/dist/cjs/customer/organization/schema.js +26 -20
- package/dist/cjs/customer/schema.d.ts +7 -6
- package/dist/cjs/customer/schema.d.ts.map +1 -1
- package/dist/cjs/customer/schema.js +9 -3
- package/dist/cjs/customer/users/resources.d.ts.map +1 -1
- package/dist/cjs/customer/users/resources.js +5 -5
- package/dist/cjs/customer/users/schema.d.ts +140 -139
- package/dist/cjs/customer/users/schema.d.ts.map +1 -1
- package/dist/cjs/customer/users/schema.js +58 -46
- package/dist/cjs/customer/users/schema.test.js +22 -35
- package/dist/cjs/customer/users/utils.d.ts +3 -2
- package/dist/cjs/customer/users/utils.d.ts.map +1 -1
- package/dist/cjs/identity/schema.d.ts +5 -1
- package/dist/cjs/identity/schema.d.ts.map +1 -1
- package/dist/cjs/identity/schema.js +5 -2
- package/dist/cjs/identity/schema.test.js +21 -16
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.d.ts +31 -28
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.d.ts.map +1 -1
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.js +56 -37
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.test.js +44 -45
- package/dist/cjs/oauth/authorize/schema/grants/implicit.d.ts +16 -10
- package/dist/cjs/oauth/authorize/schema/grants/implicit.d.ts.map +1 -1
- package/dist/cjs/oauth/authorize/schema/grants/implicit.js +19 -10
- package/dist/cjs/oauth/authorize/schema/schema.d.ts +44 -36
- package/dist/cjs/oauth/authorize/schema/schema.d.ts.map +1 -1
- package/dist/cjs/oauth/common/schema.d.ts +21 -7
- package/dist/cjs/oauth/common/schema.d.ts.map +1 -1
- package/dist/cjs/oauth/common/schema.js +20 -7
- package/dist/cjs/oauth/common/schema.test.js +25 -26
- package/dist/cjs/oauth/token/schema/grants/authorization-code.d.ts +12 -9
- package/dist/cjs/oauth/token/schema/grants/authorization-code.d.ts.map +1 -1
- package/dist/cjs/oauth/token/schema/grants/authorization-code.js +11 -10
- package/dist/cjs/oauth/token/schema/grants/client-credentials.d.ts +20 -15
- package/dist/cjs/oauth/token/schema/grants/client-credentials.d.ts.map +1 -1
- package/dist/cjs/oauth/token/schema/grants/client-credentials.js +13 -8
- package/dist/cjs/oauth/token/schema/grants/refresh-token.d.ts +11 -8
- package/dist/cjs/oauth/token/schema/grants/refresh-token.d.ts.map +1 -1
- package/dist/cjs/oauth/token/schema/grants/refresh-token.js +6 -6
- package/dist/cjs/oauth/token/schema/schema.d.ts +28 -21
- package/dist/cjs/oauth/token/schema/schema.d.ts.map +1 -1
- package/dist/cjs/oauth/token/schema/schema.test.js +42 -28
- package/dist/cjs/workspace/authorization/schema.d.ts +44 -27
- package/dist/cjs/workspace/authorization/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/authorization/schema.js +16 -11
- package/dist/cjs/workspace/branding/schema.d.ts +30 -37
- package/dist/cjs/workspace/branding/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/branding/schema.js +20 -15
- package/dist/cjs/workspace/membership/schema.d.ts +21 -20
- package/dist/cjs/workspace/membership/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/membership/schema.js +6 -6
- package/dist/cjs/workspace/registration/schema.d.ts +26 -27
- package/dist/cjs/workspace/registration/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/registration/schema.js +13 -11
- package/dist/cjs/workspace/settings/schema.d.ts +12 -19
- package/dist/cjs/workspace/settings/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/settings/schema.js +7 -6
- package/dist/cjs/workspace/settings/schema.test.js +18 -19
- package/dist/cjs/workspace/tenant/schema.d.ts +55 -57
- package/dist/cjs/workspace/tenant/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/tenant/schema.js +17 -12
- package/dist/cjs/workspace/user/notifications/schema.d.ts +50 -56
- package/dist/cjs/workspace/user/notifications/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/user/notifications/schema.js +26 -23
- package/dist/cjs/workspace/user/preferences/schema.d.ts +18 -25
- package/dist/cjs/workspace/user/preferences/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/user/preferences/schema.js +16 -11
- package/dist/esm/action/schema/base.d.ts +22 -20
- package/dist/esm/action/schema/base.d.ts.map +1 -1
- package/dist/esm/action/schema/base.js +15 -8
- package/dist/esm/action/schema/base.test.js +50 -34
- package/dist/esm/action/schema/operations/set-password.d.ts +30 -30
- package/dist/esm/action/schema/operations/set-password.d.ts.map +1 -1
- package/dist/esm/action/schema/operations/set-password.js +9 -8
- package/dist/esm/action/schema/operations/set-password.test.js +30 -29
- package/dist/esm/action/schema/operations/sign-up-verification.d.ts +21 -21
- package/dist/esm/action/schema/operations/sign-up-verification.d.ts.map +1 -1
- package/dist/esm/action/schema/operations/sign-up-verification.js +8 -7
- package/dist/esm/action/schema/operations/sign-up-verification.test.js +28 -29
- package/dist/esm/action/schema/operations/sign-up.d.ts +40 -43
- package/dist/esm/action/schema/operations/sign-up.d.ts.map +1 -1
- package/dist/esm/action/schema/operations/sign-up.js +19 -10
- package/dist/esm/action/schema/operations/sign-up.test.js +33 -34
- package/dist/esm/action/schema/operations/user-attribute-verification.d.ts +19 -19
- package/dist/esm/action/schema/operations/user-attribute-verification.d.ts.map +1 -1
- package/dist/esm/action/schema/operations/user-attribute-verification.js +6 -5
- package/dist/esm/action/schema/operations/user-attribute-verification.test.js +25 -26
- package/dist/esm/action/schema/schema.d.ts +70 -76
- package/dist/esm/action/schema/schema.d.ts.map +1 -1
- package/dist/esm/action/schema/schema.test.js +26 -27
- package/dist/esm/activity/resources.d.ts.map +1 -1
- package/dist/esm/activity/resources.js +2 -2
- package/dist/esm/activity/schema/base.d.ts +88 -69
- package/dist/esm/activity/schema/base.d.ts.map +1 -1
- package/dist/esm/activity/schema/base.js +30 -18
- package/dist/esm/activity/schema/base.test.js +85 -55
- package/dist/esm/activity/schema/schema.d.ts +293 -226
- package/dist/esm/activity/schema/schema.d.ts.map +1 -1
- package/dist/esm/activity/schema/schema.test.js +47 -48
- package/dist/esm/activity/schema/types/authentication.d.ts +64 -46
- package/dist/esm/activity/schema/types/authentication.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/authentication.js +16 -7
- package/dist/esm/activity/schema/types/authentication.test.js +37 -38
- package/dist/esm/activity/schema/types/authorization.d.ts +64 -46
- package/dist/esm/activity/schema/types/authorization.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/authorization.js +16 -7
- package/dist/esm/activity/schema/types/authorization.test.js +41 -42
- package/dist/esm/activity/schema/types/note.d.ts +83 -70
- package/dist/esm/activity/schema/types/note.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/note.js +20 -12
- package/dist/esm/activity/schema/types/note.test.js +48 -49
- package/dist/esm/activity/schema/types/operation.d.ts +64 -45
- package/dist/esm/activity/schema/types/operation.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/operation.js +19 -8
- package/dist/esm/activity/schema/types/operation.test.js +34 -35
- package/dist/esm/activity/schema/types/unknown.d.ts +50 -41
- package/dist/esm/activity/schema/types/unknown.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/unknown.js +12 -6
- package/dist/esm/activity/schema/types/unknown.test.js +29 -30
- package/dist/esm/app/authorization/resources.d.ts.map +1 -1
- package/dist/esm/app/authorization/resources.js +2 -3
- package/dist/esm/app/authorization/schema.d.ts +96 -52
- package/dist/esm/app/authorization/schema.d.ts.map +1 -1
- package/dist/esm/app/authorization/schema.js +61 -52
- package/dist/esm/app/authorization/schema.test.js +96 -71
- package/dist/esm/app/oauth/resources.d.ts.map +1 -1
- package/dist/esm/app/oauth/resources.js +2 -3
- package/dist/esm/app/oauth/schema.d.ts +34 -41
- package/dist/esm/app/oauth/schema.d.ts.map +1 -1
- package/dist/esm/app/oauth/schema.js +23 -17
- package/dist/esm/app/oauth/schema.test.js +38 -39
- package/dist/esm/app/oidc/resources.d.ts.map +1 -1
- package/dist/esm/app/oidc/resources.js +4 -5
- package/dist/esm/app/oidc/schema.d.ts +26 -37
- package/dist/esm/app/oidc/schema.d.ts.map +1 -1
- package/dist/esm/app/oidc/schema.js +17 -12
- package/dist/esm/app/oidc/schema.test.js +45 -26
- package/dist/esm/app/registration/resources.d.ts.map +1 -1
- package/dist/esm/app/registration/resources.js +2 -3
- package/dist/esm/app/registration/schema.d.ts +24 -31
- package/dist/esm/app/registration/schema.d.ts.map +1 -1
- package/dist/esm/app/registration/schema.js +23 -16
- package/dist/esm/app/registration/schema.test.js +68 -150
- package/dist/esm/app/resources.d.ts.map +1 -1
- package/dist/esm/app/resources.js +6 -6
- package/dist/esm/app/saml/resources.d.ts.map +1 -1
- package/dist/esm/app/saml/resources.js +4 -5
- package/dist/esm/app/saml/schema.d.ts +26 -37
- package/dist/esm/app/saml/schema.d.ts.map +1 -1
- package/dist/esm/app/saml/schema.js +17 -12
- package/dist/esm/app/schema.d.ts +72 -68
- package/dist/esm/app/schema.d.ts.map +1 -1
- package/dist/esm/app/schema.js +34 -27
- package/dist/esm/app/schema.test.js +38 -41
- package/dist/esm/association/resources.d.ts.map +1 -1
- package/dist/esm/association/resources.js +4 -6
- package/dist/esm/association/schema.d.ts +225 -181
- package/dist/esm/association/schema.d.ts.map +1 -1
- package/dist/esm/association/schema.js +28 -22
- package/dist/esm/association/schema.test.js +36 -28
- package/dist/esm/authentication/factors/schema.d.ts +18 -55
- package/dist/esm/authentication/factors/schema.d.ts.map +1 -1
- package/dist/esm/authentication/factors/schema.js +21 -23
- package/dist/esm/authentication/factors/schema.test.js +33 -34
- package/dist/esm/authentication/providers/schema.d.ts +23 -22
- package/dist/esm/authentication/providers/schema.d.ts.map +1 -1
- package/dist/esm/authentication/providers/schema.js +10 -8
- package/dist/esm/authentication/sessions/resources.d.ts.map +1 -1
- package/dist/esm/authentication/sessions/resources.js +3 -3
- package/dist/esm/authentication/sessions/schema.d.ts +101 -74
- package/dist/esm/authentication/sessions/schema.d.ts.map +1 -1
- package/dist/esm/authentication/sessions/schema.js +56 -25
- package/dist/esm/authentication/settings/resources.d.ts.map +1 -1
- package/dist/esm/authentication/settings/resources.js +2 -3
- package/dist/esm/authentication/settings/schema.d.ts +25 -68
- package/dist/esm/authentication/settings/schema.d.ts.map +1 -1
- package/dist/esm/authentication/settings/schema.js +13 -10
- package/dist/esm/authentication/settings/schema.test.js +28 -19
- package/dist/esm/authentication/strategies/resources.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/resources.js +6 -6
- package/dist/esm/authentication/strategies/schema/base.d.ts +59 -51
- package/dist/esm/authentication/strategies/schema/base.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/base.js +26 -15
- package/dist/esm/authentication/strategies/schema/schema.d.ts +206 -197
- package/dist/esm/authentication/strategies/schema/schema.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/types/email.d.ts +61 -60
- package/dist/esm/authentication/strategies/schema/types/email.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/types/email.js +24 -14
- package/dist/esm/authentication/strategies/schema/types/email.test.js +49 -50
- package/dist/esm/authentication/strategies/schema/types/password.d.ts +129 -122
- package/dist/esm/authentication/strategies/schema/types/password.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/types/password.js +33 -25
- package/dist/esm/authentication/strategies/schema/types/totp.d.ts +107 -94
- package/dist/esm/authentication/strategies/schema/types/totp.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/types/totp.js +50 -26
- package/dist/esm/authorization/permissions/resources.d.ts.map +1 -1
- package/dist/esm/authorization/permissions/resources.js +6 -6
- package/dist/esm/authorization/permissions/schema.d.ts +92 -88
- package/dist/esm/authorization/permissions/schema.d.ts.map +1 -1
- package/dist/esm/authorization/permissions/schema.js +38 -28
- package/dist/esm/authorization/permissions/schema.test.js +57 -59
- package/dist/esm/authorization/roles/resources.d.ts.map +1 -1
- package/dist/esm/authorization/roles/resources.js +6 -6
- package/dist/esm/authorization/roles/schema.d.ts +102 -98
- package/dist/esm/authorization/roles/schema.d.ts.map +1 -1
- package/dist/esm/authorization/roles/schema.js +35 -32
- package/dist/esm/authorization/roles/schema.test.js +58 -59
- package/dist/esm/authorization/schema.d.ts +7 -6
- package/dist/esm/authorization/schema.d.ts.map +1 -1
- package/dist/esm/authorization/schema.js +9 -3
- package/dist/esm/common/resources/init.d.ts +7 -6
- package/dist/esm/common/resources/init.d.ts.map +1 -1
- package/dist/esm/common/resources/init.js +17 -9
- package/dist/esm/common/resources/utils.d.ts +0 -9
- package/dist/esm/common/resources/utils.d.ts.map +1 -1
- package/dist/esm/common/resources/utils.js +0 -24
- package/dist/esm/common/resources/utils.test.js +1 -30
- package/dist/esm/common/schema/aggregate.d.ts +6 -5
- package/dist/esm/common/schema/aggregate.d.ts.map +1 -1
- package/dist/esm/common/schema/aggregate.js +4 -4
- package/dist/esm/common/schema/aggregate.test.js +21 -22
- package/dist/esm/common/schema/collection.d.ts +11 -10
- package/dist/esm/common/schema/collection.d.ts.map +1 -1
- package/dist/esm/common/schema/collection.js +4 -4
- package/dist/esm/common/schema/collection.test.js +66 -48
- package/dist/esm/common/schema/dates.d.ts +27 -26
- package/dist/esm/common/schema/dates.d.ts.map +1 -1
- package/dist/esm/common/schema/dates.js +17 -11
- package/dist/esm/common/schema/dates.test.js +24 -13
- package/dist/esm/common/schema/id.d.ts +2 -1
- package/dist/esm/common/schema/id.d.ts.map +1 -1
- package/dist/esm/common/schema/id.js +2 -2
- package/dist/esm/common/schema/id.test.js +70 -38
- package/dist/esm/common/schema/jwt.d.ts +27 -14
- package/dist/esm/common/schema/jwt.d.ts.map +1 -1
- package/dist/esm/common/schema/jwt.js +14 -2
- package/dist/esm/common/schema/jwt.test.js +25 -19
- package/dist/esm/common/schema/metadata.d.ts +24 -41
- package/dist/esm/common/schema/metadata.d.ts.map +1 -1
- package/dist/esm/common/schema/metadata.js +38 -37
- package/dist/esm/common/schema/metadata.test.js +36 -37
- package/dist/esm/common/schema/pagination.d.ts +6 -5
- package/dist/esm/common/schema/pagination.d.ts.map +1 -1
- package/dist/esm/common/schema/pagination.js +4 -4
- package/dist/esm/common/schema/pagination.test.js +19 -20
- package/dist/esm/common/schema/schema.d.ts +4 -4
- package/dist/esm/common/schema/schema.d.ts.map +1 -1
- package/dist/esm/common/schema/schema.js +6 -5
- package/dist/esm/common/schema/schema.test.js +9 -15
- package/dist/esm/common/schema/sets.d.ts +3 -2
- package/dist/esm/common/schema/sets.d.ts.map +1 -1
- package/dist/esm/common/schema/sets.js +9 -6
- package/dist/esm/common/schema/sets.test.js +53 -44
- package/dist/esm/customer/organization/schema.d.ts +44 -46
- package/dist/esm/customer/organization/schema.d.ts.map +1 -1
- package/dist/esm/customer/organization/schema.js +26 -20
- package/dist/esm/customer/schema.d.ts +7 -6
- package/dist/esm/customer/schema.d.ts.map +1 -1
- package/dist/esm/customer/schema.js +9 -3
- package/dist/esm/customer/users/resources.d.ts.map +1 -1
- package/dist/esm/customer/users/resources.js +6 -6
- package/dist/esm/customer/users/schema.d.ts +140 -139
- package/dist/esm/customer/users/schema.d.ts.map +1 -1
- package/dist/esm/customer/users/schema.js +58 -46
- package/dist/esm/customer/users/schema.test.js +22 -35
- package/dist/esm/customer/users/utils.d.ts +3 -2
- package/dist/esm/customer/users/utils.d.ts.map +1 -1
- package/dist/esm/customer/users/utils.test.js +1 -1
- package/dist/esm/identity/schema.d.ts +5 -1
- package/dist/esm/identity/schema.d.ts.map +1 -1
- package/dist/esm/identity/schema.js +5 -2
- package/dist/esm/identity/schema.test.js +21 -16
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.d.ts +31 -28
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.d.ts.map +1 -1
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.js +56 -37
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.test.js +44 -45
- package/dist/esm/oauth/authorize/schema/grants/implicit.d.ts +16 -10
- package/dist/esm/oauth/authorize/schema/grants/implicit.d.ts.map +1 -1
- package/dist/esm/oauth/authorize/schema/grants/implicit.js +19 -10
- package/dist/esm/oauth/authorize/schema/schema.d.ts +44 -36
- package/dist/esm/oauth/authorize/schema/schema.d.ts.map +1 -1
- package/dist/esm/oauth/common/schema.d.ts +21 -7
- package/dist/esm/oauth/common/schema.d.ts.map +1 -1
- package/dist/esm/oauth/common/schema.js +20 -7
- package/dist/esm/oauth/common/schema.test.js +25 -26
- package/dist/esm/oauth/token/schema/grants/authorization-code.d.ts +12 -9
- package/dist/esm/oauth/token/schema/grants/authorization-code.d.ts.map +1 -1
- package/dist/esm/oauth/token/schema/grants/authorization-code.js +11 -10
- package/dist/esm/oauth/token/schema/grants/client-credentials.d.ts +20 -15
- package/dist/esm/oauth/token/schema/grants/client-credentials.d.ts.map +1 -1
- package/dist/esm/oauth/token/schema/grants/client-credentials.js +13 -8
- package/dist/esm/oauth/token/schema/grants/refresh-token.d.ts +11 -8
- package/dist/esm/oauth/token/schema/grants/refresh-token.d.ts.map +1 -1
- package/dist/esm/oauth/token/schema/grants/refresh-token.js +6 -6
- package/dist/esm/oauth/token/schema/schema.d.ts +28 -21
- package/dist/esm/oauth/token/schema/schema.d.ts.map +1 -1
- package/dist/esm/oauth/token/schema/schema.test.js +42 -28
- package/dist/esm/workspace/authorization/schema.d.ts +44 -27
- package/dist/esm/workspace/authorization/schema.d.ts.map +1 -1
- package/dist/esm/workspace/authorization/schema.js +16 -11
- package/dist/esm/workspace/branding/schema.d.ts +30 -37
- package/dist/esm/workspace/branding/schema.d.ts.map +1 -1
- package/dist/esm/workspace/branding/schema.js +20 -15
- package/dist/esm/workspace/membership/schema.d.ts +21 -20
- package/dist/esm/workspace/membership/schema.d.ts.map +1 -1
- package/dist/esm/workspace/membership/schema.js +6 -6
- package/dist/esm/workspace/registration/schema.d.ts +26 -27
- package/dist/esm/workspace/registration/schema.d.ts.map +1 -1
- package/dist/esm/workspace/registration/schema.js +13 -11
- package/dist/esm/workspace/settings/schema.d.ts +12 -19
- package/dist/esm/workspace/settings/schema.d.ts.map +1 -1
- package/dist/esm/workspace/settings/schema.js +7 -6
- package/dist/esm/workspace/settings/schema.test.js +18 -19
- package/dist/esm/workspace/tenant/schema.d.ts +55 -57
- package/dist/esm/workspace/tenant/schema.d.ts.map +1 -1
- package/dist/esm/workspace/tenant/schema.js +17 -12
- package/dist/esm/workspace/user/notifications/schema.d.ts +50 -56
- package/dist/esm/workspace/user/notifications/schema.d.ts.map +1 -1
- package/dist/esm/workspace/user/notifications/schema.js +26 -23
- package/dist/esm/workspace/user/preferences/schema.d.ts +18 -25
- package/dist/esm/workspace/user/preferences/schema.d.ts.map +1 -1
- package/dist/esm/workspace/user/preferences/schema.js +16 -11
- package/package.json +3 -3
- package/src/action/schema/base.test.ts.bak +152 -0
- package/src/action/schema/operations/set-password.test.ts.bak +197 -0
- package/src/action/schema/operations/sign-up-verification.test.ts.bak +163 -0
- package/src/action/schema/operations/sign-up.test.ts.bak +203 -0
- package/src/action/schema/operations/user-attribute-verification.test.ts.bak +148 -0
- package/src/action/schema/schema.test.ts.bak +218 -0
- package/src/activity/schema/base.test.ts.bak +291 -0
- package/src/activity/schema/schema.test.ts.bak +392 -0
- package/src/activity/schema/types/authentication.test.ts.bak +337 -0
- package/src/activity/schema/types/authorization.test.ts.bak +379 -0
- package/src/activity/schema/types/note.test.ts.bak +367 -0
- package/src/activity/schema/types/operation.test.ts.bak +379 -0
- package/src/activity/schema/types/unknown.test.ts.bak +304 -0
- package/src/app/authorization/schema.test.ts.bak +412 -0
- package/src/app/oidc/schema.test.ts.bak +117 -0
- package/src/app/registration/schema.test.ts.bak +308 -0
- package/src/app/schema.test.ts.bak +221 -0
- package/src/association/schema.test.ts.bak +148 -0
- package/src/authentication/factors/schema.test.ts.bak +174 -0
- package/src/authentication/settings/schema.test.ts.bak +91 -0
- package/src/authentication/strategies/schema/types/email.test.ts.bak +252 -0
- package/src/authorization/permissions/schema.test.ts.bak +267 -0
- package/src/authorization/roles/schema.test.ts.bak +283 -0
- package/src/common/schema/aggregate.test.ts.bak +89 -0
- package/src/common/schema/collection.test.ts.bak +116 -0
- package/src/common/schema/dates.test.ts.bak +49 -0
- package/src/common/schema/id.test.ts.bak +149 -0
- package/src/common/schema/jwt.test.ts.bak +61 -0
- package/src/common/schema/metadata.test.ts.bak +141 -0
- package/src/common/schema/pagination.test.ts.bak +80 -0
- package/src/common/schema/schema.test.ts.bak +41 -0
- package/src/common/schema/sets.test.ts.bak +108 -0
- package/src/customer/users/schema.test.ts.bak +138 -0
- package/src/identity/schema.test.ts.bak +48 -0
- package/src/oauth/token/schema/schema.test.ts.bak +142 -0
- package/src/workspace/settings/schema.test.ts.bak +88 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
export declare const VerifiableAttribute: {
|
|
2
3
|
readonly EMAIL: "email";
|
|
3
4
|
readonly PHONE_NUMBER: "phoneNumber";
|
|
@@ -9,146 +10,146 @@ export declare const UserStatus: {
|
|
|
9
10
|
readonly UNVERIFIED: "unverified";
|
|
10
11
|
};
|
|
11
12
|
export type AnyUserStatus = (typeof UserStatus)[keyof typeof UserStatus];
|
|
12
|
-
export declare const UserNamePropertiesSchema:
|
|
13
|
-
givenName
|
|
14
|
-
middleName
|
|
15
|
-
familyName
|
|
16
|
-
honorificPrefix
|
|
17
|
-
honorificSuffix
|
|
18
|
-
},
|
|
19
|
-
export declare const UpdateUserNamePropertiesSchema:
|
|
20
|
-
givenName
|
|
21
|
-
middleName
|
|
22
|
-
familyName
|
|
23
|
-
honorificPrefix
|
|
24
|
-
honorificSuffix
|
|
25
|
-
},
|
|
26
|
-
export declare const UserIdPropertySchema:
|
|
27
|
-
id:
|
|
28
|
-
},
|
|
29
|
-
export type UserIdProperty = typeof UserIdPropertySchema
|
|
30
|
-
export declare const RequiredEmailSchema:
|
|
31
|
-
export declare const RequiredPhoneNumberSchema:
|
|
32
|
-
export declare const VerifiedEmailOrPhonePropertiesSchema:
|
|
33
|
-
email
|
|
34
|
-
verifiedEmail
|
|
35
|
-
phoneNumber
|
|
36
|
-
verifiedPhoneNumber
|
|
37
|
-
},
|
|
38
|
-
export declare const EmailOrPhonePropertiesSchema:
|
|
39
|
-
email
|
|
40
|
-
phoneNumber
|
|
41
|
-
},
|
|
42
|
-
export declare const UserAssociationsSchema:
|
|
43
|
-
roles
|
|
44
|
-
},
|
|
45
|
-
export type UserAssociations = typeof UserAssociationsSchema
|
|
46
|
-
export declare const UserSchema:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
roles
|
|
59
|
-
ids
|
|
60
|
-
count
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
status:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
id
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
email
|
|
107
|
-
verifiedEmail
|
|
108
|
-
phoneNumber
|
|
109
|
-
verifiedPhoneNumber
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
export type InsertUserInput = typeof InsertUserPayloadSchema
|
|
118
|
-
export type InsertUserPayload = typeof InsertUserPayloadSchema
|
|
119
|
-
export declare const UpdateUserPayloadSchema:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
} | null>) | undefined;
|
|
135
|
-
}, {}>;
|
|
136
|
-
export type UpdateUserInput = typeof UpdateUserPayloadSchema.inferIn;
|
|
137
|
-
export type UpdateUserPayload = typeof UpdateUserPayloadSchema.inferOut;
|
|
13
|
+
export declare const UserNamePropertiesSchema: z.ZodObject<{
|
|
14
|
+
givenName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
15
|
+
middleName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
16
|
+
familyName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
17
|
+
honorificPrefix: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
18
|
+
honorificSuffix: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export declare const UpdateUserNamePropertiesSchema: z.ZodObject<{
|
|
21
|
+
givenName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>>;
|
|
22
|
+
middleName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>>;
|
|
23
|
+
familyName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>>;
|
|
24
|
+
honorificPrefix: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>>;
|
|
25
|
+
honorificSuffix: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export declare const UserIdPropertySchema: z.ZodObject<{
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type UserIdProperty = z.output<typeof UserIdPropertySchema>;
|
|
31
|
+
export declare const RequiredEmailSchema: z.ZodEmail;
|
|
32
|
+
export declare const RequiredPhoneNumberSchema: z.ZodString;
|
|
33
|
+
export declare const VerifiedEmailOrPhonePropertiesSchema: z.ZodObject<{
|
|
34
|
+
email: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodEmail, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
35
|
+
verifiedEmail: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<boolean | undefined, boolean | null | undefined>>>;
|
|
36
|
+
phoneNumber: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
37
|
+
verifiedPhoneNumber: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<boolean | undefined, boolean | null | undefined>>>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export declare const EmailOrPhonePropertiesSchema: z.ZodObject<{
|
|
40
|
+
email: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodEmail, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
41
|
+
phoneNumber: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export declare const UserAssociationsSchema: z.ZodObject<{
|
|
44
|
+
roles: z.ZodOptional<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
export type UserAssociations = z.output<typeof UserAssociationsSchema>;
|
|
47
|
+
export declare const UserSchema: z.ZodObject<{
|
|
48
|
+
metadata: z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodCustom<Map<string, string | number | boolean>, Map<string, string | number | boolean>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<Map<string, string | number | boolean>, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>;
|
|
49
|
+
lastLogin: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>>;
|
|
50
|
+
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
51
|
+
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
52
|
+
deletedAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>>;
|
|
53
|
+
deactivatedAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>>;
|
|
54
|
+
status: z.ZodEnum<{
|
|
55
|
+
active: "active";
|
|
56
|
+
suspended: "suspended";
|
|
57
|
+
unverified: "unverified";
|
|
58
|
+
}>;
|
|
59
|
+
roles: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
60
|
+
ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
61
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
}, z.core.$strip>, z.ZodUndefined]>>;
|
|
63
|
+
email: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodEmail, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
64
|
+
verifiedEmail: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<boolean | undefined, boolean | null | undefined>>>;
|
|
65
|
+
phoneNumber: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
66
|
+
verifiedPhoneNumber: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<boolean | undefined, boolean | null | undefined>>>;
|
|
67
|
+
givenName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
68
|
+
middleName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
69
|
+
familyName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
70
|
+
honorificPrefix: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
71
|
+
honorificSuffix: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
72
|
+
id: z.ZodString;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
export type UserProperties = z.input<typeof UserSchema>;
|
|
75
|
+
export type User = z.output<typeof UserSchema>;
|
|
76
|
+
export declare const UserPayloadSchema: z.ZodObject<{
|
|
77
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodCustom<Map<string, string | number | boolean>, Map<string, string | number | boolean>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<Record<string, string | number | boolean> | undefined, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>;
|
|
78
|
+
lastLogin: z.ZodOptional<z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>, z.ZodTransform<string | undefined, Date | undefined>>>;
|
|
79
|
+
createdAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
80
|
+
updatedAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
81
|
+
deletedAt: z.ZodOptional<z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>, z.ZodTransform<string | undefined, Date | undefined>>>;
|
|
82
|
+
deactivatedAt: z.ZodOptional<z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>, z.ZodTransform<string | undefined, Date | undefined>>>;
|
|
83
|
+
status: z.ZodEnum<{
|
|
84
|
+
active: "active";
|
|
85
|
+
suspended: "suspended";
|
|
86
|
+
unverified: "unverified";
|
|
87
|
+
}>;
|
|
88
|
+
roles: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
89
|
+
ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
90
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
}, z.core.$strip>, z.ZodUndefined]>>;
|
|
92
|
+
email: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodEmail, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
93
|
+
verifiedEmail: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<boolean | undefined, boolean | null | undefined>>>;
|
|
94
|
+
phoneNumber: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
95
|
+
verifiedPhoneNumber: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<boolean | undefined, boolean | null | undefined>>>;
|
|
96
|
+
givenName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
97
|
+
middleName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
98
|
+
familyName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
99
|
+
honorificPrefix: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
100
|
+
honorificSuffix: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
101
|
+
id: z.ZodString;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
export type UserPayload = z.output<typeof UserPayloadSchema>;
|
|
104
|
+
export declare const InsertUserPayloadSchema: z.ZodObject<{
|
|
105
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodCustom<Map<string, string | number | boolean>, Map<string, string | number | boolean>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<Record<string, string | number | boolean> | null | undefined, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>;
|
|
106
|
+
roles: z.ZodOptional<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
|
|
107
|
+
email: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodEmail, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
108
|
+
verifiedEmail: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<boolean | undefined, boolean | null | undefined>>>;
|
|
109
|
+
phoneNumber: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
110
|
+
verifiedPhoneNumber: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<boolean | undefined, boolean | null | undefined>>>;
|
|
111
|
+
givenName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
112
|
+
middleName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
113
|
+
familyName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
114
|
+
honorificPrefix: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
115
|
+
honorificSuffix: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
116
|
+
id: z.ZodOptional<z.ZodString>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
export type InsertUserInput = z.input<typeof InsertUserPayloadSchema>;
|
|
119
|
+
export type InsertUserPayload = z.output<typeof InsertUserPayloadSchema>;
|
|
120
|
+
export declare const UpdateUserPayloadSchema: z.ZodObject<{
|
|
121
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodCustom<Map<string, string | number | boolean>, Map<string, string | number | boolean>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<Record<string, string | number | boolean> | null | undefined, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>;
|
|
122
|
+
email: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodEmail, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
123
|
+
verifiedEmail: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<boolean | undefined, boolean | null | undefined>>>;
|
|
124
|
+
phoneNumber: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
125
|
+
verifiedPhoneNumber: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<boolean | undefined, boolean | null | undefined>>>;
|
|
126
|
+
givenName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>>;
|
|
127
|
+
middleName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>>;
|
|
128
|
+
familyName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>>;
|
|
129
|
+
honorificPrefix: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>>;
|
|
130
|
+
honorificSuffix: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>>;
|
|
131
|
+
suspended: z.ZodOptional<z.ZodBoolean>;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
export type UpdateUserInput = z.input<typeof UpdateUserPayloadSchema>;
|
|
134
|
+
export type UpdateUserPayload = z.output<typeof UpdateUserPayloadSchema>;
|
|
138
135
|
/**
|
|
139
136
|
* Association
|
|
140
137
|
*/
|
|
141
|
-
export declare const UserAssociationReferenceSchema:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
email
|
|
149
|
-
phoneNumber
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
138
|
+
export declare const UserAssociationReferenceSchema: z.ZodObject<{
|
|
139
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
140
|
+
active: "active";
|
|
141
|
+
suspended: "suspended";
|
|
142
|
+
unverified: "unverified";
|
|
143
|
+
}>>;
|
|
144
|
+
model: z.ZodLiteral<"User">;
|
|
145
|
+
email: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodEmail, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
146
|
+
phoneNumber: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
147
|
+
givenName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
148
|
+
middleName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
149
|
+
familyName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
150
|
+
honorificPrefix: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
151
|
+
honorificSuffix: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
152
|
+
id: z.ZodString;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
export type UserAssociationReference = z.output<typeof UserAssociationReferenceSchema>;
|
|
154
155
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/customer/users/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/customer/users/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB,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;;;;;;iBAMnC,CAAC;AAGH,eAAO,MAAM,8BAA8B;;;;;;iBAMzC,CAAC;AAGH,eAAO,MAAM,oBAAoB;;iBAE/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEnE,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAC7C,eAAO,MAAM,yBAAyB,aAAa,CAAC;AAEpD,eAAO,MAAM,oCAAoC;;;;;iBAK/C,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;iBAEjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAUvE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQrB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACxD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQ5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;iBAMlC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEzE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;iBAKlC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;iBAMzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAC7C,OAAO,8BAA8B,CACtC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UserAssociationReferenceSchema = exports.UpdateUserPayloadSchema = exports.InsertUserPayloadSchema = exports.UserPayloadSchema = exports.UserSchema = exports.UserAssociationsSchema = exports.EmailOrPhonePropertiesSchema = exports.VerifiedEmailOrPhonePropertiesSchema = exports.RequiredPhoneNumberSchema = exports.RequiredEmailSchema = exports.UserIdPropertySchema = exports.UpdateUserNamePropertiesSchema = exports.UserNamePropertiesSchema = exports.UserStatus = exports.VerifiableAttribute = void 0;
|
|
4
|
-
const
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
5
|
const schema_js_1 = require("../../authorization/schema.js");
|
|
6
6
|
const aggregate_js_1 = require("../../common/schema/aggregate.js");
|
|
7
7
|
const dates_js_1 = require("../../common/schema/dates.js");
|
|
@@ -17,78 +17,90 @@ exports.UserStatus = {
|
|
|
17
17
|
SUSPENDED: 'suspended',
|
|
18
18
|
UNVERIFIED: 'unverified',
|
|
19
19
|
};
|
|
20
|
-
const UserStatusSchema =
|
|
21
|
-
exports.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
const UserStatusSchema = zod_1.z.enum([
|
|
21
|
+
exports.UserStatus.ACTIVE,
|
|
22
|
+
exports.UserStatus.SUSPENDED,
|
|
23
|
+
exports.UserStatus.UNVERIFIED,
|
|
24
|
+
]);
|
|
25
|
+
exports.UserNamePropertiesSchema = zod_1.z.object({
|
|
26
|
+
givenName: (0, schema_js_2.optionallyNullishToUndefined)(zod_1.z.string()),
|
|
27
|
+
middleName: (0, schema_js_2.optionallyNullishToUndefined)(zod_1.z.string()),
|
|
28
|
+
familyName: (0, schema_js_2.optionallyNullishToUndefined)(zod_1.z.string()),
|
|
29
|
+
honorificPrefix: (0, schema_js_2.optionallyNullishToUndefined)(zod_1.z.string()),
|
|
30
|
+
honorificSuffix: (0, schema_js_2.optionallyNullishToUndefined)(zod_1.z.string()),
|
|
27
31
|
});
|
|
28
32
|
// export type UserNameProperties = typeof UserNamePropertiesSchema.inferOut;
|
|
29
|
-
exports.UpdateUserNamePropertiesSchema =
|
|
30
|
-
givenName: (0, schema_js_2.optionallyNullish)(
|
|
31
|
-
middleName: (0, schema_js_2.optionallyNullish)(
|
|
32
|
-
familyName: (0, schema_js_2.optionallyNullish)(
|
|
33
|
-
honorificPrefix: (0, schema_js_2.optionallyNullish)(
|
|
34
|
-
honorificSuffix: (0, schema_js_2.optionallyNullish)(
|
|
33
|
+
exports.UpdateUserNamePropertiesSchema = zod_1.z.object({
|
|
34
|
+
givenName: (0, schema_js_2.optionallyNullish)(zod_1.z.string()),
|
|
35
|
+
middleName: (0, schema_js_2.optionallyNullish)(zod_1.z.string()),
|
|
36
|
+
familyName: (0, schema_js_2.optionallyNullish)(zod_1.z.string()),
|
|
37
|
+
honorificPrefix: (0, schema_js_2.optionallyNullish)(zod_1.z.string()),
|
|
38
|
+
honorificSuffix: (0, schema_js_2.optionallyNullish)(zod_1.z.string()),
|
|
35
39
|
});
|
|
36
40
|
// type UpsertUserNameProperties = typeof UpdateUserNamePropertiesSchema.inferOut;
|
|
37
|
-
exports.UserIdPropertySchema =
|
|
41
|
+
exports.UserIdPropertySchema = zod_1.z.object({
|
|
38
42
|
id: schema_js_3.UserIdSchema,
|
|
39
43
|
});
|
|
40
|
-
exports.RequiredEmailSchema =
|
|
41
|
-
exports.RequiredPhoneNumberSchema =
|
|
42
|
-
exports.VerifiedEmailOrPhonePropertiesSchema =
|
|
44
|
+
exports.RequiredEmailSchema = zod_1.z.email();
|
|
45
|
+
exports.RequiredPhoneNumberSchema = zod_1.z.string();
|
|
46
|
+
exports.VerifiedEmailOrPhonePropertiesSchema = zod_1.z.object({
|
|
43
47
|
email: (0, schema_js_2.optionallyNullishToUndefined)(exports.RequiredEmailSchema),
|
|
44
|
-
verifiedEmail: (0, schema_js_2.optionallyNullishToUndefined)(
|
|
48
|
+
verifiedEmail: (0, schema_js_2.optionallyNullishToUndefined)(zod_1.z.boolean()),
|
|
45
49
|
phoneNumber: (0, schema_js_2.optionallyNullishToUndefined)(exports.RequiredPhoneNumberSchema),
|
|
46
|
-
verifiedPhoneNumber: (0, schema_js_2.optionallyNullishToUndefined)(
|
|
50
|
+
verifiedPhoneNumber: (0, schema_js_2.optionallyNullishToUndefined)(zod_1.z.boolean()),
|
|
47
51
|
});
|
|
48
|
-
exports.EmailOrPhonePropertiesSchema =
|
|
52
|
+
exports.EmailOrPhonePropertiesSchema = zod_1.z.object({
|
|
49
53
|
email: (0, schema_js_2.optionallyNullishToUndefined)(exports.RequiredEmailSchema),
|
|
50
54
|
phoneNumber: (0, schema_js_2.optionallyNullishToUndefined)(exports.RequiredPhoneNumberSchema),
|
|
51
55
|
});
|
|
52
|
-
exports.UserAssociationsSchema =
|
|
56
|
+
exports.UserAssociationsSchema = zod_1.z.object({
|
|
53
57
|
roles: schema_js_1.RoleIdAssociationsSchema.optional(),
|
|
54
58
|
});
|
|
55
|
-
const BaseSchema =
|
|
56
|
-
|
|
57
|
-
.
|
|
59
|
+
const BaseSchema = zod_1.z.object({
|
|
60
|
+
...exports.UserIdPropertySchema.shape,
|
|
61
|
+
...exports.UserNamePropertiesSchema.shape,
|
|
62
|
+
...exports.VerifiedEmailOrPhonePropertiesSchema.shape,
|
|
58
63
|
status: UserStatusSchema,
|
|
59
64
|
roles: (0, schema_js_2.optionallyUndefined)(aggregate_js_1.AggregateSchema),
|
|
60
65
|
});
|
|
61
|
-
exports.UserSchema =
|
|
66
|
+
exports.UserSchema = zod_1.z.object({
|
|
67
|
+
...BaseSchema.shape,
|
|
62
68
|
lastLogin: dates_js_1.OptionalDateSchema.optional(),
|
|
63
69
|
createdAt: dates_js_1.RequiredDateSchema,
|
|
64
70
|
updatedAt: dates_js_1.RequiredDateSchema,
|
|
65
71
|
deletedAt: dates_js_1.OptionalDateSchema.optional(),
|
|
66
72
|
deactivatedAt: dates_js_1.OptionalDateSchema.optional(),
|
|
67
|
-
|
|
68
|
-
|
|
73
|
+
...metadata_js_1.MetadataMapPropertySchema.shape,
|
|
74
|
+
});
|
|
75
|
+
exports.UserPayloadSchema = zod_1.z.object({
|
|
76
|
+
...BaseSchema.shape,
|
|
69
77
|
lastLogin: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
70
78
|
createdAt: dates_js_1.RequiredDatePayloadSchema,
|
|
71
79
|
updatedAt: dates_js_1.RequiredDatePayloadSchema,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
deletedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
81
|
+
deactivatedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
82
|
+
...metadata_js_1.MetadataPayloadPropertySchema.shape,
|
|
83
|
+
});
|
|
84
|
+
exports.InsertUserPayloadSchema = zod_1.z.object({
|
|
76
85
|
id: schema_js_3.UserIdSchema.optional(),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
.
|
|
81
|
-
|
|
82
|
-
exports.UpdateUserPayloadSchema =
|
|
83
|
-
suspended:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
.
|
|
87
|
-
|
|
86
|
+
...exports.UserNamePropertiesSchema.shape,
|
|
87
|
+
...exports.VerifiedEmailOrPhonePropertiesSchema.shape,
|
|
88
|
+
...exports.UserAssociationsSchema.shape,
|
|
89
|
+
...metadata_js_1.UpsertMetadataPropertyPayloadSchema.shape,
|
|
90
|
+
});
|
|
91
|
+
exports.UpdateUserPayloadSchema = zod_1.z.object({
|
|
92
|
+
suspended: zod_1.z.boolean().optional(),
|
|
93
|
+
...exports.UpdateUserNamePropertiesSchema.shape,
|
|
94
|
+
...exports.VerifiedEmailOrPhonePropertiesSchema.shape,
|
|
95
|
+
...metadata_js_1.UpsertMetadataPropertyPayloadSchema.shape,
|
|
96
|
+
});
|
|
88
97
|
/**
|
|
89
98
|
* Association
|
|
90
99
|
*/
|
|
91
|
-
exports.UserAssociationReferenceSchema =
|
|
100
|
+
exports.UserAssociationReferenceSchema = zod_1.z.object({
|
|
101
|
+
...exports.UserIdPropertySchema.shape,
|
|
102
|
+
...exports.UserNamePropertiesSchema.shape,
|
|
103
|
+
...exports.EmailOrPhonePropertiesSchema.shape,
|
|
92
104
|
status: UserStatusSchema.default('unverified'),
|
|
93
|
-
model:
|
|
94
|
-
})
|
|
105
|
+
model: zod_1.z.literal('User'),
|
|
106
|
+
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const arktype_1 = require("arktype");
|
|
4
3
|
const vitest_1 = require("vitest");
|
|
5
4
|
const schema_js_1 = require("../schema.js");
|
|
6
5
|
const schema_js_2 = require("./schema.js");
|
|
@@ -15,12 +14,12 @@ const schema_js_2 = require("./schema.js");
|
|
|
15
14
|
createdAt: new Date(),
|
|
16
15
|
updatedAt: new Date(),
|
|
17
16
|
};
|
|
18
|
-
const result =
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
const result = schema_js_2.UserPayloadSchema.safeParse(item);
|
|
18
|
+
// Parse succeeds for valid data
|
|
19
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
20
|
+
if (result.success) {
|
|
21
|
+
(0, vitest_1.expect)(result.data.metadata).toBeUndefined();
|
|
21
22
|
}
|
|
22
|
-
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
23
|
-
(0, vitest_1.expect)(result?.metadata).to.undefined;
|
|
24
23
|
});
|
|
25
24
|
});
|
|
26
25
|
(0, vitest_1.describe)('Insert User Payload', () => {
|
|
@@ -31,13 +30,13 @@ const schema_js_2 = require("./schema.js");
|
|
|
31
30
|
familyName: 'Foo',
|
|
32
31
|
phoneNumber: '123',
|
|
33
32
|
};
|
|
34
|
-
const result =
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
const result = schema_js_2.InsertUserPayloadSchema.safeParse(item);
|
|
34
|
+
// Parse succeeds for valid data
|
|
35
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
36
|
+
if (result.success) {
|
|
37
|
+
(0, vitest_1.expect)(result.data.metadata).toBeUndefined();
|
|
38
|
+
(0, vitest_1.expect)(result.data.familyName).toBe(item.familyName);
|
|
37
39
|
}
|
|
38
|
-
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
39
|
-
(0, vitest_1.expect)(result?.metadata).to.undefined;
|
|
40
|
-
(0, vitest_1.expect)(result?.familyName).to.equal(item.familyName);
|
|
41
40
|
});
|
|
42
41
|
(0, vitest_1.test)('should serialize successfully', async () => {
|
|
43
42
|
const item = {
|
|
@@ -45,16 +44,13 @@ const schema_js_2 = require("./schema.js");
|
|
|
45
44
|
id: (0, schema_js_1.generateUserId)(),
|
|
46
45
|
phoneNumber: '123',
|
|
47
46
|
metadata: new Map(),
|
|
48
|
-
// status: UserStatus.ACTIVE,
|
|
49
|
-
// createdAt: new Date(),
|
|
50
|
-
// updatedAt: new Date(),
|
|
51
47
|
};
|
|
52
|
-
const result =
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
const result = schema_js_2.InsertUserPayloadSchema.safeParse(item);
|
|
49
|
+
// Parse succeeds for valid data
|
|
50
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
51
|
+
if (result.success) {
|
|
52
|
+
(0, vitest_1.expect)(result.data.metadata).toBeNull();
|
|
55
53
|
}
|
|
56
|
-
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
57
|
-
(0, vitest_1.expect)(result?.metadata).to.null;
|
|
58
54
|
});
|
|
59
55
|
(0, vitest_1.test)('should serialize nulls successfully', async () => {
|
|
60
56
|
const payload = {
|
|
@@ -72,11 +68,9 @@ const schema_js_2 = require("./schema.js");
|
|
|
72
68
|
createdAt: '2025-04-02T03:50:40.812Z',
|
|
73
69
|
updatedAt: '2025-04-02T03:50:40.812Z',
|
|
74
70
|
};
|
|
75
|
-
const result =
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
71
|
+
const result = schema_js_2.UserPayloadSchema.safeParse(payload);
|
|
72
|
+
// Parse succeeds for valid data
|
|
73
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
80
74
|
});
|
|
81
75
|
(0, vitest_1.test)('should serialize nulls successfully', async () => {
|
|
82
76
|
const payload = {
|
|
@@ -94,16 +88,9 @@ const schema_js_2 = require("./schema.js");
|
|
|
94
88
|
createdAt: '2025-04-02T03:50:40.812Z',
|
|
95
89
|
updatedAt: '2025-04-02T03:50:40.812Z',
|
|
96
90
|
};
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
baz: 'string.date.iso.parse',
|
|
101
|
-
});
|
|
102
|
-
const result = (0, schema_js_2.UserPayloadSchema)(payload);
|
|
103
|
-
if (result instanceof arktype_1.type.errors) {
|
|
104
|
-
console.log(result.summary);
|
|
105
|
-
}
|
|
106
|
-
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
91
|
+
const result = schema_js_2.UserPayloadSchema.safeParse(payload);
|
|
92
|
+
// Parse succeeds for valid data
|
|
93
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
107
94
|
});
|
|
108
95
|
});
|
|
109
96
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
1
2
|
import type { EmailOrPhonePropertiesSchema, UpdateUserNamePropertiesSchema } from './schema.js';
|
|
2
|
-
type UserName = typeof UpdateUserNamePropertiesSchema
|
|
3
|
-
type UserEmailOrPhone = typeof EmailOrPhonePropertiesSchema
|
|
3
|
+
type UserName = z.input<typeof UpdateUserNamePropertiesSchema>;
|
|
4
|
+
type UserEmailOrPhone = z.input<typeof EmailOrPhonePropertiesSchema>;
|
|
4
5
|
type User = UserName & UserEmailOrPhone;
|
|
5
6
|
export declare function getInitials(name: string | undefined): string | undefined;
|
|
6
7
|
export declare function buildName(item?: Pick<UserName, 'givenName' | 'familyName'>): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/customer/users/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,aAAa,CAAC;AAErB,KAAK,QAAQ,GAAG,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/customer/users/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EACV,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,aAAa,CAAC;AAErB,KAAK,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAErE,KAAK,IAAI,GAAG,QAAQ,GAAG,gBAAgB,CAAC;AAExC,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAUxE;AAED,wBAAgB,SAAS,CACvB,IAAI,CAAC,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,GAAG,YAAY,CAAC,GAChD,MAAM,CAER;AAED,wBAAgB,eAAe,CAC7B,IAAI,CAAC,EAAE,IAAI,CACT,QAAQ,EACN,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,iBAAiB,GACjB,iBAAiB,CACpB,EACD,iBAAiB,UAAQ,GACxB,MAAM,CAUR;AAED,wBAAgB,cAAc,CAC5B,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,WAAW,GAAG,YAAY,GAAG,OAAO,CAAC,GACtD,MAAM,CAER"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
export declare const IdentityIdentifier: {
|
|
2
3
|
readonly EMAIL: "email";
|
|
3
4
|
readonly PHONE_NUMBER: "phoneNumber";
|
|
4
5
|
};
|
|
5
6
|
export type AnyIdentityIdentifier = (typeof IdentityIdentifier)[keyof typeof IdentityIdentifier];
|
|
6
|
-
export declare const IdentityIdentifierSchema:
|
|
7
|
+
export declare const IdentityIdentifierSchema: z.ZodEnum<{
|
|
8
|
+
email: "email";
|
|
9
|
+
phoneNumber: "phoneNumber";
|
|
10
|
+
}>;
|
|
7
11
|
//# sourceMappingURL=schema.d.ts.map
|