@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,81 +1,108 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
export declare const SessionStatus: {
|
|
2
3
|
readonly INITIATED: "initiated";
|
|
3
4
|
readonly AUTHENTICATED: "authenticated";
|
|
4
5
|
readonly PENDING: "pending";
|
|
5
6
|
};
|
|
6
7
|
export type AnySessionStatus = (typeof SessionStatus)[keyof typeof SessionStatus];
|
|
7
|
-
export declare const SessionIdSchema:
|
|
8
|
-
export type SessionId = typeof SessionIdSchema
|
|
9
|
-
export declare const SessionIdPropertySchema:
|
|
10
|
-
id:
|
|
11
|
-
},
|
|
12
|
-
export type SessionIdProperty = typeof SessionIdPropertySchema
|
|
13
|
-
export declare const SessionStatusSchema:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
settings
|
|
55
|
-
state
|
|
56
|
-
}
|
|
57
|
-
factorHistory
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
metadata
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
8
|
+
export declare const SessionIdSchema: z.ZodString;
|
|
9
|
+
export type SessionId = z.output<typeof SessionIdSchema>;
|
|
10
|
+
export declare const SessionIdPropertySchema: z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type SessionIdProperty = z.output<typeof SessionIdPropertySchema>;
|
|
14
|
+
export declare const SessionStatusSchema: z.ZodEnum<{
|
|
15
|
+
pending: "pending";
|
|
16
|
+
initiated: "initiated";
|
|
17
|
+
authenticated: "authenticated";
|
|
18
|
+
}>;
|
|
19
|
+
export declare const SessionAuthenticationFactorSchema: z.ZodObject<{
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
type: z.ZodEnum<{
|
|
22
|
+
email: "email";
|
|
23
|
+
password: "password";
|
|
24
|
+
totp: "totp";
|
|
25
|
+
}>;
|
|
26
|
+
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
27
|
+
state: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export type SessionAuthenticationFactor = z.output<typeof SessionAuthenticationFactorSchema>;
|
|
30
|
+
export declare const SessionAuthenticationFactorHistorySchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodString>, z.ZodCustom<Set<string>, Set<string>>]>, z.ZodTransform<Set<string> | string[] | undefined, Set<string> | string[] | undefined>>;
|
|
31
|
+
export type SessionAuthenticationFactorHistory = z.output<typeof SessionAuthenticationFactorHistorySchema>;
|
|
32
|
+
export declare const SessionSchema: z.ZodObject<{
|
|
33
|
+
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>>;
|
|
34
|
+
expiresAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
35
|
+
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
36
|
+
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
37
|
+
redirectTo: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<URL, URL>]>, z.ZodTransform<string | URL, string | URL>>>;
|
|
38
|
+
deletedAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>>;
|
|
39
|
+
deactivatedAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>>;
|
|
40
|
+
status: z.ZodEnum<{
|
|
41
|
+
pending: "pending";
|
|
42
|
+
initiated: "initiated";
|
|
43
|
+
authenticated: "authenticated";
|
|
44
|
+
}>;
|
|
45
|
+
user: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
46
|
+
userAgent: z.ZodOptional<z.ZodString>;
|
|
47
|
+
sourceIp: z.ZodOptional<z.ZodUnion<readonly [z.ZodIPv4, z.ZodIPv6, z.ZodUndefined]>>;
|
|
48
|
+
factors: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
type: z.ZodEnum<{
|
|
51
|
+
email: "email";
|
|
52
|
+
password: "password";
|
|
53
|
+
totp: "totp";
|
|
54
|
+
}>;
|
|
55
|
+
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
56
|
+
state: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, z.core.$strip>>, z.ZodUndefined]>>;
|
|
58
|
+
factorHistory: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodString>, z.ZodCustom<Set<string>, Set<string>>]>, z.ZodTransform<Set<string> | string[] | undefined, Set<string> | string[] | undefined>>>;
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
export type SessionProperties = z.input<typeof SessionSchema>;
|
|
62
|
+
export type Session = z.output<typeof SessionSchema>;
|
|
63
|
+
export declare const SessionPayloadSchema: z.ZodObject<{
|
|
64
|
+
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>>>;
|
|
65
|
+
expiresAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
66
|
+
createdAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
67
|
+
updatedAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
68
|
+
redirectTo: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<URL, URL>]>, z.ZodTransform<string, string | URL>>>;
|
|
69
|
+
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>>>;
|
|
70
|
+
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>>>;
|
|
71
|
+
status: z.ZodEnum<{
|
|
72
|
+
pending: "pending";
|
|
73
|
+
initiated: "initiated";
|
|
74
|
+
authenticated: "authenticated";
|
|
75
|
+
}>;
|
|
76
|
+
user: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
77
|
+
userAgent: z.ZodOptional<z.ZodString>;
|
|
78
|
+
sourceIp: z.ZodOptional<z.ZodUnion<readonly [z.ZodIPv4, z.ZodIPv6, z.ZodUndefined]>>;
|
|
79
|
+
factors: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
type: z.ZodEnum<{
|
|
82
|
+
email: "email";
|
|
83
|
+
password: "password";
|
|
84
|
+
totp: "totp";
|
|
85
|
+
}>;
|
|
86
|
+
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
87
|
+
state: z.ZodOptional<z.ZodString>;
|
|
88
|
+
}, z.core.$strip>>, z.ZodUndefined]>>;
|
|
89
|
+
factorHistory: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodString>, z.ZodCustom<Set<string>, Set<string>>]>, z.ZodTransform<Set<string> | string[] | undefined, Set<string> | string[] | undefined>>>;
|
|
90
|
+
id: z.ZodString;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
export type SessionPayload = z.output<typeof SessionPayloadSchema>;
|
|
93
|
+
export declare const SessionAssociationReferenceSchema: z.ZodObject<{
|
|
94
|
+
model: z.ZodLiteral<"Session">;
|
|
95
|
+
createdAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
status: z.ZodEnum<{
|
|
98
|
+
pending: "pending";
|
|
99
|
+
initiated: "initiated";
|
|
100
|
+
authenticated: "authenticated";
|
|
101
|
+
}>;
|
|
102
|
+
expiresAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
103
|
+
user: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
104
|
+
userAgent: z.ZodOptional<z.ZodString>;
|
|
105
|
+
sourceIp: z.ZodOptional<z.ZodUnion<readonly [z.ZodIPv4, z.ZodIPv6, z.ZodUndefined]>>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
export type SessionAssociationReference = z.output<typeof SessionAssociationReferenceSchema>;
|
|
81
108
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/sessions/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/sessions/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAErD,eAAO,MAAM,eAAe,aAAuC,CAAC;AACpE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAEzD,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEzE,eAAO,MAAM,mBAAmB;;;;EAIrB,CAAC;AAEZ,eAAO,MAAM,iCAAiC;;;;;;;;;iBAK5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAChD,OAAO,iCAAiC,CACzC,CAAC;AAMF,eAAO,MAAM,wCAAwC,0MAUlD,CAAC;AACJ,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CACvD,OAAO,wCAAwC,CAChD,CAAC;AAcF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAYxB,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC9D,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;AAErD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAY/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEnE,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;iBAW5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAChD,OAAO,iCAAiC,CACzC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SessionAssociationReferenceSchema = exports.SessionPayloadSchema = exports.SessionSchema = exports.SessionAuthenticationFactorHistorySchema = exports.SessionAuthenticationFactorSchema = exports.SessionStatusSchema = exports.SessionIdPropertySchema = exports.SessionIdSchema = exports.SessionStatus = void 0;
|
|
4
|
-
const
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
5
|
const dates_js_1 = require("../../common/schema/dates.js");
|
|
6
6
|
const id_js_1 = require("../../common/schema/id.js");
|
|
7
7
|
const metadata_js_1 = require("../../common/schema/metadata.js");
|
|
@@ -14,44 +14,75 @@ exports.SessionStatus = {
|
|
|
14
14
|
PENDING: 'pending', // Session is in the process of authenticating
|
|
15
15
|
};
|
|
16
16
|
exports.SessionIdSchema = (0, id_js_1.KSUIDSchema)(utils_js_1.Model.Session.UIDPrefix);
|
|
17
|
-
exports.SessionIdPropertySchema =
|
|
17
|
+
exports.SessionIdPropertySchema = zod_1.z.object({
|
|
18
18
|
id: exports.SessionIdSchema,
|
|
19
19
|
});
|
|
20
|
-
exports.SessionStatusSchema =
|
|
21
|
-
exports.
|
|
20
|
+
exports.SessionStatusSchema = zod_1.z.enum([
|
|
21
|
+
exports.SessionStatus.INITIATED,
|
|
22
|
+
exports.SessionStatus.AUTHENTICATED,
|
|
23
|
+
exports.SessionStatus.PENDING,
|
|
24
|
+
]);
|
|
25
|
+
exports.SessionAuthenticationFactorSchema = zod_1.z.object({
|
|
22
26
|
id: base_js_1.StrategyIdSchema,
|
|
23
27
|
type: base_js_1.StrategyTypeSchema,
|
|
24
|
-
settings: (
|
|
25
|
-
state:
|
|
28
|
+
settings: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
29
|
+
state: zod_1.z.string().optional(),
|
|
26
30
|
});
|
|
27
|
-
const AuthenticationFactorHistoryArraySchema =
|
|
28
|
-
const AuthenticationFactorHistorySetSchema =
|
|
29
|
-
exports.SessionAuthenticationFactorHistorySchema =
|
|
30
|
-
.
|
|
31
|
-
.
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
const AuthenticationFactorHistoryArraySchema = zod_1.z.array(base_js_1.StrategyIdSchema);
|
|
32
|
+
const AuthenticationFactorHistorySetSchema = zod_1.z.instanceof((Set));
|
|
33
|
+
exports.SessionAuthenticationFactorHistorySchema = zod_1.z
|
|
34
|
+
.union([
|
|
35
|
+
zod_1.z.undefined(),
|
|
36
|
+
AuthenticationFactorHistoryArraySchema,
|
|
37
|
+
AuthenticationFactorHistorySetSchema,
|
|
38
|
+
])
|
|
39
|
+
.pipe(zod_1.z.transform((s) => (s instanceof Set ? Array.from(s) : s)?.length ? s : undefined));
|
|
40
|
+
const BaseSchema = zod_1.z.object({
|
|
41
|
+
...exports.SessionIdPropertySchema.shape,
|
|
34
42
|
status: exports.SessionStatusSchema,
|
|
35
|
-
user: schema_js_1.UserIdSchema.
|
|
36
|
-
userAgent:
|
|
37
|
-
sourceIp: (
|
|
38
|
-
factors:
|
|
43
|
+
user: zod_1.z.union([schema_js_1.UserIdSchema, zod_1.z.undefined()]).optional(),
|
|
44
|
+
userAgent: zod_1.z.string().optional(),
|
|
45
|
+
sourceIp: zod_1.z.union([zod_1.z.ipv4(), zod_1.z.ipv6(), zod_1.z.undefined()]).optional(),
|
|
46
|
+
factors: zod_1.z
|
|
47
|
+
.union([zod_1.z.array(exports.SessionAuthenticationFactorSchema), zod_1.z.undefined()])
|
|
48
|
+
.optional(),
|
|
39
49
|
factorHistory: exports.SessionAuthenticationFactorHistorySchema.optional(),
|
|
40
50
|
});
|
|
41
|
-
exports.SessionSchema =
|
|
51
|
+
exports.SessionSchema = zod_1.z.object({
|
|
52
|
+
...BaseSchema.shape,
|
|
42
53
|
expiresAt: dates_js_1.RequiredDateSchema,
|
|
43
54
|
createdAt: dates_js_1.RequiredDateSchema,
|
|
44
55
|
updatedAt: dates_js_1.RequiredDateSchema,
|
|
56
|
+
redirectTo: zod_1.z
|
|
57
|
+
.union([zod_1.z.string(), zod_1.z.instanceof(URL)])
|
|
58
|
+
.pipe(zod_1.z.transform((v) => (!v || v instanceof URL ? v : new URL(v))))
|
|
59
|
+
.optional(),
|
|
45
60
|
deletedAt: dates_js_1.OptionalDateSchema.optional(),
|
|
46
61
|
deactivatedAt: dates_js_1.OptionalDateSchema.optional(),
|
|
47
|
-
|
|
48
|
-
|
|
62
|
+
...metadata_js_1.MetadataMapPropertySchema.shape,
|
|
63
|
+
});
|
|
64
|
+
exports.SessionPayloadSchema = zod_1.z.object({
|
|
65
|
+
...BaseSchema.shape,
|
|
49
66
|
expiresAt: dates_js_1.RequiredDatePayloadSchema,
|
|
50
67
|
createdAt: dates_js_1.RequiredDatePayloadSchema,
|
|
51
68
|
updatedAt: dates_js_1.RequiredDatePayloadSchema,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
69
|
+
redirectTo: zod_1.z
|
|
70
|
+
.union([zod_1.z.string(), zod_1.z.instanceof(URL)])
|
|
71
|
+
.transform((v) => (v instanceof URL ? v.toString() : v))
|
|
72
|
+
.optional(),
|
|
73
|
+
deletedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
74
|
+
deactivatedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
75
|
+
...metadata_js_1.MetadataPayloadPropertySchema.shape,
|
|
76
|
+
});
|
|
77
|
+
exports.SessionAssociationReferenceSchema = zod_1.z.object({
|
|
78
|
+
...exports.SessionPayloadSchema.pick({
|
|
79
|
+
id: true,
|
|
80
|
+
status: true,
|
|
81
|
+
user: true,
|
|
82
|
+
userAgent: true,
|
|
83
|
+
sourceIp: true,
|
|
84
|
+
createdAt: true,
|
|
85
|
+
expiresAt: true,
|
|
86
|
+
}).shape,
|
|
87
|
+
model: zod_1.z.literal('Session'),
|
|
57
88
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/authentication/settings/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/authentication/settings/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAMpE,OAAO,EACL,KAAK,QAAQ,EAEb,KAAK,mBAAmB,EAEzB,MAAM,aAAa,CAAC;AAIrB,qBAAa,iBAAiB;IACT,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,aAAa;IAE3D,MAAM,CAAC,SAAS,IAAI,MAAM;IAInB,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC;IAI5B,UAAU,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC;CAGhE;AAED,wBAAsB,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC,CAO5E;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,QAAQ,CAAC,CAQnB"}
|
|
@@ -4,7 +4,6 @@ exports.SettingsResources = void 0;
|
|
|
4
4
|
exports.getSettings = getSettings;
|
|
5
5
|
exports.upsertSettings = upsertSettings;
|
|
6
6
|
const operations_js_1 = require("../../common/resources/operations.js");
|
|
7
|
-
const utils_js_1 = require("../../common/resources/utils.js");
|
|
8
7
|
const resources_js_1 = require("../resources.js");
|
|
9
8
|
const schema_js_1 = require("./schema.js");
|
|
10
9
|
const RESOURCE = 'settings';
|
|
@@ -25,8 +24,8 @@ class SettingsResources {
|
|
|
25
24
|
}
|
|
26
25
|
exports.SettingsResources = SettingsResources;
|
|
27
26
|
async function getSettings(instance) {
|
|
28
|
-
return
|
|
27
|
+
return schema_js_1.SettingsSchema.parse(await (0, operations_js_1.getItemWithAuthorization)(new URL(SettingsResources.buildPath(), instance.config.host), instance.authorizer));
|
|
29
28
|
}
|
|
30
29
|
async function upsertSettings(instance, item) {
|
|
31
|
-
return
|
|
30
|
+
return schema_js_1.SettingsSchema.parse(await (0, operations_js_1.insertItemWithAuthorization)(new URL(SettingsResources.buildPath(), instance.config.host), instance.authorizer, schema_js_1.UpsertSettingsPayloadSchema.parse(item)));
|
|
32
31
|
}
|
|
@@ -1,69 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
factors
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
nextFactors?: {
|
|
27
|
-
id: string;
|
|
28
|
-
nextFactors?: /*elided*/ any[] | null | undefined;
|
|
29
|
-
}[] | null | undefined;
|
|
30
|
-
}[] | null | undefined) => import("arktype").Out<{
|
|
31
|
-
id: string;
|
|
32
|
-
nextFactors?: {
|
|
33
|
-
id: string;
|
|
34
|
-
nextFactors?: /*elided*/ any[] | null | undefined;
|
|
35
|
-
}[] | null | undefined;
|
|
36
|
-
}[] | undefined>) | undefined;
|
|
37
|
-
updatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
38
|
-
deletedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
39
|
-
deactivatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
40
|
-
metadata?: ((In: {
|
|
41
|
-
[x: string]: string | number | boolean;
|
|
42
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
43
|
-
[x: string]: string | number | boolean;
|
|
44
|
-
} | undefined>) | undefined;
|
|
45
|
-
}, {}>;
|
|
46
|
-
export type SettingsPayload = typeof SettingsPayloadSchema.inferOut;
|
|
47
|
-
export declare const UpsertSettingsPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
48
|
-
factors?: ((In: {
|
|
49
|
-
id: string;
|
|
50
|
-
nextFactors?: {
|
|
51
|
-
id: string;
|
|
52
|
-
nextFactors?: /*elided*/ any[] | null | undefined;
|
|
53
|
-
}[] | null | undefined;
|
|
54
|
-
}[] | null | undefined) => import("arktype").Out<{
|
|
55
|
-
id: string;
|
|
56
|
-
nextFactors?: {
|
|
57
|
-
id: string;
|
|
58
|
-
nextFactors?: /*elided*/ any[] | null | undefined;
|
|
59
|
-
}[] | null | undefined;
|
|
60
|
-
}[] | undefined>) | undefined;
|
|
61
|
-
metadata?: ((In: {
|
|
62
|
-
[x: string]: string | number | boolean;
|
|
63
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
64
|
-
[x: string]: string | number | boolean;
|
|
65
|
-
} | null>) | undefined;
|
|
66
|
-
}, {}>;
|
|
67
|
-
export type UpsertSettingsInput = typeof UpsertSettingsPayloadSchema.inferIn;
|
|
68
|
-
export type UpsertSettingsPayload = typeof UpsertSettingsPayloadSchema.inferOut;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SettingsSchema: z.ZodObject<{
|
|
3
|
+
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>>;
|
|
4
|
+
factors: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodArray<z.ZodType<import("../factors/schema.js").AuthenticationFactorType, unknown, z.core.$ZodTypeInternals<import("../factors/schema.js").AuthenticationFactorType, unknown>>>]>, z.ZodTransform<import("../factors/schema.js").AuthenticationFactorType[] | undefined, import("../factors/schema.js").AuthenticationFactorType[] | null | undefined>>>;
|
|
5
|
+
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
6
|
+
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
7
|
+
deletedAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>>;
|
|
8
|
+
deactivatedAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type SettingsProperties = z.input<typeof SettingsSchema>;
|
|
11
|
+
export type Settings = z.output<typeof SettingsSchema>;
|
|
12
|
+
export declare const SettingsPayloadSchema: z.ZodObject<{
|
|
13
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodCustom<Map<string, string | number | boolean>, Map<string, string | number | boolean>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<Record<string, string | number | boolean> | undefined, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>;
|
|
14
|
+
factors: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodArray<z.ZodType<import("../factors/schema.js").AuthenticationFactorType, unknown, z.core.$ZodTypeInternals<import("../factors/schema.js").AuthenticationFactorType, unknown>>>]>, z.ZodTransform<import("../factors/schema.js").AuthenticationFactorType[] | undefined, import("../factors/schema.js").AuthenticationFactorType[] | null | undefined>>>;
|
|
15
|
+
updatedAt: z.ZodOptional<z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>, z.ZodTransform<string | undefined, Date | undefined>>>;
|
|
16
|
+
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>>>;
|
|
17
|
+
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>>>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type SettingsPayload = z.output<typeof SettingsPayloadSchema>;
|
|
20
|
+
export declare const UpsertSettingsPayloadSchema: z.ZodObject<{
|
|
21
|
+
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>>>;
|
|
22
|
+
factors: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodArray<z.ZodType<import("../factors/schema.js").AuthenticationFactorType, unknown, z.core.$ZodTypeInternals<import("../factors/schema.js").AuthenticationFactorType, unknown>>>]>, z.ZodTransform<import("../factors/schema.js").AuthenticationFactorType[] | undefined, import("../factors/schema.js").AuthenticationFactorType[] | null | undefined>>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type UpsertSettingsInput = z.input<typeof UpsertSettingsPayloadSchema>;
|
|
25
|
+
export type UpsertSettingsPayload = z.output<typeof UpsertSettingsPayloadSchema>;
|
|
69
26
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/settings/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/settings/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,cAAc;;;;;;;iBAOzB,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvD,eAAO,MAAM,qBAAqB;;;;;;iBAMhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAErE,eAAO,MAAM,2BAA2B;;;iBAGtC,CAAC;AACH,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"}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpsertSettingsPayloadSchema = exports.SettingsPayloadSchema = exports.SettingsSchema = void 0;
|
|
4
|
-
const
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
5
|
const dates_js_1 = require("../../common/schema/dates.js");
|
|
6
6
|
const metadata_js_1 = require("../../common/schema/metadata.js");
|
|
7
7
|
const schema_js_1 = require("../factors/schema.js");
|
|
8
|
-
exports.SettingsSchema =
|
|
8
|
+
exports.SettingsSchema = zod_1.z.object({
|
|
9
9
|
factors: schema_js_1.AuthenticationFactorsSchema.optional(),
|
|
10
10
|
createdAt: dates_js_1.RequiredDateSchema,
|
|
11
11
|
updatedAt: dates_js_1.RequiredDateSchema,
|
|
12
12
|
deletedAt: dates_js_1.OptionalDateSchema.optional(),
|
|
13
13
|
deactivatedAt: dates_js_1.OptionalDateSchema.optional(),
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
...metadata_js_1.MetadataMapPropertySchema.shape,
|
|
15
|
+
});
|
|
16
|
+
exports.SettingsPayloadSchema = zod_1.z.object({
|
|
16
17
|
factors: schema_js_1.AuthenticationFactorsSchema.optional(),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
updatedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
19
|
+
deletedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
20
|
+
deactivatedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
21
|
+
...metadata_js_1.MetadataPayloadPropertySchema.shape,
|
|
22
|
+
});
|
|
23
|
+
exports.UpsertSettingsPayloadSchema = zod_1.z.object({
|
|
22
24
|
factors: schema_js_1.AuthenticationFactorsSchema.optional(),
|
|
23
|
-
|
|
25
|
+
...metadata_js_1.UpsertMetadataPropertyPayloadSchema.shape,
|
|
26
|
+
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const arktype_1 = require("arktype");
|
|
4
3
|
const vitest_1 = require("vitest");
|
|
5
4
|
const schema_js_1 = require("./schema.js");
|
|
6
5
|
(0, vitest_1.describe)('Authentication Settings - Schema', () => {
|
|
@@ -11,16 +10,17 @@ const schema_js_1 = require("./schema.js");
|
|
|
11
10
|
updatedAt: new Date(),
|
|
12
11
|
metadata: {},
|
|
13
12
|
};
|
|
14
|
-
const result =
|
|
15
|
-
|
|
13
|
+
const result = schema_js_1.SettingsSchema.safeParse(settings);
|
|
14
|
+
// Parse succeeds for valid data
|
|
15
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
16
16
|
});
|
|
17
17
|
(0, vitest_1.test)('should reject missing required dates', () => {
|
|
18
18
|
const settings = {
|
|
19
19
|
metadata: {},
|
|
20
20
|
// missing createdAt, updatedAt
|
|
21
21
|
};
|
|
22
|
-
const result =
|
|
23
|
-
(0, vitest_1.expect)(result).
|
|
22
|
+
const result = schema_js_1.SettingsSchema.safeParse(settings);
|
|
23
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
(0, vitest_1.describe)('SettingsPayloadSchema', () => {
|
|
@@ -28,46 +28,55 @@ const schema_js_1 = require("./schema.js");
|
|
|
28
28
|
const payload = {
|
|
29
29
|
metadata: {},
|
|
30
30
|
};
|
|
31
|
-
const result =
|
|
32
|
-
|
|
33
|
-
(0, vitest_1.expect)(result).
|
|
31
|
+
const result = schema_js_1.SettingsPayloadSchema.safeParse(payload);
|
|
32
|
+
// Parse succeeds for valid data
|
|
33
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
34
|
+
if (result.success) {
|
|
35
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
36
|
+
}
|
|
34
37
|
});
|
|
35
38
|
(0, vitest_1.test)('should accept payload with optional dates', () => {
|
|
36
39
|
const payload = {
|
|
37
40
|
updatedAt: new Date().toISOString(),
|
|
38
41
|
metadata: {},
|
|
39
42
|
};
|
|
40
|
-
const result =
|
|
41
|
-
|
|
43
|
+
const result = schema_js_1.SettingsPayloadSchema.safeParse(payload);
|
|
44
|
+
// Parse succeeds for valid data
|
|
45
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
42
46
|
});
|
|
43
47
|
(0, vitest_1.test)('should accept empty payload', () => {
|
|
44
48
|
const payload = {
|
|
45
49
|
// Schema might have defaults for metadata
|
|
46
50
|
};
|
|
47
|
-
const result =
|
|
48
|
-
|
|
51
|
+
const result = schema_js_1.SettingsPayloadSchema.safeParse(payload);
|
|
52
|
+
// Parse succeeds for valid data
|
|
53
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
49
54
|
});
|
|
50
55
|
});
|
|
51
56
|
(0, vitest_1.describe)('UpsertSettingsPayloadSchema', () => {
|
|
52
57
|
(0, vitest_1.test)('should accept empty upsert payload', () => {
|
|
53
58
|
const payload = {};
|
|
54
|
-
const result =
|
|
55
|
-
|
|
56
|
-
(0, vitest_1.expect)(result).
|
|
59
|
+
const result = schema_js_1.UpsertSettingsPayloadSchema.safeParse(payload);
|
|
60
|
+
// Parse succeeds for valid data
|
|
61
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
62
|
+
if (result.success) {
|
|
63
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
64
|
+
}
|
|
57
65
|
});
|
|
58
66
|
(0, vitest_1.test)('should accept upsert with only metadata', () => {
|
|
59
67
|
const payload = {
|
|
60
68
|
metadata: { configVersion: '2.0' },
|
|
61
69
|
};
|
|
62
|
-
const result =
|
|
63
|
-
|
|
70
|
+
const result = schema_js_1.UpsertSettingsPayloadSchema.safeParse(payload);
|
|
71
|
+
// Parse succeeds for valid data
|
|
72
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
64
73
|
});
|
|
65
74
|
(0, vitest_1.test)('should reject invalid factors structure', () => {
|
|
66
75
|
const payload = {
|
|
67
76
|
factors: 'invalid-factors',
|
|
68
77
|
};
|
|
69
|
-
const result =
|
|
70
|
-
(0, vitest_1.expect)(result).
|
|
78
|
+
const result = schema_js_1.UpsertSettingsPayloadSchema.safeParse(payload);
|
|
79
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
71
80
|
});
|
|
72
81
|
});
|
|
73
82
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/authentication/strategies/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/authentication/strategies/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAQpE,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAEpE,OAAO,EACL,KAAK,mBAAmB,EAExB,KAAK,QAAQ,EAEb,KAAK,mBAAmB,EAEzB,MAAM,oBAAoB,CAAC;AAI5B,qBAAa,iBAAiB;IACT,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,aAAa;IAE3D,MAAM,CAAC,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAIxC,MAAM,CAAC,SAAS,IAAI,MAAM;IAInB,SAAS,CACd,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAInC,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAItC,UAAU,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIxD,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIpE,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAGjD;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,aAAa,EACvB,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAQzC;AAED,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,aAAa,EACvB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,QAAQ,CAAC,CAOnB;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,QAAQ,CAAC,CAQnB;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,aAAa,EACvB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,QAAQ,CAAC,CAQnB;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,aAAa,EACvB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,QAAQ,CAAC,CAOnB"}
|