clerk-http-client 0.0.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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +87 -0
- data/README.md +360 -0
- data/Rakefile +10 -0
- data/bin/fmt +5 -0
- data/bin/generate +8 -0
- data/bin/setup +7 -0
- data/clerk-http-client.gemspec +41 -0
- data/docs/ActorToken.md +34 -0
- data/docs/ActorTokensApi.md +147 -0
- data/docs/AddDomainRequest.md +22 -0
- data/docs/Admin.md +24 -0
- data/docs/AllowListBlockListApi.md +421 -0
- data/docs/AllowlistIdentifier.md +32 -0
- data/docs/BetaFeaturesApi.md +217 -0
- data/docs/BlocklistIdentifier.md +30 -0
- data/docs/BlocklistIdentifiers.md +20 -0
- data/docs/CNameTarget.md +22 -0
- data/docs/ChangeProductionInstanceDomainRequest.md +20 -0
- data/docs/ClerkError.md +26 -0
- data/docs/ClerkErrors.md +20 -0
- data/docs/Client.md +34 -0
- data/docs/ClientsApi.md +221 -0
- data/docs/CreateActorTokenRequest.md +24 -0
- data/docs/CreateAllowlistIdentifierRequest.md +20 -0
- data/docs/CreateBlocklistIdentifierRequest.md +18 -0
- data/docs/CreateEmailAddressRequest.md +24 -0
- data/docs/CreateInvitationRequest.md +28 -0
- data/docs/CreateJWTTemplateRequest.md +30 -0
- data/docs/CreateOAuthApplicationRequest.md +24 -0
- data/docs/CreateOrganizationDomainRequest.md +22 -0
- data/docs/CreateOrganizationInvitationBulkRequestInner.md +28 -0
- data/docs/CreateOrganizationInvitationRequest.md +28 -0
- data/docs/CreateOrganizationMembershipRequest.md +20 -0
- data/docs/CreateOrganizationRequest.md +30 -0
- data/docs/CreatePhoneNumberRequest.md +26 -0
- data/docs/CreateRedirectURLRequest.md +18 -0
- data/docs/CreateSAMLConnectionRequest.md +34 -0
- data/docs/CreateSAMLConnectionRequestAttributeMapping.md +24 -0
- data/docs/CreateSessionTokenFromTemplate200Response.md +20 -0
- data/docs/CreateSignInTokenRequest.md +20 -0
- data/docs/CreateUserRequest.md +62 -0
- data/docs/DeletedObject.md +24 -0
- data/docs/DisableMFA200Response.md +18 -0
- data/docs/Domain.md +34 -0
- data/docs/Domains.md +20 -0
- data/docs/DomainsApi.md +286 -0
- data/docs/EmailAddress.md +32 -0
- data/docs/EmailAddressVerification.md +51 -0
- data/docs/EmailAddressesApi.md +289 -0
- data/docs/EmailSMSTemplatesApi.md +449 -0
- data/docs/GetOAuthAccessToken200ResponseInner.md +34 -0
- data/docs/IdentificationLink.md +20 -0
- data/docs/InstanceRestrictions.md +26 -0
- data/docs/InstanceSettingsApi.md +216 -0
- data/docs/Invitation.md +36 -0
- data/docs/InvitationsApi.md +223 -0
- data/docs/JWKSApi.md +74 -0
- data/docs/JWTTemplate.md +36 -0
- data/docs/JWTTemplatesApi.md +354 -0
- data/docs/MergeOrganizationMetadataRequest.md +20 -0
- data/docs/MiscellaneousApi.md +75 -0
- data/docs/OAuthApplication.md +42 -0
- data/docs/OAuthApplicationWithSecret.md +44 -0
- data/docs/OAuthApplications.md +20 -0
- data/docs/OAuthApplicationsApi.md +433 -0
- data/docs/OTP.md +24 -0
- data/docs/Oauth.md +28 -0
- data/docs/OauthError.md +47 -0
- data/docs/Organization.md +40 -0
- data/docs/OrganizationDomain.md +38 -0
- data/docs/OrganizationDomainApi.md +81 -0
- data/docs/OrganizationDomainVerification.md +24 -0
- data/docs/OrganizationDomains.md +20 -0
- data/docs/OrganizationDomainsApi.md +231 -0
- data/docs/OrganizationInvitation.md +38 -0
- data/docs/OrganizationInvitationWithPublicOrganizationData.md +40 -0
- data/docs/OrganizationInvitationWithPublicOrganizationDataPublicOrganizationData.md +26 -0
- data/docs/OrganizationInvitations.md +20 -0
- data/docs/OrganizationInvitationsApi.md +533 -0
- data/docs/OrganizationInvitationsWithPublicOrganizationData.md +20 -0
- data/docs/OrganizationMembership.md +38 -0
- data/docs/OrganizationMembershipPublicUserData.md +30 -0
- data/docs/OrganizationMemberships.md +20 -0
- data/docs/OrganizationMembershipsApi.md +453 -0
- data/docs/OrganizationSettings.md +36 -0
- data/docs/OrganizationWithLogo.md +46 -0
- data/docs/Organizations.md +20 -0
- data/docs/OrganizationsApi.md +591 -0
- data/docs/Passkey.md +26 -0
- data/docs/PhoneNumber.md +38 -0
- data/docs/PhoneNumberVerification.md +49 -0
- data/docs/PhoneNumbersApi.md +289 -0
- data/docs/PreviewTemplateRequest.md +24 -0
- data/docs/ProxyCheck.md +32 -0
- data/docs/ProxyChecksApi.md +77 -0
- data/docs/RedirectURL.md +26 -0
- data/docs/RedirectURLsApi.md +284 -0
- data/docs/RevokeInvitation200Response.md +36 -0
- data/docs/RevokeOrganizationInvitationRequest.md +18 -0
- data/docs/SAML.md +28 -0
- data/docs/SAMLAccount.md +38 -0
- data/docs/SAMLAccountSamlConnection.md +47 -0
- data/docs/SAMLAccountVerification.md +49 -0
- data/docs/SAMLConnection.md +38 -0
- data/docs/SAMLConnections.md +20 -0
- data/docs/SAMLConnectionsApi.md +363 -0
- data/docs/SchemasPasskey.md +26 -0
- data/docs/SchemasPasskeyVerification.md +47 -0
- data/docs/SchemasSAMLConnection.md +60 -0
- data/docs/SchemasSAMLConnectionAttributeMapping.md +24 -0
- data/docs/Session.md +42 -0
- data/docs/SessionLatestActivity.md +34 -0
- data/docs/SessionsApi.md +373 -0
- data/docs/SignInToken.md +32 -0
- data/docs/SignInTokensApi.md +147 -0
- data/docs/SignUp.md +62 -0
- data/docs/SignUpsApi.md +79 -0
- data/docs/SvixURL.md +18 -0
- data/docs/TOTP.md +28 -0
- data/docs/Template.md +60 -0
- data/docs/TestingToken.md +22 -0
- data/docs/TestingTokensApi.md +74 -0
- data/docs/Ticket.md +24 -0
- data/docs/ToggleTemplateDeliveryRequest.md +18 -0
- data/docs/TotalCount.md +20 -0
- data/docs/UpdateDomainRequest.md +22 -0
- data/docs/UpdateEmailAddressRequest.md +20 -0
- data/docs/UpdateInstanceAuthConfig200Response.md +28 -0
- data/docs/UpdateInstanceAuthConfigRequest.md +28 -0
- data/docs/UpdateInstanceOrganizationSettingsRequest.md +30 -0
- data/docs/UpdateInstanceRequest.md +34 -0
- data/docs/UpdateInstanceRestrictionsRequest.md +26 -0
- data/docs/UpdateOAuthApplicationRequest.md +22 -0
- data/docs/UpdateOrganizationDomainRequest.md +20 -0
- data/docs/UpdateOrganizationMembershipMetadataRequest.md +20 -0
- data/docs/UpdateOrganizationMembershipRequest.md +18 -0
- data/docs/UpdateOrganizationRequest.md +30 -0
- data/docs/UpdatePhoneNumberRequest.md +22 -0
- data/docs/UpdateProductionInstanceDomainRequest.md +18 -0
- data/docs/UpdateSAMLConnectionRequest.md +42 -0
- data/docs/UpdateSAMLConnectionRequestAttributeMapping.md +24 -0
- data/docs/UpdateSignUpRequest.md +18 -0
- data/docs/UpdateUserMetadataRequest.md +22 -0
- data/docs/UpdateUserRequest.md +66 -0
- data/docs/UpsertTemplateRequest.md +30 -0
- data/docs/User.md +94 -0
- data/docs/UsersApi.md +1829 -0
- data/docs/VerifyClientRequest.md +18 -0
- data/docs/VerifyDomainProxyRequest.md +20 -0
- data/docs/VerifyPassword200Response.md +18 -0
- data/docs/VerifyPasswordRequest.md +18 -0
- data/docs/VerifySessionRequest.md +18 -0
- data/docs/VerifyTOTP200Response.md +20 -0
- data/docs/VerifyTOTPRequest.md +18 -0
- data/docs/Web3Signature.md +28 -0
- data/docs/Web3Wallet.md +28 -0
- data/docs/Web3WalletVerification.md +49 -0
- data/docs/WebhooksApi.md +207 -0
- data/docs/WellKnownJWKS.md +18 -0
- data/docs/WellKnownJWKSKeysInner.md +28 -0
- data/git_push.sh +57 -0
- data/lib/clerk-http-client/api/actor_tokens_api.rb +157 -0
- data/lib/clerk-http-client/api/allow_list_block_list_api.rb +410 -0
- data/lib/clerk-http-client/api/beta_features_api.rb +228 -0
- data/lib/clerk-http-client/api/clients_api.rb +234 -0
- data/lib/clerk-http-client/api/domains_api.rb +292 -0
- data/lib/clerk-http-client/api/email_addresses_api.rb +298 -0
- data/lib/clerk-http-client/api/email_sms_templates_api.rb +488 -0
- data/lib/clerk-http-client/api/instance_settings_api.rb +232 -0
- data/lib/clerk-http-client/api/invitations_api.rb +241 -0
- data/lib/clerk-http-client/api/jwks_api.rb +81 -0
- data/lib/clerk-http-client/api/jwt_templates_api.rb +355 -0
- data/lib/clerk-http-client/api/miscellaneous_api.rb +85 -0
- data/lib/clerk-http-client/api/o_auth_applications_api.rb +440 -0
- data/lib/clerk-http-client/api/organization_domain_api.rb +104 -0
- data/lib/clerk-http-client/api/organization_domains_api.rb +258 -0
- data/lib/clerk-http-client/api/organization_invitations_api.rb +586 -0
- data/lib/clerk-http-client/api/organization_memberships_api.rb +499 -0
- data/lib/clerk-http-client/api/organizations_api.rb +606 -0
- data/lib/clerk-http-client/api/phone_numbers_api.rb +298 -0
- data/lib/clerk-http-client/api/proxy_checks_api.rb +92 -0
- data/lib/clerk-http-client/api/redirect_urls_api.rb +281 -0
- data/lib/clerk-http-client/api/saml_connections_api.rb +375 -0
- data/lib/clerk-http-client/api/sessions_api.rb +385 -0
- data/lib/clerk-http-client/api/sign_in_tokens_api.rb +157 -0
- data/lib/clerk-http-client/api/sign_ups_api.rb +98 -0
- data/lib/clerk-http-client/api/testing_tokens_api.rb +81 -0
- data/lib/clerk-http-client/api/users_api.rb +1828 -0
- data/lib/clerk-http-client/api/webhooks_api.rb +199 -0
- data/lib/clerk-http-client/api_client.rb +437 -0
- data/lib/clerk-http-client/api_error.rb +58 -0
- data/lib/clerk-http-client/configuration.rb +393 -0
- data/lib/clerk-http-client/models/actor_token.rb +385 -0
- data/lib/clerk-http-client/models/add_domain_request.rb +249 -0
- data/lib/clerk-http-client/models/admin.rb +303 -0
- data/lib/clerk-http-client/models/allowlist_identifier.rb +327 -0
- data/lib/clerk-http-client/models/blocklist_identifier.rb +318 -0
- data/lib/clerk-http-client/models/blocklist_identifiers.rb +240 -0
- data/lib/clerk-http-client/models/c_name_target.rb +254 -0
- data/lib/clerk-http-client/models/change_production_instance_domain_request.rb +225 -0
- data/lib/clerk-http-client/models/clerk_error.rb +271 -0
- data/lib/clerk-http-client/models/clerk_errors.rb +232 -0
- data/lib/clerk-http-client/models/client.rb +380 -0
- data/lib/clerk-http-client/models/create_actor_token_request.rb +263 -0
- data/lib/clerk-http-client/models/create_allowlist_identifier_request.rb +234 -0
- data/lib/clerk-http-client/models/create_blocklist_identifier_request.rb +222 -0
- data/lib/clerk-http-client/models/create_email_address_request.rb +247 -0
- data/lib/clerk-http-client/models/create_invitation_request.rb +303 -0
- data/lib/clerk-http-client/models/create_jwt_template_request.rb +327 -0
- data/lib/clerk-http-client/models/create_o_auth_application_request.rb +261 -0
- data/lib/clerk-http-client/models/create_organization_domain_request.rb +236 -0
- data/lib/clerk-http-client/models/create_organization_invitation_bulk_request_inner.rb +280 -0
- data/lib/clerk-http-client/models/create_organization_invitation_request.rb +280 -0
- data/lib/clerk-http-client/models/create_organization_membership_request.rb +239 -0
- data/lib/clerk-http-client/models/create_organization_request.rb +289 -0
- data/lib/clerk-http-client/models/create_phone_number_request.rb +258 -0
- data/lib/clerk-http-client/models/create_redirect_url_request.rb +215 -0
- data/lib/clerk-http-client/models/create_saml_connection_request.rb +355 -0
- data/lib/clerk-http-client/models/create_saml_connection_request_attribute_mapping.rb +242 -0
- data/lib/clerk-http-client/models/create_session_token_from_template200_response.rb +257 -0
- data/lib/clerk-http-client/models/create_sign_in_token_request.rb +227 -0
- data/lib/clerk-http-client/models/create_user_request.rb +453 -0
- data/lib/clerk-http-client/models/deleted_object.rb +255 -0
- data/lib/clerk-http-client/models/disable_mfa200_response.rb +214 -0
- data/lib/clerk-http-client/models/domain.rb +368 -0
- data/lib/clerk-http-client/models/domains.rb +240 -0
- data/lib/clerk-http-client/models/email_address.rb +361 -0
- data/lib/clerk-http-client/models/email_address_verification.rb +106 -0
- data/lib/clerk-http-client/models/get_o_auth_access_token200_response_inner.rb +295 -0
- data/lib/clerk-http-client/models/identification_link.rb +271 -0
- data/lib/clerk-http-client/models/instance_restrictions.rb +285 -0
- data/lib/clerk-http-client/models/invitation.rb +388 -0
- data/lib/clerk-http-client/models/jwt_template.rb +387 -0
- data/lib/clerk-http-client/models/merge_organization_metadata_request.rb +225 -0
- data/lib/clerk-http-client/models/o_auth_application.rb +449 -0
- data/lib/clerk-http-client/models/o_auth_application_with_secret.rb +466 -0
- data/lib/clerk-http-client/models/o_auth_applications.rb +240 -0
- data/lib/clerk-http-client/models/oauth.rb +328 -0
- data/lib/clerk-http-client/models/oauth_error.rb +104 -0
- data/lib/clerk-http-client/models/organization.rb +413 -0
- data/lib/clerk-http-client/models/organization_domain.rb +364 -0
- data/lib/clerk-http-client/models/organization_domain_verification.rb +281 -0
- data/lib/clerk-http-client/models/organization_domains.rb +240 -0
- data/lib/clerk-http-client/models/organization_invitation.rb +342 -0
- data/lib/clerk-http-client/models/organization_invitation_with_public_organization_data.rb +351 -0
- data/lib/clerk-http-client/models/organization_invitation_with_public_organization_data_public_organization_data.rb +250 -0
- data/lib/clerk-http-client/models/organization_invitations.rb +240 -0
- data/lib/clerk-http-client/models/organization_invitations_with_public_organization_data.rb +240 -0
- data/lib/clerk-http-client/models/organization_membership.rb +346 -0
- data/lib/clerk-http-client/models/organization_membership_public_user_data.rb +272 -0
- data/lib/clerk-http-client/models/organization_memberships.rb +240 -0
- data/lib/clerk-http-client/models/organization_settings.rb +391 -0
- data/lib/clerk-http-client/models/organization_with_logo.rb +454 -0
- data/lib/clerk-http-client/models/organizations.rb +240 -0
- data/lib/clerk-http-client/models/otp.rb +315 -0
- data/lib/clerk-http-client/models/passkey.rb +324 -0
- data/lib/clerk-http-client/models/phone_number.rb +391 -0
- data/lib/clerk-http-client/models/phone_number_verification.rb +105 -0
- data/lib/clerk-http-client/models/preview_template_request.rb +246 -0
- data/lib/clerk-http-client/models/proxy_check.rb +367 -0
- data/lib/clerk-http-client/models/redirect_url.rb +321 -0
- data/lib/clerk-http-client/models/revoke_invitation200_response.rb +395 -0
- data/lib/clerk-http-client/models/revoke_organization_invitation_request.rb +216 -0
- data/lib/clerk-http-client/models/saml.rb +331 -0
- data/lib/clerk-http-client/models/saml_account.rb +381 -0
- data/lib/clerk-http-client/models/saml_account_saml_connection.rb +104 -0
- data/lib/clerk-http-client/models/saml_account_verification.rb +105 -0
- data/lib/clerk-http-client/models/saml_connection.rb +362 -0
- data/lib/clerk-http-client/models/saml_connections.rb +240 -0
- data/lib/clerk-http-client/models/schemas_passkey.rb +310 -0
- data/lib/clerk-http-client/models/schemas_passkey_verification.rb +104 -0
- data/lib/clerk-http-client/models/schemas_saml_connection.rb +541 -0
- data/lib/clerk-http-client/models/schemas_saml_connection_attribute_mapping.rb +241 -0
- data/lib/clerk-http-client/models/session.rb +444 -0
- data/lib/clerk-http-client/models/session_latest_activity.rb +300 -0
- data/lib/clerk-http-client/models/sign_in_token.rb +368 -0
- data/lib/clerk-http-client/models/sign_up.rb +517 -0
- data/lib/clerk-http-client/models/svix_url.rb +221 -0
- data/lib/clerk-http-client/models/template.rb +460 -0
- data/lib/clerk-http-client/models/testing_token.rb +289 -0
- data/lib/clerk-http-client/models/ticket.rb +303 -0
- data/lib/clerk-http-client/models/toggle_template_delivery_request.rb +216 -0
- data/lib/clerk-http-client/models/total_count.rb +272 -0
- data/lib/clerk-http-client/models/totp.rb +289 -0
- data/lib/clerk-http-client/models/update_domain_request.rb +238 -0
- data/lib/clerk-http-client/models/update_email_address_request.rb +227 -0
- data/lib/clerk-http-client/models/update_instance_auth_config200_response.rb +294 -0
- data/lib/clerk-http-client/models/update_instance_auth_config_request.rb +273 -0
- data/lib/clerk-http-client/models/update_instance_organization_settings_request.rb +277 -0
- data/lib/clerk-http-client/models/update_instance_request.rb +300 -0
- data/lib/clerk-http-client/models/update_instance_restrictions_request.rb +255 -0
- data/lib/clerk-http-client/models/update_o_auth_application_request.rb +237 -0
- data/lib/clerk-http-client/models/update_organization_domain_request.rb +227 -0
- data/lib/clerk-http-client/models/update_organization_membership_metadata_request.rb +225 -0
- data/lib/clerk-http-client/models/update_organization_membership_request.rb +222 -0
- data/lib/clerk-http-client/models/update_organization_request.rb +279 -0
- data/lib/clerk-http-client/models/update_phone_number_request.rb +238 -0
- data/lib/clerk-http-client/models/update_production_instance_domain_request.rb +215 -0
- data/lib/clerk-http-client/models/update_saml_connection_request.rb +347 -0
- data/lib/clerk-http-client/models/update_saml_connection_request_attribute_mapping.rb +242 -0
- data/lib/clerk-http-client/models/update_sign_up_request.rb +216 -0
- data/lib/clerk-http-client/models/update_user_metadata_request.rb +241 -0
- data/lib/clerk-http-client/models/update_user_request.rb +472 -0
- data/lib/clerk-http-client/models/upsert_template_request.rb +278 -0
- data/lib/clerk-http-client/models/user.rb +633 -0
- data/lib/clerk-http-client/models/verify_client_request.rb +215 -0
- data/lib/clerk-http-client/models/verify_domain_proxy_request.rb +225 -0
- data/lib/clerk-http-client/models/verify_password200_response.rb +214 -0
- data/lib/clerk-http-client/models/verify_password_request.rb +222 -0
- data/lib/clerk-http-client/models/verify_session_request.rb +215 -0
- data/lib/clerk-http-client/models/verify_totp200_response.rb +257 -0
- data/lib/clerk-http-client/models/verify_totp_request.rb +222 -0
- data/lib/clerk-http-client/models/web3_signature.rb +323 -0
- data/lib/clerk-http-client/models/web3_wallet.rb +327 -0
- data/lib/clerk-http-client/models/web3_wallet_verification.rb +105 -0
- data/lib/clerk-http-client/models/well_known_jwks.rb +216 -0
- data/lib/clerk-http-client/models/well_known_jwks_keys_inner.rb +259 -0
- data/lib/clerk-http-client/version.rb +15 -0
- data/lib/clerk-http-client.rb +321 -0
- data/openapitools.json +7 -0
- data/pkg/clerk-http-client-1.0.0.gem +0 -0
- data/resources/.DS_Store +0 -0
- data/resources/oas/bapi-2024-10-01.yml +7238 -0
- data/resources/templates/Gemfile.mustache +9 -0
- data/resources/templates/README.mustache +163 -0
- data/resources/templates/Rakefile.mustache +10 -0
- data/resources/templates/api.mustache +257 -0
- data/resources/templates/api_client.mustache +246 -0
- data/resources/templates/api_client_faraday_partial.mustache +200 -0
- data/resources/templates/api_client_httpx_partial.mustache +134 -0
- data/resources/templates/api_client_typhoeus_partial.mustache +161 -0
- data/resources/templates/api_doc.mustache +132 -0
- data/resources/templates/api_error.mustache +50 -0
- data/resources/templates/api_info.mustache +12 -0
- data/resources/templates/api_test.mustache +47 -0
- data/resources/templates/base_object.mustache +114 -0
- data/resources/templates/configuration.mustache +491 -0
- data/resources/templates/configuration_faraday_partial.mustache +40 -0
- data/resources/templates/configuration_httpx_partial.mustache +11 -0
- data/resources/templates/configuration_typhoeus_partial.mustache +41 -0
- data/resources/templates/gem.mustache +89 -0
- data/resources/templates/gemspec.mustache +41 -0
- data/resources/templates/git_push.sh.mustache +57 -0
- data/resources/templates/gitignore.mustache +39 -0
- data/resources/templates/gitlab-ci.mustache +26 -0
- data/resources/templates/model.mustache +33 -0
- data/resources/templates/model_doc.mustache +12 -0
- data/resources/templates/model_test.mustache +82 -0
- data/resources/templates/partial_anyof_module.mustache +94 -0
- data/resources/templates/partial_model_enum_class.mustache +23 -0
- data/resources/templates/partial_model_generic.mustache +377 -0
- data/resources/templates/partial_model_generic_doc.mustache +28 -0
- data/resources/templates/partial_oneof_module.mustache +137 -0
- data/resources/templates/partial_oneof_module_doc.mustache +93 -0
- data/resources/templates/rspec.mustache +2 -0
- data/resources/templates/rubocop.mustache +148 -0
- data/resources/templates/spec_helper.mustache +103 -0
- data/resources/templates/travis.mustache +11 -0
- data/resources/templates/version.mustache +7 -0
- data/sdk-generator-config.json +20 -0
- data/spec/api/actor_tokens_api_spec.rb +59 -0
- data/spec/api/allow_list_block_list_api_spec.rb +105 -0
- data/spec/api/beta_features_api_spec.rb +71 -0
- data/spec/api/clients_api_spec.rb +72 -0
- data/spec/api/domains_api_spec.rb +83 -0
- data/spec/api/email_addresses_api_spec.rb +84 -0
- data/spec/api/email_sms_templates_api_spec.rb +115 -0
- data/spec/api/instance_settings_api_spec.rb +71 -0
- data/spec/api/invitations_api_spec.rb +73 -0
- data/spec/api/jwks_api_spec.rb +46 -0
- data/spec/api/jwt_templates_api_spec.rb +94 -0
- data/spec/api/miscellaneous_api_spec.rb +48 -0
- data/spec/api/o_auth_applications_api_spec.rb +109 -0
- data/spec/api/organization_domain_api_spec.rb +49 -0
- data/spec/api/organization_domains_api_spec.rb +77 -0
- data/spec/api/organization_invitations_api_spec.rb +133 -0
- data/spec/api/organization_memberships_api_spec.rb +118 -0
- data/spec/api/organizations_api_spec.rb +139 -0
- data/spec/api/phone_numbers_api_spec.rb +84 -0
- data/spec/api/proxy_checks_api_spec.rb +47 -0
- data/spec/api/redirect_urls_api_spec.rb +82 -0
- data/spec/api/saml_connections_api_spec.rb +97 -0
- data/spec/api/sessions_api_spec.rb +101 -0
- data/spec/api/sign_in_tokens_api_spec.rb +59 -0
- data/spec/api/sign_ups_api_spec.rb +48 -0
- data/spec/api/testing_tokens_api_spec.rb +46 -0
- data/spec/api/users_api_spec.rb +366 -0
- data/spec/api/webhooks_api_spec.rb +68 -0
- data/spec/models/actor_token_spec.rb +92 -0
- data/spec/models/add_domain_request_spec.rb +48 -0
- data/spec/models/admin_spec.rb +62 -0
- data/spec/models/allowlist_identifier_spec.rb +86 -0
- data/spec/models/blocklist_identifier_spec.rb +80 -0
- data/spec/models/blocklist_identifiers_spec.rb +42 -0
- data/spec/models/c_name_target_spec.rb +48 -0
- data/spec/models/change_production_instance_domain_request_spec.rb +42 -0
- data/spec/models/clerk_error_spec.rb +60 -0
- data/spec/models/clerk_errors_spec.rb +42 -0
- data/spec/models/client_spec.rb +88 -0
- data/spec/models/create_actor_token_request_spec.rb +54 -0
- data/spec/models/create_allowlist_identifier_request_spec.rb +42 -0
- data/spec/models/create_blocklist_identifier_request_spec.rb +36 -0
- data/spec/models/create_email_address_request_spec.rb +54 -0
- data/spec/models/create_invitation_request_spec.rb +66 -0
- data/spec/models/create_jwt_template_request_spec.rb +72 -0
- data/spec/models/create_o_auth_application_request_spec.rb +54 -0
- data/spec/models/create_organization_domain_request_spec.rb +48 -0
- data/spec/models/create_organization_invitation_bulk_request_inner_spec.rb +66 -0
- data/spec/models/create_organization_invitation_request_spec.rb +66 -0
- data/spec/models/create_organization_membership_request_spec.rb +42 -0
- data/spec/models/create_organization_request_spec.rb +72 -0
- data/spec/models/create_phone_number_request_spec.rb +60 -0
- data/spec/models/create_redirect_url_request_spec.rb +36 -0
- data/spec/models/create_saml_connection_request_attribute_mapping_spec.rb +54 -0
- data/spec/models/create_saml_connection_request_spec.rb +88 -0
- data/spec/models/create_session_token_from_template200_response_spec.rb +46 -0
- data/spec/models/create_sign_in_token_request_spec.rb +42 -0
- data/spec/models/create_user_request_spec.rb +168 -0
- data/spec/models/deleted_object_spec.rb +54 -0
- data/spec/models/disable_mfa200_response_spec.rb +36 -0
- data/spec/models/domain_spec.rb +88 -0
- data/spec/models/domains_spec.rb +42 -0
- data/spec/models/email_address_spec.rb +82 -0
- data/spec/models/email_address_verification_spec.rb +32 -0
- data/spec/models/get_o_auth_access_token200_response_inner_spec.rb +84 -0
- data/spec/models/identification_link_spec.rb +46 -0
- data/spec/models/instance_restrictions_spec.rb +64 -0
- data/spec/models/invitation_spec.rb +98 -0
- data/spec/models/jwt_template_spec.rb +94 -0
- data/spec/models/merge_organization_metadata_request_spec.rb +42 -0
- data/spec/models/o_auth_application_spec.rb +112 -0
- data/spec/models/o_auth_application_with_secret_spec.rb +118 -0
- data/spec/models/o_auth_applications_spec.rb +42 -0
- data/spec/models/oauth_error_spec.rb +32 -0
- data/spec/models/oauth_spec.rb +74 -0
- data/spec/models/organization_domain_spec.rb +104 -0
- data/spec/models/organization_domain_verification_spec.rb +58 -0
- data/spec/models/organization_domains_spec.rb +42 -0
- data/spec/models/organization_invitation_spec.rb +100 -0
- data/spec/models/organization_invitation_with_public_organization_data_public_organization_data_spec.rb +60 -0
- data/spec/models/organization_invitation_with_public_organization_data_spec.rb +106 -0
- data/spec/models/organization_invitations_spec.rb +42 -0
- data/spec/models/organization_invitations_with_public_organization_data_spec.rb +42 -0
- data/spec/models/organization_membership_public_user_data_spec.rb +72 -0
- data/spec/models/organization_membership_spec.rb +100 -0
- data/spec/models/organization_memberships_spec.rb +42 -0
- data/spec/models/organization_settings_spec.rb +98 -0
- data/spec/models/organization_spec.rb +106 -0
- data/spec/models/organization_with_logo_spec.rb +124 -0
- data/spec/models/organizations_spec.rb +42 -0
- data/spec/models/otp_spec.rb +62 -0
- data/spec/models/passkey_spec.rb +72 -0
- data/spec/models/phone_number_spec.rb +100 -0
- data/spec/models/phone_number_verification_spec.rb +32 -0
- data/spec/models/preview_template_request_spec.rb +54 -0
- data/spec/models/proxy_check_spec.rb +82 -0
- data/spec/models/redirect_url_spec.rb +64 -0
- data/spec/models/revoke_invitation200_response_spec.rb +98 -0
- data/spec/models/revoke_organization_invitation_request_spec.rb +36 -0
- data/spec/models/saml_account_saml_connection_spec.rb +32 -0
- data/spec/models/saml_account_spec.rb +100 -0
- data/spec/models/saml_account_verification_spec.rb +32 -0
- data/spec/models/saml_connection_spec.rb +96 -0
- data/spec/models/saml_connections_spec.rb +42 -0
- data/spec/models/saml_spec.rb +74 -0
- data/spec/models/schemas_passkey_spec.rb +64 -0
- data/spec/models/schemas_passkey_verification_spec.rb +32 -0
- data/spec/models/schemas_saml_connection_attribute_mapping_spec.rb +54 -0
- data/spec/models/schemas_saml_connection_spec.rb +166 -0
- data/spec/models/session_latest_activity_spec.rb +84 -0
- data/spec/models/session_spec.rb +116 -0
- data/spec/models/sign_in_token_spec.rb +86 -0
- data/spec/models/sign_up_spec.rb +176 -0
- data/spec/models/svix_url_spec.rb +36 -0
- data/spec/models/template_spec.rb +166 -0
- data/spec/models/testing_token_spec.rb +52 -0
- data/spec/models/ticket_spec.rb +62 -0
- data/spec/models/toggle_template_delivery_request_spec.rb +36 -0
- data/spec/models/total_count_spec.rb +46 -0
- data/spec/models/totp_spec.rb +66 -0
- data/spec/models/update_domain_request_spec.rb +48 -0
- data/spec/models/update_email_address_request_spec.rb +42 -0
- data/spec/models/update_instance_auth_config200_response_spec.rb +70 -0
- data/spec/models/update_instance_auth_config_request_spec.rb +66 -0
- data/spec/models/update_instance_organization_settings_request_spec.rb +72 -0
- data/spec/models/update_instance_request_spec.rb +84 -0
- data/spec/models/update_instance_restrictions_request_spec.rb +60 -0
- data/spec/models/update_o_auth_application_request_spec.rb +48 -0
- data/spec/models/update_organization_domain_request_spec.rb +42 -0
- data/spec/models/update_organization_membership_metadata_request_spec.rb +42 -0
- data/spec/models/update_organization_membership_request_spec.rb +36 -0
- data/spec/models/update_organization_request_spec.rb +72 -0
- data/spec/models/update_phone_number_request_spec.rb +48 -0
- data/spec/models/update_production_instance_domain_request_spec.rb +36 -0
- data/spec/models/update_saml_connection_request_attribute_mapping_spec.rb +54 -0
- data/spec/models/update_saml_connection_request_spec.rb +108 -0
- data/spec/models/update_sign_up_request_spec.rb +36 -0
- data/spec/models/update_user_metadata_request_spec.rb +48 -0
- data/spec/models/update_user_request_spec.rb +180 -0
- data/spec/models/upsert_template_request_spec.rb +72 -0
- data/spec/models/user_spec.rb +268 -0
- data/spec/models/verify_client_request_spec.rb +36 -0
- data/spec/models/verify_domain_proxy_request_spec.rb +42 -0
- data/spec/models/verify_password200_response_spec.rb +36 -0
- data/spec/models/verify_password_request_spec.rb +36 -0
- data/spec/models/verify_session_request_spec.rb +36 -0
- data/spec/models/verify_totp200_response_spec.rb +46 -0
- data/spec/models/verify_totp_request_spec.rb +36 -0
- data/spec/models/web3_signature_spec.rb +74 -0
- data/spec/models/web3_wallet_spec.rb +70 -0
- data/spec/models/web3_wallet_verification_spec.rb +32 -0
- data/spec/models/well_known_jwks_keys_inner_spec.rb +66 -0
- data/spec/models/well_known_jwks_spec.rb +36 -0
- data/spec/spec_helper.rb +111 -0
- data/test.rb +2 -0
- metadata +782 -0
@@ -0,0 +1,1828 @@
|
|
1
|
+
=begin
|
2
|
+
#Clerk Backend API
|
3
|
+
|
4
|
+
#The Clerk REST Backend API, meant to be accessed by backend servers. ### Versions When the API changes in a way that isn't compatible with older versions, a new version is released. Each version is identified by its release date, e.g. `2021-02-05`. For more information, please see [Clerk API Versions](https://clerk.com/docs/backend-requests/versioning/overview). Please see https://clerk.com/docs for more information.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
Contact: support@clerk.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module ClerkHttpClient
|
16
|
+
class UsersApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Ban a user
|
23
|
+
# Marks the given user as banned, which means that all their sessions are revoked and they are not allowed to sign in again.
|
24
|
+
# @param user_id [String] The ID of the user to ban
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [User]
|
27
|
+
|
28
|
+
def ban(user_id, opts = {})
|
29
|
+
data, _status_code, _headers = ban_with_http_info(user_id, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Ban a user
|
34
|
+
# Marks the given user as banned, which means that all their sessions are revoked and they are not allowed to sign in again.
|
35
|
+
# @param user_id [String] The ID of the user to ban
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
38
|
+
# POST
|
39
|
+
def ban_with_http_info(user_id, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.ban_user ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'user_id' is set
|
44
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.ban_user"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/users/{user_id}/ban'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
49
|
+
|
50
|
+
# query parameters
|
51
|
+
query_params = opts[:query_params] || {}
|
52
|
+
|
53
|
+
# header parameters
|
54
|
+
header_params = opts[:header_params] || {}
|
55
|
+
# HTTP header 'Accept' (if needed)
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = opts[:form_params] || {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = opts[:debug_body]
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:debug_return_type] || 'User'
|
66
|
+
|
67
|
+
# auth_names
|
68
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
69
|
+
|
70
|
+
new_options = opts.merge(
|
71
|
+
:operation => :"UsersApi.ban_user",
|
72
|
+
:header_params => header_params,
|
73
|
+
:query_params => query_params,
|
74
|
+
:form_params => form_params,
|
75
|
+
:body => post_body,
|
76
|
+
:auth_names => auth_names,
|
77
|
+
:return_type => return_type
|
78
|
+
)
|
79
|
+
|
80
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
81
|
+
if @api_client.config.debugging
|
82
|
+
@api_client.config.logger.debug "API called: UsersApi#ban_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
83
|
+
end
|
84
|
+
return data, status_code, headers
|
85
|
+
end
|
86
|
+
|
87
|
+
# Create a new user
|
88
|
+
# Creates a new user. Your user management settings determine how you should setup your user model. Any email address and phone number created using this method will be marked as verified. Note: If you are performing a migration, check out our guide on [zero downtime migrations](https://clerk.com/docs/deployments/migrate-overview). A rate limit rule of 20 requests per 10 seconds is applied to this endpoint.
|
89
|
+
# @param create_user_request [CreateUserRequest]
|
90
|
+
# @param [Hash] opts the optional parameters
|
91
|
+
# @return [User]
|
92
|
+
|
93
|
+
def create(create_user_request, opts = {})
|
94
|
+
data, _status_code, _headers = create_with_http_info(create_user_request, opts)
|
95
|
+
data
|
96
|
+
end
|
97
|
+
|
98
|
+
# Create a new user
|
99
|
+
# Creates a new user. Your user management settings determine how you should setup your user model. Any email address and phone number created using this method will be marked as verified. Note: If you are performing a migration, check out our guide on [zero downtime migrations](https://clerk.com/docs/deployments/migrate-overview). A rate limit rule of 20 requests per 10 seconds is applied to this endpoint.
|
100
|
+
# @param create_user_request [CreateUserRequest]
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
103
|
+
# POST
|
104
|
+
def create_with_http_info(create_user_request, opts = {})
|
105
|
+
if @api_client.config.debugging
|
106
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.create_user ...'
|
107
|
+
end
|
108
|
+
# verify the required parameter 'create_user_request' is set
|
109
|
+
if @api_client.config.client_side_validation && create_user_request.nil?
|
110
|
+
fail ArgumentError, "Missing the required parameter 'create_user_request' when calling UsersApi.create_user"
|
111
|
+
end
|
112
|
+
# resource path
|
113
|
+
local_var_path = '/users'
|
114
|
+
|
115
|
+
# query parameters
|
116
|
+
query_params = opts[:query_params] || {}
|
117
|
+
|
118
|
+
# header parameters
|
119
|
+
header_params = opts[:header_params] || {}
|
120
|
+
# HTTP header 'Accept' (if needed)
|
121
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
122
|
+
# HTTP header 'Content-Type'
|
123
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
124
|
+
if !content_type.nil?
|
125
|
+
header_params['Content-Type'] = content_type
|
126
|
+
end
|
127
|
+
|
128
|
+
# form parameters
|
129
|
+
form_params = opts[:form_params] || {}
|
130
|
+
|
131
|
+
# http body (model)
|
132
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_user_request)
|
133
|
+
|
134
|
+
# return_type
|
135
|
+
return_type = opts[:debug_return_type] || 'User'
|
136
|
+
|
137
|
+
# auth_names
|
138
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
139
|
+
|
140
|
+
new_options = opts.merge(
|
141
|
+
:operation => :"UsersApi.create_user",
|
142
|
+
:header_params => header_params,
|
143
|
+
:query_params => query_params,
|
144
|
+
:form_params => form_params,
|
145
|
+
:body => post_body,
|
146
|
+
:auth_names => auth_names,
|
147
|
+
:return_type => return_type
|
148
|
+
)
|
149
|
+
|
150
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
151
|
+
if @api_client.config.debugging
|
152
|
+
@api_client.config.logger.debug "API called: UsersApi#create_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
153
|
+
end
|
154
|
+
return data, status_code, headers
|
155
|
+
end
|
156
|
+
|
157
|
+
# Create a TOTP for a user
|
158
|
+
# Creates a TOTP (Time-based One-Time Password) for a given user, returning both the TOTP secret and the URI.
|
159
|
+
# @param user_id [String] The ID of the user for whom the TOTP is being created.
|
160
|
+
# @param [Hash] opts the optional parameters
|
161
|
+
# @return [TOTP]
|
162
|
+
|
163
|
+
def create_totp(user_id, opts = {})
|
164
|
+
data, _status_code, _headers = create_totp_with_http_info(user_id, opts)
|
165
|
+
data
|
166
|
+
end
|
167
|
+
|
168
|
+
# Create a TOTP for a user
|
169
|
+
# Creates a TOTP (Time-based One-Time Password) for a given user, returning both the TOTP secret and the URI.
|
170
|
+
# @param user_id [String] The ID of the user for whom the TOTP is being created.
|
171
|
+
# @param [Hash] opts the optional parameters
|
172
|
+
# @return [Array<(TOTP, Integer, Hash)>] TOTP data, response status code and response headers
|
173
|
+
# POST
|
174
|
+
def create_totp_with_http_info(user_id, opts = {})
|
175
|
+
if @api_client.config.debugging
|
176
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.create_user_totp ...'
|
177
|
+
end
|
178
|
+
# verify the required parameter 'user_id' is set
|
179
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
180
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.create_user_totp"
|
181
|
+
end
|
182
|
+
# resource path
|
183
|
+
local_var_path = '/users/{user_id}/totp'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
184
|
+
|
185
|
+
# query parameters
|
186
|
+
query_params = opts[:query_params] || {}
|
187
|
+
|
188
|
+
# header parameters
|
189
|
+
header_params = opts[:header_params] || {}
|
190
|
+
# HTTP header 'Accept' (if needed)
|
191
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
192
|
+
|
193
|
+
# form parameters
|
194
|
+
form_params = opts[:form_params] || {}
|
195
|
+
|
196
|
+
# http body (model)
|
197
|
+
post_body = opts[:debug_body]
|
198
|
+
|
199
|
+
# return_type
|
200
|
+
return_type = opts[:debug_return_type] || 'TOTP'
|
201
|
+
|
202
|
+
# auth_names
|
203
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
204
|
+
|
205
|
+
new_options = opts.merge(
|
206
|
+
:operation => :"UsersApi.create_user_totp",
|
207
|
+
:header_params => header_params,
|
208
|
+
:query_params => query_params,
|
209
|
+
:form_params => form_params,
|
210
|
+
:body => post_body,
|
211
|
+
:auth_names => auth_names,
|
212
|
+
:return_type => return_type
|
213
|
+
)
|
214
|
+
|
215
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
216
|
+
if @api_client.config.debugging
|
217
|
+
@api_client.config.logger.debug "API called: UsersApi#create_user_totp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
218
|
+
end
|
219
|
+
return data, status_code, headers
|
220
|
+
end
|
221
|
+
|
222
|
+
# Disable all user's Backup codes
|
223
|
+
# Disable all of a user's backup codes.
|
224
|
+
# @param user_id [String] The ID of the user whose backup codes are to be deleted.
|
225
|
+
# @param [Hash] opts the optional parameters
|
226
|
+
# @return [DisableMFA200Response]
|
227
|
+
|
228
|
+
def delete_backup_code(user_id, opts = {})
|
229
|
+
data, _status_code, _headers = delete_backup_code_with_http_info(user_id, opts)
|
230
|
+
data
|
231
|
+
end
|
232
|
+
|
233
|
+
# Disable all user's Backup codes
|
234
|
+
# Disable all of a user's backup codes.
|
235
|
+
# @param user_id [String] The ID of the user whose backup codes are to be deleted.
|
236
|
+
# @param [Hash] opts the optional parameters
|
237
|
+
# @return [Array<(DisableMFA200Response, Integer, Hash)>] DisableMFA200Response data, response status code and response headers
|
238
|
+
# DELETE
|
239
|
+
def delete_backup_code_with_http_info(user_id, opts = {})
|
240
|
+
if @api_client.config.debugging
|
241
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.delete_backup_code ...'
|
242
|
+
end
|
243
|
+
# verify the required parameter 'user_id' is set
|
244
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
245
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_backup_code"
|
246
|
+
end
|
247
|
+
# resource path
|
248
|
+
local_var_path = '/users/{user_id}/backup_code'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
249
|
+
|
250
|
+
# query parameters
|
251
|
+
query_params = opts[:query_params] || {}
|
252
|
+
|
253
|
+
# header parameters
|
254
|
+
header_params = opts[:header_params] || {}
|
255
|
+
# HTTP header 'Accept' (if needed)
|
256
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
257
|
+
|
258
|
+
# form parameters
|
259
|
+
form_params = opts[:form_params] || {}
|
260
|
+
|
261
|
+
# http body (model)
|
262
|
+
post_body = opts[:debug_body]
|
263
|
+
|
264
|
+
# return_type
|
265
|
+
return_type = opts[:debug_return_type] || 'DisableMFA200Response'
|
266
|
+
|
267
|
+
# auth_names
|
268
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
269
|
+
|
270
|
+
new_options = opts.merge(
|
271
|
+
:operation => :"UsersApi.delete_backup_code",
|
272
|
+
:header_params => header_params,
|
273
|
+
:query_params => query_params,
|
274
|
+
:form_params => form_params,
|
275
|
+
:body => post_body,
|
276
|
+
:auth_names => auth_names,
|
277
|
+
:return_type => return_type
|
278
|
+
)
|
279
|
+
|
280
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
281
|
+
if @api_client.config.debugging
|
282
|
+
@api_client.config.logger.debug "API called: UsersApi#delete_backup_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
283
|
+
end
|
284
|
+
return data, status_code, headers
|
285
|
+
end
|
286
|
+
|
287
|
+
# Delete External Account
|
288
|
+
# Delete an external account by ID.
|
289
|
+
# @param user_id [String] The ID of the user's external account
|
290
|
+
# @param external_account_id [String] The ID of the external account to delete
|
291
|
+
# @param [Hash] opts the optional parameters
|
292
|
+
# @return [DeletedObject]
|
293
|
+
|
294
|
+
def delete_external_account(user_id, external_account_id, opts = {})
|
295
|
+
data, _status_code, _headers = delete_external_account_with_http_info(user_id, external_account_id, opts)
|
296
|
+
data
|
297
|
+
end
|
298
|
+
|
299
|
+
# Delete External Account
|
300
|
+
# Delete an external account by ID.
|
301
|
+
# @param user_id [String] The ID of the user's external account
|
302
|
+
# @param external_account_id [String] The ID of the external account to delete
|
303
|
+
# @param [Hash] opts the optional parameters
|
304
|
+
# @return [Array<(DeletedObject, Integer, Hash)>] DeletedObject data, response status code and response headers
|
305
|
+
# DELETE
|
306
|
+
def delete_external_account_with_http_info(user_id, external_account_id, opts = {})
|
307
|
+
if @api_client.config.debugging
|
308
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.delete_external_account ...'
|
309
|
+
end
|
310
|
+
# verify the required parameter 'user_id' is set
|
311
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
312
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_external_account"
|
313
|
+
end
|
314
|
+
# verify the required parameter 'external_account_id' is set
|
315
|
+
if @api_client.config.client_side_validation && external_account_id.nil?
|
316
|
+
fail ArgumentError, "Missing the required parameter 'external_account_id' when calling UsersApi.delete_external_account"
|
317
|
+
end
|
318
|
+
# resource path
|
319
|
+
local_var_path = '/users/{user_id}/external_accounts/{external_account_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'external_account_id' + '}', CGI.escape(external_account_id.to_s))
|
320
|
+
|
321
|
+
# query parameters
|
322
|
+
query_params = opts[:query_params] || {}
|
323
|
+
|
324
|
+
# header parameters
|
325
|
+
header_params = opts[:header_params] || {}
|
326
|
+
# HTTP header 'Accept' (if needed)
|
327
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
328
|
+
|
329
|
+
# form parameters
|
330
|
+
form_params = opts[:form_params] || {}
|
331
|
+
|
332
|
+
# http body (model)
|
333
|
+
post_body = opts[:debug_body]
|
334
|
+
|
335
|
+
# return_type
|
336
|
+
return_type = opts[:debug_return_type] || 'DeletedObject'
|
337
|
+
|
338
|
+
# auth_names
|
339
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
340
|
+
|
341
|
+
new_options = opts.merge(
|
342
|
+
:operation => :"UsersApi.delete_external_account",
|
343
|
+
:header_params => header_params,
|
344
|
+
:query_params => query_params,
|
345
|
+
:form_params => form_params,
|
346
|
+
:body => post_body,
|
347
|
+
:auth_names => auth_names,
|
348
|
+
:return_type => return_type
|
349
|
+
)
|
350
|
+
|
351
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
352
|
+
if @api_client.config.debugging
|
353
|
+
@api_client.config.logger.debug "API called: UsersApi#delete_external_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
354
|
+
end
|
355
|
+
return data, status_code, headers
|
356
|
+
end
|
357
|
+
|
358
|
+
# Delete all the user's TOTPs
|
359
|
+
# Deletes all of the user's TOTPs.
|
360
|
+
# @param user_id [String] The ID of the user whose TOTPs are to be deleted
|
361
|
+
# @param [Hash] opts the optional parameters
|
362
|
+
# @return [DisableMFA200Response]
|
363
|
+
|
364
|
+
def delete_totp(user_id, opts = {})
|
365
|
+
data, _status_code, _headers = delete_totp_with_http_info(user_id, opts)
|
366
|
+
data
|
367
|
+
end
|
368
|
+
|
369
|
+
# Delete all the user's TOTPs
|
370
|
+
# Deletes all of the user's TOTPs.
|
371
|
+
# @param user_id [String] The ID of the user whose TOTPs are to be deleted
|
372
|
+
# @param [Hash] opts the optional parameters
|
373
|
+
# @return [Array<(DisableMFA200Response, Integer, Hash)>] DisableMFA200Response data, response status code and response headers
|
374
|
+
# DELETE
|
375
|
+
def delete_totp_with_http_info(user_id, opts = {})
|
376
|
+
if @api_client.config.debugging
|
377
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.delete_totp ...'
|
378
|
+
end
|
379
|
+
# verify the required parameter 'user_id' is set
|
380
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
381
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_totp"
|
382
|
+
end
|
383
|
+
# resource path
|
384
|
+
local_var_path = '/users/{user_id}/totp'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
385
|
+
|
386
|
+
# query parameters
|
387
|
+
query_params = opts[:query_params] || {}
|
388
|
+
|
389
|
+
# header parameters
|
390
|
+
header_params = opts[:header_params] || {}
|
391
|
+
# HTTP header 'Accept' (if needed)
|
392
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
393
|
+
|
394
|
+
# form parameters
|
395
|
+
form_params = opts[:form_params] || {}
|
396
|
+
|
397
|
+
# http body (model)
|
398
|
+
post_body = opts[:debug_body]
|
399
|
+
|
400
|
+
# return_type
|
401
|
+
return_type = opts[:debug_return_type] || 'DisableMFA200Response'
|
402
|
+
|
403
|
+
# auth_names
|
404
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
405
|
+
|
406
|
+
new_options = opts.merge(
|
407
|
+
:operation => :"UsersApi.delete_totp",
|
408
|
+
:header_params => header_params,
|
409
|
+
:query_params => query_params,
|
410
|
+
:form_params => form_params,
|
411
|
+
:body => post_body,
|
412
|
+
:auth_names => auth_names,
|
413
|
+
:return_type => return_type
|
414
|
+
)
|
415
|
+
|
416
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
417
|
+
if @api_client.config.debugging
|
418
|
+
@api_client.config.logger.debug "API called: UsersApi#delete_totp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
419
|
+
end
|
420
|
+
return data, status_code, headers
|
421
|
+
end
|
422
|
+
|
423
|
+
# Delete a user
|
424
|
+
# Delete the specified user
|
425
|
+
# @param user_id [String] The ID of the user to delete
|
426
|
+
# @param [Hash] opts the optional parameters
|
427
|
+
# @return [DeletedObject]
|
428
|
+
|
429
|
+
def delete(user_id, opts = {})
|
430
|
+
data, _status_code, _headers = delete_with_http_info(user_id, opts)
|
431
|
+
data
|
432
|
+
end
|
433
|
+
|
434
|
+
# Delete a user
|
435
|
+
# Delete the specified user
|
436
|
+
# @param user_id [String] The ID of the user to delete
|
437
|
+
# @param [Hash] opts the optional parameters
|
438
|
+
# @return [Array<(DeletedObject, Integer, Hash)>] DeletedObject data, response status code and response headers
|
439
|
+
# DELETE
|
440
|
+
def delete_with_http_info(user_id, opts = {})
|
441
|
+
if @api_client.config.debugging
|
442
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.delete_user ...'
|
443
|
+
end
|
444
|
+
# verify the required parameter 'user_id' is set
|
445
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
446
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user"
|
447
|
+
end
|
448
|
+
# resource path
|
449
|
+
local_var_path = '/users/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
450
|
+
|
451
|
+
# query parameters
|
452
|
+
query_params = opts[:query_params] || {}
|
453
|
+
|
454
|
+
# header parameters
|
455
|
+
header_params = opts[:header_params] || {}
|
456
|
+
# HTTP header 'Accept' (if needed)
|
457
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
458
|
+
|
459
|
+
# form parameters
|
460
|
+
form_params = opts[:form_params] || {}
|
461
|
+
|
462
|
+
# http body (model)
|
463
|
+
post_body = opts[:debug_body]
|
464
|
+
|
465
|
+
# return_type
|
466
|
+
return_type = opts[:debug_return_type] || 'DeletedObject'
|
467
|
+
|
468
|
+
# auth_names
|
469
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
470
|
+
|
471
|
+
new_options = opts.merge(
|
472
|
+
:operation => :"UsersApi.delete_user",
|
473
|
+
:header_params => header_params,
|
474
|
+
:query_params => query_params,
|
475
|
+
:form_params => form_params,
|
476
|
+
:body => post_body,
|
477
|
+
:auth_names => auth_names,
|
478
|
+
:return_type => return_type
|
479
|
+
)
|
480
|
+
|
481
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
482
|
+
if @api_client.config.debugging
|
483
|
+
@api_client.config.logger.debug "API called: UsersApi#delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
484
|
+
end
|
485
|
+
return data, status_code, headers
|
486
|
+
end
|
487
|
+
|
488
|
+
# Delete user profile image
|
489
|
+
# Delete a user's profile image
|
490
|
+
# @param user_id [String] The ID of the user to delete the profile image for
|
491
|
+
# @param [Hash] opts the optional parameters
|
492
|
+
# @return [User]
|
493
|
+
|
494
|
+
def delete_profile_image(user_id, opts = {})
|
495
|
+
data, _status_code, _headers = delete_profile_image_with_http_info(user_id, opts)
|
496
|
+
data
|
497
|
+
end
|
498
|
+
|
499
|
+
# Delete user profile image
|
500
|
+
# Delete a user's profile image
|
501
|
+
# @param user_id [String] The ID of the user to delete the profile image for
|
502
|
+
# @param [Hash] opts the optional parameters
|
503
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
504
|
+
# DELETE
|
505
|
+
def delete_profile_image_with_http_info(user_id, opts = {})
|
506
|
+
if @api_client.config.debugging
|
507
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.delete_user_profile_image ...'
|
508
|
+
end
|
509
|
+
# verify the required parameter 'user_id' is set
|
510
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
511
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user_profile_image"
|
512
|
+
end
|
513
|
+
# resource path
|
514
|
+
local_var_path = '/users/{user_id}/profile_image'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
515
|
+
|
516
|
+
# query parameters
|
517
|
+
query_params = opts[:query_params] || {}
|
518
|
+
|
519
|
+
# header parameters
|
520
|
+
header_params = opts[:header_params] || {}
|
521
|
+
# HTTP header 'Accept' (if needed)
|
522
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
523
|
+
|
524
|
+
# form parameters
|
525
|
+
form_params = opts[:form_params] || {}
|
526
|
+
|
527
|
+
# http body (model)
|
528
|
+
post_body = opts[:debug_body]
|
529
|
+
|
530
|
+
# return_type
|
531
|
+
return_type = opts[:debug_return_type] || 'User'
|
532
|
+
|
533
|
+
# auth_names
|
534
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
535
|
+
|
536
|
+
new_options = opts.merge(
|
537
|
+
:operation => :"UsersApi.delete_user_profile_image",
|
538
|
+
:header_params => header_params,
|
539
|
+
:query_params => query_params,
|
540
|
+
:form_params => form_params,
|
541
|
+
:body => post_body,
|
542
|
+
:auth_names => auth_names,
|
543
|
+
:return_type => return_type
|
544
|
+
)
|
545
|
+
|
546
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
547
|
+
if @api_client.config.debugging
|
548
|
+
@api_client.config.logger.debug "API called: UsersApi#delete_user_profile_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
549
|
+
end
|
550
|
+
return data, status_code, headers
|
551
|
+
end
|
552
|
+
|
553
|
+
# Disable a user's MFA methods
|
554
|
+
# Disable all of a user's MFA methods (e.g. OTP sent via SMS, TOTP on their authenticator app) at once.
|
555
|
+
# @param user_id [String] The ID of the user whose MFA methods are to be disabled
|
556
|
+
# @param [Hash] opts the optional parameters
|
557
|
+
# @return [DisableMFA200Response]
|
558
|
+
|
559
|
+
def disable_mfa(user_id, opts = {})
|
560
|
+
data, _status_code, _headers = disable_mfa_with_http_info(user_id, opts)
|
561
|
+
data
|
562
|
+
end
|
563
|
+
|
564
|
+
# Disable a user's MFA methods
|
565
|
+
# Disable all of a user's MFA methods (e.g. OTP sent via SMS, TOTP on their authenticator app) at once.
|
566
|
+
# @param user_id [String] The ID of the user whose MFA methods are to be disabled
|
567
|
+
# @param [Hash] opts the optional parameters
|
568
|
+
# @return [Array<(DisableMFA200Response, Integer, Hash)>] DisableMFA200Response data, response status code and response headers
|
569
|
+
# DELETE
|
570
|
+
def disable_mfa_with_http_info(user_id, opts = {})
|
571
|
+
if @api_client.config.debugging
|
572
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.disable_mfa ...'
|
573
|
+
end
|
574
|
+
# verify the required parameter 'user_id' is set
|
575
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
576
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.disable_mfa"
|
577
|
+
end
|
578
|
+
# resource path
|
579
|
+
local_var_path = '/users/{user_id}/mfa'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
580
|
+
|
581
|
+
# query parameters
|
582
|
+
query_params = opts[:query_params] || {}
|
583
|
+
|
584
|
+
# header parameters
|
585
|
+
header_params = opts[:header_params] || {}
|
586
|
+
# HTTP header 'Accept' (if needed)
|
587
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
588
|
+
|
589
|
+
# form parameters
|
590
|
+
form_params = opts[:form_params] || {}
|
591
|
+
|
592
|
+
# http body (model)
|
593
|
+
post_body = opts[:debug_body]
|
594
|
+
|
595
|
+
# return_type
|
596
|
+
return_type = opts[:debug_return_type] || 'DisableMFA200Response'
|
597
|
+
|
598
|
+
# auth_names
|
599
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
600
|
+
|
601
|
+
new_options = opts.merge(
|
602
|
+
:operation => :"UsersApi.disable_mfa",
|
603
|
+
:header_params => header_params,
|
604
|
+
:query_params => query_params,
|
605
|
+
:form_params => form_params,
|
606
|
+
:body => post_body,
|
607
|
+
:auth_names => auth_names,
|
608
|
+
:return_type => return_type
|
609
|
+
)
|
610
|
+
|
611
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
612
|
+
if @api_client.config.debugging
|
613
|
+
@api_client.config.logger.debug "API called: UsersApi#disable_mfa\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
614
|
+
end
|
615
|
+
return data, status_code, headers
|
616
|
+
end
|
617
|
+
|
618
|
+
# Retrieve the OAuth access token of a user
|
619
|
+
# Fetch the corresponding OAuth access token for a user that has previously authenticated with a particular OAuth provider. For OAuth 2.0, if the access token has expired and we have a corresponding refresh token, the access token will be refreshed transparently the new one will be returned.
|
620
|
+
# @param user_id [String] The ID of the user for which to retrieve the OAuth access token
|
621
|
+
# @param provider [String] The ID of the OAuth provider (e.g. `oauth_google`)
|
622
|
+
# @param [Hash] opts the optional parameters
|
623
|
+
# @return [Array<GetOAuthAccessToken200ResponseInner>]
|
624
|
+
|
625
|
+
def oauth_access_token(user_id, provider, opts = {})
|
626
|
+
data, _status_code, _headers = oauth_access_token_with_http_info(user_id, provider, opts)
|
627
|
+
data
|
628
|
+
end
|
629
|
+
|
630
|
+
# Retrieve the OAuth access token of a user
|
631
|
+
# Fetch the corresponding OAuth access token for a user that has previously authenticated with a particular OAuth provider. For OAuth 2.0, if the access token has expired and we have a corresponding refresh token, the access token will be refreshed transparently the new one will be returned.
|
632
|
+
# @param user_id [String] The ID of the user for which to retrieve the OAuth access token
|
633
|
+
# @param provider [String] The ID of the OAuth provider (e.g. `oauth_google`)
|
634
|
+
# @param [Hash] opts the optional parameters
|
635
|
+
# @return [Array<(Array<GetOAuthAccessToken200ResponseInner>, Integer, Hash)>] Array<GetOAuthAccessToken200ResponseInner> data, response status code and response headers
|
636
|
+
# GET array
|
637
|
+
def oauth_access_token_with_http_info(user_id, provider, opts = {})
|
638
|
+
if @api_client.config.debugging
|
639
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.get_o_auth_access_token ...'
|
640
|
+
end
|
641
|
+
# verify the required parameter 'user_id' is set
|
642
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
643
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_o_auth_access_token"
|
644
|
+
end
|
645
|
+
# verify the required parameter 'provider' is set
|
646
|
+
if @api_client.config.client_side_validation && provider.nil?
|
647
|
+
fail ArgumentError, "Missing the required parameter 'provider' when calling UsersApi.get_o_auth_access_token"
|
648
|
+
end
|
649
|
+
# resource path
|
650
|
+
local_var_path = '/users/{user_id}/oauth_access_tokens/{provider}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'provider' + '}', CGI.escape(provider.to_s))
|
651
|
+
|
652
|
+
# query parameters
|
653
|
+
query_params = opts[:query_params] || {}
|
654
|
+
|
655
|
+
# header parameters
|
656
|
+
header_params = opts[:header_params] || {}
|
657
|
+
# HTTP header 'Accept' (if needed)
|
658
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
659
|
+
|
660
|
+
# form parameters
|
661
|
+
form_params = opts[:form_params] || {}
|
662
|
+
|
663
|
+
# http body (model)
|
664
|
+
post_body = opts[:debug_body]
|
665
|
+
|
666
|
+
# return_type
|
667
|
+
return_type = opts[:debug_return_type] || 'Array<GetOAuthAccessToken200ResponseInner>'
|
668
|
+
|
669
|
+
# auth_names
|
670
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
671
|
+
|
672
|
+
new_options = opts.merge(
|
673
|
+
:operation => :"UsersApi.get_o_auth_access_token",
|
674
|
+
:header_params => header_params,
|
675
|
+
:query_params => query_params,
|
676
|
+
:form_params => form_params,
|
677
|
+
:body => post_body,
|
678
|
+
:auth_names => auth_names,
|
679
|
+
:return_type => return_type
|
680
|
+
)
|
681
|
+
|
682
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
683
|
+
if @api_client.config.debugging
|
684
|
+
@api_client.config.logger.debug "API called: UsersApi#get_o_auth_access_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
685
|
+
end
|
686
|
+
return data, status_code, headers
|
687
|
+
end
|
688
|
+
|
689
|
+
# Retrieve a user
|
690
|
+
# Retrieve the details of a user
|
691
|
+
# @param user_id [String] The ID of the user to retrieve
|
692
|
+
# @param [Hash] opts the optional parameters
|
693
|
+
# @return [User]
|
694
|
+
|
695
|
+
def find(user_id, opts = {})
|
696
|
+
data, _status_code, _headers = find_with_http_info(user_id, opts)
|
697
|
+
data
|
698
|
+
end
|
699
|
+
|
700
|
+
# Retrieve a user
|
701
|
+
# Retrieve the details of a user
|
702
|
+
# @param user_id [String] The ID of the user to retrieve
|
703
|
+
# @param [Hash] opts the optional parameters
|
704
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
705
|
+
# GET
|
706
|
+
def find_with_http_info(user_id, opts = {})
|
707
|
+
if @api_client.config.debugging
|
708
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.get_user ...'
|
709
|
+
end
|
710
|
+
# verify the required parameter 'user_id' is set
|
711
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
712
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user"
|
713
|
+
end
|
714
|
+
# resource path
|
715
|
+
local_var_path = '/users/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
716
|
+
|
717
|
+
# query parameters
|
718
|
+
query_params = opts[:query_params] || {}
|
719
|
+
|
720
|
+
# header parameters
|
721
|
+
header_params = opts[:header_params] || {}
|
722
|
+
# HTTP header 'Accept' (if needed)
|
723
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
724
|
+
|
725
|
+
# form parameters
|
726
|
+
form_params = opts[:form_params] || {}
|
727
|
+
|
728
|
+
# http body (model)
|
729
|
+
post_body = opts[:debug_body]
|
730
|
+
|
731
|
+
# return_type
|
732
|
+
return_type = opts[:debug_return_type] || 'User'
|
733
|
+
|
734
|
+
# auth_names
|
735
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
736
|
+
|
737
|
+
new_options = opts.merge(
|
738
|
+
:operation => :"UsersApi.get_user",
|
739
|
+
:header_params => header_params,
|
740
|
+
:query_params => query_params,
|
741
|
+
:form_params => form_params,
|
742
|
+
:body => post_body,
|
743
|
+
:auth_names => auth_names,
|
744
|
+
:return_type => return_type
|
745
|
+
)
|
746
|
+
|
747
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
748
|
+
if @api_client.config.debugging
|
749
|
+
@api_client.config.logger.debug "API called: UsersApi#get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
750
|
+
end
|
751
|
+
return data, status_code, headers
|
752
|
+
end
|
753
|
+
|
754
|
+
# List all users
|
755
|
+
# Returns a list of all users. The users are returned sorted by creation date, with the newest users appearing first.
|
756
|
+
# @param [Hash] opts the optional parameters
|
757
|
+
# @option opts [Array<String>] :email_address Returns users with the specified email addresses. Accepts up to 100 email addresses. Any email addresses not found are ignored.
|
758
|
+
# @option opts [Array<String>] :phone_number Returns users with the specified phone numbers. Accepts up to 100 phone numbers. Any phone numbers not found are ignored.
|
759
|
+
# @option opts [Array<String>] :external_id Returns users with the specified external ids. For each external id, the `+` and `-` can be prepended to the id, which denote whether the respective external id should be included or excluded from the result set. Accepts up to 100 external ids. Any external ids not found are ignored.
|
760
|
+
# @option opts [Array<String>] :username Returns users with the specified usernames. Accepts up to 100 usernames. Any usernames not found are ignored.
|
761
|
+
# @option opts [Array<String>] :web3_wallet Returns users with the specified web3 wallet addresses. Accepts up to 100 web3 wallet addresses. Any web3 wallet addressed not found are ignored.
|
762
|
+
# @option opts [Array<String>] :user_id Returns users with the user ids specified. For each user id, the `+` and `-` can be prepended to the id, which denote whether the respective user id should be included or excluded from the result set. Accepts up to 100 user ids. Any user ids not found are ignored.
|
763
|
+
# @option opts [Array<String>] :organization_id Returns users that have memberships to the given organizations. For each organization id, the `+` and `-` can be prepended to the id, which denote whether the respective organization should be included or excluded from the result set. Accepts up to 100 organization ids.
|
764
|
+
# @option opts [String] :query Returns users that match the given query. For possible matches, we check the email addresses, phone numbers, usernames, web3 wallets, user ids, first and last names. The query value doesn't need to match the exact value you are looking for, it is capable of partial matches as well.
|
765
|
+
# @option opts [Integer] :last_active_at_since Returns users that had session activity since the given date, with day precision. Providing a value with higher precision than day will result in an error. Example: use 1700690400000 to retrieve users that had session activity from 2023-11-23 until the current day.
|
766
|
+
# @option opts [Float] :limit Applies a limit to the number of results returned. Can be used for paginating the results together with `offset`. (default to 10)
|
767
|
+
# @option opts [Float] :offset Skip the first `offset` results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with `limit`. (default to 0)
|
768
|
+
# @option opts [String] :order_by Allows to return users in a particular order. At the moment, you can order the returned users by their `created_at`,`updated_at`,`email_address`,`web3wallet`,`first_name`,`last_name`,`phone_number`,`username`,`last_active_at`,`last_sign_in_at`. In order to specify the direction, you can use the `+/-` symbols prepended in the property to order by. For example, if you want users to be returned in descending order according to their `created_at` property, you can use `-created_at`. If you don't use `+` or `-`, then `+` is implied. We only support one `order_by` parameter, and if multiple `order_by` parameters are provided, we will only keep the first one. For example, if you pass `order_by=username&order_by=created_at`, we will consider only the first `order_by` parameter, which is `username`. The `created_at` parameter will be ignored in this case. (default to '-created_at')
|
769
|
+
# @return [Array<User>]
|
770
|
+
|
771
|
+
def all(opts = {})
|
772
|
+
data, _status_code, _headers = all_with_http_info(opts)
|
773
|
+
data
|
774
|
+
end
|
775
|
+
|
776
|
+
# List all users
|
777
|
+
# Returns a list of all users. The users are returned sorted by creation date, with the newest users appearing first.
|
778
|
+
# @param [Hash] opts the optional parameters
|
779
|
+
# @option opts [Array<String>] :email_address Returns users with the specified email addresses. Accepts up to 100 email addresses. Any email addresses not found are ignored.
|
780
|
+
# @option opts [Array<String>] :phone_number Returns users with the specified phone numbers. Accepts up to 100 phone numbers. Any phone numbers not found are ignored.
|
781
|
+
# @option opts [Array<String>] :external_id Returns users with the specified external ids. For each external id, the `+` and `-` can be prepended to the id, which denote whether the respective external id should be included or excluded from the result set. Accepts up to 100 external ids. Any external ids not found are ignored.
|
782
|
+
# @option opts [Array<String>] :username Returns users with the specified usernames. Accepts up to 100 usernames. Any usernames not found are ignored.
|
783
|
+
# @option opts [Array<String>] :web3_wallet Returns users with the specified web3 wallet addresses. Accepts up to 100 web3 wallet addresses. Any web3 wallet addressed not found are ignored.
|
784
|
+
# @option opts [Array<String>] :user_id Returns users with the user ids specified. For each user id, the `+` and `-` can be prepended to the id, which denote whether the respective user id should be included or excluded from the result set. Accepts up to 100 user ids. Any user ids not found are ignored.
|
785
|
+
# @option opts [Array<String>] :organization_id Returns users that have memberships to the given organizations. For each organization id, the `+` and `-` can be prepended to the id, which denote whether the respective organization should be included or excluded from the result set. Accepts up to 100 organization ids.
|
786
|
+
# @option opts [String] :query Returns users that match the given query. For possible matches, we check the email addresses, phone numbers, usernames, web3 wallets, user ids, first and last names. The query value doesn't need to match the exact value you are looking for, it is capable of partial matches as well.
|
787
|
+
# @option opts [Integer] :last_active_at_since Returns users that had session activity since the given date, with day precision. Providing a value with higher precision than day will result in an error. Example: use 1700690400000 to retrieve users that had session activity from 2023-11-23 until the current day.
|
788
|
+
# @option opts [Float] :limit Applies a limit to the number of results returned. Can be used for paginating the results together with `offset`. (default to 10)
|
789
|
+
# @option opts [Float] :offset Skip the first `offset` results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with `limit`. (default to 0)
|
790
|
+
# @option opts [String] :order_by Allows to return users in a particular order. At the moment, you can order the returned users by their `created_at`,`updated_at`,`email_address`,`web3wallet`,`first_name`,`last_name`,`phone_number`,`username`,`last_active_at`,`last_sign_in_at`. In order to specify the direction, you can use the `+/-` symbols prepended in the property to order by. For example, if you want users to be returned in descending order according to their `created_at` property, you can use `-created_at`. If you don't use `+` or `-`, then `+` is implied. We only support one `order_by` parameter, and if multiple `order_by` parameters are provided, we will only keep the first one. For example, if you pass `order_by=username&order_by=created_at`, we will consider only the first `order_by` parameter, which is `username`. The `created_at` parameter will be ignored in this case. (default to '-created_at')
|
791
|
+
# @return [Array<(Array<User>, Integer, Hash)>] Array<User> data, response status code and response headers
|
792
|
+
# GET array
|
793
|
+
def all_with_http_info(opts = {})
|
794
|
+
if @api_client.config.debugging
|
795
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.get_user_list ...'
|
796
|
+
end
|
797
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
798
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.get_user_list, must be smaller than or equal to 500.'
|
799
|
+
end
|
800
|
+
|
801
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
802
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.get_user_list, must be greater than or equal to 1.'
|
803
|
+
end
|
804
|
+
|
805
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
806
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling UsersApi.get_user_list, must be greater than or equal to 0.'
|
807
|
+
end
|
808
|
+
|
809
|
+
# resource path
|
810
|
+
local_var_path = '/users'
|
811
|
+
|
812
|
+
# query parameters
|
813
|
+
query_params = opts[:query_params] || {}
|
814
|
+
query_params[:'email_address'] = @api_client.build_collection_param(opts[:'email_address'], :multi) if !opts[:'email_address'].nil?
|
815
|
+
query_params[:'phone_number'] = @api_client.build_collection_param(opts[:'phone_number'], :multi) if !opts[:'phone_number'].nil?
|
816
|
+
query_params[:'external_id'] = @api_client.build_collection_param(opts[:'external_id'], :multi) if !opts[:'external_id'].nil?
|
817
|
+
query_params[:'username'] = @api_client.build_collection_param(opts[:'username'], :multi) if !opts[:'username'].nil?
|
818
|
+
query_params[:'web3_wallet'] = @api_client.build_collection_param(opts[:'web3_wallet'], :multi) if !opts[:'web3_wallet'].nil?
|
819
|
+
query_params[:'user_id'] = @api_client.build_collection_param(opts[:'user_id'], :multi) if !opts[:'user_id'].nil?
|
820
|
+
query_params[:'organization_id'] = @api_client.build_collection_param(opts[:'organization_id'], :multi) if !opts[:'organization_id'].nil?
|
821
|
+
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
822
|
+
query_params[:'last_active_at_since'] = opts[:'last_active_at_since'] if !opts[:'last_active_at_since'].nil?
|
823
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
824
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
825
|
+
query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
|
826
|
+
|
827
|
+
# header parameters
|
828
|
+
header_params = opts[:header_params] || {}
|
829
|
+
# HTTP header 'Accept' (if needed)
|
830
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
831
|
+
|
832
|
+
# form parameters
|
833
|
+
form_params = opts[:form_params] || {}
|
834
|
+
|
835
|
+
# http body (model)
|
836
|
+
post_body = opts[:debug_body]
|
837
|
+
|
838
|
+
# return_type
|
839
|
+
return_type = opts[:debug_return_type] || 'Array<User>'
|
840
|
+
|
841
|
+
# auth_names
|
842
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
843
|
+
|
844
|
+
new_options = opts.merge(
|
845
|
+
:operation => :"UsersApi.get_user_list",
|
846
|
+
:header_params => header_params,
|
847
|
+
:query_params => query_params,
|
848
|
+
:form_params => form_params,
|
849
|
+
:body => post_body,
|
850
|
+
:auth_names => auth_names,
|
851
|
+
:return_type => return_type
|
852
|
+
)
|
853
|
+
|
854
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
855
|
+
if @api_client.config.debugging
|
856
|
+
@api_client.config.logger.debug "API called: UsersApi#get_user_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
857
|
+
end
|
858
|
+
return data, status_code, headers
|
859
|
+
end
|
860
|
+
|
861
|
+
# Count users
|
862
|
+
# Returns a total count of all users that match the given filtering criteria.
|
863
|
+
# @param [Hash] opts the optional parameters
|
864
|
+
# @option opts [Array<String>] :email_address Counts users with the specified email addresses. Accepts up to 100 email addresses. Any email addresses not found are ignored.
|
865
|
+
# @option opts [Array<String>] :phone_number Counts users with the specified phone numbers. Accepts up to 100 phone numbers. Any phone numbers not found are ignored.
|
866
|
+
# @option opts [Array<String>] :external_id Counts users with the specified external ids. Accepts up to 100 external ids. Any external ids not found are ignored.
|
867
|
+
# @option opts [Array<String>] :username Counts users with the specified usernames. Accepts up to 100 usernames. Any usernames not found are ignored.
|
868
|
+
# @option opts [Array<String>] :web3_wallet Counts users with the specified web3 wallet addresses. Accepts up to 100 web3 wallet addresses. Any web3 wallet addressed not found are ignored.
|
869
|
+
# @option opts [Array<String>] :user_id Counts users with the user ids specified. Accepts up to 100 user ids. Any user ids not found are ignored.
|
870
|
+
# @option opts [String] :query Counts users that match the given query. For possible matches, we check the email addresses, phone numbers, usernames, web3 wallets, user ids, first and last names. The query value doesn't need to match the exact value you are looking for, it is capable of partial matches as well.
|
871
|
+
# @return [TotalCount]
|
872
|
+
|
873
|
+
def count(opts = {})
|
874
|
+
data, _status_code, _headers = count_with_http_info(opts)
|
875
|
+
data
|
876
|
+
end
|
877
|
+
|
878
|
+
# Count users
|
879
|
+
# Returns a total count of all users that match the given filtering criteria.
|
880
|
+
# @param [Hash] opts the optional parameters
|
881
|
+
# @option opts [Array<String>] :email_address Counts users with the specified email addresses. Accepts up to 100 email addresses. Any email addresses not found are ignored.
|
882
|
+
# @option opts [Array<String>] :phone_number Counts users with the specified phone numbers. Accepts up to 100 phone numbers. Any phone numbers not found are ignored.
|
883
|
+
# @option opts [Array<String>] :external_id Counts users with the specified external ids. Accepts up to 100 external ids. Any external ids not found are ignored.
|
884
|
+
# @option opts [Array<String>] :username Counts users with the specified usernames. Accepts up to 100 usernames. Any usernames not found are ignored.
|
885
|
+
# @option opts [Array<String>] :web3_wallet Counts users with the specified web3 wallet addresses. Accepts up to 100 web3 wallet addresses. Any web3 wallet addressed not found are ignored.
|
886
|
+
# @option opts [Array<String>] :user_id Counts users with the user ids specified. Accepts up to 100 user ids. Any user ids not found are ignored.
|
887
|
+
# @option opts [String] :query Counts users that match the given query. For possible matches, we check the email addresses, phone numbers, usernames, web3 wallets, user ids, first and last names. The query value doesn't need to match the exact value you are looking for, it is capable of partial matches as well.
|
888
|
+
# @return [Array<(TotalCount, Integer, Hash)>] TotalCount data, response status code and response headers
|
889
|
+
# GET
|
890
|
+
def count_with_http_info(opts = {})
|
891
|
+
if @api_client.config.debugging
|
892
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.get_users_count ...'
|
893
|
+
end
|
894
|
+
# resource path
|
895
|
+
local_var_path = '/users/count'
|
896
|
+
|
897
|
+
# query parameters
|
898
|
+
query_params = opts[:query_params] || {}
|
899
|
+
query_params[:'email_address'] = @api_client.build_collection_param(opts[:'email_address'], :multi) if !opts[:'email_address'].nil?
|
900
|
+
query_params[:'phone_number'] = @api_client.build_collection_param(opts[:'phone_number'], :multi) if !opts[:'phone_number'].nil?
|
901
|
+
query_params[:'external_id'] = @api_client.build_collection_param(opts[:'external_id'], :multi) if !opts[:'external_id'].nil?
|
902
|
+
query_params[:'username'] = @api_client.build_collection_param(opts[:'username'], :multi) if !opts[:'username'].nil?
|
903
|
+
query_params[:'web3_wallet'] = @api_client.build_collection_param(opts[:'web3_wallet'], :multi) if !opts[:'web3_wallet'].nil?
|
904
|
+
query_params[:'user_id'] = @api_client.build_collection_param(opts[:'user_id'], :multi) if !opts[:'user_id'].nil?
|
905
|
+
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
906
|
+
|
907
|
+
# header parameters
|
908
|
+
header_params = opts[:header_params] || {}
|
909
|
+
# HTTP header 'Accept' (if needed)
|
910
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
911
|
+
|
912
|
+
# form parameters
|
913
|
+
form_params = opts[:form_params] || {}
|
914
|
+
|
915
|
+
# http body (model)
|
916
|
+
post_body = opts[:debug_body]
|
917
|
+
|
918
|
+
# return_type
|
919
|
+
return_type = opts[:debug_return_type] || 'TotalCount'
|
920
|
+
|
921
|
+
# auth_names
|
922
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
923
|
+
|
924
|
+
new_options = opts.merge(
|
925
|
+
:operation => :"UsersApi.get_users_count",
|
926
|
+
:header_params => header_params,
|
927
|
+
:query_params => query_params,
|
928
|
+
:form_params => form_params,
|
929
|
+
:body => post_body,
|
930
|
+
:auth_names => auth_names,
|
931
|
+
:return_type => return_type
|
932
|
+
)
|
933
|
+
|
934
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
935
|
+
if @api_client.config.debugging
|
936
|
+
@api_client.config.logger.debug "API called: UsersApi#get_users_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
937
|
+
end
|
938
|
+
return data, status_code, headers
|
939
|
+
end
|
940
|
+
|
941
|
+
# Lock a user
|
942
|
+
# Marks the given user as locked, which means they are not allowed to sign in again until the lock expires. Lock duration can be configured in the instance's restrictions settings.
|
943
|
+
# @param user_id [String] The ID of the user to lock
|
944
|
+
# @param [Hash] opts the optional parameters
|
945
|
+
# @return [User]
|
946
|
+
|
947
|
+
def lock(user_id, opts = {})
|
948
|
+
data, _status_code, _headers = lock_with_http_info(user_id, opts)
|
949
|
+
data
|
950
|
+
end
|
951
|
+
|
952
|
+
# Lock a user
|
953
|
+
# Marks the given user as locked, which means they are not allowed to sign in again until the lock expires. Lock duration can be configured in the instance's restrictions settings.
|
954
|
+
# @param user_id [String] The ID of the user to lock
|
955
|
+
# @param [Hash] opts the optional parameters
|
956
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
957
|
+
# POST
|
958
|
+
def lock_with_http_info(user_id, opts = {})
|
959
|
+
if @api_client.config.debugging
|
960
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.lock_user ...'
|
961
|
+
end
|
962
|
+
# verify the required parameter 'user_id' is set
|
963
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
964
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.lock_user"
|
965
|
+
end
|
966
|
+
# resource path
|
967
|
+
local_var_path = '/users/{user_id}/lock'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
968
|
+
|
969
|
+
# query parameters
|
970
|
+
query_params = opts[:query_params] || {}
|
971
|
+
|
972
|
+
# header parameters
|
973
|
+
header_params = opts[:header_params] || {}
|
974
|
+
# HTTP header 'Accept' (if needed)
|
975
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
976
|
+
|
977
|
+
# form parameters
|
978
|
+
form_params = opts[:form_params] || {}
|
979
|
+
|
980
|
+
# http body (model)
|
981
|
+
post_body = opts[:debug_body]
|
982
|
+
|
983
|
+
# return_type
|
984
|
+
return_type = opts[:debug_return_type] || 'User'
|
985
|
+
|
986
|
+
# auth_names
|
987
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
988
|
+
|
989
|
+
new_options = opts.merge(
|
990
|
+
:operation => :"UsersApi.lock_user",
|
991
|
+
:header_params => header_params,
|
992
|
+
:query_params => query_params,
|
993
|
+
:form_params => form_params,
|
994
|
+
:body => post_body,
|
995
|
+
:auth_names => auth_names,
|
996
|
+
:return_type => return_type
|
997
|
+
)
|
998
|
+
|
999
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1000
|
+
if @api_client.config.debugging
|
1001
|
+
@api_client.config.logger.debug "API called: UsersApi#lock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1002
|
+
end
|
1003
|
+
return data, status_code, headers
|
1004
|
+
end
|
1005
|
+
|
1006
|
+
# Set user profile image
|
1007
|
+
# Update a user's profile image
|
1008
|
+
# @param user_id [String] The ID of the user to update the profile image for
|
1009
|
+
# @param [Hash] opts the optional parameters
|
1010
|
+
# @option opts [File] :file
|
1011
|
+
# @return [User]
|
1012
|
+
|
1013
|
+
def update_profile_image(user_id, opts = {})
|
1014
|
+
data, _status_code, _headers = update_profile_image_with_http_info(user_id, opts)
|
1015
|
+
data
|
1016
|
+
end
|
1017
|
+
|
1018
|
+
# Set user profile image
|
1019
|
+
# Update a user's profile image
|
1020
|
+
# @param user_id [String] The ID of the user to update the profile image for
|
1021
|
+
# @param [Hash] opts the optional parameters
|
1022
|
+
# @option opts [File] :file
|
1023
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
1024
|
+
# POST
|
1025
|
+
def update_profile_image_with_http_info(user_id, opts = {})
|
1026
|
+
if @api_client.config.debugging
|
1027
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.set_user_profile_image ...'
|
1028
|
+
end
|
1029
|
+
# verify the required parameter 'user_id' is set
|
1030
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
1031
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.set_user_profile_image"
|
1032
|
+
end
|
1033
|
+
# resource path
|
1034
|
+
local_var_path = '/users/{user_id}/profile_image'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
1035
|
+
|
1036
|
+
# query parameters
|
1037
|
+
query_params = opts[:query_params] || {}
|
1038
|
+
|
1039
|
+
# header parameters
|
1040
|
+
header_params = opts[:header_params] || {}
|
1041
|
+
# HTTP header 'Accept' (if needed)
|
1042
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1043
|
+
# HTTP header 'Content-Type'
|
1044
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
1045
|
+
if !content_type.nil?
|
1046
|
+
header_params['Content-Type'] = content_type
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
# form parameters
|
1050
|
+
form_params = opts[:form_params] || {}
|
1051
|
+
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
1052
|
+
|
1053
|
+
# http body (model)
|
1054
|
+
post_body = opts[:debug_body]
|
1055
|
+
|
1056
|
+
# return_type
|
1057
|
+
return_type = opts[:debug_return_type] || 'User'
|
1058
|
+
|
1059
|
+
# auth_names
|
1060
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
1061
|
+
|
1062
|
+
new_options = opts.merge(
|
1063
|
+
:operation => :"UsersApi.set_user_profile_image",
|
1064
|
+
:header_params => header_params,
|
1065
|
+
:query_params => query_params,
|
1066
|
+
:form_params => form_params,
|
1067
|
+
:body => post_body,
|
1068
|
+
:auth_names => auth_names,
|
1069
|
+
:return_type => return_type
|
1070
|
+
)
|
1071
|
+
|
1072
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1073
|
+
if @api_client.config.debugging
|
1074
|
+
@api_client.config.logger.debug "API called: UsersApi#set_user_profile_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1075
|
+
end
|
1076
|
+
return data, status_code, headers
|
1077
|
+
end
|
1078
|
+
|
1079
|
+
# Unban a user
|
1080
|
+
# Removes the ban mark from the given user.
|
1081
|
+
# @param user_id [String] The ID of the user to unban
|
1082
|
+
# @param [Hash] opts the optional parameters
|
1083
|
+
# @return [User]
|
1084
|
+
|
1085
|
+
def unban(user_id, opts = {})
|
1086
|
+
data, _status_code, _headers = unban_with_http_info(user_id, opts)
|
1087
|
+
data
|
1088
|
+
end
|
1089
|
+
|
1090
|
+
# Unban a user
|
1091
|
+
# Removes the ban mark from the given user.
|
1092
|
+
# @param user_id [String] The ID of the user to unban
|
1093
|
+
# @param [Hash] opts the optional parameters
|
1094
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
1095
|
+
# POST
|
1096
|
+
def unban_with_http_info(user_id, opts = {})
|
1097
|
+
if @api_client.config.debugging
|
1098
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.unban_user ...'
|
1099
|
+
end
|
1100
|
+
# verify the required parameter 'user_id' is set
|
1101
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
1102
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.unban_user"
|
1103
|
+
end
|
1104
|
+
# resource path
|
1105
|
+
local_var_path = '/users/{user_id}/unban'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
1106
|
+
|
1107
|
+
# query parameters
|
1108
|
+
query_params = opts[:query_params] || {}
|
1109
|
+
|
1110
|
+
# header parameters
|
1111
|
+
header_params = opts[:header_params] || {}
|
1112
|
+
# HTTP header 'Accept' (if needed)
|
1113
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1114
|
+
|
1115
|
+
# form parameters
|
1116
|
+
form_params = opts[:form_params] || {}
|
1117
|
+
|
1118
|
+
# http body (model)
|
1119
|
+
post_body = opts[:debug_body]
|
1120
|
+
|
1121
|
+
# return_type
|
1122
|
+
return_type = opts[:debug_return_type] || 'User'
|
1123
|
+
|
1124
|
+
# auth_names
|
1125
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
1126
|
+
|
1127
|
+
new_options = opts.merge(
|
1128
|
+
:operation => :"UsersApi.unban_user",
|
1129
|
+
:header_params => header_params,
|
1130
|
+
:query_params => query_params,
|
1131
|
+
:form_params => form_params,
|
1132
|
+
:body => post_body,
|
1133
|
+
:auth_names => auth_names,
|
1134
|
+
:return_type => return_type
|
1135
|
+
)
|
1136
|
+
|
1137
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1138
|
+
if @api_client.config.debugging
|
1139
|
+
@api_client.config.logger.debug "API called: UsersApi#unban_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1140
|
+
end
|
1141
|
+
return data, status_code, headers
|
1142
|
+
end
|
1143
|
+
|
1144
|
+
# Unlock a user
|
1145
|
+
# Removes the lock from the given user.
|
1146
|
+
# @param user_id [String] The ID of the user to unlock
|
1147
|
+
# @param [Hash] opts the optional parameters
|
1148
|
+
# @return [User]
|
1149
|
+
|
1150
|
+
def unlock(user_id, opts = {})
|
1151
|
+
data, _status_code, _headers = unlock_with_http_info(user_id, opts)
|
1152
|
+
data
|
1153
|
+
end
|
1154
|
+
|
1155
|
+
# Unlock a user
|
1156
|
+
# Removes the lock from the given user.
|
1157
|
+
# @param user_id [String] The ID of the user to unlock
|
1158
|
+
# @param [Hash] opts the optional parameters
|
1159
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
1160
|
+
# POST
|
1161
|
+
def unlock_with_http_info(user_id, opts = {})
|
1162
|
+
if @api_client.config.debugging
|
1163
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.unlock_user ...'
|
1164
|
+
end
|
1165
|
+
# verify the required parameter 'user_id' is set
|
1166
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
1167
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.unlock_user"
|
1168
|
+
end
|
1169
|
+
# resource path
|
1170
|
+
local_var_path = '/users/{user_id}/unlock'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
1171
|
+
|
1172
|
+
# query parameters
|
1173
|
+
query_params = opts[:query_params] || {}
|
1174
|
+
|
1175
|
+
# header parameters
|
1176
|
+
header_params = opts[:header_params] || {}
|
1177
|
+
# HTTP header 'Accept' (if needed)
|
1178
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1179
|
+
|
1180
|
+
# form parameters
|
1181
|
+
form_params = opts[:form_params] || {}
|
1182
|
+
|
1183
|
+
# http body (model)
|
1184
|
+
post_body = opts[:debug_body]
|
1185
|
+
|
1186
|
+
# return_type
|
1187
|
+
return_type = opts[:debug_return_type] || 'User'
|
1188
|
+
|
1189
|
+
# auth_names
|
1190
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
1191
|
+
|
1192
|
+
new_options = opts.merge(
|
1193
|
+
:operation => :"UsersApi.unlock_user",
|
1194
|
+
:header_params => header_params,
|
1195
|
+
:query_params => query_params,
|
1196
|
+
:form_params => form_params,
|
1197
|
+
:body => post_body,
|
1198
|
+
:auth_names => auth_names,
|
1199
|
+
:return_type => return_type
|
1200
|
+
)
|
1201
|
+
|
1202
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1203
|
+
if @api_client.config.debugging
|
1204
|
+
@api_client.config.logger.debug "API called: UsersApi#unlock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1205
|
+
end
|
1206
|
+
return data, status_code, headers
|
1207
|
+
end
|
1208
|
+
|
1209
|
+
# Update a user
|
1210
|
+
# Update a user's attributes. You can set the user's primary contact identifiers (email address and phone numbers) by updating the `primary_email_address_id` and `primary_phone_number_id` attributes respectively. Both IDs should correspond to verified identifications that belong to the user. You can remove a user's username by setting the username attribute to null or the blank string \"\". This is a destructive action; the identification will be deleted forever. Usernames can be removed only if they are optional in your instance settings and there's at least one other identifier which can be used for authentication. This endpoint allows changing a user's password. When passing the `password` parameter directly you have two further options. You can ignore the password policy checks for your instance by setting the `skip_password_checks` parameter to `true`. You can also choose to sign the user out of all their active sessions on any device once the password is updated. Just set `sign_out_of_other_sessions` to `true`.
|
1211
|
+
# @param user_id [String] The ID of the user to update
|
1212
|
+
# @param update_user_request [UpdateUserRequest]
|
1213
|
+
# @param [Hash] opts the optional parameters
|
1214
|
+
# @return [User]
|
1215
|
+
|
1216
|
+
def update(user_id, update_user_request, opts = {})
|
1217
|
+
data, _status_code, _headers = update_with_http_info(user_id, update_user_request, opts)
|
1218
|
+
data
|
1219
|
+
end
|
1220
|
+
|
1221
|
+
# Update a user
|
1222
|
+
# Update a user's attributes. You can set the user's primary contact identifiers (email address and phone numbers) by updating the `primary_email_address_id` and `primary_phone_number_id` attributes respectively. Both IDs should correspond to verified identifications that belong to the user. You can remove a user's username by setting the username attribute to null or the blank string \"\". This is a destructive action; the identification will be deleted forever. Usernames can be removed only if they are optional in your instance settings and there's at least one other identifier which can be used for authentication. This endpoint allows changing a user's password. When passing the `password` parameter directly you have two further options. You can ignore the password policy checks for your instance by setting the `skip_password_checks` parameter to `true`. You can also choose to sign the user out of all their active sessions on any device once the password is updated. Just set `sign_out_of_other_sessions` to `true`.
|
1223
|
+
# @param user_id [String] The ID of the user to update
|
1224
|
+
# @param update_user_request [UpdateUserRequest]
|
1225
|
+
# @param [Hash] opts the optional parameters
|
1226
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
1227
|
+
# PATCH
|
1228
|
+
def update_with_http_info(user_id, update_user_request, opts = {})
|
1229
|
+
if @api_client.config.debugging
|
1230
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.update_user ...'
|
1231
|
+
end
|
1232
|
+
# verify the required parameter 'user_id' is set
|
1233
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
1234
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.update_user"
|
1235
|
+
end
|
1236
|
+
# verify the required parameter 'update_user_request' is set
|
1237
|
+
if @api_client.config.client_side_validation && update_user_request.nil?
|
1238
|
+
fail ArgumentError, "Missing the required parameter 'update_user_request' when calling UsersApi.update_user"
|
1239
|
+
end
|
1240
|
+
# resource path
|
1241
|
+
local_var_path = '/users/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
1242
|
+
|
1243
|
+
# query parameters
|
1244
|
+
query_params = opts[:query_params] || {}
|
1245
|
+
|
1246
|
+
# header parameters
|
1247
|
+
header_params = opts[:header_params] || {}
|
1248
|
+
# HTTP header 'Accept' (if needed)
|
1249
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1250
|
+
# HTTP header 'Content-Type'
|
1251
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1252
|
+
if !content_type.nil?
|
1253
|
+
header_params['Content-Type'] = content_type
|
1254
|
+
end
|
1255
|
+
|
1256
|
+
# form parameters
|
1257
|
+
form_params = opts[:form_params] || {}
|
1258
|
+
|
1259
|
+
# http body (model)
|
1260
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_user_request)
|
1261
|
+
|
1262
|
+
# return_type
|
1263
|
+
return_type = opts[:debug_return_type] || 'User'
|
1264
|
+
|
1265
|
+
# auth_names
|
1266
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
1267
|
+
|
1268
|
+
new_options = opts.merge(
|
1269
|
+
:operation => :"UsersApi.update_user",
|
1270
|
+
:header_params => header_params,
|
1271
|
+
:query_params => query_params,
|
1272
|
+
:form_params => form_params,
|
1273
|
+
:body => post_body,
|
1274
|
+
:auth_names => auth_names,
|
1275
|
+
:return_type => return_type
|
1276
|
+
)
|
1277
|
+
|
1278
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
1279
|
+
if @api_client.config.debugging
|
1280
|
+
@api_client.config.logger.debug "API called: UsersApi#update_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1281
|
+
end
|
1282
|
+
return data, status_code, headers
|
1283
|
+
end
|
1284
|
+
|
1285
|
+
# Merge and update a user's metadata
|
1286
|
+
# Update a user's metadata attributes by merging existing values with the provided parameters. This endpoint behaves differently than the *Update a user* endpoint. Metadata values will not be replaced entirely. Instead, a deep merge will be performed. Deep means that any nested JSON objects will be merged as well. You can remove metadata keys at any level by setting their value to `null`.
|
1287
|
+
# @param user_id [String] The ID of the user whose metadata will be updated and merged
|
1288
|
+
# @param update_user_metadata_request [UpdateUserMetadataRequest]
|
1289
|
+
# @param [Hash] opts the optional parameters
|
1290
|
+
# @return [User]
|
1291
|
+
|
1292
|
+
def update_metadata(user_id, update_user_metadata_request, opts = {})
|
1293
|
+
data, _status_code, _headers = update_metadata_with_http_info(user_id, update_user_metadata_request, opts)
|
1294
|
+
data
|
1295
|
+
end
|
1296
|
+
|
1297
|
+
# Merge and update a user's metadata
|
1298
|
+
# Update a user's metadata attributes by merging existing values with the provided parameters. This endpoint behaves differently than the *Update a user* endpoint. Metadata values will not be replaced entirely. Instead, a deep merge will be performed. Deep means that any nested JSON objects will be merged as well. You can remove metadata keys at any level by setting their value to `null`.
|
1299
|
+
# @param user_id [String] The ID of the user whose metadata will be updated and merged
|
1300
|
+
# @param update_user_metadata_request [UpdateUserMetadataRequest]
|
1301
|
+
# @param [Hash] opts the optional parameters
|
1302
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
1303
|
+
# PATCH
|
1304
|
+
def update_metadata_with_http_info(user_id, update_user_metadata_request, opts = {})
|
1305
|
+
if @api_client.config.debugging
|
1306
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.update_user_metadata ...'
|
1307
|
+
end
|
1308
|
+
# verify the required parameter 'user_id' is set
|
1309
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
1310
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.update_user_metadata"
|
1311
|
+
end
|
1312
|
+
# verify the required parameter 'update_user_metadata_request' is set
|
1313
|
+
if @api_client.config.client_side_validation && update_user_metadata_request.nil?
|
1314
|
+
fail ArgumentError, "Missing the required parameter 'update_user_metadata_request' when calling UsersApi.update_user_metadata"
|
1315
|
+
end
|
1316
|
+
# resource path
|
1317
|
+
local_var_path = '/users/{user_id}/metadata'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
1318
|
+
|
1319
|
+
# query parameters
|
1320
|
+
query_params = opts[:query_params] || {}
|
1321
|
+
|
1322
|
+
# header parameters
|
1323
|
+
header_params = opts[:header_params] || {}
|
1324
|
+
# HTTP header 'Accept' (if needed)
|
1325
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1326
|
+
# HTTP header 'Content-Type'
|
1327
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1328
|
+
if !content_type.nil?
|
1329
|
+
header_params['Content-Type'] = content_type
|
1330
|
+
end
|
1331
|
+
|
1332
|
+
# form parameters
|
1333
|
+
form_params = opts[:form_params] || {}
|
1334
|
+
|
1335
|
+
# http body (model)
|
1336
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_user_metadata_request)
|
1337
|
+
|
1338
|
+
# return_type
|
1339
|
+
return_type = opts[:debug_return_type] || 'User'
|
1340
|
+
|
1341
|
+
# auth_names
|
1342
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
1343
|
+
|
1344
|
+
new_options = opts.merge(
|
1345
|
+
:operation => :"UsersApi.update_user_metadata",
|
1346
|
+
:header_params => header_params,
|
1347
|
+
:query_params => query_params,
|
1348
|
+
:form_params => form_params,
|
1349
|
+
:body => post_body,
|
1350
|
+
:auth_names => auth_names,
|
1351
|
+
:return_type => return_type
|
1352
|
+
)
|
1353
|
+
|
1354
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
1355
|
+
if @api_client.config.debugging
|
1356
|
+
@api_client.config.logger.debug "API called: UsersApi#update_user_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1357
|
+
end
|
1358
|
+
return data, status_code, headers
|
1359
|
+
end
|
1360
|
+
|
1361
|
+
# Delete a user passkey
|
1362
|
+
# Delete the passkey identification for a given user and notify them through email.
|
1363
|
+
# @param user_id [String] The ID of the user that owns the passkey identity
|
1364
|
+
# @param passkey_identification_id [String] The ID of the passkey identity to be deleted
|
1365
|
+
# @param [Hash] opts the optional parameters
|
1366
|
+
# @return [DeletedObject]
|
1367
|
+
|
1368
|
+
def delete_passkey(user_id, passkey_identification_id, opts = {})
|
1369
|
+
data, _status_code, _headers = delete_passkey_with_http_info(user_id, passkey_identification_id, opts)
|
1370
|
+
data
|
1371
|
+
end
|
1372
|
+
|
1373
|
+
# Delete a user passkey
|
1374
|
+
# Delete the passkey identification for a given user and notify them through email.
|
1375
|
+
# @param user_id [String] The ID of the user that owns the passkey identity
|
1376
|
+
# @param passkey_identification_id [String] The ID of the passkey identity to be deleted
|
1377
|
+
# @param [Hash] opts the optional parameters
|
1378
|
+
# @return [Array<(DeletedObject, Integer, Hash)>] DeletedObject data, response status code and response headers
|
1379
|
+
# DELETE
|
1380
|
+
def delete_passkey_with_http_info(user_id, passkey_identification_id, opts = {})
|
1381
|
+
if @api_client.config.debugging
|
1382
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.user_passkey_delete ...'
|
1383
|
+
end
|
1384
|
+
# verify the required parameter 'user_id' is set
|
1385
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
1386
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.user_passkey_delete"
|
1387
|
+
end
|
1388
|
+
# verify the required parameter 'passkey_identification_id' is set
|
1389
|
+
if @api_client.config.client_side_validation && passkey_identification_id.nil?
|
1390
|
+
fail ArgumentError, "Missing the required parameter 'passkey_identification_id' when calling UsersApi.user_passkey_delete"
|
1391
|
+
end
|
1392
|
+
# resource path
|
1393
|
+
local_var_path = '/users/{user_id}/passkeys/{passkey_identification_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'passkey_identification_id' + '}', CGI.escape(passkey_identification_id.to_s))
|
1394
|
+
|
1395
|
+
# query parameters
|
1396
|
+
query_params = opts[:query_params] || {}
|
1397
|
+
|
1398
|
+
# header parameters
|
1399
|
+
header_params = opts[:header_params] || {}
|
1400
|
+
# HTTP header 'Accept' (if needed)
|
1401
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1402
|
+
|
1403
|
+
# form parameters
|
1404
|
+
form_params = opts[:form_params] || {}
|
1405
|
+
|
1406
|
+
# http body (model)
|
1407
|
+
post_body = opts[:debug_body]
|
1408
|
+
|
1409
|
+
# return_type
|
1410
|
+
return_type = opts[:debug_return_type] || 'DeletedObject'
|
1411
|
+
|
1412
|
+
# auth_names
|
1413
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
1414
|
+
|
1415
|
+
new_options = opts.merge(
|
1416
|
+
:operation => :"UsersApi.user_passkey_delete",
|
1417
|
+
:header_params => header_params,
|
1418
|
+
:query_params => query_params,
|
1419
|
+
:form_params => form_params,
|
1420
|
+
:body => post_body,
|
1421
|
+
:auth_names => auth_names,
|
1422
|
+
:return_type => return_type
|
1423
|
+
)
|
1424
|
+
|
1425
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
1426
|
+
if @api_client.config.debugging
|
1427
|
+
@api_client.config.logger.debug "API called: UsersApi#user_passkey_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1428
|
+
end
|
1429
|
+
return data, status_code, headers
|
1430
|
+
end
|
1431
|
+
|
1432
|
+
# Delete a user web3 wallet
|
1433
|
+
# Delete the web3 wallet identification for a given user.
|
1434
|
+
# @param user_id [String] The ID of the user that owns the web3 wallet
|
1435
|
+
# @param web3_wallet_identification_id [String] The ID of the web3 wallet identity to be deleted
|
1436
|
+
# @param [Hash] opts the optional parameters
|
1437
|
+
# @return [DeletedObject]
|
1438
|
+
|
1439
|
+
def delete_web3_wallet(user_id, web3_wallet_identification_id, opts = {})
|
1440
|
+
data, _status_code, _headers = delete_web3_wallet_with_http_info(user_id, web3_wallet_identification_id, opts)
|
1441
|
+
data
|
1442
|
+
end
|
1443
|
+
|
1444
|
+
# Delete a user web3 wallet
|
1445
|
+
# Delete the web3 wallet identification for a given user.
|
1446
|
+
# @param user_id [String] The ID of the user that owns the web3 wallet
|
1447
|
+
# @param web3_wallet_identification_id [String] The ID of the web3 wallet identity to be deleted
|
1448
|
+
# @param [Hash] opts the optional parameters
|
1449
|
+
# @return [Array<(DeletedObject, Integer, Hash)>] DeletedObject data, response status code and response headers
|
1450
|
+
# DELETE
|
1451
|
+
def delete_web3_wallet_with_http_info(user_id, web3_wallet_identification_id, opts = {})
|
1452
|
+
if @api_client.config.debugging
|
1453
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.user_web3_wallet_delete ...'
|
1454
|
+
end
|
1455
|
+
# verify the required parameter 'user_id' is set
|
1456
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
1457
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.user_web3_wallet_delete"
|
1458
|
+
end
|
1459
|
+
# verify the required parameter 'web3_wallet_identification_id' is set
|
1460
|
+
if @api_client.config.client_side_validation && web3_wallet_identification_id.nil?
|
1461
|
+
fail ArgumentError, "Missing the required parameter 'web3_wallet_identification_id' when calling UsersApi.user_web3_wallet_delete"
|
1462
|
+
end
|
1463
|
+
# resource path
|
1464
|
+
local_var_path = '/users/{user_id}/web3_wallets/{web3_wallet_identification_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'web3_wallet_identification_id' + '}', CGI.escape(web3_wallet_identification_id.to_s))
|
1465
|
+
|
1466
|
+
# query parameters
|
1467
|
+
query_params = opts[:query_params] || {}
|
1468
|
+
|
1469
|
+
# header parameters
|
1470
|
+
header_params = opts[:header_params] || {}
|
1471
|
+
# HTTP header 'Accept' (if needed)
|
1472
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1473
|
+
|
1474
|
+
# form parameters
|
1475
|
+
form_params = opts[:form_params] || {}
|
1476
|
+
|
1477
|
+
# http body (model)
|
1478
|
+
post_body = opts[:debug_body]
|
1479
|
+
|
1480
|
+
# return_type
|
1481
|
+
return_type = opts[:debug_return_type] || 'DeletedObject'
|
1482
|
+
|
1483
|
+
# auth_names
|
1484
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
1485
|
+
|
1486
|
+
new_options = opts.merge(
|
1487
|
+
:operation => :"UsersApi.user_web3_wallet_delete",
|
1488
|
+
:header_params => header_params,
|
1489
|
+
:query_params => query_params,
|
1490
|
+
:form_params => form_params,
|
1491
|
+
:body => post_body,
|
1492
|
+
:auth_names => auth_names,
|
1493
|
+
:return_type => return_type
|
1494
|
+
)
|
1495
|
+
|
1496
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
1497
|
+
if @api_client.config.debugging
|
1498
|
+
@api_client.config.logger.debug "API called: UsersApi#user_web3_wallet_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1499
|
+
end
|
1500
|
+
return data, status_code, headers
|
1501
|
+
end
|
1502
|
+
|
1503
|
+
# Retrieve all invitations for a user
|
1504
|
+
# Retrieve a paginated list of the user's organization invitations
|
1505
|
+
# @param user_id [String] The ID of the user whose organization invitations we want to retrieve
|
1506
|
+
# @param [Hash] opts the optional parameters
|
1507
|
+
# @option opts [Float] :limit Applies a limit to the number of results returned. Can be used for paginating the results together with `offset`. (default to 10)
|
1508
|
+
# @option opts [Float] :offset Skip the first `offset` results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with `limit`. (default to 0)
|
1509
|
+
# @option opts [String] :status Filter organization invitations based on their status
|
1510
|
+
# @return [OrganizationInvitationsWithPublicOrganizationData]
|
1511
|
+
|
1512
|
+
def organization_invitations(user_id, opts = {})
|
1513
|
+
data, _status_code, _headers = organization_invitations_with_http_info(user_id, opts)
|
1514
|
+
data
|
1515
|
+
end
|
1516
|
+
|
1517
|
+
# Retrieve all invitations for a user
|
1518
|
+
# Retrieve a paginated list of the user's organization invitations
|
1519
|
+
# @param user_id [String] The ID of the user whose organization invitations we want to retrieve
|
1520
|
+
# @param [Hash] opts the optional parameters
|
1521
|
+
# @option opts [Float] :limit Applies a limit to the number of results returned. Can be used for paginating the results together with `offset`. (default to 10)
|
1522
|
+
# @option opts [Float] :offset Skip the first `offset` results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with `limit`. (default to 0)
|
1523
|
+
# @option opts [String] :status Filter organization invitations based on their status
|
1524
|
+
# @return [Array<(OrganizationInvitationsWithPublicOrganizationData, Integer, Hash)>] OrganizationInvitationsWithPublicOrganizationData data, response status code and response headers
|
1525
|
+
# GET
|
1526
|
+
def organization_invitations_with_http_info(user_id, opts = {})
|
1527
|
+
if @api_client.config.debugging
|
1528
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.users_get_organization_invitations ...'
|
1529
|
+
end
|
1530
|
+
# verify the required parameter 'user_id' is set
|
1531
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
1532
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.users_get_organization_invitations"
|
1533
|
+
end
|
1534
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
1535
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.users_get_organization_invitations, must be smaller than or equal to 500.'
|
1536
|
+
end
|
1537
|
+
|
1538
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
1539
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.users_get_organization_invitations, must be greater than or equal to 1.'
|
1540
|
+
end
|
1541
|
+
|
1542
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
1543
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling UsersApi.users_get_organization_invitations, must be greater than or equal to 0.'
|
1544
|
+
end
|
1545
|
+
|
1546
|
+
allowable_values = ["pending", "accepted", "revoked"]
|
1547
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
1548
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
1549
|
+
end
|
1550
|
+
# resource path
|
1551
|
+
local_var_path = '/users/{user_id}/organization_invitations'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
1552
|
+
|
1553
|
+
# query parameters
|
1554
|
+
query_params = opts[:query_params] || {}
|
1555
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1556
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
1557
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
1558
|
+
|
1559
|
+
# header parameters
|
1560
|
+
header_params = opts[:header_params] || {}
|
1561
|
+
# HTTP header 'Accept' (if needed)
|
1562
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1563
|
+
|
1564
|
+
# form parameters
|
1565
|
+
form_params = opts[:form_params] || {}
|
1566
|
+
|
1567
|
+
# http body (model)
|
1568
|
+
post_body = opts[:debug_body]
|
1569
|
+
|
1570
|
+
# return_type
|
1571
|
+
return_type = opts[:debug_return_type] || 'OrganizationInvitationsWithPublicOrganizationData'
|
1572
|
+
|
1573
|
+
# auth_names
|
1574
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
1575
|
+
|
1576
|
+
new_options = opts.merge(
|
1577
|
+
:operation => :"UsersApi.users_get_organization_invitations",
|
1578
|
+
:header_params => header_params,
|
1579
|
+
:query_params => query_params,
|
1580
|
+
:form_params => form_params,
|
1581
|
+
:body => post_body,
|
1582
|
+
:auth_names => auth_names,
|
1583
|
+
:return_type => return_type
|
1584
|
+
)
|
1585
|
+
|
1586
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1587
|
+
if @api_client.config.debugging
|
1588
|
+
@api_client.config.logger.debug "API called: UsersApi#users_get_organization_invitations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1589
|
+
end
|
1590
|
+
return data, status_code, headers
|
1591
|
+
end
|
1592
|
+
|
1593
|
+
# Retrieve all memberships for a user
|
1594
|
+
# Retrieve a paginated list of the user's organization memberships
|
1595
|
+
# @param user_id [String] The ID of the user whose organization memberships we want to retrieve
|
1596
|
+
# @param [Hash] opts the optional parameters
|
1597
|
+
# @option opts [Float] :limit Applies a limit to the number of results returned. Can be used for paginating the results together with `offset`. (default to 10)
|
1598
|
+
# @option opts [Float] :offset Skip the first `offset` results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with `limit`. (default to 0)
|
1599
|
+
# @return [OrganizationMemberships]
|
1600
|
+
|
1601
|
+
def organization_memberships(user_id, opts = {})
|
1602
|
+
data, _status_code, _headers = organization_memberships_with_http_info(user_id, opts)
|
1603
|
+
data
|
1604
|
+
end
|
1605
|
+
|
1606
|
+
# Retrieve all memberships for a user
|
1607
|
+
# Retrieve a paginated list of the user's organization memberships
|
1608
|
+
# @param user_id [String] The ID of the user whose organization memberships we want to retrieve
|
1609
|
+
# @param [Hash] opts the optional parameters
|
1610
|
+
# @option opts [Float] :limit Applies a limit to the number of results returned. Can be used for paginating the results together with `offset`. (default to 10)
|
1611
|
+
# @option opts [Float] :offset Skip the first `offset` results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with `limit`. (default to 0)
|
1612
|
+
# @return [Array<(OrganizationMemberships, Integer, Hash)>] OrganizationMemberships data, response status code and response headers
|
1613
|
+
# GET
|
1614
|
+
def organization_memberships_with_http_info(user_id, opts = {})
|
1615
|
+
if @api_client.config.debugging
|
1616
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.users_get_organization_memberships ...'
|
1617
|
+
end
|
1618
|
+
# verify the required parameter 'user_id' is set
|
1619
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
1620
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.users_get_organization_memberships"
|
1621
|
+
end
|
1622
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
1623
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.users_get_organization_memberships, must be smaller than or equal to 500.'
|
1624
|
+
end
|
1625
|
+
|
1626
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
1627
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.users_get_organization_memberships, must be greater than or equal to 1.'
|
1628
|
+
end
|
1629
|
+
|
1630
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
1631
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling UsersApi.users_get_organization_memberships, must be greater than or equal to 0.'
|
1632
|
+
end
|
1633
|
+
|
1634
|
+
# resource path
|
1635
|
+
local_var_path = '/users/{user_id}/organization_memberships'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
1636
|
+
|
1637
|
+
# query parameters
|
1638
|
+
query_params = opts[:query_params] || {}
|
1639
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1640
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
1641
|
+
|
1642
|
+
# header parameters
|
1643
|
+
header_params = opts[:header_params] || {}
|
1644
|
+
# HTTP header 'Accept' (if needed)
|
1645
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1646
|
+
|
1647
|
+
# form parameters
|
1648
|
+
form_params = opts[:form_params] || {}
|
1649
|
+
|
1650
|
+
# http body (model)
|
1651
|
+
post_body = opts[:debug_body]
|
1652
|
+
|
1653
|
+
# return_type
|
1654
|
+
return_type = opts[:debug_return_type] || 'OrganizationMemberships'
|
1655
|
+
|
1656
|
+
# auth_names
|
1657
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
1658
|
+
|
1659
|
+
new_options = opts.merge(
|
1660
|
+
:operation => :"UsersApi.users_get_organization_memberships",
|
1661
|
+
:header_params => header_params,
|
1662
|
+
:query_params => query_params,
|
1663
|
+
:form_params => form_params,
|
1664
|
+
:body => post_body,
|
1665
|
+
:auth_names => auth_names,
|
1666
|
+
:return_type => return_type
|
1667
|
+
)
|
1668
|
+
|
1669
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1670
|
+
if @api_client.config.debugging
|
1671
|
+
@api_client.config.logger.debug "API called: UsersApi#users_get_organization_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1672
|
+
end
|
1673
|
+
return data, status_code, headers
|
1674
|
+
end
|
1675
|
+
|
1676
|
+
# Verify the password of a user
|
1677
|
+
# Check that the user's password matches the supplied input. Useful for custom auth flows and re-verification.
|
1678
|
+
# @param user_id [String] The ID of the user for whom to verify the password
|
1679
|
+
# @param verify_password_request [VerifyPasswordRequest]
|
1680
|
+
# @param [Hash] opts the optional parameters
|
1681
|
+
# @return [VerifyPassword200Response]
|
1682
|
+
|
1683
|
+
def verify_password(user_id, verify_password_request, opts = {})
|
1684
|
+
data, _status_code, _headers = verify_password_with_http_info(user_id, verify_password_request, opts)
|
1685
|
+
data
|
1686
|
+
end
|
1687
|
+
|
1688
|
+
# Verify the password of a user
|
1689
|
+
# Check that the user's password matches the supplied input. Useful for custom auth flows and re-verification.
|
1690
|
+
# @param user_id [String] The ID of the user for whom to verify the password
|
1691
|
+
# @param verify_password_request [VerifyPasswordRequest]
|
1692
|
+
# @param [Hash] opts the optional parameters
|
1693
|
+
# @return [Array<(VerifyPassword200Response, Integer, Hash)>] VerifyPassword200Response data, response status code and response headers
|
1694
|
+
# POST
|
1695
|
+
def verify_password_with_http_info(user_id, verify_password_request, opts = {})
|
1696
|
+
if @api_client.config.debugging
|
1697
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.verify_password ...'
|
1698
|
+
end
|
1699
|
+
# verify the required parameter 'user_id' is set
|
1700
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
1701
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.verify_password"
|
1702
|
+
end
|
1703
|
+
# verify the required parameter 'verify_password_request' is set
|
1704
|
+
if @api_client.config.client_side_validation && verify_password_request.nil?
|
1705
|
+
fail ArgumentError, "Missing the required parameter 'verify_password_request' when calling UsersApi.verify_password"
|
1706
|
+
end
|
1707
|
+
# resource path
|
1708
|
+
local_var_path = '/users/{user_id}/verify_password'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
1709
|
+
|
1710
|
+
# query parameters
|
1711
|
+
query_params = opts[:query_params] || {}
|
1712
|
+
|
1713
|
+
# header parameters
|
1714
|
+
header_params = opts[:header_params] || {}
|
1715
|
+
# HTTP header 'Accept' (if needed)
|
1716
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1717
|
+
# HTTP header 'Content-Type'
|
1718
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1719
|
+
if !content_type.nil?
|
1720
|
+
header_params['Content-Type'] = content_type
|
1721
|
+
end
|
1722
|
+
|
1723
|
+
# form parameters
|
1724
|
+
form_params = opts[:form_params] || {}
|
1725
|
+
|
1726
|
+
# http body (model)
|
1727
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(verify_password_request)
|
1728
|
+
|
1729
|
+
# return_type
|
1730
|
+
return_type = opts[:debug_return_type] || 'VerifyPassword200Response'
|
1731
|
+
|
1732
|
+
# auth_names
|
1733
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
1734
|
+
|
1735
|
+
new_options = opts.merge(
|
1736
|
+
:operation => :"UsersApi.verify_password",
|
1737
|
+
:header_params => header_params,
|
1738
|
+
:query_params => query_params,
|
1739
|
+
:form_params => form_params,
|
1740
|
+
:body => post_body,
|
1741
|
+
:auth_names => auth_names,
|
1742
|
+
:return_type => return_type
|
1743
|
+
)
|
1744
|
+
|
1745
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1746
|
+
if @api_client.config.debugging
|
1747
|
+
@api_client.config.logger.debug "API called: UsersApi#verify_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1748
|
+
end
|
1749
|
+
return data, status_code, headers
|
1750
|
+
end
|
1751
|
+
|
1752
|
+
# Verify a TOTP or backup code for a user
|
1753
|
+
# Verify that the provided TOTP or backup code is valid for the user. Verifying a backup code will result it in being consumed (i.e. it will become invalid). Useful for custom auth flows and re-verification.
|
1754
|
+
# @param user_id [String] The ID of the user for whom to verify the TOTP
|
1755
|
+
# @param verify_totp_request [VerifyTOTPRequest]
|
1756
|
+
# @param [Hash] opts the optional parameters
|
1757
|
+
# @return [VerifyTOTP200Response]
|
1758
|
+
|
1759
|
+
def verify_totp(user_id, verify_totp_request, opts = {})
|
1760
|
+
data, _status_code, _headers = verify_totp_with_http_info(user_id, verify_totp_request, opts)
|
1761
|
+
data
|
1762
|
+
end
|
1763
|
+
|
1764
|
+
# Verify a TOTP or backup code for a user
|
1765
|
+
# Verify that the provided TOTP or backup code is valid for the user. Verifying a backup code will result it in being consumed (i.e. it will become invalid). Useful for custom auth flows and re-verification.
|
1766
|
+
# @param user_id [String] The ID of the user for whom to verify the TOTP
|
1767
|
+
# @param verify_totp_request [VerifyTOTPRequest]
|
1768
|
+
# @param [Hash] opts the optional parameters
|
1769
|
+
# @return [Array<(VerifyTOTP200Response, Integer, Hash)>] VerifyTOTP200Response data, response status code and response headers
|
1770
|
+
# POST
|
1771
|
+
def verify_totp_with_http_info(user_id, verify_totp_request, opts = {})
|
1772
|
+
if @api_client.config.debugging
|
1773
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.verify_totp ...'
|
1774
|
+
end
|
1775
|
+
# verify the required parameter 'user_id' is set
|
1776
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
1777
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.verify_totp"
|
1778
|
+
end
|
1779
|
+
# verify the required parameter 'verify_totp_request' is set
|
1780
|
+
if @api_client.config.client_side_validation && verify_totp_request.nil?
|
1781
|
+
fail ArgumentError, "Missing the required parameter 'verify_totp_request' when calling UsersApi.verify_totp"
|
1782
|
+
end
|
1783
|
+
# resource path
|
1784
|
+
local_var_path = '/users/{user_id}/verify_totp'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
1785
|
+
|
1786
|
+
# query parameters
|
1787
|
+
query_params = opts[:query_params] || {}
|
1788
|
+
|
1789
|
+
# header parameters
|
1790
|
+
header_params = opts[:header_params] || {}
|
1791
|
+
# HTTP header 'Accept' (if needed)
|
1792
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1793
|
+
# HTTP header 'Content-Type'
|
1794
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1795
|
+
if !content_type.nil?
|
1796
|
+
header_params['Content-Type'] = content_type
|
1797
|
+
end
|
1798
|
+
|
1799
|
+
# form parameters
|
1800
|
+
form_params = opts[:form_params] || {}
|
1801
|
+
|
1802
|
+
# http body (model)
|
1803
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(verify_totp_request)
|
1804
|
+
|
1805
|
+
# return_type
|
1806
|
+
return_type = opts[:debug_return_type] || 'VerifyTOTP200Response'
|
1807
|
+
|
1808
|
+
# auth_names
|
1809
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
1810
|
+
|
1811
|
+
new_options = opts.merge(
|
1812
|
+
:operation => :"UsersApi.verify_totp",
|
1813
|
+
:header_params => header_params,
|
1814
|
+
:query_params => query_params,
|
1815
|
+
:form_params => form_params,
|
1816
|
+
:body => post_body,
|
1817
|
+
:auth_names => auth_names,
|
1818
|
+
:return_type => return_type
|
1819
|
+
)
|
1820
|
+
|
1821
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1822
|
+
if @api_client.config.debugging
|
1823
|
+
@api_client.config.logger.debug "API called: UsersApi#verify_totp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1824
|
+
end
|
1825
|
+
return data, status_code, headers
|
1826
|
+
end
|
1827
|
+
end
|
1828
|
+
end
|