@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,20 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
export type UserAttributeVerificationActionPayload = typeof UserAttributeVerificationActionPayloadSchema
|
|
18
|
-
export declare const UserAttributeVerificationActionRequestSchema:
|
|
19
|
-
export type UserAttributeVerificationActionRequest = typeof UserAttributeVerificationActionRequestSchema
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export declare const UserAttributeVerificationActionPayloadSchema: z.ZodObject<{
|
|
3
|
+
operation: z.ZodLiteral<"user-attribute-verification">;
|
|
4
|
+
user: z.ZodString;
|
|
5
|
+
attribute: z.ZodEnum<{
|
|
6
|
+
email: "email";
|
|
7
|
+
phoneNumber: "phoneNumber";
|
|
8
|
+
}>;
|
|
9
|
+
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/index.js").MetadataRecord, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../../common/index.js").MetadataRecord | undefined, import("../../../common/index.js").MetadataRecord | undefined>>;
|
|
10
|
+
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>>>;
|
|
11
|
+
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>>>;
|
|
12
|
+
updatedAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
13
|
+
attempt: z.ZodNumber;
|
|
14
|
+
expiresAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
15
|
+
id: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type UserAttributeVerificationActionPayload = z.output<typeof UserAttributeVerificationActionPayloadSchema>;
|
|
18
|
+
export declare const UserAttributeVerificationActionRequestSchema: z.ZodObject<{}, z.core.$strip>;
|
|
19
|
+
export type UserAttributeVerificationActionRequest = z.output<typeof UserAttributeVerificationActionRequestSchema>;
|
|
20
20
|
//# sourceMappingURL=user-attribute-verification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-attribute-verification.d.ts","sourceRoot":"","sources":["../../../../../src/action/schema/operations/user-attribute-verification.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user-attribute-verification.d.ts","sourceRoot":"","sources":["../../../../../src/action/schema/operations/user-attribute-verification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAK5B,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;iBAKvD,CAAC;AACH,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,MAAM,CAC3D,OAAO,4CAA4C,CACpD,CAAC;AAEF,eAAO,MAAM,4CAA4C,gCAAe,CAAC;AACzE,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,MAAM,CAC3D,OAAO,4CAA4C,CACpD,CAAC"}
|
|
@@ -1,13 +1,47 @@
|
|
|
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
36
|
exports.UserAttributeVerificationActionRequestSchema = exports.UserAttributeVerificationActionPayloadSchema = void 0;
|
|
4
|
-
const
|
|
37
|
+
const z = __importStar(require("zod/v4"));
|
|
5
38
|
const schema_js_1 = require("../../../customer/schema.js");
|
|
6
39
|
const schema_js_2 = require("../../../identity/schema.js");
|
|
7
40
|
const base_js_1 = require("../base.js");
|
|
8
|
-
exports.UserAttributeVerificationActionPayloadSchema =
|
|
9
|
-
|
|
41
|
+
exports.UserAttributeVerificationActionPayloadSchema = z.object({
|
|
42
|
+
...base_js_1.BasePayloadSchema.shape,
|
|
43
|
+
operation: z.literal('user-attribute-verification'),
|
|
10
44
|
user: schema_js_1.UserIdSchema,
|
|
11
45
|
attribute: schema_js_2.IdentityIdentifierSchema,
|
|
12
|
-
})
|
|
13
|
-
exports.UserAttributeVerificationActionRequestSchema =
|
|
46
|
+
});
|
|
47
|
+
exports.UserAttributeVerificationActionRequestSchema = z.object({});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const arktype_1 = require("arktype");
|
|
4
3
|
const vitest_1 = require("vitest");
|
|
5
4
|
const schema_js_1 = require("../../../customer/schema.js");
|
|
6
5
|
const utils_js_1 = require("../utils.js");
|
|
@@ -18,9 +17,9 @@ const user_attribute_verification_js_1 = require("./user-attribute-verification.
|
|
|
18
17
|
updatedAt: new Date().toISOString(),
|
|
19
18
|
metadata: { key: 'value' },
|
|
20
19
|
};
|
|
21
|
-
const result =
|
|
22
|
-
|
|
23
|
-
(0, vitest_1.expect)(result).toEqual(payload);
|
|
20
|
+
const result = user_attribute_verification_js_1.UserAttributeVerificationActionPayloadSchema.safeParse(payload);
|
|
21
|
+
// Parse succeeds for valid data
|
|
22
|
+
(0, vitest_1.expect)(result.data).toEqual(payload);
|
|
24
23
|
});
|
|
25
24
|
(0, vitest_1.test)('should accept payload with phoneNumber attribute', () => {
|
|
26
25
|
const payload = {
|
|
@@ -33,9 +32,9 @@ const user_attribute_verification_js_1 = require("./user-attribute-verification.
|
|
|
33
32
|
updatedAt: new Date().toISOString(),
|
|
34
33
|
metadata: {},
|
|
35
34
|
};
|
|
36
|
-
const result =
|
|
37
|
-
|
|
38
|
-
(0, vitest_1.expect)(result).
|
|
35
|
+
const result = user_attribute_verification_js_1.UserAttributeVerificationActionPayloadSchema.safeParse(payload);
|
|
36
|
+
// Parse succeeds for valid data
|
|
37
|
+
(0, vitest_1.expect)(result.data?.metadata).toBeUndefined();
|
|
39
38
|
});
|
|
40
39
|
(0, vitest_1.test)('should accept payload with optional dates', () => {
|
|
41
40
|
const payload = {
|
|
@@ -50,8 +49,8 @@ const user_attribute_verification_js_1 = require("./user-attribute-verification.
|
|
|
50
49
|
deactivatedAt: new Date().toISOString(),
|
|
51
50
|
metadata: {},
|
|
52
51
|
};
|
|
53
|
-
const result =
|
|
54
|
-
|
|
52
|
+
const result = user_attribute_verification_js_1.UserAttributeVerificationActionPayloadSchema.safeParse(payload);
|
|
53
|
+
// Parse succeeds for valid data
|
|
55
54
|
});
|
|
56
55
|
(0, vitest_1.test)('should reject invalid operation', () => {
|
|
57
56
|
const payload = {
|
|
@@ -64,8 +63,8 @@ const user_attribute_verification_js_1 = require("./user-attribute-verification.
|
|
|
64
63
|
updatedAt: new Date().toISOString(),
|
|
65
64
|
metadata: {},
|
|
66
65
|
};
|
|
67
|
-
const result =
|
|
68
|
-
(0, vitest_1.expect)(result).
|
|
66
|
+
const result = user_attribute_verification_js_1.UserAttributeVerificationActionPayloadSchema.safeParse(payload);
|
|
67
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
69
68
|
});
|
|
70
69
|
(0, vitest_1.test)('should reject invalid attribute', () => {
|
|
71
70
|
const payload = {
|
|
@@ -78,8 +77,8 @@ const user_attribute_verification_js_1 = require("./user-attribute-verification.
|
|
|
78
77
|
updatedAt: new Date().toISOString(),
|
|
79
78
|
metadata: {},
|
|
80
79
|
};
|
|
81
|
-
const result =
|
|
82
|
-
(0, vitest_1.expect)(result).
|
|
80
|
+
const result = user_attribute_verification_js_1.UserAttributeVerificationActionPayloadSchema.safeParse(payload);
|
|
81
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
83
82
|
});
|
|
84
83
|
(0, vitest_1.test)('should reject missing required fields', () => {
|
|
85
84
|
const payload = {
|
|
@@ -87,8 +86,8 @@ const user_attribute_verification_js_1 = require("./user-attribute-verification.
|
|
|
87
86
|
operation: 'user-attribute-verification',
|
|
88
87
|
// missing user, attribute, attempt, etc.
|
|
89
88
|
};
|
|
90
|
-
const result =
|
|
91
|
-
(0, vitest_1.expect)(result).
|
|
89
|
+
const result = user_attribute_verification_js_1.UserAttributeVerificationActionPayloadSchema.safeParse(payload);
|
|
90
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
92
91
|
});
|
|
93
92
|
(0, vitest_1.test)('should delete undeclared keys', () => {
|
|
94
93
|
const payload = {
|
|
@@ -102,28 +101,28 @@ const user_attribute_verification_js_1 = require("./user-attribute-verification.
|
|
|
102
101
|
metadata: {},
|
|
103
102
|
extraField: 'should be removed',
|
|
104
103
|
};
|
|
105
|
-
const result =
|
|
106
|
-
|
|
107
|
-
(0, vitest_1.expect)(result).not.toHaveProperty('extraField');
|
|
104
|
+
const result = user_attribute_verification_js_1.UserAttributeVerificationActionPayloadSchema.safeParse(payload);
|
|
105
|
+
// Parse succeeds for valid data
|
|
106
|
+
(0, vitest_1.expect)(result.data).not.toHaveProperty('extraField');
|
|
108
107
|
});
|
|
109
108
|
});
|
|
110
109
|
(0, vitest_1.describe)('UserAttributeVerificationActionRequestSchema', () => {
|
|
111
110
|
(0, vitest_1.test)('should accept empty request', () => {
|
|
112
111
|
const request = {};
|
|
113
|
-
const result =
|
|
114
|
-
|
|
115
|
-
(0, vitest_1.expect)(result).toEqual(request);
|
|
112
|
+
const result = user_attribute_verification_js_1.UserAttributeVerificationActionRequestSchema.safeParse(request);
|
|
113
|
+
// Parse succeeds for valid data
|
|
114
|
+
(0, vitest_1.expect)(result.data).toEqual(request);
|
|
116
115
|
});
|
|
117
116
|
(0, vitest_1.test)('should delete undeclared keys', () => {
|
|
118
117
|
const request = {
|
|
119
118
|
extraField: 'should be removed',
|
|
120
119
|
anotherField: 'also removed',
|
|
121
120
|
};
|
|
122
|
-
const result =
|
|
123
|
-
|
|
124
|
-
(0, vitest_1.expect)(result).not.toHaveProperty('extraField');
|
|
125
|
-
(0, vitest_1.expect)(result).not.toHaveProperty('anotherField');
|
|
126
|
-
(0, vitest_1.expect)(result).toEqual({});
|
|
121
|
+
const result = user_attribute_verification_js_1.UserAttributeVerificationActionRequestSchema.safeParse(request);
|
|
122
|
+
// Parse succeeds for valid data
|
|
123
|
+
(0, vitest_1.expect)(result.data).not.toHaveProperty('extraField');
|
|
124
|
+
(0, vitest_1.expect)(result.data).not.toHaveProperty('anotherField');
|
|
125
|
+
(0, vitest_1.expect)(result.data).toEqual({});
|
|
127
126
|
});
|
|
128
127
|
});
|
|
129
128
|
});
|
|
@@ -1,85 +1,57 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
/**
|
|
2
3
|
* Union
|
|
3
4
|
*/
|
|
4
|
-
export declare const ActionPayloadSchema:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
metadata
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
updatedAt:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
52
|
-
[x: string]: string | number | boolean;
|
|
53
|
-
} | undefined>) | undefined;
|
|
54
|
-
operation: "sign-up";
|
|
55
|
-
user: {
|
|
56
|
-
givenName?: string | undefined;
|
|
57
|
-
middleName?: string | undefined;
|
|
58
|
-
familyName?: string | undefined;
|
|
59
|
-
honorificPrefix?: string | undefined;
|
|
60
|
-
honorificSuffix?: string | undefined;
|
|
61
|
-
};
|
|
62
|
-
app?: string | undefined;
|
|
63
|
-
} | {
|
|
64
|
-
id: string;
|
|
65
|
-
attempt: number;
|
|
66
|
-
expiresAt: (In: string | Date) => import("arktype").Out<string>;
|
|
67
|
-
updatedAt: (In: string | Date) => import("arktype").Out<string>;
|
|
68
|
-
deletedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
69
|
-
deactivatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
|
|
70
|
-
metadata?: ((In: {
|
|
71
|
-
[x: string]: string | number | boolean;
|
|
72
|
-
} | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
|
|
73
|
-
[x: string]: string | number | boolean;
|
|
74
|
-
} | undefined>) | undefined;
|
|
75
|
-
operation: "user-attribute-verification";
|
|
76
|
-
user: string;
|
|
77
|
-
attribute: "email" | "phoneNumber";
|
|
78
|
-
}, {}>;
|
|
79
|
-
export type ActionPayload = typeof ActionPayloadSchema.inferOut;
|
|
5
|
+
export declare const ActionPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
+
operation: z.ZodLiteral<"sign-up-verification">;
|
|
7
|
+
user: z.ZodString;
|
|
8
|
+
identifier: z.ZodEnum<{
|
|
9
|
+
email: "email";
|
|
10
|
+
phoneNumber: "phoneNumber";
|
|
11
|
+
}>;
|
|
12
|
+
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/index.js").MetadataRecord, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../common/index.js").MetadataRecord | undefined, import("../../common/index.js").MetadataRecord | undefined>>;
|
|
13
|
+
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>>>;
|
|
14
|
+
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>>>;
|
|
15
|
+
updatedAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
16
|
+
attempt: z.ZodNumber;
|
|
17
|
+
expiresAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
20
|
+
operation: z.ZodLiteral<"sign-up">;
|
|
21
|
+
app: z.ZodOptional<z.ZodString>;
|
|
22
|
+
user: z.ZodObject<{
|
|
23
|
+
givenName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
24
|
+
middleName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
25
|
+
familyName: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
26
|
+
honorificPrefix: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
27
|
+
honorificSuffix: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>, z.ZodTransform<string | undefined, string | null | undefined>>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
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/index.js").MetadataRecord, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../common/index.js").MetadataRecord | undefined, import("../../common/index.js").MetadataRecord | undefined>>;
|
|
30
|
+
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>>>;
|
|
31
|
+
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>>>;
|
|
32
|
+
updatedAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
33
|
+
attempt: z.ZodNumber;
|
|
34
|
+
expiresAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
37
|
+
operation: z.ZodLiteral<"user-attribute-verification">;
|
|
38
|
+
user: z.ZodString;
|
|
39
|
+
attribute: z.ZodEnum<{
|
|
40
|
+
email: "email";
|
|
41
|
+
phoneNumber: "phoneNumber";
|
|
42
|
+
}>;
|
|
43
|
+
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/index.js").MetadataRecord, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>, z.ZodTransform<import("../../common/index.js").MetadataRecord | undefined, import("../../common/index.js").MetadataRecord | undefined>>;
|
|
44
|
+
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>>>;
|
|
45
|
+
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>>>;
|
|
46
|
+
updatedAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
47
|
+
attempt: z.ZodNumber;
|
|
48
|
+
expiresAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>, z.ZodTransform<string, Date>>;
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
}, z.core.$strip>], "operation">;
|
|
51
|
+
export type ActionPayload = z.output<typeof ActionPayloadSchema>;
|
|
80
52
|
export { ActionIdPropertySchema, ActionIdSchema, ActionOperation, type ActionId, type ActionIdProperty, type AnyActionOperation, } from './base.js';
|
|
81
|
-
export * from './operations/set-password.js';
|
|
82
53
|
export * from './operations/sign-up-verification.js';
|
|
83
54
|
export * from './operations/sign-up.js';
|
|
84
55
|
export * from './operations/user-attribute-verification.js';
|
|
56
|
+
export * from './utils.js';
|
|
85
57
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/action/schema/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/action/schema/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAI9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEjE,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,GACxB,MAAM,WAAW,CAAC;AACnB,cAAc,sCAAsC,CAAC;AACrD,cAAc,yBAAyB,CAAC;AACxC,cAAc,6CAA6C,CAAC;AAC5D,cAAc,YAAY,CAAC"}
|
|
@@ -15,21 +15,23 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.ActionOperation = exports.ActionIdSchema = exports.ActionIdPropertySchema = exports.ActionPayloadSchema = void 0;
|
|
18
|
-
const
|
|
18
|
+
const zod_1 = require("zod");
|
|
19
19
|
const sign_up_verification_js_1 = require("./operations/sign-up-verification.js");
|
|
20
20
|
const sign_up_js_1 = require("./operations/sign-up.js");
|
|
21
21
|
const user_attribute_verification_js_1 = require("./operations/user-attribute-verification.js");
|
|
22
22
|
/**
|
|
23
23
|
* Union
|
|
24
24
|
*/
|
|
25
|
-
exports.ActionPayloadSchema =
|
|
26
|
-
.
|
|
27
|
-
.
|
|
25
|
+
exports.ActionPayloadSchema = zod_1.z.discriminatedUnion('operation', [
|
|
26
|
+
sign_up_verification_js_1.SignUpVerificationActionPayloadSchema,
|
|
27
|
+
sign_up_js_1.SignUpActionPayloadSchema,
|
|
28
|
+
user_attribute_verification_js_1.UserAttributeVerificationActionPayloadSchema,
|
|
29
|
+
]);
|
|
28
30
|
var base_js_1 = require("./base.js");
|
|
29
31
|
Object.defineProperty(exports, "ActionIdPropertySchema", { enumerable: true, get: function () { return base_js_1.ActionIdPropertySchema; } });
|
|
30
32
|
Object.defineProperty(exports, "ActionIdSchema", { enumerable: true, get: function () { return base_js_1.ActionIdSchema; } });
|
|
31
33
|
Object.defineProperty(exports, "ActionOperation", { enumerable: true, get: function () { return base_js_1.ActionOperation; } });
|
|
32
|
-
__exportStar(require("./operations/set-password.js"), exports);
|
|
33
34
|
__exportStar(require("./operations/sign-up-verification.js"), exports);
|
|
34
35
|
__exportStar(require("./operations/sign-up.js"), exports);
|
|
35
36
|
__exportStar(require("./operations/user-attribute-verification.js"), exports);
|
|
37
|
+
__exportStar(require("./utils.js"), exports);
|
|
@@ -1,40 +1,24 @@
|
|
|
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
|
-
const schema_js_1 = require("
|
|
4
|
+
const schema_js_1 = require("../../customer/schema.js");
|
|
5
|
+
const schema_js_2 = require("./schema.js");
|
|
6
6
|
const utils_js_1 = require("./utils.js");
|
|
7
|
-
const schema_js_2 = require("../../customer/schema.js");
|
|
8
7
|
(0, vitest_1.describe)('Action Schema - Main', () => {
|
|
9
8
|
(0, vitest_1.describe)('ActionPayloadSchema', () => {
|
|
10
|
-
(0, vitest_1.test)('should accept set-password action payload', () => {
|
|
11
|
-
const payload = {
|
|
12
|
-
id: (0, utils_js_1.generateActionId)(),
|
|
13
|
-
operation: 'set-password',
|
|
14
|
-
user: (0, schema_js_2.generateUserId)(),
|
|
15
|
-
identifier: 'email',
|
|
16
|
-
policy: {},
|
|
17
|
-
attempt: 1,
|
|
18
|
-
expiresAt: new Date().toISOString(),
|
|
19
|
-
updatedAt: new Date().toISOString(),
|
|
20
|
-
metadata: { source: 'user-initiated' },
|
|
21
|
-
};
|
|
22
|
-
const result = (0, schema_js_1.ActionPayloadSchema)(payload);
|
|
23
|
-
(0, vitest_1.expect)(result).not.toBeInstanceOf(arktype_1.type.errors);
|
|
24
|
-
});
|
|
25
9
|
(0, vitest_1.test)('should accept sign-up-verification action payload', () => {
|
|
26
10
|
const payload = {
|
|
27
11
|
id: (0, utils_js_1.generateActionId)(),
|
|
28
12
|
operation: 'sign-up-verification',
|
|
29
|
-
user: (0,
|
|
13
|
+
user: (0, schema_js_1.generateUserId)(),
|
|
30
14
|
identifier: 'email',
|
|
31
15
|
attempt: 1,
|
|
32
16
|
expiresAt: new Date().toISOString(),
|
|
33
17
|
updatedAt: new Date().toISOString(),
|
|
34
18
|
metadata: { method: 'email' },
|
|
35
19
|
};
|
|
36
|
-
const result =
|
|
37
|
-
|
|
20
|
+
const result = schema_js_2.ActionPayloadSchema.safeParse(payload);
|
|
21
|
+
// Parse succeeds for valid data
|
|
38
22
|
});
|
|
39
23
|
(0, vitest_1.test)('should accept sign-up action payload', () => {
|
|
40
24
|
const payload = {
|
|
@@ -49,22 +33,22 @@ const schema_js_2 = require("../../customer/schema.js");
|
|
|
49
33
|
updatedAt: new Date().toISOString(),
|
|
50
34
|
metadata: { registration_source: 'web' },
|
|
51
35
|
};
|
|
52
|
-
const result =
|
|
53
|
-
|
|
36
|
+
const result = schema_js_2.ActionPayloadSchema.safeParse(payload);
|
|
37
|
+
// Parse succeeds for valid data
|
|
54
38
|
});
|
|
55
39
|
(0, vitest_1.test)('should accept user-attribute-verification action payload', () => {
|
|
56
40
|
const payload = {
|
|
57
41
|
id: (0, utils_js_1.generateActionId)(),
|
|
58
42
|
operation: 'user-attribute-verification',
|
|
59
|
-
user: (0,
|
|
43
|
+
user: (0, schema_js_1.generateUserId)(),
|
|
60
44
|
attribute: 'email',
|
|
61
45
|
attempt: 1,
|
|
62
46
|
expiresAt: new Date().toISOString(),
|
|
63
47
|
updatedAt: new Date().toISOString(),
|
|
64
48
|
metadata: { verification_type: 'change_email' },
|
|
65
49
|
};
|
|
66
|
-
const result =
|
|
67
|
-
|
|
50
|
+
const result = schema_js_2.ActionPayloadSchema.safeParse(payload);
|
|
51
|
+
// Parse succeeds for valid data
|
|
68
52
|
});
|
|
69
53
|
(0, vitest_1.test)('should reject invalid action operation', () => {
|
|
70
54
|
const payload = {
|
|
@@ -72,18 +56,8 @@ const schema_js_2 = require("../../customer/schema.js");
|
|
|
72
56
|
operation: 'invalid-operation',
|
|
73
57
|
metadata: {},
|
|
74
58
|
};
|
|
75
|
-
const result =
|
|
76
|
-
(0, vitest_1.expect)(result).
|
|
77
|
-
});
|
|
78
|
-
(0, vitest_1.test)('should reject payload missing required fields for set-password', () => {
|
|
79
|
-
const payload = {
|
|
80
|
-
id: (0, utils_js_1.generateActionId)(),
|
|
81
|
-
operation: 'set-password',
|
|
82
|
-
// missing password
|
|
83
|
-
metadata: {},
|
|
84
|
-
};
|
|
85
|
-
const result = (0, schema_js_1.ActionPayloadSchema)(payload);
|
|
86
|
-
(0, vitest_1.expect)(result).toBeInstanceOf(arktype_1.type.errors);
|
|
59
|
+
const result = schema_js_2.ActionPayloadSchema.safeParse(payload);
|
|
60
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
87
61
|
});
|
|
88
62
|
(0, vitest_1.test)('should reject payload missing required fields for sign-up-verification', () => {
|
|
89
63
|
const payload = {
|
|
@@ -92,8 +66,8 @@ const schema_js_2 = require("../../customer/schema.js");
|
|
|
92
66
|
// missing code
|
|
93
67
|
metadata: {},
|
|
94
68
|
};
|
|
95
|
-
const result =
|
|
96
|
-
(0, vitest_1.expect)(result).
|
|
69
|
+
const result = schema_js_2.ActionPayloadSchema.safeParse(payload);
|
|
70
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
97
71
|
});
|
|
98
72
|
(0, vitest_1.test)('should reject payload missing required fields for sign-up', () => {
|
|
99
73
|
const payload = {
|
|
@@ -102,8 +76,8 @@ const schema_js_2 = require("../../customer/schema.js");
|
|
|
102
76
|
// missing email
|
|
103
77
|
metadata: {},
|
|
104
78
|
};
|
|
105
|
-
const result =
|
|
106
|
-
(0, vitest_1.expect)(result).
|
|
79
|
+
const result = schema_js_2.ActionPayloadSchema.safeParse(payload);
|
|
80
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
107
81
|
});
|
|
108
82
|
(0, vitest_1.test)('should reject payload missing required fields for user-attribute-verification', () => {
|
|
109
83
|
const payload = {
|
|
@@ -113,8 +87,8 @@ const schema_js_2 = require("../../customer/schema.js");
|
|
|
113
87
|
// missing value and code
|
|
114
88
|
metadata: {},
|
|
115
89
|
};
|
|
116
|
-
const result =
|
|
117
|
-
(0, vitest_1.expect)(result).
|
|
90
|
+
const result = schema_js_2.ActionPayloadSchema.safeParse(payload);
|
|
91
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
118
92
|
});
|
|
119
93
|
(0, vitest_1.test)('should accept complex payloads with all optional fields', () => {
|
|
120
94
|
const payload = {
|
|
@@ -135,22 +109,22 @@ const schema_js_2 = require("../../customer/schema.js");
|
|
|
135
109
|
marketing_consent: false,
|
|
136
110
|
},
|
|
137
111
|
};
|
|
138
|
-
const result =
|
|
139
|
-
|
|
112
|
+
const result = schema_js_2.ActionPayloadSchema.safeParse(payload);
|
|
113
|
+
// Parse succeeds for valid data
|
|
140
114
|
});
|
|
141
115
|
(0, vitest_1.test)('should accept user-attribute-verification with phone attribute', () => {
|
|
142
116
|
const payload = {
|
|
143
117
|
id: (0, utils_js_1.generateActionId)(),
|
|
144
118
|
operation: 'user-attribute-verification',
|
|
145
|
-
user: (0,
|
|
119
|
+
user: (0, schema_js_1.generateUserId)(),
|
|
146
120
|
attribute: 'phoneNumber',
|
|
147
121
|
attempt: 1,
|
|
148
122
|
expiresAt: new Date().toISOString(),
|
|
149
123
|
updatedAt: new Date().toISOString(),
|
|
150
124
|
metadata: { verification_method: 'sms' },
|
|
151
125
|
};
|
|
152
|
-
const result =
|
|
153
|
-
|
|
126
|
+
const result = schema_js_2.ActionPayloadSchema.safeParse(payload);
|
|
127
|
+
// Parse succeeds for valid data
|
|
154
128
|
});
|
|
155
129
|
(0, vitest_1.test)('should reject malformed user data in sign-up action', () => {
|
|
156
130
|
const payload = {
|
|
@@ -162,30 +136,29 @@ const schema_js_2 = require("../../customer/schema.js");
|
|
|
162
136
|
updatedAt: new Date().toISOString(),
|
|
163
137
|
metadata: {},
|
|
164
138
|
};
|
|
165
|
-
const result =
|
|
166
|
-
(0, vitest_1.expect)(result).
|
|
139
|
+
const result = schema_js_2.ActionPayloadSchema.safeParse(payload);
|
|
140
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
167
141
|
});
|
|
168
142
|
(0, vitest_1.test)('should reject invalid attribute type in user-attribute-verification', () => {
|
|
169
143
|
const payload = {
|
|
170
144
|
id: (0, utils_js_1.generateActionId)(),
|
|
171
145
|
operation: 'user-attribute-verification',
|
|
172
|
-
user: (0,
|
|
146
|
+
user: (0, schema_js_1.generateUserId)(),
|
|
173
147
|
attribute: 'invalid_attribute',
|
|
174
148
|
attempt: 1,
|
|
175
149
|
expiresAt: new Date().toISOString(),
|
|
176
150
|
updatedAt: new Date().toISOString(),
|
|
177
151
|
metadata: {},
|
|
178
152
|
};
|
|
179
|
-
const result =
|
|
180
|
-
(0, vitest_1.expect)(result).
|
|
153
|
+
const result = schema_js_2.ActionPayloadSchema.safeParse(payload);
|
|
154
|
+
(0, vitest_1.expect)(result.success).toBe(false);
|
|
181
155
|
});
|
|
182
156
|
});
|
|
183
157
|
(0, vitest_1.describe)('ActionOperation constants', () => {
|
|
184
158
|
(0, vitest_1.test)('should contain expected operation values', () => {
|
|
185
|
-
(0, vitest_1.expect)(
|
|
186
|
-
(0, vitest_1.expect)(
|
|
187
|
-
(0, vitest_1.expect)(
|
|
188
|
-
(0, vitest_1.expect)(schema_js_1.ActionOperation.USER_ATTRIBUTE_VERIFICATION).toBe('user-attribute-verification');
|
|
159
|
+
(0, vitest_1.expect)(schema_js_2.ActionOperation.SIGN_UP_VERIFICATION).toBe('sign-up-verification');
|
|
160
|
+
(0, vitest_1.expect)(schema_js_2.ActionOperation.SIGN_UP).toBe('sign-up');
|
|
161
|
+
(0, vitest_1.expect)(schema_js_2.ActionOperation.USER_ATTRIBUTE_VERIFICATION).toBe('user-attribute-verification');
|
|
189
162
|
});
|
|
190
163
|
});
|
|
191
164
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MondoInstance } from '../common/resources/init.js';
|
|
2
2
|
import { type PaginationCollection } from '../common/schema/collection.js';
|
|
3
3
|
import type { Pagination } from '../common/schema/pagination.js';
|
|
4
4
|
import { type Activity } from './schema/schema.js';
|
|
5
5
|
export declare const PATH = "/v1/activities";
|
|
6
6
|
export declare class ActivityResources {
|
|
7
7
|
private readonly instance;
|
|
8
|
-
constructor(instance:
|
|
8
|
+
constructor(instance: MondoInstance);
|
|
9
9
|
static buildPath(source: string): string;
|
|
10
10
|
listItems(source: string, pagination?: Pagination): Promise<PaginationCollection<Activity>>;
|
|
11
11
|
}
|
|
12
|
-
export declare function listActivities(instance:
|
|
12
|
+
export declare function listActivities(instance: MondoInstance, source: string, pagination?: Pagination): Promise<PaginationCollection<Activity>>;
|
|
13
13
|
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../src/activity/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../src/activity/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAGjE,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,oBAAoB,CAAC;AAEnE,eAAO,MAAM,IAAI,mBAAmB,CAAC;AAErC,qBAAa,iBAAiB;IACT,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,aAAa;IAE3D,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAQjC,SAAS,CACd,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;CAG3C;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CASzC"}
|