@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,34 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DeactivatedAtPropertyPayloadSchema = exports.DeletedAtPropertyPayloadSchema = exports.UpdatedAtPropertyPayloadSchema = exports.CreatedAtPropertyPayloadSchema = exports.OptionalDatePayloadSchema = exports.RequiredDatePayloadSchema = exports.OptionalDateSchema = exports.RequiredDateSchema = void 0;
|
|
4
|
-
const
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
5
|
// Normalizing to a Date object
|
|
6
|
-
exports.RequiredDateSchema =
|
|
7
|
-
|
|
6
|
+
exports.RequiredDateSchema = zod_1.z.union([
|
|
7
|
+
zod_1.z.date(),
|
|
8
|
+
zod_1.z
|
|
9
|
+
.string()
|
|
10
|
+
.datetime()
|
|
11
|
+
.transform((str) => new Date(str)),
|
|
12
|
+
]);
|
|
13
|
+
exports.OptionalDateSchema = exports.RequiredDateSchema.optional();
|
|
8
14
|
// What the class property is serialized to
|
|
9
|
-
exports.RequiredDatePayloadSchema = exports.RequiredDateSchema.
|
|
10
|
-
exports.OptionalDatePayloadSchema = exports.OptionalDateSchema.
|
|
15
|
+
exports.RequiredDatePayloadSchema = exports.RequiredDateSchema.transform((d) => d.toISOString());
|
|
16
|
+
exports.OptionalDatePayloadSchema = exports.OptionalDateSchema.transform((d) => d?.toISOString());
|
|
11
17
|
/**
|
|
12
18
|
* Created At
|
|
13
19
|
*/
|
|
14
|
-
exports.CreatedAtPropertyPayloadSchema =
|
|
20
|
+
exports.CreatedAtPropertyPayloadSchema = zod_1.z.object({
|
|
15
21
|
createdAt: exports.RequiredDatePayloadSchema,
|
|
16
22
|
});
|
|
17
23
|
/**
|
|
18
24
|
* Updated At
|
|
19
25
|
*/
|
|
20
|
-
exports.UpdatedAtPropertyPayloadSchema =
|
|
26
|
+
exports.UpdatedAtPropertyPayloadSchema = zod_1.z.object({
|
|
21
27
|
updatedAt: exports.RequiredDatePayloadSchema,
|
|
22
28
|
});
|
|
23
29
|
/**
|
|
24
30
|
* Deleted At
|
|
25
31
|
*/
|
|
26
|
-
exports.DeletedAtPropertyPayloadSchema =
|
|
27
|
-
|
|
32
|
+
exports.DeletedAtPropertyPayloadSchema = zod_1.z.object({
|
|
33
|
+
deletedAt: exports.OptionalDatePayloadSchema,
|
|
28
34
|
});
|
|
29
35
|
/**
|
|
30
36
|
* Deactivated At
|
|
31
37
|
*/
|
|
32
|
-
exports.DeactivatedAtPropertyPayloadSchema =
|
|
33
|
-
|
|
38
|
+
exports.DeactivatedAtPropertyPayloadSchema = zod_1.z.object({
|
|
39
|
+
deactivatedAt: exports.OptionalDatePayloadSchema,
|
|
34
40
|
});
|
|
@@ -1,33 +1,44 @@
|
|
|
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 dates_js_1 = require("./dates.js");
|
|
6
5
|
(0, vitest_1.describe)('Common - Dates', () => {
|
|
7
6
|
(0, vitest_1.describe)('Date Schema', () => {
|
|
8
7
|
(0, vitest_1.test)('should accept an iso string', async () => {
|
|
9
|
-
const result =
|
|
10
|
-
|
|
11
|
-
(0, vitest_1.expect)(result).
|
|
8
|
+
const result = dates_js_1.RequiredDateSchema.safeParse(new Date().toISOString());
|
|
9
|
+
// Parse succeeds for valid data
|
|
10
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
11
|
+
if (result.success) {
|
|
12
|
+
(0, vitest_1.expect)(result.data).toBeInstanceOf(Date);
|
|
13
|
+
}
|
|
12
14
|
});
|
|
13
15
|
(0, vitest_1.test)('should accept a Date object', async () => {
|
|
14
|
-
const result =
|
|
15
|
-
|
|
16
|
-
(0, vitest_1.expect)(result).
|
|
16
|
+
const result = dates_js_1.RequiredDateSchema.safeParse(new Date());
|
|
17
|
+
// Parse succeeds for valid data
|
|
18
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
19
|
+
if (result.success) {
|
|
20
|
+
(0, vitest_1.expect)(result.data).toBeInstanceOf(Date);
|
|
21
|
+
}
|
|
17
22
|
});
|
|
18
23
|
});
|
|
19
24
|
(0, vitest_1.describe)('Payload Schema', () => {
|
|
20
25
|
(0, vitest_1.test)('should parse a Date to an ISO string', async () => {
|
|
21
26
|
const iso = new Date().toISOString();
|
|
22
|
-
const result =
|
|
23
|
-
|
|
24
|
-
(0, vitest_1.expect)(result).
|
|
27
|
+
const result = dates_js_1.RequiredDatePayloadSchema.safeParse(new Date(iso));
|
|
28
|
+
// Parse succeeds for valid data
|
|
29
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
30
|
+
if (result.success) {
|
|
31
|
+
(0, vitest_1.expect)(result.data).toBe(iso);
|
|
32
|
+
}
|
|
25
33
|
});
|
|
26
34
|
(0, vitest_1.test)('should parse an ISO to an ISO string', async () => {
|
|
27
35
|
const iso = new Date().toISOString();
|
|
28
|
-
const result =
|
|
29
|
-
|
|
30
|
-
(0, vitest_1.expect)(result).
|
|
36
|
+
const result = dates_js_1.RequiredDatePayloadSchema.safeParse(iso);
|
|
37
|
+
// Parse succeeds for valid data
|
|
38
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
39
|
+
if (result.success) {
|
|
40
|
+
(0, vitest_1.expect)(result.data).toBe(iso);
|
|
41
|
+
}
|
|
31
42
|
});
|
|
32
43
|
});
|
|
33
44
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/id.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,gBACmB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.KSUIDSchema = void 0;
|
|
4
|
-
const
|
|
5
|
-
const KSUIDSchema = (prefix) => (
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const KSUIDSchema = (prefix) => zod_1.z.string().regex(new RegExp(`^${prefix}_[A-Za-z0-9]{27}$`));
|
|
6
6
|
exports.KSUIDSchema = KSUIDSchema;
|
|
@@ -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 id_js_1 = require("./id.js");
|
|
6
5
|
(0, vitest_1.describe)('Common Schema - ID', () => {
|
|
@@ -8,8 +7,11 @@ const id_js_1 = require("./id.js");
|
|
|
8
7
|
(0, vitest_1.test)('should accept valid KSUID with correct prefix', () => {
|
|
9
8
|
const schema = (0, id_js_1.KSUIDSchema)('usr');
|
|
10
9
|
const validId = 'usr_123456789012345678901234567';
|
|
11
|
-
const result = schema(validId);
|
|
12
|
-
(0, vitest_1.expect)(result).toBe(
|
|
10
|
+
const result = schema.safeParse(validId);
|
|
11
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
12
|
+
if (result.success) {
|
|
13
|
+
(0, vitest_1.expect)(result.data).toBe(validId);
|
|
14
|
+
}
|
|
13
15
|
});
|
|
14
16
|
(0, vitest_1.test)('should accept KSUID with different prefixes', () => {
|
|
15
17
|
const userSchema = (0, id_js_1.KSUIDSchema)('usr');
|
|
@@ -18,87 +20,109 @@ const id_js_1 = require("./id.js");
|
|
|
18
20
|
const userId = 'usr_abcdefghijklmnopqrstuvwxy12';
|
|
19
21
|
const appId = 'app_1234567890ABCDEFGHIJKLMNOP1';
|
|
20
22
|
const activityId = 'act_abcDEF123456789012345678901';
|
|
21
|
-
|
|
22
|
-
(0, vitest_1.expect)(
|
|
23
|
-
|
|
23
|
+
const userResult = userSchema.safeParse(userId);
|
|
24
|
+
(0, vitest_1.expect)(userResult.success).toBe(true);
|
|
25
|
+
if (userResult.success)
|
|
26
|
+
(0, vitest_1.expect)(userResult.data).toBe(userId);
|
|
27
|
+
const appResult = appSchema.safeParse(appId);
|
|
28
|
+
(0, vitest_1.expect)(appResult.success).toBe(true);
|
|
29
|
+
if (appResult.success)
|
|
30
|
+
(0, vitest_1.expect)(appResult.data).toBe(appId);
|
|
31
|
+
const activityResult = activitySchema.safeParse(activityId);
|
|
32
|
+
(0, vitest_1.expect)(activityResult.success).toBe(true);
|
|
33
|
+
if (activityResult.success)
|
|
34
|
+
(0, vitest_1.expect)(activityResult.data).toBe(activityId);
|
|
24
35
|
});
|
|
25
36
|
(0, vitest_1.test)('should accept KSUID with mixed alphanumeric characters', () => {
|
|
26
37
|
const schema = (0, id_js_1.KSUIDSchema)('test');
|
|
27
38
|
const mixedId = 'test_1a2B3c4D5e6F7g8H9i0JkLmNoPq';
|
|
28
|
-
const result = schema(mixedId);
|
|
29
|
-
(0, vitest_1.expect)(result).toBe(
|
|
39
|
+
const result = schema.safeParse(mixedId);
|
|
40
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
41
|
+
if (result.success) {
|
|
42
|
+
(0, vitest_1.expect)(result.data).toBe(mixedId);
|
|
43
|
+
}
|
|
30
44
|
});
|
|
31
45
|
(0, vitest_1.test)('should reject KSUID with wrong prefix', () => {
|
|
32
46
|
const schema = (0, id_js_1.KSUIDSchema)('usr');
|
|
33
47
|
const wrongPrefixId = 'app_123456789012345678901234567';
|
|
34
|
-
const result = schema(wrongPrefixId);
|
|
35
|
-
(0, vitest_1.expect)(result).
|
|
48
|
+
const result = schema.safeParse(wrongPrefixId);
|
|
49
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
36
50
|
});
|
|
37
51
|
(0, vitest_1.test)('should reject KSUID with missing prefix', () => {
|
|
38
52
|
const schema = (0, id_js_1.KSUIDSchema)('usr');
|
|
39
53
|
const noPrefixId = '123456789012345678901234567';
|
|
40
|
-
const result = schema(noPrefixId);
|
|
41
|
-
(0, vitest_1.expect)(result).
|
|
54
|
+
const result = schema.safeParse(noPrefixId);
|
|
55
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
42
56
|
});
|
|
43
57
|
(0, vitest_1.test)('should reject KSUID with missing underscore', () => {
|
|
44
58
|
const schema = (0, id_js_1.KSUIDSchema)('usr');
|
|
45
59
|
const noUnderscoreId = 'usr123456789012345678901234567';
|
|
46
|
-
const result = schema(noUnderscoreId);
|
|
47
|
-
(0, vitest_1.expect)(result).
|
|
60
|
+
const result = schema.safeParse(noUnderscoreId);
|
|
61
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
48
62
|
});
|
|
49
63
|
(0, vitest_1.test)('should reject KSUID with incorrect suffix length (too short)', () => {
|
|
50
64
|
const schema = (0, id_js_1.KSUIDSchema)('usr');
|
|
51
65
|
const shortId = 'usr_12345678901234567890123456';
|
|
52
|
-
const result = schema(shortId);
|
|
53
|
-
(0, vitest_1.expect)(result).
|
|
66
|
+
const result = schema.safeParse(shortId);
|
|
67
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
54
68
|
});
|
|
55
69
|
(0, vitest_1.test)('should reject KSUID with incorrect suffix length (too long)', () => {
|
|
56
70
|
const schema = (0, id_js_1.KSUIDSchema)('usr');
|
|
57
71
|
const longId = 'usr_1234567890123456789012345678';
|
|
58
|
-
const result = schema(longId);
|
|
59
|
-
(0, vitest_1.expect)(result).
|
|
72
|
+
const result = schema.safeParse(longId);
|
|
73
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
60
74
|
});
|
|
61
75
|
(0, vitest_1.test)('should reject KSUID with invalid characters in suffix', () => {
|
|
62
76
|
const schema = (0, id_js_1.KSUIDSchema)('usr');
|
|
63
77
|
const invalidCharsId = 'usr_123456789012345678901234_*';
|
|
64
|
-
const result = schema(invalidCharsId);
|
|
65
|
-
(0, vitest_1.expect)(result).
|
|
78
|
+
const result = schema.safeParse(invalidCharsId);
|
|
79
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
66
80
|
});
|
|
67
81
|
(0, vitest_1.test)('should reject KSUID with special characters in suffix', () => {
|
|
68
82
|
const schema = (0, id_js_1.KSUIDSchema)('usr');
|
|
69
83
|
const specialCharsId = 'usr_12345678901234567890123456@';
|
|
70
|
-
const result = schema(specialCharsId);
|
|
71
|
-
(0, vitest_1.expect)(result).
|
|
84
|
+
const result = schema.safeParse(specialCharsId);
|
|
85
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
72
86
|
});
|
|
73
87
|
(0, vitest_1.test)('should reject KSUID with spaces', () => {
|
|
74
88
|
const schema = (0, id_js_1.KSUIDSchema)('usr');
|
|
75
89
|
const spaceId = 'usr_1234567890123456789012345 7';
|
|
76
|
-
const result = schema(spaceId);
|
|
77
|
-
(0, vitest_1.expect)(result).
|
|
90
|
+
const result = schema.safeParse(spaceId);
|
|
91
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
78
92
|
});
|
|
79
93
|
(0, vitest_1.test)('should reject empty string', () => {
|
|
80
94
|
const schema = (0, id_js_1.KSUIDSchema)('usr');
|
|
81
|
-
const result = schema('');
|
|
82
|
-
(0, vitest_1.expect)(result).
|
|
95
|
+
const result = schema.safeParse('');
|
|
96
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
83
97
|
});
|
|
84
98
|
(0, vitest_1.test)('should reject non-string values', () => {
|
|
85
99
|
const schema = (0, id_js_1.KSUIDSchema)('usr');
|
|
86
|
-
|
|
87
|
-
(0, vitest_1.expect)(
|
|
88
|
-
|
|
89
|
-
(0, vitest_1.expect)(
|
|
100
|
+
const result1 = schema.safeParse(123);
|
|
101
|
+
(0, vitest_1.expect)(result1.success).toBe(false);
|
|
102
|
+
const result2 = schema.safeParse(null);
|
|
103
|
+
(0, vitest_1.expect)(result2.success).toBe(false);
|
|
104
|
+
const result3 = schema.safeParse(undefined);
|
|
105
|
+
(0, vitest_1.expect)(result3.success).toBe(false);
|
|
106
|
+
const result4 = schema.safeParse({});
|
|
107
|
+
(0, vitest_1.expect)(result4.success).toBe(false);
|
|
90
108
|
});
|
|
91
109
|
(0, vitest_1.test)('should work with complex prefixes', () => {
|
|
92
110
|
const complexSchema = (0, id_js_1.KSUIDSchema)('app_config');
|
|
93
111
|
const validComplexId = 'app_config_123456789012345678901234567';
|
|
94
|
-
const result = complexSchema(validComplexId);
|
|
95
|
-
(0, vitest_1.expect)(result).toBe(
|
|
112
|
+
const result = complexSchema.safeParse(validComplexId);
|
|
113
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
114
|
+
if (result.success) {
|
|
115
|
+
(0, vitest_1.expect)(result.data).toBe(validComplexId);
|
|
116
|
+
}
|
|
96
117
|
});
|
|
97
118
|
(0, vitest_1.test)('should work with single character prefix', () => {
|
|
98
119
|
const singleCharSchema = (0, id_js_1.KSUIDSchema)('a');
|
|
99
120
|
const validSingleCharId = 'a_123456789012345678901234567';
|
|
100
|
-
const result = singleCharSchema(validSingleCharId);
|
|
101
|
-
(0, vitest_1.expect)(result).toBe(
|
|
121
|
+
const result = singleCharSchema.safeParse(validSingleCharId);
|
|
122
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
123
|
+
if (result.success) {
|
|
124
|
+
(0, vitest_1.expect)(result.data).toBe(validSingleCharId);
|
|
125
|
+
}
|
|
102
126
|
});
|
|
103
127
|
(0, vitest_1.test)('should create different schemas for different prefixes', () => {
|
|
104
128
|
const userSchema = (0, id_js_1.KSUIDSchema)('usr');
|
|
@@ -106,11 +130,19 @@ const id_js_1 = require("./id.js");
|
|
|
106
130
|
const userId = 'usr_123456789012345678901234567';
|
|
107
131
|
const orgId = 'org_123456789012345678901234567';
|
|
108
132
|
// User schema should accept user ID but reject org ID
|
|
109
|
-
|
|
110
|
-
(0, vitest_1.expect)(
|
|
133
|
+
const userResult = userSchema.safeParse(userId);
|
|
134
|
+
(0, vitest_1.expect)(userResult.success).toBe(true);
|
|
135
|
+
if (userResult.success)
|
|
136
|
+
(0, vitest_1.expect)(userResult.data).toBe(userId);
|
|
137
|
+
const userOrgResult = userSchema.safeParse(orgId);
|
|
138
|
+
(0, vitest_1.expect)(userOrgResult.success).toBe(false);
|
|
111
139
|
// Org schema should accept org ID but reject user ID
|
|
112
|
-
|
|
113
|
-
(0, vitest_1.expect)(
|
|
140
|
+
const orgResult = orgSchema.safeParse(orgId);
|
|
141
|
+
(0, vitest_1.expect)(orgResult.success).toBe(true);
|
|
142
|
+
if (orgResult.success)
|
|
143
|
+
(0, vitest_1.expect)(orgResult.data).toBe(orgId);
|
|
144
|
+
const orgUserResult = orgSchema.safeParse(userId);
|
|
145
|
+
(0, vitest_1.expect)(orgUserResult.success).toBe(false);
|
|
114
146
|
});
|
|
115
147
|
});
|
|
116
148
|
});
|
|
@@ -1,21 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
/**
|
|
2
3
|
* Ref: https://datatracker.ietf.org/doc/html/rfc7518#section-3.1
|
|
3
4
|
*/
|
|
4
5
|
export declare const Algorithm: {
|
|
5
|
-
DEFAULT:
|
|
6
|
-
HS256:
|
|
7
|
-
HS384:
|
|
8
|
-
HS512:
|
|
9
|
-
RS256:
|
|
10
|
-
RS384:
|
|
11
|
-
RS512:
|
|
12
|
-
ES256:
|
|
13
|
-
ES384:
|
|
14
|
-
ES512:
|
|
15
|
-
PS256:
|
|
16
|
-
PS384:
|
|
17
|
-
PS512:
|
|
6
|
+
readonly DEFAULT: "RS256";
|
|
7
|
+
readonly HS256: "HS256";
|
|
8
|
+
readonly HS384: "HS384";
|
|
9
|
+
readonly HS512: "HS512";
|
|
10
|
+
readonly RS256: "RS256";
|
|
11
|
+
readonly RS384: "RS384";
|
|
12
|
+
readonly RS512: "RS512";
|
|
13
|
+
readonly ES256: "ES256";
|
|
14
|
+
readonly ES384: "ES384";
|
|
15
|
+
readonly ES512: "ES512";
|
|
16
|
+
readonly PS256: "PS256";
|
|
17
|
+
readonly PS384: "PS384";
|
|
18
|
+
readonly PS512: "PS512";
|
|
18
19
|
};
|
|
19
20
|
export type AnyAlgorithm = (typeof Algorithm)[keyof typeof Algorithm];
|
|
20
|
-
export declare const AlgorithmSchema:
|
|
21
|
+
export declare const AlgorithmSchema: z.ZodEnum<{
|
|
22
|
+
RS256: "RS256";
|
|
23
|
+
HS256: "HS256";
|
|
24
|
+
HS384: "HS384";
|
|
25
|
+
HS512: "HS512";
|
|
26
|
+
RS384: "RS384";
|
|
27
|
+
RS512: "RS512";
|
|
28
|
+
ES256: "ES256";
|
|
29
|
+
ES384: "ES384";
|
|
30
|
+
PS256: "PS256";
|
|
31
|
+
PS384: "PS384";
|
|
32
|
+
PS512: "PS512";
|
|
33
|
+
}>;
|
|
21
34
|
//# sourceMappingURL=jwt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/jwt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/jwt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;CAeZ,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEtE,eAAO,MAAM,eAAe;;;;;;;;;;;;EAYjB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AlgorithmSchema = exports.Algorithm = void 0;
|
|
4
|
-
const
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
5
|
/**
|
|
6
6
|
* Ref: https://datatracker.ietf.org/doc/html/rfc7518#section-3.1
|
|
7
7
|
*/
|
|
@@ -21,4 +21,16 @@ exports.Algorithm = {
|
|
|
21
21
|
PS384: 'PS384',
|
|
22
22
|
PS512: 'PS512',
|
|
23
23
|
};
|
|
24
|
-
exports.AlgorithmSchema =
|
|
24
|
+
exports.AlgorithmSchema = zod_1.z.enum([
|
|
25
|
+
exports.Algorithm.HS256,
|
|
26
|
+
exports.Algorithm.HS384,
|
|
27
|
+
exports.Algorithm.HS512,
|
|
28
|
+
exports.Algorithm.RS256,
|
|
29
|
+
exports.Algorithm.RS384,
|
|
30
|
+
exports.Algorithm.RS512,
|
|
31
|
+
exports.Algorithm.ES256,
|
|
32
|
+
exports.Algorithm.ES384,
|
|
33
|
+
exports.Algorithm.PS256,
|
|
34
|
+
exports.Algorithm.PS384,
|
|
35
|
+
exports.Algorithm.PS512,
|
|
36
|
+
]);
|
|
@@ -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 jwt_js_1 = require("./jwt.js");
|
|
6
5
|
(0, vitest_1.describe)('Common Schema - JWT', () => {
|
|
@@ -23,34 +22,41 @@ const jwt_js_1 = require("./jwt.js");
|
|
|
23
22
|
});
|
|
24
23
|
(0, vitest_1.describe)('AlgorithmSchema', () => {
|
|
25
24
|
(0, vitest_1.test)('should accept valid HMAC algorithms', () => {
|
|
26
|
-
(0, vitest_1.expect)(
|
|
27
|
-
(0, vitest_1.expect)(
|
|
28
|
-
(0, vitest_1.expect)(
|
|
25
|
+
(0, vitest_1.expect)(jwt_js_1.AlgorithmSchema.safeParse('HS256').success).toBe(true);
|
|
26
|
+
(0, vitest_1.expect)(jwt_js_1.AlgorithmSchema.safeParse('HS384').success).toBe(true);
|
|
27
|
+
(0, vitest_1.expect)(jwt_js_1.AlgorithmSchema.safeParse('HS512').success).toBe(true);
|
|
29
28
|
});
|
|
30
29
|
(0, vitest_1.test)('should accept valid RSA algorithms', () => {
|
|
31
|
-
(0, vitest_1.expect)(
|
|
32
|
-
(0, vitest_1.expect)(
|
|
33
|
-
(0, vitest_1.expect)(
|
|
30
|
+
(0, vitest_1.expect)(jwt_js_1.AlgorithmSchema.safeParse('RS256').success).toBe(true);
|
|
31
|
+
(0, vitest_1.expect)(jwt_js_1.AlgorithmSchema.safeParse('RS384').success).toBe(true);
|
|
32
|
+
(0, vitest_1.expect)(jwt_js_1.AlgorithmSchema.safeParse('RS512').success).toBe(true);
|
|
34
33
|
});
|
|
35
34
|
(0, vitest_1.test)('should accept valid ECDSA algorithms', () => {
|
|
36
|
-
(0, vitest_1.expect)(
|
|
37
|
-
(0, vitest_1.expect)(
|
|
35
|
+
(0, vitest_1.expect)(jwt_js_1.AlgorithmSchema.safeParse('ES256').success).toBe(true);
|
|
36
|
+
(0, vitest_1.expect)(jwt_js_1.AlgorithmSchema.safeParse('ES384').success).toBe(true);
|
|
38
37
|
});
|
|
39
38
|
(0, vitest_1.test)('should accept valid PSS algorithms', () => {
|
|
40
|
-
(0, vitest_1.expect)(
|
|
41
|
-
(0, vitest_1.expect)(
|
|
42
|
-
(0, vitest_1.expect)(
|
|
39
|
+
(0, vitest_1.expect)(jwt_js_1.AlgorithmSchema.safeParse('PS256').success).toBe(true);
|
|
40
|
+
(0, vitest_1.expect)(jwt_js_1.AlgorithmSchema.safeParse('PS384').success).toBe(true);
|
|
41
|
+
(0, vitest_1.expect)(jwt_js_1.AlgorithmSchema.safeParse('PS512').success).toBe(true);
|
|
43
42
|
});
|
|
44
43
|
(0, vitest_1.test)('should reject invalid algorithms', () => {
|
|
45
|
-
|
|
46
|
-
(0, vitest_1.expect)(
|
|
47
|
-
|
|
48
|
-
(0, vitest_1.expect)(
|
|
44
|
+
const result1 = jwt_js_1.AlgorithmSchema.safeParse('INVALID');
|
|
45
|
+
(0, vitest_1.expect)(result1.success).toBe(false);
|
|
46
|
+
const result2 = jwt_js_1.AlgorithmSchema.safeParse('HS128');
|
|
47
|
+
(0, vitest_1.expect)(result2.success).toBe(false);
|
|
48
|
+
const result3 = jwt_js_1.AlgorithmSchema.safeParse('RS128');
|
|
49
|
+
(0, vitest_1.expect)(result3.success).toBe(false);
|
|
50
|
+
const result4 = jwt_js_1.AlgorithmSchema.safeParse('');
|
|
51
|
+
(0, vitest_1.expect)(result4.success).toBe(false);
|
|
49
52
|
});
|
|
50
53
|
(0, vitest_1.test)('should reject non-string values', () => {
|
|
51
|
-
|
|
52
|
-
(0, vitest_1.expect)(
|
|
53
|
-
|
|
54
|
+
const result1 = jwt_js_1.AlgorithmSchema.safeParse(123);
|
|
55
|
+
(0, vitest_1.expect)(result1.success).toBe(false);
|
|
56
|
+
const result2 = jwt_js_1.AlgorithmSchema.safeParse(null);
|
|
57
|
+
(0, vitest_1.expect)(result2.success).toBe(false);
|
|
58
|
+
const result3 = jwt_js_1.AlgorithmSchema.safeParse(undefined);
|
|
59
|
+
(0, vitest_1.expect)(result3.success).toBe(false);
|
|
54
60
|
});
|
|
55
61
|
});
|
|
56
62
|
});
|
|
@@ -1,55 +1,38 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
/**
|
|
2
3
|
* Value
|
|
3
4
|
*/
|
|
4
|
-
export declare const MetadataValueSchema:
|
|
5
|
+
export declare const MetadataValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
5
6
|
/**
|
|
6
7
|
* Record
|
|
7
8
|
*/
|
|
8
|
-
declare const MetadataRecordSchema:
|
|
9
|
-
|
|
10
|
-
}, {}>;
|
|
11
|
-
export type MetadataRecord = typeof MetadataRecordSchema.inferOut;
|
|
9
|
+
declare const MetadataRecordSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
10
|
+
export type MetadataRecord = z.output<typeof MetadataRecordSchema>;
|
|
12
11
|
/**
|
|
13
12
|
* Map
|
|
14
13
|
*/
|
|
15
|
-
declare const MetadataMapSchema:
|
|
16
|
-
export type MetadataMap = typeof MetadataMapSchema
|
|
17
|
-
export declare const MetadataPayloadSchema:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
export type
|
|
23
|
-
export declare const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export type
|
|
31
|
-
export declare const UpsertMetadataPayloadSchema: import("arktype/out/methods/object").ObjectType<(In: {
|
|
32
|
-
[x: string]: string | number | boolean;
|
|
33
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
34
|
-
[x: string]: string | number | boolean;
|
|
35
|
-
} | null>, {}>;
|
|
36
|
-
export type UpsertMetadataInput = typeof UpsertMetadataPayloadSchema.inferIn;
|
|
37
|
-
export type UpsertMetadataPayload = typeof UpsertMetadataPayloadSchema.inferOut;
|
|
38
|
-
export declare const UpsertMetadataPropertyPayloadSchema: import("arktype/out/methods/object").ObjectType<{
|
|
39
|
-
metadata?: ((In: {
|
|
40
|
-
[x: string]: string | number | boolean;
|
|
41
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
42
|
-
[x: string]: string | number | boolean;
|
|
43
|
-
} | null>) | undefined;
|
|
44
|
-
}, {}>;
|
|
45
|
-
export type UpsertMetadataPropertyInput = typeof UpsertMetadataPropertyPayloadSchema.inferIn;
|
|
46
|
-
export type UpsertMetadataPropertyPayload = typeof UpsertMetadataPropertyPayloadSchema.inferOut;
|
|
14
|
+
declare const MetadataMapSchema: z.ZodCustom<Map<string, string | number | boolean>, Map<string, string | number | boolean>>;
|
|
15
|
+
export type MetadataMap = z.output<typeof MetadataMapSchema>;
|
|
16
|
+
export declare const MetadataPayloadSchema: 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>>;
|
|
17
|
+
export type MetadataPayload = z.output<typeof MetadataPayloadSchema>;
|
|
18
|
+
export declare const MetadataPayloadPropertySchema: z.ZodObject<{
|
|
19
|
+
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>>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export type MetadataPayloadProperty = z.output<typeof MetadataPayloadPropertySchema>;
|
|
22
|
+
export declare const UpsertMetadataPayloadSchema: 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>>;
|
|
23
|
+
export type UpsertMetadataInput = z.input<typeof UpsertMetadataPayloadSchema>;
|
|
24
|
+
export type UpsertMetadataPayload = z.output<typeof UpsertMetadataPayloadSchema>;
|
|
25
|
+
export declare const UpsertMetadataPropertyPayloadSchema: z.ZodObject<{
|
|
26
|
+
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>>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type UpsertMetadataPropertyInput = z.input<typeof UpsertMetadataPropertyPayloadSchema>;
|
|
29
|
+
export type UpsertMetadataPropertyPayload = z.output<typeof UpsertMetadataPropertyPayloadSchema>;
|
|
47
30
|
export declare function buildMetadataPayload(map: MetadataMap | MetadataRecord): MetadataRecord | undefined;
|
|
48
31
|
export declare function buildUpsertMetadataPayload(map: MetadataMap | MetadataRecord): MetadataRecord | null;
|
|
49
32
|
export declare function buildUpsertMetadataPayloadFromIterable(metadata: Iterable<[string, string | number | boolean]> | null): MetadataRecord | null;
|
|
50
|
-
export declare const MetadataMapPropertySchema:
|
|
51
|
-
metadata:
|
|
52
|
-
},
|
|
53
|
-
export type MetadataMapProperty = typeof MetadataMapPropertySchema
|
|
33
|
+
export declare const MetadataMapPropertySchema: z.ZodObject<{
|
|
34
|
+
metadata: z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodCustom<Map<string, string | number | boolean>, Map<string, string | number | boolean>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<Map<string, string | number | boolean>, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type MetadataMapProperty = z.output<typeof MetadataMapPropertySchema>;
|
|
54
37
|
export {};
|
|
55
38
|
//# sourceMappingURL=metadata.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/metadata.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,mBAAmB,+DAI9B,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,oBAAoB,yFAA4C,CAAC;AACvE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEnE;;GAEG;AACH,QAAA,MAAM,iBAAiB,6FAEtB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAuB7D,eAAO,MAAM,qBAAqB,iaAK9B,CAAC;AACL,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAErE,eAAO,MAAM,6BAA6B;;iBAExC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAC5C,OAAO,6BAA6B,CACrC,CAAC;AAEF,eAAO,MAAM,2BAA2B,waAOpC,CAAC;AACL,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAC1C,OAAO,2BAA2B,CACnC,CAAC;AAEF,eAAO,MAAM,mCAAmC;;iBAE9C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,mCAAmC,CAC3C,CAAC;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAClD,OAAO,mCAAmC,CAC3C,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,WAAW,GAAG,cAAc,GAChC,cAAc,GAAG,SAAS,CAgB5B;AAED,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,WAAW,GAAG,cAAc,GAChC,cAAc,GAAG,IAAI,CAMvB;AAED,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,GAC7D,cAAc,GAAG,IAAI,CAgBvB;AASD,eAAO,MAAM,yBAAyB;;iBAEpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|