@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,22 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpsertRegistrationPayloadSchema = exports.RegistrationPayloadSchema = void 0;
|
|
4
|
-
const
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
5
|
const dates_js_1 = require("../../common/schema/dates.js");
|
|
6
6
|
const metadata_js_1 = require("../../common/schema/metadata.js");
|
|
7
7
|
const schema_js_1 = require("../../identity/schema.js");
|
|
8
|
-
const IdentityIdentifierPropertySchema = (
|
|
8
|
+
const IdentityIdentifierPropertySchema = zod_1.z.array(zod_1.z.object({
|
|
9
9
|
type: schema_js_1.IdentityIdentifierSchema,
|
|
10
|
-
})
|
|
11
|
-
const AllowSelfRegistrationSchema =
|
|
12
|
-
exports.RegistrationPayloadSchema =
|
|
10
|
+
}));
|
|
11
|
+
const AllowSelfRegistrationSchema = zod_1.z.boolean();
|
|
12
|
+
exports.RegistrationPayloadSchema = zod_1.z.object({
|
|
13
13
|
allowSelfRegistration: AllowSelfRegistrationSchema,
|
|
14
14
|
identifiers: IdentityIdentifierPropertySchema,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
updatedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
16
|
+
deletedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
17
|
+
deactivatedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
18
|
+
...metadata_js_1.MetadataPayloadPropertySchema.shape,
|
|
19
|
+
});
|
|
20
|
+
exports.UpsertRegistrationPayloadSchema = zod_1.z.object({
|
|
20
21
|
allowSelfRegistration: AllowSelfRegistrationSchema.optional(),
|
|
21
22
|
identifiers: IdentityIdentifierPropertySchema.optional(),
|
|
22
|
-
|
|
23
|
+
...metadata_js_1.MetadataPayloadPropertySchema.shape,
|
|
24
|
+
});
|
|
@@ -1,23 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
/**
|
|
2
3
|
* This isn't really being used yet...but some general settings would go here
|
|
3
4
|
*/
|
|
4
|
-
export declare const SettingsPayloadSchema:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
export type
|
|
15
|
-
export declare const UpsertSettingsPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
16
|
-
metadata?: ((In: {
|
|
17
|
-
[x: string]: string | number | boolean;
|
|
18
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
19
|
-
[x: string]: string | number | boolean;
|
|
20
|
-
} | undefined>) | undefined;
|
|
21
|
-
}, {}>;
|
|
22
|
-
export type UpsertSettingsPayload = typeof UpsertSettingsPayloadSchema.inferOut;
|
|
5
|
+
export declare const SettingsPayloadSchema: z.ZodObject<{
|
|
6
|
+
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>>>;
|
|
7
|
+
updatedAt: 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>>>;
|
|
8
|
+
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>>>;
|
|
9
|
+
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>>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type SettingsPayload = z.output<typeof SettingsPayloadSchema>;
|
|
12
|
+
export declare const UpsertSettingsPayloadSchema: z.ZodObject<{
|
|
13
|
+
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>>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type UpsertSettingsPayload = z.output<typeof UpsertSettingsPayloadSchema>;
|
|
23
16
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/workspace/settings/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/workspace/settings/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;iBAKhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAErE,eAAO,MAAM,2BAA2B;;iBAAgC,CAAC;AACzE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAC1C,OAAO,2BAA2B,CACnC,CAAC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpsertSettingsPayloadSchema = exports.SettingsPayloadSchema = void 0;
|
|
4
|
-
const
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
5
|
const dates_js_1 = require("../../common/schema/dates.js");
|
|
6
6
|
const metadata_js_1 = require("../../common/schema/metadata.js");
|
|
7
7
|
/**
|
|
8
8
|
* This isn't really being used yet...but some general settings would go here
|
|
9
9
|
*/
|
|
10
|
-
exports.SettingsPayloadSchema =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
exports.SettingsPayloadSchema = zod_1.z.object({
|
|
11
|
+
updatedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
12
|
+
deletedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
13
|
+
deactivatedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
14
|
+
...metadata_js_1.MetadataPayloadPropertySchema.shape,
|
|
15
|
+
});
|
|
15
16
|
exports.UpsertSettingsPayloadSchema = metadata_js_1.MetadataPayloadPropertySchema;
|
|
@@ -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
|
(0, vitest_1.describe)('Workspace Settings - Schema', () => {
|
|
@@ -12,25 +11,25 @@ const schema_js_1 = require("./schema.js");
|
|
|
12
11
|
deactivatedAt: new Date().toISOString(),
|
|
13
12
|
metadata: { version: '1.0', theme: 'dark' },
|
|
14
13
|
};
|
|
15
|
-
const result =
|
|
16
|
-
|
|
17
|
-
(0, vitest_1.expect)(result).toEqual(payload);
|
|
14
|
+
const result = schema_js_1.SettingsPayloadSchema.safeParse(payload);
|
|
15
|
+
// Parse succeeds for valid data
|
|
16
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
18
17
|
});
|
|
19
18
|
(0, vitest_1.test)('should accept minimal settings payload', () => {
|
|
20
19
|
const payload = {
|
|
21
20
|
metadata: {},
|
|
22
21
|
};
|
|
23
|
-
const result =
|
|
24
|
-
|
|
25
|
-
(0, vitest_1.expect)(result).toEqual(payload);
|
|
22
|
+
const result = schema_js_1.SettingsPayloadSchema.safeParse(payload);
|
|
23
|
+
// Parse succeeds for valid data
|
|
24
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
26
25
|
});
|
|
27
26
|
(0, vitest_1.test)('should accept payload with some optional dates', () => {
|
|
28
27
|
const payload = {
|
|
29
28
|
updatedAt: new Date().toISOString(),
|
|
30
29
|
metadata: { lastModified: 'now' },
|
|
31
30
|
};
|
|
32
|
-
const result =
|
|
33
|
-
|
|
31
|
+
const result = schema_js_1.SettingsPayloadSchema.safeParse(payload);
|
|
32
|
+
// Parse succeeds for valid data
|
|
34
33
|
});
|
|
35
34
|
(0, vitest_1.test)('should accept payload with only metadata', () => {
|
|
36
35
|
const payload = {
|
|
@@ -38,16 +37,16 @@ const schema_js_1 = require("./schema.js");
|
|
|
38
37
|
preferences: 'yes',
|
|
39
38
|
},
|
|
40
39
|
};
|
|
41
|
-
const result =
|
|
42
|
-
|
|
40
|
+
const result = schema_js_1.SettingsPayloadSchema.safeParse(payload);
|
|
41
|
+
// Parse succeeds for valid data
|
|
43
42
|
});
|
|
44
43
|
(0, vitest_1.test)('should reject invalid date format', () => {
|
|
45
44
|
const payload = {
|
|
46
45
|
updatedAt: 'invalid-date',
|
|
47
46
|
metadata: {},
|
|
48
47
|
};
|
|
49
|
-
const result =
|
|
50
|
-
(0, vitest_1.expect)(result).
|
|
48
|
+
const result = schema_js_1.SettingsPayloadSchema.safeParse(payload);
|
|
49
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
51
50
|
});
|
|
52
51
|
});
|
|
53
52
|
(0, vitest_1.describe)('UpsertSettingsPayloadSchema', () => {
|
|
@@ -57,17 +56,17 @@ const schema_js_1 = require("./schema.js");
|
|
|
57
56
|
settings: 'light',
|
|
58
57
|
},
|
|
59
58
|
};
|
|
60
|
-
const result =
|
|
61
|
-
|
|
62
|
-
(0, vitest_1.expect)(result).toEqual(payload);
|
|
59
|
+
const result = schema_js_1.UpsertSettingsPayloadSchema.safeParse(payload);
|
|
60
|
+
// Parse succeeds for valid data
|
|
61
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
63
62
|
});
|
|
64
63
|
(0, vitest_1.test)('should accept empty metadata', () => {
|
|
65
64
|
const payload = {
|
|
66
65
|
metadata: {},
|
|
67
66
|
};
|
|
68
|
-
const result =
|
|
69
|
-
|
|
70
|
-
(0, vitest_1.expect)(result).toEqual(payload);
|
|
67
|
+
const result = schema_js_1.UpsertSettingsPayloadSchema.safeParse(payload);
|
|
68
|
+
// Parse succeeds for valid data
|
|
69
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
71
70
|
});
|
|
72
71
|
});
|
|
73
72
|
});
|
|
@@ -1,58 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
export type TenantPayload = typeof TenantPayloadSchema
|
|
33
|
-
export declare const InsertTenantPayloadSchema:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}, {}>;
|
|
57
|
-
export type UpdateTenantPayload = typeof UpdateTenantPayloadSchema.inferOut;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const TenantIdSchema: z.ZodString;
|
|
3
|
+
export type TenantId = z.output<typeof TenantIdSchema>;
|
|
4
|
+
export declare const TenantIdPropertySchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const TenantPayloadSchema: z.ZodObject<{
|
|
8
|
+
handle: z.ZodString;
|
|
9
|
+
supportEmail: z.ZodOptional<z.ZodEmail>;
|
|
10
|
+
authHost: z.ZodOptional<z.ZodURL>;
|
|
11
|
+
membership: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
features: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
"Branding.Remove": z.ZodOptional<z.ZodObject<{
|
|
14
|
+
expiresAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
startAt: 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>>>;
|
|
18
|
+
endAt: 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>>>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
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>>>;
|
|
21
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
22
|
+
active: "active";
|
|
23
|
+
suspended: "suspended";
|
|
24
|
+
}>>;
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
createdAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
27
|
+
updatedAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
28
|
+
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>>>;
|
|
29
|
+
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>>>;
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export type TenantPayload = z.output<typeof TenantPayloadSchema>;
|
|
33
|
+
export declare const InsertTenantPayloadSchema: z.ZodObject<{
|
|
34
|
+
id: z.ZodDefault<z.ZodString>;
|
|
35
|
+
handle: z.ZodDefault<z.ZodString>;
|
|
36
|
+
supportEmail: z.ZodOptional<z.ZodEmail>;
|
|
37
|
+
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>>>;
|
|
38
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
39
|
+
active: "active";
|
|
40
|
+
suspended: "suspended";
|
|
41
|
+
}>>;
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export type InsertTenantPayload = z.output<typeof InsertTenantPayloadSchema>;
|
|
45
|
+
export declare const UpdateTenantPayloadSchema: z.ZodObject<{
|
|
46
|
+
handle: z.ZodOptional<z.ZodString>;
|
|
47
|
+
supportEmail: z.ZodOptional<z.ZodEmail>;
|
|
48
|
+
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>>>;
|
|
49
|
+
status: z.ZodOptional<z.ZodUnion<[z.ZodEnum<{
|
|
50
|
+
active: "active";
|
|
51
|
+
suspended: "suspended";
|
|
52
|
+
}>, z.ZodNull]>>;
|
|
53
|
+
name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
export type UpdateTenantPayload = z.output<typeof UpdateTenantPayloadSchema>;
|
|
58
56
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/workspace/tenant/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/workspace/tenant/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,cAAc,aAAsC,CAAC;AAClE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvD,eAAO,MAAM,sBAAsB;;iBAEjC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;iBAM9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEjE,eAAO,MAAM,yBAAyB;;;;;;;;;;iBAOpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE7E,eAAO,MAAM,yBAAyB;;;;;;;;;iBAIpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -1,27 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateTenantPayloadSchema = exports.InsertTenantPayloadSchema = exports.TenantPayloadSchema = exports.TenantIdPropertySchema = exports.TenantIdSchema = void 0;
|
|
4
|
-
const
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
5
|
const id_js_1 = require("../../common/schema/id.js");
|
|
6
6
|
const schema_js_1 = require("../../customer/organization/schema.js");
|
|
7
7
|
const schema_js_2 = require("../membership/schema.js");
|
|
8
8
|
const utils_js_1 = require("../utils.js");
|
|
9
9
|
exports.TenantIdSchema = (0, id_js_1.KSUIDSchema)(utils_js_1.Model.Tenant.UIDPrefix);
|
|
10
|
-
exports.TenantIdPropertySchema =
|
|
10
|
+
exports.TenantIdPropertySchema = zod_1.z.object({
|
|
11
11
|
id: exports.TenantIdSchema,
|
|
12
12
|
});
|
|
13
|
-
exports.TenantPayloadSchema =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
exports.TenantPayloadSchema = zod_1.z.object({
|
|
14
|
+
...schema_js_1.OrganizationPayloadSchema.shape,
|
|
15
|
+
handle: zod_1.z.string(),
|
|
16
|
+
supportEmail: zod_1.z.email().optional(),
|
|
17
|
+
authHost: zod_1.z.url().optional(), // Not live yet (used for dev now)
|
|
17
18
|
membership: schema_js_2.MembershipPayloadSchema.optional(),
|
|
18
19
|
});
|
|
19
|
-
exports.InsertTenantPayloadSchema =
|
|
20
|
+
exports.InsertTenantPayloadSchema = zod_1.z.object({
|
|
21
|
+
...schema_js_1.InsertOrganizationPayloadSchema.omit({
|
|
22
|
+
id: true,
|
|
23
|
+
}).shape,
|
|
20
24
|
id: exports.TenantIdSchema.default(() => (0, utils_js_1.generateTenantId)()),
|
|
21
|
-
handle:
|
|
22
|
-
supportEmail:
|
|
25
|
+
handle: zod_1.z.string().default(() => (0, utils_js_1.generateHandle)()),
|
|
26
|
+
supportEmail: zod_1.z.email().optional(),
|
|
23
27
|
});
|
|
24
|
-
exports.UpdateTenantPayloadSchema =
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
exports.UpdateTenantPayloadSchema = zod_1.z.object({
|
|
29
|
+
...schema_js_1.UpdateOrganizationPayloadSchema.shape,
|
|
30
|
+
handle: zod_1.z.string().optional(),
|
|
31
|
+
supportEmail: zod_1.z.email().optional(),
|
|
27
32
|
});
|
|
@@ -1,62 +1,56 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
export declare const NotificationType: {
|
|
2
3
|
readonly INFO: "info";
|
|
3
4
|
readonly IMPORT: "import";
|
|
4
5
|
};
|
|
5
6
|
export type AnyNotificationType = (typeof NotificationType)[keyof typeof NotificationType];
|
|
6
|
-
export declare const UserNotificationIdSchema:
|
|
7
|
-
export type UserNotificationId = typeof UserNotificationIdSchema
|
|
8
|
-
export declare const UserNotificationIdPropertySchema:
|
|
9
|
-
id:
|
|
10
|
-
},
|
|
11
|
-
export type UserNotificationIdProperty = typeof UserNotificationIdPropertySchema
|
|
12
|
-
export declare const UserNotificationPayloadSchema:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
export
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
metadata?: ((In: {
|
|
56
|
-
[x: string]: string | number | boolean;
|
|
57
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
58
|
-
[x: string]: string | number | boolean;
|
|
59
|
-
} | undefined>) | undefined;
|
|
60
|
-
}, {}>;
|
|
61
|
-
export type UpdateUserNotificationPayload = typeof UpdateUserNotificationPayloadSchema.inferOut;
|
|
7
|
+
export declare const UserNotificationIdSchema: z.ZodString;
|
|
8
|
+
export type UserNotificationId = z.output<typeof UserNotificationIdSchema>;
|
|
9
|
+
export declare const UserNotificationIdPropertySchema: z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type UserNotificationIdProperty = z.output<typeof UserNotificationIdPropertySchema>;
|
|
13
|
+
export declare const UserNotificationPayloadSchema: z.ZodObject<{
|
|
14
|
+
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>>>;
|
|
15
|
+
type: z.ZodEnum<{
|
|
16
|
+
info: "info";
|
|
17
|
+
import: "import";
|
|
18
|
+
}>;
|
|
19
|
+
action: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
20
|
+
link: z.ZodURL;
|
|
21
|
+
label: z.ZodString;
|
|
22
|
+
}, z.core.$strip>, z.ZodUndefined]>>;
|
|
23
|
+
createdAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
24
|
+
updatedAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
25
|
+
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>>>;
|
|
26
|
+
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>>>;
|
|
27
|
+
title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
28
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
29
|
+
id: z.ZodString;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type UserNotificationPayload = z.output<typeof UserNotificationPayloadSchema>;
|
|
32
|
+
export declare const InsertUserNotificationPayloadSchema: z.ZodObject<{
|
|
33
|
+
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>>>;
|
|
34
|
+
title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
35
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
36
|
+
id: z.ZodDefault<z.ZodString>;
|
|
37
|
+
type: z.ZodEnum<{
|
|
38
|
+
info: "info";
|
|
39
|
+
}>;
|
|
40
|
+
action: z.ZodOptional<z.ZodObject<{
|
|
41
|
+
link: z.ZodURL;
|
|
42
|
+
label: z.ZodString;
|
|
43
|
+
}, z.core.$strip>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
export type InsertUserNotificationPayload = z.output<typeof InsertUserNotificationPayloadSchema>;
|
|
46
|
+
export declare const UpdateUserNotificationPayloadSchema: z.ZodObject<{
|
|
47
|
+
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>>>;
|
|
48
|
+
action: z.ZodOptional<z.ZodObject<{
|
|
49
|
+
link: z.ZodURL;
|
|
50
|
+
label: z.ZodString;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
53
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
export type UpdateUserNotificationPayload = z.output<typeof UpdateUserNotificationPayloadSchema>;
|
|
62
56
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/workspace/user/notifications/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/workspace/user/notifications/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE3D,eAAO,MAAM,wBAAwB,aAEpC,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE3E,eAAO,MAAM,gCAAgC;;iBAE3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAC/C,OAAO,gCAAgC,CACxC,CAAC;AAYF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;iBAUxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAC5C,OAAO,6BAA6B,CACrC,CAAC;AAEF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;iBAM9C,CAAC;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAClD,OAAO,mCAAmC,CAC3C,CAAC;AAEF,eAAO,MAAM,mCAAmC;;;;;;;;iBAI9C,CAAC;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAClD,OAAO,mCAAmC,CAC3C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateUserNotificationPayloadSchema = exports.InsertUserNotificationPayloadSchema = exports.UserNotificationPayloadSchema = exports.UserNotificationIdPropertySchema = exports.UserNotificationIdSchema = exports.NotificationType = void 0;
|
|
4
|
-
const
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
5
|
const dates_js_1 = require("../../../common/schema/dates.js");
|
|
6
6
|
const id_js_1 = require("../../../common/schema/id.js");
|
|
7
7
|
const metadata_js_1 = require("../../../common/schema/metadata.js");
|
|
@@ -11,34 +11,37 @@ exports.NotificationType = {
|
|
|
11
11
|
IMPORT: 'import',
|
|
12
12
|
};
|
|
13
13
|
exports.UserNotificationIdSchema = (0, id_js_1.KSUIDSchema)(utils_js_1.Model.Notification.UIDPrefix);
|
|
14
|
-
exports.UserNotificationIdPropertySchema =
|
|
14
|
+
exports.UserNotificationIdPropertySchema = zod_1.z.object({
|
|
15
15
|
id: exports.UserNotificationIdSchema,
|
|
16
16
|
});
|
|
17
|
-
const ActionSchema =
|
|
18
|
-
link:
|
|
19
|
-
label:
|
|
17
|
+
const ActionSchema = zod_1.z.object({
|
|
18
|
+
link: zod_1.z.url(),
|
|
19
|
+
label: zod_1.z.string(),
|
|
20
20
|
});
|
|
21
|
-
const BaseAttributes =
|
|
22
|
-
title: (
|
|
23
|
-
message: (
|
|
21
|
+
const BaseAttributes = zod_1.z.object({
|
|
22
|
+
title: zod_1.z.union([zod_1.z.string(), zod_1.z.undefined()]).optional(),
|
|
23
|
+
message: zod_1.z.union([zod_1.z.string(), zod_1.z.undefined()]).optional(),
|
|
24
24
|
});
|
|
25
|
-
exports.UserNotificationPayloadSchema =
|
|
26
|
-
.
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
exports.UserNotificationPayloadSchema = zod_1.z.object({
|
|
26
|
+
...exports.UserNotificationIdPropertySchema.shape,
|
|
27
|
+
...BaseAttributes.shape,
|
|
28
|
+
type: zod_1.z.enum([exports.NotificationType.IMPORT, exports.NotificationType.INFO]),
|
|
29
|
+
action: zod_1.z.union([ActionSchema, zod_1.z.undefined()]).optional(),
|
|
29
30
|
createdAt: dates_js_1.RequiredDatePayloadSchema,
|
|
30
31
|
updatedAt: dates_js_1.RequiredDatePayloadSchema,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
exports.InsertUserNotificationPayloadSchema =
|
|
32
|
+
deletedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
33
|
+
deactivatedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
34
|
+
...metadata_js_1.MetadataPayloadPropertySchema.shape,
|
|
35
|
+
});
|
|
36
|
+
exports.InsertUserNotificationPayloadSchema = zod_1.z.object({
|
|
36
37
|
id: exports.UserNotificationIdSchema.default(() => (0, utils_js_1.generateNotificationId)()),
|
|
37
|
-
type:
|
|
38
|
+
type: zod_1.z.enum([exports.NotificationType.INFO]),
|
|
38
39
|
action: ActionSchema.optional(),
|
|
39
|
-
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
exports.UpdateUserNotificationPayloadSchema =
|
|
40
|
+
...BaseAttributes.shape,
|
|
41
|
+
...metadata_js_1.MetadataPayloadPropertySchema.shape,
|
|
42
|
+
});
|
|
43
|
+
exports.UpdateUserNotificationPayloadSchema = zod_1.z.object({
|
|
44
|
+
...BaseAttributes.shape,
|
|
43
45
|
action: ActionSchema.optional(),
|
|
44
|
-
|
|
46
|
+
...metadata_js_1.MetadataPayloadPropertySchema.shape,
|
|
47
|
+
});
|