@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,4 +1,3 @@
|
|
|
1
|
-
import { type } from 'arktype';
|
|
2
1
|
import { describe, expect, test } from 'vitest';
|
|
3
2
|
import { AuthorizationDisplay, AuthorizationDisplaySchema, AuthorizationPrompt, AuthorizationPromptSchema, CodeChallengeMethod, CodeChallengeMethodSchema, GrantType, GrantTypeLabel, OAuthScope, OIDCScope, OptionalSchema, ResponseType, Scope, ScopeSchema, } from './schema.js';
|
|
4
3
|
describe('OAuth Common Schema', () => {
|
|
@@ -60,14 +59,14 @@ describe('OAuth Common Schema', () => {
|
|
|
60
59
|
expect(CodeChallengeMethod.PLAIN).toBe('plain');
|
|
61
60
|
});
|
|
62
61
|
test('CodeChallengeMethodSchema should validate valid methods', () => {
|
|
63
|
-
const validResult1 = CodeChallengeMethodSchema('S256');
|
|
62
|
+
const validResult1 = CodeChallengeMethodSchema.parse('S256');
|
|
64
63
|
expect(validResult1).toBe('S256');
|
|
65
|
-
const validResult2 = CodeChallengeMethodSchema('plain');
|
|
64
|
+
const validResult2 = CodeChallengeMethodSchema.parse('plain');
|
|
66
65
|
expect(validResult2).toBe('plain');
|
|
67
66
|
});
|
|
68
67
|
test('CodeChallengeMethodSchema should reject invalid methods', () => {
|
|
69
|
-
const invalidResult = CodeChallengeMethodSchema('invalid_method');
|
|
70
|
-
expect(invalidResult).
|
|
68
|
+
const invalidResult = CodeChallengeMethodSchema.safeParse('invalid_method');
|
|
69
|
+
expect(invalidResult.success).toBe(false);
|
|
71
70
|
});
|
|
72
71
|
test('AnyCodeChallengeMethod type should work with valid values', () => {
|
|
73
72
|
const validMethods = ['S256', 'plain'];
|
|
@@ -86,13 +85,13 @@ describe('OAuth Common Schema', () => {
|
|
|
86
85
|
test('AuthorizationDisplaySchema should validate valid display values', () => {
|
|
87
86
|
const validDisplays = ['page', 'popup', 'touch', 'wap'];
|
|
88
87
|
for (const display of validDisplays) {
|
|
89
|
-
const result = AuthorizationDisplaySchema(display);
|
|
88
|
+
const result = AuthorizationDisplaySchema.parse(display);
|
|
90
89
|
expect(result).toBe(display);
|
|
91
90
|
}
|
|
92
91
|
});
|
|
93
92
|
test('AuthorizationDisplaySchema should reject invalid display values', () => {
|
|
94
|
-
const invalidResult = AuthorizationDisplaySchema('invalid_display');
|
|
95
|
-
expect(invalidResult).
|
|
93
|
+
const invalidResult = AuthorizationDisplaySchema.safeParse('invalid_display');
|
|
94
|
+
expect(invalidResult.success).toBe(false);
|
|
96
95
|
});
|
|
97
96
|
test('AnyAuthorizationDisplay type should work with valid values', () => {
|
|
98
97
|
const validDisplays = [
|
|
@@ -116,13 +115,13 @@ describe('OAuth Common Schema', () => {
|
|
|
116
115
|
test('AuthorizationPromptSchema should validate valid prompt values', () => {
|
|
117
116
|
const validPrompts = ['none', 'login', 'consent', 'select_account'];
|
|
118
117
|
for (const prompt of validPrompts) {
|
|
119
|
-
const result = AuthorizationPromptSchema(prompt);
|
|
118
|
+
const result = AuthorizationPromptSchema.parse(prompt);
|
|
120
119
|
expect(result).toBe(prompt);
|
|
121
120
|
}
|
|
122
121
|
});
|
|
123
122
|
test('AuthorizationPromptSchema should reject invalid prompt values', () => {
|
|
124
|
-
const invalidResult = AuthorizationPromptSchema('invalid_prompt');
|
|
125
|
-
expect(invalidResult).
|
|
123
|
+
const invalidResult = AuthorizationPromptSchema.safeParse('invalid_prompt');
|
|
124
|
+
expect(invalidResult.success).toBe(false);
|
|
126
125
|
});
|
|
127
126
|
test('AnyAuthorizationPrompt type should work with valid values', () => {
|
|
128
127
|
const validPrompts = [
|
|
@@ -138,18 +137,18 @@ describe('OAuth Common Schema', () => {
|
|
|
138
137
|
});
|
|
139
138
|
describe('OptionalSchema', () => {
|
|
140
139
|
test('should validate object with optional audience', () => {
|
|
141
|
-
const validWithAudience = OptionalSchema({
|
|
140
|
+
const validWithAudience = OptionalSchema.parse({
|
|
142
141
|
audience: 'https://api.example.com',
|
|
143
142
|
});
|
|
144
143
|
expect(validWithAudience).toEqual({
|
|
145
144
|
audience: 'https://api.example.com',
|
|
146
145
|
});
|
|
147
|
-
const validWithoutAudience = OptionalSchema({});
|
|
146
|
+
const validWithoutAudience = OptionalSchema.parse({});
|
|
148
147
|
expect(validWithoutAudience).toEqual({});
|
|
149
148
|
});
|
|
150
149
|
test('should reject non-string audience values', () => {
|
|
151
|
-
const invalidResult = OptionalSchema({ audience: 123 });
|
|
152
|
-
expect(invalidResult).
|
|
150
|
+
const invalidResult = OptionalSchema.safeParse({ audience: 123 });
|
|
151
|
+
expect(invalidResult.success).toBe(false);
|
|
153
152
|
});
|
|
154
153
|
test('should allow additional properties to be filtered', () => {
|
|
155
154
|
// Depending on schema configuration, extra properties might be filtered
|
|
@@ -157,7 +156,7 @@ describe('OAuth Common Schema', () => {
|
|
|
157
156
|
audience: 'https://api.example.com',
|
|
158
157
|
extraProperty: 'should be handled based on schema config',
|
|
159
158
|
};
|
|
160
|
-
const result = OptionalSchema(input);
|
|
159
|
+
const result = OptionalSchema.parse(input);
|
|
161
160
|
// The result depends on schema configuration (onUndeclaredKey behavior)
|
|
162
161
|
expect(result).toHaveProperty('audience', 'https://api.example.com');
|
|
163
162
|
});
|
|
@@ -222,15 +221,15 @@ describe('OAuth Common Schema', () => {
|
|
|
222
221
|
'offline_access',
|
|
223
222
|
];
|
|
224
223
|
for (const scope of validScopes) {
|
|
225
|
-
const result = ScopeSchema(scope);
|
|
224
|
+
const result = ScopeSchema.parse(scope);
|
|
226
225
|
expect(result).toBe(scope);
|
|
227
226
|
}
|
|
228
227
|
});
|
|
229
228
|
test('ScopeSchema should reject non-string values', () => {
|
|
230
229
|
const invalidValues = [123, true, null, undefined, {}, []];
|
|
231
230
|
for (const value of invalidValues) {
|
|
232
|
-
const result = ScopeSchema(value);
|
|
233
|
-
expect(result).
|
|
231
|
+
const result = ScopeSchema.safeParse(value);
|
|
232
|
+
expect(result.success).toBe(false);
|
|
234
233
|
}
|
|
235
234
|
});
|
|
236
235
|
});
|
|
@@ -263,25 +262,25 @@ describe('OAuth Common Schema', () => {
|
|
|
263
262
|
describe('Schema edge cases', () => {
|
|
264
263
|
test('should handle empty strings appropriately', () => {
|
|
265
264
|
const emptyString = '';
|
|
266
|
-
const scopeResult = ScopeSchema(emptyString);
|
|
265
|
+
const scopeResult = ScopeSchema.parse(emptyString);
|
|
267
266
|
expect(scopeResult).toBe(emptyString); // Empty string is valid string
|
|
268
|
-
const challengeResult = CodeChallengeMethodSchema(emptyString);
|
|
269
|
-
expect(challengeResult).
|
|
267
|
+
const challengeResult = CodeChallengeMethodSchema.safeParse(emptyString);
|
|
268
|
+
expect(challengeResult.success).toBe(false); // Empty string not valid enum
|
|
270
269
|
});
|
|
271
270
|
test('should handle whitespace and special characters', () => {
|
|
272
271
|
const spacedScope = ' openid profile ';
|
|
273
|
-
const result = ScopeSchema(spacedScope);
|
|
272
|
+
const result = ScopeSchema.parse(spacedScope);
|
|
274
273
|
expect(result).toBe(spacedScope); // Preserves whitespace
|
|
275
274
|
const specialScope = 'custom:read+write';
|
|
276
|
-
const specialResult = ScopeSchema(specialScope);
|
|
275
|
+
const specialResult = ScopeSchema.parse(specialScope);
|
|
277
276
|
expect(specialResult).toBe(specialScope);
|
|
278
277
|
});
|
|
279
278
|
test('should validate complex optional schema scenarios', () => {
|
|
280
|
-
const complexValid = OptionalSchema({
|
|
279
|
+
const complexValid = OptionalSchema.parse({
|
|
281
280
|
audience: 'urn:example:audience',
|
|
282
281
|
});
|
|
283
282
|
expect(complexValid.audience).toBe('urn:example:audience');
|
|
284
|
-
const emptyValid = OptionalSchema({});
|
|
283
|
+
const emptyValid = OptionalSchema.parse({});
|
|
285
284
|
expect(emptyValid).toEqual({});
|
|
286
285
|
});
|
|
287
286
|
});
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AuthorizationCodeSchema: z.ZodObject<{
|
|
3
|
+
code_verifier: z.ZodOptional<z.ZodString>;
|
|
4
|
+
grant_type: z.ZodEnum<{
|
|
5
|
+
authorization_code: "authorization_code";
|
|
6
|
+
}>;
|
|
7
|
+
code: z.ZodString;
|
|
8
|
+
client_id: z.ZodString;
|
|
9
|
+
client_secret: z.ZodOptional<z.ZodString>;
|
|
10
|
+
redirect_uri: z.ZodURL;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type AuthorizationCodePayload = z.output<typeof AuthorizationCodeSchema>;
|
|
10
13
|
//# sourceMappingURL=authorization-code.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization-code.d.ts","sourceRoot":"","sources":["../../../../../../src/oauth/token/schema/grants/authorization-code.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"authorization-code.d.ts","sourceRoot":"","sources":["../../../../../../src/oauth/token/schema/grants/authorization-code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,uBAAuB;;;;;;;;;iBAOlC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
import { GrantType } from '../../../common/schema.js';
|
|
3
3
|
/**
|
|
4
4
|
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.3
|
|
5
5
|
* @see https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3.1.3.1
|
|
6
6
|
*/
|
|
7
|
-
const GrantTypeSchema =
|
|
8
|
-
const PKCESchema =
|
|
9
|
-
code_verifier:
|
|
7
|
+
const GrantTypeSchema = z.enum([GrantType.AUTHORIZATION_CODE]);
|
|
8
|
+
const PKCESchema = z.object({
|
|
9
|
+
code_verifier: z.string().optional(),
|
|
10
10
|
});
|
|
11
|
-
export const AuthorizationCodeSchema =
|
|
11
|
+
export const AuthorizationCodeSchema = z.object({
|
|
12
12
|
grant_type: GrantTypeSchema,
|
|
13
|
-
code:
|
|
14
|
-
client_id:
|
|
15
|
-
client_secret:
|
|
16
|
-
redirect_uri:
|
|
17
|
-
|
|
13
|
+
code: z.string(),
|
|
14
|
+
client_id: z.string(),
|
|
15
|
+
client_secret: z.string().optional(),
|
|
16
|
+
redirect_uri: z.url(),
|
|
17
|
+
...PKCESchema.shape,
|
|
18
|
+
});
|
|
@@ -1,21 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
/**
|
|
2
3
|
* What the incoming body may look like.
|
|
3
4
|
*
|
|
4
5
|
* Note: the client_id and client_secrete may (likely) be in Authorization header
|
|
5
6
|
*/
|
|
6
|
-
export declare const ClientCredentialsPayloadSchema:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
export declare const ClientCredentialsPayloadSchema: z.ZodObject<{
|
|
8
|
+
audience: z.ZodOptional<z.ZodString>;
|
|
9
|
+
grant_type: z.ZodEnum<{
|
|
10
|
+
client_credentials: "client_credentials";
|
|
11
|
+
}>;
|
|
12
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
13
|
+
client_id: z.ZodOptional<z.ZodString>;
|
|
14
|
+
client_secret: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const ClientCredentialsSchema: z.ZodObject<{
|
|
17
|
+
client_id: z.ZodString;
|
|
18
|
+
client_secret: z.ZodString;
|
|
19
|
+
audience: z.ZodOptional<z.ZodString>;
|
|
20
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
21
|
+
grant_type: z.ZodEnum<{
|
|
22
|
+
client_credentials: "client_credentials";
|
|
23
|
+
}>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type ClientCredentialsPayload = z.output<typeof ClientCredentialsSchema>;
|
|
21
26
|
//# sourceMappingURL=client-credentials.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-credentials.d.ts","sourceRoot":"","sources":["../../../../../../src/oauth/token/schema/grants/client-credentials.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client-credentials.d.ts","sourceRoot":"","sources":["../../../../../../src/oauth/token/schema/grants/client-credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;iBAMzC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;iBAOlC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
import { AppIdSchema } from '../../../../app/schema.js';
|
|
3
3
|
import { GrantType, OptionalSchema } from '../../../common/schema.js';
|
|
4
4
|
/**
|
|
5
5
|
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.4.2
|
|
6
6
|
*/
|
|
7
|
-
const GrantTypeSchema =
|
|
7
|
+
const GrantTypeSchema = z.enum([GrantType.CLIENT_CREDENTIALS]);
|
|
8
8
|
/**
|
|
9
9
|
* What the incoming body may look like.
|
|
10
10
|
*
|
|
11
11
|
* Note: the client_id and client_secrete may (likely) be in Authorization header
|
|
12
12
|
*/
|
|
13
|
-
export const ClientCredentialsPayloadSchema =
|
|
13
|
+
export const ClientCredentialsPayloadSchema = z.object({
|
|
14
14
|
grant_type: GrantTypeSchema,
|
|
15
|
-
scope:
|
|
15
|
+
scope: z.string().optional(),
|
|
16
16
|
client_id: AppIdSchema.optional(),
|
|
17
|
-
client_secret:
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
client_secret: z.string().optional(),
|
|
18
|
+
...OptionalSchema.shape,
|
|
19
|
+
});
|
|
20
|
+
export const ClientCredentialsSchema = z.object({
|
|
21
|
+
...ClientCredentialsPayloadSchema.omit({
|
|
22
|
+
client_id: true,
|
|
23
|
+
client_secret: true,
|
|
24
|
+
}).shape,
|
|
20
25
|
client_id: AppIdSchema,
|
|
21
|
-
client_secret:
|
|
26
|
+
client_secret: z.string(),
|
|
22
27
|
});
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const RefreshTokenSchema: z.ZodObject<{
|
|
3
|
+
grant_type: z.ZodEnum<{
|
|
4
|
+
refresh_token: "refresh_token";
|
|
5
|
+
}>;
|
|
6
|
+
refresh_token: z.ZodString;
|
|
7
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
8
|
+
client_id: z.ZodString;
|
|
9
|
+
client_secret: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type RefreshTokenPayload = z.output<typeof RefreshTokenSchema>;
|
|
9
12
|
//# sourceMappingURL=refresh-token.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-token.d.ts","sourceRoot":"","sources":["../../../../../../src/oauth/token/schema/grants/refresh-token.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"refresh-token.d.ts","sourceRoot":"","sources":["../../../../../../src/oauth/token/schema/grants/refresh-token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,kBAAkB;;;;;;;;iBAM7B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
import { AppIdSchema } from '../../../../app/schema.js';
|
|
3
3
|
import { GrantType } from '../../../common/schema.js';
|
|
4
4
|
/**
|
|
5
5
|
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-6
|
|
6
6
|
*/
|
|
7
|
-
const GrantTypeSchema =
|
|
8
|
-
export const RefreshTokenSchema =
|
|
7
|
+
const GrantTypeSchema = z.enum([GrantType.REFRESH_TOKEN]);
|
|
8
|
+
export const RefreshTokenSchema = z.object({
|
|
9
9
|
grant_type: GrantTypeSchema,
|
|
10
|
-
refresh_token:
|
|
11
|
-
scope:
|
|
10
|
+
refresh_token: z.string(),
|
|
11
|
+
scope: z.string().optional(),
|
|
12
12
|
client_id: AppIdSchema,
|
|
13
|
-
client_secret:
|
|
13
|
+
client_secret: z.string(),
|
|
14
14
|
});
|
|
@@ -1,28 +1,35 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
1
2
|
export * from './grants/authorization-code.js';
|
|
2
3
|
export * from './grants/client-credentials.js';
|
|
3
4
|
export * from './grants/refresh-token.js';
|
|
4
5
|
/**
|
|
5
6
|
* Union(s)
|
|
6
7
|
*/
|
|
7
|
-
export declare const Schema:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
grant_type:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
export declare const Schema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
9
|
+
code_verifier: z.ZodOptional<z.ZodString>;
|
|
10
|
+
grant_type: z.ZodEnum<{
|
|
11
|
+
authorization_code: "authorization_code";
|
|
12
|
+
}>;
|
|
13
|
+
code: z.ZodString;
|
|
14
|
+
client_id: z.ZodString;
|
|
15
|
+
client_secret: z.ZodOptional<z.ZodString>;
|
|
16
|
+
redirect_uri: z.ZodURL;
|
|
17
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
+
client_id: z.ZodString;
|
|
19
|
+
client_secret: z.ZodString;
|
|
20
|
+
audience: z.ZodOptional<z.ZodString>;
|
|
21
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
22
|
+
grant_type: z.ZodEnum<{
|
|
23
|
+
client_credentials: "client_credentials";
|
|
24
|
+
}>;
|
|
25
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
26
|
+
grant_type: z.ZodEnum<{
|
|
27
|
+
refresh_token: "refresh_token";
|
|
28
|
+
}>;
|
|
29
|
+
refresh_token: z.ZodString;
|
|
30
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
31
|
+
client_id: z.ZodString;
|
|
32
|
+
client_secret: z.ZodString;
|
|
33
|
+
}, z.core.$strip>]>;
|
|
34
|
+
export type Payload = z.output<typeof Schema>;
|
|
28
35
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/oauth/token/schema/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/oauth/token/schema/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAM7B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;mBAElB,CAAC;AACF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type } from 'arktype';
|
|
2
1
|
import { describe, expect, test } from 'vitest';
|
|
3
2
|
import { generateAppId } from '../../../app/utils.js';
|
|
4
3
|
import { Schema } from './schema.js';
|
|
@@ -11,9 +10,12 @@ describe('OAuth Token - Schema', () => {
|
|
|
11
10
|
client_id: generateAppId(),
|
|
12
11
|
redirect_uri: 'https://example.com/callback',
|
|
13
12
|
};
|
|
14
|
-
const result = Schema(payload);
|
|
15
|
-
|
|
16
|
-
expect(result).
|
|
13
|
+
const result = Schema.safeParse(payload);
|
|
14
|
+
// Parse succeeds for valid data
|
|
15
|
+
expect(result.success).toBe(true);
|
|
16
|
+
if (result.success) {
|
|
17
|
+
expect(result.data).toEqual(payload);
|
|
18
|
+
}
|
|
17
19
|
});
|
|
18
20
|
test('should accept authorization code with PKCE', () => {
|
|
19
21
|
const payload = {
|
|
@@ -23,9 +25,12 @@ describe('OAuth Token - Schema', () => {
|
|
|
23
25
|
redirect_uri: 'https://example.com/callback',
|
|
24
26
|
code_verifier: 'pkce_verifier_123',
|
|
25
27
|
};
|
|
26
|
-
const result = Schema(payload);
|
|
27
|
-
|
|
28
|
-
expect(result).
|
|
28
|
+
const result = Schema.safeParse(payload);
|
|
29
|
+
// Parse succeeds for valid data
|
|
30
|
+
expect(result.success).toBe(true);
|
|
31
|
+
if (result.success) {
|
|
32
|
+
expect(result.data).toEqual(payload);
|
|
33
|
+
}
|
|
29
34
|
});
|
|
30
35
|
test('should accept authorization code with client secret', () => {
|
|
31
36
|
const payload = {
|
|
@@ -35,9 +40,12 @@ describe('OAuth Token - Schema', () => {
|
|
|
35
40
|
client_secret: 'secret_123',
|
|
36
41
|
redirect_uri: 'https://example.com/callback',
|
|
37
42
|
};
|
|
38
|
-
const result = Schema(payload);
|
|
39
|
-
|
|
40
|
-
expect(result).
|
|
43
|
+
const result = Schema.safeParse(payload);
|
|
44
|
+
// Parse succeeds for valid data
|
|
45
|
+
expect(result.success).toBe(true);
|
|
46
|
+
if (result.success) {
|
|
47
|
+
expect(result.data).toEqual(payload);
|
|
48
|
+
}
|
|
41
49
|
});
|
|
42
50
|
test('should accept client credentials grant', () => {
|
|
43
51
|
const payload = {
|
|
@@ -46,9 +54,12 @@ describe('OAuth Token - Schema', () => {
|
|
|
46
54
|
client_secret: 'secret_123',
|
|
47
55
|
scope: 'read write',
|
|
48
56
|
};
|
|
49
|
-
const result = Schema(payload);
|
|
50
|
-
|
|
51
|
-
expect(result).
|
|
57
|
+
const result = Schema.safeParse(payload);
|
|
58
|
+
// Parse succeeds for valid data
|
|
59
|
+
expect(result.success).toBe(true);
|
|
60
|
+
if (result.success) {
|
|
61
|
+
expect(result.data).toEqual(payload);
|
|
62
|
+
}
|
|
52
63
|
});
|
|
53
64
|
test('should accept refresh token grant', () => {
|
|
54
65
|
const payload = {
|
|
@@ -58,9 +69,12 @@ describe('OAuth Token - Schema', () => {
|
|
|
58
69
|
client_secret: 'secret_123',
|
|
59
70
|
scope: 'read',
|
|
60
71
|
};
|
|
61
|
-
const result = Schema(payload);
|
|
62
|
-
|
|
63
|
-
expect(result).
|
|
72
|
+
const result = Schema.safeParse(payload);
|
|
73
|
+
// Parse succeeds for valid data
|
|
74
|
+
expect(result.success).toBe(true);
|
|
75
|
+
if (result.success) {
|
|
76
|
+
expect(result.data).toEqual(payload);
|
|
77
|
+
}
|
|
64
78
|
});
|
|
65
79
|
test('should reject invalid grant type', () => {
|
|
66
80
|
const payload = {
|
|
@@ -69,8 +83,8 @@ describe('OAuth Token - Schema', () => {
|
|
|
69
83
|
client_id: generateAppId(),
|
|
70
84
|
redirect_uri: 'https://example.com/callback',
|
|
71
85
|
};
|
|
72
|
-
const result = Schema(payload);
|
|
73
|
-
expect(result).
|
|
86
|
+
const result = Schema.safeParse(payload);
|
|
87
|
+
expect(result.success).toBe(false);
|
|
74
88
|
});
|
|
75
89
|
test('should reject authorization code without required fields', () => {
|
|
76
90
|
const payload = {
|
|
@@ -78,8 +92,8 @@ describe('OAuth Token - Schema', () => {
|
|
|
78
92
|
client_id: generateAppId(),
|
|
79
93
|
// missing code and redirect_uri
|
|
80
94
|
};
|
|
81
|
-
const result = Schema(payload);
|
|
82
|
-
expect(result).
|
|
95
|
+
const result = Schema.safeParse(payload);
|
|
96
|
+
expect(result.success).toBe(false);
|
|
83
97
|
});
|
|
84
98
|
test('should reject invalid redirect URI', () => {
|
|
85
99
|
const payload = {
|
|
@@ -88,8 +102,8 @@ describe('OAuth Token - Schema', () => {
|
|
|
88
102
|
client_id: generateAppId(),
|
|
89
103
|
redirect_uri: 'not-a-valid-url',
|
|
90
104
|
};
|
|
91
|
-
const result = Schema(payload);
|
|
92
|
-
expect(result).
|
|
105
|
+
const result = Schema.safeParse(payload);
|
|
106
|
+
expect(result.success).toBe(false);
|
|
93
107
|
});
|
|
94
108
|
test('should reject client credentials without required fields', () => {
|
|
95
109
|
const payload = {
|
|
@@ -97,8 +111,8 @@ describe('OAuth Token - Schema', () => {
|
|
|
97
111
|
client_id: generateAppId(),
|
|
98
112
|
// missing client_secret
|
|
99
113
|
};
|
|
100
|
-
const result = Schema(payload);
|
|
101
|
-
expect(result).
|
|
114
|
+
const result = Schema.safeParse(payload);
|
|
115
|
+
expect(result.success).toBe(false);
|
|
102
116
|
});
|
|
103
117
|
test('should reject refresh token without required fields', () => {
|
|
104
118
|
const payload = {
|
|
@@ -106,15 +120,15 @@ describe('OAuth Token - Schema', () => {
|
|
|
106
120
|
client_id: 'app_123',
|
|
107
121
|
// missing refresh_token and client_secret
|
|
108
122
|
};
|
|
109
|
-
const result = Schema(payload);
|
|
110
|
-
expect(result).
|
|
123
|
+
const result = Schema.safeParse(payload);
|
|
124
|
+
expect(result.success).toBe(false);
|
|
111
125
|
});
|
|
112
126
|
test('should reject completely invalid payload', () => {
|
|
113
127
|
const payload = {
|
|
114
128
|
invalid: 'data',
|
|
115
129
|
};
|
|
116
|
-
const result = Schema(payload);
|
|
117
|
-
expect(result).
|
|
130
|
+
const result = Schema.safeParse(payload);
|
|
131
|
+
expect(result.success).toBe(false);
|
|
118
132
|
});
|
|
119
133
|
});
|
|
120
134
|
});
|
|
@@ -1,31 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
export declare const DEFAULT_SESSION_DURATION: number;
|
|
2
3
|
export declare const DEFAULT_REFRESH_TOKEN_DURATION: number;
|
|
3
4
|
export declare const DEFAULT_ACCESS_TOKEN_DURATION: number;
|
|
4
|
-
export declare const AuthorizationPayloadSchema:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
5
|
+
export declare const AuthorizationPayloadSchema: z.ZodObject<{
|
|
6
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodCustom<Map<string, string | number | boolean>, Map<string, string | number | boolean>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<Record<string, string | number | boolean> | undefined, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>;
|
|
7
|
+
updatedAt: z.ZodOptional<z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>, z.ZodTransform<string | undefined, Date | undefined>>>;
|
|
8
|
+
deletedAt: z.ZodOptional<z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>, z.ZodTransform<string | undefined, Date | undefined>>>;
|
|
9
|
+
deactivatedAt: z.ZodOptional<z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>, z.ZodTransform<string | undefined, Date | undefined>>>;
|
|
10
|
+
sessionDuration: z.ZodDefault<z.ZodNumber>;
|
|
11
|
+
refreshTokenDuration: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
accessTokenDuration: z.ZodDefault<z.ZodNumber>;
|
|
13
|
+
accessTokenSignatureAlgorithm: z.ZodDefault<z.ZodEnum<{
|
|
14
|
+
RS256: "RS256";
|
|
15
|
+
HS256: "HS256";
|
|
16
|
+
HS384: "HS384";
|
|
17
|
+
HS512: "HS512";
|
|
18
|
+
RS384: "RS384";
|
|
19
|
+
RS512: "RS512";
|
|
20
|
+
ES256: "ES256";
|
|
21
|
+
ES384: "ES384";
|
|
22
|
+
PS256: "PS256";
|
|
23
|
+
PS384: "PS384";
|
|
24
|
+
PS512: "PS512";
|
|
25
|
+
}>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type AuthorizationPayload = z.output<typeof AuthorizationPayloadSchema>;
|
|
28
|
+
export declare const UpsertAuthorizationPayloadSchema: z.ZodObject<{
|
|
29
|
+
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>>>;
|
|
30
|
+
sessionDuration: z.ZodDefault<z.ZodNumber>;
|
|
31
|
+
refreshTokenDuration: z.ZodDefault<z.ZodNumber>;
|
|
32
|
+
accessTokenDuration: z.ZodDefault<z.ZodNumber>;
|
|
33
|
+
accessTokenSignatureAlgorithm: z.ZodDefault<z.ZodEnum<{
|
|
34
|
+
RS256: "RS256";
|
|
35
|
+
HS256: "HS256";
|
|
36
|
+
HS384: "HS384";
|
|
37
|
+
HS512: "HS512";
|
|
38
|
+
RS384: "RS384";
|
|
39
|
+
RS512: "RS512";
|
|
40
|
+
ES256: "ES256";
|
|
41
|
+
ES384: "ES384";
|
|
42
|
+
PS256: "PS256";
|
|
43
|
+
PS384: "PS384";
|
|
44
|
+
PS512: "PS512";
|
|
45
|
+
}>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
export type UpsertAuthorizationPayload = z.output<typeof UpsertAuthorizationPayloadSchema>;
|
|
31
48
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/workspace/authorization/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/workspace/authorization/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,wBAAwB,QAAc,CAAC;AACpD,eAAO,MAAM,8BAA8B,QAAoB,CAAC;AAChE,eAAO,MAAM,6BAA6B,QAAc,CAAC;AASzD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;iBAMrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE/E,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;iBAG3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAC/C,OAAO,gCAAgC,CACxC,CAAC"}
|