@go-mondo/identity-sdk 0.0.2-beta.8 → 0.0.2-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-please-manifest.json +1 -1
- package/.tsbuildinfo/cjs.json +1 -1
- package/.tsbuildinfo/esm.json +1 -1
- package/CHANGELOG.md +8 -0
- package/dist/cjs/action/schema/base.d.ts.map +1 -1
- package/dist/cjs/action/schema/base.js +3 -1
- package/dist/cjs/action/schema/base.test.d.ts +2 -0
- package/dist/cjs/action/schema/base.test.d.ts.map +1 -0
- package/dist/cjs/action/schema/base.test.js +122 -0
- package/dist/cjs/action/schema/operations/set-password.js +1 -1
- package/dist/cjs/action/schema/operations/set-password.test.d.ts +2 -0
- package/dist/cjs/action/schema/operations/set-password.test.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/set-password.test.js +167 -0
- package/dist/cjs/action/schema/operations/sign-up-verification.js +1 -1
- package/dist/cjs/action/schema/operations/sign-up-verification.test.d.ts +2 -0
- package/dist/cjs/action/schema/operations/sign-up-verification.test.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/sign-up-verification.test.js +141 -0
- package/dist/cjs/action/schema/operations/sign-up.test.d.ts +2 -0
- package/dist/cjs/action/schema/operations/sign-up.test.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/sign-up.test.js +174 -0
- package/dist/cjs/action/schema/operations/user-attribute-verification.js +1 -1
- package/dist/cjs/action/schema/operations/user-attribute-verification.test.d.ts +2 -0
- package/dist/cjs/action/schema/operations/user-attribute-verification.test.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/user-attribute-verification.test.js +129 -0
- package/dist/cjs/action/schema/schema.test.d.ts +2 -0
- package/dist/cjs/action/schema/schema.test.d.ts.map +1 -0
- package/dist/cjs/action/schema/schema.test.js +191 -0
- package/dist/cjs/action/schema/utils.d.ts +7 -0
- package/dist/cjs/action/schema/utils.d.ts.map +1 -0
- package/dist/cjs/action/schema/utils.js +16 -0
- package/dist/cjs/action/schema/utils.test.d.ts +2 -0
- package/dist/cjs/action/schema/utils.test.d.ts.map +1 -0
- package/dist/cjs/action/schema/utils.test.js +26 -0
- package/dist/cjs/activity/resources.test.d.ts +2 -0
- package/dist/cjs/activity/resources.test.d.ts.map +1 -0
- package/dist/cjs/activity/resources.test.js +224 -0
- package/dist/cjs/activity/schema/base.d.ts +1 -1
- package/dist/cjs/activity/schema/base.d.ts.map +1 -1
- package/dist/cjs/activity/schema/base.js +5 -4
- package/dist/cjs/activity/schema/base.test.d.ts +2 -0
- package/dist/cjs/activity/schema/base.test.d.ts.map +1 -0
- package/dist/cjs/activity/schema/base.test.js +239 -0
- package/dist/cjs/activity/schema/schema.d.ts +5 -5
- package/dist/cjs/activity/schema/schema.test.d.ts +2 -0
- package/dist/cjs/activity/schema/schema.test.d.ts.map +1 -0
- package/dist/cjs/activity/schema/schema.test.js +344 -0
- package/dist/cjs/activity/schema/types/authentication.d.ts +1 -1
- package/dist/cjs/activity/schema/types/authentication.js +1 -1
- package/dist/cjs/activity/schema/types/authentication.test.d.ts +2 -0
- package/dist/cjs/activity/schema/types/authentication.test.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/authentication.test.js +303 -0
- package/dist/cjs/activity/schema/types/authorization.d.ts +1 -1
- package/dist/cjs/activity/schema/types/authorization.js +1 -1
- package/dist/cjs/activity/schema/types/authorization.test.d.ts +2 -0
- package/dist/cjs/activity/schema/types/authorization.test.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/authorization.test.js +341 -0
- package/dist/cjs/activity/schema/types/note.d.ts +1 -1
- package/dist/cjs/activity/schema/types/note.test.d.ts +2 -0
- package/dist/cjs/activity/schema/types/note.test.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/note.test.js +319 -0
- package/dist/cjs/activity/schema/types/operation.d.ts +1 -1
- package/dist/cjs/activity/schema/types/operation.test.d.ts +2 -0
- package/dist/cjs/activity/schema/types/operation.test.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/operation.test.js +344 -0
- package/dist/cjs/activity/schema/types/unknown.d.ts +1 -1
- package/dist/cjs/activity/schema/types/unknown.test.d.ts +2 -0
- package/dist/cjs/activity/schema/types/unknown.test.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/unknown.test.js +275 -0
- package/dist/cjs/activity/schema/utils.test.d.ts +2 -0
- package/dist/cjs/activity/schema/utils.test.d.ts.map +1 -0
- package/dist/cjs/activity/schema/utils.test.js +26 -0
- package/dist/cjs/app/authorization/schema.d.ts +6 -6
- package/dist/cjs/app/authorization/schema.d.ts.map +1 -1
- package/dist/cjs/app/authorization/schema.js +39 -26
- package/dist/cjs/app/authorization/schema.test.d.ts +2 -0
- package/dist/cjs/app/authorization/schema.test.d.ts.map +1 -0
- package/dist/cjs/app/authorization/schema.test.js +353 -0
- package/dist/cjs/app/oauth/schema.d.ts +1 -1
- package/dist/cjs/app/oauth/schema.d.ts.map +1 -1
- package/dist/cjs/app/oauth/schema.js +2 -1
- package/dist/cjs/app/oauth/schema.test.d.ts +2 -0
- package/dist/cjs/app/oauth/schema.test.d.ts.map +1 -0
- package/dist/cjs/app/oauth/schema.test.js +173 -0
- package/dist/cjs/app/oidc/schema.d.ts +2 -2
- package/dist/cjs/app/oidc/schema.d.ts.map +1 -1
- package/dist/cjs/app/oidc/schema.js +1 -1
- package/dist/cjs/app/oidc/schema.test.d.ts +2 -0
- package/dist/cjs/app/oidc/schema.test.d.ts.map +1 -0
- package/dist/cjs/app/oidc/schema.test.js +95 -0
- package/dist/cjs/app/registration/resources.test.d.ts +2 -0
- package/dist/cjs/app/registration/resources.test.d.ts.map +1 -0
- package/dist/cjs/app/registration/resources.test.js +295 -0
- package/dist/cjs/app/registration/schema.d.ts +1 -1
- package/dist/cjs/app/registration/schema.test.d.ts +2 -0
- package/dist/cjs/app/registration/schema.test.d.ts.map +1 -0
- package/dist/cjs/app/registration/schema.test.js +262 -0
- package/dist/cjs/app/resources.test.d.ts +2 -0
- package/dist/cjs/app/resources.test.d.ts.map +1 -0
- package/dist/cjs/app/resources.test.js +288 -0
- package/dist/cjs/app/saml/schema.d.ts +3 -3
- package/dist/cjs/app/saml/schema.d.ts.map +1 -1
- package/dist/cjs/app/saml/schema.js +2 -2
- package/dist/cjs/app/schema.d.ts +5 -1
- package/dist/cjs/app/schema.d.ts.map +1 -1
- package/dist/cjs/app/schema.js +7 -2
- package/dist/cjs/app/schema.test.d.ts +2 -0
- package/dist/cjs/app/schema.test.d.ts.map +1 -0
- package/dist/cjs/app/schema.test.js +184 -0
- package/dist/cjs/app/utils.test.d.ts +2 -0
- package/dist/cjs/app/utils.test.d.ts.map +1 -0
- package/dist/cjs/app/utils.test.js +42 -0
- package/dist/cjs/association/schema.d.ts +23 -23
- package/dist/cjs/association/schema.js +3 -3
- package/dist/cjs/association/schema.test.d.ts +2 -0
- package/dist/cjs/association/schema.test.d.ts.map +1 -0
- package/dist/cjs/association/schema.test.js +121 -0
- package/dist/cjs/authentication/factors/schema.test.js +19 -18
- package/dist/cjs/authentication/providers/schema.js +1 -1
- package/dist/cjs/authentication/sessions/schema.d.ts +5 -5
- package/dist/cjs/authentication/sessions/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/sessions/schema.js +4 -2
- package/dist/cjs/authentication/settings/schema.d.ts +1 -1
- package/dist/cjs/authentication/settings/schema.js +1 -1
- package/dist/cjs/authentication/settings/schema.test.d.ts +2 -0
- package/dist/cjs/authentication/settings/schema.test.d.ts.map +1 -0
- package/dist/cjs/authentication/settings/schema.test.js +73 -0
- package/dist/cjs/authentication/strategies/schema/base.d.ts +1 -1
- package/dist/cjs/authentication/strategies/schema/base.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/base.js +3 -1
- package/dist/cjs/authentication/strategies/schema/schema.d.ts +3 -3
- package/dist/cjs/authentication/strategies/schema/types/email.d.ts +1 -1
- package/dist/cjs/authentication/strategies/schema/types/email.test.d.ts +2 -0
- package/dist/cjs/authentication/strategies/schema/types/email.test.d.ts.map +1 -0
- package/dist/cjs/authentication/strategies/schema/types/email.test.js +205 -0
- package/dist/cjs/authentication/strategies/schema/types/password.d.ts +1 -1
- package/dist/cjs/authentication/strategies/schema/types/totp.d.ts +1 -1
- package/dist/cjs/authentication/utils.d.ts +13 -0
- package/dist/cjs/authentication/utils.d.ts.map +1 -0
- package/dist/cjs/authentication/utils.js +25 -0
- package/dist/cjs/authentication/utils.test.d.ts +2 -0
- package/dist/cjs/authentication/utils.test.d.ts.map +1 -0
- package/dist/cjs/authentication/utils.test.js +142 -0
- package/dist/cjs/authorization/index.d.ts +1 -1
- package/dist/cjs/authorization/index.d.ts.map +1 -1
- package/dist/cjs/authorization/index.js +1 -1
- package/dist/cjs/authorization/permissions/schema.d.ts +1 -2
- package/dist/cjs/authorization/permissions/schema.d.ts.map +1 -1
- package/dist/cjs/authorization/permissions/schema.js +9 -10
- package/dist/cjs/authorization/permissions/schema.test.d.ts +2 -0
- package/dist/cjs/authorization/permissions/schema.test.d.ts.map +1 -0
- package/dist/cjs/authorization/permissions/schema.test.js +217 -0
- package/dist/cjs/authorization/roles/schema.d.ts +3 -3
- package/dist/cjs/authorization/roles/schema.d.ts.map +1 -1
- package/dist/cjs/authorization/roles/schema.js +10 -10
- package/dist/cjs/authorization/roles/schema.test.d.ts +2 -0
- package/dist/cjs/authorization/roles/schema.test.d.ts.map +1 -0
- package/dist/cjs/authorization/roles/schema.test.js +236 -0
- package/dist/cjs/authorization/schema.d.ts +17 -0
- package/dist/cjs/authorization/schema.d.ts.map +1 -0
- package/dist/cjs/authorization/{utils.js → schema.js} +7 -1
- package/dist/cjs/authorization/schema.test.d.ts +2 -0
- package/dist/cjs/authorization/schema.test.d.ts.map +1 -0
- package/dist/cjs/authorization/schema.test.js +42 -0
- package/dist/cjs/common/errors/http.test.d.ts +2 -0
- package/dist/cjs/common/errors/http.test.d.ts.map +1 -0
- package/dist/cjs/common/errors/http.test.js +71 -0
- package/dist/cjs/common/errors/validation.test.d.ts +2 -0
- package/dist/cjs/common/errors/validation.test.d.ts.map +1 -0
- package/dist/cjs/common/errors/validation.test.js +92 -0
- package/dist/cjs/common/resources/init.d.ts +2 -2
- package/dist/cjs/common/resources/init.d.ts.map +1 -1
- package/dist/cjs/common/resources/init.js +1 -1
- package/dist/cjs/common/resources/init.test.d.ts +2 -0
- package/dist/cjs/common/resources/init.test.d.ts.map +1 -0
- package/dist/cjs/common/resources/init.test.js +233 -0
- package/dist/cjs/common/resources/operations.test.d.ts +2 -0
- package/dist/cjs/common/resources/operations.test.d.ts.map +1 -0
- package/dist/cjs/common/resources/operations.test.js +356 -0
- package/dist/cjs/common/resources/utils.d.ts +1 -1
- package/dist/cjs/common/resources/utils.d.ts.map +1 -1
- package/dist/cjs/common/resources/utils.test.d.ts +2 -0
- package/dist/cjs/common/resources/utils.test.d.ts.map +1 -0
- package/dist/cjs/common/resources/utils.test.js +163 -0
- package/dist/cjs/common/schema/aggregate.test.d.ts +2 -0
- package/dist/cjs/common/schema/aggregate.test.d.ts.map +1 -0
- package/dist/cjs/common/schema/aggregate.test.js +75 -0
- package/dist/cjs/common/schema/collection.d.ts +2 -2
- package/dist/cjs/common/schema/collection.test.d.ts +2 -0
- package/dist/cjs/common/schema/collection.test.d.ts.map +1 -0
- package/dist/cjs/common/schema/collection.test.js +98 -0
- package/dist/cjs/common/schema/id.d.ts +2 -0
- package/dist/cjs/common/schema/id.d.ts.map +1 -0
- package/dist/cjs/common/schema/id.js +6 -0
- package/dist/cjs/common/schema/id.test.d.ts +2 -0
- package/dist/cjs/common/schema/id.test.d.ts.map +1 -0
- package/dist/cjs/common/schema/id.test.js +116 -0
- package/dist/cjs/common/schema/jwt.test.d.ts +2 -0
- package/dist/cjs/common/schema/jwt.test.d.ts.map +1 -0
- package/dist/cjs/common/schema/jwt.test.js +56 -0
- package/dist/cjs/common/schema/metadata.d.ts +9 -3
- package/dist/cjs/common/schema/metadata.d.ts.map +1 -1
- package/dist/cjs/common/schema/metadata.js +27 -8
- package/dist/cjs/common/schema/metadata.test.js +49 -0
- package/dist/cjs/common/schema/pagination.d.ts +2 -2
- package/dist/cjs/common/schema/pagination.js +2 -2
- package/dist/cjs/common/schema/pagination.test.d.ts +2 -0
- package/dist/cjs/common/schema/pagination.test.d.ts.map +1 -0
- package/dist/cjs/common/schema/pagination.test.js +68 -0
- package/dist/cjs/common/schema/sets.test.d.ts +2 -0
- package/dist/cjs/common/schema/sets.test.d.ts.map +1 -0
- package/dist/cjs/common/schema/sets.test.js +84 -0
- package/dist/cjs/common/schema/url.test.d.ts +2 -0
- package/dist/cjs/common/schema/url.test.d.ts.map +1 -0
- package/dist/cjs/common/schema/url.test.js +74 -0
- package/dist/cjs/customer/index.d.ts +2 -1
- package/dist/cjs/customer/index.d.ts.map +1 -1
- package/dist/cjs/customer/index.js +2 -1
- package/dist/cjs/customer/{schema/organization.d.ts → organization/schema.d.ts} +4 -3
- package/dist/cjs/customer/organization/schema.d.ts.map +1 -0
- package/dist/cjs/customer/{schema/organization.js → organization/schema.js} +9 -7
- package/dist/cjs/customer/schema.d.ts +17 -0
- package/dist/cjs/customer/schema.d.ts.map +1 -0
- package/dist/cjs/customer/{schema/utils.js → schema.js} +7 -1
- package/dist/cjs/customer/schema.test.d.ts +2 -0
- package/dist/cjs/customer/schema.test.d.ts.map +1 -0
- package/dist/cjs/customer/schema.test.js +42 -0
- package/dist/cjs/customer/users/schema.d.ts +4 -3
- package/dist/cjs/customer/users/schema.d.ts.map +1 -1
- package/dist/cjs/customer/users/schema.js +29 -26
- package/dist/cjs/customer/users/schema.test.js +13 -12
- package/dist/cjs/customer/users/utils.test.d.ts +2 -0
- package/dist/cjs/customer/users/utils.test.d.ts.map +1 -0
- package/dist/cjs/customer/users/utils.test.js +145 -0
- package/dist/cjs/identity/schema.test.d.ts +2 -0
- package/dist/cjs/identity/schema.test.d.ts.map +1 -0
- package/dist/cjs/identity/schema.test.js +40 -0
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.d.ts.map +1 -1
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.js +22 -3
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.test.d.ts +2 -0
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.test.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.test.js +334 -0
- package/dist/cjs/oauth/common/schema.test.d.ts +2 -0
- package/dist/cjs/oauth/common/schema.test.d.ts.map +1 -0
- package/dist/cjs/oauth/common/schema.test.js +290 -0
- package/dist/cjs/oauth/token/schema/schema.test.d.ts +2 -0
- package/dist/cjs/oauth/token/schema/schema.test.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/schema.test.js +122 -0
- package/dist/cjs/workspace/settings/schema.test.d.ts +2 -0
- package/dist/cjs/workspace/settings/schema.test.d.ts.map +1 -0
- package/dist/cjs/workspace/settings/schema.test.js +73 -0
- package/dist/cjs/workspace/tenant/schema.d.ts +1 -0
- package/dist/cjs/workspace/tenant/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/tenant/schema.js +8 -7
- package/dist/cjs/workspace/user/notifications/schema.d.ts.map +1 -1
- package/dist/cjs/workspace/user/notifications/schema.js +3 -2
- package/dist/cjs/workspace/user/preferences/schema.js +2 -2
- package/dist/cjs/workspace/utils.d.ts +0 -3
- package/dist/cjs/workspace/utils.d.ts.map +1 -1
- package/dist/cjs/workspace/utils.js +0 -3
- package/dist/cjs/workspace/utils.test.d.ts +2 -0
- package/dist/cjs/workspace/utils.test.d.ts.map +1 -0
- package/dist/cjs/workspace/utils.test.js +63 -0
- package/dist/esm/action/schema/base.d.ts.map +1 -1
- package/dist/esm/action/schema/base.js +3 -1
- package/dist/esm/action/schema/base.test.d.ts +2 -0
- package/dist/esm/action/schema/base.test.d.ts.map +1 -0
- package/dist/esm/action/schema/base.test.js +120 -0
- package/dist/esm/action/schema/operations/set-password.js +1 -1
- package/dist/esm/action/schema/operations/set-password.test.d.ts +2 -0
- package/dist/esm/action/schema/operations/set-password.test.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/set-password.test.js +165 -0
- package/dist/esm/action/schema/operations/sign-up-verification.js +1 -1
- package/dist/esm/action/schema/operations/sign-up-verification.test.d.ts +2 -0
- package/dist/esm/action/schema/operations/sign-up-verification.test.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/sign-up-verification.test.js +139 -0
- package/dist/esm/action/schema/operations/sign-up.test.d.ts +2 -0
- package/dist/esm/action/schema/operations/sign-up.test.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/sign-up.test.js +172 -0
- package/dist/esm/action/schema/operations/user-attribute-verification.js +1 -1
- package/dist/esm/action/schema/operations/user-attribute-verification.test.d.ts +2 -0
- package/dist/esm/action/schema/operations/user-attribute-verification.test.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/user-attribute-verification.test.js +127 -0
- package/dist/esm/action/schema/schema.test.d.ts +2 -0
- package/dist/esm/action/schema/schema.test.d.ts.map +1 -0
- package/dist/esm/action/schema/schema.test.js +189 -0
- package/dist/esm/action/schema/utils.d.ts +7 -0
- package/dist/esm/action/schema/utils.d.ts.map +1 -0
- package/dist/esm/action/schema/utils.js +9 -0
- package/dist/esm/action/schema/utils.test.d.ts +2 -0
- package/dist/esm/action/schema/utils.test.d.ts.map +1 -0
- package/dist/esm/action/schema/utils.test.js +24 -0
- package/dist/esm/activity/resources.test.d.ts +2 -0
- package/dist/esm/activity/resources.test.d.ts.map +1 -0
- package/dist/esm/activity/resources.test.js +189 -0
- package/dist/esm/activity/schema/base.d.ts +1 -1
- package/dist/esm/activity/schema/base.d.ts.map +1 -1
- package/dist/esm/activity/schema/base.js +7 -6
- package/dist/esm/activity/schema/base.test.d.ts +2 -0
- package/dist/esm/activity/schema/base.test.d.ts.map +1 -0
- package/dist/esm/activity/schema/base.test.js +237 -0
- package/dist/esm/activity/schema/schema.d.ts +5 -5
- package/dist/esm/activity/schema/schema.test.d.ts +2 -0
- package/dist/esm/activity/schema/schema.test.d.ts.map +1 -0
- package/dist/esm/activity/schema/schema.test.js +342 -0
- package/dist/esm/activity/schema/types/authentication.d.ts +1 -1
- package/dist/esm/activity/schema/types/authentication.js +1 -1
- package/dist/esm/activity/schema/types/authentication.test.d.ts +2 -0
- package/dist/esm/activity/schema/types/authentication.test.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/authentication.test.js +301 -0
- package/dist/esm/activity/schema/types/authorization.d.ts +1 -1
- package/dist/esm/activity/schema/types/authorization.js +1 -1
- package/dist/esm/activity/schema/types/authorization.test.d.ts +2 -0
- package/dist/esm/activity/schema/types/authorization.test.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/authorization.test.js +339 -0
- package/dist/esm/activity/schema/types/note.d.ts +1 -1
- package/dist/esm/activity/schema/types/note.test.d.ts +2 -0
- package/dist/esm/activity/schema/types/note.test.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/note.test.js +317 -0
- package/dist/esm/activity/schema/types/operation.d.ts +1 -1
- package/dist/esm/activity/schema/types/operation.test.d.ts +2 -0
- package/dist/esm/activity/schema/types/operation.test.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/operation.test.js +342 -0
- package/dist/esm/activity/schema/types/unknown.d.ts +1 -1
- package/dist/esm/activity/schema/types/unknown.test.d.ts +2 -0
- package/dist/esm/activity/schema/types/unknown.test.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/unknown.test.js +273 -0
- package/dist/esm/activity/schema/utils.test.d.ts +2 -0
- package/dist/esm/activity/schema/utils.test.d.ts.map +1 -0
- package/dist/esm/activity/schema/utils.test.js +24 -0
- package/dist/esm/app/authorization/schema.d.ts +6 -6
- package/dist/esm/app/authorization/schema.d.ts.map +1 -1
- package/dist/esm/app/authorization/schema.js +40 -27
- package/dist/esm/app/authorization/schema.test.d.ts +2 -0
- package/dist/esm/app/authorization/schema.test.d.ts.map +1 -0
- package/dist/esm/app/authorization/schema.test.js +351 -0
- package/dist/esm/app/oauth/schema.d.ts +1 -1
- package/dist/esm/app/oauth/schema.d.ts.map +1 -1
- package/dist/esm/app/oauth/schema.js +3 -2
- package/dist/esm/app/oauth/schema.test.d.ts +2 -0
- package/dist/esm/app/oauth/schema.test.d.ts.map +1 -0
- package/dist/esm/app/oauth/schema.test.js +171 -0
- package/dist/esm/app/oidc/schema.d.ts +2 -2
- package/dist/esm/app/oidc/schema.d.ts.map +1 -1
- package/dist/esm/app/oidc/schema.js +2 -2
- package/dist/esm/app/oidc/schema.test.d.ts +2 -0
- package/dist/esm/app/oidc/schema.test.d.ts.map +1 -0
- package/dist/esm/app/oidc/schema.test.js +93 -0
- package/dist/esm/app/registration/resources.test.d.ts +2 -0
- package/dist/esm/app/registration/resources.test.d.ts.map +1 -0
- package/dist/esm/app/registration/resources.test.js +260 -0
- package/dist/esm/app/registration/schema.d.ts +1 -1
- package/dist/esm/app/registration/schema.test.d.ts +2 -0
- package/dist/esm/app/registration/schema.test.d.ts.map +1 -0
- package/dist/esm/app/registration/schema.test.js +260 -0
- package/dist/esm/app/resources.test.d.ts +2 -0
- package/dist/esm/app/resources.test.d.ts.map +1 -0
- package/dist/esm/app/resources.test.js +253 -0
- package/dist/esm/app/saml/schema.d.ts +3 -3
- package/dist/esm/app/saml/schema.d.ts.map +1 -1
- package/dist/esm/app/saml/schema.js +3 -3
- package/dist/esm/app/schema.d.ts +5 -1
- package/dist/esm/app/schema.d.ts.map +1 -1
- package/dist/esm/app/schema.js +7 -2
- package/dist/esm/app/schema.test.d.ts +2 -0
- package/dist/esm/app/schema.test.d.ts.map +1 -0
- package/dist/esm/app/schema.test.js +182 -0
- package/dist/esm/app/utils.test.d.ts +2 -0
- package/dist/esm/app/utils.test.d.ts.map +1 -0
- package/dist/esm/app/utils.test.js +40 -0
- package/dist/esm/association/schema.d.ts +23 -23
- package/dist/esm/association/schema.js +1 -1
- package/dist/esm/association/schema.test.d.ts +2 -0
- package/dist/esm/association/schema.test.d.ts.map +1 -0
- package/dist/esm/association/schema.test.js +119 -0
- package/dist/esm/authentication/factors/schema.test.js +19 -18
- package/dist/esm/authentication/providers/schema.js +1 -1
- package/dist/esm/authentication/sessions/schema.d.ts +5 -5
- package/dist/esm/authentication/sessions/schema.d.ts.map +1 -1
- package/dist/esm/authentication/sessions/schema.js +4 -2
- package/dist/esm/authentication/settings/schema.d.ts +1 -1
- package/dist/esm/authentication/settings/schema.js +2 -2
- package/dist/esm/authentication/settings/schema.test.d.ts +2 -0
- package/dist/esm/authentication/settings/schema.test.d.ts.map +1 -0
- package/dist/esm/authentication/settings/schema.test.js +71 -0
- package/dist/esm/authentication/strategies/schema/base.d.ts +1 -1
- package/dist/esm/authentication/strategies/schema/base.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/base.js +3 -1
- package/dist/esm/authentication/strategies/schema/schema.d.ts +3 -3
- package/dist/esm/authentication/strategies/schema/types/email.d.ts +1 -1
- package/dist/esm/authentication/strategies/schema/types/email.test.d.ts +2 -0
- package/dist/esm/authentication/strategies/schema/types/email.test.d.ts.map +1 -0
- package/dist/esm/authentication/strategies/schema/types/email.test.js +203 -0
- package/dist/esm/authentication/strategies/schema/types/password.d.ts +1 -1
- package/dist/esm/authentication/strategies/schema/types/totp.d.ts +1 -1
- package/dist/esm/authentication/utils.d.ts +13 -0
- package/dist/esm/authentication/utils.d.ts.map +1 -0
- package/dist/esm/authentication/utils.js +17 -0
- package/dist/esm/authentication/utils.test.d.ts +2 -0
- package/dist/esm/authentication/utils.test.d.ts.map +1 -0
- package/dist/esm/authentication/utils.test.js +140 -0
- package/dist/esm/authorization/index.d.ts +1 -1
- package/dist/esm/authorization/index.d.ts.map +1 -1
- package/dist/esm/authorization/index.js +1 -1
- package/dist/esm/authorization/permissions/schema.d.ts +1 -2
- package/dist/esm/authorization/permissions/schema.d.ts.map +1 -1
- package/dist/esm/authorization/permissions/schema.js +7 -8
- package/dist/esm/authorization/permissions/schema.test.d.ts +2 -0
- package/dist/esm/authorization/permissions/schema.test.d.ts.map +1 -0
- package/dist/esm/authorization/permissions/schema.test.js +215 -0
- package/dist/esm/authorization/roles/schema.d.ts +3 -3
- package/dist/esm/authorization/roles/schema.d.ts.map +1 -1
- package/dist/esm/authorization/roles/schema.js +9 -9
- package/dist/esm/authorization/roles/schema.test.d.ts +2 -0
- package/dist/esm/authorization/roles/schema.test.d.ts.map +1 -0
- package/dist/esm/authorization/roles/schema.test.js +234 -0
- package/dist/esm/authorization/schema.d.ts +17 -0
- package/dist/esm/authorization/schema.d.ts.map +1 -0
- package/dist/esm/authorization/schema.js +21 -0
- package/dist/esm/authorization/schema.test.d.ts +2 -0
- package/dist/esm/authorization/schema.test.d.ts.map +1 -0
- package/dist/esm/authorization/schema.test.js +40 -0
- package/dist/esm/common/errors/http.test.d.ts +2 -0
- package/dist/esm/common/errors/http.test.d.ts.map +1 -0
- package/dist/esm/common/errors/http.test.js +69 -0
- package/dist/esm/common/errors/validation.test.d.ts +2 -0
- package/dist/esm/common/errors/validation.test.d.ts.map +1 -0
- package/dist/esm/common/errors/validation.test.js +90 -0
- package/dist/esm/common/resources/init.d.ts +2 -2
- package/dist/esm/common/resources/init.d.ts.map +1 -1
- package/dist/esm/common/resources/init.js +1 -1
- package/dist/esm/common/resources/init.test.d.ts +2 -0
- package/dist/esm/common/resources/init.test.d.ts.map +1 -0
- package/dist/esm/common/resources/init.test.js +231 -0
- package/dist/esm/common/resources/operations.test.d.ts +2 -0
- package/dist/esm/common/resources/operations.test.d.ts.map +1 -0
- package/dist/esm/common/resources/operations.test.js +354 -0
- package/dist/esm/common/resources/utils.d.ts +1 -1
- package/dist/esm/common/resources/utils.d.ts.map +1 -1
- package/dist/esm/common/resources/utils.test.d.ts +2 -0
- package/dist/esm/common/resources/utils.test.d.ts.map +1 -0
- package/dist/esm/common/resources/utils.test.js +161 -0
- package/dist/esm/common/schema/aggregate.test.d.ts +2 -0
- package/dist/esm/common/schema/aggregate.test.d.ts.map +1 -0
- package/dist/esm/common/schema/aggregate.test.js +73 -0
- package/dist/esm/common/schema/collection.d.ts +2 -2
- package/dist/esm/common/schema/collection.test.d.ts +2 -0
- package/dist/esm/common/schema/collection.test.d.ts.map +1 -0
- package/dist/esm/common/schema/collection.test.js +96 -0
- package/dist/esm/common/schema/id.d.ts +2 -0
- package/dist/esm/common/schema/id.d.ts.map +1 -0
- package/dist/esm/common/schema/id.js +2 -0
- package/dist/esm/common/schema/id.test.d.ts +2 -0
- package/dist/esm/common/schema/id.test.d.ts.map +1 -0
- package/dist/esm/common/schema/id.test.js +114 -0
- package/dist/esm/common/schema/jwt.test.d.ts +2 -0
- package/dist/esm/common/schema/jwt.test.d.ts.map +1 -0
- package/dist/esm/common/schema/jwt.test.js +54 -0
- package/dist/esm/common/schema/metadata.d.ts +9 -3
- package/dist/esm/common/schema/metadata.d.ts.map +1 -1
- package/dist/esm/common/schema/metadata.js +24 -6
- package/dist/esm/common/schema/metadata.test.js +50 -1
- package/dist/esm/common/schema/pagination.d.ts +2 -2
- package/dist/esm/common/schema/pagination.js +2 -2
- package/dist/esm/common/schema/pagination.test.d.ts +2 -0
- package/dist/esm/common/schema/pagination.test.d.ts.map +1 -0
- package/dist/esm/common/schema/pagination.test.js +66 -0
- package/dist/esm/common/schema/sets.test.d.ts +2 -0
- package/dist/esm/common/schema/sets.test.d.ts.map +1 -0
- package/dist/esm/common/schema/sets.test.js +82 -0
- package/dist/esm/common/schema/url.test.d.ts +2 -0
- package/dist/esm/common/schema/url.test.d.ts.map +1 -0
- package/dist/esm/common/schema/url.test.js +72 -0
- package/dist/esm/customer/index.d.ts +2 -1
- package/dist/esm/customer/index.d.ts.map +1 -1
- package/dist/esm/customer/index.js +2 -1
- package/dist/esm/customer/{schema/organization.d.ts → organization/schema.d.ts} +4 -3
- package/dist/esm/customer/organization/schema.d.ts.map +1 -0
- package/dist/esm/customer/{schema/organization.js → organization/schema.js} +7 -5
- package/dist/esm/customer/schema.d.ts +17 -0
- package/dist/esm/customer/schema.d.ts.map +1 -0
- package/dist/esm/customer/schema.js +21 -0
- package/dist/esm/customer/schema.test.d.ts +2 -0
- package/dist/esm/customer/schema.test.d.ts.map +1 -0
- package/dist/esm/customer/schema.test.js +40 -0
- package/dist/esm/customer/users/schema.d.ts +4 -3
- package/dist/esm/customer/users/schema.d.ts.map +1 -1
- package/dist/esm/customer/users/schema.js +9 -6
- package/dist/esm/customer/users/schema.test.js +6 -5
- package/dist/esm/customer/users/utils.test.d.ts +2 -0
- package/dist/esm/customer/users/utils.test.d.ts.map +1 -0
- package/dist/esm/customer/users/utils.test.js +143 -0
- package/dist/esm/identity/schema.test.d.ts +2 -0
- package/dist/esm/identity/schema.test.d.ts.map +1 -0
- package/dist/esm/identity/schema.test.js +38 -0
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.d.ts.map +1 -1
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.js +22 -3
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.test.d.ts +2 -0
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.test.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.test.js +332 -0
- package/dist/esm/oauth/common/schema.test.d.ts +2 -0
- package/dist/esm/oauth/common/schema.test.d.ts.map +1 -0
- package/dist/esm/oauth/common/schema.test.js +288 -0
- package/dist/esm/oauth/token/schema/schema.test.d.ts +2 -0
- package/dist/esm/oauth/token/schema/schema.test.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/schema.test.js +120 -0
- package/dist/esm/workspace/settings/schema.test.d.ts +2 -0
- package/dist/esm/workspace/settings/schema.test.d.ts.map +1 -0
- package/dist/esm/workspace/settings/schema.test.js +71 -0
- package/dist/esm/workspace/tenant/schema.d.ts +1 -0
- package/dist/esm/workspace/tenant/schema.d.ts.map +1 -1
- package/dist/esm/workspace/tenant/schema.js +4 -3
- package/dist/esm/workspace/user/notifications/schema.d.ts.map +1 -1
- package/dist/esm/workspace/user/notifications/schema.js +4 -3
- package/dist/esm/workspace/user/preferences/schema.js +3 -3
- package/dist/esm/workspace/utils.d.ts +0 -3
- package/dist/esm/workspace/utils.d.ts.map +1 -1
- package/dist/esm/workspace/utils.js +0 -3
- package/dist/esm/workspace/utils.test.d.ts +2 -0
- package/dist/esm/workspace/utils.test.d.ts.map +1 -0
- package/dist/esm/workspace/utils.test.js +61 -0
- package/package.json +1 -1
- package/dist/cjs/authorization/utils.d.ts +0 -11
- package/dist/cjs/authorization/utils.d.ts.map +0 -1
- package/dist/cjs/customer/schema/organization.d.ts.map +0 -1
- package/dist/cjs/customer/schema/schema.d.ts +0 -4
- package/dist/cjs/customer/schema/schema.d.ts.map +0 -1
- package/dist/cjs/customer/schema/schema.js +0 -19
- package/dist/cjs/customer/schema/utils.d.ts +0 -11
- package/dist/cjs/customer/schema/utils.d.ts.map +0 -1
- package/dist/esm/authorization/utils.d.ts +0 -11
- package/dist/esm/authorization/utils.d.ts.map +0 -1
- package/dist/esm/authorization/utils.js +0 -15
- package/dist/esm/customer/schema/organization.d.ts.map +0 -1
- package/dist/esm/customer/schema/schema.d.ts +0 -4
- package/dist/esm/customer/schema/schema.d.ts.map +0 -1
- package/dist/esm/customer/schema/schema.js +0 -3
- package/dist/esm/customer/schema/utils.d.ts +0 -11
- package/dist/esm/customer/schema/utils.d.ts.map +0 -1
- package/dist/esm/customer/schema/utils.js +0 -15
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { type } from 'arktype';
|
|
2
|
+
import { describe, expect, test } from 'vitest';
|
|
3
|
+
import { InsertOIDCPayloadSchema, OIDCPayloadSchema, OIDCSchema, UpdateOIDCPayloadSchema, } from './schema.js';
|
|
4
|
+
describe('App OIDC - Schema', () => {
|
|
5
|
+
describe('OIDCSchema', () => {
|
|
6
|
+
test('should accept complete OIDC object', () => {
|
|
7
|
+
const oidc = {
|
|
8
|
+
updatedAt: new Date(),
|
|
9
|
+
deletedAt: new Date(),
|
|
10
|
+
deactivatedAt: new Date(),
|
|
11
|
+
metadata: { provider: 'auth0' },
|
|
12
|
+
};
|
|
13
|
+
const result = OIDCSchema(oidc);
|
|
14
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
15
|
+
});
|
|
16
|
+
test('should accept minimal OIDC object', () => {
|
|
17
|
+
const oidc = {
|
|
18
|
+
metadata: {},
|
|
19
|
+
};
|
|
20
|
+
const result = OIDCSchema(oidc);
|
|
21
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
22
|
+
});
|
|
23
|
+
test('should accept OIDC with only some optional dates', () => {
|
|
24
|
+
const oidc = {
|
|
25
|
+
updatedAt: new Date(),
|
|
26
|
+
metadata: { configured: true },
|
|
27
|
+
};
|
|
28
|
+
const result = OIDCSchema(oidc);
|
|
29
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
describe('OIDCPayloadSchema', () => {
|
|
33
|
+
test('should accept complete payload', () => {
|
|
34
|
+
const payload = {
|
|
35
|
+
updatedAt: new Date().toISOString(),
|
|
36
|
+
deletedAt: new Date().toISOString(),
|
|
37
|
+
deactivatedAt: new Date().toISOString(),
|
|
38
|
+
metadata: { issuer: 'https://auth.example.com' },
|
|
39
|
+
};
|
|
40
|
+
const result = OIDCPayloadSchema(payload);
|
|
41
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
42
|
+
expect(result).toEqual(payload);
|
|
43
|
+
});
|
|
44
|
+
test('should accept minimal payload', () => {
|
|
45
|
+
const payload = {
|
|
46
|
+
metadata: {},
|
|
47
|
+
};
|
|
48
|
+
const result = OIDCPayloadSchema(payload);
|
|
49
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
50
|
+
expect(result).toEqual(payload);
|
|
51
|
+
});
|
|
52
|
+
test('should accept payload with optional dates', () => {
|
|
53
|
+
const payload = {
|
|
54
|
+
updatedAt: new Date().toISOString(),
|
|
55
|
+
metadata: { clientId: 'oidc_client_123' },
|
|
56
|
+
};
|
|
57
|
+
const result = OIDCPayloadSchema(payload);
|
|
58
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
describe('InsertOIDCPayloadSchema', () => {
|
|
62
|
+
test('should accept metadata payload', () => {
|
|
63
|
+
const payload = {
|
|
64
|
+
metadata: { setup: 'initial' },
|
|
65
|
+
};
|
|
66
|
+
const result = InsertOIDCPayloadSchema(payload);
|
|
67
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
68
|
+
expect(result).toEqual(payload);
|
|
69
|
+
});
|
|
70
|
+
test('should accept undefined', () => {
|
|
71
|
+
const result = InsertOIDCPayloadSchema(undefined);
|
|
72
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
73
|
+
expect(result).toBeUndefined();
|
|
74
|
+
});
|
|
75
|
+
test('should accept empty metadata', () => {
|
|
76
|
+
const payload = {
|
|
77
|
+
metadata: {},
|
|
78
|
+
};
|
|
79
|
+
const result = InsertOIDCPayloadSchema(payload);
|
|
80
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
describe('UpdateOIDCPayloadSchema', () => {
|
|
84
|
+
test('should accept metadata update', () => {
|
|
85
|
+
const payload = {
|
|
86
|
+
metadata: { version: '2.0' },
|
|
87
|
+
};
|
|
88
|
+
const result = UpdateOIDCPayloadSchema(payload);
|
|
89
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
90
|
+
expect(result).toEqual(payload);
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.test.d.ts","sourceRoot":"","sources":["../../../../src/app/registration/resources.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, test, vi } from 'vitest';
|
|
2
|
+
import { RegistrationResources } from './resources.js';
|
|
3
|
+
describe('App Registration Resources', () => {
|
|
4
|
+
let mockInstance;
|
|
5
|
+
let registrationResources;
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
vi.clearAllMocks();
|
|
8
|
+
// Mock MondoIdentity instance
|
|
9
|
+
mockInstance = {
|
|
10
|
+
config: {
|
|
11
|
+
host: 'https://api.example.com',
|
|
12
|
+
accessToken: 'test-token',
|
|
13
|
+
},
|
|
14
|
+
authorizer: vi.fn((req) => req),
|
|
15
|
+
};
|
|
16
|
+
registrationResources = new RegistrationResources(mockInstance);
|
|
17
|
+
});
|
|
18
|
+
describe('RegistrationResources class', () => {
|
|
19
|
+
test('should initialize with MondoIdentity instance', () => {
|
|
20
|
+
expect(registrationResources).toBeInstanceOf(RegistrationResources);
|
|
21
|
+
// biome-ignore lint/complexity/useLiteralKeys: <explanation>
|
|
22
|
+
expect(registrationResources['instance']).toBe(mockInstance);
|
|
23
|
+
});
|
|
24
|
+
describe('buildPath static method', () => {
|
|
25
|
+
test('should build path with app ID', () => {
|
|
26
|
+
const path = RegistrationResources.buildPath('app_123');
|
|
27
|
+
expect(path).toBe('/v1/apps/app_123/registration');
|
|
28
|
+
});
|
|
29
|
+
test('should return existing path if ID already starts with /v1/apps', () => {
|
|
30
|
+
const existingPath = '/v1/apps/app_456/custom/path';
|
|
31
|
+
const path = RegistrationResources.buildPath(existingPath);
|
|
32
|
+
expect(path).toBe(existingPath);
|
|
33
|
+
});
|
|
34
|
+
test('should handle empty ID', () => {
|
|
35
|
+
const path = RegistrationResources.buildPath('');
|
|
36
|
+
expect(path).toBe('/v1/apps/registration');
|
|
37
|
+
});
|
|
38
|
+
test('should handle undefined ID', () => {
|
|
39
|
+
const path = RegistrationResources.buildPath(undefined);
|
|
40
|
+
expect(path).toBe('/v1/apps/registration');
|
|
41
|
+
});
|
|
42
|
+
test('should filter out falsy values correctly', () => {
|
|
43
|
+
const path = RegistrationResources.buildPath('app_789');
|
|
44
|
+
expect(path).toBe('/v1/apps/app_789/registration');
|
|
45
|
+
});
|
|
46
|
+
test('should handle various app ID patterns', () => {
|
|
47
|
+
const testCases = [
|
|
48
|
+
{ input: 'app_12345', expected: '/v1/apps/app_12345/registration' },
|
|
49
|
+
{
|
|
50
|
+
input: 'app_production',
|
|
51
|
+
expected: '/v1/apps/app_production/registration',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
input: 'app_test_env',
|
|
55
|
+
expected: '/v1/apps/app_test_env/registration',
|
|
56
|
+
},
|
|
57
|
+
{ input: '/v1/apps/existing', expected: '/v1/apps/existing' },
|
|
58
|
+
{ input: '/v1/apps/nested/path', expected: '/v1/apps/nested/path' },
|
|
59
|
+
];
|
|
60
|
+
for (const { input, expected } of testCases) {
|
|
61
|
+
expect(RegistrationResources.buildPath(input)).toBe(expected);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
describe('method signatures', () => {
|
|
66
|
+
test('should have getItem method', () => {
|
|
67
|
+
expect(typeof registrationResources.getItem).toBe('function');
|
|
68
|
+
expect(registrationResources.getItem.length).toBe(1); // id parameter
|
|
69
|
+
});
|
|
70
|
+
test('should have upsertItem method', () => {
|
|
71
|
+
expect(typeof registrationResources.upsertItem).toBe('function');
|
|
72
|
+
expect(registrationResources.upsertItem.length).toBe(2); // id and item parameters
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
describe('PATH integration', () => {
|
|
77
|
+
test('should use correct base PATH from parent resources', async () => {
|
|
78
|
+
const { PATH } = await import('../resources.js');
|
|
79
|
+
expect(PATH).toBe('/v1/apps');
|
|
80
|
+
// Verify the registration path builds from the base PATH
|
|
81
|
+
const appId = 'app_test';
|
|
82
|
+
const registrationPath = RegistrationResources.buildPath(appId);
|
|
83
|
+
expect(registrationPath).toBe(`${PATH}/${appId}/registration`);
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
describe('RESOURCE constant', () => {
|
|
87
|
+
test('should construct paths with registration resource', () => {
|
|
88
|
+
const appId = 'app_example';
|
|
89
|
+
const path = RegistrationResources.buildPath(appId);
|
|
90
|
+
expect(path).toContain('/registration');
|
|
91
|
+
expect(path.endsWith('/registration')).toBe(true);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
describe('URL building scenarios', () => {
|
|
95
|
+
test('should create proper URL structure for different app types', () => {
|
|
96
|
+
const scenarios = [
|
|
97
|
+
{
|
|
98
|
+
appId: 'app_web_frontend',
|
|
99
|
+
expected: '/v1/apps/app_web_frontend/registration',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
appId: 'app_mobile_ios',
|
|
103
|
+
expected: '/v1/apps/app_mobile_ios/registration',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
appId: 'app_api_gateway',
|
|
107
|
+
expected: '/v1/apps/app_api_gateway/registration',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
appId: 'app_enterprise_sso',
|
|
111
|
+
expected: '/v1/apps/app_enterprise_sso/registration',
|
|
112
|
+
},
|
|
113
|
+
];
|
|
114
|
+
for (const { appId, expected } of scenarios) {
|
|
115
|
+
const result = RegistrationResources.buildPath(appId);
|
|
116
|
+
expect(result).toBe(expected);
|
|
117
|
+
expect(result).toMatch(/^\/v1\/apps\/.*\/registration$/);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
test('should handle edge cases in path building', () => {
|
|
121
|
+
// Test with already formatted paths
|
|
122
|
+
expect(RegistrationResources.buildPath('/v1/apps/already/formatted')).toBe('/v1/apps/already/formatted');
|
|
123
|
+
// Test with empty string
|
|
124
|
+
expect(RegistrationResources.buildPath('')).toBe('/v1/apps/registration');
|
|
125
|
+
// Test with null/undefined
|
|
126
|
+
expect(RegistrationResources.buildPath(null)).toBe('/v1/apps/registration');
|
|
127
|
+
expect(RegistrationResources.buildPath(undefined)).toBe('/v1/apps/registration');
|
|
128
|
+
});
|
|
129
|
+
test('should create valid URL paths for various app patterns', () => {
|
|
130
|
+
const appPatterns = [
|
|
131
|
+
'app_development_env',
|
|
132
|
+
'app_staging_v2',
|
|
133
|
+
'app_production_main',
|
|
134
|
+
'app_testing_sandbox',
|
|
135
|
+
'app_demo_instance',
|
|
136
|
+
];
|
|
137
|
+
for (const appId of appPatterns) {
|
|
138
|
+
const path = RegistrationResources.buildPath(appId);
|
|
139
|
+
expect(path).toBe(`/v1/apps/${appId}/registration`);
|
|
140
|
+
expect(path).toMatch(/^\/v1\/apps\/app_.*\/registration$/);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
describe('Integration with MondoIdentity instance', () => {
|
|
145
|
+
test('should store MondoIdentity instance internally', () => {
|
|
146
|
+
// biome-ignore lint/complexity/useLiteralKeys: <explanation>
|
|
147
|
+
const internalInstance = registrationResources['instance'];
|
|
148
|
+
expect(internalInstance).toBe(mockInstance);
|
|
149
|
+
expect(internalInstance.config.host).toBe('https://api.example.com');
|
|
150
|
+
expect(internalInstance.config.accessToken).toBe('test-token');
|
|
151
|
+
});
|
|
152
|
+
test('should maintain reference to authorizer function', () => {
|
|
153
|
+
// biome-ignore lint/complexity/useLiteralKeys: <explanation>
|
|
154
|
+
const internalInstance = registrationResources['instance'];
|
|
155
|
+
expect(typeof internalInstance.authorizer).toBe('function');
|
|
156
|
+
expect(internalInstance.authorizer).toBe(mockInstance.authorizer);
|
|
157
|
+
});
|
|
158
|
+
test('should work with different MondoIdentity configurations', () => {
|
|
159
|
+
const customInstance = {
|
|
160
|
+
config: {
|
|
161
|
+
host: 'https://custom-registration.api.com',
|
|
162
|
+
accessToken: 'custom-registration-token',
|
|
163
|
+
},
|
|
164
|
+
authorizer: vi.fn(),
|
|
165
|
+
};
|
|
166
|
+
const customResources = new RegistrationResources(customInstance);
|
|
167
|
+
// biome-ignore lint/complexity/useLiteralKeys: <explanation>
|
|
168
|
+
expect(customResources['instance']).toBe(customInstance);
|
|
169
|
+
// biome-ignore lint/complexity/useLiteralKeys: <explanation>
|
|
170
|
+
expect(customResources['instance'].config.host).toBe('https://custom-registration.api.com');
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
describe('Class structure and inheritance', () => {
|
|
174
|
+
test('should have proper class structure', () => {
|
|
175
|
+
expect(RegistrationResources).toBeDefined();
|
|
176
|
+
expect(typeof RegistrationResources).toBe('function');
|
|
177
|
+
expect(RegistrationResources.prototype.constructor).toBe(RegistrationResources);
|
|
178
|
+
});
|
|
179
|
+
test('should have static buildPath method', () => {
|
|
180
|
+
expect(typeof RegistrationResources.buildPath).toBe('function');
|
|
181
|
+
expect(RegistrationResources.buildPath).toBeDefined();
|
|
182
|
+
});
|
|
183
|
+
test('should have instance methods for registration operations', () => {
|
|
184
|
+
const methods = [
|
|
185
|
+
'getItem',
|
|
186
|
+
'upsertItem',
|
|
187
|
+
];
|
|
188
|
+
for (const methodName of methods) {
|
|
189
|
+
expect(typeof registrationResources[methodName]).toBe('function');
|
|
190
|
+
expect(registrationResources[methodName]).toBeDefined();
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
test('should maintain method binding', () => {
|
|
194
|
+
const { getItem, upsertItem } = registrationResources;
|
|
195
|
+
expect(typeof getItem).toBe('function');
|
|
196
|
+
expect(typeof upsertItem).toBe('function');
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
describe('Registration operation method signatures', () => {
|
|
200
|
+
test('should have correct parameter counts for each method', () => {
|
|
201
|
+
// getItem(id: string)
|
|
202
|
+
expect(registrationResources.getItem.length).toBe(1);
|
|
203
|
+
// upsertItem(id: string, item: UpsertRegistrationInput)
|
|
204
|
+
expect(registrationResources.upsertItem.length).toBe(2);
|
|
205
|
+
});
|
|
206
|
+
test('should support registration-specific workflow pattern', () => {
|
|
207
|
+
// This test verifies the class provides the expected registration interface
|
|
208
|
+
// without actually calling the methods (which would require complex mocking)
|
|
209
|
+
const registrationMethods = {
|
|
210
|
+
read: 'getItem',
|
|
211
|
+
upsert: 'upsertItem',
|
|
212
|
+
};
|
|
213
|
+
// Read operation
|
|
214
|
+
expect(registrationResources).toHaveProperty(registrationMethods.read);
|
|
215
|
+
// Upsert operation (create or update)
|
|
216
|
+
expect(registrationResources).toHaveProperty(registrationMethods.upsert);
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
describe('Path construction behavior', () => {
|
|
220
|
+
test('should properly filter out falsy values in path construction', () => {
|
|
221
|
+
const falsyValues = [null, undefined, ''];
|
|
222
|
+
for (const value of falsyValues) {
|
|
223
|
+
const path = RegistrationResources.buildPath(value);
|
|
224
|
+
expect(path).toBe('/v1/apps/registration');
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
test('should handle complex app ID formats', () => {
|
|
228
|
+
const complexIds = [
|
|
229
|
+
'app_complex-name_123',
|
|
230
|
+
'app_with.dots',
|
|
231
|
+
'app_with_multiple_underscores',
|
|
232
|
+
'app-with-dashes',
|
|
233
|
+
'app123numbers',
|
|
234
|
+
];
|
|
235
|
+
for (const id of complexIds) {
|
|
236
|
+
const path = RegistrationResources.buildPath(id);
|
|
237
|
+
expect(path).toBe(`/v1/apps/${id}/registration`);
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
test('should maintain consistent path structure', () => {
|
|
241
|
+
const testIds = [
|
|
242
|
+
'app_simple',
|
|
243
|
+
'app_complex_id_with_many_parts',
|
|
244
|
+
'app_short',
|
|
245
|
+
'app_with_numbers_123_456',
|
|
246
|
+
];
|
|
247
|
+
for (const id of testIds) {
|
|
248
|
+
const path = RegistrationResources.buildPath(id);
|
|
249
|
+
// Should start with /v1/apps
|
|
250
|
+
expect(path.startsWith('/v1/apps/')).toBe(true);
|
|
251
|
+
// Should end with /registration
|
|
252
|
+
expect(path.endsWith('/registration')).toBe(true);
|
|
253
|
+
// Should contain the app ID
|
|
254
|
+
expect(path).toContain(id);
|
|
255
|
+
// Should match the expected format
|
|
256
|
+
expect(path).toBe(`/v1/apps/${id}/registration`);
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
});
|
|
@@ -3,7 +3,7 @@ export declare const RegistrationSchema: import("arktype/internal/methods/object
|
|
|
3
3
|
updatedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
4
4
|
deletedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
5
5
|
deactivatedAt?: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>) | undefined;
|
|
6
|
-
metadata: (In: import("arktype/internal/attributes.ts").Default<unknown, Map<string, string | number | boolean>>) => import("arktype").Out<Map<string, string | number | boolean
|
|
6
|
+
metadata: (In: import("arktype/internal/attributes.ts").Default<unknown, Map<string, string | number | boolean>>) => import("arktype").Out<Map<string, string | number | boolean>>;
|
|
7
7
|
}, {}>;
|
|
8
8
|
export type RegistrationProperties = typeof RegistrationSchema.inferIn;
|
|
9
9
|
export type Registration = typeof RegistrationSchema.inferOut;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.test.d.ts","sourceRoot":"","sources":["../../../../src/app/registration/schema.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { type } from 'arktype';
|
|
2
|
+
import { describe, expect, test } from 'vitest';
|
|
3
|
+
import { RegistrationPayloadSchema, RegistrationSchema, UpsertRegistrationPayloadSchema, } from './schema.js';
|
|
4
|
+
describe('App Registration - Schema', () => {
|
|
5
|
+
describe('RegistrationSchema', () => {
|
|
6
|
+
test('should accept complete registration object', () => {
|
|
7
|
+
const registration = {
|
|
8
|
+
allowSelfRegistration: true,
|
|
9
|
+
updatedAt: new Date(),
|
|
10
|
+
deletedAt: new Date(),
|
|
11
|
+
deactivatedAt: new Date(),
|
|
12
|
+
metadata: {
|
|
13
|
+
approval_required: false,
|
|
14
|
+
email_verification: true,
|
|
15
|
+
default_role: 'user',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
const result = RegistrationSchema(registration);
|
|
19
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
20
|
+
});
|
|
21
|
+
test('should accept minimal registration object', () => {
|
|
22
|
+
const registration = {
|
|
23
|
+
metadata: {},
|
|
24
|
+
};
|
|
25
|
+
const result = RegistrationSchema(registration);
|
|
26
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
27
|
+
// Should have default allowSelfRegistration value
|
|
28
|
+
expect(result.allowSelfRegistration).toBe(false);
|
|
29
|
+
});
|
|
30
|
+
test('should accept registration with allowSelfRegistration false', () => {
|
|
31
|
+
const registration = {
|
|
32
|
+
allowSelfRegistration: false,
|
|
33
|
+
metadata: {
|
|
34
|
+
registration_flow: 'invite_only',
|
|
35
|
+
admin_approval: true,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const result = RegistrationSchema(registration);
|
|
39
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
40
|
+
expect(result.allowSelfRegistration).toBe(false);
|
|
41
|
+
});
|
|
42
|
+
test('should accept registration with allowSelfRegistration true', () => {
|
|
43
|
+
const registration = {
|
|
44
|
+
allowSelfRegistration: true,
|
|
45
|
+
updatedAt: new Date(),
|
|
46
|
+
metadata: {
|
|
47
|
+
registration_flow: 'open',
|
|
48
|
+
email_domains: ['example.com', 'company.org'],
|
|
49
|
+
require_email_verification: true,
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
const result = RegistrationSchema(registration);
|
|
53
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
54
|
+
expect(result.allowSelfRegistration).toBe(true);
|
|
55
|
+
});
|
|
56
|
+
test('should accept registration with optional dates', () => {
|
|
57
|
+
const registration = {
|
|
58
|
+
allowSelfRegistration: true,
|
|
59
|
+
updatedAt: new Date(),
|
|
60
|
+
metadata: {
|
|
61
|
+
last_config_change: new Date().toISOString(),
|
|
62
|
+
configured_by: 'admin@example.com',
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
const result = RegistrationSchema(registration);
|
|
66
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
67
|
+
});
|
|
68
|
+
test('should accept registration with complex metadata', () => {
|
|
69
|
+
const registration = {
|
|
70
|
+
allowSelfRegistration: true,
|
|
71
|
+
updatedAt: new Date(),
|
|
72
|
+
deletedAt: new Date(),
|
|
73
|
+
metadata: {
|
|
74
|
+
settings: {
|
|
75
|
+
email_verification_required: true,
|
|
76
|
+
phone_verification_required: false,
|
|
77
|
+
captcha_required: true,
|
|
78
|
+
password_policy: {
|
|
79
|
+
min_length: 8,
|
|
80
|
+
require_uppercase: true,
|
|
81
|
+
require_lowercase: true,
|
|
82
|
+
require_numbers: true,
|
|
83
|
+
require_symbols: false,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
restrictions: {
|
|
87
|
+
allowed_domains: ['company.com', 'partner.org'],
|
|
88
|
+
blocked_domains: ['tempmail.com', 'guerrillamail.info'],
|
|
89
|
+
max_registrations_per_day: 100,
|
|
90
|
+
rate_limit_per_ip: 5,
|
|
91
|
+
},
|
|
92
|
+
workflow: {
|
|
93
|
+
approval_workflow: false,
|
|
94
|
+
auto_assign_role: 'member',
|
|
95
|
+
welcome_email: true,
|
|
96
|
+
onboarding_flow: 'standard',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
const result = RegistrationSchema(registration);
|
|
101
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
102
|
+
});
|
|
103
|
+
test('should reject invalid allowSelfRegistration type', () => {
|
|
104
|
+
const registration = {
|
|
105
|
+
allowSelfRegistration: 'yes', // should be boolean
|
|
106
|
+
metadata: {},
|
|
107
|
+
};
|
|
108
|
+
const result = RegistrationSchema(registration);
|
|
109
|
+
expect(result).toBeInstanceOf(type.errors);
|
|
110
|
+
});
|
|
111
|
+
test('should reject invalid date types', () => {
|
|
112
|
+
const registration = {
|
|
113
|
+
allowSelfRegistration: true,
|
|
114
|
+
updatedAt: 'invalid-date',
|
|
115
|
+
metadata: {},
|
|
116
|
+
};
|
|
117
|
+
const result = RegistrationSchema(registration);
|
|
118
|
+
expect(result).toBeInstanceOf(type.errors);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
describe('RegistrationPayloadSchema', () => {
|
|
122
|
+
test('should accept complete payload', () => {
|
|
123
|
+
const payload = {
|
|
124
|
+
allowSelfRegistration: true,
|
|
125
|
+
updatedAt: new Date().toISOString(),
|
|
126
|
+
deletedAt: new Date().toISOString(),
|
|
127
|
+
deactivatedAt: new Date().toISOString(),
|
|
128
|
+
metadata: {
|
|
129
|
+
configuration: 'open_registration',
|
|
130
|
+
updated_by: 'admin@example.com',
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
const result = RegistrationPayloadSchema(payload);
|
|
134
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
135
|
+
expect(result).toEqual(payload);
|
|
136
|
+
});
|
|
137
|
+
test('should accept minimal payload', () => {
|
|
138
|
+
const payload = {
|
|
139
|
+
metadata: {},
|
|
140
|
+
};
|
|
141
|
+
const result = RegistrationPayloadSchema(payload);
|
|
142
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
143
|
+
expect(result.allowSelfRegistration).toBe(false);
|
|
144
|
+
});
|
|
145
|
+
test('should accept payload with allowSelfRegistration', () => {
|
|
146
|
+
const payload = {
|
|
147
|
+
allowSelfRegistration: true,
|
|
148
|
+
metadata: {
|
|
149
|
+
feature_enabled: true,
|
|
150
|
+
enabled_at: new Date().toISOString(),
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
const result = RegistrationPayloadSchema(payload);
|
|
154
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
155
|
+
});
|
|
156
|
+
test('should accept payload with optional dates', () => {
|
|
157
|
+
const payload = {
|
|
158
|
+
allowSelfRegistration: false,
|
|
159
|
+
updatedAt: new Date().toISOString(),
|
|
160
|
+
metadata: {
|
|
161
|
+
disabled_reason: 'maintenance',
|
|
162
|
+
re_enable_at: new Date().toISOString(),
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
const result = RegistrationPayloadSchema(payload);
|
|
166
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
167
|
+
});
|
|
168
|
+
test('should accept payload with comprehensive registration settings', () => {
|
|
169
|
+
const payload = {
|
|
170
|
+
allowSelfRegistration: true,
|
|
171
|
+
updatedAt: new Date().toISOString(),
|
|
172
|
+
metadata: {
|
|
173
|
+
email_format: 'strict',
|
|
174
|
+
name_min_length: 2,
|
|
175
|
+
phone_format: 'international',
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
const result = RegistrationPayloadSchema(payload);
|
|
179
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
180
|
+
});
|
|
181
|
+
test('should reject invalid date format', () => {
|
|
182
|
+
const payload = {
|
|
183
|
+
allowSelfRegistration: true,
|
|
184
|
+
updatedAt: 'invalid-date',
|
|
185
|
+
metadata: {},
|
|
186
|
+
};
|
|
187
|
+
const result = RegistrationPayloadSchema(payload);
|
|
188
|
+
expect(result).toBeInstanceOf(type.errors);
|
|
189
|
+
});
|
|
190
|
+
test('should reject invalid allowSelfRegistration type', () => {
|
|
191
|
+
const payload = {
|
|
192
|
+
allowSelfRegistration: 'true', // should be boolean
|
|
193
|
+
metadata: {},
|
|
194
|
+
};
|
|
195
|
+
const result = RegistrationPayloadSchema(payload);
|
|
196
|
+
expect(result).toBeInstanceOf(type.errors);
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
describe('UpsertRegistrationPayloadSchema', () => {
|
|
200
|
+
test('should accept upsert with allowSelfRegistration', () => {
|
|
201
|
+
const payload = {
|
|
202
|
+
allowSelfRegistration: true,
|
|
203
|
+
metadata: {
|
|
204
|
+
operation: 'enable_self_registration',
|
|
205
|
+
reason: 'open_beta_launch',
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
const result = UpsertRegistrationPayloadSchema(payload);
|
|
209
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
210
|
+
expect(result).toEqual(payload);
|
|
211
|
+
});
|
|
212
|
+
test('should accept upsert without allowSelfRegistration', () => {
|
|
213
|
+
const payload = {
|
|
214
|
+
metadata: {
|
|
215
|
+
operation: 'enable_self_registration',
|
|
216
|
+
reason: 'open_beta_launch',
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
const result = UpsertRegistrationPayloadSchema(payload);
|
|
220
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
221
|
+
});
|
|
222
|
+
test('should accept upsert with undefined allowSelfRegistration', () => {
|
|
223
|
+
const payload = {
|
|
224
|
+
allowSelfRegistration: undefined,
|
|
225
|
+
metadata: {
|
|
226
|
+
partial_update: true,
|
|
227
|
+
},
|
|
228
|
+
};
|
|
229
|
+
const result = UpsertRegistrationPayloadSchema(payload);
|
|
230
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
231
|
+
});
|
|
232
|
+
test('should accept empty metadata', () => {
|
|
233
|
+
const payload = {
|
|
234
|
+
allowSelfRegistration: false,
|
|
235
|
+
metadata: {},
|
|
236
|
+
};
|
|
237
|
+
const result = UpsertRegistrationPayloadSchema(payload);
|
|
238
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
239
|
+
});
|
|
240
|
+
test('should accept comprehensive upsert payload', () => {
|
|
241
|
+
const payload = {
|
|
242
|
+
allowSelfRegistration: true,
|
|
243
|
+
metadata: {
|
|
244
|
+
updated_by: 'admin@example.com',
|
|
245
|
+
change_reason: 'platform_upgrade',
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
const result = UpsertRegistrationPayloadSchema(payload);
|
|
249
|
+
expect(result).not.toBeInstanceOf(type.errors);
|
|
250
|
+
});
|
|
251
|
+
test('should reject invalid allowSelfRegistration type', () => {
|
|
252
|
+
const payload = {
|
|
253
|
+
allowSelfRegistration: 'maybe', // should be boolean or undefined
|
|
254
|
+
metadata: {},
|
|
255
|
+
};
|
|
256
|
+
const result = UpsertRegistrationPayloadSchema(payload);
|
|
257
|
+
expect(result).toBeInstanceOf(type.errors);
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.test.d.ts","sourceRoot":"","sources":["../../../src/app/resources.test.ts"],"names":[],"mappings":""}
|