@go-mondo/identity-sdk 0.0.2-beta.9 → 0.0.2-beta.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yaml +1 -1
- package/.release-please-manifest.json +1 -1
- package/.tsbuildinfo/cjs.json +1 -1
- package/.tsbuildinfo/esm.json +1 -1
- package/CHANGELOG.md +582 -0
- package/README.md +384 -2
- package/dist/cjs/action/schema/base.d.ts +21 -21
- package/dist/cjs/action/schema/base.d.ts.map +1 -1
- package/dist/cjs/action/schema/base.js +48 -10
- package/dist/cjs/action/schema/base.test.js +50 -35
- package/dist/cjs/action/schema/operations/sign-up-verification.d.ts +21 -21
- package/dist/cjs/action/schema/operations/sign-up-verification.d.ts.map +1 -1
- package/dist/cjs/action/schema/operations/sign-up-verification.js +41 -7
- package/dist/cjs/action/schema/operations/sign-up-verification.test.js +28 -29
- package/dist/cjs/action/schema/operations/sign-up.d.ts +40 -43
- package/dist/cjs/action/schema/operations/sign-up.d.ts.map +1 -1
- package/dist/cjs/action/schema/operations/sign-up.js +57 -15
- package/dist/cjs/action/schema/operations/sign-up.test.js +40 -35
- package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts +19 -19
- package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts.map +1 -1
- package/dist/cjs/action/schema/operations/user-attribute-verification.js +39 -5
- package/dist/cjs/action/schema/operations/user-attribute-verification.test.js +25 -26
- package/dist/cjs/action/schema/schema.d.ts +49 -77
- package/dist/cjs/action/schema/schema.d.ts.map +1 -1
- package/dist/cjs/action/schema/schema.js +7 -5
- package/dist/cjs/action/schema/schema.test.js +31 -58
- package/dist/cjs/activity/resources.d.ts +3 -3
- package/dist/cjs/activity/resources.d.ts.map +1 -1
- package/dist/cjs/activity/resources.js +2 -2
- package/dist/cjs/activity/resources.test.js +14 -13
- package/dist/cjs/activity/schema/base.d.ts +88 -69
- package/dist/cjs/activity/schema/base.d.ts.map +1 -1
- package/dist/cjs/activity/schema/base.js +71 -26
- package/dist/cjs/activity/schema/base.test.js +85 -55
- package/dist/cjs/activity/schema/schema.d.ts +293 -226
- package/dist/cjs/activity/schema/schema.d.ts.map +1 -1
- package/dist/cjs/activity/schema/schema.test.js +47 -48
- package/dist/cjs/activity/schema/types/authentication.d.ts +64 -46
- package/dist/cjs/activity/schema/types/authentication.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/authentication.js +49 -7
- package/dist/cjs/activity/schema/types/authentication.test.js +37 -38
- package/dist/cjs/activity/schema/types/authorization.d.ts +64 -46
- package/dist/cjs/activity/schema/types/authorization.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/authorization.js +49 -7
- package/dist/cjs/activity/schema/types/authorization.test.js +41 -42
- package/dist/cjs/activity/schema/types/note.d.ts +83 -70
- package/dist/cjs/activity/schema/types/note.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/note.js +53 -12
- package/dist/cjs/activity/schema/types/note.test.js +48 -49
- package/dist/cjs/activity/schema/types/operation.d.ts +64 -45
- package/dist/cjs/activity/schema/types/operation.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/operation.js +52 -8
- package/dist/cjs/activity/schema/types/operation.test.js +34 -35
- package/dist/cjs/activity/schema/types/unknown.d.ts +50 -41
- package/dist/cjs/activity/schema/types/unknown.d.ts.map +1 -1
- package/dist/cjs/activity/schema/types/unknown.js +45 -6
- package/dist/cjs/activity/schema/types/unknown.test.js +29 -30
- package/dist/cjs/app/authorization/resources.d.ts +4 -4
- package/dist/cjs/app/authorization/resources.d.ts.map +1 -1
- package/dist/cjs/app/authorization/resources.js +2 -6
- package/dist/cjs/app/authorization/schema.d.ts +90 -52
- package/dist/cjs/app/authorization/schema.d.ts.map +1 -1
- package/dist/cjs/app/authorization/schema.js +90 -65
- package/dist/cjs/app/authorization/schema.test.js +155 -74
- package/dist/cjs/app/oauth/resources.d.ts +4 -4
- package/dist/cjs/app/oauth/resources.d.ts.map +1 -1
- package/dist/cjs/app/oauth/resources.js +2 -3
- package/dist/cjs/app/oauth/schema.d.ts +34 -41
- package/dist/cjs/app/oauth/schema.d.ts.map +1 -1
- package/dist/cjs/app/oauth/schema.js +56 -17
- package/dist/cjs/app/oauth/schema.test.js +39 -40
- package/dist/cjs/app/oidc/resources.d.ts +6 -6
- package/dist/cjs/app/oidc/resources.d.ts.map +1 -1
- package/dist/cjs/app/oidc/resources.js +4 -5
- package/dist/cjs/app/oidc/schema.d.ts +26 -37
- package/dist/cjs/app/oidc/schema.d.ts.map +1 -1
- package/dist/cjs/app/oidc/schema.js +50 -13
- package/dist/cjs/app/oidc/schema.test.js +46 -27
- package/dist/cjs/app/registration/resources.d.ts +4 -4
- package/dist/cjs/app/registration/resources.d.ts.map +1 -1
- package/dist/cjs/app/registration/resources.js +2 -3
- package/dist/cjs/app/registration/resources.test.js +14 -13
- package/dist/cjs/app/registration/schema.d.ts +24 -31
- package/dist/cjs/app/registration/schema.d.ts.map +1 -1
- package/dist/cjs/app/registration/schema.js +56 -16
- package/dist/cjs/app/registration/schema.test.js +68 -150
- package/dist/cjs/app/resources.d.ts +7 -7
- package/dist/cjs/app/resources.d.ts.map +1 -1
- package/dist/cjs/app/resources.js +6 -6
- package/dist/cjs/app/resources.test.js +14 -13
- package/dist/cjs/app/saml/resources.d.ts +6 -6
- package/dist/cjs/app/saml/resources.d.ts.map +1 -1
- package/dist/cjs/app/saml/resources.js +4 -5
- package/dist/cjs/app/saml/schema.d.ts +26 -37
- package/dist/cjs/app/saml/schema.d.ts.map +1 -1
- package/dist/cjs/app/saml/schema.js +50 -13
- package/dist/cjs/app/schema.d.ts +72 -68
- package/dist/cjs/app/schema.d.ts.map +1 -1
- package/dist/cjs/app/schema.js +76 -35
- package/dist/cjs/app/schema.test.js +128 -42
- package/dist/cjs/association/resources.d.ts +5 -5
- package/dist/cjs/association/resources.d.ts.map +1 -1
- package/dist/cjs/association/resources.js +4 -6
- package/dist/cjs/association/schema.d.ts +270 -182
- package/dist/cjs/association/schema.d.ts.map +1 -1
- package/dist/cjs/association/schema.js +70 -32
- package/dist/cjs/association/schema.test.js +13 -54
- package/dist/cjs/authentication/factors/schema.d.ts +39 -49
- package/dist/cjs/authentication/factors/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/factors/schema.js +59 -20
- package/dist/cjs/authentication/factors/schema.test.js +33 -34
- package/dist/cjs/authentication/index.d.ts +1 -0
- package/dist/cjs/authentication/index.d.ts.map +1 -1
- package/dist/cjs/authentication/index.js +2 -0
- package/dist/cjs/authentication/providers/schema.d.ts +23 -22
- package/dist/cjs/authentication/providers/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/providers/schema.js +44 -9
- package/dist/cjs/authentication/sessions/resources.d.ts +4 -4
- package/dist/cjs/authentication/sessions/resources.d.ts.map +1 -1
- package/dist/cjs/authentication/sessions/resources.js +3 -3
- package/dist/cjs/authentication/sessions/schema.d.ts +96 -74
- package/dist/cjs/authentication/sessions/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/sessions/schema.js +99 -33
- package/dist/cjs/authentication/sessions/schema.test.d.ts +2 -0
- package/dist/cjs/authentication/sessions/schema.test.d.ts.map +1 -0
- package/dist/cjs/authentication/sessions/schema.test.js +65 -0
- package/dist/cjs/authentication/settings/resources.d.ts +4 -4
- package/dist/cjs/authentication/settings/resources.d.ts.map +1 -1
- package/dist/cjs/authentication/settings/resources.js +2 -3
- package/dist/cjs/authentication/settings/schema.d.ts +45 -62
- package/dist/cjs/authentication/settings/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/settings/schema.js +49 -14
- package/dist/cjs/authentication/settings/schema.test.js +409 -22
- package/dist/cjs/authentication/strategies/resources.d.ts +9 -8
- package/dist/cjs/authentication/strategies/resources.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/resources.js +11 -11
- package/dist/cjs/authentication/strategies/schema/base.d.ts +59 -53
- package/dist/cjs/authentication/strategies/schema/base.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/base.js +68 -24
- package/dist/cjs/authentication/strategies/schema/schema.d.ts +126 -200
- package/dist/cjs/authentication/strategies/schema/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/schema.js +39 -6
- package/dist/cjs/authentication/strategies/schema/types/email.d.ts +62 -61
- package/dist/cjs/authentication/strategies/schema/types/email.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/types/email.js +59 -16
- package/dist/cjs/authentication/strategies/schema/types/email.test.js +49 -49
- package/dist/cjs/authentication/strategies/schema/types/totp.d.ts +108 -95
- package/dist/cjs/authentication/strategies/schema/types/totp.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/types/totp.js +83 -26
- package/dist/cjs/authorization/permissions/resources.d.ts +7 -7
- package/dist/cjs/authorization/permissions/resources.d.ts.map +1 -1
- package/dist/cjs/authorization/permissions/resources.js +6 -6
- package/dist/cjs/authorization/permissions/schema.d.ts +92 -88
- package/dist/cjs/authorization/permissions/schema.d.ts.map +1 -1
- package/dist/cjs/authorization/permissions/schema.js +78 -37
- package/dist/cjs/authorization/permissions/schema.test.js +54 -62
- package/dist/cjs/authorization/roles/resources.d.ts +7 -7
- package/dist/cjs/authorization/roles/resources.d.ts.map +1 -1
- package/dist/cjs/authorization/roles/resources.js +6 -6
- package/dist/cjs/authorization/roles/schema.d.ts +102 -98
- package/dist/cjs/authorization/roles/schema.d.ts.map +1 -1
- package/dist/cjs/authorization/roles/schema.js +74 -38
- package/dist/cjs/authorization/roles/schema.test.js +55 -62
- package/dist/cjs/authorization/schema.d.ts +7 -6
- package/dist/cjs/authorization/schema.d.ts.map +1 -1
- package/dist/cjs/authorization/schema.js +42 -3
- package/dist/cjs/common/index.d.ts +2 -0
- package/dist/cjs/common/index.d.ts.map +1 -1
- package/dist/cjs/common/resources/authorization.d.ts +18 -1
- package/dist/cjs/common/resources/authorization.d.ts.map +1 -1
- package/dist/cjs/common/resources/authorization.js +6 -0
- package/dist/cjs/common/resources/init.d.ts +28 -11
- package/dist/cjs/common/resources/init.d.ts.map +1 -1
- package/dist/cjs/common/resources/init.js +81 -21
- package/dist/cjs/common/resources/init.test.js +62 -38
- package/dist/cjs/common/resources/operations.d.ts +7 -6
- package/dist/cjs/common/resources/operations.d.ts.map +1 -1
- package/dist/cjs/common/resources/operations.js +44 -21
- package/dist/cjs/common/resources/operations.test.js +47 -17
- package/dist/cjs/common/resources/utils.d.ts +0 -9
- package/dist/cjs/common/resources/utils.d.ts.map +1 -1
- package/dist/cjs/common/resources/utils.js +0 -26
- package/dist/cjs/common/resources/utils.test.js +2 -31
- package/dist/cjs/common/schema/aggregate.d.ts +6 -5
- package/dist/cjs/common/schema/aggregate.d.ts.map +1 -1
- package/dist/cjs/common/schema/aggregate.js +37 -4
- package/dist/cjs/common/schema/aggregate.test.js +21 -22
- package/dist/cjs/common/schema/collection.d.ts +13 -14
- package/dist/cjs/common/schema/collection.d.ts.map +1 -1
- package/dist/cjs/common/schema/collection.js +40 -5
- package/dist/cjs/common/schema/collection.test.js +99 -48
- package/dist/cjs/common/schema/dates.d.ts +43 -26
- package/dist/cjs/common/schema/dates.d.ts.map +1 -1
- package/dist/cjs/common/schema/dates.js +63 -12
- package/dist/cjs/common/schema/dates.test.js +24 -13
- package/dist/cjs/common/schema/id.d.ts +2 -1
- package/dist/cjs/common/schema/id.d.ts.map +1 -1
- package/dist/cjs/common/schema/id.js +35 -2
- package/dist/cjs/common/schema/id.test.js +70 -38
- package/dist/cjs/common/schema/jwt.d.ts +22 -14
- package/dist/cjs/common/schema/jwt.d.ts.map +1 -1
- package/dist/cjs/common/schema/jwt.js +37 -8
- package/dist/cjs/common/schema/jwt.test.js +22 -25
- package/dist/cjs/common/schema/metadata.d.ts +86 -49
- package/dist/cjs/common/schema/metadata.d.ts.map +1 -1
- package/dist/cjs/common/schema/metadata.js +154 -75
- package/dist/cjs/common/schema/metadata.test.js +198 -67
- package/dist/cjs/common/schema/pagination.d.ts +15 -5
- package/dist/cjs/common/schema/pagination.d.ts.map +1 -1
- package/dist/cjs/common/schema/pagination.js +46 -4
- package/dist/cjs/common/schema/pagination.test.js +55 -36
- package/dist/cjs/common/schema/schema.d.ts +4 -4
- package/dist/cjs/common/schema/schema.d.ts.map +1 -1
- package/dist/cjs/common/schema/schema.js +28 -5
- package/dist/cjs/common/schema/schema.test.js +42 -15
- package/dist/cjs/common/schema/sets.d.ts +6 -2
- package/dist/cjs/common/schema/sets.d.ts.map +1 -1
- package/dist/cjs/common/schema/sets.js +50 -7
- package/dist/cjs/common/schema/url.d.ts +21 -0
- package/dist/cjs/common/schema/url.d.ts.map +1 -1
- package/dist/cjs/common/schema/url.js +79 -0
- package/dist/cjs/common/schema/url.test.js +10 -0
- package/dist/cjs/customer/organization/schema.d.ts +59 -46
- package/dist/cjs/customer/organization/schema.d.ts.map +1 -1
- package/dist/cjs/customer/organization/schema.js +76 -26
- package/dist/cjs/customer/schema.d.ts +7 -6
- package/dist/cjs/customer/schema.d.ts.map +1 -1
- package/dist/cjs/customer/schema.js +42 -3
- package/dist/cjs/customer/users/resources.d.ts +7 -7
- package/dist/cjs/customer/users/resources.d.ts.map +1 -1
- package/dist/cjs/customer/users/resources.js +6 -6
- package/dist/cjs/customer/users/schema.d.ts +213 -104
- package/dist/cjs/customer/users/schema.d.ts.map +1 -1
- package/dist/cjs/customer/users/schema.js +145 -56
- package/dist/cjs/customer/users/schema.test.js +600 -60
- package/dist/cjs/customer/users/utils.d.ts +3 -2
- package/dist/cjs/customer/users/utils.d.ts.map +1 -1
- package/dist/cjs/identity/schema.d.ts +5 -1
- package/dist/cjs/identity/schema.d.ts.map +1 -1
- package/dist/cjs/identity/schema.js +38 -2
- package/dist/cjs/identity/schema.test.js +21 -16
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.d.ts +34 -28
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.d.ts.map +1 -1
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.js +93 -38
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.test.js +47 -48
- package/dist/cjs/oauth/authorize/schema/grants/common.d.ts +6 -0
- package/dist/cjs/oauth/authorize/schema/grants/common.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/schema/grants/common.js +47 -0
- package/dist/cjs/oauth/authorize/schema/grants/implicit.d.ts +18 -10
- package/dist/cjs/oauth/authorize/schema/grants/implicit.d.ts.map +1 -1
- package/dist/cjs/oauth/authorize/schema/grants/implicit.js +56 -11
- package/dist/cjs/oauth/authorize/schema/schema.d.ts +48 -36
- package/dist/cjs/oauth/authorize/schema/schema.d.ts.map +1 -1
- package/dist/cjs/oauth/authorize/schema/schema.js +4 -2
- package/dist/cjs/oauth/common/schema.d.ts +24 -7
- package/dist/cjs/oauth/common/schema.d.ts.map +1 -1
- package/dist/cjs/oauth/common/schema.js +59 -8
- package/dist/cjs/oauth/common/schema.test.js +22 -30
- package/dist/cjs/oauth/index.d.ts +3 -3
- package/dist/cjs/oauth/index.d.ts.map +1 -1
- package/dist/cjs/oauth/index.js +8 -25
- package/dist/cjs/oauth/token/schema/grants/authorization-code.d.ts +16 -9
- package/dist/cjs/oauth/token/schema/grants/authorization-code.d.ts.map +1 -1
- package/dist/cjs/oauth/token/schema/grants/authorization-code.js +66 -12
- package/dist/cjs/oauth/token/schema/grants/client-credentials.d.ts +16 -17
- package/dist/cjs/oauth/token/schema/grants/client-credentials.d.ts.map +1 -1
- package/dist/cjs/oauth/token/schema/grants/client-credentials.js +53 -16
- package/dist/cjs/oauth/token/schema/grants/common.d.ts +6 -0
- package/dist/cjs/oauth/token/schema/grants/common.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/grants/common.js +52 -0
- package/dist/cjs/oauth/token/schema/grants/refresh-token.d.ts +15 -8
- package/dist/cjs/oauth/token/schema/grants/refresh-token.d.ts.map +1 -1
- package/dist/cjs/oauth/token/schema/grants/refresh-token.js +57 -11
- package/dist/cjs/oauth/token/schema/schema.d.ts +48 -21
- package/dist/cjs/oauth/token/schema/schema.d.ts.map +1 -1
- package/dist/cjs/oauth/token/schema/schema.js +79 -2
- package/dist/cjs/oauth/token/schema/schema.test.js +44 -28
- package/dist/cjs/workspace/authorization/schema.d.ts +62 -27
- package/dist/cjs/workspace/authorization/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/authorization/schema.js +58 -13
- package/dist/cjs/workspace/branding/schema.d.ts +47 -37
- package/dist/cjs/workspace/branding/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/branding/schema.js +61 -16
- package/dist/cjs/workspace/membership/schema.d.ts +42 -20
- package/dist/cjs/workspace/membership/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/membership/schema.js +47 -7
- package/dist/cjs/workspace/registration/schema.d.ts +41 -27
- package/dist/cjs/workspace/registration/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/registration/schema.js +63 -14
- package/dist/cjs/workspace/settings/schema.d.ts +20 -19
- package/dist/cjs/workspace/settings/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/settings/schema.js +48 -8
- package/dist/cjs/workspace/settings/schema.test.js +18 -19
- package/dist/cjs/workspace/tenant/schema.d.ts +88 -57
- package/dist/cjs/workspace/tenant/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/tenant/schema.js +59 -13
- package/dist/cjs/workspace/tenant/schema.test.d.ts +2 -0
- package/dist/cjs/workspace/tenant/schema.test.d.ts.map +1 -0
- package/dist/cjs/workspace/tenant/schema.test.js +235 -0
- package/dist/cjs/workspace/user/notifications/schema.d.ts +70 -56
- package/dist/cjs/workspace/user/notifications/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/user/notifications/schema.js +76 -30
- package/dist/cjs/workspace/user/preferences/schema.d.ts +29 -25
- package/dist/cjs/workspace/user/preferences/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/user/preferences/schema.js +57 -12
- package/dist/esm/action/schema/base.d.ts +21 -21
- package/dist/esm/action/schema/base.d.ts.map +1 -1
- package/dist/esm/action/schema/base.js +17 -12
- package/dist/esm/action/schema/base.test.js +51 -36
- package/dist/esm/action/schema/operations/sign-up-verification.d.ts +21 -21
- package/dist/esm/action/schema/operations/sign-up-verification.d.ts.map +1 -1
- package/dist/esm/action/schema/operations/sign-up-verification.js +8 -7
- package/dist/esm/action/schema/operations/sign-up-verification.test.js +28 -29
- package/dist/esm/action/schema/operations/sign-up.d.ts +40 -43
- package/dist/esm/action/schema/operations/sign-up.d.ts.map +1 -1
- package/dist/esm/action/schema/operations/sign-up.js +19 -10
- package/dist/esm/action/schema/operations/sign-up.test.js +40 -35
- package/dist/esm/action/schema/operations/user-attribute-verification.d.ts +19 -19
- package/dist/esm/action/schema/operations/user-attribute-verification.d.ts.map +1 -1
- package/dist/esm/action/schema/operations/user-attribute-verification.js +6 -5
- package/dist/esm/action/schema/operations/user-attribute-verification.test.js +25 -26
- package/dist/esm/action/schema/schema.d.ts +49 -77
- package/dist/esm/action/schema/schema.d.ts.map +1 -1
- package/dist/esm/action/schema/schema.js +7 -5
- package/dist/esm/action/schema/schema.test.js +24 -51
- package/dist/esm/activity/resources.d.ts +3 -3
- package/dist/esm/activity/resources.d.ts.map +1 -1
- package/dist/esm/activity/resources.js +4 -4
- package/dist/esm/activity/resources.test.js +14 -13
- package/dist/esm/activity/schema/base.d.ts +88 -69
- package/dist/esm/activity/schema/base.d.ts.map +1 -1
- package/dist/esm/activity/schema/base.js +38 -26
- package/dist/esm/activity/schema/base.test.js +85 -55
- package/dist/esm/activity/schema/schema.d.ts +293 -226
- package/dist/esm/activity/schema/schema.d.ts.map +1 -1
- package/dist/esm/activity/schema/schema.test.js +47 -48
- package/dist/esm/activity/schema/types/authentication.d.ts +64 -46
- package/dist/esm/activity/schema/types/authentication.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/authentication.js +16 -7
- package/dist/esm/activity/schema/types/authentication.test.js +37 -38
- package/dist/esm/activity/schema/types/authorization.d.ts +64 -46
- package/dist/esm/activity/schema/types/authorization.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/authorization.js +16 -7
- package/dist/esm/activity/schema/types/authorization.test.js +41 -42
- package/dist/esm/activity/schema/types/note.d.ts +83 -70
- package/dist/esm/activity/schema/types/note.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/note.js +20 -12
- package/dist/esm/activity/schema/types/note.test.js +48 -49
- package/dist/esm/activity/schema/types/operation.d.ts +64 -45
- package/dist/esm/activity/schema/types/operation.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/operation.js +19 -8
- package/dist/esm/activity/schema/types/operation.test.js +34 -35
- package/dist/esm/activity/schema/types/unknown.d.ts +50 -41
- package/dist/esm/activity/schema/types/unknown.d.ts.map +1 -1
- package/dist/esm/activity/schema/types/unknown.js +12 -6
- package/dist/esm/activity/schema/types/unknown.test.js +29 -30
- package/dist/esm/app/authorization/resources.d.ts +4 -4
- package/dist/esm/app/authorization/resources.d.ts.map +1 -1
- package/dist/esm/app/authorization/resources.js +3 -7
- package/dist/esm/app/authorization/schema.d.ts +90 -52
- package/dist/esm/app/authorization/schema.d.ts.map +1 -1
- package/dist/esm/app/authorization/schema.js +58 -66
- package/dist/esm/app/authorization/schema.test.js +155 -74
- package/dist/esm/app/oauth/resources.d.ts +4 -4
- package/dist/esm/app/oauth/resources.d.ts.map +1 -1
- package/dist/esm/app/oauth/resources.js +3 -4
- package/dist/esm/app/oauth/schema.d.ts +34 -41
- package/dist/esm/app/oauth/schema.d.ts.map +1 -1
- package/dist/esm/app/oauth/schema.js +25 -19
- package/dist/esm/app/oauth/schema.test.js +39 -40
- package/dist/esm/app/oidc/resources.d.ts +6 -6
- package/dist/esm/app/oidc/resources.d.ts.map +1 -1
- package/dist/esm/app/oidc/resources.js +5 -6
- package/dist/esm/app/oidc/schema.d.ts +26 -37
- package/dist/esm/app/oidc/schema.d.ts.map +1 -1
- package/dist/esm/app/oidc/schema.js +19 -15
- package/dist/esm/app/oidc/schema.test.js +46 -27
- package/dist/esm/app/registration/resources.d.ts +4 -4
- package/dist/esm/app/registration/resources.d.ts.map +1 -1
- package/dist/esm/app/registration/resources.js +3 -4
- package/dist/esm/app/registration/resources.test.js +14 -13
- package/dist/esm/app/registration/schema.d.ts +24 -31
- package/dist/esm/app/registration/schema.d.ts.map +1 -1
- package/dist/esm/app/registration/schema.js +25 -18
- package/dist/esm/app/registration/schema.test.js +68 -150
- package/dist/esm/app/resources.d.ts +7 -7
- package/dist/esm/app/resources.d.ts.map +1 -1
- package/dist/esm/app/resources.js +8 -8
- package/dist/esm/app/resources.test.js +14 -13
- package/dist/esm/app/saml/resources.d.ts +6 -6
- package/dist/esm/app/saml/resources.d.ts.map +1 -1
- package/dist/esm/app/saml/resources.js +5 -6
- package/dist/esm/app/saml/schema.d.ts +26 -37
- package/dist/esm/app/saml/schema.d.ts.map +1 -1
- package/dist/esm/app/saml/schema.js +19 -15
- package/dist/esm/app/schema.d.ts +72 -68
- package/dist/esm/app/schema.d.ts.map +1 -1
- package/dist/esm/app/schema.js +45 -37
- package/dist/esm/app/schema.test.js +129 -43
- package/dist/esm/association/resources.d.ts +5 -5
- package/dist/esm/association/resources.d.ts.map +1 -1
- package/dist/esm/association/resources.js +6 -8
- package/dist/esm/association/schema.d.ts +270 -182
- package/dist/esm/association/schema.d.ts.map +1 -1
- package/dist/esm/association/schema.js +36 -31
- package/dist/esm/association/schema.test.js +14 -55
- package/dist/esm/authentication/factors/schema.d.ts +39 -49
- package/dist/esm/authentication/factors/schema.d.ts.map +1 -1
- package/dist/esm/authentication/factors/schema.js +26 -20
- package/dist/esm/authentication/factors/schema.test.js +33 -34
- package/dist/esm/authentication/index.d.ts +1 -0
- package/dist/esm/authentication/index.d.ts.map +1 -1
- package/dist/esm/authentication/index.js +2 -0
- package/dist/esm/authentication/providers/schema.d.ts +23 -22
- package/dist/esm/authentication/providers/schema.d.ts.map +1 -1
- package/dist/esm/authentication/providers/schema.js +13 -11
- package/dist/esm/authentication/sessions/resources.d.ts +4 -4
- package/dist/esm/authentication/sessions/resources.d.ts.map +1 -1
- package/dist/esm/authentication/sessions/resources.js +5 -5
- package/dist/esm/authentication/sessions/schema.d.ts +96 -74
- package/dist/esm/authentication/sessions/schema.d.ts.map +1 -1
- package/dist/esm/authentication/sessions/schema.js +67 -34
- package/dist/esm/authentication/sessions/schema.test.d.ts +2 -0
- package/dist/esm/authentication/sessions/schema.test.d.ts.map +1 -0
- package/dist/esm/authentication/sessions/schema.test.js +63 -0
- package/dist/esm/authentication/settings/resources.d.ts +4 -4
- package/dist/esm/authentication/settings/resources.d.ts.map +1 -1
- package/dist/esm/authentication/settings/resources.js +3 -4
- package/dist/esm/authentication/settings/schema.d.ts +45 -62
- package/dist/esm/authentication/settings/schema.d.ts.map +1 -1
- package/dist/esm/authentication/settings/schema.js +18 -16
- package/dist/esm/authentication/settings/schema.test.js +409 -22
- package/dist/esm/authentication/strategies/resources.d.ts +9 -8
- package/dist/esm/authentication/strategies/resources.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/resources.js +13 -13
- package/dist/esm/authentication/strategies/schema/base.d.ts +59 -53
- package/dist/esm/authentication/strategies/schema/base.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/base.js +36 -25
- package/dist/esm/authentication/strategies/schema/schema.d.ts +126 -200
- package/dist/esm/authentication/strategies/schema/schema.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/schema.js +17 -6
- package/dist/esm/authentication/strategies/schema/types/email.d.ts +62 -61
- package/dist/esm/authentication/strategies/schema/types/email.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/types/email.js +25 -15
- package/dist/esm/authentication/strategies/schema/types/email.test.js +49 -49
- package/dist/esm/authentication/strategies/schema/types/totp.d.ts +108 -95
- package/dist/esm/authentication/strategies/schema/types/totp.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/types/totp.js +51 -27
- package/dist/esm/authorization/permissions/resources.d.ts +7 -7
- package/dist/esm/authorization/permissions/resources.d.ts.map +1 -1
- package/dist/esm/authorization/permissions/resources.js +8 -8
- package/dist/esm/authorization/permissions/schema.d.ts +92 -88
- package/dist/esm/authorization/permissions/schema.d.ts.map +1 -1
- package/dist/esm/authorization/permissions/schema.js +47 -39
- package/dist/esm/authorization/permissions/schema.test.js +54 -62
- package/dist/esm/authorization/roles/resources.d.ts +7 -7
- package/dist/esm/authorization/roles/resources.d.ts.map +1 -1
- package/dist/esm/authorization/roles/resources.js +8 -8
- package/dist/esm/authorization/roles/schema.d.ts +102 -98
- package/dist/esm/authorization/roles/schema.d.ts.map +1 -1
- package/dist/esm/authorization/roles/schema.js +43 -40
- package/dist/esm/authorization/roles/schema.test.js +55 -62
- package/dist/esm/authorization/schema.d.ts +7 -6
- package/dist/esm/authorization/schema.d.ts.map +1 -1
- package/dist/esm/authorization/schema.js +9 -3
- package/dist/esm/common/index.d.ts +2 -0
- package/dist/esm/common/index.d.ts.map +1 -1
- package/dist/esm/common/resources/authorization.d.ts +18 -1
- package/dist/esm/common/resources/authorization.d.ts.map +1 -1
- package/dist/esm/common/resources/authorization.js +5 -1
- package/dist/esm/common/resources/init.d.ts +28 -11
- package/dist/esm/common/resources/init.d.ts.map +1 -1
- package/dist/esm/common/resources/init.js +47 -21
- package/dist/esm/common/resources/init.test.js +63 -39
- package/dist/esm/common/resources/operations.d.ts +7 -6
- package/dist/esm/common/resources/operations.d.ts.map +1 -1
- package/dist/esm/common/resources/operations.js +41 -19
- package/dist/esm/common/resources/operations.test.js +48 -18
- package/dist/esm/common/resources/utils.d.ts +0 -9
- package/dist/esm/common/resources/utils.d.ts.map +1 -1
- package/dist/esm/common/resources/utils.js +0 -24
- package/dist/esm/common/resources/utils.test.js +3 -32
- package/dist/esm/common/schema/aggregate.d.ts +6 -5
- package/dist/esm/common/schema/aggregate.d.ts.map +1 -1
- package/dist/esm/common/schema/aggregate.js +4 -4
- package/dist/esm/common/schema/aggregate.test.js +21 -22
- package/dist/esm/common/schema/collection.d.ts +13 -14
- package/dist/esm/common/schema/collection.d.ts.map +1 -1
- package/dist/esm/common/schema/collection.js +5 -5
- package/dist/esm/common/schema/collection.test.js +66 -48
- package/dist/esm/common/schema/dates.d.ts +43 -26
- package/dist/esm/common/schema/dates.d.ts.map +1 -1
- package/dist/esm/common/schema/dates.js +29 -11
- package/dist/esm/common/schema/dates.test.js +24 -13
- package/dist/esm/common/schema/id.d.ts +2 -1
- package/dist/esm/common/schema/id.d.ts.map +1 -1
- package/dist/esm/common/schema/id.js +2 -2
- package/dist/esm/common/schema/id.test.js +70 -38
- package/dist/esm/common/schema/jwt.d.ts +22 -14
- package/dist/esm/common/schema/jwt.d.ts.map +1 -1
- package/dist/esm/common/schema/jwt.js +3 -7
- package/dist/esm/common/schema/jwt.test.js +22 -25
- package/dist/esm/common/schema/metadata.d.ts +86 -49
- package/dist/esm/common/schema/metadata.d.ts.map +1 -1
- package/dist/esm/common/schema/metadata.js +120 -74
- package/dist/esm/common/schema/metadata.test.js +199 -68
- package/dist/esm/common/schema/pagination.d.ts +15 -5
- package/dist/esm/common/schema/pagination.d.ts.map +1 -1
- package/dist/esm/common/schema/pagination.js +13 -4
- package/dist/esm/common/schema/pagination.test.js +55 -36
- package/dist/esm/common/schema/schema.d.ts +4 -4
- package/dist/esm/common/schema/schema.d.ts.map +1 -1
- package/dist/esm/common/schema/schema.js +6 -5
- package/dist/esm/common/schema/schema.test.js +9 -15
- package/dist/esm/common/schema/sets.d.ts +6 -2
- package/dist/esm/common/schema/sets.d.ts.map +1 -1
- package/dist/esm/common/schema/sets.js +16 -6
- package/dist/esm/common/schema/url.d.ts +21 -0
- package/dist/esm/common/schema/url.d.ts.map +1 -1
- package/dist/esm/common/schema/url.js +45 -0
- package/dist/esm/common/schema/url.test.js +11 -1
- package/dist/esm/customer/organization/schema.d.ts +59 -46
- package/dist/esm/customer/organization/schema.d.ts.map +1 -1
- package/dist/esm/customer/organization/schema.js +43 -26
- package/dist/esm/customer/schema.d.ts +7 -6
- package/dist/esm/customer/schema.d.ts.map +1 -1
- package/dist/esm/customer/schema.js +9 -3
- package/dist/esm/customer/users/resources.d.ts +7 -7
- package/dist/esm/customer/users/resources.d.ts.map +1 -1
- package/dist/esm/customer/users/resources.js +8 -8
- package/dist/esm/customer/users/schema.d.ts +213 -104
- package/dist/esm/customer/users/schema.d.ts.map +1 -1
- package/dist/esm/customer/users/schema.js +111 -55
- package/dist/esm/customer/users/schema.test.js +601 -61
- package/dist/esm/customer/users/utils.d.ts +3 -2
- package/dist/esm/customer/users/utils.d.ts.map +1 -1
- package/dist/esm/customer/users/utils.test.js +1 -1
- package/dist/esm/identity/schema.d.ts +5 -1
- package/dist/esm/identity/schema.d.ts.map +1 -1
- package/dist/esm/identity/schema.js +5 -2
- package/dist/esm/identity/schema.test.js +21 -16
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.d.ts +34 -28
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.d.ts.map +1 -1
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.js +60 -38
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.test.js +48 -49
- package/dist/esm/oauth/authorize/schema/grants/common.d.ts +6 -0
- package/dist/esm/oauth/authorize/schema/grants/common.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/schema/grants/common.js +11 -0
- package/dist/esm/oauth/authorize/schema/grants/implicit.d.ts +18 -10
- package/dist/esm/oauth/authorize/schema/grants/implicit.d.ts.map +1 -1
- package/dist/esm/oauth/authorize/schema/grants/implicit.js +22 -10
- package/dist/esm/oauth/authorize/schema/schema.d.ts +48 -36
- package/dist/esm/oauth/authorize/schema/schema.d.ts.map +1 -1
- package/dist/esm/oauth/authorize/schema/schema.js +4 -3
- package/dist/esm/oauth/common/schema.d.ts +24 -7
- package/dist/esm/oauth/common/schema.d.ts.map +1 -1
- package/dist/esm/oauth/common/schema.js +25 -7
- package/dist/esm/oauth/common/schema.test.js +23 -31
- package/dist/esm/oauth/index.d.ts +3 -3
- package/dist/esm/oauth/index.d.ts.map +1 -1
- package/dist/esm/oauth/index.js +3 -3
- package/dist/esm/oauth/token/schema/grants/authorization-code.d.ts +16 -9
- package/dist/esm/oauth/token/schema/grants/authorization-code.d.ts.map +1 -1
- package/dist/esm/oauth/token/schema/grants/authorization-code.js +32 -11
- package/dist/esm/oauth/token/schema/grants/client-credentials.d.ts +16 -17
- package/dist/esm/oauth/token/schema/grants/client-credentials.d.ts.map +1 -1
- package/dist/esm/oauth/token/schema/grants/client-credentials.js +19 -15
- package/dist/esm/oauth/token/schema/grants/common.d.ts +6 -0
- package/dist/esm/oauth/token/schema/grants/common.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/grants/common.js +16 -0
- package/dist/esm/oauth/token/schema/grants/refresh-token.d.ts +15 -8
- package/dist/esm/oauth/token/schema/grants/refresh-token.d.ts.map +1 -1
- package/dist/esm/oauth/token/schema/grants/refresh-token.js +23 -10
- package/dist/esm/oauth/token/schema/schema.d.ts +48 -21
- package/dist/esm/oauth/token/schema/schema.d.ts.map +1 -1
- package/dist/esm/oauth/token/schema/schema.js +59 -4
- package/dist/esm/oauth/token/schema/schema.test.js +45 -29
- package/dist/esm/workspace/authorization/schema.d.ts +62 -27
- package/dist/esm/workspace/authorization/schema.d.ts.map +1 -1
- package/dist/esm/workspace/authorization/schema.js +27 -15
- package/dist/esm/workspace/branding/schema.d.ts +47 -37
- package/dist/esm/workspace/branding/schema.d.ts.map +1 -1
- package/dist/esm/workspace/branding/schema.js +29 -17
- package/dist/esm/workspace/membership/schema.d.ts +42 -20
- package/dist/esm/workspace/membership/schema.d.ts.map +1 -1
- package/dist/esm/workspace/membership/schema.js +14 -7
- package/dist/esm/workspace/registration/schema.d.ts +41 -27
- package/dist/esm/workspace/registration/schema.d.ts.map +1 -1
- package/dist/esm/workspace/registration/schema.js +32 -16
- package/dist/esm/workspace/settings/schema.d.ts +20 -19
- package/dist/esm/workspace/settings/schema.d.ts.map +1 -1
- package/dist/esm/workspace/settings/schema.js +16 -9
- package/dist/esm/workspace/settings/schema.test.js +18 -19
- package/dist/esm/workspace/tenant/schema.d.ts +88 -57
- package/dist/esm/workspace/tenant/schema.d.ts.map +1 -1
- package/dist/esm/workspace/tenant/schema.js +26 -13
- package/dist/esm/workspace/tenant/schema.test.d.ts +2 -0
- package/dist/esm/workspace/tenant/schema.test.d.ts.map +1 -0
- package/dist/esm/workspace/tenant/schema.test.js +233 -0
- package/dist/esm/workspace/user/notifications/schema.d.ts +70 -56
- package/dist/esm/workspace/user/notifications/schema.d.ts.map +1 -1
- package/dist/esm/workspace/user/notifications/schema.js +42 -29
- package/dist/esm/workspace/user/preferences/schema.d.ts +29 -25
- package/dist/esm/workspace/user/preferences/schema.d.ts.map +1 -1
- package/dist/esm/workspace/user/preferences/schema.js +25 -13
- package/package.json +3 -3
- package/dist/cjs/action/schema/operations/set-password.d.ts +0 -31
- package/dist/cjs/action/schema/operations/set-password.d.ts.map +0 -1
- package/dist/cjs/action/schema/operations/set-password.js +0 -18
- package/dist/cjs/action/schema/operations/set-password.test.d.ts +0 -2
- package/dist/cjs/action/schema/operations/set-password.test.d.ts.map +0 -1
- package/dist/cjs/action/schema/operations/set-password.test.js +0 -167
- package/dist/cjs/authentication/strategies/schema/types/password.d.ts +0 -132
- package/dist/cjs/authentication/strategies/schema/types/password.d.ts.map +0 -1
- package/dist/cjs/authentication/strategies/schema/types/password.js +0 -52
- package/dist/cjs/common/schema/sets.test.d.ts +0 -2
- package/dist/cjs/common/schema/sets.test.d.ts.map +0 -1
- package/dist/cjs/common/schema/sets.test.js +0 -84
- package/dist/esm/action/schema/operations/set-password.d.ts +0 -31
- package/dist/esm/action/schema/operations/set-password.d.ts.map +0 -1
- package/dist/esm/action/schema/operations/set-password.js +0 -15
- package/dist/esm/action/schema/operations/set-password.test.d.ts +0 -2
- package/dist/esm/action/schema/operations/set-password.test.d.ts.map +0 -1
- package/dist/esm/action/schema/operations/set-password.test.js +0 -165
- package/dist/esm/authentication/strategies/schema/types/password.d.ts +0 -132
- package/dist/esm/authentication/strategies/schema/types/password.d.ts.map +0 -1
- package/dist/esm/authentication/strategies/schema/types/password.js +0 -49
- package/dist/esm/common/schema/sets.test.d.ts +0 -2
- package/dist/esm/common/schema/sets.test.d.ts.map +0 -1
- package/dist/esm/common/schema/sets.test.js +0 -82
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ClientRequestSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod/v4"));
|
|
38
|
+
const schema_js_1 = require("../../../../app/schema.js");
|
|
39
|
+
exports.ClientRequestSchema = z.object({
|
|
40
|
+
/**
|
|
41
|
+
* REQUIRED. The client identifier.
|
|
42
|
+
* NOTE: This is only required in the body if the client is NOT authenticating
|
|
43
|
+
* via the HTTP "Authorization" header (Basic Auth).
|
|
44
|
+
*/
|
|
45
|
+
client_id: schema_js_1.AppIdSchema.describe('The Client ID.'),
|
|
46
|
+
/**
|
|
47
|
+
* REQUIRED. The client secret.
|
|
48
|
+
* NOTE: This is only required in the body if the client is NOT authenticating
|
|
49
|
+
* via the HTTP "Authorization" header (Basic Auth).
|
|
50
|
+
*/
|
|
51
|
+
client_secret: z.string().min(1).describe('The Client Secret.'),
|
|
52
|
+
});
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
/**
|
|
3
|
+
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-6
|
|
4
|
+
*/
|
|
5
|
+
export declare const RefreshTokenGrantTokenSchema: z.ZodObject<{
|
|
6
|
+
client_id: z.ZodString;
|
|
7
|
+
client_secret: z.ZodString;
|
|
8
|
+
grant_type: z.ZodEnum<{
|
|
9
|
+
refresh_token: "refresh_token";
|
|
10
|
+
}>;
|
|
11
|
+
refresh_token: z.ZodString;
|
|
12
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type RefreshTokenGrantTokenInput = z.input<typeof RefreshTokenGrantTokenSchema>;
|
|
15
|
+
export type RefreshTokenGrantToken = z.output<typeof RefreshTokenGrantTokenSchema>;
|
|
9
16
|
//# 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,KAAK,CAAC,MAAM,QAAQ,CAAC;AAS5B;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;iBAmBvC,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,4BAA4B,CACpC,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAC3C,OAAO,4BAA4B,CACpC,CAAC"}
|
|
@@ -1,17 +1,63 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
5
|
-
const schema_js_1 = require("
|
|
6
|
-
const
|
|
36
|
+
exports.RefreshTokenGrantTokenSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod/v4"));
|
|
38
|
+
const schema_js_1 = require("../../../common/schema.js");
|
|
39
|
+
const common_js_1 = require("./common.js");
|
|
40
|
+
/**
|
|
41
|
+
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-6
|
|
42
|
+
*/
|
|
43
|
+
const GrantTypeSchema = z.enum([schema_js_1.GrantType.REFRESH_TOKEN]);
|
|
7
44
|
/**
|
|
8
45
|
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-6
|
|
9
46
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
47
|
+
exports.RefreshTokenGrantTokenSchema = z.object({
|
|
48
|
+
/**
|
|
49
|
+
* REQUIRED. Value MUST be set to "refresh_token".
|
|
50
|
+
*/
|
|
51
|
+
grant_type: GrantTypeSchema.describe('The grant type.'),
|
|
52
|
+
/**
|
|
53
|
+
* REQUIRED. The refresh token issued to the client.
|
|
54
|
+
*/
|
|
55
|
+
refresh_token: z.string().min(1).describe('The refresh token.'),
|
|
56
|
+
/**
|
|
57
|
+
* OPTIONAL. The scope of the access request. If omitted, the scope is
|
|
58
|
+
* unchanged from the original grant. If specified, it must be equal to or
|
|
59
|
+
* a subset of the original scope.
|
|
60
|
+
*/
|
|
61
|
+
scope: schema_js_1.ScopeStringSchema.optional(),
|
|
62
|
+
...common_js_1.ClientRequestSchema.shape,
|
|
17
63
|
});
|
|
@@ -1,28 +1,55 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
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
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
audience
|
|
18
|
-
client_id:
|
|
19
|
-
client_secret:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
export declare const TokenGrantSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
|
+
code_verifier: z.ZodOptional<z.ZodString>;
|
|
10
|
+
client_id: z.ZodString;
|
|
11
|
+
client_secret: z.ZodString;
|
|
12
|
+
grant_type: z.ZodEnum<{
|
|
13
|
+
authorization_code: "authorization_code";
|
|
14
|
+
}>;
|
|
15
|
+
code: z.ZodString;
|
|
16
|
+
redirect_uri: z.ZodOptional<z.ZodURL>;
|
|
17
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
+
audience: z.ZodOptional<z.ZodString>;
|
|
19
|
+
client_id: z.ZodString;
|
|
20
|
+
client_secret: z.ZodString;
|
|
21
|
+
grant_type: z.ZodEnum<{
|
|
22
|
+
client_credentials: "client_credentials";
|
|
23
|
+
}>;
|
|
24
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
26
|
+
client_id: z.ZodString;
|
|
27
|
+
client_secret: z.ZodString;
|
|
28
|
+
grant_type: z.ZodEnum<{
|
|
29
|
+
refresh_token: "refresh_token";
|
|
30
|
+
}>;
|
|
31
|
+
refresh_token: z.ZodString;
|
|
32
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>], "grant_type">;
|
|
34
|
+
export type TokenGrantInput = z.input<typeof TokenGrantSchema>;
|
|
35
|
+
export type TokenGrant = z.output<typeof TokenGrantSchema>;
|
|
36
|
+
export declare const TokenSchema: z.ZodObject<{
|
|
37
|
+
access_token: z.ZodString;
|
|
38
|
+
token_type: z.ZodDefault<z.ZodLiteral<"Bearer">>;
|
|
39
|
+
expires_in: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
refresh_token: z.ZodOptional<z.ZodString>;
|
|
41
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
42
|
+
id_token: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export type TokenInput = z.input<typeof TokenSchema>;
|
|
45
|
+
export type Token = z.output<typeof TokenSchema>;
|
|
46
|
+
export declare const ImplicitTokenSchema: z.ZodObject<{
|
|
47
|
+
access_token: z.ZodOptional<z.ZodString>;
|
|
48
|
+
id_token: z.ZodOptional<z.ZodString>;
|
|
49
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
50
|
+
token_type: z.ZodDefault<z.ZodLiteral<"Bearer">>;
|
|
51
|
+
expires_in: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type ImplicitTokenInput = z.input<typeof ImplicitTokenSchema>;
|
|
54
|
+
export type ImplicitToken = z.output<typeof ImplicitTokenSchema>;
|
|
28
55
|
//# 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,CAAC,MAAM,QAAQ,CAAC;AAO5B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;iCAI3B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC/D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAK3D,eAAO,MAAM,WAAW;;;;;;;iBA8CtB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACrD,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,WAAW,CAAC,CAAC;AAEjD,eAAO,MAAM,mBAAmB;;;;;;iBAG9B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACrE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -10,11 +10,35 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
13
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
37
|
};
|
|
16
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
39
|
+
exports.ImplicitTokenSchema = exports.TokenSchema = exports.TokenGrantSchema = void 0;
|
|
40
|
+
const z = __importStar(require("zod/v4"));
|
|
41
|
+
const schema_js_1 = require("../../common/schema.js");
|
|
18
42
|
const authorization_code_js_1 = require("./grants/authorization-code.js");
|
|
19
43
|
const client_credentials_js_1 = require("./grants/client-credentials.js");
|
|
20
44
|
const refresh_token_js_1 = require("./grants/refresh-token.js");
|
|
@@ -24,4 +48,57 @@ __exportStar(require("./grants/refresh-token.js"), exports);
|
|
|
24
48
|
/**
|
|
25
49
|
* Union(s)
|
|
26
50
|
*/
|
|
27
|
-
exports.
|
|
51
|
+
exports.TokenGrantSchema = z.discriminatedUnion('grant_type', [
|
|
52
|
+
authorization_code_js_1.AuthorizationCodeGrantTokenSchema,
|
|
53
|
+
client_credentials_js_1.ClientCredentialsGrantTokenSchema,
|
|
54
|
+
refresh_token_js_1.RefreshTokenGrantTokenSchema,
|
|
55
|
+
]);
|
|
56
|
+
/*
|
|
57
|
+
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
|
|
58
|
+
*/
|
|
59
|
+
exports.TokenSchema = z.object({
|
|
60
|
+
/**
|
|
61
|
+
* REQUIRED. The access token issued by the authorization server.
|
|
62
|
+
* Typically a JWT or an opaque string.
|
|
63
|
+
*/
|
|
64
|
+
access_token: z
|
|
65
|
+
.string()
|
|
66
|
+
.min(1)
|
|
67
|
+
.describe('The access token issued by the authorization server.'),
|
|
68
|
+
/**
|
|
69
|
+
* REQUIRED. The type of the token issued. Value is typically 'Bearer'.
|
|
70
|
+
*/
|
|
71
|
+
token_type: z
|
|
72
|
+
.literal('Bearer')
|
|
73
|
+
.default('Bearer')
|
|
74
|
+
.describe('The type of the token issued. Must be "Bearer".'),
|
|
75
|
+
/**
|
|
76
|
+
* RECOMMENDED. The lifetime in seconds of the access token.
|
|
77
|
+
* For example, the value 3600 represents an expiration time of one hour.
|
|
78
|
+
*/
|
|
79
|
+
expires_in: z
|
|
80
|
+
.number()
|
|
81
|
+
.int()
|
|
82
|
+
.positive()
|
|
83
|
+
.optional()
|
|
84
|
+
.describe('The lifetime in seconds of the access token.'),
|
|
85
|
+
/**
|
|
86
|
+
* OPTIONAL. The refresh token, which can be used to obtain a new access token
|
|
87
|
+
* when the current one expires.
|
|
88
|
+
*/
|
|
89
|
+
refresh_token: z.string().min(1).optional().describe('The refresh token.'),
|
|
90
|
+
/**
|
|
91
|
+
* OPTIONAL. The scope of the access token as issued by the authorization server.
|
|
92
|
+
* If omitted, the scope is the same as the scope originally requested by the client.
|
|
93
|
+
*/
|
|
94
|
+
scope: schema_js_1.ScopeStringSchema.optional(),
|
|
95
|
+
/**
|
|
96
|
+
* OPTIONAL, for OpenID Connect (OIDC). The ID token, a JWT that contains claims
|
|
97
|
+
* about the authentication of the end-user.
|
|
98
|
+
*/
|
|
99
|
+
id_token: z.string().min(1).optional().describe('The ID Token (OIDC only).'),
|
|
100
|
+
});
|
|
101
|
+
exports.ImplicitTokenSchema = z.object({
|
|
102
|
+
...exports.TokenSchema.omit({ refresh_token: true, access_token: true }).shape,
|
|
103
|
+
...exports.TokenSchema.pick({ access_token: true }).partial().shape,
|
|
104
|
+
});
|
|
@@ -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 utils_js_1 = require("../../../app/utils.js");
|
|
6
5
|
const schema_js_1 = require("./schema.js");
|
|
@@ -11,23 +10,31 @@ const schema_js_1 = require("./schema.js");
|
|
|
11
10
|
grant_type: 'authorization_code',
|
|
12
11
|
code: 'auth_code_123',
|
|
13
12
|
client_id: (0, utils_js_1.generateAppId)(),
|
|
13
|
+
client_secret: 'secret_123',
|
|
14
14
|
redirect_uri: 'https://example.com/callback',
|
|
15
15
|
};
|
|
16
|
-
const result =
|
|
17
|
-
|
|
18
|
-
(0, vitest_1.expect)(result).
|
|
16
|
+
const result = schema_js_1.TokenGrantSchema.safeParse(payload);
|
|
17
|
+
// Parse succeeds for valid data
|
|
18
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
19
|
+
if (result.success) {
|
|
20
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
21
|
+
}
|
|
19
22
|
});
|
|
20
23
|
(0, vitest_1.test)('should accept authorization code with PKCE', () => {
|
|
21
24
|
const payload = {
|
|
22
25
|
grant_type: 'authorization_code',
|
|
23
26
|
code: 'auth_code_123',
|
|
24
27
|
client_id: (0, utils_js_1.generateAppId)(),
|
|
28
|
+
client_secret: 'secret_123',
|
|
25
29
|
redirect_uri: 'https://example.com/callback',
|
|
26
30
|
code_verifier: 'pkce_verifier_123',
|
|
27
31
|
};
|
|
28
|
-
const result =
|
|
29
|
-
|
|
30
|
-
(0, vitest_1.expect)(result).
|
|
32
|
+
const result = schema_js_1.TokenGrantSchema.safeParse(payload);
|
|
33
|
+
// Parse succeeds for valid data
|
|
34
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
35
|
+
if (result.success) {
|
|
36
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
37
|
+
}
|
|
31
38
|
});
|
|
32
39
|
(0, vitest_1.test)('should accept authorization code with client secret', () => {
|
|
33
40
|
const payload = {
|
|
@@ -37,9 +44,12 @@ const schema_js_1 = require("./schema.js");
|
|
|
37
44
|
client_secret: 'secret_123',
|
|
38
45
|
redirect_uri: 'https://example.com/callback',
|
|
39
46
|
};
|
|
40
|
-
const result =
|
|
41
|
-
|
|
42
|
-
(0, vitest_1.expect)(result).
|
|
47
|
+
const result = schema_js_1.TokenGrantSchema.safeParse(payload);
|
|
48
|
+
// Parse succeeds for valid data
|
|
49
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
50
|
+
if (result.success) {
|
|
51
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
52
|
+
}
|
|
43
53
|
});
|
|
44
54
|
(0, vitest_1.test)('should accept client credentials grant', () => {
|
|
45
55
|
const payload = {
|
|
@@ -48,9 +58,12 @@ const schema_js_1 = require("./schema.js");
|
|
|
48
58
|
client_secret: 'secret_123',
|
|
49
59
|
scope: 'read write',
|
|
50
60
|
};
|
|
51
|
-
const result =
|
|
52
|
-
|
|
53
|
-
(0, vitest_1.expect)(result).
|
|
61
|
+
const result = schema_js_1.TokenGrantSchema.safeParse(payload);
|
|
62
|
+
// Parse succeeds for valid data
|
|
63
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
64
|
+
if (result.success) {
|
|
65
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
66
|
+
}
|
|
54
67
|
});
|
|
55
68
|
(0, vitest_1.test)('should accept refresh token grant', () => {
|
|
56
69
|
const payload = {
|
|
@@ -60,9 +73,12 @@ const schema_js_1 = require("./schema.js");
|
|
|
60
73
|
client_secret: 'secret_123',
|
|
61
74
|
scope: 'read',
|
|
62
75
|
};
|
|
63
|
-
const result =
|
|
64
|
-
|
|
65
|
-
(0, vitest_1.expect)(result).
|
|
76
|
+
const result = schema_js_1.TokenGrantSchema.safeParse(payload);
|
|
77
|
+
// Parse succeeds for valid data
|
|
78
|
+
(0, vitest_1.expect)(result.success).toBe(true);
|
|
79
|
+
if (result.success) {
|
|
80
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
81
|
+
}
|
|
66
82
|
});
|
|
67
83
|
(0, vitest_1.test)('should reject invalid grant type', () => {
|
|
68
84
|
const payload = {
|
|
@@ -71,8 +87,8 @@ const schema_js_1 = require("./schema.js");
|
|
|
71
87
|
client_id: (0, utils_js_1.generateAppId)(),
|
|
72
88
|
redirect_uri: 'https://example.com/callback',
|
|
73
89
|
};
|
|
74
|
-
const result =
|
|
75
|
-
(0, vitest_1.expect)(result).
|
|
90
|
+
const result = schema_js_1.TokenGrantSchema.safeParse(payload);
|
|
91
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
76
92
|
});
|
|
77
93
|
(0, vitest_1.test)('should reject authorization code without required fields', () => {
|
|
78
94
|
const payload = {
|
|
@@ -80,8 +96,8 @@ const schema_js_1 = require("./schema.js");
|
|
|
80
96
|
client_id: (0, utils_js_1.generateAppId)(),
|
|
81
97
|
// missing code and redirect_uri
|
|
82
98
|
};
|
|
83
|
-
const result =
|
|
84
|
-
(0, vitest_1.expect)(result).
|
|
99
|
+
const result = schema_js_1.TokenGrantSchema.safeParse(payload);
|
|
100
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
85
101
|
});
|
|
86
102
|
(0, vitest_1.test)('should reject invalid redirect URI', () => {
|
|
87
103
|
const payload = {
|
|
@@ -90,8 +106,8 @@ const schema_js_1 = require("./schema.js");
|
|
|
90
106
|
client_id: (0, utils_js_1.generateAppId)(),
|
|
91
107
|
redirect_uri: 'not-a-valid-url',
|
|
92
108
|
};
|
|
93
|
-
const result =
|
|
94
|
-
(0, vitest_1.expect)(result).
|
|
109
|
+
const result = schema_js_1.TokenGrantSchema.safeParse(payload);
|
|
110
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
95
111
|
});
|
|
96
112
|
(0, vitest_1.test)('should reject client credentials without required fields', () => {
|
|
97
113
|
const payload = {
|
|
@@ -99,8 +115,8 @@ const schema_js_1 = require("./schema.js");
|
|
|
99
115
|
client_id: (0, utils_js_1.generateAppId)(),
|
|
100
116
|
// missing client_secret
|
|
101
117
|
};
|
|
102
|
-
const result =
|
|
103
|
-
(0, vitest_1.expect)(result).
|
|
118
|
+
const result = schema_js_1.TokenGrantSchema.safeParse(payload);
|
|
119
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
104
120
|
});
|
|
105
121
|
(0, vitest_1.test)('should reject refresh token without required fields', () => {
|
|
106
122
|
const payload = {
|
|
@@ -108,15 +124,15 @@ const schema_js_1 = require("./schema.js");
|
|
|
108
124
|
client_id: 'app_123',
|
|
109
125
|
// missing refresh_token and client_secret
|
|
110
126
|
};
|
|
111
|
-
const result =
|
|
112
|
-
(0, vitest_1.expect)(result).
|
|
127
|
+
const result = schema_js_1.TokenGrantSchema.safeParse(payload);
|
|
128
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
113
129
|
});
|
|
114
130
|
(0, vitest_1.test)('should reject completely invalid payload', () => {
|
|
115
131
|
const payload = {
|
|
116
132
|
invalid: 'data',
|
|
117
133
|
};
|
|
118
|
-
const result =
|
|
119
|
-
(0, vitest_1.expect)(result).
|
|
134
|
+
const result = schema_js_1.TokenGrantSchema.safeParse(payload);
|
|
135
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
120
136
|
});
|
|
121
137
|
});
|
|
122
138
|
});
|
|
@@ -1,31 +1,66 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
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
|
|
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 AuthorizationSchema: z.ZodObject<{
|
|
6
|
+
metadata: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodMap<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<import("../../common/schema/metadata.js").MetadataMap, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../common/schema/metadata.js").MetadataMap, import("../../common/schema/metadata.js").MetadataMap | undefined>>;
|
|
7
|
+
deactivatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>;
|
|
8
|
+
deletedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>;
|
|
9
|
+
updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>;
|
|
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
|
+
RS384: "RS384";
|
|
16
|
+
RS512: "RS512";
|
|
17
|
+
ES256: "ES256";
|
|
18
|
+
ES384: "ES384";
|
|
19
|
+
ES512: "ES512";
|
|
20
|
+
PS256: "PS256";
|
|
21
|
+
PS384: "PS384";
|
|
22
|
+
PS512: "PS512";
|
|
23
|
+
}>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type AuthorizationProperties = z.input<typeof AuthorizationSchema>;
|
|
26
|
+
export type Authorization = z.output<typeof AuthorizationSchema>;
|
|
27
|
+
export declare const AuthorizationPayloadSchema: z.ZodObject<{
|
|
28
|
+
metadata: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodMap<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<import("../../common/schema/metadata.js").MetadataRecord, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../common/schema/metadata.js").MetadataRecord | undefined, import("../../common/schema/metadata.js").MetadataRecord | undefined>>;
|
|
29
|
+
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>>>;
|
|
30
|
+
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>>>;
|
|
31
|
+
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>>>;
|
|
32
|
+
sessionDuration: z.ZodDefault<z.ZodNumber>;
|
|
33
|
+
refreshTokenDuration: z.ZodDefault<z.ZodNumber>;
|
|
34
|
+
accessTokenDuration: z.ZodDefault<z.ZodNumber>;
|
|
35
|
+
accessTokenSignatureAlgorithm: z.ZodDefault<z.ZodEnum<{
|
|
36
|
+
RS256: "RS256";
|
|
37
|
+
RS384: "RS384";
|
|
38
|
+
RS512: "RS512";
|
|
39
|
+
ES256: "ES256";
|
|
40
|
+
ES384: "ES384";
|
|
41
|
+
ES512: "ES512";
|
|
42
|
+
PS256: "PS256";
|
|
43
|
+
PS384: "PS384";
|
|
44
|
+
PS512: "PS512";
|
|
45
|
+
}>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
export type AuthorizationPayload = z.output<typeof AuthorizationPayloadSchema>;
|
|
48
|
+
export declare const UpsertAuthorizationPayloadSchema: z.ZodObject<{
|
|
49
|
+
metadata: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodMap<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<import("../../common/schema/metadata.js").MetadataRecord, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../common/schema/metadata.js").MetadataRecord | null | undefined, import("../../common/schema/metadata.js").MetadataRecord | undefined>>;
|
|
50
|
+
sessionDuration: z.ZodDefault<z.ZodNumber>;
|
|
51
|
+
refreshTokenDuration: z.ZodDefault<z.ZodNumber>;
|
|
52
|
+
accessTokenDuration: z.ZodDefault<z.ZodNumber>;
|
|
53
|
+
accessTokenSignatureAlgorithm: z.ZodDefault<z.ZodEnum<{
|
|
54
|
+
RS256: "RS256";
|
|
55
|
+
RS384: "RS384";
|
|
56
|
+
RS512: "RS512";
|
|
57
|
+
ES256: "ES256";
|
|
58
|
+
ES384: "ES384";
|
|
59
|
+
ES512: "ES512";
|
|
60
|
+
PS256: "PS256";
|
|
61
|
+
PS384: "PS384";
|
|
62
|
+
PS512: "PS512";
|
|
63
|
+
}>>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
export type UpsertAuthorizationPayload = z.output<typeof UpsertAuthorizationPayloadSchema>;
|
|
31
66
|
//# 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,KAAK,CAAC,MAAM,QAAQ,CAAC;AAgB5B,eAAO,MAAM,wBAAwB,QAAc,CAAC;AACpD,eAAO,MAAM,8BAA8B,QAAoB,CAAC;AAChE,eAAO,MAAM,6BAA6B,QAAc,CAAC;AASzD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;iBAM9B,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAC1E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEjE,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"}
|