@go-mondo/identity-sdk 0.0.2-beta.9 → 0.0.2-beta.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yaml +1 -1
- package/.release-please-manifest.json +1 -1
- package/.tsbuildinfo/cjs.json +1 -1
- package/.tsbuildinfo/esm.json +1 -1
- package/CHANGELOG.md +575 -0
- package/README.md +384 -2
- package/dist/cjs/action/schema/base.d.ts +21 -21
- package/dist/cjs/action/schema/base.d.ts.map +1 -1
- package/dist/cjs/action/schema/base.js +48 -10
- package/dist/cjs/action/schema/base.test.js +50 -35
- 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 +41 -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 +57 -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 +39 -5
- package/dist/cjs/action/schema/operations/user-attribute-verification.test.js +25 -26
- package/dist/cjs/action/schema/schema.d.ts +49 -77
- package/dist/cjs/action/schema/schema.d.ts.map +1 -1
- package/dist/cjs/action/schema/schema.js +7 -5
- package/dist/cjs/action/schema/schema.test.js +31 -58
- package/dist/cjs/activity/resources.d.ts +3 -3
- package/dist/cjs/activity/resources.d.ts.map +1 -1
- package/dist/cjs/activity/resources.js +2 -2
- package/dist/cjs/activity/resources.test.js +14 -13
- 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 +71 -26
- 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 +49 -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 +49 -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 +53 -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 +52 -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 +45 -6
- package/dist/cjs/activity/schema/types/unknown.test.js +29 -30
- package/dist/cjs/app/authorization/resources.d.ts +4 -4
- package/dist/cjs/app/authorization/resources.d.ts.map +1 -1
- package/dist/cjs/app/authorization/resources.js +2 -6
- package/dist/cjs/app/authorization/schema.d.ts +90 -52
- package/dist/cjs/app/authorization/schema.d.ts.map +1 -1
- package/dist/cjs/app/authorization/schema.js +90 -65
- package/dist/cjs/app/authorization/schema.test.js +155 -74
- package/dist/cjs/app/oauth/resources.d.ts +4 -4
- 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 +56 -17
- package/dist/cjs/app/oauth/schema.test.js +39 -40
- package/dist/cjs/app/oidc/resources.d.ts +6 -6
- 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 +50 -13
- package/dist/cjs/app/oidc/schema.test.js +46 -27
- package/dist/cjs/app/registration/resources.d.ts +4 -4
- 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/resources.test.js +14 -13
- 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 +56 -16
- package/dist/cjs/app/registration/schema.test.js +68 -150
- package/dist/cjs/app/resources.d.ts +7 -7
- package/dist/cjs/app/resources.d.ts.map +1 -1
- package/dist/cjs/app/resources.js +6 -6
- package/dist/cjs/app/resources.test.js +14 -13
- package/dist/cjs/app/saml/resources.d.ts +6 -6
- 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 +50 -13
- 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 +76 -35
- package/dist/cjs/app/schema.test.js +128 -42
- package/dist/cjs/association/resources.d.ts +5 -5
- package/dist/cjs/association/resources.d.ts.map +1 -1
- package/dist/cjs/association/resources.js +4 -6
- package/dist/cjs/association/schema.d.ts +270 -182
- package/dist/cjs/association/schema.d.ts.map +1 -1
- package/dist/cjs/association/schema.js +70 -32
- package/dist/cjs/association/schema.test.js +13 -54
- package/dist/cjs/authentication/factors/schema.d.ts +39 -49
- package/dist/cjs/authentication/factors/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/factors/schema.js +59 -20
- package/dist/cjs/authentication/factors/schema.test.js +33 -34
- package/dist/cjs/authentication/index.d.ts +1 -0
- package/dist/cjs/authentication/index.d.ts.map +1 -1
- package/dist/cjs/authentication/index.js +2 -0
- 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 +44 -9
- package/dist/cjs/authentication/sessions/resources.d.ts +4 -4
- package/dist/cjs/authentication/sessions/resources.d.ts.map +1 -1
- package/dist/cjs/authentication/sessions/resources.js +3 -3
- package/dist/cjs/authentication/sessions/schema.d.ts +96 -74
- package/dist/cjs/authentication/sessions/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/sessions/schema.js +99 -33
- package/dist/cjs/authentication/sessions/schema.test.d.ts +2 -0
- package/dist/cjs/authentication/sessions/schema.test.d.ts.map +1 -0
- package/dist/cjs/authentication/sessions/schema.test.js +65 -0
- package/dist/cjs/authentication/settings/resources.d.ts +4 -4
- 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 +45 -62
- package/dist/cjs/authentication/settings/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/settings/schema.js +49 -14
- package/dist/cjs/authentication/settings/schema.test.js +409 -22
- package/dist/cjs/authentication/strategies/resources.d.ts +9 -8
- package/dist/cjs/authentication/strategies/resources.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/resources.js +11 -11
- package/dist/cjs/authentication/strategies/schema/base.d.ts +59 -53
- package/dist/cjs/authentication/strategies/schema/base.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/base.js +68 -24
- package/dist/cjs/authentication/strategies/schema/schema.d.ts +126 -200
- package/dist/cjs/authentication/strategies/schema/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/schema.js +39 -6
- package/dist/cjs/authentication/strategies/schema/types/email.d.ts +62 -61
- package/dist/cjs/authentication/strategies/schema/types/email.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/types/email.js +59 -16
- package/dist/cjs/authentication/strategies/schema/types/email.test.js +49 -49
- package/dist/cjs/authentication/strategies/schema/types/totp.d.ts +108 -95
- package/dist/cjs/authentication/strategies/schema/types/totp.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/types/totp.js +83 -26
- package/dist/cjs/authorization/permissions/resources.d.ts +7 -7
- package/dist/cjs/authorization/permissions/resources.d.ts.map +1 -1
- package/dist/cjs/authorization/permissions/resources.js +6 -6
- 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 +78 -37
- package/dist/cjs/authorization/permissions/schema.test.js +54 -62
- package/dist/cjs/authorization/roles/resources.d.ts +7 -7
- package/dist/cjs/authorization/roles/resources.d.ts.map +1 -1
- package/dist/cjs/authorization/roles/resources.js +6 -6
- 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 +74 -38
- package/dist/cjs/authorization/roles/schema.test.js +55 -62
- 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 +42 -3
- package/dist/cjs/common/index.d.ts +2 -0
- package/dist/cjs/common/index.d.ts.map +1 -1
- package/dist/cjs/common/resources/authorization.d.ts +18 -1
- package/dist/cjs/common/resources/authorization.d.ts.map +1 -1
- package/dist/cjs/common/resources/authorization.js +6 -0
- package/dist/cjs/common/resources/init.d.ts +28 -11
- package/dist/cjs/common/resources/init.d.ts.map +1 -1
- package/dist/cjs/common/resources/init.js +81 -21
- package/dist/cjs/common/resources/init.test.js +62 -38
- package/dist/cjs/common/resources/operations.d.ts +7 -6
- package/dist/cjs/common/resources/operations.d.ts.map +1 -1
- package/dist/cjs/common/resources/operations.js +44 -21
- package/dist/cjs/common/resources/operations.test.js +47 -17
- 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 +2 -31
- 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 +37 -4
- package/dist/cjs/common/schema/aggregate.test.js +21 -22
- package/dist/cjs/common/schema/collection.d.ts +13 -14
- package/dist/cjs/common/schema/collection.d.ts.map +1 -1
- package/dist/cjs/common/schema/collection.js +40 -5
- package/dist/cjs/common/schema/collection.test.js +99 -48
- package/dist/cjs/common/schema/dates.d.ts +43 -26
- package/dist/cjs/common/schema/dates.d.ts.map +1 -1
- package/dist/cjs/common/schema/dates.js +63 -12
- 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 +35 -2
- package/dist/cjs/common/schema/id.test.js +70 -38
- package/dist/cjs/common/schema/jwt.d.ts +22 -14
- package/dist/cjs/common/schema/jwt.d.ts.map +1 -1
- package/dist/cjs/common/schema/jwt.js +37 -8
- package/dist/cjs/common/schema/jwt.test.js +22 -25
- package/dist/cjs/common/schema/metadata.d.ts +86 -49
- package/dist/cjs/common/schema/metadata.d.ts.map +1 -1
- package/dist/cjs/common/schema/metadata.js +154 -75
- package/dist/cjs/common/schema/metadata.test.js +198 -67
- package/dist/cjs/common/schema/pagination.d.ts +15 -5
- package/dist/cjs/common/schema/pagination.d.ts.map +1 -1
- package/dist/cjs/common/schema/pagination.js +46 -4
- package/dist/cjs/common/schema/pagination.test.js +55 -36
- 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 +28 -5
- package/dist/cjs/common/schema/schema.test.js +42 -15
- package/dist/cjs/common/schema/sets.d.ts +6 -2
- package/dist/cjs/common/schema/sets.d.ts.map +1 -1
- package/dist/cjs/common/schema/sets.js +50 -7
- package/dist/cjs/common/schema/url.d.ts +21 -0
- package/dist/cjs/common/schema/url.d.ts.map +1 -1
- package/dist/cjs/common/schema/url.js +79 -0
- package/dist/cjs/common/schema/url.test.js +10 -0
- package/dist/cjs/customer/organization/schema.d.ts +59 -46
- package/dist/cjs/customer/organization/schema.d.ts.map +1 -1
- package/dist/cjs/customer/organization/schema.js +76 -26
- 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 +42 -3
- package/dist/cjs/customer/users/resources.d.ts +7 -7
- package/dist/cjs/customer/users/resources.d.ts.map +1 -1
- package/dist/cjs/customer/users/resources.js +6 -6
- package/dist/cjs/customer/users/schema.d.ts +213 -104
- package/dist/cjs/customer/users/schema.d.ts.map +1 -1
- package/dist/cjs/customer/users/schema.js +141 -56
- package/dist/cjs/customer/users/schema.test.js +591 -60
- 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 +38 -2
- package/dist/cjs/identity/schema.test.js +21 -16
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.d.ts +34 -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 +93 -38
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.test.js +47 -48
- package/dist/cjs/oauth/authorize/schema/grants/common.d.ts +6 -0
- package/dist/cjs/oauth/authorize/schema/grants/common.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/schema/grants/common.js +47 -0
- package/dist/cjs/oauth/authorize/schema/grants/implicit.d.ts +18 -10
- package/dist/cjs/oauth/authorize/schema/grants/implicit.d.ts.map +1 -1
- package/dist/cjs/oauth/authorize/schema/grants/implicit.js +56 -11
- package/dist/cjs/oauth/authorize/schema/schema.d.ts +48 -36
- package/dist/cjs/oauth/authorize/schema/schema.d.ts.map +1 -1
- package/dist/cjs/oauth/authorize/schema/schema.js +4 -2
- package/dist/cjs/oauth/common/schema.d.ts +24 -7
- package/dist/cjs/oauth/common/schema.d.ts.map +1 -1
- package/dist/cjs/oauth/common/schema.js +59 -8
- package/dist/cjs/oauth/common/schema.test.js +22 -30
- package/dist/cjs/oauth/index.d.ts +3 -3
- package/dist/cjs/oauth/index.d.ts.map +1 -1
- package/dist/cjs/oauth/index.js +8 -25
- package/dist/cjs/oauth/token/schema/grants/authorization-code.d.ts +16 -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 +66 -12
- package/dist/cjs/oauth/token/schema/grants/client-credentials.d.ts +16 -17
- package/dist/cjs/oauth/token/schema/grants/client-credentials.d.ts.map +1 -1
- package/dist/cjs/oauth/token/schema/grants/client-credentials.js +53 -16
- package/dist/cjs/oauth/token/schema/grants/common.d.ts +6 -0
- package/dist/cjs/oauth/token/schema/grants/common.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/grants/common.js +52 -0
- package/dist/cjs/oauth/token/schema/grants/refresh-token.d.ts +15 -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 +57 -11
- package/dist/cjs/oauth/token/schema/schema.d.ts +48 -21
- package/dist/cjs/oauth/token/schema/schema.d.ts.map +1 -1
- package/dist/cjs/oauth/token/schema/schema.js +79 -2
- package/dist/cjs/oauth/token/schema/schema.test.js +44 -28
- package/dist/cjs/workspace/authorization/schema.d.ts +62 -27
- package/dist/cjs/workspace/authorization/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/authorization/schema.js +58 -13
- package/dist/cjs/workspace/branding/schema.d.ts +47 -37
- package/dist/cjs/workspace/branding/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/branding/schema.js +61 -16
- package/dist/cjs/workspace/membership/schema.d.ts +42 -20
- package/dist/cjs/workspace/membership/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/membership/schema.js +47 -7
- package/dist/cjs/workspace/registration/schema.d.ts +41 -27
- package/dist/cjs/workspace/registration/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/registration/schema.js +63 -14
- package/dist/cjs/workspace/settings/schema.d.ts +20 -19
- package/dist/cjs/workspace/settings/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/settings/schema.js +48 -8
- package/dist/cjs/workspace/settings/schema.test.js +18 -19
- package/dist/cjs/workspace/tenant/schema.d.ts +88 -57
- package/dist/cjs/workspace/tenant/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/tenant/schema.js +59 -13
- package/dist/cjs/workspace/tenant/schema.test.d.ts +2 -0
- package/dist/cjs/workspace/tenant/schema.test.d.ts.map +1 -0
- package/dist/cjs/workspace/tenant/schema.test.js +235 -0
- package/dist/cjs/workspace/user/notifications/schema.d.ts +70 -56
- package/dist/cjs/workspace/user/notifications/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/user/notifications/schema.js +76 -30
- package/dist/cjs/workspace/user/preferences/schema.d.ts +29 -25
- package/dist/cjs/workspace/user/preferences/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/user/preferences/schema.js +57 -12
- package/dist/esm/action/schema/base.d.ts +21 -21
- package/dist/esm/action/schema/base.d.ts.map +1 -1
- package/dist/esm/action/schema/base.js +17 -12
- package/dist/esm/action/schema/base.test.js +51 -36
- 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 +49 -77
- package/dist/esm/action/schema/schema.d.ts.map +1 -1
- package/dist/esm/action/schema/schema.js +7 -5
- package/dist/esm/action/schema/schema.test.js +24 -51
- package/dist/esm/activity/resources.d.ts +3 -3
- package/dist/esm/activity/resources.d.ts.map +1 -1
- package/dist/esm/activity/resources.js +4 -4
- package/dist/esm/activity/resources.test.js +14 -13
- 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 +38 -26
- 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 +4 -4
- package/dist/esm/app/authorization/resources.d.ts.map +1 -1
- package/dist/esm/app/authorization/resources.js +3 -7
- package/dist/esm/app/authorization/schema.d.ts +90 -52
- package/dist/esm/app/authorization/schema.d.ts.map +1 -1
- package/dist/esm/app/authorization/schema.js +58 -66
- package/dist/esm/app/authorization/schema.test.js +155 -74
- package/dist/esm/app/oauth/resources.d.ts +4 -4
- package/dist/esm/app/oauth/resources.d.ts.map +1 -1
- package/dist/esm/app/oauth/resources.js +3 -4
- 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 +25 -19
- package/dist/esm/app/oauth/schema.test.js +39 -40
- package/dist/esm/app/oidc/resources.d.ts +6 -6
- package/dist/esm/app/oidc/resources.d.ts.map +1 -1
- package/dist/esm/app/oidc/resources.js +5 -6
- 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 +19 -15
- package/dist/esm/app/oidc/schema.test.js +46 -27
- package/dist/esm/app/registration/resources.d.ts +4 -4
- package/dist/esm/app/registration/resources.d.ts.map +1 -1
- package/dist/esm/app/registration/resources.js +3 -4
- package/dist/esm/app/registration/resources.test.js +14 -13
- 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 +25 -18
- package/dist/esm/app/registration/schema.test.js +68 -150
- package/dist/esm/app/resources.d.ts +7 -7
- package/dist/esm/app/resources.d.ts.map +1 -1
- package/dist/esm/app/resources.js +8 -8
- package/dist/esm/app/resources.test.js +14 -13
- package/dist/esm/app/saml/resources.d.ts +6 -6
- package/dist/esm/app/saml/resources.d.ts.map +1 -1
- package/dist/esm/app/saml/resources.js +5 -6
- 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 +19 -15
- 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 +45 -37
- package/dist/esm/app/schema.test.js +129 -43
- package/dist/esm/association/resources.d.ts +5 -5
- package/dist/esm/association/resources.d.ts.map +1 -1
- package/dist/esm/association/resources.js +6 -8
- package/dist/esm/association/schema.d.ts +270 -182
- package/dist/esm/association/schema.d.ts.map +1 -1
- package/dist/esm/association/schema.js +36 -31
- package/dist/esm/association/schema.test.js +14 -55
- package/dist/esm/authentication/factors/schema.d.ts +39 -49
- package/dist/esm/authentication/factors/schema.d.ts.map +1 -1
- package/dist/esm/authentication/factors/schema.js +26 -20
- package/dist/esm/authentication/factors/schema.test.js +33 -34
- package/dist/esm/authentication/index.d.ts +1 -0
- package/dist/esm/authentication/index.d.ts.map +1 -1
- package/dist/esm/authentication/index.js +2 -0
- 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 +13 -11
- package/dist/esm/authentication/sessions/resources.d.ts +4 -4
- package/dist/esm/authentication/sessions/resources.d.ts.map +1 -1
- package/dist/esm/authentication/sessions/resources.js +5 -5
- package/dist/esm/authentication/sessions/schema.d.ts +96 -74
- package/dist/esm/authentication/sessions/schema.d.ts.map +1 -1
- package/dist/esm/authentication/sessions/schema.js +67 -34
- package/dist/esm/authentication/sessions/schema.test.d.ts +2 -0
- package/dist/esm/authentication/sessions/schema.test.d.ts.map +1 -0
- package/dist/esm/authentication/sessions/schema.test.js +63 -0
- package/dist/esm/authentication/settings/resources.d.ts +4 -4
- package/dist/esm/authentication/settings/resources.d.ts.map +1 -1
- package/dist/esm/authentication/settings/resources.js +3 -4
- package/dist/esm/authentication/settings/schema.d.ts +45 -62
- package/dist/esm/authentication/settings/schema.d.ts.map +1 -1
- package/dist/esm/authentication/settings/schema.js +18 -16
- package/dist/esm/authentication/settings/schema.test.js +409 -22
- package/dist/esm/authentication/strategies/resources.d.ts +9 -8
- package/dist/esm/authentication/strategies/resources.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/resources.js +13 -13
- package/dist/esm/authentication/strategies/schema/base.d.ts +59 -53
- package/dist/esm/authentication/strategies/schema/base.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/base.js +36 -25
- package/dist/esm/authentication/strategies/schema/schema.d.ts +126 -200
- package/dist/esm/authentication/strategies/schema/schema.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/schema.js +17 -6
- package/dist/esm/authentication/strategies/schema/types/email.d.ts +62 -61
- package/dist/esm/authentication/strategies/schema/types/email.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/types/email.js +25 -15
- package/dist/esm/authentication/strategies/schema/types/email.test.js +49 -49
- package/dist/esm/authentication/strategies/schema/types/totp.d.ts +108 -95
- package/dist/esm/authentication/strategies/schema/types/totp.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/types/totp.js +51 -27
- package/dist/esm/authorization/permissions/resources.d.ts +7 -7
- package/dist/esm/authorization/permissions/resources.d.ts.map +1 -1
- package/dist/esm/authorization/permissions/resources.js +8 -8
- 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 +47 -39
- package/dist/esm/authorization/permissions/schema.test.js +54 -62
- package/dist/esm/authorization/roles/resources.d.ts +7 -7
- package/dist/esm/authorization/roles/resources.d.ts.map +1 -1
- package/dist/esm/authorization/roles/resources.js +8 -8
- 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 +43 -40
- package/dist/esm/authorization/roles/schema.test.js +55 -62
- 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/index.d.ts +2 -0
- package/dist/esm/common/index.d.ts.map +1 -1
- package/dist/esm/common/resources/authorization.d.ts +18 -1
- package/dist/esm/common/resources/authorization.d.ts.map +1 -1
- package/dist/esm/common/resources/authorization.js +5 -1
- package/dist/esm/common/resources/init.d.ts +28 -11
- package/dist/esm/common/resources/init.d.ts.map +1 -1
- package/dist/esm/common/resources/init.js +47 -21
- package/dist/esm/common/resources/init.test.js +63 -39
- package/dist/esm/common/resources/operations.d.ts +7 -6
- package/dist/esm/common/resources/operations.d.ts.map +1 -1
- package/dist/esm/common/resources/operations.js +41 -19
- package/dist/esm/common/resources/operations.test.js +48 -18
- 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 +3 -32
- 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 +13 -14
- package/dist/esm/common/schema/collection.d.ts.map +1 -1
- package/dist/esm/common/schema/collection.js +5 -5
- package/dist/esm/common/schema/collection.test.js +66 -48
- package/dist/esm/common/schema/dates.d.ts +43 -26
- package/dist/esm/common/schema/dates.d.ts.map +1 -1
- package/dist/esm/common/schema/dates.js +29 -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 +22 -14
- package/dist/esm/common/schema/jwt.d.ts.map +1 -1
- package/dist/esm/common/schema/jwt.js +3 -7
- package/dist/esm/common/schema/jwt.test.js +22 -25
- package/dist/esm/common/schema/metadata.d.ts +86 -49
- package/dist/esm/common/schema/metadata.d.ts.map +1 -1
- package/dist/esm/common/schema/metadata.js +120 -74
- package/dist/esm/common/schema/metadata.test.js +199 -68
- package/dist/esm/common/schema/pagination.d.ts +15 -5
- package/dist/esm/common/schema/pagination.d.ts.map +1 -1
- package/dist/esm/common/schema/pagination.js +13 -4
- package/dist/esm/common/schema/pagination.test.js +55 -36
- 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 +6 -2
- package/dist/esm/common/schema/sets.d.ts.map +1 -1
- package/dist/esm/common/schema/sets.js +16 -6
- package/dist/esm/common/schema/url.d.ts +21 -0
- package/dist/esm/common/schema/url.d.ts.map +1 -1
- package/dist/esm/common/schema/url.js +45 -0
- package/dist/esm/common/schema/url.test.js +11 -1
- package/dist/esm/customer/organization/schema.d.ts +59 -46
- package/dist/esm/customer/organization/schema.d.ts.map +1 -1
- package/dist/esm/customer/organization/schema.js +43 -26
- 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 +7 -7
- package/dist/esm/customer/users/resources.d.ts.map +1 -1
- package/dist/esm/customer/users/resources.js +8 -8
- package/dist/esm/customer/users/schema.d.ts +213 -104
- package/dist/esm/customer/users/schema.d.ts.map +1 -1
- package/dist/esm/customer/users/schema.js +107 -55
- package/dist/esm/customer/users/schema.test.js +592 -61
- 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 +34 -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 +60 -38
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.test.js +48 -49
- package/dist/esm/oauth/authorize/schema/grants/common.d.ts +6 -0
- package/dist/esm/oauth/authorize/schema/grants/common.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/schema/grants/common.js +11 -0
- package/dist/esm/oauth/authorize/schema/grants/implicit.d.ts +18 -10
- package/dist/esm/oauth/authorize/schema/grants/implicit.d.ts.map +1 -1
- package/dist/esm/oauth/authorize/schema/grants/implicit.js +22 -10
- package/dist/esm/oauth/authorize/schema/schema.d.ts +48 -36
- package/dist/esm/oauth/authorize/schema/schema.d.ts.map +1 -1
- package/dist/esm/oauth/authorize/schema/schema.js +4 -3
- package/dist/esm/oauth/common/schema.d.ts +24 -7
- package/dist/esm/oauth/common/schema.d.ts.map +1 -1
- package/dist/esm/oauth/common/schema.js +25 -7
- package/dist/esm/oauth/common/schema.test.js +23 -31
- package/dist/esm/oauth/index.d.ts +3 -3
- package/dist/esm/oauth/index.d.ts.map +1 -1
- package/dist/esm/oauth/index.js +3 -3
- package/dist/esm/oauth/token/schema/grants/authorization-code.d.ts +16 -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 +32 -11
- package/dist/esm/oauth/token/schema/grants/client-credentials.d.ts +16 -17
- package/dist/esm/oauth/token/schema/grants/client-credentials.d.ts.map +1 -1
- package/dist/esm/oauth/token/schema/grants/client-credentials.js +19 -15
- package/dist/esm/oauth/token/schema/grants/common.d.ts +6 -0
- package/dist/esm/oauth/token/schema/grants/common.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/grants/common.js +16 -0
- package/dist/esm/oauth/token/schema/grants/refresh-token.d.ts +15 -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 +23 -10
- package/dist/esm/oauth/token/schema/schema.d.ts +48 -21
- package/dist/esm/oauth/token/schema/schema.d.ts.map +1 -1
- package/dist/esm/oauth/token/schema/schema.js +59 -4
- package/dist/esm/oauth/token/schema/schema.test.js +45 -29
- package/dist/esm/workspace/authorization/schema.d.ts +62 -27
- package/dist/esm/workspace/authorization/schema.d.ts.map +1 -1
- package/dist/esm/workspace/authorization/schema.js +27 -15
- package/dist/esm/workspace/branding/schema.d.ts +47 -37
- package/dist/esm/workspace/branding/schema.d.ts.map +1 -1
- package/dist/esm/workspace/branding/schema.js +29 -17
- package/dist/esm/workspace/membership/schema.d.ts +42 -20
- package/dist/esm/workspace/membership/schema.d.ts.map +1 -1
- package/dist/esm/workspace/membership/schema.js +14 -7
- package/dist/esm/workspace/registration/schema.d.ts +41 -27
- package/dist/esm/workspace/registration/schema.d.ts.map +1 -1
- package/dist/esm/workspace/registration/schema.js +32 -16
- package/dist/esm/workspace/settings/schema.d.ts +20 -19
- package/dist/esm/workspace/settings/schema.d.ts.map +1 -1
- package/dist/esm/workspace/settings/schema.js +16 -9
- package/dist/esm/workspace/settings/schema.test.js +18 -19
- package/dist/esm/workspace/tenant/schema.d.ts +88 -57
- package/dist/esm/workspace/tenant/schema.d.ts.map +1 -1
- package/dist/esm/workspace/tenant/schema.js +26 -13
- package/dist/esm/workspace/tenant/schema.test.d.ts +2 -0
- package/dist/esm/workspace/tenant/schema.test.d.ts.map +1 -0
- package/dist/esm/workspace/tenant/schema.test.js +233 -0
- package/dist/esm/workspace/user/notifications/schema.d.ts +70 -56
- package/dist/esm/workspace/user/notifications/schema.d.ts.map +1 -1
- package/dist/esm/workspace/user/notifications/schema.js +42 -29
- package/dist/esm/workspace/user/preferences/schema.d.ts +29 -25
- package/dist/esm/workspace/user/preferences/schema.d.ts.map +1 -1
- package/dist/esm/workspace/user/preferences/schema.js +25 -13
- package/package.json +3 -3
- package/dist/cjs/action/schema/operations/set-password.d.ts +0 -31
- package/dist/cjs/action/schema/operations/set-password.d.ts.map +0 -1
- package/dist/cjs/action/schema/operations/set-password.js +0 -18
- package/dist/cjs/action/schema/operations/set-password.test.d.ts +0 -2
- package/dist/cjs/action/schema/operations/set-password.test.d.ts.map +0 -1
- package/dist/cjs/action/schema/operations/set-password.test.js +0 -167
- package/dist/cjs/authentication/strategies/schema/types/password.d.ts +0 -132
- package/dist/cjs/authentication/strategies/schema/types/password.d.ts.map +0 -1
- package/dist/cjs/authentication/strategies/schema/types/password.js +0 -52
- package/dist/cjs/common/schema/sets.test.d.ts +0 -2
- package/dist/cjs/common/schema/sets.test.d.ts.map +0 -1
- package/dist/cjs/common/schema/sets.test.js +0 -84
- package/dist/esm/action/schema/operations/set-password.d.ts +0 -31
- package/dist/esm/action/schema/operations/set-password.d.ts.map +0 -1
- package/dist/esm/action/schema/operations/set-password.js +0 -15
- package/dist/esm/action/schema/operations/set-password.test.d.ts +0 -2
- package/dist/esm/action/schema/operations/set-password.test.d.ts.map +0 -1
- package/dist/esm/action/schema/operations/set-password.test.js +0 -165
- package/dist/esm/authentication/strategies/schema/types/password.d.ts +0 -132
- package/dist/esm/authentication/strategies/schema/types/password.d.ts.map +0 -1
- package/dist/esm/authentication/strategies/schema/types/password.js +0 -49
- package/dist/esm/common/schema/sets.test.d.ts +0 -2
- package/dist/esm/common/schema/sets.test.d.ts.map +0 -1
- package/dist/esm/common/schema/sets.test.js +0 -82
|
@@ -1,58 +1,89 @@
|
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
import * as z from 'zod/v4';
|
|
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 TenantSchema: 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
|
+
"Membership.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
|
+
"Branding.Remove": z.ZodOptional<z.ZodObject<{
|
|
17
|
+
expiresAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
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>>>;
|
|
21
|
+
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>>>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
metadata: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodMap<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<import("../../common/index.js").MetadataMap, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../common/index.js").MetadataMap, import("../../common/index.js").MetadataMap | undefined>>;
|
|
25
|
+
deactivatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>;
|
|
26
|
+
deletedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>;
|
|
27
|
+
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
28
|
+
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
status: z.ZodEnum<{
|
|
31
|
+
active: "active";
|
|
32
|
+
suspended: "suspended";
|
|
33
|
+
}>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type TenantProperties = z.input<typeof TenantSchema>;
|
|
36
|
+
export type Tenant = z.output<typeof TenantSchema>;
|
|
37
|
+
export declare const TenantPayloadSchema: z.ZodObject<{
|
|
38
|
+
handle: z.ZodString;
|
|
39
|
+
supportEmail: z.ZodOptional<z.ZodEmail>;
|
|
40
|
+
authHost: z.ZodOptional<z.ZodURL>;
|
|
41
|
+
membership: z.ZodOptional<z.ZodObject<{
|
|
42
|
+
features: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
"Membership.Remove": z.ZodOptional<z.ZodObject<{
|
|
44
|
+
expiresAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
45
|
+
}, z.core.$strip>>;
|
|
46
|
+
"Branding.Remove": z.ZodOptional<z.ZodObject<{
|
|
47
|
+
expiresAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
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>>>;
|
|
51
|
+
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>>>;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
metadata: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodMap<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<import("../../common/index.js").MetadataRecord, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../common/index.js").MetadataRecord | undefined, import("../../common/index.js").MetadataRecord | undefined>>;
|
|
55
|
+
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>>>;
|
|
56
|
+
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>>>;
|
|
57
|
+
updatedAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
58
|
+
createdAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
59
|
+
name: z.ZodString;
|
|
60
|
+
status: z.ZodEnum<{
|
|
61
|
+
active: "active";
|
|
62
|
+
suspended: "suspended";
|
|
63
|
+
}>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
export type TenantPayload = z.output<typeof TenantPayloadSchema>;
|
|
66
|
+
export declare const InsertTenantPayloadSchema: z.ZodObject<{
|
|
67
|
+
id: z.ZodDefault<z.ZodString>;
|
|
68
|
+
handle: z.ZodDefault<z.ZodString>;
|
|
69
|
+
supportEmail: z.ZodOptional<z.ZodEmail>;
|
|
70
|
+
metadata: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodMap<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<import("../../common/index.js").MetadataRecord, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../common/index.js").MetadataRecord | null | undefined, import("../../common/index.js").MetadataRecord | undefined>>;
|
|
71
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
72
|
+
active: "active";
|
|
73
|
+
suspended: "suspended";
|
|
74
|
+
}>>;
|
|
75
|
+
name: z.ZodString;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
export type InsertTenantPayload = z.output<typeof InsertTenantPayloadSchema>;
|
|
78
|
+
export declare const UpdateTenantPayloadSchema: z.ZodObject<{
|
|
79
|
+
handle: z.ZodOptional<z.ZodString>;
|
|
80
|
+
supportEmail: z.ZodOptional<z.ZodEmail>;
|
|
81
|
+
metadata: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodMap<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<import("../../common/index.js").MetadataRecord, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../common/index.js").MetadataRecord | null | undefined, import("../../common/index.js").MetadataRecord | undefined>>;
|
|
82
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
83
|
+
active: "active";
|
|
84
|
+
suspended: "suspended";
|
|
85
|
+
}>>;
|
|
86
|
+
name: z.ZodOptional<z.ZodString>;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
export type UpdateTenantPayload = z.output<typeof UpdateTenantPayloadSchema>;
|
|
58
89
|
//# 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,KAAK,CAAC,MAAM,QAAQ,CAAC;AAW5B,eAAO,MAAM,cAAc,aAAsC,CAAC;AAClE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvD,eAAO,MAAM,sBAAsB;;iBAEjC,CAAC;AAUH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGvB,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAC5D,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,YAAY,CAAC,CAAC;AAEnD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG9B,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,24 +1,37 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
2
|
import { KSUIDSchema } from '../../common/schema/id.js';
|
|
3
|
-
import { InsertOrganizationPayloadSchema, OrganizationPayloadSchema, UpdateOrganizationPayloadSchema, } from '../../customer/organization/schema.js';
|
|
3
|
+
import { InsertOrganizationPayloadSchema, OrganizationPayloadSchema, OrganizationSchema, UpdateOrganizationPayloadSchema, } from '../../customer/organization/schema.js';
|
|
4
4
|
import { MembershipPayloadSchema } from '../membership/schema.js';
|
|
5
5
|
import { Model, generateHandle, generateTenantId } from '../utils.js';
|
|
6
6
|
export const TenantIdSchema = KSUIDSchema(Model.Tenant.UIDPrefix);
|
|
7
|
-
export const TenantIdPropertySchema =
|
|
7
|
+
export const TenantIdPropertySchema = z.object({
|
|
8
8
|
id: TenantIdSchema,
|
|
9
9
|
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
const BaseSchema = z.object({
|
|
11
|
+
...TenantIdPropertySchema.shape,
|
|
12
|
+
handle: z.string(),
|
|
13
|
+
supportEmail: z.email().optional(),
|
|
14
|
+
authHost: z.url().optional(), // Not live yet (used for dev now)
|
|
14
15
|
membership: MembershipPayloadSchema.optional(),
|
|
15
16
|
});
|
|
16
|
-
export const
|
|
17
|
+
export const TenantSchema = z.object({
|
|
18
|
+
...OrganizationSchema.shape,
|
|
19
|
+
...BaseSchema.shape,
|
|
20
|
+
});
|
|
21
|
+
export const TenantPayloadSchema = z.object({
|
|
22
|
+
...OrganizationPayloadSchema.shape,
|
|
23
|
+
...BaseSchema.shape,
|
|
24
|
+
});
|
|
25
|
+
export const InsertTenantPayloadSchema = z.object({
|
|
26
|
+
...InsertOrganizationPayloadSchema.omit({
|
|
27
|
+
id: true,
|
|
28
|
+
}).shape,
|
|
17
29
|
id: TenantIdSchema.default(() => generateTenantId()),
|
|
18
|
-
handle:
|
|
19
|
-
supportEmail:
|
|
30
|
+
handle: z.string().default(() => generateHandle()),
|
|
31
|
+
supportEmail: z.email().optional(),
|
|
20
32
|
});
|
|
21
|
-
export const UpdateTenantPayloadSchema =
|
|
22
|
-
|
|
23
|
-
|
|
33
|
+
export const UpdateTenantPayloadSchema = z.object({
|
|
34
|
+
...UpdateOrganizationPayloadSchema.shape,
|
|
35
|
+
handle: z.string().optional(),
|
|
36
|
+
supportEmail: z.email().optional(),
|
|
24
37
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.test.d.ts","sourceRoot":"","sources":["../../../../src/workspace/tenant/schema.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { describe, expect, test } from 'vitest';
|
|
2
|
+
import { generateTenantId } from '../utils.js';
|
|
3
|
+
import { InsertTenantPayloadSchema, TenantIdSchema, TenantPayloadSchema, TenantSchema, UpdateTenantPayloadSchema, } from './schema.js';
|
|
4
|
+
describe('Workspace - Tenant', () => {
|
|
5
|
+
describe('TenantIdSchema', () => {
|
|
6
|
+
test('should parse valid tenant ID', () => {
|
|
7
|
+
const id = generateTenantId();
|
|
8
|
+
const result = TenantIdSchema.safeParse(id);
|
|
9
|
+
expect(result.success).toBe(true);
|
|
10
|
+
if (result.success) {
|
|
11
|
+
expect(result.data).toBe(id);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
test('should reject invalid prefix', () => {
|
|
15
|
+
const invalidId = 'org_2SVDTvbPaWdRG0CdE9EsVZBjxur';
|
|
16
|
+
const result = TenantIdSchema.safeParse(invalidId);
|
|
17
|
+
expect(result.success).toBe(false);
|
|
18
|
+
});
|
|
19
|
+
test('should reject invalid format', () => {
|
|
20
|
+
const invalidId = 'tnt-invalid-format';
|
|
21
|
+
const result = TenantIdSchema.safeParse(invalidId);
|
|
22
|
+
expect(result.success).toBe(false);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
describe('TenantSchema', () => {
|
|
26
|
+
test('should parse valid tenant with all fields', () => {
|
|
27
|
+
const tenant = {
|
|
28
|
+
id: generateTenantId(),
|
|
29
|
+
handle: 'test-tenant',
|
|
30
|
+
name: 'Test Tenant',
|
|
31
|
+
supportEmail: 'support@test.com',
|
|
32
|
+
authHost: 'https://auth.test.com',
|
|
33
|
+
status: 'active',
|
|
34
|
+
createdAt: new Date(),
|
|
35
|
+
updatedAt: new Date(),
|
|
36
|
+
membership: {
|
|
37
|
+
id: 'mbr_test',
|
|
38
|
+
role: 'owner',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
const result = TenantSchema.safeParse(tenant);
|
|
42
|
+
expect(result.success).toBe(true);
|
|
43
|
+
if (result.success) {
|
|
44
|
+
expect(result.data.id).toBe(tenant.id);
|
|
45
|
+
expect(result.data.handle).toBe(tenant.handle);
|
|
46
|
+
expect(result.data.name).toBe(tenant.name);
|
|
47
|
+
expect(result.data.supportEmail).toBe(tenant.supportEmail);
|
|
48
|
+
expect(result.data.authHost).toBe(tenant.authHost);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
test('should parse valid tenant with minimal fields', () => {
|
|
52
|
+
const tenant = {
|
|
53
|
+
id: generateTenantId(),
|
|
54
|
+
handle: 'minimal-tenant',
|
|
55
|
+
name: 'Minimal',
|
|
56
|
+
status: 'active',
|
|
57
|
+
createdAt: new Date(),
|
|
58
|
+
updatedAt: new Date(),
|
|
59
|
+
};
|
|
60
|
+
const result = TenantSchema.safeParse(tenant);
|
|
61
|
+
expect(result.success).toBe(true);
|
|
62
|
+
if (result.success) {
|
|
63
|
+
expect(result.data.id).toBe(tenant.id);
|
|
64
|
+
expect(result.data.handle).toBe(tenant.handle);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
test('should reject invalid email', () => {
|
|
68
|
+
const tenant = {
|
|
69
|
+
id: generateTenantId(),
|
|
70
|
+
handle: 'test-tenant',
|
|
71
|
+
name: 'Test',
|
|
72
|
+
supportEmail: 'not-an-email',
|
|
73
|
+
status: 'active',
|
|
74
|
+
createdAt: new Date(),
|
|
75
|
+
updatedAt: new Date(),
|
|
76
|
+
};
|
|
77
|
+
const result = TenantSchema.safeParse(tenant);
|
|
78
|
+
expect(result.success).toBe(false);
|
|
79
|
+
});
|
|
80
|
+
test('should reject invalid authHost URL', () => {
|
|
81
|
+
const tenant = {
|
|
82
|
+
id: generateTenantId(),
|
|
83
|
+
handle: 'test-tenant',
|
|
84
|
+
name: 'Test',
|
|
85
|
+
authHost: 'not-a-url',
|
|
86
|
+
status: 'active',
|
|
87
|
+
createdAt: new Date(),
|
|
88
|
+
updatedAt: new Date(),
|
|
89
|
+
};
|
|
90
|
+
const result = TenantSchema.safeParse(tenant);
|
|
91
|
+
expect(result.success).toBe(false);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
describe('TenantPayloadSchema', () => {
|
|
95
|
+
test('should parse valid tenant payload', () => {
|
|
96
|
+
const payload = {
|
|
97
|
+
id: generateTenantId(),
|
|
98
|
+
handle: 'test-tenant',
|
|
99
|
+
name: 'Test Tenant',
|
|
100
|
+
supportEmail: 'support@test.com',
|
|
101
|
+
authHost: 'https://auth.test.com',
|
|
102
|
+
status: 'active',
|
|
103
|
+
createdAt: new Date(),
|
|
104
|
+
updatedAt: new Date(),
|
|
105
|
+
};
|
|
106
|
+
const result = TenantPayloadSchema.safeParse(payload);
|
|
107
|
+
expect(result.success).toBe(true);
|
|
108
|
+
if (result.success) {
|
|
109
|
+
expect(result.data.id).toBe(payload.id);
|
|
110
|
+
expect(result.data.handle).toBe(payload.handle);
|
|
111
|
+
expect(result.data.supportEmail).toBe(payload.supportEmail);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
describe('InsertTenantPayloadSchema', () => {
|
|
116
|
+
test('should generate default ID and handle when not provided', () => {
|
|
117
|
+
const payload = {
|
|
118
|
+
name: 'New Tenant',
|
|
119
|
+
};
|
|
120
|
+
const result = InsertTenantPayloadSchema.safeParse(payload);
|
|
121
|
+
expect(result.success).toBe(true);
|
|
122
|
+
if (result.success) {
|
|
123
|
+
expect(result.data.id).toMatch(/^tnt_[A-Za-z0-9]+$/);
|
|
124
|
+
expect(result.data.handle).toMatch(/^[a-f0-9]{12}$/);
|
|
125
|
+
expect(result.data.name).toBe(payload.name);
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
test('should use provided ID and handle', () => {
|
|
129
|
+
const customId = generateTenantId();
|
|
130
|
+
const customHandle = 'custom-handle';
|
|
131
|
+
const payload = {
|
|
132
|
+
id: customId,
|
|
133
|
+
handle: customHandle,
|
|
134
|
+
name: 'Custom Tenant',
|
|
135
|
+
};
|
|
136
|
+
const result = InsertTenantPayloadSchema.safeParse(payload);
|
|
137
|
+
expect(result.success).toBe(true);
|
|
138
|
+
if (result.success) {
|
|
139
|
+
expect(result.data.id).toBe(customId);
|
|
140
|
+
expect(result.data.handle).toBe(customHandle);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
test('should parse with optional supportEmail', () => {
|
|
144
|
+
const payload = {
|
|
145
|
+
name: 'Test Tenant',
|
|
146
|
+
supportEmail: 'support@example.com',
|
|
147
|
+
};
|
|
148
|
+
const result = InsertTenantPayloadSchema.safeParse(payload);
|
|
149
|
+
expect(result.success).toBe(true);
|
|
150
|
+
if (result.success) {
|
|
151
|
+
expect(result.data.supportEmail).toBe(payload.supportEmail);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
test('should reject invalid supportEmail', () => {
|
|
155
|
+
const payload = {
|
|
156
|
+
name: 'Test Tenant',
|
|
157
|
+
supportEmail: 'invalid-email',
|
|
158
|
+
};
|
|
159
|
+
const result = InsertTenantPayloadSchema.safeParse(payload);
|
|
160
|
+
expect(result.success).toBe(false);
|
|
161
|
+
});
|
|
162
|
+
test('should generate unique IDs for multiple inserts', () => {
|
|
163
|
+
const payload1 = { name: 'Tenant 1' };
|
|
164
|
+
const payload2 = { name: 'Tenant 2' };
|
|
165
|
+
const result1 = InsertTenantPayloadSchema.safeParse(payload1);
|
|
166
|
+
const result2 = InsertTenantPayloadSchema.safeParse(payload2);
|
|
167
|
+
expect(result1.success).toBe(true);
|
|
168
|
+
expect(result2.success).toBe(true);
|
|
169
|
+
if (result1.success && result2.success) {
|
|
170
|
+
expect(result1.data.id).not.toBe(result2.data.id);
|
|
171
|
+
expect(result1.data.handle).not.toBe(result2.data.handle);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
describe('UpdateTenantPayloadSchema', () => {
|
|
176
|
+
test('should parse update with all optional fields', () => {
|
|
177
|
+
const payload = {
|
|
178
|
+
name: 'Updated Name',
|
|
179
|
+
handle: 'updated-handle',
|
|
180
|
+
supportEmail: 'updated@example.com',
|
|
181
|
+
};
|
|
182
|
+
const result = UpdateTenantPayloadSchema.safeParse(payload);
|
|
183
|
+
expect(result.success).toBe(true);
|
|
184
|
+
if (result.success) {
|
|
185
|
+
expect(result.data.name).toBe(payload.name);
|
|
186
|
+
expect(result.data.handle).toBe(payload.handle);
|
|
187
|
+
expect(result.data.supportEmail).toBe(payload.supportEmail);
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
test('should parse update with only name', () => {
|
|
191
|
+
const payload = {
|
|
192
|
+
name: 'Only Name',
|
|
193
|
+
};
|
|
194
|
+
const result = UpdateTenantPayloadSchema.safeParse(payload);
|
|
195
|
+
expect(result.success).toBe(true);
|
|
196
|
+
if (result.success) {
|
|
197
|
+
expect(result.data.name).toBe(payload.name);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
test('should parse update with only handle', () => {
|
|
201
|
+
const payload = {
|
|
202
|
+
handle: 'new-handle',
|
|
203
|
+
};
|
|
204
|
+
const result = UpdateTenantPayloadSchema.safeParse(payload);
|
|
205
|
+
expect(result.success).toBe(true);
|
|
206
|
+
if (result.success) {
|
|
207
|
+
expect(result.data.handle).toBe(payload.handle);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
test('should parse update with only supportEmail', () => {
|
|
211
|
+
const payload = {
|
|
212
|
+
supportEmail: 'new@example.com',
|
|
213
|
+
};
|
|
214
|
+
const result = UpdateTenantPayloadSchema.safeParse(payload);
|
|
215
|
+
expect(result.success).toBe(true);
|
|
216
|
+
if (result.success) {
|
|
217
|
+
expect(result.data.supportEmail).toBe(payload.supportEmail);
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
test('should reject invalid supportEmail in update', () => {
|
|
221
|
+
const payload = {
|
|
222
|
+
supportEmail: 'invalid-email-format',
|
|
223
|
+
};
|
|
224
|
+
const result = UpdateTenantPayloadSchema.safeParse(payload);
|
|
225
|
+
expect(result.success).toBe(false);
|
|
226
|
+
});
|
|
227
|
+
test('should parse empty update payload', () => {
|
|
228
|
+
const payload = {};
|
|
229
|
+
const result = UpdateTenantPayloadSchema.safeParse(payload);
|
|
230
|
+
expect(result.success).toBe(true);
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
});
|
|
@@ -1,62 +1,76 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
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
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
createdAt:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
export type
|
|
32
|
-
export declare const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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 UserNotificationSchema: z.ZodObject<{
|
|
14
|
+
metadata: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodMap<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<import("../../../common/schema/metadata.js").MetadataMap, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../../common/schema/metadata.js").MetadataMap, import("../../../common/schema/metadata.js").MetadataMap | undefined>>;
|
|
15
|
+
deactivatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>;
|
|
16
|
+
deletedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>;
|
|
17
|
+
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
18
|
+
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
19
|
+
type: z.ZodEnum<{
|
|
20
|
+
info: "info";
|
|
21
|
+
import: "import";
|
|
22
|
+
}>;
|
|
23
|
+
action: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
24
|
+
link: z.ZodURL;
|
|
25
|
+
label: z.ZodString;
|
|
26
|
+
}, z.core.$strip>, z.ZodUndefined]>>;
|
|
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 UserNotificationProperties = z.input<typeof UserNotificationSchema>;
|
|
32
|
+
export type UserNotification = z.output<typeof UserNotificationSchema>;
|
|
33
|
+
export declare const UserNotificationPayloadSchema: z.ZodObject<{
|
|
34
|
+
metadata: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodMap<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<import("../../../common/schema/metadata.js").MetadataRecord, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../../common/schema/metadata.js").MetadataRecord | undefined, import("../../../common/schema/metadata.js").MetadataRecord | undefined>>;
|
|
35
|
+
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>>>;
|
|
36
|
+
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>>>;
|
|
37
|
+
updatedAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
38
|
+
createdAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
39
|
+
type: z.ZodEnum<{
|
|
40
|
+
info: "info";
|
|
41
|
+
import: "import";
|
|
42
|
+
}>;
|
|
43
|
+
action: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
44
|
+
link: z.ZodURL;
|
|
45
|
+
label: z.ZodString;
|
|
46
|
+
}, z.core.$strip>, z.ZodUndefined]>>;
|
|
47
|
+
title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
48
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export type UserNotificationPayload = z.output<typeof UserNotificationPayloadSchema>;
|
|
52
|
+
export declare const InsertUserNotificationPayloadSchema: z.ZodObject<{
|
|
53
|
+
metadata: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodMap<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<import("../../../common/schema/metadata.js").MetadataRecord, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../../common/schema/metadata.js").MetadataRecord | null | undefined, import("../../../common/schema/metadata.js").MetadataRecord | undefined>>;
|
|
54
|
+
title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
55
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
56
|
+
id: z.ZodDefault<z.ZodString>;
|
|
57
|
+
type: z.ZodEnum<{
|
|
58
|
+
info: "info";
|
|
59
|
+
}>;
|
|
60
|
+
action: z.ZodOptional<z.ZodObject<{
|
|
61
|
+
link: z.ZodURL;
|
|
62
|
+
label: z.ZodString;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
export type InsertUserNotificationPayload = z.output<typeof InsertUserNotificationPayloadSchema>;
|
|
66
|
+
export declare const UpdateUserNotificationPayloadSchema: z.ZodObject<{
|
|
67
|
+
metadata: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodMap<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<import("../../../common/schema/metadata.js").MetadataRecord, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../../common/schema/metadata.js").MetadataRecord | null | undefined, import("../../../common/schema/metadata.js").MetadataRecord | undefined>>;
|
|
68
|
+
action: z.ZodOptional<z.ZodObject<{
|
|
69
|
+
link: z.ZodURL;
|
|
70
|
+
label: z.ZodString;
|
|
71
|
+
}, z.core.$strip>>;
|
|
72
|
+
title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
73
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export type UpdateUserNotificationPayload = z.output<typeof UpdateUserNotificationPayloadSchema>;
|
|
62
76
|
//# 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,KAAK,CAAC,MAAM,QAAQ,CAAC;AAmB5B,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,sBAAsB;;;;;;;;;;;;;;;;;iBAUjC,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAChF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEvE,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"}
|