@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,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const arktype_1 = require("arktype");
|
|
4
3
|
const vitest_1 = require("vitest");
|
|
5
4
|
const schema_js_1 = require("../../customer/schema.js");
|
|
6
5
|
const schema_js_2 = require("./schema.js");
|
|
@@ -22,8 +21,8 @@ const utils_js_1 = require("./utils.js");
|
|
|
22
21
|
updatedAt: new Date(),
|
|
23
22
|
metadata: {},
|
|
24
23
|
};
|
|
25
|
-
const result =
|
|
26
|
-
|
|
24
|
+
const result = schema_js_2.ActivitySchema.safeParse(activity);
|
|
25
|
+
// Parse succeeds for valid data
|
|
27
26
|
});
|
|
28
27
|
(0, vitest_1.test)('should accept authentication activity', () => {
|
|
29
28
|
const activity = {
|
|
@@ -42,8 +41,8 @@ const utils_js_1 = require("./utils.js");
|
|
|
42
41
|
updatedAt: new Date(),
|
|
43
42
|
metadata: { method: 'email' },
|
|
44
43
|
};
|
|
45
|
-
const result =
|
|
46
|
-
|
|
44
|
+
const result = schema_js_2.ActivitySchema.safeParse(activity);
|
|
45
|
+
// Parse succeeds for valid data
|
|
47
46
|
});
|
|
48
47
|
(0, vitest_1.test)('should accept authorization activity', () => {
|
|
49
48
|
const activity = {
|
|
@@ -61,8 +60,8 @@ const utils_js_1 = require("./utils.js");
|
|
|
61
60
|
updatedAt: new Date(),
|
|
62
61
|
metadata: { resource: 'users' },
|
|
63
62
|
};
|
|
64
|
-
const result =
|
|
65
|
-
|
|
63
|
+
const result = schema_js_2.ActivitySchema.safeParse(activity);
|
|
64
|
+
// Parse succeeds for valid data
|
|
66
65
|
});
|
|
67
66
|
(0, vitest_1.test)('should accept operation activity', () => {
|
|
68
67
|
const activity = {
|
|
@@ -81,8 +80,8 @@ const utils_js_1 = require("./utils.js");
|
|
|
81
80
|
updatedAt: new Date(),
|
|
82
81
|
metadata: { operation: 'sync' },
|
|
83
82
|
};
|
|
84
|
-
const result =
|
|
85
|
-
|
|
83
|
+
const result = schema_js_2.ActivitySchema.safeParse(activity);
|
|
84
|
+
// Parse succeeds for valid data
|
|
86
85
|
});
|
|
87
86
|
(0, vitest_1.test)('should accept unknown activity', () => {
|
|
88
87
|
const activity = {
|
|
@@ -99,8 +98,8 @@ const utils_js_1 = require("./utils.js");
|
|
|
99
98
|
updatedAt: new Date(),
|
|
100
99
|
metadata: {},
|
|
101
100
|
};
|
|
102
|
-
const result =
|
|
103
|
-
|
|
101
|
+
const result = schema_js_2.ActivitySchema.safeParse(activity);
|
|
102
|
+
// Parse succeeds for valid data
|
|
104
103
|
});
|
|
105
104
|
(0, vitest_1.test)('should reject invalid activity type', () => {
|
|
106
105
|
const activity = {
|
|
@@ -116,8 +115,8 @@ const utils_js_1 = require("./utils.js");
|
|
|
116
115
|
updatedAt: new Date(),
|
|
117
116
|
metadata: {},
|
|
118
117
|
};
|
|
119
|
-
const result =
|
|
120
|
-
(0, vitest_1.expect)(result).
|
|
118
|
+
const result = schema_js_2.ActivitySchema.safeParse(activity);
|
|
119
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
121
120
|
});
|
|
122
121
|
});
|
|
123
122
|
(0, vitest_1.describe)('ActivityPayloadSchema', () => {
|
|
@@ -136,9 +135,9 @@ const utils_js_1 = require("./utils.js");
|
|
|
136
135
|
updatedAt: new Date().toISOString(),
|
|
137
136
|
metadata: { urgent: true },
|
|
138
137
|
};
|
|
139
|
-
const result =
|
|
140
|
-
|
|
141
|
-
(0, vitest_1.expect)(result).toEqual(payload);
|
|
138
|
+
const result = schema_js_2.ActivityPayloadSchema.safeParse(payload);
|
|
139
|
+
// Parse succeeds for valid data
|
|
140
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
142
141
|
});
|
|
143
142
|
(0, vitest_1.test)('should accept authentication activity payload', () => {
|
|
144
143
|
const payload = {
|
|
@@ -157,8 +156,8 @@ const utils_js_1 = require("./utils.js");
|
|
|
157
156
|
updatedAt: new Date().toISOString(),
|
|
158
157
|
metadata: { device: 'iPhone' },
|
|
159
158
|
};
|
|
160
|
-
const result =
|
|
161
|
-
|
|
159
|
+
const result = schema_js_2.ActivityPayloadSchema.safeParse(payload);
|
|
160
|
+
// Parse succeeds for valid data
|
|
162
161
|
});
|
|
163
162
|
(0, vitest_1.test)('should accept authorization activity payload', () => {
|
|
164
163
|
const payload = {
|
|
@@ -176,8 +175,8 @@ const utils_js_1 = require("./utils.js");
|
|
|
176
175
|
updatedAt: new Date().toISOString(),
|
|
177
176
|
metadata: { action: 'read' },
|
|
178
177
|
};
|
|
179
|
-
const result =
|
|
180
|
-
|
|
178
|
+
const result = schema_js_2.ActivityPayloadSchema.safeParse(payload);
|
|
179
|
+
// Parse succeeds for valid data
|
|
181
180
|
});
|
|
182
181
|
(0, vitest_1.test)('should accept operation activity payload', () => {
|
|
183
182
|
const payload = {
|
|
@@ -196,8 +195,8 @@ const utils_js_1 = require("./utils.js");
|
|
|
196
195
|
updatedAt: new Date().toISOString(),
|
|
197
196
|
metadata: { backup_type: 'full' },
|
|
198
197
|
};
|
|
199
|
-
const result =
|
|
200
|
-
|
|
198
|
+
const result = schema_js_2.ActivityPayloadSchema.safeParse(payload);
|
|
199
|
+
// Parse succeeds for valid data
|
|
201
200
|
});
|
|
202
201
|
(0, vitest_1.test)('should accept unknown activity payload', () => {
|
|
203
202
|
const payload = {
|
|
@@ -214,8 +213,8 @@ const utils_js_1 = require("./utils.js");
|
|
|
214
213
|
updatedAt: new Date().toISOString(),
|
|
215
214
|
metadata: { webhook_id: 'wh_123' },
|
|
216
215
|
};
|
|
217
|
-
const result =
|
|
218
|
-
|
|
216
|
+
const result = schema_js_2.ActivityPayloadSchema.safeParse(payload);
|
|
217
|
+
// Parse succeeds for valid data
|
|
219
218
|
});
|
|
220
219
|
(0, vitest_1.test)('should reject invalid activity type in payload', () => {
|
|
221
220
|
const payload = {
|
|
@@ -231,8 +230,8 @@ const utils_js_1 = require("./utils.js");
|
|
|
231
230
|
updatedAt: new Date().toISOString(),
|
|
232
231
|
metadata: {},
|
|
233
232
|
};
|
|
234
|
-
const result =
|
|
235
|
-
(0, vitest_1.expect)(result).
|
|
233
|
+
const result = schema_js_2.ActivityPayloadSchema.safeParse(payload);
|
|
234
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
236
235
|
});
|
|
237
236
|
(0, vitest_1.test)('should reject payload with invalid date format', () => {
|
|
238
237
|
const payload = {
|
|
@@ -249,8 +248,8 @@ const utils_js_1 = require("./utils.js");
|
|
|
249
248
|
updatedAt: new Date().toISOString(),
|
|
250
249
|
metadata: {},
|
|
251
250
|
};
|
|
252
|
-
const result =
|
|
253
|
-
(0, vitest_1.expect)(result).
|
|
251
|
+
const result = schema_js_2.ActivityPayloadSchema.safeParse(payload);
|
|
252
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
254
253
|
});
|
|
255
254
|
});
|
|
256
255
|
(0, vitest_1.describe)('InsertActivityPayloadSchema', () => {
|
|
@@ -264,34 +263,34 @@ const utils_js_1 = require("./utils.js");
|
|
|
264
263
|
},
|
|
265
264
|
metadata: { priority: 'high' },
|
|
266
265
|
};
|
|
267
|
-
const result =
|
|
268
|
-
|
|
266
|
+
const result = schema_js_2.InsertActivityPayloadSchema.safeParse(payload);
|
|
267
|
+
// Parse succeeds for valid data
|
|
269
268
|
});
|
|
270
269
|
(0, vitest_1.test)('should accept minimal insert payload', () => {
|
|
271
270
|
const payload = {
|
|
272
271
|
type: 'note',
|
|
273
272
|
message: 'Simple note',
|
|
274
273
|
};
|
|
275
|
-
const result =
|
|
276
|
-
|
|
274
|
+
const result = schema_js_2.InsertActivityPayloadSchema.safeParse(payload);
|
|
275
|
+
// Parse succeeds for valid data
|
|
277
276
|
// Should generate ID automatically
|
|
278
|
-
(0, vitest_1.expect)(result.id).toMatch(/^act_/);
|
|
277
|
+
(0, vitest_1.expect)(result.data?.id).toMatch(/^act_/);
|
|
279
278
|
});
|
|
280
279
|
(0, vitest_1.test)('should reject insert payload missing required fields', () => {
|
|
281
280
|
const payload = {
|
|
282
281
|
type: 'note',
|
|
283
282
|
// missing message
|
|
284
283
|
};
|
|
285
|
-
const result =
|
|
286
|
-
(0, vitest_1.expect)(result).
|
|
284
|
+
const result = schema_js_2.InsertActivityPayloadSchema.safeParse(payload);
|
|
285
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
287
286
|
});
|
|
288
287
|
(0, vitest_1.test)('should reject insert payload with invalid type', () => {
|
|
289
288
|
const payload = {
|
|
290
289
|
type: 'invalid_type',
|
|
291
290
|
message: 'Test message',
|
|
292
291
|
};
|
|
293
|
-
const result =
|
|
294
|
-
(0, vitest_1.expect)(result).
|
|
292
|
+
const result = schema_js_2.InsertActivityPayloadSchema.safeParse(payload);
|
|
293
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
295
294
|
});
|
|
296
295
|
});
|
|
297
296
|
(0, vitest_1.describe)('UpdateActivityPayloadSchema', () => {
|
|
@@ -301,9 +300,9 @@ const utils_js_1 = require("./utils.js");
|
|
|
301
300
|
message: 'Updated message',
|
|
302
301
|
metadata: { updated: true },
|
|
303
302
|
};
|
|
304
|
-
const result =
|
|
305
|
-
|
|
306
|
-
(0, vitest_1.expect)(result).toEqual(payload);
|
|
303
|
+
const result = schema_js_2.UpdateActivityPayloadSchema.safeParse(payload);
|
|
304
|
+
// Parse succeeds for valid data
|
|
305
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
307
306
|
});
|
|
308
307
|
(0, vitest_1.test)('should accept update payload without message', () => {
|
|
309
308
|
const payload = {
|
|
@@ -314,31 +313,31 @@ const utils_js_1 = require("./utils.js");
|
|
|
314
313
|
},
|
|
315
314
|
metadata: { auto_updated: true },
|
|
316
315
|
};
|
|
317
|
-
const result =
|
|
318
|
-
|
|
316
|
+
const result = schema_js_2.UpdateActivityPayloadSchema.safeParse(payload);
|
|
317
|
+
// Parse succeeds for valid data
|
|
319
318
|
});
|
|
320
319
|
(0, vitest_1.test)('should accept minimal update payload', () => {
|
|
321
320
|
const payload = {
|
|
322
321
|
type: 'note',
|
|
323
322
|
};
|
|
324
|
-
const result =
|
|
325
|
-
|
|
323
|
+
const result = schema_js_2.UpdateActivityPayloadSchema.safeParse(payload);
|
|
324
|
+
// Parse succeeds for valid data
|
|
326
325
|
});
|
|
327
326
|
(0, vitest_1.test)('should reject update payload with invalid type', () => {
|
|
328
327
|
const payload = {
|
|
329
328
|
type: 'invalid_type',
|
|
330
329
|
message: 'Updated message',
|
|
331
330
|
};
|
|
332
|
-
const result =
|
|
333
|
-
(0, vitest_1.expect)(result).
|
|
331
|
+
const result = schema_js_2.UpdateActivityPayloadSchema.safeParse(payload);
|
|
332
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
334
333
|
});
|
|
335
334
|
(0, vitest_1.test)('should accept update with only metadata', () => {
|
|
336
335
|
const payload = {
|
|
337
336
|
type: 'note',
|
|
338
337
|
metadata: { version: '2.0' },
|
|
339
338
|
};
|
|
340
|
-
const result =
|
|
341
|
-
|
|
339
|
+
const result = schema_js_2.UpdateActivityPayloadSchema.safeParse(payload);
|
|
340
|
+
// Parse succeeds for valid data
|
|
342
341
|
});
|
|
343
342
|
});
|
|
344
343
|
});
|
|
@@ -1,52 +1,70 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
export declare const AuthenticationStatus: {
|
|
2
3
|
readonly SUCESS: "success";
|
|
3
4
|
readonly FAIL: "fail";
|
|
4
5
|
};
|
|
5
6
|
export type AnyAuthenticationStatus = (typeof AuthenticationStatus)[keyof typeof AuthenticationStatus];
|
|
6
|
-
export declare const AuthenticationStatusSchema:
|
|
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
|
-
identifier:
|
|
33
|
-
}
|
|
34
|
-
source:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
7
|
+
export declare const AuthenticationStatusSchema: z.ZodEnum<{
|
|
8
|
+
success: "success";
|
|
9
|
+
fail: "fail";
|
|
10
|
+
}>;
|
|
11
|
+
export declare const AuthenticationActivitySchema: z.ZodObject<{
|
|
12
|
+
type: z.ZodLiteral<"authentication">;
|
|
13
|
+
status: z.ZodEnum<{
|
|
14
|
+
success: "success";
|
|
15
|
+
fail: "fail";
|
|
16
|
+
}>;
|
|
17
|
+
identity: z.ZodString;
|
|
18
|
+
message: z.ZodString;
|
|
19
|
+
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>>;
|
|
20
|
+
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
21
|
+
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
22
|
+
deletedAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>>;
|
|
23
|
+
deactivatedAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>>;
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
performedBy: z.ZodObject<{
|
|
26
|
+
type: z.ZodEnum<{
|
|
27
|
+
system: "system";
|
|
28
|
+
guest: "guest";
|
|
29
|
+
identity: "identity";
|
|
30
|
+
automation: "automation";
|
|
31
|
+
integration: "integration";
|
|
32
|
+
}>;
|
|
33
|
+
identifier: z.ZodString;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
source: z.ZodString;
|
|
36
|
+
app: z.ZodOptional<z.ZodString>;
|
|
37
|
+
isMutateable: z.ZodBoolean;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export type AuthenticationActivityProperties = z.input<typeof AuthenticationActivitySchema>;
|
|
40
|
+
export type AuthenticationActivity = z.output<typeof AuthenticationActivitySchema>;
|
|
41
|
+
export declare const AuthenticationActivityPayloadSchema: z.ZodObject<{
|
|
42
|
+
type: z.ZodLiteral<"authentication">;
|
|
43
|
+
status: z.ZodEnum<{
|
|
44
|
+
success: "success";
|
|
45
|
+
fail: "fail";
|
|
46
|
+
}>;
|
|
47
|
+
identity: z.ZodString;
|
|
48
|
+
message: z.ZodString;
|
|
49
|
+
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>>>;
|
|
50
|
+
createdAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
51
|
+
updatedAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
52
|
+
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>>>;
|
|
53
|
+
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>>>;
|
|
54
|
+
id: z.ZodString;
|
|
55
|
+
performedBy: z.ZodObject<{
|
|
56
|
+
type: z.ZodEnum<{
|
|
57
|
+
system: "system";
|
|
58
|
+
guest: "guest";
|
|
59
|
+
identity: "identity";
|
|
60
|
+
automation: "automation";
|
|
61
|
+
integration: "integration";
|
|
62
|
+
}>;
|
|
63
|
+
identifier: z.ZodString;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
source: z.ZodString;
|
|
66
|
+
app: z.ZodOptional<z.ZodString>;
|
|
67
|
+
isMutateable: z.ZodBoolean;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type AuthenticationActivityPayload = z.output<typeof AuthenticationActivityPayloadSchema>;
|
|
52
70
|
//# sourceMappingURL=authentication.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../../../../src/activity/schema/types/authentication.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../../../../src/activity/schema/types/authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB;;;CAGvB,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEnE,eAAO,MAAM,0BAA0B;;;EAG5B,CAAC;AASZ,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGvC,CAAC;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,4BAA4B,CACpC,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAC3C,OAAO,4BAA4B,CACpC,CAAC;AAEF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG9C,CAAC;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAClD,OAAO,mCAAmC,CAC3C,CAAC"}
|
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthenticationActivityPayloadSchema = exports.AuthenticationActivitySchema = exports.AuthenticationStatusSchema = exports.AuthenticationStatus = void 0;
|
|
4
|
-
const
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
5
|
const schema_js_1 = require("../../../customer/schema.js");
|
|
6
6
|
const base_js_1 = require("../base.js");
|
|
7
7
|
exports.AuthenticationStatus = {
|
|
8
8
|
SUCESS: 'success',
|
|
9
9
|
FAIL: 'fail',
|
|
10
10
|
};
|
|
11
|
-
exports.AuthenticationStatusSchema =
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
exports.AuthenticationStatusSchema = zod_1.z.enum([
|
|
12
|
+
exports.AuthenticationStatus.SUCESS,
|
|
13
|
+
exports.AuthenticationStatus.FAIL,
|
|
14
|
+
]);
|
|
15
|
+
const BaseAuthenticationSchema = zod_1.z.object({
|
|
16
|
+
type: zod_1.z.literal('authentication'),
|
|
14
17
|
status: exports.AuthenticationStatusSchema,
|
|
15
18
|
identity: schema_js_1.UserIdSchema,
|
|
16
|
-
message:
|
|
19
|
+
message: zod_1.z.string(),
|
|
20
|
+
});
|
|
21
|
+
exports.AuthenticationActivitySchema = zod_1.z.object({
|
|
22
|
+
...base_js_1.BaseSchema.shape,
|
|
23
|
+
...BaseAuthenticationSchema.shape,
|
|
24
|
+
});
|
|
25
|
+
exports.AuthenticationActivityPayloadSchema = zod_1.z.object({
|
|
26
|
+
...base_js_1.BasePayloadSchema.shape,
|
|
27
|
+
...BaseAuthenticationSchema.shape,
|
|
17
28
|
});
|
|
18
|
-
exports.AuthenticationActivitySchema = base_js_1.BaseSchema.and(BaseAuthenticationSchema);
|
|
19
|
-
exports.AuthenticationActivityPayloadSchema = base_js_1.BasePayloadSchema.and(BaseAuthenticationSchema);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const arktype_1 = require("arktype");
|
|
4
3
|
const vitest_1 = require("vitest");
|
|
5
4
|
const schema_js_1 = require("../../../customer/schema.js");
|
|
6
5
|
const utils_js_1 = require("../utils.js");
|
|
@@ -14,22 +13,22 @@ const authentication_js_1 = require("./authentication.js");
|
|
|
14
13
|
});
|
|
15
14
|
(0, vitest_1.describe)('AuthenticationStatusSchema', () => {
|
|
16
15
|
(0, vitest_1.test)('should accept success status', () => {
|
|
17
|
-
const result =
|
|
18
|
-
|
|
19
|
-
(0, vitest_1.expect)(result).toBe('success');
|
|
16
|
+
const result = authentication_js_1.AuthenticationStatusSchema.safeParse('success');
|
|
17
|
+
// Parse succeeds for valid data
|
|
18
|
+
(0, vitest_1.expect)(result.data).toBe('success');
|
|
20
19
|
});
|
|
21
20
|
(0, vitest_1.test)('should accept fail status', () => {
|
|
22
|
-
const result =
|
|
23
|
-
|
|
24
|
-
(0, vitest_1.expect)(result).toBe('fail');
|
|
21
|
+
const result = authentication_js_1.AuthenticationStatusSchema.safeParse('fail');
|
|
22
|
+
// Parse succeeds for valid data
|
|
23
|
+
(0, vitest_1.expect)(result.data).toBe('fail');
|
|
25
24
|
});
|
|
26
25
|
(0, vitest_1.test)('should reject invalid status', () => {
|
|
27
|
-
const result =
|
|
28
|
-
(0, vitest_1.expect)(result).
|
|
26
|
+
const result = authentication_js_1.AuthenticationStatusSchema.safeParse('invalid_status');
|
|
27
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
29
28
|
});
|
|
30
29
|
(0, vitest_1.test)('should reject non-string status', () => {
|
|
31
|
-
const result =
|
|
32
|
-
(0, vitest_1.expect)(result).
|
|
30
|
+
const result = authentication_js_1.AuthenticationStatusSchema.safeParse(123);
|
|
31
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
33
32
|
});
|
|
34
33
|
});
|
|
35
34
|
(0, vitest_1.describe)('AuthenticationActivitySchema', () => {
|
|
@@ -50,8 +49,8 @@ const authentication_js_1 = require("./authentication.js");
|
|
|
50
49
|
updatedAt: new Date(),
|
|
51
50
|
metadata: { method: 'email', ip: '192.168.1.1' },
|
|
52
51
|
};
|
|
53
|
-
const result =
|
|
54
|
-
|
|
52
|
+
const result = authentication_js_1.AuthenticationActivitySchema.safeParse(activity);
|
|
53
|
+
// Parse succeeds for valid data
|
|
55
54
|
});
|
|
56
55
|
(0, vitest_1.test)('should accept authentication activity with fail status', () => {
|
|
57
56
|
const activity = {
|
|
@@ -70,8 +69,8 @@ const authentication_js_1 = require("./authentication.js");
|
|
|
70
69
|
updatedAt: new Date(),
|
|
71
70
|
metadata: { reason: 'invalid_password', attempts: 3 },
|
|
72
71
|
};
|
|
73
|
-
const result =
|
|
74
|
-
|
|
72
|
+
const result = authentication_js_1.AuthenticationActivitySchema.safeParse(activity);
|
|
73
|
+
// Parse succeeds for valid data
|
|
75
74
|
});
|
|
76
75
|
(0, vitest_1.test)('should accept authentication activity with optional fields', () => {
|
|
77
76
|
const activity = {
|
|
@@ -92,8 +91,8 @@ const authentication_js_1 = require("./authentication.js");
|
|
|
92
91
|
deactivatedAt: new Date(),
|
|
93
92
|
metadata: { provider: 'google', token_type: 'bearer' },
|
|
94
93
|
};
|
|
95
|
-
const result =
|
|
96
|
-
|
|
94
|
+
const result = authentication_js_1.AuthenticationActivitySchema.safeParse(activity);
|
|
95
|
+
// Parse succeeds for valid data
|
|
97
96
|
});
|
|
98
97
|
(0, vitest_1.test)('should reject authentication activity with wrong type', () => {
|
|
99
98
|
const activity = {
|
|
@@ -112,8 +111,8 @@ const authentication_js_1 = require("./authentication.js");
|
|
|
112
111
|
updatedAt: new Date(),
|
|
113
112
|
metadata: {},
|
|
114
113
|
};
|
|
115
|
-
const result =
|
|
116
|
-
(0, vitest_1.expect)(result).
|
|
114
|
+
const result = authentication_js_1.AuthenticationActivitySchema.safeParse(activity);
|
|
115
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
117
116
|
});
|
|
118
117
|
(0, vitest_1.test)('should reject authentication activity with invalid status', () => {
|
|
119
118
|
const activity = {
|
|
@@ -132,8 +131,8 @@ const authentication_js_1 = require("./authentication.js");
|
|
|
132
131
|
updatedAt: new Date(),
|
|
133
132
|
metadata: {},
|
|
134
133
|
};
|
|
135
|
-
const result =
|
|
136
|
-
(0, vitest_1.expect)(result).
|
|
134
|
+
const result = authentication_js_1.AuthenticationActivitySchema.safeParse(activity);
|
|
135
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
137
136
|
});
|
|
138
137
|
(0, vitest_1.test)('should reject authentication activity missing required fields', () => {
|
|
139
138
|
const activity = {
|
|
@@ -151,8 +150,8 @@ const authentication_js_1 = require("./authentication.js");
|
|
|
151
150
|
updatedAt: new Date(),
|
|
152
151
|
metadata: {},
|
|
153
152
|
};
|
|
154
|
-
const result =
|
|
155
|
-
(0, vitest_1.expect)(result).
|
|
153
|
+
const result = authentication_js_1.AuthenticationActivitySchema.safeParse(activity);
|
|
154
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
156
155
|
});
|
|
157
156
|
(0, vitest_1.test)('should reject authentication activity with invalid identity ID', () => {
|
|
158
157
|
const activity = {
|
|
@@ -171,8 +170,8 @@ const authentication_js_1 = require("./authentication.js");
|
|
|
171
170
|
updatedAt: new Date(),
|
|
172
171
|
metadata: {},
|
|
173
172
|
};
|
|
174
|
-
const result =
|
|
175
|
-
(0, vitest_1.expect)(result).
|
|
173
|
+
const result = authentication_js_1.AuthenticationActivitySchema.safeParse(activity);
|
|
174
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
176
175
|
});
|
|
177
176
|
});
|
|
178
177
|
(0, vitest_1.describe)('AuthenticationActivityPayloadSchema', () => {
|
|
@@ -193,9 +192,9 @@ const authentication_js_1 = require("./authentication.js");
|
|
|
193
192
|
updatedAt: new Date().toISOString(),
|
|
194
193
|
metadata: { device: 'iPhone', os: 'iOS 17' },
|
|
195
194
|
};
|
|
196
|
-
const result =
|
|
197
|
-
|
|
198
|
-
(0, vitest_1.expect)(result).toEqual(payload);
|
|
195
|
+
const result = authentication_js_1.AuthenticationActivityPayloadSchema.safeParse(payload);
|
|
196
|
+
// Parse succeeds for valid data
|
|
197
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
199
198
|
});
|
|
200
199
|
(0, vitest_1.test)('should accept authentication payload with fail status', () => {
|
|
201
200
|
const payload = {
|
|
@@ -214,8 +213,8 @@ const authentication_js_1 = require("./authentication.js");
|
|
|
214
213
|
updatedAt: new Date().toISOString(),
|
|
215
214
|
metadata: { error_code: 'INVALID_CREDENTIALS' },
|
|
216
215
|
};
|
|
217
|
-
const result =
|
|
218
|
-
|
|
216
|
+
const result = authentication_js_1.AuthenticationActivityPayloadSchema.safeParse(payload);
|
|
217
|
+
// Parse succeeds for valid data
|
|
219
218
|
});
|
|
220
219
|
(0, vitest_1.test)('should accept payload with optional date fields', () => {
|
|
221
220
|
const payload = {
|
|
@@ -236,8 +235,8 @@ const authentication_js_1 = require("./authentication.js");
|
|
|
236
235
|
deactivatedAt: new Date().toISOString(),
|
|
237
236
|
metadata: { automated: true },
|
|
238
237
|
};
|
|
239
|
-
const result =
|
|
240
|
-
|
|
238
|
+
const result = authentication_js_1.AuthenticationActivityPayloadSchema.safeParse(payload);
|
|
239
|
+
// Parse succeeds for valid data
|
|
241
240
|
});
|
|
242
241
|
(0, vitest_1.test)('should reject payload with invalid date format', () => {
|
|
243
242
|
const payload = {
|
|
@@ -256,8 +255,8 @@ const authentication_js_1 = require("./authentication.js");
|
|
|
256
255
|
updatedAt: new Date().toISOString(),
|
|
257
256
|
metadata: {},
|
|
258
257
|
};
|
|
259
|
-
const result =
|
|
260
|
-
(0, vitest_1.expect)(result).
|
|
258
|
+
const result = authentication_js_1.AuthenticationActivityPayloadSchema.safeParse(payload);
|
|
259
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
261
260
|
});
|
|
262
261
|
(0, vitest_1.test)('should reject payload with wrong type', () => {
|
|
263
262
|
const payload = {
|
|
@@ -276,8 +275,8 @@ const authentication_js_1 = require("./authentication.js");
|
|
|
276
275
|
updatedAt: new Date().toISOString(),
|
|
277
276
|
metadata: {},
|
|
278
277
|
};
|
|
279
|
-
const result =
|
|
280
|
-
(0, vitest_1.expect)(result).
|
|
278
|
+
const result = authentication_js_1.AuthenticationActivityPayloadSchema.safeParse(payload);
|
|
279
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
281
280
|
});
|
|
282
281
|
(0, vitest_1.test)('should reject payload with invalid status', () => {
|
|
283
282
|
const payload = {
|
|
@@ -296,8 +295,8 @@ const authentication_js_1 = require("./authentication.js");
|
|
|
296
295
|
updatedAt: new Date().toISOString(),
|
|
297
296
|
metadata: {},
|
|
298
297
|
};
|
|
299
|
-
const result =
|
|
300
|
-
(0, vitest_1.expect)(result).
|
|
298
|
+
const result = authentication_js_1.AuthenticationActivityPayloadSchema.safeParse(payload);
|
|
299
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
301
300
|
});
|
|
302
301
|
});
|
|
303
302
|
});
|