@go-mondo/identity-sdk 0.0.2-beta.9 → 0.0.2-beta.91
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 +575 -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 +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 +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 +141 -56
- package/dist/cjs/customer/users/schema.test.js +591 -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 +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 +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 +107 -55
- package/dist/esm/customer/users/schema.test.js +592 -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
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VerifyPasswordSchema = exports.ForgotPasswordSchema = exports.UpdatePasswordStrategyPayloadSchema = exports.InsertPasswordStrategyPayloadSchema = exports.PasswordStrategyPayloadSchema = exports.PasswordStrategySchema = exports.PasswordStrategySettingsPropertySchema = exports.PasswordPolicySchema = exports.PasswordPolicyDefaults = void 0;
|
|
4
|
-
const arktype_1 = require("arktype");
|
|
5
|
-
const schema_js_1 = require("../../../../identity/schema.js");
|
|
6
|
-
const base_js_1 = require("../base.js");
|
|
7
|
-
exports.PasswordPolicyDefaults = {
|
|
8
|
-
minimumLength: 8,
|
|
9
|
-
maximumLength: 36,
|
|
10
|
-
minimumCapital: 1,
|
|
11
|
-
minimumLower: 1,
|
|
12
|
-
minimumNumber: 1,
|
|
13
|
-
minimumSpecial: 1,
|
|
14
|
-
};
|
|
15
|
-
const TypeSchema = (0, arktype_1.type)({
|
|
16
|
-
type: "'password'",
|
|
17
|
-
});
|
|
18
|
-
exports.PasswordPolicySchema = (0, arktype_1.type)({
|
|
19
|
-
minimumLength: arktype_1.type.number.default(exports.PasswordPolicyDefaults.minimumLength),
|
|
20
|
-
maximumLength: arktype_1.type.number.default(exports.PasswordPolicyDefaults.maximumLength),
|
|
21
|
-
minimumCapital: arktype_1.type.number.default(exports.PasswordPolicyDefaults.minimumCapital),
|
|
22
|
-
minimumLower: arktype_1.type.number.default(exports.PasswordPolicyDefaults.minimumLower),
|
|
23
|
-
minimumNumber: arktype_1.type.number.default(exports.PasswordPolicyDefaults.minimumNumber),
|
|
24
|
-
minimumSpecial: arktype_1.type.number.default(exports.PasswordPolicyDefaults.minimumSpecial),
|
|
25
|
-
});
|
|
26
|
-
const SettingsSchema = (0, arktype_1.type)({
|
|
27
|
-
passwordPolicy: exports.PasswordPolicySchema,
|
|
28
|
-
});
|
|
29
|
-
exports.PasswordStrategySettingsPropertySchema = (0, arktype_1.type)({
|
|
30
|
-
settings: SettingsSchema,
|
|
31
|
-
});
|
|
32
|
-
exports.PasswordStrategySchema = base_js_1.BaseStrategySchema.and(TypeSchema).and({
|
|
33
|
-
settings: SettingsSchema,
|
|
34
|
-
});
|
|
35
|
-
exports.PasswordStrategyPayloadSchema = base_js_1.BaseStrategyPayloadSchema.and(TypeSchema).and(exports.PasswordStrategySettingsPropertySchema);
|
|
36
|
-
exports.InsertPasswordStrategyPayloadSchema = TypeSchema.and(base_js_1.BaseInsertStrategyPayloadSchema)
|
|
37
|
-
.and(TypeSchema)
|
|
38
|
-
.and({
|
|
39
|
-
settings: SettingsSchema.optional(),
|
|
40
|
-
});
|
|
41
|
-
exports.UpdatePasswordStrategyPayloadSchema = TypeSchema.and(base_js_1.BaseUpdateStrategyPayloadSchema).and({
|
|
42
|
-
settings: SettingsSchema.optional(),
|
|
43
|
-
});
|
|
44
|
-
exports.ForgotPasswordSchema = (0, arktype_1.type)({
|
|
45
|
-
identifier: (0, arktype_1.type)('string').optional(),
|
|
46
|
-
identifierType: schema_js_1.IdentityIdentifierSchema.optional(),
|
|
47
|
-
});
|
|
48
|
-
exports.VerifyPasswordSchema = (0, arktype_1.type)({
|
|
49
|
-
password: (0, arktype_1.type)('string'),
|
|
50
|
-
identifier: (0, arktype_1.type)('string').optional(),
|
|
51
|
-
identifierType: schema_js_1.IdentityIdentifierSchema.optional(),
|
|
52
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sets.test.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/sets.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const arktype_1 = require("arktype");
|
|
4
|
-
const vitest_1 = require("vitest");
|
|
5
|
-
const sets_js_1 = require("./sets.js");
|
|
6
|
-
(0, vitest_1.describe)('Common Schema - Sets', () => {
|
|
7
|
-
(0, vitest_1.describe)('UniqueStringSetPayloadSchema', () => {
|
|
8
|
-
(0, vitest_1.test)('should accept Set of strings', () => {
|
|
9
|
-
const stringSet = new Set(['a', 'b', 'c']);
|
|
10
|
-
const result = (0, sets_js_1.UniqueStringSetPayloadSchema)(stringSet);
|
|
11
|
-
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
12
|
-
(0, vitest_1.expect)(result).toBeInstanceOf(Set);
|
|
13
|
-
(0, vitest_1.expect)(Array.from(result).sort()).toEqual(['a', 'b', 'c']);
|
|
14
|
-
});
|
|
15
|
-
(0, vitest_1.test)('should accept array of strings and convert to Set', () => {
|
|
16
|
-
const stringArray = ['x', 'y', 'z'];
|
|
17
|
-
const result = (0, sets_js_1.UniqueStringSetPayloadSchema)(stringArray);
|
|
18
|
-
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
19
|
-
(0, vitest_1.expect)(result).toBeInstanceOf(Set);
|
|
20
|
-
(0, vitest_1.expect)(Array.from(result).sort()).toEqual(['x', 'y', 'z']);
|
|
21
|
-
});
|
|
22
|
-
(0, vitest_1.test)('should handle duplicate strings in array', () => {
|
|
23
|
-
const stringArray = ['a', 'b', 'a', 'c', 'b'];
|
|
24
|
-
const result = (0, sets_js_1.UniqueStringSetPayloadSchema)(stringArray);
|
|
25
|
-
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
26
|
-
(0, vitest_1.expect)(result).toBeInstanceOf(Set);
|
|
27
|
-
(0, vitest_1.expect)(Array.from(result).sort()).toEqual(['a', 'b', 'c']);
|
|
28
|
-
});
|
|
29
|
-
(0, vitest_1.test)('should accept empty array', () => {
|
|
30
|
-
const result = (0, sets_js_1.UniqueStringSetPayloadSchema)([]);
|
|
31
|
-
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
32
|
-
(0, vitest_1.expect)(result).toBeInstanceOf(Set);
|
|
33
|
-
(0, vitest_1.expect)(result.size).toBe(0);
|
|
34
|
-
});
|
|
35
|
-
(0, vitest_1.test)('should accept empty Set', () => {
|
|
36
|
-
const emptySet = new Set();
|
|
37
|
-
const result = (0, sets_js_1.UniqueStringSetPayloadSchema)(emptySet);
|
|
38
|
-
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
39
|
-
(0, vitest_1.expect)(result).toBeInstanceOf(Set);
|
|
40
|
-
(0, vitest_1.expect)(result.size).toBe(0);
|
|
41
|
-
});
|
|
42
|
-
(0, vitest_1.test)('should reject non-string array elements', () => {
|
|
43
|
-
const result = (0, sets_js_1.UniqueStringSetPayloadSchema)(['a', 123, 'b']);
|
|
44
|
-
(0, vitest_1.expect)(result).toBeInstanceOf(arktype_1.type.errors);
|
|
45
|
-
});
|
|
46
|
-
(0, vitest_1.test)('should reject non-array, non-Set values', () => {
|
|
47
|
-
(0, vitest_1.expect)((0, sets_js_1.UniqueStringSetPayloadSchema)('string')).toBeInstanceOf(arktype_1.type.errors);
|
|
48
|
-
(0, vitest_1.expect)((0, sets_js_1.UniqueStringSetPayloadSchema)(123)).toBeInstanceOf(arktype_1.type.errors);
|
|
49
|
-
(0, vitest_1.expect)((0, sets_js_1.UniqueStringSetPayloadSchema)({})).toBeInstanceOf(arktype_1.type.errors);
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
(0, vitest_1.describe)('UniqueStringPayloadSchema', () => {
|
|
53
|
-
(0, vitest_1.test)('should convert Set to array', () => {
|
|
54
|
-
const stringSet = new Set(['x', 'y', 'z']);
|
|
55
|
-
const result = (0, sets_js_1.UniqueStringPayloadSchema)(stringSet);
|
|
56
|
-
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
57
|
-
(0, vitest_1.expect)(Array.isArray(result)).toBe(true);
|
|
58
|
-
(0, vitest_1.expect)(result.sort()).toEqual(['x', 'y', 'z']);
|
|
59
|
-
});
|
|
60
|
-
(0, vitest_1.test)('should convert array to unique array', () => {
|
|
61
|
-
const stringArray = ['a', 'b', 'a', 'c', 'b'];
|
|
62
|
-
const result = (0, sets_js_1.UniqueStringPayloadSchema)(stringArray);
|
|
63
|
-
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
64
|
-
(0, vitest_1.expect)(Array.isArray(result)).toBe(true);
|
|
65
|
-
(0, vitest_1.expect)(result.sort()).toEqual(['a', 'b', 'c']);
|
|
66
|
-
});
|
|
67
|
-
(0, vitest_1.test)('should handle empty inputs', () => {
|
|
68
|
-
const emptySet = new Set();
|
|
69
|
-
const emptyArray = [];
|
|
70
|
-
const setResult = (0, sets_js_1.UniqueStringPayloadSchema)(emptySet);
|
|
71
|
-
const arrayResult = (0, sets_js_1.UniqueStringPayloadSchema)(emptyArray);
|
|
72
|
-
(0, vitest_1.expect)(setResult).not.toBeInstanceOf(arktype_1.type.errors);
|
|
73
|
-
(0, vitest_1.expect)(arrayResult).not.toBeInstanceOf(arktype_1.type.errors);
|
|
74
|
-
(0, vitest_1.expect)(setResult.length).toBe(0);
|
|
75
|
-
(0, vitest_1.expect)(arrayResult.length).toBe(0);
|
|
76
|
-
});
|
|
77
|
-
(0, vitest_1.test)('should maintain order from original Set', () => {
|
|
78
|
-
const orderedSet = new Set(['first', 'second', 'third']);
|
|
79
|
-
const result = (0, sets_js_1.UniqueStringPayloadSchema)(orderedSet);
|
|
80
|
-
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
81
|
-
(0, vitest_1.expect)(result).toEqual(['first', 'second', 'third']);
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export declare const SetPasswordActionPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
2
|
-
id: string;
|
|
3
|
-
attempt: number;
|
|
4
|
-
expiresAt: (In: string | Date) => import("arktype").Out<string>;
|
|
5
|
-
updatedAt: (In: string | Date) => import("arktype").Out<string>;
|
|
6
|
-
deletedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
7
|
-
deactivatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
8
|
-
metadata?: ((In: {
|
|
9
|
-
[x: string]: string | number | boolean;
|
|
10
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
11
|
-
[x: string]: string | number | boolean;
|
|
12
|
-
} | undefined>) | undefined;
|
|
13
|
-
operation: "set-password";
|
|
14
|
-
user: string;
|
|
15
|
-
identifier: "email" | "phoneNumber";
|
|
16
|
-
policy: {
|
|
17
|
-
minimumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
18
|
-
maximumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
19
|
-
minimumCapital: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
20
|
-
minimumLower: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
21
|
-
minimumNumber: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
22
|
-
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
23
|
-
};
|
|
24
|
-
}, {}>;
|
|
25
|
-
export type SetPasswordActionPayload = typeof SetPasswordActionPayloadSchema.inferOut;
|
|
26
|
-
export declare const SetPasswordActionRequestSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
27
|
-
code: string;
|
|
28
|
-
password: string;
|
|
29
|
-
}, {}>;
|
|
30
|
-
export type SetPasswordActionRequest = typeof SetPasswordActionRequestSchema.inferOut;
|
|
31
|
-
//# sourceMappingURL=set-password.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-password.d.ts","sourceRoot":"","sources":["../../../../../src/action/schema/operations/set-password.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;MAKf,CAAC;AAC7B,MAAM,MAAM,wBAAwB,GAClC,OAAO,8BAA8B,CAAC,QAAQ,CAAC;AAEjD,eAAO,MAAM,8BAA8B;;;MAGf,CAAC;AAC7B,MAAM,MAAM,wBAAwB,GAClC,OAAO,8BAA8B,CAAC,QAAQ,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type } from 'arktype';
|
|
2
|
-
import { PasswordPolicySchema } from '../../../authentication/strategies/schema/schema.js';
|
|
3
|
-
import { UserIdSchema } from '../../../customer/schema.js';
|
|
4
|
-
import { IdentityIdentifierSchema } from '../../../identity/schema.js';
|
|
5
|
-
import { BasePayloadSchema } from '../base.js';
|
|
6
|
-
export const SetPasswordActionPayloadSchema = BasePayloadSchema.and({
|
|
7
|
-
operation: type("'set-password'"),
|
|
8
|
-
user: UserIdSchema,
|
|
9
|
-
identifier: IdentityIdentifierSchema,
|
|
10
|
-
policy: PasswordPolicySchema,
|
|
11
|
-
}).onUndeclaredKey('delete');
|
|
12
|
-
export const SetPasswordActionRequestSchema = type({
|
|
13
|
-
code: type('string'),
|
|
14
|
-
password: type('string'),
|
|
15
|
-
}).onUndeclaredKey('delete');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-password.test.d.ts","sourceRoot":"","sources":["../../../../../src/action/schema/operations/set-password.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { type } from 'arktype';
|
|
2
|
-
import { describe, expect, test } from 'vitest';
|
|
3
|
-
import { generateUserId } from '../../../customer/schema.js';
|
|
4
|
-
import { generateActionId } from '../utils.js';
|
|
5
|
-
import { SetPasswordActionPayloadSchema, SetPasswordActionRequestSchema, } from './set-password.js';
|
|
6
|
-
describe('Action Schema Operations - Set Password', () => {
|
|
7
|
-
describe('SetPasswordActionPayloadSchema', () => {
|
|
8
|
-
test('should accept complete payload with email identifier', () => {
|
|
9
|
-
const payload = {
|
|
10
|
-
id: generateActionId(),
|
|
11
|
-
operation: 'set-password',
|
|
12
|
-
user: generateUserId(),
|
|
13
|
-
identifier: 'email',
|
|
14
|
-
policy: {},
|
|
15
|
-
attempt: 1,
|
|
16
|
-
expiresAt: new Date().toISOString(),
|
|
17
|
-
updatedAt: new Date().toISOString(),
|
|
18
|
-
metadata: { key: 'value' },
|
|
19
|
-
};
|
|
20
|
-
const result = SetPasswordActionPayloadSchema(payload);
|
|
21
|
-
expect(result).not.toBeInstanceOf(type.errors);
|
|
22
|
-
// Policy defaults are applied, so we don't compare exact equality
|
|
23
|
-
});
|
|
24
|
-
test('should accept payload with phoneNumber identifier', () => {
|
|
25
|
-
const payload = {
|
|
26
|
-
id: generateActionId(),
|
|
27
|
-
operation: 'set-password',
|
|
28
|
-
user: generateUserId(),
|
|
29
|
-
identifier: 'phoneNumber',
|
|
30
|
-
policy: {},
|
|
31
|
-
attempt: 1,
|
|
32
|
-
expiresAt: new Date().toISOString(),
|
|
33
|
-
updatedAt: new Date().toISOString(),
|
|
34
|
-
metadata: {},
|
|
35
|
-
};
|
|
36
|
-
const result = SetPasswordActionPayloadSchema(payload);
|
|
37
|
-
expect(result).not.toBeInstanceOf(type.errors);
|
|
38
|
-
// Policy defaults are applied, so we don't compare exact equality
|
|
39
|
-
});
|
|
40
|
-
test('should accept payload with optional dates', () => {
|
|
41
|
-
const payload = {
|
|
42
|
-
id: generateActionId(),
|
|
43
|
-
operation: 'set-password',
|
|
44
|
-
user: generateUserId(),
|
|
45
|
-
identifier: 'email',
|
|
46
|
-
policy: {},
|
|
47
|
-
attempt: 2,
|
|
48
|
-
expiresAt: new Date().toISOString(),
|
|
49
|
-
updatedAt: new Date().toISOString(),
|
|
50
|
-
deletedAt: new Date().toISOString(),
|
|
51
|
-
deactivatedAt: new Date().toISOString(),
|
|
52
|
-
metadata: {},
|
|
53
|
-
};
|
|
54
|
-
const result = SetPasswordActionPayloadSchema(payload);
|
|
55
|
-
expect(result).not.toBeInstanceOf(type.errors);
|
|
56
|
-
});
|
|
57
|
-
test('should reject invalid operation', () => {
|
|
58
|
-
const payload = {
|
|
59
|
-
id: generateActionId(),
|
|
60
|
-
operation: 'invalid-operation',
|
|
61
|
-
user: generateUserId(),
|
|
62
|
-
identifier: 'email',
|
|
63
|
-
policy: {},
|
|
64
|
-
attempt: 1,
|
|
65
|
-
expiresAt: new Date().toISOString(),
|
|
66
|
-
updatedAt: new Date().toISOString(),
|
|
67
|
-
metadata: {},
|
|
68
|
-
};
|
|
69
|
-
const result = SetPasswordActionPayloadSchema(payload);
|
|
70
|
-
expect(result).toBeInstanceOf(type.errors);
|
|
71
|
-
});
|
|
72
|
-
test('should reject invalid identifier', () => {
|
|
73
|
-
const payload = {
|
|
74
|
-
id: generateActionId(),
|
|
75
|
-
operation: 'set-password',
|
|
76
|
-
user: generateUserId(),
|
|
77
|
-
identifier: 'username',
|
|
78
|
-
policy: {},
|
|
79
|
-
attempt: 1,
|
|
80
|
-
expiresAt: new Date().toISOString(),
|
|
81
|
-
updatedAt: new Date().toISOString(),
|
|
82
|
-
metadata: {},
|
|
83
|
-
};
|
|
84
|
-
const result = SetPasswordActionPayloadSchema(payload);
|
|
85
|
-
expect(result).toBeInstanceOf(type.errors);
|
|
86
|
-
});
|
|
87
|
-
test('should reject missing required fields', () => {
|
|
88
|
-
const payload = {
|
|
89
|
-
id: generateActionId(),
|
|
90
|
-
operation: 'set-password',
|
|
91
|
-
// missing user, identifier, policy, etc.
|
|
92
|
-
};
|
|
93
|
-
const result = SetPasswordActionPayloadSchema(payload);
|
|
94
|
-
expect(result).toBeInstanceOf(type.errors);
|
|
95
|
-
});
|
|
96
|
-
test('should delete undeclared keys', () => {
|
|
97
|
-
const payload = {
|
|
98
|
-
id: generateActionId(),
|
|
99
|
-
operation: 'set-password',
|
|
100
|
-
user: generateUserId(),
|
|
101
|
-
identifier: 'email',
|
|
102
|
-
policy: {},
|
|
103
|
-
attempt: 1,
|
|
104
|
-
expiresAt: new Date().toISOString(),
|
|
105
|
-
updatedAt: new Date().toISOString(),
|
|
106
|
-
metadata: {},
|
|
107
|
-
extraField: 'should be removed',
|
|
108
|
-
};
|
|
109
|
-
const result = SetPasswordActionPayloadSchema(payload);
|
|
110
|
-
expect(result).not.toBeInstanceOf(type.errors);
|
|
111
|
-
expect(result).not.toHaveProperty('extraField');
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
describe('SetPasswordActionRequestSchema', () => {
|
|
115
|
-
test('should accept valid request', () => {
|
|
116
|
-
const request = {
|
|
117
|
-
code: 'reset_code_123',
|
|
118
|
-
password: 'NewPassword123!',
|
|
119
|
-
};
|
|
120
|
-
const result = SetPasswordActionRequestSchema(request);
|
|
121
|
-
expect(result).not.toBeInstanceOf(type.errors);
|
|
122
|
-
expect(result).toEqual(request);
|
|
123
|
-
});
|
|
124
|
-
test('should reject missing code', () => {
|
|
125
|
-
const request = {
|
|
126
|
-
password: 'NewPassword123!',
|
|
127
|
-
};
|
|
128
|
-
const result = SetPasswordActionRequestSchema(request);
|
|
129
|
-
expect(result).toBeInstanceOf(type.errors);
|
|
130
|
-
});
|
|
131
|
-
test('should reject missing password', () => {
|
|
132
|
-
const request = {
|
|
133
|
-
code: 'reset_code_123',
|
|
134
|
-
};
|
|
135
|
-
const result = SetPasswordActionRequestSchema(request);
|
|
136
|
-
expect(result).toBeInstanceOf(type.errors);
|
|
137
|
-
});
|
|
138
|
-
test('should reject non-string values', () => {
|
|
139
|
-
const request1 = {
|
|
140
|
-
code: 123456,
|
|
141
|
-
password: 'NewPassword123!',
|
|
142
|
-
};
|
|
143
|
-
const request2 = {
|
|
144
|
-
code: 'reset_code_123',
|
|
145
|
-
password: 123456,
|
|
146
|
-
};
|
|
147
|
-
expect(SetPasswordActionRequestSchema(request1)).toBeInstanceOf(type.errors);
|
|
148
|
-
expect(SetPasswordActionRequestSchema(request2)).toBeInstanceOf(type.errors);
|
|
149
|
-
});
|
|
150
|
-
test('should delete undeclared keys', () => {
|
|
151
|
-
const request = {
|
|
152
|
-
code: 'reset_code_123',
|
|
153
|
-
password: 'NewPassword123!',
|
|
154
|
-
extraField: 'should be removed',
|
|
155
|
-
};
|
|
156
|
-
const result = SetPasswordActionRequestSchema(request);
|
|
157
|
-
expect(result).not.toBeInstanceOf(type.errors);
|
|
158
|
-
expect(result).not.toHaveProperty('extraField');
|
|
159
|
-
expect(result).toEqual({
|
|
160
|
-
code: 'reset_code_123',
|
|
161
|
-
password: 'NewPassword123!',
|
|
162
|
-
});
|
|
163
|
-
});
|
|
164
|
-
});
|
|
165
|
-
});
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
export declare const PasswordPolicyDefaults: {
|
|
2
|
-
minimumLength: number;
|
|
3
|
-
maximumLength: number;
|
|
4
|
-
minimumCapital: number;
|
|
5
|
-
minimumLower: number;
|
|
6
|
-
minimumNumber: number;
|
|
7
|
-
minimumSpecial: number;
|
|
8
|
-
};
|
|
9
|
-
export declare const PasswordPolicySchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
10
|
-
minimumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
11
|
-
maximumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
12
|
-
minimumCapital: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
13
|
-
minimumLower: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
14
|
-
minimumNumber: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
15
|
-
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
16
|
-
}, {}>;
|
|
17
|
-
export declare const PasswordStrategySettingsPropertySchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
18
|
-
settings: {
|
|
19
|
-
passwordPolicy: {
|
|
20
|
-
minimumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
21
|
-
maximumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
22
|
-
minimumCapital: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
23
|
-
minimumLower: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
24
|
-
minimumNumber: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
25
|
-
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
}, {}>;
|
|
29
|
-
export declare const PasswordStrategySchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
30
|
-
id: string;
|
|
31
|
-
status: "enabled" | "disabled";
|
|
32
|
-
label: string;
|
|
33
|
-
createdAt: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
34
|
-
updatedAt: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
35
|
-
deletedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
36
|
-
deactivatedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
37
|
-
metadata: (In: import("arktype/internal/attributes.ts").Default<unknown, Map<string, string | number | boolean>>) => import("arktype").Out<Map<string, string | number | boolean>>;
|
|
38
|
-
type: "password";
|
|
39
|
-
settings: {
|
|
40
|
-
passwordPolicy: {
|
|
41
|
-
minimumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
42
|
-
maximumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
43
|
-
minimumCapital: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
44
|
-
minimumLower: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
45
|
-
minimumNumber: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
46
|
-
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
}, {}>;
|
|
50
|
-
export type PasswordStrategyProperties = typeof PasswordStrategySchema.inferIn;
|
|
51
|
-
export type PasswordStrategy = typeof PasswordStrategySchema.inferOut;
|
|
52
|
-
export declare const PasswordStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
53
|
-
id: string;
|
|
54
|
-
status: "enabled" | "disabled";
|
|
55
|
-
label: string;
|
|
56
|
-
createdAt: (In: string | Date) => import("arktype").Out<string>;
|
|
57
|
-
updatedAt: (In: string | Date) => import("arktype").Out<string>;
|
|
58
|
-
deletedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
59
|
-
deactivatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
60
|
-
metadata?: ((In: {
|
|
61
|
-
[x: string]: string | number | boolean;
|
|
62
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
63
|
-
[x: string]: string | number | boolean;
|
|
64
|
-
} | undefined>) | undefined;
|
|
65
|
-
type: "password";
|
|
66
|
-
settings: {
|
|
67
|
-
passwordPolicy: {
|
|
68
|
-
minimumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
69
|
-
maximumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
70
|
-
minimumCapital: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
71
|
-
minimumLower: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
72
|
-
minimumNumber: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
73
|
-
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
}, {}>;
|
|
77
|
-
export type PasswordStrategyPayload = typeof PasswordStrategyPayloadSchema.inferOut;
|
|
78
|
-
export declare const InsertPasswordStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
79
|
-
type: "password";
|
|
80
|
-
label: string;
|
|
81
|
-
status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
|
|
82
|
-
id?: string | undefined;
|
|
83
|
-
metadata?: ((In: {
|
|
84
|
-
[x: string]: string | number | boolean;
|
|
85
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
86
|
-
[x: string]: string | number | boolean;
|
|
87
|
-
} | undefined>) | undefined;
|
|
88
|
-
settings?: {
|
|
89
|
-
passwordPolicy: {
|
|
90
|
-
minimumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
91
|
-
maximumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
92
|
-
minimumCapital: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
93
|
-
minimumLower: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
94
|
-
minimumNumber: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
95
|
-
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
96
|
-
};
|
|
97
|
-
} | undefined;
|
|
98
|
-
}, {}>;
|
|
99
|
-
export type InsertPasswordStrategyInput = typeof InsertPasswordStrategyPayloadSchema.inferIn;
|
|
100
|
-
export type InsertPasswordStrategyPayload = typeof InsertPasswordStrategyPayloadSchema.inferOut;
|
|
101
|
-
export declare const UpdatePasswordStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
102
|
-
type: "password";
|
|
103
|
-
label?: string | undefined;
|
|
104
|
-
status?: "enabled" | "disabled" | undefined;
|
|
105
|
-
metadata?: ((In: {
|
|
106
|
-
[x: string]: string | number | boolean;
|
|
107
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
108
|
-
[x: string]: string | number | boolean;
|
|
109
|
-
} | undefined>) | undefined;
|
|
110
|
-
settings?: {
|
|
111
|
-
passwordPolicy: {
|
|
112
|
-
minimumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
113
|
-
maximumLength: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
114
|
-
minimumCapital: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
115
|
-
minimumLower: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
116
|
-
minimumNumber: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
117
|
-
minimumSpecial: import("arktype/internal/attributes.ts").Default<number, number>;
|
|
118
|
-
};
|
|
119
|
-
} | undefined;
|
|
120
|
-
}, {}>;
|
|
121
|
-
export type UpdatePasswordStrategyInput = typeof UpdatePasswordStrategyPayloadSchema.inferIn;
|
|
122
|
-
export type UpdatePasswordStrategyPayload = typeof UpdatePasswordStrategyPayloadSchema.inferOut;
|
|
123
|
-
export declare const ForgotPasswordSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
124
|
-
identifier?: string | undefined;
|
|
125
|
-
identifierType?: "email" | "phoneNumber" | undefined;
|
|
126
|
-
}, {}>;
|
|
127
|
-
export declare const VerifyPasswordSchema: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
128
|
-
password: string;
|
|
129
|
-
identifier?: string | undefined;
|
|
130
|
-
identifierType?: "email" | "phoneNumber" | undefined;
|
|
131
|
-
}, {}>;
|
|
132
|
-
//# sourceMappingURL=password.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/strategies/schema/types/password.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,sBAAsB;;;;;;;CAOlC,CAAC;AAMF,eAAO,MAAM,oBAAoB;;;;;;;MAO/B,CAAC;AAMH,eAAO,MAAM,sCAAsC;;;;;;;;;;;MAEjD,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;MAEjC,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,OAAO,sBAAsB,CAAC,OAAO,CAAC;AAC/E,MAAM,MAAM,gBAAgB,GAAG,OAAO,sBAAsB,CAAC,QAAQ,CAAC;AAEtE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;MAEG,CAAC;AAC9C,MAAM,MAAM,uBAAuB,GACjC,OAAO,6BAA6B,CAAC,QAAQ,CAAC;AAEhD,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;MAM5C,CAAC;AACL,MAAM,MAAM,2BAA2B,GACrC,OAAO,mCAAmC,CAAC,OAAO,CAAC;AACrD,MAAM,MAAM,6BAA6B,GACvC,OAAO,mCAAmC,CAAC,QAAQ,CAAC;AAEtD,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;MAI9C,CAAC;AACH,MAAM,MAAM,2BAA2B,GACrC,OAAO,mCAAmC,CAAC,OAAO,CAAC;AACrD,MAAM,MAAM,6BAA6B,GACvC,OAAO,mCAAmC,CAAC,QAAQ,CAAC;AAEtD,eAAO,MAAM,oBAAoB;;;MAG/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;MAI/B,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { type } from 'arktype';
|
|
2
|
-
import { IdentityIdentifierSchema } from '../../../../identity/schema.js';
|
|
3
|
-
import { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseStrategySchema, BaseUpdateStrategyPayloadSchema, } from '../base.js';
|
|
4
|
-
export const PasswordPolicyDefaults = {
|
|
5
|
-
minimumLength: 8,
|
|
6
|
-
maximumLength: 36,
|
|
7
|
-
minimumCapital: 1,
|
|
8
|
-
minimumLower: 1,
|
|
9
|
-
minimumNumber: 1,
|
|
10
|
-
minimumSpecial: 1,
|
|
11
|
-
};
|
|
12
|
-
const TypeSchema = type({
|
|
13
|
-
type: "'password'",
|
|
14
|
-
});
|
|
15
|
-
export const PasswordPolicySchema = type({
|
|
16
|
-
minimumLength: type.number.default(PasswordPolicyDefaults.minimumLength),
|
|
17
|
-
maximumLength: type.number.default(PasswordPolicyDefaults.maximumLength),
|
|
18
|
-
minimumCapital: type.number.default(PasswordPolicyDefaults.minimumCapital),
|
|
19
|
-
minimumLower: type.number.default(PasswordPolicyDefaults.minimumLower),
|
|
20
|
-
minimumNumber: type.number.default(PasswordPolicyDefaults.minimumNumber),
|
|
21
|
-
minimumSpecial: type.number.default(PasswordPolicyDefaults.minimumSpecial),
|
|
22
|
-
});
|
|
23
|
-
const SettingsSchema = type({
|
|
24
|
-
passwordPolicy: PasswordPolicySchema,
|
|
25
|
-
});
|
|
26
|
-
export const PasswordStrategySettingsPropertySchema = type({
|
|
27
|
-
settings: SettingsSchema,
|
|
28
|
-
});
|
|
29
|
-
export const PasswordStrategySchema = BaseStrategySchema.and(TypeSchema).and({
|
|
30
|
-
settings: SettingsSchema,
|
|
31
|
-
});
|
|
32
|
-
export const PasswordStrategyPayloadSchema = BaseStrategyPayloadSchema.and(TypeSchema).and(PasswordStrategySettingsPropertySchema);
|
|
33
|
-
export const InsertPasswordStrategyPayloadSchema = TypeSchema.and(BaseInsertStrategyPayloadSchema)
|
|
34
|
-
.and(TypeSchema)
|
|
35
|
-
.and({
|
|
36
|
-
settings: SettingsSchema.optional(),
|
|
37
|
-
});
|
|
38
|
-
export const UpdatePasswordStrategyPayloadSchema = TypeSchema.and(BaseUpdateStrategyPayloadSchema).and({
|
|
39
|
-
settings: SettingsSchema.optional(),
|
|
40
|
-
});
|
|
41
|
-
export const ForgotPasswordSchema = type({
|
|
42
|
-
identifier: type('string').optional(),
|
|
43
|
-
identifierType: IdentityIdentifierSchema.optional(),
|
|
44
|
-
});
|
|
45
|
-
export const VerifyPasswordSchema = type({
|
|
46
|
-
password: type('string'),
|
|
47
|
-
identifier: type('string').optional(),
|
|
48
|
-
identifierType: IdentityIdentifierSchema.optional(),
|
|
49
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sets.test.d.ts","sourceRoot":"","sources":["../../../../src/common/schema/sets.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { type } from 'arktype';
|
|
2
|
-
import { describe, expect, test } from 'vitest';
|
|
3
|
-
import { UniqueStringSetPayloadSchema, UniqueStringPayloadSchema, } from './sets.js';
|
|
4
|
-
describe('Common Schema - Sets', () => {
|
|
5
|
-
describe('UniqueStringSetPayloadSchema', () => {
|
|
6
|
-
test('should accept Set of strings', () => {
|
|
7
|
-
const stringSet = new Set(['a', 'b', 'c']);
|
|
8
|
-
const result = UniqueStringSetPayloadSchema(stringSet);
|
|
9
|
-
expect(result).not.toBeInstanceOf(type.errors);
|
|
10
|
-
expect(result).toBeInstanceOf(Set);
|
|
11
|
-
expect(Array.from(result).sort()).toEqual(['a', 'b', 'c']);
|
|
12
|
-
});
|
|
13
|
-
test('should accept array of strings and convert to Set', () => {
|
|
14
|
-
const stringArray = ['x', 'y', 'z'];
|
|
15
|
-
const result = UniqueStringSetPayloadSchema(stringArray);
|
|
16
|
-
expect(result).not.toBeInstanceOf(type.errors);
|
|
17
|
-
expect(result).toBeInstanceOf(Set);
|
|
18
|
-
expect(Array.from(result).sort()).toEqual(['x', 'y', 'z']);
|
|
19
|
-
});
|
|
20
|
-
test('should handle duplicate strings in array', () => {
|
|
21
|
-
const stringArray = ['a', 'b', 'a', 'c', 'b'];
|
|
22
|
-
const result = UniqueStringSetPayloadSchema(stringArray);
|
|
23
|
-
expect(result).not.toBeInstanceOf(type.errors);
|
|
24
|
-
expect(result).toBeInstanceOf(Set);
|
|
25
|
-
expect(Array.from(result).sort()).toEqual(['a', 'b', 'c']);
|
|
26
|
-
});
|
|
27
|
-
test('should accept empty array', () => {
|
|
28
|
-
const result = UniqueStringSetPayloadSchema([]);
|
|
29
|
-
expect(result).not.toBeInstanceOf(type.errors);
|
|
30
|
-
expect(result).toBeInstanceOf(Set);
|
|
31
|
-
expect(result.size).toBe(0);
|
|
32
|
-
});
|
|
33
|
-
test('should accept empty Set', () => {
|
|
34
|
-
const emptySet = new Set();
|
|
35
|
-
const result = UniqueStringSetPayloadSchema(emptySet);
|
|
36
|
-
expect(result).not.toBeInstanceOf(type.errors);
|
|
37
|
-
expect(result).toBeInstanceOf(Set);
|
|
38
|
-
expect(result.size).toBe(0);
|
|
39
|
-
});
|
|
40
|
-
test('should reject non-string array elements', () => {
|
|
41
|
-
const result = UniqueStringSetPayloadSchema(['a', 123, 'b']);
|
|
42
|
-
expect(result).toBeInstanceOf(type.errors);
|
|
43
|
-
});
|
|
44
|
-
test('should reject non-array, non-Set values', () => {
|
|
45
|
-
expect(UniqueStringSetPayloadSchema('string')).toBeInstanceOf(type.errors);
|
|
46
|
-
expect(UniqueStringSetPayloadSchema(123)).toBeInstanceOf(type.errors);
|
|
47
|
-
expect(UniqueStringSetPayloadSchema({})).toBeInstanceOf(type.errors);
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
describe('UniqueStringPayloadSchema', () => {
|
|
51
|
-
test('should convert Set to array', () => {
|
|
52
|
-
const stringSet = new Set(['x', 'y', 'z']);
|
|
53
|
-
const result = UniqueStringPayloadSchema(stringSet);
|
|
54
|
-
expect(result).not.toBeInstanceOf(type.errors);
|
|
55
|
-
expect(Array.isArray(result)).toBe(true);
|
|
56
|
-
expect(result.sort()).toEqual(['x', 'y', 'z']);
|
|
57
|
-
});
|
|
58
|
-
test('should convert array to unique array', () => {
|
|
59
|
-
const stringArray = ['a', 'b', 'a', 'c', 'b'];
|
|
60
|
-
const result = UniqueStringPayloadSchema(stringArray);
|
|
61
|
-
expect(result).not.toBeInstanceOf(type.errors);
|
|
62
|
-
expect(Array.isArray(result)).toBe(true);
|
|
63
|
-
expect(result.sort()).toEqual(['a', 'b', 'c']);
|
|
64
|
-
});
|
|
65
|
-
test('should handle empty inputs', () => {
|
|
66
|
-
const emptySet = new Set();
|
|
67
|
-
const emptyArray = [];
|
|
68
|
-
const setResult = UniqueStringPayloadSchema(emptySet);
|
|
69
|
-
const arrayResult = UniqueStringPayloadSchema(emptyArray);
|
|
70
|
-
expect(setResult).not.toBeInstanceOf(type.errors);
|
|
71
|
-
expect(arrayResult).not.toBeInstanceOf(type.errors);
|
|
72
|
-
expect(setResult.length).toBe(0);
|
|
73
|
-
expect(arrayResult.length).toBe(0);
|
|
74
|
-
});
|
|
75
|
-
test('should maintain order from original Set', () => {
|
|
76
|
-
const orderedSet = new Set(['first', 'second', 'third']);
|
|
77
|
-
const result = UniqueStringPayloadSchema(orderedSet);
|
|
78
|
-
expect(result).not.toBeInstanceOf(type.errors);
|
|
79
|
-
expect(result).toEqual(['first', 'second', 'third']);
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
});
|