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,606 @@
|
|
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 OrganizationsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create an organization
|
23
|
+
# Creates a new organization with the given name for an instance. In order to successfully create an organization you need to provide the ID of the User who will become the organization administrator. You can specify an optional slug for the new organization. If provided, the organization slug can contain only lowercase alphanumeric characters (letters and digits) and the dash \"-\". Organization slugs must be unique for the instance. You can provide additional metadata for the organization and set any custom attribute you want. Organizations support private and public metadata. Private metadata can only be accessed from the Backend API. Public metadata can be accessed from the Backend API, and are read-only from the Frontend API. The `created_by` user will see this as their [active organization] (https://clerk.com/docs/organizations/overview#active-organization) the next time they create a session, presuming they don't explicitly set a different organization as active before then.
|
24
|
+
# @param create_organization_request [CreateOrganizationRequest]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [Organization]
|
27
|
+
|
28
|
+
def create(create_organization_request, opts = {})
|
29
|
+
data, _status_code, _headers = create_with_http_info(create_organization_request, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create an organization
|
34
|
+
# Creates a new organization with the given name for an instance. In order to successfully create an organization you need to provide the ID of the User who will become the organization administrator. You can specify an optional slug for the new organization. If provided, the organization slug can contain only lowercase alphanumeric characters (letters and digits) and the dash \"-\". Organization slugs must be unique for the instance. You can provide additional metadata for the organization and set any custom attribute you want. Organizations support private and public metadata. Private metadata can only be accessed from the Backend API. Public metadata can be accessed from the Backend API, and are read-only from the Frontend API. The `created_by` user will see this as their [active organization] (https://clerk.com/docs/organizations/overview#active-organization) the next time they create a session, presuming they don't explicitly set a different organization as active before then.
|
35
|
+
# @param create_organization_request [CreateOrganizationRequest]
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
|
38
|
+
# POST
|
39
|
+
def create_with_http_info(create_organization_request, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.create_organization ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'create_organization_request' is set
|
44
|
+
if @api_client.config.client_side_validation && create_organization_request.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'create_organization_request' when calling OrganizationsApi.create_organization"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/organizations'
|
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
|
+
# HTTP header 'Content-Type'
|
58
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
59
|
+
if !content_type.nil?
|
60
|
+
header_params['Content-Type'] = content_type
|
61
|
+
end
|
62
|
+
|
63
|
+
# form parameters
|
64
|
+
form_params = opts[:form_params] || {}
|
65
|
+
|
66
|
+
# http body (model)
|
67
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_organization_request)
|
68
|
+
|
69
|
+
# return_type
|
70
|
+
return_type = opts[:debug_return_type] || 'Organization'
|
71
|
+
|
72
|
+
# auth_names
|
73
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
74
|
+
|
75
|
+
new_options = opts.merge(
|
76
|
+
:operation => :"OrganizationsApi.create_organization",
|
77
|
+
:header_params => header_params,
|
78
|
+
:query_params => query_params,
|
79
|
+
:form_params => form_params,
|
80
|
+
:body => post_body,
|
81
|
+
:auth_names => auth_names,
|
82
|
+
:return_type => return_type
|
83
|
+
)
|
84
|
+
|
85
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
86
|
+
if @api_client.config.debugging
|
87
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#create_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
|
92
|
+
# Delete an organization
|
93
|
+
# Deletes the given organization. Please note that deleting an organization will also delete all memberships and invitations. This is not reversible.
|
94
|
+
# @param organization_id [String] The ID of the organization to delete
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @return [DeletedObject]
|
97
|
+
|
98
|
+
def delete(organization_id, opts = {})
|
99
|
+
data, _status_code, _headers = delete_with_http_info(organization_id, opts)
|
100
|
+
data
|
101
|
+
end
|
102
|
+
|
103
|
+
# Delete an organization
|
104
|
+
# Deletes the given organization. Please note that deleting an organization will also delete all memberships and invitations. This is not reversible.
|
105
|
+
# @param organization_id [String] The ID of the organization to delete
|
106
|
+
# @param [Hash] opts the optional parameters
|
107
|
+
# @return [Array<(DeletedObject, Integer, Hash)>] DeletedObject data, response status code and response headers
|
108
|
+
# DELETE
|
109
|
+
def delete_with_http_info(organization_id, opts = {})
|
110
|
+
if @api_client.config.debugging
|
111
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization ...'
|
112
|
+
end
|
113
|
+
# verify the required parameter 'organization_id' is set
|
114
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
115
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.delete_organization"
|
116
|
+
end
|
117
|
+
# resource path
|
118
|
+
local_var_path = '/organizations/{organization_id}'.sub('{' + 'organization_id' + '}', CGI.escape(organization_id.to_s))
|
119
|
+
|
120
|
+
# query parameters
|
121
|
+
query_params = opts[:query_params] || {}
|
122
|
+
|
123
|
+
# header parameters
|
124
|
+
header_params = opts[:header_params] || {}
|
125
|
+
# HTTP header 'Accept' (if needed)
|
126
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
127
|
+
|
128
|
+
# form parameters
|
129
|
+
form_params = opts[:form_params] || {}
|
130
|
+
|
131
|
+
# http body (model)
|
132
|
+
post_body = opts[:debug_body]
|
133
|
+
|
134
|
+
# return_type
|
135
|
+
return_type = opts[:debug_return_type] || 'DeletedObject'
|
136
|
+
|
137
|
+
# auth_names
|
138
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
139
|
+
|
140
|
+
new_options = opts.merge(
|
141
|
+
:operation => :"OrganizationsApi.delete_organization",
|
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(:DELETE, local_var_path, new_options)
|
151
|
+
if @api_client.config.debugging
|
152
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#delete_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
153
|
+
end
|
154
|
+
return data, status_code, headers
|
155
|
+
end
|
156
|
+
|
157
|
+
# Delete the organization's logo.
|
158
|
+
# @param organization_id [String] The ID of the organization for which the logo will be deleted.
|
159
|
+
# @param [Hash] opts the optional parameters
|
160
|
+
# @return [Organization]
|
161
|
+
|
162
|
+
def delete_logo(organization_id, opts = {})
|
163
|
+
data, _status_code, _headers = delete_logo_with_http_info(organization_id, opts)
|
164
|
+
data
|
165
|
+
end
|
166
|
+
|
167
|
+
# Delete the organization's logo.
|
168
|
+
# @param organization_id [String] The ID of the organization for which the logo will be deleted.
|
169
|
+
# @param [Hash] opts the optional parameters
|
170
|
+
# @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
|
171
|
+
# DELETE
|
172
|
+
def delete_logo_with_http_info(organization_id, opts = {})
|
173
|
+
if @api_client.config.debugging
|
174
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization_logo ...'
|
175
|
+
end
|
176
|
+
# verify the required parameter 'organization_id' is set
|
177
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
178
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.delete_organization_logo"
|
179
|
+
end
|
180
|
+
# resource path
|
181
|
+
local_var_path = '/organizations/{organization_id}/logo'.sub('{' + 'organization_id' + '}', CGI.escape(organization_id.to_s))
|
182
|
+
|
183
|
+
# query parameters
|
184
|
+
query_params = opts[:query_params] || {}
|
185
|
+
|
186
|
+
# header parameters
|
187
|
+
header_params = opts[:header_params] || {}
|
188
|
+
# HTTP header 'Accept' (if needed)
|
189
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
190
|
+
|
191
|
+
# form parameters
|
192
|
+
form_params = opts[:form_params] || {}
|
193
|
+
|
194
|
+
# http body (model)
|
195
|
+
post_body = opts[:debug_body]
|
196
|
+
|
197
|
+
# return_type
|
198
|
+
return_type = opts[:debug_return_type] || 'Organization'
|
199
|
+
|
200
|
+
# auth_names
|
201
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
202
|
+
|
203
|
+
new_options = opts.merge(
|
204
|
+
:operation => :"OrganizationsApi.delete_organization_logo",
|
205
|
+
:header_params => header_params,
|
206
|
+
:query_params => query_params,
|
207
|
+
:form_params => form_params,
|
208
|
+
:body => post_body,
|
209
|
+
:auth_names => auth_names,
|
210
|
+
:return_type => return_type
|
211
|
+
)
|
212
|
+
|
213
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
214
|
+
if @api_client.config.debugging
|
215
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#delete_organization_logo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
216
|
+
end
|
217
|
+
return data, status_code, headers
|
218
|
+
end
|
219
|
+
|
220
|
+
# Retrieve an organization by ID or slug
|
221
|
+
# Fetches the organization whose ID or slug matches the provided `id_or_slug` URL query parameter.
|
222
|
+
# @param organization_id [String] The ID or slug of the organization
|
223
|
+
# @param [Hash] opts the optional parameters
|
224
|
+
# @option opts [Boolean] :include_members_count Flag to denote whether or not the organization's members count should be included in the response.
|
225
|
+
# @return [Organization]
|
226
|
+
|
227
|
+
def find(organization_id, opts = {})
|
228
|
+
data, _status_code, _headers = find_with_http_info(organization_id, opts)
|
229
|
+
data
|
230
|
+
end
|
231
|
+
|
232
|
+
# Retrieve an organization by ID or slug
|
233
|
+
# Fetches the organization whose ID or slug matches the provided `id_or_slug` URL query parameter.
|
234
|
+
# @param organization_id [String] The ID or slug of the organization
|
235
|
+
# @param [Hash] opts the optional parameters
|
236
|
+
# @option opts [Boolean] :include_members_count Flag to denote whether or not the organization's members count should be included in the response.
|
237
|
+
# @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
|
238
|
+
# GET
|
239
|
+
def find_with_http_info(organization_id, opts = {})
|
240
|
+
if @api_client.config.debugging
|
241
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization ...'
|
242
|
+
end
|
243
|
+
# verify the required parameter 'organization_id' is set
|
244
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
245
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.get_organization"
|
246
|
+
end
|
247
|
+
# resource path
|
248
|
+
local_var_path = '/organizations/{organization_id}'.sub('{' + 'organization_id' + '}', CGI.escape(organization_id.to_s))
|
249
|
+
|
250
|
+
# query parameters
|
251
|
+
query_params = opts[:query_params] || {}
|
252
|
+
query_params[:'include_members_count'] = opts[:'include_members_count'] if !opts[:'include_members_count'].nil?
|
253
|
+
|
254
|
+
# header parameters
|
255
|
+
header_params = opts[:header_params] || {}
|
256
|
+
# HTTP header 'Accept' (if needed)
|
257
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
258
|
+
|
259
|
+
# form parameters
|
260
|
+
form_params = opts[:form_params] || {}
|
261
|
+
|
262
|
+
# http body (model)
|
263
|
+
post_body = opts[:debug_body]
|
264
|
+
|
265
|
+
# return_type
|
266
|
+
return_type = opts[:debug_return_type] || 'Organization'
|
267
|
+
|
268
|
+
# auth_names
|
269
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
270
|
+
|
271
|
+
new_options = opts.merge(
|
272
|
+
:operation => :"OrganizationsApi.get_organization",
|
273
|
+
:header_params => header_params,
|
274
|
+
:query_params => query_params,
|
275
|
+
:form_params => form_params,
|
276
|
+
:body => post_body,
|
277
|
+
:auth_names => auth_names,
|
278
|
+
:return_type => return_type
|
279
|
+
)
|
280
|
+
|
281
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
282
|
+
if @api_client.config.debugging
|
283
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#get_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
284
|
+
end
|
285
|
+
return data, status_code, headers
|
286
|
+
end
|
287
|
+
|
288
|
+
# Get a list of organizations for an instance
|
289
|
+
# This request returns the list of organizations for an instance. Results can be paginated using the optional `limit` and `offset` query parameters. The organizations are ordered by descending creation date. Most recent organizations will be returned first.
|
290
|
+
# @param [Hash] opts the optional parameters
|
291
|
+
# @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)
|
292
|
+
# @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)
|
293
|
+
# @option opts [Boolean] :include_members_count Flag to denote whether the member counts of each organization should be included in the response or not.
|
294
|
+
# @option opts [String] :query Returns organizations with ID, name, or slug that match the given query. Uses exact match for organization ID and partial match for name and slug.
|
295
|
+
# @option opts [String] :order_by Allows to return organizations in a particular order. At the moment, you can order the returned organizations either by their `name`, `created_at` or `members_count`. In order to specify the direction, you can use the `+/-` symbols prepended in the property to order by. For example, if you want organizations 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. Defaults to `-created_at`. (default to '-created_at')
|
296
|
+
# @return [Organizations]
|
297
|
+
|
298
|
+
def all(opts = {})
|
299
|
+
data, _status_code, _headers = all_with_http_info(opts)
|
300
|
+
data
|
301
|
+
end
|
302
|
+
|
303
|
+
# Get a list of organizations for an instance
|
304
|
+
# This request returns the list of organizations for an instance. Results can be paginated using the optional `limit` and `offset` query parameters. The organizations are ordered by descending creation date. Most recent organizations will be returned first.
|
305
|
+
# @param [Hash] opts the optional parameters
|
306
|
+
# @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)
|
307
|
+
# @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)
|
308
|
+
# @option opts [Boolean] :include_members_count Flag to denote whether the member counts of each organization should be included in the response or not.
|
309
|
+
# @option opts [String] :query Returns organizations with ID, name, or slug that match the given query. Uses exact match for organization ID and partial match for name and slug.
|
310
|
+
# @option opts [String] :order_by Allows to return organizations in a particular order. At the moment, you can order the returned organizations either by their `name`, `created_at` or `members_count`. In order to specify the direction, you can use the `+/-` symbols prepended in the property to order by. For example, if you want organizations 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. Defaults to `-created_at`. (default to '-created_at')
|
311
|
+
# @return [Array<(Organizations, Integer, Hash)>] Organizations data, response status code and response headers
|
312
|
+
# GET
|
313
|
+
def all_with_http_info(opts = {})
|
314
|
+
if @api_client.config.debugging
|
315
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organizations ...'
|
316
|
+
end
|
317
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
318
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrganizationsApi.list_organizations, must be smaller than or equal to 500.'
|
319
|
+
end
|
320
|
+
|
321
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
322
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrganizationsApi.list_organizations, must be greater than or equal to 1.'
|
323
|
+
end
|
324
|
+
|
325
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
326
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling OrganizationsApi.list_organizations, must be greater than or equal to 0.'
|
327
|
+
end
|
328
|
+
|
329
|
+
# resource path
|
330
|
+
local_var_path = '/organizations'
|
331
|
+
|
332
|
+
# query parameters
|
333
|
+
query_params = opts[:query_params] || {}
|
334
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
335
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
336
|
+
query_params[:'include_members_count'] = opts[:'include_members_count'] if !opts[:'include_members_count'].nil?
|
337
|
+
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
338
|
+
query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
|
339
|
+
|
340
|
+
# header parameters
|
341
|
+
header_params = opts[:header_params] || {}
|
342
|
+
# HTTP header 'Accept' (if needed)
|
343
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
344
|
+
|
345
|
+
# form parameters
|
346
|
+
form_params = opts[:form_params] || {}
|
347
|
+
|
348
|
+
# http body (model)
|
349
|
+
post_body = opts[:debug_body]
|
350
|
+
|
351
|
+
# return_type
|
352
|
+
return_type = opts[:debug_return_type] || 'Organizations'
|
353
|
+
|
354
|
+
# auth_names
|
355
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
356
|
+
|
357
|
+
new_options = opts.merge(
|
358
|
+
:operation => :"OrganizationsApi.list_organizations",
|
359
|
+
:header_params => header_params,
|
360
|
+
:query_params => query_params,
|
361
|
+
:form_params => form_params,
|
362
|
+
:body => post_body,
|
363
|
+
:auth_names => auth_names,
|
364
|
+
:return_type => return_type
|
365
|
+
)
|
366
|
+
|
367
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
368
|
+
if @api_client.config.debugging
|
369
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#list_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
370
|
+
end
|
371
|
+
return data, status_code, headers
|
372
|
+
end
|
373
|
+
|
374
|
+
# Merge and update metadata for an organization
|
375
|
+
# Update organization metadata attributes by merging existing values with the provided parameters. Metadata values will be updated via a deep merge. Deep meaning that any nested JSON objects will be merged as well. You can remove metadata keys at any level by setting their value to `null`.
|
376
|
+
# @param organization_id [String] The ID of the organization for which metadata will be merged or updated
|
377
|
+
# @param merge_organization_metadata_request [MergeOrganizationMetadataRequest]
|
378
|
+
# @param [Hash] opts the optional parameters
|
379
|
+
# @return [Organization]
|
380
|
+
|
381
|
+
def merge_metadata(organization_id, merge_organization_metadata_request, opts = {})
|
382
|
+
data, _status_code, _headers = merge_metadata_with_http_info(organization_id, merge_organization_metadata_request, opts)
|
383
|
+
data
|
384
|
+
end
|
385
|
+
|
386
|
+
# Merge and update metadata for an organization
|
387
|
+
# Update organization metadata attributes by merging existing values with the provided parameters. Metadata values will be updated via a deep merge. Deep meaning that any nested JSON objects will be merged as well. You can remove metadata keys at any level by setting their value to `null`.
|
388
|
+
# @param organization_id [String] The ID of the organization for which metadata will be merged or updated
|
389
|
+
# @param merge_organization_metadata_request [MergeOrganizationMetadataRequest]
|
390
|
+
# @param [Hash] opts the optional parameters
|
391
|
+
# @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
|
392
|
+
# PATCH
|
393
|
+
def merge_metadata_with_http_info(organization_id, merge_organization_metadata_request, opts = {})
|
394
|
+
if @api_client.config.debugging
|
395
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.merge_organization_metadata ...'
|
396
|
+
end
|
397
|
+
# verify the required parameter 'organization_id' is set
|
398
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
399
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.merge_organization_metadata"
|
400
|
+
end
|
401
|
+
# verify the required parameter 'merge_organization_metadata_request' is set
|
402
|
+
if @api_client.config.client_side_validation && merge_organization_metadata_request.nil?
|
403
|
+
fail ArgumentError, "Missing the required parameter 'merge_organization_metadata_request' when calling OrganizationsApi.merge_organization_metadata"
|
404
|
+
end
|
405
|
+
# resource path
|
406
|
+
local_var_path = '/organizations/{organization_id}/metadata'.sub('{' + 'organization_id' + '}', CGI.escape(organization_id.to_s))
|
407
|
+
|
408
|
+
# query parameters
|
409
|
+
query_params = opts[:query_params] || {}
|
410
|
+
|
411
|
+
# header parameters
|
412
|
+
header_params = opts[:header_params] || {}
|
413
|
+
# HTTP header 'Accept' (if needed)
|
414
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
415
|
+
# HTTP header 'Content-Type'
|
416
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
417
|
+
if !content_type.nil?
|
418
|
+
header_params['Content-Type'] = content_type
|
419
|
+
end
|
420
|
+
|
421
|
+
# form parameters
|
422
|
+
form_params = opts[:form_params] || {}
|
423
|
+
|
424
|
+
# http body (model)
|
425
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(merge_organization_metadata_request)
|
426
|
+
|
427
|
+
# return_type
|
428
|
+
return_type = opts[:debug_return_type] || 'Organization'
|
429
|
+
|
430
|
+
# auth_names
|
431
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
432
|
+
|
433
|
+
new_options = opts.merge(
|
434
|
+
:operation => :"OrganizationsApi.merge_organization_metadata",
|
435
|
+
:header_params => header_params,
|
436
|
+
:query_params => query_params,
|
437
|
+
:form_params => form_params,
|
438
|
+
:body => post_body,
|
439
|
+
:auth_names => auth_names,
|
440
|
+
:return_type => return_type
|
441
|
+
)
|
442
|
+
|
443
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
444
|
+
if @api_client.config.debugging
|
445
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#merge_organization_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
446
|
+
end
|
447
|
+
return data, status_code, headers
|
448
|
+
end
|
449
|
+
|
450
|
+
# Update an organization
|
451
|
+
# Updates an existing organization
|
452
|
+
# @param organization_id [String] The ID of the organization to update
|
453
|
+
# @param update_organization_request [UpdateOrganizationRequest]
|
454
|
+
# @param [Hash] opts the optional parameters
|
455
|
+
# @return [Organization]
|
456
|
+
|
457
|
+
def update(organization_id, update_organization_request, opts = {})
|
458
|
+
data, _status_code, _headers = update_with_http_info(organization_id, update_organization_request, opts)
|
459
|
+
data
|
460
|
+
end
|
461
|
+
|
462
|
+
# Update an organization
|
463
|
+
# Updates an existing organization
|
464
|
+
# @param organization_id [String] The ID of the organization to update
|
465
|
+
# @param update_organization_request [UpdateOrganizationRequest]
|
466
|
+
# @param [Hash] opts the optional parameters
|
467
|
+
# @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
|
468
|
+
# PATCH
|
469
|
+
def update_with_http_info(organization_id, update_organization_request, opts = {})
|
470
|
+
if @api_client.config.debugging
|
471
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization ...'
|
472
|
+
end
|
473
|
+
# verify the required parameter 'organization_id' is set
|
474
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
475
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization"
|
476
|
+
end
|
477
|
+
# verify the required parameter 'update_organization_request' is set
|
478
|
+
if @api_client.config.client_side_validation && update_organization_request.nil?
|
479
|
+
fail ArgumentError, "Missing the required parameter 'update_organization_request' when calling OrganizationsApi.update_organization"
|
480
|
+
end
|
481
|
+
# resource path
|
482
|
+
local_var_path = '/organizations/{organization_id}'.sub('{' + 'organization_id' + '}', CGI.escape(organization_id.to_s))
|
483
|
+
|
484
|
+
# query parameters
|
485
|
+
query_params = opts[:query_params] || {}
|
486
|
+
|
487
|
+
# header parameters
|
488
|
+
header_params = opts[:header_params] || {}
|
489
|
+
# HTTP header 'Accept' (if needed)
|
490
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
491
|
+
# HTTP header 'Content-Type'
|
492
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
493
|
+
if !content_type.nil?
|
494
|
+
header_params['Content-Type'] = content_type
|
495
|
+
end
|
496
|
+
|
497
|
+
# form parameters
|
498
|
+
form_params = opts[:form_params] || {}
|
499
|
+
|
500
|
+
# http body (model)
|
501
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_request)
|
502
|
+
|
503
|
+
# return_type
|
504
|
+
return_type = opts[:debug_return_type] || 'Organization'
|
505
|
+
|
506
|
+
# auth_names
|
507
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
508
|
+
|
509
|
+
new_options = opts.merge(
|
510
|
+
:operation => :"OrganizationsApi.update_organization",
|
511
|
+
:header_params => header_params,
|
512
|
+
:query_params => query_params,
|
513
|
+
:form_params => form_params,
|
514
|
+
:body => post_body,
|
515
|
+
:auth_names => auth_names,
|
516
|
+
:return_type => return_type
|
517
|
+
)
|
518
|
+
|
519
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
520
|
+
if @api_client.config.debugging
|
521
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#update_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
522
|
+
end
|
523
|
+
return data, status_code, headers
|
524
|
+
end
|
525
|
+
|
526
|
+
# Upload a logo for the organization
|
527
|
+
# Set or replace an organization's logo, by uploading an image file. This endpoint uses the `multipart/form-data` request content type and accepts a file of image type. The file size cannot exceed 10MB. Only the following file content types are supported: `image/jpeg`, `image/png`, `image/gif`, `image/webp`, `image/x-icon`, `image/vnd.microsoft.icon`.
|
528
|
+
# @param organization_id [String] The ID of the organization for which to upload a logo
|
529
|
+
# @param file [File]
|
530
|
+
# @param [Hash] opts the optional parameters
|
531
|
+
# @option opts [String] :uploader_user_id The ID of the user that will be credited with the image upload.
|
532
|
+
# @return [OrganizationWithLogo]
|
533
|
+
|
534
|
+
def upload_logo(organization_id, file, opts = {})
|
535
|
+
data, _status_code, _headers = upload_logo_with_http_info(organization_id, file, opts)
|
536
|
+
data
|
537
|
+
end
|
538
|
+
|
539
|
+
# Upload a logo for the organization
|
540
|
+
# Set or replace an organization's logo, by uploading an image file. This endpoint uses the `multipart/form-data` request content type and accepts a file of image type. The file size cannot exceed 10MB. Only the following file content types are supported: `image/jpeg`, `image/png`, `image/gif`, `image/webp`, `image/x-icon`, `image/vnd.microsoft.icon`.
|
541
|
+
# @param organization_id [String] The ID of the organization for which to upload a logo
|
542
|
+
# @param file [File]
|
543
|
+
# @param [Hash] opts the optional parameters
|
544
|
+
# @option opts [String] :uploader_user_id The ID of the user that will be credited with the image upload.
|
545
|
+
# @return [Array<(OrganizationWithLogo, Integer, Hash)>] OrganizationWithLogo data, response status code and response headers
|
546
|
+
# PUT
|
547
|
+
def upload_logo_with_http_info(organization_id, file, opts = {})
|
548
|
+
if @api_client.config.debugging
|
549
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.upload_organization_logo ...'
|
550
|
+
end
|
551
|
+
# verify the required parameter 'organization_id' is set
|
552
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
553
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.upload_organization_logo"
|
554
|
+
end
|
555
|
+
# verify the required parameter 'file' is set
|
556
|
+
if @api_client.config.client_side_validation && file.nil?
|
557
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling OrganizationsApi.upload_organization_logo"
|
558
|
+
end
|
559
|
+
# resource path
|
560
|
+
local_var_path = '/organizations/{organization_id}/logo'.sub('{' + 'organization_id' + '}', CGI.escape(organization_id.to_s))
|
561
|
+
|
562
|
+
# query parameters
|
563
|
+
query_params = opts[:query_params] || {}
|
564
|
+
|
565
|
+
# header parameters
|
566
|
+
header_params = opts[:header_params] || {}
|
567
|
+
# HTTP header 'Accept' (if needed)
|
568
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
569
|
+
# HTTP header 'Content-Type'
|
570
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
571
|
+
if !content_type.nil?
|
572
|
+
header_params['Content-Type'] = content_type
|
573
|
+
end
|
574
|
+
|
575
|
+
# form parameters
|
576
|
+
form_params = opts[:form_params] || {}
|
577
|
+
form_params['file'] = file
|
578
|
+
form_params['uploader_user_id'] = opts[:'uploader_user_id'] if !opts[:'uploader_user_id'].nil?
|
579
|
+
|
580
|
+
# http body (model)
|
581
|
+
post_body = opts[:debug_body]
|
582
|
+
|
583
|
+
# return_type
|
584
|
+
return_type = opts[:debug_return_type] || 'OrganizationWithLogo'
|
585
|
+
|
586
|
+
# auth_names
|
587
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
588
|
+
|
589
|
+
new_options = opts.merge(
|
590
|
+
:operation => :"OrganizationsApi.upload_organization_logo",
|
591
|
+
:header_params => header_params,
|
592
|
+
:query_params => query_params,
|
593
|
+
:form_params => form_params,
|
594
|
+
:body => post_body,
|
595
|
+
:auth_names => auth_names,
|
596
|
+
:return_type => return_type
|
597
|
+
)
|
598
|
+
|
599
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
600
|
+
if @api_client.config.debugging
|
601
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#upload_organization_logo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
602
|
+
end
|
603
|
+
return data, status_code, headers
|
604
|
+
end
|
605
|
+
end
|
606
|
+
end
|