@ominity/api-typescript 1.0.0 → 1.1.1
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/dist/commonjs/funcs/index.d.ts +1 -0
- package/dist/commonjs/funcs/index.d.ts.map +1 -1
- package/dist/commonjs/funcs/index.js +1 -0
- package/dist/commonjs/funcs/index.js.map +1 -1
- package/dist/commonjs/funcs/oauth2/index.d.ts +57 -0
- package/dist/commonjs/funcs/oauth2/index.d.ts.map +1 -0
- package/dist/commonjs/funcs/oauth2/index.js +376 -0
- package/dist/commonjs/funcs/oauth2/index.js.map +1 -0
- package/dist/commonjs/funcs/settings/index.d.ts +6 -0
- package/dist/commonjs/funcs/settings/index.d.ts.map +1 -1
- package/dist/commonjs/funcs/settings/index.js +6 -0
- package/dist/commonjs/funcs/settings/index.js.map +1 -1
- package/dist/commonjs/funcs/settings/socialProviderUsersDelete.d.ts +11 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersDelete.d.ts.map +1 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersDelete.js +90 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersDelete.js.map +1 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersExchangeAccessCode.d.ts +11 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersExchangeAccessCode.d.ts.map +1 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersExchangeAccessCode.js +92 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersExchangeAccessCode.js.map +1 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersGet.d.ts +11 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersGet.js +90 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersGet.js.map +1 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersList.d.ts +11 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersList.d.ts.map +1 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersList.js +104 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersList.js.map +1 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersUpdate.d.ts +11 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersUpdate.d.ts.map +1 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersUpdate.js +97 -0
- package/dist/commonjs/funcs/settings/socialProviderUsersUpdate.js.map +1 -0
- package/dist/commonjs/funcs/settings/socialProvidersCreateLink.d.ts +11 -0
- package/dist/commonjs/funcs/settings/socialProvidersCreateLink.d.ts.map +1 -0
- package/dist/commonjs/funcs/settings/socialProvidersCreateLink.js +95 -0
- package/dist/commonjs/funcs/settings/socialProvidersCreateLink.js.map +1 -0
- package/dist/commonjs/funcs/users/index.d.ts +4 -0
- package/dist/commonjs/funcs/users/index.d.ts.map +1 -1
- package/dist/commonjs/funcs/users/index.js +4 -0
- package/dist/commonjs/funcs/users/index.js.map +1 -1
- package/dist/commonjs/funcs/users/usersDisableMfa.d.ts.map +1 -1
- package/dist/commonjs/funcs/users/usersDisableMfa.js +5 -7
- package/dist/commonjs/funcs/users/usersDisableMfa.js.map +1 -1
- package/dist/commonjs/funcs/users/usersGetMfaMethod.d.ts +10 -0
- package/dist/commonjs/funcs/users/usersGetMfaMethod.d.ts.map +1 -0
- package/dist/commonjs/funcs/users/usersGetMfaMethod.js +123 -0
- package/dist/commonjs/funcs/users/usersGetMfaMethod.js.map +1 -0
- package/dist/commonjs/funcs/users/usersIssueToken.d.ts +10 -0
- package/dist/commonjs/funcs/users/usersIssueToken.d.ts.map +1 -0
- package/dist/commonjs/funcs/users/usersIssueToken.js +123 -0
- package/dist/commonjs/funcs/users/usersIssueToken.js.map +1 -0
- package/dist/commonjs/funcs/users/usersListMfaMethods.d.ts.map +1 -1
- package/dist/commonjs/funcs/users/usersListMfaMethods.js +1 -12
- package/dist/commonjs/funcs/users/usersListMfaMethods.js.map +1 -1
- package/dist/commonjs/funcs/users/usersListOAuthAccounts.js +5 -0
- package/dist/commonjs/funcs/users/usersListOAuthAccounts.js.map +1 -1
- package/dist/commonjs/funcs/users/usersListRecoveryCodes.d.ts.map +1 -1
- package/dist/commonjs/funcs/users/usersListRecoveryCodes.js +4 -8
- package/dist/commonjs/funcs/users/usersListRecoveryCodes.js.map +1 -1
- package/dist/commonjs/funcs/users/usersRegenerateRecoveryCodes.d.ts.map +1 -1
- package/dist/commonjs/funcs/users/usersRegenerateRecoveryCodes.js +5 -8
- package/dist/commonjs/funcs/users/usersRegenerateRecoveryCodes.js.map +1 -1
- package/dist/commonjs/funcs/users/usersResetPassword.d.ts +10 -0
- package/dist/commonjs/funcs/users/usersResetPassword.d.ts.map +1 -0
- package/dist/commonjs/funcs/users/usersResetPassword.js +124 -0
- package/dist/commonjs/funcs/users/usersResetPassword.js.map +1 -0
- package/dist/commonjs/funcs/users/usersSendMfa.d.ts.map +1 -1
- package/dist/commonjs/funcs/users/usersSendMfa.js +5 -7
- package/dist/commonjs/funcs/users/usersSendMfa.js.map +1 -1
- package/dist/commonjs/funcs/users/usersSendPasswordResetLink.d.ts +10 -0
- package/dist/commonjs/funcs/users/usersSendPasswordResetLink.d.ts.map +1 -0
- package/dist/commonjs/funcs/users/usersSendPasswordResetLink.js +124 -0
- package/dist/commonjs/funcs/users/usersSendPasswordResetLink.js.map +1 -0
- package/dist/commonjs/funcs/users/usersValidateMfa.d.ts.map +1 -1
- package/dist/commonjs/funcs/users/usersValidateMfa.js +3 -7
- package/dist/commonjs/funcs/users/usersValidateMfa.js.map +1 -1
- package/dist/commonjs/funcs/users/usersValidateRecoveryCode.d.ts.map +1 -1
- package/dist/commonjs/funcs/users/usersValidateRecoveryCode.js +5 -7
- package/dist/commonjs/funcs/users/usersValidateRecoveryCode.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +1 -1
- package/dist/commonjs/lib/url.d.ts +5 -0
- package/dist/commonjs/lib/url.d.ts.map +1 -1
- package/dist/commonjs/lib/url.js +25 -0
- package/dist/commonjs/lib/url.js.map +1 -1
- package/dist/commonjs/models/identity/index.d.ts +1 -0
- package/dist/commonjs/models/identity/index.d.ts.map +1 -1
- package/dist/commonjs/models/identity/index.js +1 -0
- package/dist/commonjs/models/identity/index.js.map +1 -1
- package/dist/commonjs/models/identity/oauth2.d.ts +54 -0
- package/dist/commonjs/models/identity/oauth2.d.ts.map +1 -0
- package/dist/commonjs/models/identity/oauth2.js +96 -0
- package/dist/commonjs/models/identity/oauth2.js.map +1 -0
- package/dist/commonjs/models/identity/user-mfa-method.d.ts +4 -0
- package/dist/commonjs/models/identity/user-mfa-method.d.ts.map +1 -1
- package/dist/commonjs/models/identity/user-mfa-method.js +4 -0
- package/dist/commonjs/models/identity/user-mfa-method.js.map +1 -1
- package/dist/commonjs/models/identity/user-recovery-code.d.ts +3 -4
- package/dist/commonjs/models/identity/user-recovery-code.d.ts.map +1 -1
- package/dist/commonjs/models/identity/user-recovery-code.js +3 -4
- package/dist/commonjs/models/identity/user-recovery-code.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/oauth2.d.ts +103 -0
- package/dist/commonjs/models/operations/oauth2.d.ts.map +1 -0
- package/dist/commonjs/models/operations/oauth2.js +118 -0
- package/dist/commonjs/models/operations/oauth2.js.map +1 -0
- package/dist/commonjs/models/operations/settings-social-providers.d.ts +114 -0
- package/dist/commonjs/models/operations/settings-social-providers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/settings-social-providers.js +61 -1
- package/dist/commonjs/models/operations/settings-social-providers.js.map +1 -1
- package/dist/commonjs/models/operations/users-mfa.d.ts +27 -11
- package/dist/commonjs/models/operations/users-mfa.d.ts.map +1 -1
- package/dist/commonjs/models/operations/users-mfa.js +20 -6
- package/dist/commonjs/models/operations/users-mfa.js.map +1 -1
- package/dist/commonjs/models/operations/users-oauth-accounts.d.ts +13 -0
- package/dist/commonjs/models/operations/users-oauth-accounts.d.ts.map +1 -1
- package/dist/commonjs/models/operations/users-oauth-accounts.js +7 -0
- package/dist/commonjs/models/operations/users-oauth-accounts.js.map +1 -1
- package/dist/commonjs/models/operations/users-password-reset.d.ts +34 -0
- package/dist/commonjs/models/operations/users-password-reset.d.ts.map +1 -0
- package/dist/commonjs/models/operations/users-password-reset.js +69 -0
- package/dist/commonjs/models/operations/users-password-reset.js.map +1 -0
- package/dist/commonjs/models/operations/users-recovery-codes.d.ts +16 -6
- package/dist/commonjs/models/operations/users-recovery-codes.d.ts.map +1 -1
- package/dist/commonjs/models/operations/users-recovery-codes.js +17 -4
- package/dist/commonjs/models/operations/users-recovery-codes.js.map +1 -1
- package/dist/commonjs/models/operations/users.d.ts +9 -0
- package/dist/commonjs/models/operations/users.d.ts.map +1 -1
- package/dist/commonjs/models/operations/users.js +8 -1
- package/dist/commonjs/models/operations/users.js.map +1 -1
- package/dist/commonjs/models/settings/index.d.ts +1 -0
- package/dist/commonjs/models/settings/index.d.ts.map +1 -1
- package/dist/commonjs/models/settings/index.js +1 -0
- package/dist/commonjs/models/settings/index.js.map +1 -1
- package/dist/commonjs/models/settings/social-provider-link.d.ts +12 -0
- package/dist/commonjs/models/settings/social-provider-link.d.ts.map +1 -0
- package/dist/commonjs/models/settings/social-provider-link.js +56 -0
- package/dist/commonjs/models/settings/social-provider-link.js.map +1 -0
- package/dist/commonjs/models/settings/social-provider-user.d.ts +3 -2
- package/dist/commonjs/models/settings/social-provider-user.d.ts.map +1 -1
- package/dist/commonjs/models/settings/social-provider-user.js +3 -2
- package/dist/commonjs/models/settings/social-provider-user.js.map +1 -1
- package/dist/commonjs/sdk/oauth2.d.ts +17 -0
- package/dist/commonjs/sdk/oauth2.d.ts.map +1 -0
- package/dist/commonjs/sdk/oauth2.js +49 -0
- package/dist/commonjs/sdk/oauth2.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/settings/social-providers.d.ts +24 -0
- package/dist/commonjs/sdk/settings/social-providers.d.ts.map +1 -1
- package/dist/commonjs/sdk/settings/social-providers.js +42 -0
- package/dist/commonjs/sdk/settings/social-providers.js.map +1 -1
- package/dist/commonjs/sdk/users/customers.d.ts +6 -0
- package/dist/commonjs/sdk/users/customers.d.ts.map +1 -0
- package/dist/commonjs/sdk/users/customers.js +16 -0
- package/dist/commonjs/sdk/users/customers.js.map +1 -0
- package/dist/commonjs/sdk/users/index.d.ts +15 -10
- package/dist/commonjs/sdk/users/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/users/index.js +25 -37
- package/dist/commonjs/sdk/users/index.js.map +1 -1
- package/dist/commonjs/sdk/users/mfa-methods.d.ts +11 -0
- package/dist/commonjs/sdk/users/mfa-methods.d.ts.map +1 -0
- package/dist/commonjs/sdk/users/mfa-methods.js +36 -0
- package/dist/commonjs/sdk/users/mfa-methods.js.map +1 -0
- package/dist/commonjs/sdk/users/oauth-accounts.d.ts +6 -0
- package/dist/commonjs/sdk/users/oauth-accounts.d.ts.map +1 -0
- package/dist/commonjs/sdk/users/oauth-accounts.js +16 -0
- package/dist/commonjs/sdk/users/oauth-accounts.js.map +1 -0
- package/dist/commonjs/sdk/users/recovery-codes.d.ts +8 -0
- package/dist/commonjs/sdk/users/recovery-codes.d.ts.map +1 -0
- package/dist/commonjs/sdk/users/recovery-codes.js +24 -0
- package/dist/commonjs/sdk/users/recovery-codes.js.map +1 -0
- package/dist/esm/funcs/index.d.ts +1 -0
- package/dist/esm/funcs/index.d.ts.map +1 -1
- package/dist/esm/funcs/index.js +1 -0
- package/dist/esm/funcs/index.js.map +1 -1
- package/dist/esm/funcs/oauth2/index.d.ts +57 -0
- package/dist/esm/funcs/oauth2/index.d.ts.map +1 -0
- package/dist/esm/funcs/oauth2/index.js +329 -0
- package/dist/esm/funcs/oauth2/index.js.map +1 -0
- package/dist/esm/funcs/settings/index.d.ts +6 -0
- package/dist/esm/funcs/settings/index.d.ts.map +1 -1
- package/dist/esm/funcs/settings/index.js +6 -0
- package/dist/esm/funcs/settings/index.js.map +1 -1
- package/dist/esm/funcs/settings/socialProviderUsersDelete.d.ts +11 -0
- package/dist/esm/funcs/settings/socialProviderUsersDelete.d.ts.map +1 -0
- package/dist/esm/funcs/settings/socialProviderUsersDelete.js +54 -0
- package/dist/esm/funcs/settings/socialProviderUsersDelete.js.map +1 -0
- package/dist/esm/funcs/settings/socialProviderUsersExchangeAccessCode.d.ts +11 -0
- package/dist/esm/funcs/settings/socialProviderUsersExchangeAccessCode.d.ts.map +1 -0
- package/dist/esm/funcs/settings/socialProviderUsersExchangeAccessCode.js +56 -0
- package/dist/esm/funcs/settings/socialProviderUsersExchangeAccessCode.js.map +1 -0
- package/dist/esm/funcs/settings/socialProviderUsersGet.d.ts +11 -0
- package/dist/esm/funcs/settings/socialProviderUsersGet.d.ts.map +1 -0
- package/dist/esm/funcs/settings/socialProviderUsersGet.js +54 -0
- package/dist/esm/funcs/settings/socialProviderUsersGet.js.map +1 -0
- package/dist/esm/funcs/settings/socialProviderUsersList.d.ts +11 -0
- package/dist/esm/funcs/settings/socialProviderUsersList.d.ts.map +1 -0
- package/dist/esm/funcs/settings/socialProviderUsersList.js +68 -0
- package/dist/esm/funcs/settings/socialProviderUsersList.js.map +1 -0
- package/dist/esm/funcs/settings/socialProviderUsersUpdate.d.ts +11 -0
- package/dist/esm/funcs/settings/socialProviderUsersUpdate.d.ts.map +1 -0
- package/dist/esm/funcs/settings/socialProviderUsersUpdate.js +61 -0
- package/dist/esm/funcs/settings/socialProviderUsersUpdate.js.map +1 -0
- package/dist/esm/funcs/settings/socialProvidersCreateLink.d.ts +11 -0
- package/dist/esm/funcs/settings/socialProvidersCreateLink.d.ts.map +1 -0
- package/dist/esm/funcs/settings/socialProvidersCreateLink.js +59 -0
- package/dist/esm/funcs/settings/socialProvidersCreateLink.js.map +1 -0
- package/dist/esm/funcs/users/index.d.ts +4 -0
- package/dist/esm/funcs/users/index.d.ts.map +1 -1
- package/dist/esm/funcs/users/index.js +4 -0
- package/dist/esm/funcs/users/index.js.map +1 -1
- package/dist/esm/funcs/users/usersDisableMfa.d.ts.map +1 -1
- package/dist/esm/funcs/users/usersDisableMfa.js +5 -7
- package/dist/esm/funcs/users/usersDisableMfa.js.map +1 -1
- package/dist/esm/funcs/users/usersGetMfaMethod.d.ts +10 -0
- package/dist/esm/funcs/users/usersGetMfaMethod.d.ts.map +1 -0
- package/dist/esm/funcs/users/usersGetMfaMethod.js +87 -0
- package/dist/esm/funcs/users/usersGetMfaMethod.js.map +1 -0
- package/dist/esm/funcs/users/usersIssueToken.d.ts +10 -0
- package/dist/esm/funcs/users/usersIssueToken.d.ts.map +1 -0
- package/dist/esm/funcs/users/usersIssueToken.js +87 -0
- package/dist/esm/funcs/users/usersIssueToken.js.map +1 -0
- package/dist/esm/funcs/users/usersListMfaMethods.d.ts.map +1 -1
- package/dist/esm/funcs/users/usersListMfaMethods.js +2 -13
- package/dist/esm/funcs/users/usersListMfaMethods.js.map +1 -1
- package/dist/esm/funcs/users/usersListOAuthAccounts.js +5 -0
- package/dist/esm/funcs/users/usersListOAuthAccounts.js.map +1 -1
- package/dist/esm/funcs/users/usersListRecoveryCodes.d.ts.map +1 -1
- package/dist/esm/funcs/users/usersListRecoveryCodes.js +4 -8
- package/dist/esm/funcs/users/usersListRecoveryCodes.js.map +1 -1
- package/dist/esm/funcs/users/usersRegenerateRecoveryCodes.d.ts.map +1 -1
- package/dist/esm/funcs/users/usersRegenerateRecoveryCodes.js +6 -9
- package/dist/esm/funcs/users/usersRegenerateRecoveryCodes.js.map +1 -1
- package/dist/esm/funcs/users/usersResetPassword.d.ts +10 -0
- package/dist/esm/funcs/users/usersResetPassword.d.ts.map +1 -0
- package/dist/esm/funcs/users/usersResetPassword.js +88 -0
- package/dist/esm/funcs/users/usersResetPassword.js.map +1 -0
- package/dist/esm/funcs/users/usersSendMfa.d.ts.map +1 -1
- package/dist/esm/funcs/users/usersSendMfa.js +5 -7
- package/dist/esm/funcs/users/usersSendMfa.js.map +1 -1
- package/dist/esm/funcs/users/usersSendPasswordResetLink.d.ts +10 -0
- package/dist/esm/funcs/users/usersSendPasswordResetLink.d.ts.map +1 -0
- package/dist/esm/funcs/users/usersSendPasswordResetLink.js +88 -0
- package/dist/esm/funcs/users/usersSendPasswordResetLink.js.map +1 -0
- package/dist/esm/funcs/users/usersValidateMfa.d.ts.map +1 -1
- package/dist/esm/funcs/users/usersValidateMfa.js +3 -7
- package/dist/esm/funcs/users/usersValidateMfa.js.map +1 -1
- package/dist/esm/funcs/users/usersValidateRecoveryCode.d.ts.map +1 -1
- package/dist/esm/funcs/users/usersValidateRecoveryCode.js +5 -7
- package/dist/esm/funcs/users/usersValidateRecoveryCode.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +1 -1
- package/dist/esm/lib/url.d.ts +5 -0
- package/dist/esm/lib/url.d.ts.map +1 -1
- package/dist/esm/lib/url.js +24 -0
- package/dist/esm/lib/url.js.map +1 -1
- package/dist/esm/models/identity/index.d.ts +1 -0
- package/dist/esm/models/identity/index.d.ts.map +1 -1
- package/dist/esm/models/identity/index.js +1 -0
- package/dist/esm/models/identity/index.js.map +1 -1
- package/dist/esm/models/identity/oauth2.d.ts +54 -0
- package/dist/esm/models/identity/oauth2.d.ts.map +1 -0
- package/dist/esm/models/identity/oauth2.js +60 -0
- package/dist/esm/models/identity/oauth2.js.map +1 -0
- package/dist/esm/models/identity/user-mfa-method.d.ts +4 -0
- package/dist/esm/models/identity/user-mfa-method.d.ts.map +1 -1
- package/dist/esm/models/identity/user-mfa-method.js +4 -0
- package/dist/esm/models/identity/user-mfa-method.js.map +1 -1
- package/dist/esm/models/identity/user-recovery-code.d.ts +3 -4
- package/dist/esm/models/identity/user-recovery-code.d.ts.map +1 -1
- package/dist/esm/models/identity/user-recovery-code.js +3 -4
- package/dist/esm/models/identity/user-recovery-code.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/oauth2.d.ts +103 -0
- package/dist/esm/models/operations/oauth2.d.ts.map +1 -0
- package/dist/esm/models/operations/oauth2.js +82 -0
- package/dist/esm/models/operations/oauth2.js.map +1 -0
- package/dist/esm/models/operations/settings-social-providers.d.ts +114 -0
- package/dist/esm/models/operations/settings-social-providers.d.ts.map +1 -1
- package/dist/esm/models/operations/settings-social-providers.js +60 -0
- package/dist/esm/models/operations/settings-social-providers.js.map +1 -1
- package/dist/esm/models/operations/users-mfa.d.ts +27 -11
- package/dist/esm/models/operations/users-mfa.d.ts.map +1 -1
- package/dist/esm/models/operations/users-mfa.js +19 -5
- package/dist/esm/models/operations/users-mfa.js.map +1 -1
- package/dist/esm/models/operations/users-oauth-accounts.d.ts +13 -0
- package/dist/esm/models/operations/users-oauth-accounts.d.ts.map +1 -1
- package/dist/esm/models/operations/users-oauth-accounts.js +7 -0
- package/dist/esm/models/operations/users-oauth-accounts.js.map +1 -1
- package/dist/esm/models/operations/users-password-reset.d.ts +34 -0
- package/dist/esm/models/operations/users-password-reset.d.ts.map +1 -0
- package/dist/esm/models/operations/users-password-reset.js +33 -0
- package/dist/esm/models/operations/users-password-reset.js.map +1 -0
- package/dist/esm/models/operations/users-recovery-codes.d.ts +16 -6
- package/dist/esm/models/operations/users-recovery-codes.d.ts.map +1 -1
- package/dist/esm/models/operations/users-recovery-codes.js +17 -4
- package/dist/esm/models/operations/users-recovery-codes.js.map +1 -1
- package/dist/esm/models/operations/users.d.ts +9 -0
- package/dist/esm/models/operations/users.d.ts.map +1 -1
- package/dist/esm/models/operations/users.js +7 -0
- package/dist/esm/models/operations/users.js.map +1 -1
- package/dist/esm/models/settings/index.d.ts +1 -0
- package/dist/esm/models/settings/index.d.ts.map +1 -1
- package/dist/esm/models/settings/index.js +1 -0
- package/dist/esm/models/settings/index.js.map +1 -1
- package/dist/esm/models/settings/social-provider-link.d.ts +12 -0
- package/dist/esm/models/settings/social-provider-link.d.ts.map +1 -0
- package/dist/esm/models/settings/social-provider-link.js +20 -0
- package/dist/esm/models/settings/social-provider-link.js.map +1 -0
- package/dist/esm/models/settings/social-provider-user.d.ts +3 -2
- package/dist/esm/models/settings/social-provider-user.d.ts.map +1 -1
- package/dist/esm/models/settings/social-provider-user.js +3 -2
- package/dist/esm/models/settings/social-provider-user.js.map +1 -1
- package/dist/esm/sdk/oauth2.d.ts +17 -0
- package/dist/esm/sdk/oauth2.d.ts.map +1 -0
- package/dist/esm/sdk/oauth2.js +45 -0
- package/dist/esm/sdk/oauth2.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/settings/social-providers.d.ts +24 -0
- package/dist/esm/sdk/settings/social-providers.d.ts.map +1 -1
- package/dist/esm/sdk/settings/social-providers.js +42 -0
- package/dist/esm/sdk/settings/social-providers.js.map +1 -1
- package/dist/esm/sdk/users/customers.d.ts +6 -0
- package/dist/esm/sdk/users/customers.d.ts.map +1 -0
- package/dist/esm/sdk/users/customers.js +12 -0
- package/dist/esm/sdk/users/customers.js.map +1 -0
- package/dist/esm/sdk/users/index.d.ts +15 -10
- package/dist/esm/sdk/users/index.d.ts.map +1 -1
- package/dist/esm/sdk/users/index.js +25 -37
- package/dist/esm/sdk/users/index.js.map +1 -1
- package/dist/esm/sdk/users/mfa-methods.d.ts +11 -0
- package/dist/esm/sdk/users/mfa-methods.d.ts.map +1 -0
- package/dist/esm/sdk/users/mfa-methods.js +32 -0
- package/dist/esm/sdk/users/mfa-methods.js.map +1 -0
- package/dist/esm/sdk/users/oauth-accounts.d.ts +6 -0
- package/dist/esm/sdk/users/oauth-accounts.d.ts.map +1 -0
- package/dist/esm/sdk/users/oauth-accounts.js +12 -0
- package/dist/esm/sdk/users/oauth-accounts.js.map +1 -0
- package/dist/esm/sdk/users/recovery-codes.d.ts +8 -0
- package/dist/esm/sdk/users/recovery-codes.d.ts.map +1 -0
- package/dist/esm/sdk/users/recovery-codes.js +20 -0
- package/dist/esm/sdk/users/recovery-codes.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/index.ts +1 -0
- package/src/funcs/oauth2/index.ts +726 -0
- package/src/funcs/settings/index.ts +6 -0
- package/src/funcs/settings/socialProviderUsersDelete.ts +108 -0
- package/src/funcs/settings/socialProviderUsersExchangeAccessCode.ts +112 -0
- package/src/funcs/settings/socialProviderUsersGet.ts +108 -0
- package/src/funcs/settings/socialProviderUsersList.ts +124 -0
- package/src/funcs/settings/socialProviderUsersUpdate.ts +115 -0
- package/src/funcs/settings/socialProvidersCreateLink.ts +115 -0
- package/src/funcs/users/index.ts +4 -0
- package/src/funcs/users/usersDisableMfa.ts +6 -7
- package/src/funcs/users/usersGetMfaMethod.ts +176 -0
- package/src/funcs/users/usersIssueToken.ts +175 -0
- package/src/funcs/users/usersListMfaMethods.ts +3 -19
- package/src/funcs/users/usersListOAuthAccounts.ts +5 -0
- package/src/funcs/users/usersListRecoveryCodes.ts +5 -8
- package/src/funcs/users/usersRegenerateRecoveryCodes.ts +7 -8
- package/src/funcs/users/usersResetPassword.ts +172 -0
- package/src/funcs/users/usersSendMfa.ts +6 -7
- package/src/funcs/users/usersSendPasswordResetLink.ts +172 -0
- package/src/funcs/users/usersValidateMfa.ts +4 -7
- package/src/funcs/users/usersValidateRecoveryCode.ts +6 -7
- package/src/lib/config.ts +1 -1
- package/src/lib/url.ts +32 -0
- package/src/models/identity/index.ts +1 -0
- package/src/models/identity/oauth2.ts +116 -0
- package/src/models/identity/user-mfa-method.ts +8 -0
- package/src/models/identity/user-recovery-code.ts +6 -8
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/oauth2.ts +236 -0
- package/src/models/operations/settings-social-providers.ts +202 -0
- package/src/models/operations/users-mfa.ts +50 -16
- package/src/models/operations/users-oauth-accounts.ts +20 -0
- package/src/models/operations/users-password-reset.ts +71 -0
- package/src/models/operations/users-recovery-codes.ts +39 -10
- package/src/models/operations/users.ts +22 -0
- package/src/models/settings/index.ts +1 -0
- package/src/models/settings/social-provider-link.ts +31 -0
- package/src/models/settings/social-provider-user.ts +6 -4
- package/src/sdk/oauth2.ts +155 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/settings/social-providers.ts +90 -0
- package/src/sdk/users/customers.ts +21 -0
- package/src/sdk/users/index.ts +39 -99
- package/src/sdk/users/mfa-methods.ts +81 -0
- package/src/sdk/users/oauth-accounts.ts +21 -0
- package/src/sdk/users/recovery-codes.ts +45 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Reset user password.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { ClientSDK, RequestOptions } from "../../lib/sdks.js";
|
|
6
|
+
import {
|
|
7
|
+
encodeJSON,
|
|
8
|
+
} from "../../lib/encodings.js";
|
|
9
|
+
import * as M from "../../lib/matchers.js";
|
|
10
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../../lib/security.js";
|
|
12
|
+
import * as errors from "../../models/errors/index.js";
|
|
13
|
+
import { ResponseValidationError } from "../../models/errors/response-validation-error.js";
|
|
14
|
+
import { SDKValidationError } from "../../models/errors/sdk-validation-error.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../../models/errors/http-client-errors.js";
|
|
22
|
+
import * as operations from "../../models/operations/index.js";
|
|
23
|
+
import { ResetPasswordResponse$inboundSchema } from "../../models/operations/users-password-reset.js";
|
|
24
|
+
import { APICall, APIPromise } from "../../types/async.js";
|
|
25
|
+
import { Result } from "../../types/fp.js";
|
|
26
|
+
|
|
27
|
+
export function usersResetPassword(
|
|
28
|
+
client: ClientSDK,
|
|
29
|
+
request: operations.ResetPasswordRequest,
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): APIPromise<
|
|
32
|
+
Result<
|
|
33
|
+
operations.ResetPasswordResponse,
|
|
34
|
+
| errors.ErrorResponse
|
|
35
|
+
| errors.OminityDefaultError
|
|
36
|
+
| ResponseValidationError
|
|
37
|
+
| ConnectionError
|
|
38
|
+
| RequestAbortedError
|
|
39
|
+
| RequestTimeoutError
|
|
40
|
+
| InvalidRequestError
|
|
41
|
+
| UnexpectedClientError
|
|
42
|
+
| SDKValidationError
|
|
43
|
+
>
|
|
44
|
+
> {
|
|
45
|
+
return new APIPromise($do(
|
|
46
|
+
client,
|
|
47
|
+
request,
|
|
48
|
+
options,
|
|
49
|
+
));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async function $do(
|
|
53
|
+
client: ClientSDK,
|
|
54
|
+
request: operations.ResetPasswordRequest,
|
|
55
|
+
options?: RequestOptions,
|
|
56
|
+
): Promise<
|
|
57
|
+
[
|
|
58
|
+
Result<
|
|
59
|
+
operations.ResetPasswordResponse,
|
|
60
|
+
| errors.ErrorResponse
|
|
61
|
+
| errors.OminityDefaultError
|
|
62
|
+
| ResponseValidationError
|
|
63
|
+
| ConnectionError
|
|
64
|
+
| RequestAbortedError
|
|
65
|
+
| RequestTimeoutError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| UnexpectedClientError
|
|
68
|
+
| SDKValidationError
|
|
69
|
+
>,
|
|
70
|
+
APICall,
|
|
71
|
+
]
|
|
72
|
+
> {
|
|
73
|
+
const parsed = safeParse(
|
|
74
|
+
request,
|
|
75
|
+
(value) => operations.ResetPasswordRequest$outboundSchema.parse(value),
|
|
76
|
+
"Input validation failed",
|
|
77
|
+
);
|
|
78
|
+
if (!parsed.ok) {
|
|
79
|
+
return [parsed, { status: "invalid" }];
|
|
80
|
+
}
|
|
81
|
+
const payload = parsed.value;
|
|
82
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
83
|
+
|
|
84
|
+
const path = "/users/password-reset/update";
|
|
85
|
+
|
|
86
|
+
const headers = new Headers({
|
|
87
|
+
"Content-Type": "application/json",
|
|
88
|
+
Accept: "application/json",
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
92
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
93
|
+
|
|
94
|
+
const context = {
|
|
95
|
+
options: client._options,
|
|
96
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
97
|
+
operationID: "users.resetPassword",
|
|
98
|
+
oAuth2Scopes: null,
|
|
99
|
+
resolvedSecurity: requestSecurity,
|
|
100
|
+
securitySource: client._options.security,
|
|
101
|
+
retryConfig: options?.retries
|
|
102
|
+
|| client._options.retryConfig
|
|
103
|
+
|| {
|
|
104
|
+
strategy: "backoff",
|
|
105
|
+
backoff: {
|
|
106
|
+
initialInterval: 500,
|
|
107
|
+
maxInterval: 5000,
|
|
108
|
+
exponent: 2,
|
|
109
|
+
maxElapsedTime: 7500,
|
|
110
|
+
},
|
|
111
|
+
retryConnectionErrors: true,
|
|
112
|
+
}
|
|
113
|
+
|| { strategy: "none" },
|
|
114
|
+
retryCodes: options?.retryCodes || ["5xx"],
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const requestRes = client._createRequest(context, {
|
|
118
|
+
security: requestSecurity,
|
|
119
|
+
method: "POST",
|
|
120
|
+
baseURL: options?.serverURL,
|
|
121
|
+
path,
|
|
122
|
+
headers,
|
|
123
|
+
body,
|
|
124
|
+
userAgent: client._options.userAgent,
|
|
125
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
126
|
+
}, options);
|
|
127
|
+
if (!requestRes.ok) {
|
|
128
|
+
return [requestRes, { status: "invalid" }];
|
|
129
|
+
}
|
|
130
|
+
const req = requestRes.value;
|
|
131
|
+
|
|
132
|
+
const doResult = await client._do(req, {
|
|
133
|
+
context,
|
|
134
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
135
|
+
retryConfig: context.retryConfig,
|
|
136
|
+
retryCodes: context.retryCodes,
|
|
137
|
+
});
|
|
138
|
+
if (!doResult.ok) {
|
|
139
|
+
return [doResult, { status: "request-error", request: req }];
|
|
140
|
+
}
|
|
141
|
+
const response = doResult.value;
|
|
142
|
+
|
|
143
|
+
const responseFields = {
|
|
144
|
+
HttpMeta: { Response: response, Request: req },
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const [result] = await M.match<
|
|
148
|
+
operations.ResetPasswordResponse,
|
|
149
|
+
| errors.ErrorResponse
|
|
150
|
+
| errors.OminityDefaultError
|
|
151
|
+
| ResponseValidationError
|
|
152
|
+
| ConnectionError
|
|
153
|
+
| RequestAbortedError
|
|
154
|
+
| RequestTimeoutError
|
|
155
|
+
| InvalidRequestError
|
|
156
|
+
| UnexpectedClientError
|
|
157
|
+
| SDKValidationError
|
|
158
|
+
>(
|
|
159
|
+
M.json(200, ResetPasswordResponse$inboundSchema, {
|
|
160
|
+
ctype: "application/json",
|
|
161
|
+
}),
|
|
162
|
+
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema, {
|
|
163
|
+
ctype: "application/hal+json",
|
|
164
|
+
}),
|
|
165
|
+
M.fail("5XX"),
|
|
166
|
+
)(response, req, { extraFields: responseFields });
|
|
167
|
+
if (!result.ok) {
|
|
168
|
+
return [result, { status: "complete", request: req, response }];
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return [result, { status: "complete", request: req, response }];
|
|
172
|
+
}
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import * as operations from "../../models/operations/index.js";
|
|
23
23
|
import { SendMfaResponse$inboundSchema } from "../../models/operations/users-mfa.js";
|
|
24
24
|
import { APICall, APIPromise } from "../../types/async.js";
|
|
25
|
-
import {
|
|
25
|
+
import { Result } from "../../types/fp.js";
|
|
26
26
|
|
|
27
27
|
export function usersSendMfa(
|
|
28
28
|
client: ClientSDK,
|
|
@@ -89,7 +89,7 @@ async function $do(
|
|
|
89
89
|
) || "";
|
|
90
90
|
|
|
91
91
|
const headers = new Headers({
|
|
92
|
-
Accept: "
|
|
92
|
+
Accept: "application/json",
|
|
93
93
|
});
|
|
94
94
|
|
|
95
95
|
const securityInput = await extractSecurity(client._options.security);
|
|
@@ -160,7 +160,9 @@ async function $do(
|
|
|
160
160
|
| UnexpectedClientError
|
|
161
161
|
| SDKValidationError
|
|
162
162
|
>(
|
|
163
|
-
M.
|
|
163
|
+
M.json(200, SendMfaResponse$inboundSchema, {
|
|
164
|
+
ctype: "application/json",
|
|
165
|
+
}),
|
|
164
166
|
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema, {
|
|
165
167
|
ctype: "application/hal+json",
|
|
166
168
|
}),
|
|
@@ -170,8 +172,5 @@ async function $do(
|
|
|
170
172
|
return [result, { status: "complete", request: req, response }];
|
|
171
173
|
}
|
|
172
174
|
|
|
173
|
-
return [
|
|
174
|
-
OK(result.value),
|
|
175
|
-
{ status: "complete", request: req, response },
|
|
176
|
-
];
|
|
175
|
+
return [result, { status: "complete", request: req, response }];
|
|
177
176
|
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Send user password reset link.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { ClientSDK, RequestOptions } from "../../lib/sdks.js";
|
|
6
|
+
import {
|
|
7
|
+
encodeJSON,
|
|
8
|
+
} from "../../lib/encodings.js";
|
|
9
|
+
import * as M from "../../lib/matchers.js";
|
|
10
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../../lib/security.js";
|
|
12
|
+
import * as errors from "../../models/errors/index.js";
|
|
13
|
+
import { ResponseValidationError } from "../../models/errors/response-validation-error.js";
|
|
14
|
+
import { SDKValidationError } from "../../models/errors/sdk-validation-error.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../../models/errors/http-client-errors.js";
|
|
22
|
+
import * as operations from "../../models/operations/index.js";
|
|
23
|
+
import { SendPasswordResetLinkResponse$inboundSchema } from "../../models/operations/users-password-reset.js";
|
|
24
|
+
import { APICall, APIPromise } from "../../types/async.js";
|
|
25
|
+
import { Result } from "../../types/fp.js";
|
|
26
|
+
|
|
27
|
+
export function usersSendPasswordResetLink(
|
|
28
|
+
client: ClientSDK,
|
|
29
|
+
request: operations.SendPasswordResetLinkRequest,
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): APIPromise<
|
|
32
|
+
Result<
|
|
33
|
+
operations.SendPasswordResetLinkResponse,
|
|
34
|
+
| errors.ErrorResponse
|
|
35
|
+
| errors.OminityDefaultError
|
|
36
|
+
| ResponseValidationError
|
|
37
|
+
| ConnectionError
|
|
38
|
+
| RequestAbortedError
|
|
39
|
+
| RequestTimeoutError
|
|
40
|
+
| InvalidRequestError
|
|
41
|
+
| UnexpectedClientError
|
|
42
|
+
| SDKValidationError
|
|
43
|
+
>
|
|
44
|
+
> {
|
|
45
|
+
return new APIPromise($do(
|
|
46
|
+
client,
|
|
47
|
+
request,
|
|
48
|
+
options,
|
|
49
|
+
));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async function $do(
|
|
53
|
+
client: ClientSDK,
|
|
54
|
+
request: operations.SendPasswordResetLinkRequest,
|
|
55
|
+
options?: RequestOptions,
|
|
56
|
+
): Promise<
|
|
57
|
+
[
|
|
58
|
+
Result<
|
|
59
|
+
operations.SendPasswordResetLinkResponse,
|
|
60
|
+
| errors.ErrorResponse
|
|
61
|
+
| errors.OminityDefaultError
|
|
62
|
+
| ResponseValidationError
|
|
63
|
+
| ConnectionError
|
|
64
|
+
| RequestAbortedError
|
|
65
|
+
| RequestTimeoutError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| UnexpectedClientError
|
|
68
|
+
| SDKValidationError
|
|
69
|
+
>,
|
|
70
|
+
APICall,
|
|
71
|
+
]
|
|
72
|
+
> {
|
|
73
|
+
const parsed = safeParse(
|
|
74
|
+
request,
|
|
75
|
+
(value) => operations.SendPasswordResetLinkRequest$outboundSchema.parse(value),
|
|
76
|
+
"Input validation failed",
|
|
77
|
+
);
|
|
78
|
+
if (!parsed.ok) {
|
|
79
|
+
return [parsed, { status: "invalid" }];
|
|
80
|
+
}
|
|
81
|
+
const payload = parsed.value;
|
|
82
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
83
|
+
|
|
84
|
+
const path = "/users/password-reset/send";
|
|
85
|
+
|
|
86
|
+
const headers = new Headers({
|
|
87
|
+
"Content-Type": "application/json",
|
|
88
|
+
Accept: "application/json",
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
92
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
93
|
+
|
|
94
|
+
const context = {
|
|
95
|
+
options: client._options,
|
|
96
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
97
|
+
operationID: "users.sendPasswordResetLink",
|
|
98
|
+
oAuth2Scopes: null,
|
|
99
|
+
resolvedSecurity: requestSecurity,
|
|
100
|
+
securitySource: client._options.security,
|
|
101
|
+
retryConfig: options?.retries
|
|
102
|
+
|| client._options.retryConfig
|
|
103
|
+
|| {
|
|
104
|
+
strategy: "backoff",
|
|
105
|
+
backoff: {
|
|
106
|
+
initialInterval: 500,
|
|
107
|
+
maxInterval: 5000,
|
|
108
|
+
exponent: 2,
|
|
109
|
+
maxElapsedTime: 7500,
|
|
110
|
+
},
|
|
111
|
+
retryConnectionErrors: true,
|
|
112
|
+
}
|
|
113
|
+
|| { strategy: "none" },
|
|
114
|
+
retryCodes: options?.retryCodes || ["5xx"],
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const requestRes = client._createRequest(context, {
|
|
118
|
+
security: requestSecurity,
|
|
119
|
+
method: "POST",
|
|
120
|
+
baseURL: options?.serverURL,
|
|
121
|
+
path,
|
|
122
|
+
headers,
|
|
123
|
+
body,
|
|
124
|
+
userAgent: client._options.userAgent,
|
|
125
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
126
|
+
}, options);
|
|
127
|
+
if (!requestRes.ok) {
|
|
128
|
+
return [requestRes, { status: "invalid" }];
|
|
129
|
+
}
|
|
130
|
+
const req = requestRes.value;
|
|
131
|
+
|
|
132
|
+
const doResult = await client._do(req, {
|
|
133
|
+
context,
|
|
134
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
135
|
+
retryConfig: context.retryConfig,
|
|
136
|
+
retryCodes: context.retryCodes,
|
|
137
|
+
});
|
|
138
|
+
if (!doResult.ok) {
|
|
139
|
+
return [doResult, { status: "request-error", request: req }];
|
|
140
|
+
}
|
|
141
|
+
const response = doResult.value;
|
|
142
|
+
|
|
143
|
+
const responseFields = {
|
|
144
|
+
HttpMeta: { Response: response, Request: req },
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const [result] = await M.match<
|
|
148
|
+
operations.SendPasswordResetLinkResponse,
|
|
149
|
+
| errors.ErrorResponse
|
|
150
|
+
| errors.OminityDefaultError
|
|
151
|
+
| ResponseValidationError
|
|
152
|
+
| ConnectionError
|
|
153
|
+
| RequestAbortedError
|
|
154
|
+
| RequestTimeoutError
|
|
155
|
+
| InvalidRequestError
|
|
156
|
+
| UnexpectedClientError
|
|
157
|
+
| SDKValidationError
|
|
158
|
+
>(
|
|
159
|
+
M.json(200, SendPasswordResetLinkResponse$inboundSchema, {
|
|
160
|
+
ctype: "application/json",
|
|
161
|
+
}),
|
|
162
|
+
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema, {
|
|
163
|
+
ctype: "application/hal+json",
|
|
164
|
+
}),
|
|
165
|
+
M.fail("5XX"),
|
|
166
|
+
)(response, req, { extraFields: responseFields });
|
|
167
|
+
if (!result.ok) {
|
|
168
|
+
return [result, { status: "complete", request: req, response }];
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return [result, { status: "complete", request: req, response }];
|
|
172
|
+
}
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
import * as operations from "../../models/operations/index.js";
|
|
24
24
|
import { ValidateMfaResponse$inboundSchema } from "../../models/operations/users-mfa.js";
|
|
25
25
|
import { APICall, APIPromise } from "../../types/async.js";
|
|
26
|
-
import {
|
|
26
|
+
import { Result } from "../../types/fp.js";
|
|
27
27
|
|
|
28
28
|
export function usersValidateMfa(
|
|
29
29
|
client: ClientSDK,
|
|
@@ -91,7 +91,7 @@ async function $do(
|
|
|
91
91
|
|
|
92
92
|
const headers = new Headers({
|
|
93
93
|
"Content-Type": "application/json",
|
|
94
|
-
Accept: "application/
|
|
94
|
+
Accept: "application/json",
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
const securityInput = await extractSecurity(client._options.security);
|
|
@@ -163,7 +163,7 @@ async function $do(
|
|
|
163
163
|
| SDKValidationError
|
|
164
164
|
>(
|
|
165
165
|
M.json(200, ValidateMfaResponse$inboundSchema, {
|
|
166
|
-
ctype: "application/
|
|
166
|
+
ctype: "application/json",
|
|
167
167
|
}),
|
|
168
168
|
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema, {
|
|
169
169
|
ctype: "application/hal+json",
|
|
@@ -174,8 +174,5 @@ async function $do(
|
|
|
174
174
|
return [result, { status: "complete", request: req, response }];
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
return [
|
|
178
|
-
OK(result.value),
|
|
179
|
-
{ status: "complete", request: req, response },
|
|
180
|
-
];
|
|
177
|
+
return [result, { status: "complete", request: req, response }];
|
|
181
178
|
}
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
import * as operations from "../../models/operations/index.js";
|
|
24
24
|
import { ValidateRecoveryCodeResponse$inboundSchema } from "../../models/operations/users-recovery-codes.js";
|
|
25
25
|
import { APICall, APIPromise } from "../../types/async.js";
|
|
26
|
-
import {
|
|
26
|
+
import { Result } from "../../types/fp.js";
|
|
27
27
|
|
|
28
28
|
export function usersValidateRecoveryCode(
|
|
29
29
|
client: ClientSDK,
|
|
@@ -91,7 +91,7 @@ async function $do(
|
|
|
91
91
|
|
|
92
92
|
const headers = new Headers({
|
|
93
93
|
"Content-Type": "application/json",
|
|
94
|
-
Accept: "
|
|
94
|
+
Accept: "application/json",
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
const securityInput = await extractSecurity(client._options.security);
|
|
@@ -162,7 +162,9 @@ async function $do(
|
|
|
162
162
|
| UnexpectedClientError
|
|
163
163
|
| SDKValidationError
|
|
164
164
|
>(
|
|
165
|
-
M.
|
|
165
|
+
M.json(200, ValidateRecoveryCodeResponse$inboundSchema, {
|
|
166
|
+
ctype: "application/json",
|
|
167
|
+
}),
|
|
166
168
|
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema, {
|
|
167
169
|
ctype: "application/hal+json",
|
|
168
170
|
}),
|
|
@@ -172,8 +174,5 @@ async function $do(
|
|
|
172
174
|
return [result, { status: "complete", request: req, response }];
|
|
173
175
|
}
|
|
174
176
|
|
|
175
|
-
return [
|
|
176
|
-
OK(result.value),
|
|
177
|
-
{ status: "complete", request: req, response },
|
|
178
|
-
];
|
|
177
|
+
return [result, { status: "complete", request: req, response }];
|
|
179
178
|
}
|
package/src/lib/config.ts
CHANGED
package/src/lib/url.ts
CHANGED
|
@@ -28,3 +28,35 @@ export function pathToFunc(
|
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Returns a copy of a base URL with the configured API version suffix removed.
|
|
34
|
+
* Useful for endpoints that are mounted outside `/api/{version}`.
|
|
35
|
+
*/
|
|
36
|
+
export function baseURLWithoutAPIVersion(
|
|
37
|
+
baseURL: string | URL | null | undefined,
|
|
38
|
+
apiVersion: string | undefined,
|
|
39
|
+
): URL | undefined {
|
|
40
|
+
if (!baseURL) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const normalizedVersion = apiVersion ?? "v1";
|
|
45
|
+
const url = new URL(baseURL.toString());
|
|
46
|
+
|
|
47
|
+
const pathname = url.pathname.replace(/\/+$/, "");
|
|
48
|
+
const versionSuffix = normalizedVersion ? `/${normalizedVersion}` : "";
|
|
49
|
+
|
|
50
|
+
if (versionSuffix && pathname.endsWith(versionSuffix)) {
|
|
51
|
+
const nextPath = pathname.slice(0, -versionSuffix.length);
|
|
52
|
+
url.pathname = `${nextPath || "/"}`;
|
|
53
|
+
} else {
|
|
54
|
+
url.pathname = `${pathname || "/"}`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (!url.pathname.endsWith("/")) {
|
|
58
|
+
url.pathname = `${url.pathname}/`;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return url;
|
|
62
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* OAuth2 identity models.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
|
|
7
|
+
export type OAuth2IssuedToken = {
|
|
8
|
+
token_type: string;
|
|
9
|
+
expires_in: number;
|
|
10
|
+
access_token: string;
|
|
11
|
+
refresh_token?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const OAuth2IssuedToken$inboundSchema: z.ZodType<OAuth2IssuedToken> = z
|
|
16
|
+
.object({
|
|
17
|
+
token_type: z.string(),
|
|
18
|
+
expires_in: z.number(),
|
|
19
|
+
access_token: z.string(),
|
|
20
|
+
refresh_token: z.string().optional(),
|
|
21
|
+
})
|
|
22
|
+
.loose();
|
|
23
|
+
|
|
24
|
+
export type OAuth2Client = {
|
|
25
|
+
id: string | number;
|
|
26
|
+
user_id?: number | null | undefined;
|
|
27
|
+
name?: string | undefined;
|
|
28
|
+
secret?: string | null | undefined;
|
|
29
|
+
provider?: string | null | undefined;
|
|
30
|
+
redirect?: string | undefined;
|
|
31
|
+
personal_access_client?: boolean | undefined;
|
|
32
|
+
password_client?: boolean | undefined;
|
|
33
|
+
revoked?: boolean | undefined;
|
|
34
|
+
created_at?: string | null | undefined;
|
|
35
|
+
updated_at?: string | null | undefined;
|
|
36
|
+
plainSecret?: string | null | undefined;
|
|
37
|
+
grant_types?: Array<string> | undefined;
|
|
38
|
+
scopes?: Array<string> | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const OAuth2Client$inboundSchema: z.ZodType<OAuth2Client> = z
|
|
43
|
+
.object({
|
|
44
|
+
id: z.union([z.string(), z.number()]),
|
|
45
|
+
user_id: z.number().nullable().optional(),
|
|
46
|
+
name: z.string().optional(),
|
|
47
|
+
secret: z.string().nullable().optional(),
|
|
48
|
+
provider: z.string().nullable().optional(),
|
|
49
|
+
redirect: z.string().optional(),
|
|
50
|
+
personal_access_client: z.boolean().optional(),
|
|
51
|
+
password_client: z.boolean().optional(),
|
|
52
|
+
revoked: z.boolean().optional(),
|
|
53
|
+
created_at: z.string().nullable().optional(),
|
|
54
|
+
updated_at: z.string().nullable().optional(),
|
|
55
|
+
plainSecret: z.string().nullable().optional(),
|
|
56
|
+
grant_types: z.array(z.string()).optional(),
|
|
57
|
+
scopes: z.array(z.string()).optional(),
|
|
58
|
+
})
|
|
59
|
+
.loose();
|
|
60
|
+
|
|
61
|
+
export type OAuth2AuthorizedToken = {
|
|
62
|
+
id: string | number;
|
|
63
|
+
user_id?: number | null | undefined;
|
|
64
|
+
client_id?: string | number | null | undefined;
|
|
65
|
+
name?: string | null | undefined;
|
|
66
|
+
scopes?: Array<string> | undefined;
|
|
67
|
+
revoked?: boolean | undefined;
|
|
68
|
+
created_at?: string | null | undefined;
|
|
69
|
+
updated_at?: string | null | undefined;
|
|
70
|
+
expires_at?: string | null | undefined;
|
|
71
|
+
client?: OAuth2Client | undefined;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const OAuth2AuthorizedToken$inboundSchema: z.ZodType<
|
|
76
|
+
OAuth2AuthorizedToken
|
|
77
|
+
> = z.object({
|
|
78
|
+
id: z.union([z.string(), z.number()]),
|
|
79
|
+
user_id: z.number().nullable().optional(),
|
|
80
|
+
client_id: z.union([z.string(), z.number()]).nullable().optional(),
|
|
81
|
+
name: z.string().nullable().optional(),
|
|
82
|
+
scopes: z.array(z.string()).optional(),
|
|
83
|
+
revoked: z.boolean().optional(),
|
|
84
|
+
created_at: z.string().nullable().optional(),
|
|
85
|
+
updated_at: z.string().nullable().optional(),
|
|
86
|
+
expires_at: z.string().nullable().optional(),
|
|
87
|
+
client: OAuth2Client$inboundSchema.optional(),
|
|
88
|
+
}).loose();
|
|
89
|
+
|
|
90
|
+
export type OAuth2Scope = {
|
|
91
|
+
id: string;
|
|
92
|
+
description: string;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const OAuth2Scope$inboundSchema: z.ZodType<OAuth2Scope> = z.object({
|
|
97
|
+
id: z.string(),
|
|
98
|
+
description: z.string(),
|
|
99
|
+
}).loose();
|
|
100
|
+
|
|
101
|
+
export type OAuth2PersonalAccessTokenResult = {
|
|
102
|
+
accessToken: string;
|
|
103
|
+
token: OAuth2AuthorizedToken;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
export const OAuth2PersonalAccessTokenResult$inboundSchema: z.ZodType<
|
|
108
|
+
OAuth2PersonalAccessTokenResult
|
|
109
|
+
> = z.object({
|
|
110
|
+
accessToken: z.string().optional(),
|
|
111
|
+
access_token: z.string().optional(),
|
|
112
|
+
token: OAuth2AuthorizedToken$inboundSchema,
|
|
113
|
+
}).transform((v) => ({
|
|
114
|
+
accessToken: v.accessToken ?? v.access_token ?? "",
|
|
115
|
+
token: v.token,
|
|
116
|
+
}));
|
|
@@ -14,6 +14,10 @@ export type UserMfaMethod = {
|
|
|
14
14
|
verifiedAt?: string | null;
|
|
15
15
|
lastUsedAt?: string | null;
|
|
16
16
|
lastSentAt?: string | null;
|
|
17
|
+
details?: {
|
|
18
|
+
qrCode?: string | undefined;
|
|
19
|
+
secret?: string | undefined;
|
|
20
|
+
} | undefined;
|
|
17
21
|
links?: HalLinks;
|
|
18
22
|
};
|
|
19
23
|
|
|
@@ -26,6 +30,10 @@ export const UserMfaMethod$inboundSchema: z.ZodType<UserMfaMethod> = z.object({
|
|
|
26
30
|
verifiedAt: z.string().nullable().optional(),
|
|
27
31
|
lastUsedAt: z.string().nullable().optional(),
|
|
28
32
|
lastSentAt: z.string().nullable().optional(),
|
|
33
|
+
details: z.object({
|
|
34
|
+
qrCode: z.string().optional(),
|
|
35
|
+
secret: z.string().optional(),
|
|
36
|
+
}).optional(),
|
|
29
37
|
_links: HalLinks$inboundSchema.optional(),
|
|
30
38
|
}).loose().transform((v) => {
|
|
31
39
|
return remap$(v, {
|
|
@@ -8,24 +8,22 @@ import { HalLinks, HalLinks$inboundSchema } from "../hal.js";
|
|
|
8
8
|
|
|
9
9
|
export type UserRecoveryCode = {
|
|
10
10
|
resource: "user_recovery_code";
|
|
11
|
-
|
|
11
|
+
id: number;
|
|
12
12
|
code: string;
|
|
13
|
-
isUsed: boolean;
|
|
14
13
|
usedAt?: string | null;
|
|
15
|
-
createdAt
|
|
16
|
-
updatedAt
|
|
14
|
+
createdAt?: string | null;
|
|
15
|
+
updatedAt?: string | null;
|
|
17
16
|
links?: HalLinks;
|
|
18
17
|
};
|
|
19
18
|
|
|
20
19
|
/** @internal */
|
|
21
20
|
export const UserRecoveryCode$inboundSchema: z.ZodType<UserRecoveryCode> = z.object({
|
|
22
21
|
resource: z.literal("user_recovery_code"),
|
|
23
|
-
|
|
22
|
+
id: z.number().int(),
|
|
24
23
|
code: z.string(),
|
|
25
|
-
isUsed: z.boolean(),
|
|
26
24
|
usedAt: z.string().nullable().optional(),
|
|
27
|
-
createdAt: z.string(),
|
|
28
|
-
updatedAt: z.string(),
|
|
25
|
+
createdAt: z.string().nullable().optional(),
|
|
26
|
+
updatedAt: z.string().nullable().optional(),
|
|
29
27
|
_links: HalLinks$inboundSchema.optional(),
|
|
30
28
|
}).loose().transform((v) => {
|
|
31
29
|
return remap$(v, {
|
|
@@ -23,12 +23,14 @@ export * from "./localization-languages.js";
|
|
|
23
23
|
export * from "./localization-locales.js";
|
|
24
24
|
export * from "./me.js";
|
|
25
25
|
export * from "./users.js";
|
|
26
|
+
export * from "./users-password-reset.js";
|
|
26
27
|
export * from "./users-logins.js";
|
|
27
28
|
export * from "./admins.js";
|
|
28
29
|
export * from "./users-customers.js";
|
|
29
30
|
export * from "./users-oauth-accounts.js";
|
|
30
31
|
export * from "./users-mfa.js";
|
|
31
32
|
export * from "./users-recovery-codes.js";
|
|
33
|
+
export * from "./oauth2.js";
|
|
32
34
|
export * from "./channels.js";
|
|
33
35
|
export * from "./channel-types.js";
|
|
34
36
|
export * from "./channel-domains.js";
|