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,488 @@
|
|
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 EmailSMSTemplatesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Retrieve a template
|
23
|
+
# Returns the details of a template
|
24
|
+
# @param template_type [String] The type of templates to retrieve (email or SMS)
|
25
|
+
# @param slug [String] The slug (i.e. machine-friendly name) of the template to retrieve
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [Template]
|
28
|
+
|
29
|
+
def find(template_type, slug, opts = {})
|
30
|
+
data, _status_code, _headers = find_with_http_info(template_type, slug, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Retrieve a template
|
35
|
+
# Returns the details of a template
|
36
|
+
# @param template_type [String] The type of templates to retrieve (email or SMS)
|
37
|
+
# @param slug [String] The slug (i.e. machine-friendly name) of the template to retrieve
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
40
|
+
# GET
|
41
|
+
def find_with_http_info(template_type, slug, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: EmailSMSTemplatesApi.get_template ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'template_type' is set
|
46
|
+
if @api_client.config.client_side_validation && template_type.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'template_type' when calling EmailSMSTemplatesApi.get_template"
|
48
|
+
end
|
49
|
+
# verify enum value
|
50
|
+
allowable_values = ["email", "sms"]
|
51
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(template_type)
|
52
|
+
fail ArgumentError, "invalid value for \"template_type\", must be one of #{allowable_values}"
|
53
|
+
end
|
54
|
+
# verify the required parameter 'slug' is set
|
55
|
+
if @api_client.config.client_side_validation && slug.nil?
|
56
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling EmailSMSTemplatesApi.get_template"
|
57
|
+
end
|
58
|
+
# resource path
|
59
|
+
local_var_path = '/templates/{template_type}/{slug}'.sub('{' + 'template_type' + '}', CGI.escape(template_type.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
60
|
+
|
61
|
+
# query parameters
|
62
|
+
query_params = opts[:query_params] || {}
|
63
|
+
|
64
|
+
# header parameters
|
65
|
+
header_params = opts[:header_params] || {}
|
66
|
+
# HTTP header 'Accept' (if needed)
|
67
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
68
|
+
|
69
|
+
# form parameters
|
70
|
+
form_params = opts[:form_params] || {}
|
71
|
+
|
72
|
+
# http body (model)
|
73
|
+
post_body = opts[:debug_body]
|
74
|
+
|
75
|
+
# return_type
|
76
|
+
return_type = opts[:debug_return_type] || 'Template'
|
77
|
+
|
78
|
+
# auth_names
|
79
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
80
|
+
|
81
|
+
new_options = opts.merge(
|
82
|
+
:operation => :"EmailSMSTemplatesApi.get_template",
|
83
|
+
:header_params => header_params,
|
84
|
+
:query_params => query_params,
|
85
|
+
:form_params => form_params,
|
86
|
+
:body => post_body,
|
87
|
+
:auth_names => auth_names,
|
88
|
+
:return_type => return_type
|
89
|
+
)
|
90
|
+
|
91
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
92
|
+
if @api_client.config.debugging
|
93
|
+
@api_client.config.logger.debug "API called: EmailSMSTemplatesApi#get_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
94
|
+
end
|
95
|
+
return data, status_code, headers
|
96
|
+
end
|
97
|
+
|
98
|
+
# List all templates
|
99
|
+
# Returns a list of all templates. The templates are returned sorted by position.
|
100
|
+
# @param template_type [String] The type of templates to list (email or SMS)
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @return [Array<Template>]
|
103
|
+
|
104
|
+
def all(template_type, opts = {})
|
105
|
+
data, _status_code, _headers = all_with_http_info(template_type, opts)
|
106
|
+
data
|
107
|
+
end
|
108
|
+
|
109
|
+
# List all templates
|
110
|
+
# Returns a list of all templates. The templates are returned sorted by position.
|
111
|
+
# @param template_type [String] The type of templates to list (email or SMS)
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @return [Array<(Array<Template>, Integer, Hash)>] Array<Template> data, response status code and response headers
|
114
|
+
# GET array
|
115
|
+
def all_with_http_info(template_type, opts = {})
|
116
|
+
if @api_client.config.debugging
|
117
|
+
@api_client.config.logger.debug 'Calling API: EmailSMSTemplatesApi.get_template_list ...'
|
118
|
+
end
|
119
|
+
# verify the required parameter 'template_type' is set
|
120
|
+
if @api_client.config.client_side_validation && template_type.nil?
|
121
|
+
fail ArgumentError, "Missing the required parameter 'template_type' when calling EmailSMSTemplatesApi.get_template_list"
|
122
|
+
end
|
123
|
+
# verify enum value
|
124
|
+
allowable_values = ["email", "sms"]
|
125
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(template_type)
|
126
|
+
fail ArgumentError, "invalid value for \"template_type\", must be one of #{allowable_values}"
|
127
|
+
end
|
128
|
+
# resource path
|
129
|
+
local_var_path = '/templates/{template_type}'.sub('{' + 'template_type' + '}', CGI.escape(template_type.to_s))
|
130
|
+
|
131
|
+
# query parameters
|
132
|
+
query_params = opts[:query_params] || {}
|
133
|
+
|
134
|
+
# header parameters
|
135
|
+
header_params = opts[:header_params] || {}
|
136
|
+
# HTTP header 'Accept' (if needed)
|
137
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
138
|
+
|
139
|
+
# form parameters
|
140
|
+
form_params = opts[:form_params] || {}
|
141
|
+
|
142
|
+
# http body (model)
|
143
|
+
post_body = opts[:debug_body]
|
144
|
+
|
145
|
+
# return_type
|
146
|
+
return_type = opts[:debug_return_type] || 'Array<Template>'
|
147
|
+
|
148
|
+
# auth_names
|
149
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
150
|
+
|
151
|
+
new_options = opts.merge(
|
152
|
+
:operation => :"EmailSMSTemplatesApi.get_template_list",
|
153
|
+
:header_params => header_params,
|
154
|
+
:query_params => query_params,
|
155
|
+
:form_params => form_params,
|
156
|
+
:body => post_body,
|
157
|
+
:auth_names => auth_names,
|
158
|
+
:return_type => return_type
|
159
|
+
)
|
160
|
+
|
161
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
162
|
+
if @api_client.config.debugging
|
163
|
+
@api_client.config.logger.debug "API called: EmailSMSTemplatesApi#get_template_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
164
|
+
end
|
165
|
+
return data, status_code, headers
|
166
|
+
end
|
167
|
+
|
168
|
+
# Preview changes to a template
|
169
|
+
# Returns a preview of a template for a given template_type, slug and body
|
170
|
+
# @param template_type [String] The type of template to preview
|
171
|
+
# @param slug [String] The slug of the template to preview
|
172
|
+
# @param [Hash] opts the optional parameters
|
173
|
+
# @option opts [PreviewTemplateRequest] :preview_template_request Required parameters
|
174
|
+
# @return [Object]
|
175
|
+
|
176
|
+
def preview(template_type, slug, opts = {})
|
177
|
+
data, _status_code, _headers = preview_with_http_info(template_type, slug, opts)
|
178
|
+
data
|
179
|
+
end
|
180
|
+
|
181
|
+
# Preview changes to a template
|
182
|
+
# Returns a preview of a template for a given template_type, slug and body
|
183
|
+
# @param template_type [String] The type of template to preview
|
184
|
+
# @param slug [String] The slug of the template to preview
|
185
|
+
# @param [Hash] opts the optional parameters
|
186
|
+
# @option opts [PreviewTemplateRequest] :preview_template_request Required parameters
|
187
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
188
|
+
# POST
|
189
|
+
def preview_with_http_info(template_type, slug, opts = {})
|
190
|
+
if @api_client.config.debugging
|
191
|
+
@api_client.config.logger.debug 'Calling API: EmailSMSTemplatesApi.preview_template ...'
|
192
|
+
end
|
193
|
+
# verify the required parameter 'template_type' is set
|
194
|
+
if @api_client.config.client_side_validation && template_type.nil?
|
195
|
+
fail ArgumentError, "Missing the required parameter 'template_type' when calling EmailSMSTemplatesApi.preview_template"
|
196
|
+
end
|
197
|
+
# verify the required parameter 'slug' is set
|
198
|
+
if @api_client.config.client_side_validation && slug.nil?
|
199
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling EmailSMSTemplatesApi.preview_template"
|
200
|
+
end
|
201
|
+
# resource path
|
202
|
+
local_var_path = '/templates/{template_type}/{slug}/preview'.sub('{' + 'template_type' + '}', CGI.escape(template_type.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
203
|
+
|
204
|
+
# query parameters
|
205
|
+
query_params = opts[:query_params] || {}
|
206
|
+
|
207
|
+
# header parameters
|
208
|
+
header_params = opts[:header_params] || {}
|
209
|
+
# HTTP header 'Accept' (if needed)
|
210
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
211
|
+
# HTTP header 'Content-Type'
|
212
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
213
|
+
if !content_type.nil?
|
214
|
+
header_params['Content-Type'] = content_type
|
215
|
+
end
|
216
|
+
|
217
|
+
# form parameters
|
218
|
+
form_params = opts[:form_params] || {}
|
219
|
+
|
220
|
+
# http body (model)
|
221
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'preview_template_request'])
|
222
|
+
|
223
|
+
# return_type
|
224
|
+
return_type = opts[:debug_return_type] || 'Object'
|
225
|
+
|
226
|
+
# auth_names
|
227
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
228
|
+
|
229
|
+
new_options = opts.merge(
|
230
|
+
:operation => :"EmailSMSTemplatesApi.preview_template",
|
231
|
+
:header_params => header_params,
|
232
|
+
:query_params => query_params,
|
233
|
+
:form_params => form_params,
|
234
|
+
:body => post_body,
|
235
|
+
:auth_names => auth_names,
|
236
|
+
:return_type => return_type
|
237
|
+
)
|
238
|
+
|
239
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
240
|
+
if @api_client.config.debugging
|
241
|
+
@api_client.config.logger.debug "API called: EmailSMSTemplatesApi#preview_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
242
|
+
end
|
243
|
+
return data, status_code, headers
|
244
|
+
end
|
245
|
+
|
246
|
+
# Revert a template
|
247
|
+
# Reverts an updated template to its default state
|
248
|
+
# @param template_type [String] The type of template to revert
|
249
|
+
# @param slug [String] The slug of the template to revert
|
250
|
+
# @param [Hash] opts the optional parameters
|
251
|
+
# @return [Template]
|
252
|
+
|
253
|
+
def revert(template_type, slug, opts = {})
|
254
|
+
data, _status_code, _headers = revert_with_http_info(template_type, slug, opts)
|
255
|
+
data
|
256
|
+
end
|
257
|
+
|
258
|
+
# Revert a template
|
259
|
+
# Reverts an updated template to its default state
|
260
|
+
# @param template_type [String] The type of template to revert
|
261
|
+
# @param slug [String] The slug of the template to revert
|
262
|
+
# @param [Hash] opts the optional parameters
|
263
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
264
|
+
# POST
|
265
|
+
def revert_with_http_info(template_type, slug, opts = {})
|
266
|
+
if @api_client.config.debugging
|
267
|
+
@api_client.config.logger.debug 'Calling API: EmailSMSTemplatesApi.revert_template ...'
|
268
|
+
end
|
269
|
+
# verify the required parameter 'template_type' is set
|
270
|
+
if @api_client.config.client_side_validation && template_type.nil?
|
271
|
+
fail ArgumentError, "Missing the required parameter 'template_type' when calling EmailSMSTemplatesApi.revert_template"
|
272
|
+
end
|
273
|
+
# verify enum value
|
274
|
+
allowable_values = ["email", "sms"]
|
275
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(template_type)
|
276
|
+
fail ArgumentError, "invalid value for \"template_type\", must be one of #{allowable_values}"
|
277
|
+
end
|
278
|
+
# verify the required parameter 'slug' is set
|
279
|
+
if @api_client.config.client_side_validation && slug.nil?
|
280
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling EmailSMSTemplatesApi.revert_template"
|
281
|
+
end
|
282
|
+
# resource path
|
283
|
+
local_var_path = '/templates/{template_type}/{slug}/revert'.sub('{' + 'template_type' + '}', CGI.escape(template_type.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
284
|
+
|
285
|
+
# query parameters
|
286
|
+
query_params = opts[:query_params] || {}
|
287
|
+
|
288
|
+
# header parameters
|
289
|
+
header_params = opts[:header_params] || {}
|
290
|
+
# HTTP header 'Accept' (if needed)
|
291
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
292
|
+
|
293
|
+
# form parameters
|
294
|
+
form_params = opts[:form_params] || {}
|
295
|
+
|
296
|
+
# http body (model)
|
297
|
+
post_body = opts[:debug_body]
|
298
|
+
|
299
|
+
# return_type
|
300
|
+
return_type = opts[:debug_return_type] || 'Template'
|
301
|
+
|
302
|
+
# auth_names
|
303
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
304
|
+
|
305
|
+
new_options = opts.merge(
|
306
|
+
:operation => :"EmailSMSTemplatesApi.revert_template",
|
307
|
+
:header_params => header_params,
|
308
|
+
:query_params => query_params,
|
309
|
+
:form_params => form_params,
|
310
|
+
:body => post_body,
|
311
|
+
:auth_names => auth_names,
|
312
|
+
:return_type => return_type
|
313
|
+
)
|
314
|
+
|
315
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
316
|
+
if @api_client.config.debugging
|
317
|
+
@api_client.config.logger.debug "API called: EmailSMSTemplatesApi#revert_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
318
|
+
end
|
319
|
+
return data, status_code, headers
|
320
|
+
end
|
321
|
+
|
322
|
+
# Toggle the delivery by Clerk for a template of a given type and slug
|
323
|
+
# Toggles the delivery by Clerk for a template of a given type and slug. If disabled, Clerk will not deliver the resulting email or SMS. The app developer will need to listen to the `email.created` or `sms.created` webhooks in order to handle delivery themselves.
|
324
|
+
# @param template_type [String] The type of template to toggle delivery for
|
325
|
+
# @param slug [String] The slug of the template for which to toggle delivery
|
326
|
+
# @param [Hash] opts the optional parameters
|
327
|
+
# @option opts [ToggleTemplateDeliveryRequest] :toggle_template_delivery_request
|
328
|
+
# @return [Template]
|
329
|
+
|
330
|
+
def toggle_delivery(template_type, slug, opts = {})
|
331
|
+
data, _status_code, _headers = toggle_delivery_with_http_info(template_type, slug, opts)
|
332
|
+
data
|
333
|
+
end
|
334
|
+
|
335
|
+
# Toggle the delivery by Clerk for a template of a given type and slug
|
336
|
+
# Toggles the delivery by Clerk for a template of a given type and slug. If disabled, Clerk will not deliver the resulting email or SMS. The app developer will need to listen to the `email.created` or `sms.created` webhooks in order to handle delivery themselves.
|
337
|
+
# @param template_type [String] The type of template to toggle delivery for
|
338
|
+
# @param slug [String] The slug of the template for which to toggle delivery
|
339
|
+
# @param [Hash] opts the optional parameters
|
340
|
+
# @option opts [ToggleTemplateDeliveryRequest] :toggle_template_delivery_request
|
341
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
342
|
+
# POST
|
343
|
+
def toggle_delivery_with_http_info(template_type, slug, opts = {})
|
344
|
+
if @api_client.config.debugging
|
345
|
+
@api_client.config.logger.debug 'Calling API: EmailSMSTemplatesApi.toggle_template_delivery ...'
|
346
|
+
end
|
347
|
+
# verify the required parameter 'template_type' is set
|
348
|
+
if @api_client.config.client_side_validation && template_type.nil?
|
349
|
+
fail ArgumentError, "Missing the required parameter 'template_type' when calling EmailSMSTemplatesApi.toggle_template_delivery"
|
350
|
+
end
|
351
|
+
# verify enum value
|
352
|
+
allowable_values = ["email", "sms"]
|
353
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(template_type)
|
354
|
+
fail ArgumentError, "invalid value for \"template_type\", must be one of #{allowable_values}"
|
355
|
+
end
|
356
|
+
# verify the required parameter 'slug' is set
|
357
|
+
if @api_client.config.client_side_validation && slug.nil?
|
358
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling EmailSMSTemplatesApi.toggle_template_delivery"
|
359
|
+
end
|
360
|
+
# resource path
|
361
|
+
local_var_path = '/templates/{template_type}/{slug}/toggle_delivery'.sub('{' + 'template_type' + '}', CGI.escape(template_type.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
362
|
+
|
363
|
+
# query parameters
|
364
|
+
query_params = opts[:query_params] || {}
|
365
|
+
|
366
|
+
# header parameters
|
367
|
+
header_params = opts[:header_params] || {}
|
368
|
+
# HTTP header 'Accept' (if needed)
|
369
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
370
|
+
# HTTP header 'Content-Type'
|
371
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
372
|
+
if !content_type.nil?
|
373
|
+
header_params['Content-Type'] = content_type
|
374
|
+
end
|
375
|
+
|
376
|
+
# form parameters
|
377
|
+
form_params = opts[:form_params] || {}
|
378
|
+
|
379
|
+
# http body (model)
|
380
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'toggle_template_delivery_request'])
|
381
|
+
|
382
|
+
# return_type
|
383
|
+
return_type = opts[:debug_return_type] || 'Template'
|
384
|
+
|
385
|
+
# auth_names
|
386
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
387
|
+
|
388
|
+
new_options = opts.merge(
|
389
|
+
:operation => :"EmailSMSTemplatesApi.toggle_template_delivery",
|
390
|
+
:header_params => header_params,
|
391
|
+
:query_params => query_params,
|
392
|
+
:form_params => form_params,
|
393
|
+
:body => post_body,
|
394
|
+
:auth_names => auth_names,
|
395
|
+
:return_type => return_type
|
396
|
+
)
|
397
|
+
|
398
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
399
|
+
if @api_client.config.debugging
|
400
|
+
@api_client.config.logger.debug "API called: EmailSMSTemplatesApi#toggle_template_delivery\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
401
|
+
end
|
402
|
+
return data, status_code, headers
|
403
|
+
end
|
404
|
+
|
405
|
+
# Update a template for a given type and slug
|
406
|
+
# Updates the existing template of the given type and slug
|
407
|
+
# @param template_type [String] The type of template to update
|
408
|
+
# @param slug [String] The slug of the template to update
|
409
|
+
# @param [Hash] opts the optional parameters
|
410
|
+
# @option opts [UpsertTemplateRequest] :upsert_template_request
|
411
|
+
# @return [Template]
|
412
|
+
|
413
|
+
def update(template_type, slug, opts = {})
|
414
|
+
data, _status_code, _headers = update_with_http_info(template_type, slug, opts)
|
415
|
+
data
|
416
|
+
end
|
417
|
+
|
418
|
+
# Update a template for a given type and slug
|
419
|
+
# Updates the existing template of the given type and slug
|
420
|
+
# @param template_type [String] The type of template to update
|
421
|
+
# @param slug [String] The slug of the template to update
|
422
|
+
# @param [Hash] opts the optional parameters
|
423
|
+
# @option opts [UpsertTemplateRequest] :upsert_template_request
|
424
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
425
|
+
# PUT
|
426
|
+
def update_with_http_info(template_type, slug, opts = {})
|
427
|
+
if @api_client.config.debugging
|
428
|
+
@api_client.config.logger.debug 'Calling API: EmailSMSTemplatesApi.upsert_template ...'
|
429
|
+
end
|
430
|
+
# verify the required parameter 'template_type' is set
|
431
|
+
if @api_client.config.client_side_validation && template_type.nil?
|
432
|
+
fail ArgumentError, "Missing the required parameter 'template_type' when calling EmailSMSTemplatesApi.upsert_template"
|
433
|
+
end
|
434
|
+
# verify enum value
|
435
|
+
allowable_values = ["email", "sms"]
|
436
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(template_type)
|
437
|
+
fail ArgumentError, "invalid value for \"template_type\", must be one of #{allowable_values}"
|
438
|
+
end
|
439
|
+
# verify the required parameter 'slug' is set
|
440
|
+
if @api_client.config.client_side_validation && slug.nil?
|
441
|
+
fail ArgumentError, "Missing the required parameter 'slug' when calling EmailSMSTemplatesApi.upsert_template"
|
442
|
+
end
|
443
|
+
# resource path
|
444
|
+
local_var_path = '/templates/{template_type}/{slug}'.sub('{' + 'template_type' + '}', CGI.escape(template_type.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
|
445
|
+
|
446
|
+
# query parameters
|
447
|
+
query_params = opts[:query_params] || {}
|
448
|
+
|
449
|
+
# header parameters
|
450
|
+
header_params = opts[:header_params] || {}
|
451
|
+
# HTTP header 'Accept' (if needed)
|
452
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
453
|
+
# HTTP header 'Content-Type'
|
454
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
455
|
+
if !content_type.nil?
|
456
|
+
header_params['Content-Type'] = content_type
|
457
|
+
end
|
458
|
+
|
459
|
+
# form parameters
|
460
|
+
form_params = opts[:form_params] || {}
|
461
|
+
|
462
|
+
# http body (model)
|
463
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'upsert_template_request'])
|
464
|
+
|
465
|
+
# return_type
|
466
|
+
return_type = opts[:debug_return_type] || 'Template'
|
467
|
+
|
468
|
+
# auth_names
|
469
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
470
|
+
|
471
|
+
new_options = opts.merge(
|
472
|
+
:operation => :"EmailSMSTemplatesApi.upsert_template",
|
473
|
+
:header_params => header_params,
|
474
|
+
:query_params => query_params,
|
475
|
+
:form_params => form_params,
|
476
|
+
:body => post_body,
|
477
|
+
:auth_names => auth_names,
|
478
|
+
:return_type => return_type
|
479
|
+
)
|
480
|
+
|
481
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
482
|
+
if @api_client.config.debugging
|
483
|
+
@api_client.config.logger.debug "API called: EmailSMSTemplatesApi#upsert_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
484
|
+
end
|
485
|
+
return data, status_code, headers
|
486
|
+
end
|
487
|
+
end
|
488
|
+
end
|