clerk-http-client 1.0.0 → 2.0.0.beta2
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 +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +155 -191
- data/clerk-http-client.gemspec +1 -1
- data/docs/ActorTokensApi.md +26 -26
- data/docs/AllowListBlockListApi.md +72 -74
- data/docs/BetaFeaturesApi.md +42 -41
- data/docs/ClientsApi.md +36 -37
- data/docs/CreateBulkInvitationsRequestInner.md +28 -0
- data/docs/CreateInvitationRequest.md +6 -4
- data/docs/{CreateOAuthApplicationRequest.md → CreateOauthApplicationRequest.md} +1 -1
- data/docs/CreateOrganizationInvitationBulkRequestInner.md +2 -2
- data/docs/CreateOrganizationInvitationRequest.md +5 -3
- data/docs/CreateOrganizationRequest.md +3 -3
- data/docs/CreateSAMLConnectionRequest.md +2 -0
- data/docs/CreateSessionRequest.md +18 -0
- data/docs/CreateSessionToken200Response.md +20 -0
- data/docs/CreateSessionTokenFromTemplateRequest.md +18 -0
- data/docs/CreateSessionTokenRequest.md +18 -0
- data/docs/CreateUserRequest.md +3 -3
- data/docs/CreateWaitlistEntryRequest.md +20 -0
- data/docs/DomainsApi.md +46 -48
- data/docs/EmailAddress.md +2 -0
- data/docs/EmailAddressVerification.md +3 -3
- data/docs/EmailAddressesApi.md +52 -52
- data/docs/EmailSMSTemplatesApi.md +60 -66
- data/docs/FromOauth.md +26 -0
- data/docs/FromOauthError.md +47 -0
- data/docs/{GetOAuthAccessToken200ResponseInner.md → GetOauthAccessToken200ResponseInner.md} +4 -2
- data/docs/Instance.md +24 -0
- data/docs/InstanceSettingsApi.md +114 -45
- data/docs/Invitation.md +1 -1
- data/docs/InvitationsApi.md +110 -38
- data/docs/JWKS.md +18 -0
- data/docs/JWKSApi.md +14 -15
- data/docs/JWKSKeysInner.md +32 -0
- data/docs/JWTTemplatesApi.md +62 -63
- data/docs/ListWaitlistEntries200Response.md +20 -0
- data/docs/MergeOrganizationMetadataRequest.md +2 -2
- data/docs/MiscellaneousApi.md +11 -7
- data/docs/{OAuthApplication.md → OauthApplication.md} +4 -0
- data/docs/{OAuthApplicationWithSecret.md → OauthApplicationWithSecret.md} +4 -0
- data/docs/{OAuthApplicationsApi.md → OauthApplicationsApi.md} +90 -94
- data/docs/Organization.md +2 -2
- data/docs/OrganizationDomainApi.md +15 -13
- data/docs/OrganizationDomainsApi.md +103 -33
- data/docs/OrganizationInvitation.md +6 -2
- data/docs/OrganizationInvitationWithPublicOrganizationData.md +4 -2
- data/docs/OrganizationInvitationsApi.md +76 -81
- data/docs/OrganizationMembership.md +2 -2
- data/docs/OrganizationMembershipsApi.md +66 -70
- data/docs/OrganizationWithLogo.md +2 -2
- data/docs/OrganizationsApi.md +87 -93
- data/docs/PhoneNumbersApi.md +52 -52
- data/docs/ProxyChecksApi.md +16 -15
- data/docs/{RedirectURLsApi.md → RedirectUrlsApi.md} +46 -48
- data/docs/RevokeInvitation200Response.md +1 -1
- data/docs/SAML.md +1 -1
- data/docs/SAMLAccount.md +1 -1
- data/docs/SAMLConnectionsApi.md +59 -60
- data/docs/SchemasSAMLConnection.md +2 -0
- data/docs/SessionsApi.md +203 -60
- data/docs/SignInTokensApi.md +26 -26
- data/docs/SignUp.md +4 -2
- data/docs/SignUpsApi.md +16 -15
- data/docs/TestingTokensApi.md +11 -12
- data/docs/UpdateOrganizationMembershipMetadataRequest.md +2 -2
- data/docs/UpdateOrganizationRequest.md +2 -2
- data/docs/UpdateSAMLConnectionRequest.md +2 -0
- data/docs/UpdateUserRequest.md +3 -3
- data/docs/User.md +3 -3
- data/docs/UsersApi.md +297 -294
- data/docs/WaitlistEntriesApi.md +157 -0
- data/docs/WaitlistEntry.md +32 -0
- data/docs/WaitlistEntryInvitation.md +36 -0
- data/docs/WebhooksApi.md +30 -33
- data/lib/clerk-http-client/api/actor_tokens_api.rb +10 -14
- data/lib/clerk-http-client/api/allow_list_block_list_api.rb +25 -33
- data/lib/clerk-http-client/api/beta_features_api.rb +13 -21
- data/lib/clerk-http-client/api/clients_api.rb +13 -17
- data/lib/clerk-http-client/api/domains_api.rb +16 -20
- data/lib/clerk-http-client/api/email_addresses_api.rb +19 -27
- data/lib/clerk-http-client/api/email_sms_templates_api.rb +19 -19
- data/lib/clerk-http-client/api/instance_settings_api.rb +78 -31
- data/lib/clerk-http-client/api/invitations_api.rb +82 -17
- data/lib/clerk-http-client/api/jwks_api.rb +7 -7
- data/lib/clerk-http-client/api/jwt_templates_api.rb +22 -30
- data/lib/clerk-http-client/api/miscellaneous_api.rb +4 -4
- data/lib/clerk-http-client/api/{o_auth_applications_api.rb → oauth_applications_api.rb} +53 -57
- data/lib/clerk-http-client/api/organization_domains_api.rb +92 -10
- data/lib/clerk-http-client/api/organization_invitations_api.rb +25 -29
- data/lib/clerk-http-client/api/organization_memberships_api.rb +22 -26
- data/lib/clerk-http-client/api/organizations_api.rb +30 -34
- data/lib/clerk-http-client/api/phone_numbers_api.rb +19 -27
- data/lib/clerk-http-client/api/proxy_checks_api.rb +7 -11
- data/lib/clerk-http-client/api/redirect_urls_api.rb +16 -20
- data/lib/clerk-http-client/api/saml_connections_api.rb +22 -23
- data/lib/clerk-http-client/api/sessions_api.rb +165 -20
- data/lib/clerk-http-client/api/sign_in_tokens_api.rb +10 -14
- data/lib/clerk-http-client/api/sign_ups_api.rb +7 -11
- data/lib/clerk-http-client/api/testing_tokens_api.rb +6 -6
- data/lib/clerk-http-client/api/users_api.rb +149 -92
- data/lib/clerk-http-client/api/waitlist_entries_api.rb +178 -0
- data/lib/clerk-http-client/api/webhooks_api.rb +10 -10
- data/lib/clerk-http-client/api_client.rb +1 -1
- data/lib/clerk-http-client/api_error.rb +1 -1
- data/lib/clerk-http-client/configuration.rb +1 -1
- data/lib/clerk-http-client/models/actor_token.rb +2 -1
- data/lib/clerk-http-client/models/add_domain_request.rb +2 -1
- data/lib/clerk-http-client/models/admin.rb +2 -1
- data/lib/clerk-http-client/models/allowlist_identifier.rb +2 -1
- data/lib/clerk-http-client/models/blocklist_identifier.rb +2 -1
- data/lib/clerk-http-client/models/blocklist_identifiers.rb +2 -1
- data/lib/clerk-http-client/models/change_production_instance_domain_request.rb +2 -1
- data/lib/clerk-http-client/models/clerk_error.rb +2 -1
- data/lib/clerk-http-client/models/clerk_errors.rb +2 -1
- data/lib/clerk-http-client/models/client.rb +2 -1
- data/lib/clerk-http-client/models/{c_name_target.rb → cname_target.rb} +2 -1
- data/lib/clerk-http-client/models/create_actor_token_request.rb +2 -1
- data/lib/clerk-http-client/models/create_allowlist_identifier_request.rb +2 -1
- data/lib/clerk-http-client/models/create_blocklist_identifier_request.rb +2 -1
- data/lib/clerk-http-client/models/create_bulk_invitations_request_inner.rb +306 -0
- data/lib/clerk-http-client/models/create_email_address_request.rb +2 -1
- data/lib/clerk-http-client/models/create_invitation_request.rb +58 -10
- data/lib/clerk-http-client/models/create_jwt_template_request.rb +2 -1
- data/lib/clerk-http-client/models/{create_o_auth_application_request.rb → create_oauth_application_request.rb} +2 -8
- data/lib/clerk-http-client/models/create_organization_domain_request.rb +2 -1
- data/lib/clerk-http-client/models/create_organization_invitation_bulk_request_inner.rb +12 -7
- data/lib/clerk-http-client/models/create_organization_invitation_request.rb +51 -11
- data/lib/clerk-http-client/models/create_organization_membership_request.rb +2 -1
- data/lib/clerk-http-client/models/create_organization_request.rb +10 -12
- data/lib/clerk-http-client/models/create_phone_number_request.rb +2 -1
- data/lib/clerk-http-client/models/create_redirect_url_request.rb +2 -1
- data/lib/clerk-http-client/models/create_saml_connection_request.rb +14 -2
- data/lib/clerk-http-client/models/create_saml_connection_request_attribute_mapping.rb +2 -1
- data/lib/clerk-http-client/models/create_session_request.rb +216 -0
- data/lib/clerk-http-client/models/create_session_token200_response.rb +258 -0
- data/lib/clerk-http-client/models/create_session_token_from_template_request.rb +241 -0
- data/lib/clerk-http-client/models/create_session_token_request.rb +241 -0
- data/lib/clerk-http-client/models/create_sign_in_token_request.rb +2 -1
- data/lib/clerk-http-client/models/create_user_request.rb +14 -7
- data/lib/clerk-http-client/models/create_waitlist_entry_request.rb +233 -0
- data/lib/clerk-http-client/models/deleted_object.rb +2 -1
- data/lib/clerk-http-client/models/disable_mfa200_response.rb +2 -1
- data/lib/clerk-http-client/models/domain.rb +2 -1
- data/lib/clerk-http-client/models/domains.rb +2 -1
- data/lib/clerk-http-client/models/email_address.rb +13 -2
- data/lib/clerk-http-client/models/email_address_verification.rb +6 -3
- data/lib/clerk-http-client/models/from_o_auth.rb +324 -0
- data/{resources/templates/partial_anyof_module.mustache → lib/clerk-http-client/models/from_o_auth_error.rb} +29 -19
- data/lib/clerk-http-client/models/from_oauth.rb +325 -0
- data/{resources/templates/partial_oneof_module.mustache → lib/clerk-http-client/models/from_oauth_error.rb} +24 -54
- data/lib/clerk-http-client/models/{get_o_auth_access_token200_response_inner.rb → get_oauth_access_token200_response_inner.rb} +21 -7
- data/lib/clerk-http-client/models/identification_link.rb +4 -3
- data/lib/clerk-http-client/models/instance.rb +280 -0
- data/lib/clerk-http-client/models/instance_restrictions.rb +2 -1
- data/lib/clerk-http-client/models/invitation.rb +6 -3
- data/lib/clerk-http-client/models/jwks.rb +217 -0
- data/lib/clerk-http-client/models/jwks_keys_inner.rb +278 -0
- data/lib/clerk-http-client/models/jwt_template.rb +2 -1
- data/lib/clerk-http-client/models/list_waitlist_entries200_response.rb +241 -0
- data/lib/clerk-http-client/models/merge_organization_metadata_request.rb +10 -5
- data/lib/clerk-http-client/models/o_auth_application.rb +34 -2
- data/lib/clerk-http-client/models/o_auth_application_with_secret.rb +34 -2
- data/lib/clerk-http-client/models/o_auth_applications.rb +1 -1
- data/lib/clerk-http-client/models/oauth.rb +2 -2
- data/lib/clerk-http-client/models/oauth_application.rb +482 -0
- data/lib/clerk-http-client/models/oauth_application_with_secret.rb +499 -0
- data/lib/clerk-http-client/models/oauth_applications.rb +241 -0
- data/lib/clerk-http-client/models/organization.rb +11 -5
- data/lib/clerk-http-client/models/organization_domain.rb +2 -1
- data/lib/clerk-http-client/models/organization_domain_verification.rb +2 -1
- data/lib/clerk-http-client/models/organization_domains.rb +2 -1
- data/lib/clerk-http-client/models/organization_invitation.rb +32 -6
- data/lib/clerk-http-client/models/organization_invitation_with_public_organization_data.rb +21 -6
- data/lib/clerk-http-client/models/organization_invitation_with_public_organization_data_public_organization_data.rb +2 -1
- data/lib/clerk-http-client/models/organization_invitations.rb +2 -1
- data/lib/clerk-http-client/models/organization_invitations_with_public_organization_data.rb +2 -1
- data/lib/clerk-http-client/models/organization_membership.rb +10 -5
- data/lib/clerk-http-client/models/organization_membership_public_user_data.rb +2 -1
- data/lib/clerk-http-client/models/organization_memberships.rb +2 -1
- data/lib/clerk-http-client/models/organization_settings.rb +2 -1
- data/lib/clerk-http-client/models/organization_with_logo.rb +11 -5
- data/lib/clerk-http-client/models/organizations.rb +2 -1
- data/lib/clerk-http-client/models/otp.rb +2 -1
- data/lib/clerk-http-client/models/passkey.rb +2 -1
- data/lib/clerk-http-client/models/phone_number.rb +2 -1
- data/lib/clerk-http-client/models/phone_number_verification.rb +4 -1
- data/lib/clerk-http-client/models/preview_template_request.rb +2 -1
- data/lib/clerk-http-client/models/proxy_check.rb +2 -1
- data/lib/clerk-http-client/models/redirect_url.rb +2 -1
- data/lib/clerk-http-client/models/revoke_invitation200_response.rb +6 -3
- data/lib/clerk-http-client/models/revoke_organization_invitation_request.rb +2 -1
- data/lib/clerk-http-client/models/saml.rb +3 -2
- data/lib/clerk-http-client/models/saml_account.rb +6 -3
- data/lib/clerk-http-client/models/saml_account_saml_connection.rb +4 -1
- data/lib/clerk-http-client/models/saml_account_verification.rb +4 -1
- data/lib/clerk-http-client/models/saml_connection.rb +2 -1
- data/lib/clerk-http-client/models/saml_connections.rb +2 -1
- data/lib/clerk-http-client/models/schemas_passkey.rb +2 -1
- data/lib/clerk-http-client/models/schemas_passkey_verification.rb +4 -1
- data/lib/clerk-http-client/models/schemas_saml_connection.rb +13 -2
- data/lib/clerk-http-client/models/schemas_saml_connection_attribute_mapping.rb +2 -1
- data/lib/clerk-http-client/models/session.rb +2 -1
- data/lib/clerk-http-client/models/session_latest_activity.rb +2 -1
- data/lib/clerk-http-client/models/sign_in_token.rb +2 -1
- data/lib/clerk-http-client/models/sign_up.rb +22 -6
- data/lib/clerk-http-client/models/svix_url.rb +2 -1
- data/lib/clerk-http-client/models/template.rb +2 -1
- data/lib/clerk-http-client/models/testing_token.rb +2 -1
- data/lib/clerk-http-client/models/ticket.rb +2 -1
- data/lib/clerk-http-client/models/toggle_template_delivery_request.rb +2 -1
- data/lib/clerk-http-client/models/total_count.rb +2 -1
- data/lib/clerk-http-client/models/totp.rb +2 -1
- data/lib/clerk-http-client/models/update_domain_request.rb +2 -1
- data/lib/clerk-http-client/models/update_email_address_request.rb +2 -1
- data/lib/clerk-http-client/models/update_instance_auth_config200_response.rb +2 -1
- data/lib/clerk-http-client/models/update_instance_auth_config_request.rb +2 -1
- data/lib/clerk-http-client/models/update_instance_organization_settings_request.rb +2 -1
- data/lib/clerk-http-client/models/update_instance_request.rb +2 -1
- data/lib/clerk-http-client/models/update_instance_restrictions_request.rb +2 -1
- data/lib/clerk-http-client/models/{update_o_auth_application_request.rb → update_oauth_application_request.rb} +2 -1
- data/lib/clerk-http-client/models/update_organization_domain_request.rb +2 -1
- data/lib/clerk-http-client/models/update_organization_membership_metadata_request.rb +10 -5
- data/lib/clerk-http-client/models/update_organization_membership_request.rb +2 -1
- data/lib/clerk-http-client/models/update_organization_request.rb +10 -5
- data/lib/clerk-http-client/models/update_phone_number_request.rb +2 -1
- data/lib/clerk-http-client/models/update_production_instance_domain_request.rb +2 -1
- data/lib/clerk-http-client/models/update_saml_connection_request.rb +14 -2
- data/lib/clerk-http-client/models/update_saml_connection_request_attribute_mapping.rb +2 -1
- data/lib/clerk-http-client/models/update_sign_up_request.rb +2 -1
- data/lib/clerk-http-client/models/update_user_metadata_request.rb +2 -1
- data/lib/clerk-http-client/models/update_user_request.rb +14 -7
- data/lib/clerk-http-client/models/upsert_template_request.rb +2 -1
- data/lib/clerk-http-client/models/user.rb +14 -7
- data/lib/clerk-http-client/models/verify_client_request.rb +2 -1
- data/lib/clerk-http-client/models/verify_domain_proxy_request.rb +2 -1
- data/lib/clerk-http-client/models/verify_password200_response.rb +2 -1
- data/lib/clerk-http-client/models/verify_password_request.rb +2 -1
- data/lib/clerk-http-client/models/verify_session_request.rb +2 -1
- data/lib/clerk-http-client/models/verify_totp200_response.rb +2 -1
- data/lib/clerk-http-client/models/verify_totp_request.rb +2 -1
- data/lib/clerk-http-client/models/waitlist_entry.rb +370 -0
- data/lib/clerk-http-client/models/waitlist_entry_invitation.rb +397 -0
- data/lib/clerk-http-client/models/web3_signature.rb +4 -3
- data/lib/clerk-http-client/models/web3_wallet.rb +2 -1
- data/lib/clerk-http-client/models/web3_wallet_verification.rb +4 -1
- data/lib/clerk-http-client/version.rb +1 -1
- data/lib/clerk-http-client.rb +56 -59
- data/spec/api/actor_tokens_api_spec.rb +1 -1
- data/spec/api/allow_list_block_list_api_spec.rb +2 -2
- data/spec/api/beta_features_api_spec.rb +2 -2
- data/spec/api/clients_api_spec.rb +1 -1
- data/spec/api/domains_api_spec.rb +1 -1
- data/spec/api/email_addresses_api_spec.rb +2 -2
- data/spec/api/instance_settings_api_spec.rb +3 -3
- data/spec/api/invitations_api_spec.rb +1 -1
- data/spec/api/jwt_templates_api_spec.rb +2 -2
- data/spec/api/{o_auth_applications_api_spec.rb → oauth_applications_api_spec.rb} +15 -15
- data/spec/api/organizations_api_spec.rb +1 -1
- data/spec/api/phone_numbers_api_spec.rb +2 -2
- data/spec/api/proxy_checks_api_spec.rb +1 -1
- data/spec/api/redirect_urls_api_spec.rb +1 -1
- data/spec/api/saml_connections_api_spec.rb +1 -1
- data/spec/api/sign_in_tokens_api_spec.rb +1 -1
- data/spec/api/sign_ups_api_spec.rb +1 -1
- data/spec/api/users_api_spec.rb +3 -3
- data/spec/api/waitlist_entries_api_spec.rb +63 -0
- data/spec/models/cname_target_spec.rb +48 -0
- data/spec/models/create_bulk_invitations_request_inner_spec.rb +66 -0
- data/spec/models/create_oauth_application_request_spec.rb +54 -0
- data/spec/models/create_session_request_spec.rb +36 -0
- data/spec/models/create_session_token200_response_spec.rb +46 -0
- data/spec/models/create_session_token_from_template_request_spec.rb +36 -0
- data/spec/models/create_session_token_request_spec.rb +36 -0
- data/spec/models/create_waitlist_entry_request_spec.rb +42 -0
- data/spec/models/from_o_auth_error_spec.rb +32 -0
- data/spec/models/from_o_auth_spec.rb +64 -0
- data/spec/models/from_oauth_error_spec.rb +32 -0
- data/spec/models/from_oauth_spec.rb +64 -0
- data/spec/models/get_oauth_access_token200_response_inner_spec.rb +90 -0
- data/spec/models/identification_link_spec.rb +1 -1
- data/spec/models/instance_spec.rb +58 -0
- data/spec/models/jwks_keys_inner_spec.rb +78 -0
- data/spec/models/jwks_spec.rb +36 -0
- data/spec/models/list_waitlist_entries200_response_spec.rb +42 -0
- data/spec/models/oauth_application_spec.rb +124 -0
- data/spec/models/oauth_application_with_secret_spec.rb +130 -0
- data/spec/models/oauth_applications_spec.rb +42 -0
- data/spec/models/oauth_spec.rb +1 -1
- data/spec/models/update_oauth_application_request_spec.rb +48 -0
- data/spec/models/waitlist_entry_invitation_spec.rb +98 -0
- data/spec/models/waitlist_entry_spec.rb +86 -0
- data/spec/spec_helper.rb +1 -1
- metadata +104 -65
- data/bin/fmt +0 -5
- data/bin/generate +0 -8
- data/bin/setup +0 -7
- data/openapitools.json +0 -7
- 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 +0 -7238
- data/resources/templates/Gemfile.mustache +0 -9
- data/resources/templates/README.mustache +0 -163
- data/resources/templates/Rakefile.mustache +0 -10
- data/resources/templates/api.mustache +0 -257
- data/resources/templates/api_client.mustache +0 -246
- data/resources/templates/api_client_faraday_partial.mustache +0 -200
- data/resources/templates/api_client_httpx_partial.mustache +0 -134
- data/resources/templates/api_client_typhoeus_partial.mustache +0 -161
- data/resources/templates/api_doc.mustache +0 -132
- data/resources/templates/api_error.mustache +0 -50
- data/resources/templates/api_info.mustache +0 -12
- data/resources/templates/api_test.mustache +0 -47
- data/resources/templates/base_object.mustache +0 -114
- data/resources/templates/configuration.mustache +0 -491
- data/resources/templates/configuration_faraday_partial.mustache +0 -40
- data/resources/templates/configuration_httpx_partial.mustache +0 -11
- data/resources/templates/configuration_typhoeus_partial.mustache +0 -41
- data/resources/templates/gem.mustache +0 -89
- data/resources/templates/gemspec.mustache +0 -41
- data/resources/templates/git_push.sh.mustache +0 -57
- data/resources/templates/gitignore.mustache +0 -39
- data/resources/templates/gitlab-ci.mustache +0 -26
- data/resources/templates/model.mustache +0 -33
- data/resources/templates/model_doc.mustache +0 -12
- data/resources/templates/model_test.mustache +0 -82
- data/resources/templates/partial_model_enum_class.mustache +0 -23
- data/resources/templates/partial_model_generic.mustache +0 -377
- data/resources/templates/partial_model_generic_doc.mustache +0 -28
- data/resources/templates/partial_oneof_module_doc.mustache +0 -93
- data/resources/templates/rspec.mustache +0 -2
- data/resources/templates/rubocop.mustache +0 -148
- data/resources/templates/spec_helper.mustache +0 -103
- data/resources/templates/travis.mustache +0 -11
- data/resources/templates/version.mustache +0 -7
- data/sdk-generator-config.json +0 -25
- /data/docs/{CNameTarget.md → CnameTarget.md} +0 -0
- /data/docs/{CreateRedirectURLRequest.md → CreateRedirectUrlRequest.md} +0 -0
- /data/docs/{OAuthApplications.md → OauthApplications.md} +0 -0
- /data/docs/{RedirectURL.md → RedirectUrl.md} +0 -0
- /data/docs/{SvixURL.md → SvixUrl.md} +0 -0
- /data/docs/{UpdateOAuthApplicationRequest.md → UpdateOauthApplicationRequest.md} +0 -0
data/docs/OrganizationsApi.md
CHANGED
@@ -16,50 +16,51 @@ All URIs are relative to *https://api.clerk.com/v1*
|
|
16
16
|
|
17
17
|
## create_organization
|
18
18
|
|
19
|
-
> <Organization> create_organization(
|
19
|
+
> <Organization> create_organization(opts)
|
20
20
|
|
21
21
|
Create an organization
|
22
22
|
|
23
|
-
Creates a new organization with the given name for an instance.
|
23
|
+
Creates a new organization with the given name for an instance. 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
24
|
|
25
25
|
### Examples
|
26
26
|
|
27
27
|
```ruby
|
28
28
|
require 'time'
|
29
|
-
require 'clerk
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
config.
|
29
|
+
require 'clerk'
|
30
|
+
|
31
|
+
## Setup
|
32
|
+
Clerk.configure do |config|
|
33
|
+
config.secret_key = 'sk_test_xxxxxxxxx'
|
34
34
|
end
|
35
35
|
|
36
|
-
|
37
|
-
create_organization_request
|
36
|
+
opts = {
|
37
|
+
create_organization_request: ClerkHttpClient::CreateOrganizationRequest.new({name: 'name_example'}) # CreateOrganizationRequest |
|
38
|
+
}
|
38
39
|
|
39
40
|
begin
|
40
41
|
# Create an organization
|
41
|
-
result =
|
42
|
+
result = Clerk::SDK.organizations.create_organization(opts)
|
42
43
|
p result
|
43
44
|
rescue ClerkHttpClient::ApiError => e
|
44
|
-
puts "Error when calling
|
45
|
+
puts "Error when calling Clerk::SDK.organizations->create_organization: #{e}"
|
45
46
|
end
|
46
47
|
```
|
47
48
|
|
48
|
-
#### Using the create_organization_with_http_info variant
|
49
|
+
#### Using the `create_organization_with_http_info variant
|
49
50
|
|
50
51
|
This returns an Array which contains the response data, status code and headers.
|
51
52
|
|
52
|
-
> <Array(<Organization>, Integer, Hash)> create_organization_with_http_info(
|
53
|
+
> <Array(<Organization>, Integer, Hash)> create_organization_with_http_info(opts)
|
53
54
|
|
54
55
|
```ruby
|
55
56
|
begin
|
56
57
|
# Create an organization
|
57
|
-
data, status_code, headers =
|
58
|
+
data, status_code, headers = Clerk::SDK.organizations.create_organization_with_http_info(opts)
|
58
59
|
p status_code # => 2xx
|
59
60
|
p headers # => { ... }
|
60
61
|
p data # => <Organization>
|
61
62
|
rescue ClerkHttpClient::ApiError => e
|
62
|
-
puts "Error when calling
|
63
|
+
puts "Error when calling Clerk::SDK.organizations->create_organization_with_http_info: #{e}"
|
63
64
|
end
|
64
65
|
```
|
65
66
|
|
@@ -67,7 +68,7 @@ end
|
|
67
68
|
|
68
69
|
| Name | Type | Description | Notes |
|
69
70
|
| ---- | ---- | ----------- | ----- |
|
70
|
-
| **create_organization_request** | [**CreateOrganizationRequest**](CreateOrganizationRequest.md) | |
|
71
|
+
| **create_organization_request** | [**CreateOrganizationRequest**](CreateOrganizationRequest.md) | | [optional] |
|
71
72
|
|
72
73
|
### Return type
|
73
74
|
|
@@ -95,26 +96,25 @@ Deletes the given organization. Please note that deleting an organization will a
|
|
95
96
|
|
96
97
|
```ruby
|
97
98
|
require 'time'
|
98
|
-
require 'clerk
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
config.
|
99
|
+
require 'clerk'
|
100
|
+
|
101
|
+
## Setup
|
102
|
+
Clerk.configure do |config|
|
103
|
+
config.secret_key = 'sk_test_xxxxxxxxx'
|
103
104
|
end
|
104
105
|
|
105
|
-
api_instance = ClerkHttpClient::OrganizationsApi.new
|
106
106
|
organization_id = 'organization_id_example' # String | The ID of the organization to delete
|
107
107
|
|
108
108
|
begin
|
109
109
|
# Delete an organization
|
110
|
-
result =
|
110
|
+
result = Clerk::SDK.organizations.delete_organization(organization_id)
|
111
111
|
p result
|
112
112
|
rescue ClerkHttpClient::ApiError => e
|
113
|
-
puts "Error when calling
|
113
|
+
puts "Error when calling Clerk::SDK.organizations->delete_organization: #{e}"
|
114
114
|
end
|
115
115
|
```
|
116
116
|
|
117
|
-
#### Using the delete_organization_with_http_info variant
|
117
|
+
#### Using the `delete_organization_with_http_info variant
|
118
118
|
|
119
119
|
This returns an Array which contains the response data, status code and headers.
|
120
120
|
|
@@ -123,12 +123,12 @@ This returns an Array which contains the response data, status code and headers.
|
|
123
123
|
```ruby
|
124
124
|
begin
|
125
125
|
# Delete an organization
|
126
|
-
data, status_code, headers =
|
126
|
+
data, status_code, headers = Clerk::SDK.organizations.delete_organization_with_http_info(organization_id)
|
127
127
|
p status_code # => 2xx
|
128
128
|
p headers # => { ... }
|
129
129
|
p data # => <DeletedObject>
|
130
130
|
rescue ClerkHttpClient::ApiError => e
|
131
|
-
puts "Error when calling
|
131
|
+
puts "Error when calling Clerk::SDK.organizations->delete_organization_with_http_info: #{e}"
|
132
132
|
end
|
133
133
|
```
|
134
134
|
|
@@ -164,26 +164,25 @@ Delete the organization's logo.
|
|
164
164
|
|
165
165
|
```ruby
|
166
166
|
require 'time'
|
167
|
-
require 'clerk
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
config.
|
167
|
+
require 'clerk'
|
168
|
+
|
169
|
+
## Setup
|
170
|
+
Clerk.configure do |config|
|
171
|
+
config.secret_key = 'sk_test_xxxxxxxxx'
|
172
172
|
end
|
173
173
|
|
174
|
-
api_instance = ClerkHttpClient::OrganizationsApi.new
|
175
174
|
organization_id = 'organization_id_example' # String | The ID of the organization for which the logo will be deleted.
|
176
175
|
|
177
176
|
begin
|
178
177
|
|
179
|
-
result =
|
178
|
+
result = Clerk::SDK.organizations.delete_organization_logo(organization_id)
|
180
179
|
p result
|
181
180
|
rescue ClerkHttpClient::ApiError => e
|
182
|
-
puts "Error when calling
|
181
|
+
puts "Error when calling Clerk::SDK.organizations->delete_organization_logo: #{e}"
|
183
182
|
end
|
184
183
|
```
|
185
184
|
|
186
|
-
#### Using the delete_organization_logo_with_http_info variant
|
185
|
+
#### Using the `delete_organization_logo_with_http_info variant
|
187
186
|
|
188
187
|
This returns an Array which contains the response data, status code and headers.
|
189
188
|
|
@@ -192,12 +191,12 @@ This returns an Array which contains the response data, status code and headers.
|
|
192
191
|
```ruby
|
193
192
|
begin
|
194
193
|
|
195
|
-
data, status_code, headers =
|
194
|
+
data, status_code, headers = Clerk::SDK.organizations.delete_organization_logo_with_http_info(organization_id)
|
196
195
|
p status_code # => 2xx
|
197
196
|
p headers # => { ... }
|
198
197
|
p data # => <Organization>
|
199
198
|
rescue ClerkHttpClient::ApiError => e
|
200
|
-
puts "Error when calling
|
199
|
+
puts "Error when calling Clerk::SDK.organizations->delete_organization_logo_with_http_info: #{e}"
|
201
200
|
end
|
202
201
|
```
|
203
202
|
|
@@ -233,14 +232,13 @@ Fetches the organization whose ID or slug matches the provided `id_or_slug` URL
|
|
233
232
|
|
234
233
|
```ruby
|
235
234
|
require 'time'
|
236
|
-
require 'clerk
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
config.
|
235
|
+
require 'clerk'
|
236
|
+
|
237
|
+
## Setup
|
238
|
+
Clerk.configure do |config|
|
239
|
+
config.secret_key = 'sk_test_xxxxxxxxx'
|
241
240
|
end
|
242
241
|
|
243
|
-
api_instance = ClerkHttpClient::OrganizationsApi.new
|
244
242
|
organization_id = 'organization_id_example' # String | The ID or slug of the organization
|
245
243
|
opts = {
|
246
244
|
include_members_count: true # Boolean | Flag to denote whether or not the organization's members count should be included in the response.
|
@@ -248,14 +246,14 @@ opts = {
|
|
248
246
|
|
249
247
|
begin
|
250
248
|
# Retrieve an organization by ID or slug
|
251
|
-
result =
|
249
|
+
result = Clerk::SDK.organizations.get_organization(organization_id, opts)
|
252
250
|
p result
|
253
251
|
rescue ClerkHttpClient::ApiError => e
|
254
|
-
puts "Error when calling
|
252
|
+
puts "Error when calling Clerk::SDK.organizations->get_organization: #{e}"
|
255
253
|
end
|
256
254
|
```
|
257
255
|
|
258
|
-
#### Using the get_organization_with_http_info variant
|
256
|
+
#### Using the `get_organization_with_http_info variant
|
259
257
|
|
260
258
|
This returns an Array which contains the response data, status code and headers.
|
261
259
|
|
@@ -264,12 +262,12 @@ This returns an Array which contains the response data, status code and headers.
|
|
264
262
|
```ruby
|
265
263
|
begin
|
266
264
|
# Retrieve an organization by ID or slug
|
267
|
-
data, status_code, headers =
|
265
|
+
data, status_code, headers = Clerk::SDK.organizations.get_organization_with_http_info(organization_id, opts)
|
268
266
|
p status_code # => 2xx
|
269
267
|
p headers # => { ... }
|
270
268
|
p data # => <Organization>
|
271
269
|
rescue ClerkHttpClient::ApiError => e
|
272
|
-
puts "Error when calling
|
270
|
+
puts "Error when calling Clerk::SDK.organizations->get_organization_with_http_info: #{e}"
|
273
271
|
end
|
274
272
|
```
|
275
273
|
|
@@ -306,14 +304,13 @@ This request returns the list of organizations for an instance. Results can be p
|
|
306
304
|
|
307
305
|
```ruby
|
308
306
|
require 'time'
|
309
|
-
require 'clerk
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
config.
|
307
|
+
require 'clerk'
|
308
|
+
|
309
|
+
## Setup
|
310
|
+
Clerk.configure do |config|
|
311
|
+
config.secret_key = 'sk_test_xxxxxxxxx'
|
314
312
|
end
|
315
313
|
|
316
|
-
api_instance = ClerkHttpClient::OrganizationsApi.new
|
317
314
|
opts = {
|
318
315
|
limit: 8.14, # Float | Applies a limit to the number of results returned. Can be used for paginating the results together with `offset`.
|
319
316
|
offset: 8.14, # Float | Skip the first `offset` results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with `limit`.
|
@@ -324,14 +321,14 @@ opts = {
|
|
324
321
|
|
325
322
|
begin
|
326
323
|
# Get a list of organizations for an instance
|
327
|
-
result =
|
324
|
+
result = Clerk::SDK.organizations.list_organizations(opts)
|
328
325
|
p result
|
329
326
|
rescue ClerkHttpClient::ApiError => e
|
330
|
-
puts "Error when calling
|
327
|
+
puts "Error when calling Clerk::SDK.organizations->list_organizations: #{e}"
|
331
328
|
end
|
332
329
|
```
|
333
330
|
|
334
|
-
#### Using the list_organizations_with_http_info variant
|
331
|
+
#### Using the `list_organizations_with_http_info variant
|
335
332
|
|
336
333
|
This returns an Array which contains the response data, status code and headers.
|
337
334
|
|
@@ -340,12 +337,12 @@ This returns an Array which contains the response data, status code and headers.
|
|
340
337
|
```ruby
|
341
338
|
begin
|
342
339
|
# Get a list of organizations for an instance
|
343
|
-
data, status_code, headers =
|
340
|
+
data, status_code, headers = Clerk::SDK.organizations.list_organizations_with_http_info(opts)
|
344
341
|
p status_code # => 2xx
|
345
342
|
p headers # => { ... }
|
346
343
|
p data # => <Organizations>
|
347
344
|
rescue ClerkHttpClient::ApiError => e
|
348
|
-
puts "Error when calling
|
345
|
+
puts "Error when calling Clerk::SDK.organizations->list_organizations_with_http_info: #{e}"
|
349
346
|
end
|
350
347
|
```
|
351
348
|
|
@@ -385,27 +382,26 @@ Update organization metadata attributes by merging existing values with the prov
|
|
385
382
|
|
386
383
|
```ruby
|
387
384
|
require 'time'
|
388
|
-
require 'clerk
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
config.
|
385
|
+
require 'clerk'
|
386
|
+
|
387
|
+
## Setup
|
388
|
+
Clerk.configure do |config|
|
389
|
+
config.secret_key = 'sk_test_xxxxxxxxx'
|
393
390
|
end
|
394
391
|
|
395
|
-
api_instance = ClerkHttpClient::OrganizationsApi.new
|
396
392
|
organization_id = 'organization_id_example' # String | The ID of the organization for which metadata will be merged or updated
|
397
393
|
merge_organization_metadata_request = ClerkHttpClient::MergeOrganizationMetadataRequest.new # MergeOrganizationMetadataRequest |
|
398
394
|
|
399
395
|
begin
|
400
396
|
# Merge and update metadata for an organization
|
401
|
-
result =
|
397
|
+
result = Clerk::SDK.organizations.merge_organization_metadata(organization_id, merge_organization_metadata_request)
|
402
398
|
p result
|
403
399
|
rescue ClerkHttpClient::ApiError => e
|
404
|
-
puts "Error when calling
|
400
|
+
puts "Error when calling Clerk::SDK.organizations->merge_organization_metadata: #{e}"
|
405
401
|
end
|
406
402
|
```
|
407
403
|
|
408
|
-
#### Using the merge_organization_metadata_with_http_info variant
|
404
|
+
#### Using the `merge_organization_metadata_with_http_info variant
|
409
405
|
|
410
406
|
This returns an Array which contains the response data, status code and headers.
|
411
407
|
|
@@ -414,12 +410,12 @@ This returns an Array which contains the response data, status code and headers.
|
|
414
410
|
```ruby
|
415
411
|
begin
|
416
412
|
# Merge and update metadata for an organization
|
417
|
-
data, status_code, headers =
|
413
|
+
data, status_code, headers = Clerk::SDK.organizations.merge_organization_metadata_with_http_info(organization_id, merge_organization_metadata_request)
|
418
414
|
p status_code # => 2xx
|
419
415
|
p headers # => { ... }
|
420
416
|
p data # => <Organization>
|
421
417
|
rescue ClerkHttpClient::ApiError => e
|
422
|
-
puts "Error when calling
|
418
|
+
puts "Error when calling Clerk::SDK.organizations->merge_organization_metadata_with_http_info: #{e}"
|
423
419
|
end
|
424
420
|
```
|
425
421
|
|
@@ -456,27 +452,26 @@ Updates an existing organization
|
|
456
452
|
|
457
453
|
```ruby
|
458
454
|
require 'time'
|
459
|
-
require 'clerk
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
config.
|
455
|
+
require 'clerk'
|
456
|
+
|
457
|
+
## Setup
|
458
|
+
Clerk.configure do |config|
|
459
|
+
config.secret_key = 'sk_test_xxxxxxxxx'
|
464
460
|
end
|
465
461
|
|
466
|
-
api_instance = ClerkHttpClient::OrganizationsApi.new
|
467
462
|
organization_id = 'organization_id_example' # String | The ID of the organization to update
|
468
463
|
update_organization_request = ClerkHttpClient::UpdateOrganizationRequest.new # UpdateOrganizationRequest |
|
469
464
|
|
470
465
|
begin
|
471
466
|
# Update an organization
|
472
|
-
result =
|
467
|
+
result = Clerk::SDK.organizations.update_organization(organization_id, update_organization_request)
|
473
468
|
p result
|
474
469
|
rescue ClerkHttpClient::ApiError => e
|
475
|
-
puts "Error when calling
|
470
|
+
puts "Error when calling Clerk::SDK.organizations->update_organization: #{e}"
|
476
471
|
end
|
477
472
|
```
|
478
473
|
|
479
|
-
#### Using the update_organization_with_http_info variant
|
474
|
+
#### Using the `update_organization_with_http_info variant
|
480
475
|
|
481
476
|
This returns an Array which contains the response data, status code and headers.
|
482
477
|
|
@@ -485,12 +480,12 @@ This returns an Array which contains the response data, status code and headers.
|
|
485
480
|
```ruby
|
486
481
|
begin
|
487
482
|
# Update an organization
|
488
|
-
data, status_code, headers =
|
483
|
+
data, status_code, headers = Clerk::SDK.organizations.update_organization_with_http_info(organization_id, update_organization_request)
|
489
484
|
p status_code # => 2xx
|
490
485
|
p headers # => { ... }
|
491
486
|
p data # => <Organization>
|
492
487
|
rescue ClerkHttpClient::ApiError => e
|
493
|
-
puts "Error when calling
|
488
|
+
puts "Error when calling Clerk::SDK.organizations->update_organization_with_http_info: #{e}"
|
494
489
|
end
|
495
490
|
```
|
496
491
|
|
@@ -527,14 +522,13 @@ Set or replace an organization's logo, by uploading an image file. This endpoint
|
|
527
522
|
|
528
523
|
```ruby
|
529
524
|
require 'time'
|
530
|
-
require 'clerk
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
config.
|
525
|
+
require 'clerk'
|
526
|
+
|
527
|
+
## Setup
|
528
|
+
Clerk.configure do |config|
|
529
|
+
config.secret_key = 'sk_test_xxxxxxxxx'
|
535
530
|
end
|
536
531
|
|
537
|
-
api_instance = ClerkHttpClient::OrganizationsApi.new
|
538
532
|
organization_id = 'organization_id_example' # String | The ID of the organization for which to upload a logo
|
539
533
|
file = File.new('/path/to/some/file') # File |
|
540
534
|
opts = {
|
@@ -543,14 +537,14 @@ opts = {
|
|
543
537
|
|
544
538
|
begin
|
545
539
|
# Upload a logo for the organization
|
546
|
-
result =
|
540
|
+
result = Clerk::SDK.organizations.upload_organization_logo(organization_id, file, opts)
|
547
541
|
p result
|
548
542
|
rescue ClerkHttpClient::ApiError => e
|
549
|
-
puts "Error when calling
|
543
|
+
puts "Error when calling Clerk::SDK.organizations->upload_organization_logo: #{e}"
|
550
544
|
end
|
551
545
|
```
|
552
546
|
|
553
|
-
#### Using the upload_organization_logo_with_http_info variant
|
547
|
+
#### Using the `upload_organization_logo_with_http_info variant
|
554
548
|
|
555
549
|
This returns an Array which contains the response data, status code and headers.
|
556
550
|
|
@@ -559,12 +553,12 @@ This returns an Array which contains the response data, status code and headers.
|
|
559
553
|
```ruby
|
560
554
|
begin
|
561
555
|
# Upload a logo for the organization
|
562
|
-
data, status_code, headers =
|
556
|
+
data, status_code, headers = Clerk::SDK.organizations.upload_organization_logo_with_http_info(organization_id, file, opts)
|
563
557
|
p status_code # => 2xx
|
564
558
|
p headers # => { ... }
|
565
559
|
p data # => <OrganizationWithLogo>
|
566
560
|
rescue ClerkHttpClient::ApiError => e
|
567
|
-
puts "Error when calling
|
561
|
+
puts "Error when calling Clerk::SDK.organizations->upload_organization_logo_with_http_info: #{e}"
|
568
562
|
end
|
569
563
|
```
|
570
564
|
|