clerk-sdk-ruby 5.1.1 → 5.1.3
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/lib/clerk/actortokens.rb +12 -4
- data/lib/clerk/agenttasks.rb +335 -0
- data/lib/clerk/allowlistidentifiers.rb +16 -5
- data/lib/clerk/api_keys.rb +39 -13
- data/lib/clerk/betafeatures.rb +17 -9
- data/lib/clerk/billing.rb +46 -14
- data/lib/clerk/blocklistidentifiers.rb +16 -5
- data/lib/clerk/clients.rb +18 -7
- data/lib/clerk/domains.rb +21 -7
- data/lib/clerk/emailaddresses.rb +23 -9
- data/lib/clerk/emailandsmstemplates.rb +10 -5
- data/lib/clerk/emailsmstemplates.rb +28 -14
- data/lib/clerk/instancesettings.rb +306 -15
- data/lib/clerk/invitations.rb +22 -8
- data/lib/clerk/jwks.rb +7 -2
- data/lib/clerk/jwttemplates.rb +25 -8
- data/lib/clerk/m2m.rb +32 -14
- data/lib/clerk/machines.rb +43 -14
- data/lib/clerk/miscellaneous.rb +7 -2
- data/lib/clerk/models/components/action.rb +20 -0
- data/lib/clerk/models/components/action.rbi +11 -0
- data/lib/clerk/models/components/actortoken.rb +4 -4
- data/lib/clerk/models/components/adjustcreditbalancerequest.rb +48 -0
- data/lib/clerk/models/components/adjustcreditbalancerequest.rbi +21 -0
- data/lib/clerk/models/components/agenttask.rb +47 -0
- data/lib/clerk/models/components/agenttask.rbi +19 -0
- data/lib/clerk/models/components/agenttask_object.rb +19 -0
- data/lib/clerk/models/components/agenttask_object.rbi +11 -0
- data/lib/clerk/models/components/allowlistidentifier.rb +6 -6
- data/lib/clerk/models/components/allowlistidentifier_object.rb +1 -1
- data/lib/clerk/models/components/balance.rb +44 -0
- data/lib/clerk/models/components/balance.rbi +19 -0
- data/lib/clerk/models/components/billingpaymentattempt.rb +7 -3
- data/lib/clerk/models/components/billingpaymentattempt.rbi +2 -0
- data/lib/clerk/models/components/billingpaymentattempt_credits.rb +40 -0
- data/lib/clerk/models/components/billingpaymentattempt_credits.rbi +17 -0
- data/lib/clerk/models/components/billingpaymentattempt_payer.rb +36 -0
- data/lib/clerk/models/components/billingpaymentattempt_payer.rbi +15 -0
- data/lib/clerk/models/components/billingpaymentattempt_proration.rb +44 -0
- data/lib/clerk/models/components/billingpaymentattempt_proration.rbi +19 -0
- data/lib/clerk/models/components/billingpaymentattempt_totals.rb +52 -0
- data/lib/clerk/models/components/billingpaymentattempt_totals.rbi +23 -0
- data/lib/clerk/models/components/billingpriceresponse.rb +6 -2
- data/lib/clerk/models/components/billingpriceresponse.rbi +2 -0
- data/lib/clerk/models/components/billingstatement.rb +3 -3
- data/lib/clerk/models/components/{totals.rb → billingstatement_totals.rb} +6 -2
- data/lib/clerk/models/components/{totals.rbi → billingstatement_totals.rbi} +4 -2
- data/lib/clerk/models/components/blocklistidentifier.rb +6 -6
- data/lib/clerk/models/components/blocklistidentifier_object.rb +1 -1
- data/lib/clerk/models/components/blocklistidentifiers.rb +1 -1
- data/lib/clerk/models/components/client.rb +7 -7
- data/lib/clerk/models/components/client_object.rb +1 -1
- data/lib/clerk/models/components/cnametarget.rb +1 -1
- data/lib/clerk/models/components/commercecreditbalanceresponse.rb +36 -0
- data/lib/clerk/models/components/commercecreditbalanceresponse.rbi +15 -0
- data/lib/clerk/models/components/commercecreditledgerresponse.rb +64 -0
- data/lib/clerk/models/components/commercecreditledgerresponse.rbi +29 -0
- data/lib/clerk/models/components/commercepayerresponse.rb +1 -1
- data/lib/clerk/models/components/commercepaymentmethodresponse.rb +3 -3
- data/lib/clerk/models/components/commerceperunittotal.rb +40 -0
- data/lib/clerk/models/components/commerceperunittotal.rbi +17 -0
- data/lib/clerk/models/components/commerceperunittotaltier.rb +40 -0
- data/lib/clerk/models/components/commerceperunittotaltier.rbi +17 -0
- data/lib/clerk/models/components/commerceplan.rb +8 -4
- data/lib/clerk/models/components/commerceplan.rbi +2 -0
- data/lib/clerk/models/components/commerceplanunitprice.rb +40 -0
- data/lib/clerk/models/components/commerceplanunitprice.rbi +17 -0
- data/lib/clerk/models/components/commerceplanunitpricetier.rb +40 -0
- data/lib/clerk/models/components/commerceplanunitpricetier.rbi +17 -0
- data/lib/clerk/models/components/commercepricetransitiondetails.rb +2 -2
- data/lib/clerk/models/components/commercepricetransitionresponse.rb +1 -1
- data/lib/clerk/models/components/commercesubscription.rb +2 -2
- data/lib/clerk/models/components/commercesubscriptionitem.rb +17 -5
- data/lib/clerk/models/components/commercesubscriptionitem.rbi +6 -0
- data/lib/clerk/models/components/commercesubscriptionitem_credits.rb +40 -0
- data/lib/clerk/models/components/commercesubscriptionitem_credits.rbi +17 -0
- data/lib/clerk/models/components/commercesubscriptionitem_payer.rb +36 -0
- data/lib/clerk/models/components/commercesubscriptionitem_payer.rbi +15 -0
- data/lib/clerk/models/components/commercesubscriptionitem_plan.rb +8 -4
- data/lib/clerk/models/components/commercesubscriptionitem_plan.rbi +2 -0
- data/lib/clerk/models/components/commercesubscriptionitem_proration.rb +44 -0
- data/lib/clerk/models/components/commercesubscriptionitem_proration.rbi +19 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals.rb +52 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals.rbi +23 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals_credits.rb +40 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals_credits.rbi +17 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals_payer.rb +36 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals_payer.rbi +15 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals_proration.rb +44 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals_proration.rbi +19 -0
- data/lib/clerk/models/components/cookies.rb +1 -1
- data/lib/clerk/models/components/creator_role.rb +1 -1
- data/lib/clerk/models/components/default_role.rb +1 -1
- data/lib/clerk/models/components/domain.rb +2 -2
- data/lib/clerk/models/components/domains.rb +1 -1
- data/lib/clerk/models/components/emailaddress.rb +5 -5
- data/lib/clerk/models/components/emailaddress_admin.rb +3 -3
- data/lib/clerk/models/components/emailaddress_object.rb +1 -1
- data/lib/clerk/models/components/emailaddress_otp.rb +3 -3
- data/lib/clerk/models/components/emailaddress_saml.rb +3 -3
- data/lib/clerk/models/components/emailaddress_ticket.rb +3 -3
- data/lib/clerk/models/components/emaillink.rb +3 -3
- data/lib/clerk/models/components/enterpriseaccount.rb +5 -5
- data/lib/clerk/models/components/enterpriseaccount_oauth.rb +2 -2
- data/lib/clerk/models/components/enterpriseaccount_object.rb +1 -1
- data/lib/clerk/models/components/enterpriseaccount_saml.rb +3 -3
- data/lib/clerk/models/components/enterpriseaccount_ticket.rb +3 -3
- data/lib/clerk/models/components/enterpriseconnection_1.rb +3 -3
- data/lib/clerk/models/components/enterpriseconnection_2.rb +3 -3
- data/lib/clerk/models/components/extendfreetrialrequest.rb +1 -1
- data/lib/clerk/models/components/externalaccountwithverification.rb +7 -7
- data/lib/clerk/models/components/externalaccountwithverification_oauth.rb +2 -2
- data/lib/clerk/models/components/featureresponse.rb +1 -1
- data/lib/clerk/models/components/fromoauth.rb +2 -2
- data/lib/clerk/models/components/googleonetap.rb +3 -3
- data/lib/clerk/models/components/group.rb +1 -1
- data/lib/clerk/models/components/instance.rb +1 -1
- data/lib/clerk/models/components/instanceprotect.rb +1 -1
- data/lib/clerk/models/components/instancerestrictions.rb +1 -1
- data/lib/clerk/models/components/instancesettings.rb +1 -1
- data/lib/clerk/models/components/invitation.rb +5 -5
- data/lib/clerk/models/components/invitation_revoked.rb +5 -5
- data/lib/clerk/models/components/jwttemplate.rb +3 -3
- data/lib/clerk/models/components/machine.rb +1 -1
- data/lib/clerk/models/components/machine_created.rb +1 -1
- data/lib/clerk/models/components/machine_deleted.rb +1 -1
- data/lib/clerk/models/components/machine_secretkey.rb +1 -1
- data/lib/clerk/models/components/machinescope.rb +1 -1
- data/lib/clerk/models/components/machinescope_deleted.rb +1 -1
- data/lib/clerk/models/components/machinewithoutscopedmachines.rb +1 -1
- data/lib/clerk/models/components/oauthaccesstoken.rb +1 -1
- data/lib/clerk/models/components/oauthapplication.rb +6 -6
- data/lib/clerk/models/components/oauthapplications.rb +1 -1
- data/lib/clerk/models/components/oauthapplicationsettings.rb +40 -0
- data/lib/clerk/models/components/oauthapplicationsettings.rbi +17 -0
- data/lib/clerk/models/components/oauthapplicationsettings_object.rb +19 -0
- data/lib/clerk/models/components/oauthapplicationsettings_object.rbi +11 -0
- data/lib/clerk/models/components/oauthapplicationwithsecret.rb +7 -7
- data/lib/clerk/models/components/organization.rb +5 -5
- data/lib/clerk/models/components/organizationdomain.rb +3 -3
- data/lib/clerk/models/components/organizationdomain_object.rb +1 -1
- data/lib/clerk/models/components/organizationdomain_verification.rb +1 -1
- data/lib/clerk/models/components/organizationdomains.rb +1 -1
- data/lib/clerk/models/components/organizationinvitation.rb +2 -2
- data/lib/clerk/models/components/organizationinvitation_object.rb +1 -1
- data/lib/clerk/models/components/organizationinvitations.rb +1 -1
- data/lib/clerk/models/components/organizationinvitationswithpublicorganizationdata.rb +1 -1
- data/lib/clerk/models/components/organizationinvitationwithpublicorganizationdata.rb +2 -2
- data/lib/clerk/models/components/organizationinvitationwithpublicorganizationdata_object.rb +1 -1
- data/lib/clerk/models/components/organizationmembership.rb +2 -2
- data/lib/clerk/models/components/organizationmembership_object.rb +1 -1
- data/lib/clerk/models/components/organizationmembership_organization.rb +5 -5
- data/lib/clerk/models/components/organizationmembershippublicuserdata.rb +1 -1
- data/lib/clerk/models/components/organizationmemberships.rb +1 -1
- data/lib/clerk/models/components/organizations.rb +1 -1
- data/lib/clerk/models/components/organizationsettings.rb +3 -3
- data/lib/clerk/models/components/organizationwithlogo.rb +6 -6
- data/lib/clerk/models/components/passkey.rb +3 -3
- data/lib/clerk/models/components/passkey_object.rb +1 -1
- data/lib/clerk/models/components/payment_source.rb +3 -3
- data/lib/clerk/models/components/permission.rb +3 -3
- data/lib/clerk/models/components/permissions.rb +1 -1
- data/lib/clerk/models/components/phonenumber.rb +4 -4
- data/lib/clerk/models/components/phonenumber_admin.rb +3 -3
- data/lib/clerk/models/components/phonenumber_object.rb +1 -1
- data/lib/clerk/models/components/phonenumber_otp.rb +3 -3
- data/lib/clerk/models/components/protocol.rb +1 -1
- data/lib/clerk/models/components/proxycheck.rb +4 -4
- data/lib/clerk/models/components/redirecturl.rb +3 -3
- data/lib/clerk/models/components/role.rb +3 -3
- data/lib/clerk/models/components/role_set_migration.rb +1 -1
- data/lib/clerk/models/components/roles.rb +1 -1
- data/lib/clerk/models/components/roleset.rb +2 -2
- data/lib/clerk/models/components/rolesetitem.rb +1 -1
- data/lib/clerk/models/components/samlaccount.rb +3 -3
- data/lib/clerk/models/components/samlaccount_object.rb +1 -1
- data/lib/clerk/models/components/samlaccount_saml.rb +3 -3
- data/lib/clerk/models/components/samlaccount_ticket.rb +3 -3
- data/lib/clerk/models/components/samlconnection_1.rb +3 -3
- data/lib/clerk/models/components/samlconnection_2.rb +3 -3
- data/lib/clerk/models/components/samlconnections.rb +1 -1
- data/lib/clerk/models/components/schemas_commerceplan.rb +1 -1
- data/lib/clerk/models/components/schemas_commercesubscriptionitem.rb +4 -4
- data/lib/clerk/models/components/{payer.rb → schemas_commercesubscriptionitem_payer.rb} +2 -2
- data/lib/clerk/models/components/{payer.rbi → schemas_commercesubscriptionitem_payer.rbi} +2 -2
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_plan.rb +1 -1
- data/lib/clerk/models/components/schemas_featureresponse.rb +1 -1
- data/lib/clerk/models/components/schemas_samlconnection_samlconnection_1.rb +4 -4
- data/lib/clerk/models/components/schemas_samlconnection_samlconnection_2.rb +4 -4
- data/lib/clerk/models/components/seats.rb +32 -0
- data/lib/clerk/models/components/seats.rbi +13 -0
- data/lib/clerk/models/components/session.rb +7 -7
- data/lib/clerk/models/components/session_object.rb +1 -1
- data/lib/clerk/models/components/signintoken.rb +4 -4
- data/lib/clerk/models/components/signup.rb +5 -5
- data/lib/clerk/models/components/signup_external_account.rb +1 -1
- data/lib/clerk/models/components/signupverification.rb +2 -2
- data/lib/clerk/models/components/template.rb +4 -4
- data/lib/clerk/models/components/template_object.rb +1 -1
- data/lib/clerk/models/components/testingtoken.rb +2 -2
- data/lib/clerk/models/components/token.rb +3 -3
- data/lib/clerk/models/components/token_object.rb +1 -1
- data/lib/clerk/models/components/totalcount.rb +2 -2
- data/lib/clerk/models/components/totalcount_object.rb +1 -1
- data/lib/clerk/models/components/user.rb +18 -18
- data/lib/clerk/models/components/user_object.rb +1 -1
- data/lib/clerk/models/components/verification_passkey_passkey.rb +4 -4
- data/lib/clerk/models/components/waitlistentry.rb +5 -5
- data/lib/clerk/models/components/waitlistentry_invitation.rb +5 -5
- data/lib/clerk/models/components/web3signature.rb +3 -3
- data/lib/clerk/models/components/web3wallet.rb +4 -4
- data/lib/clerk/models/components/web3wallet_admin.rb +3 -3
- data/lib/clerk/models/components/web3wallet_object.rb +1 -1
- data/lib/clerk/models/components.rb +27 -2
- data/lib/clerk/models/operations/actor.rb +1 -1
- data/lib/clerk/models/operations/adjustorganizationbillingcreditbalance_request.rb +36 -0
- data/lib/clerk/models/operations/adjustorganizationbillingcreditbalance_request.rbi +15 -0
- data/lib/clerk/models/operations/adjustorganizationbillingcreditbalance_response.rb +44 -0
- data/lib/clerk/models/operations/adjustorganizationbillingcreditbalance_response.rbi +19 -0
- data/lib/clerk/models/operations/adjustuserbillingcreditbalance_request.rb +36 -0
- data/lib/clerk/models/operations/adjustuserbillingcreditbalance_request.rbi +15 -0
- data/lib/clerk/models/operations/adjustuserbillingcreditbalance_response.rb +44 -0
- data/lib/clerk/models/operations/adjustuserbillingcreditbalance_response.rbi +19 -0
- data/lib/clerk/models/operations/clerkidpoauthaccesstoken.rb +1 -1
- data/lib/clerk/models/operations/createagenttask_request.rb +60 -0
- data/lib/clerk/models/operations/createagenttask_request.rbi +23 -0
- data/lib/clerk/models/operations/createagenttask_response.rb +44 -0
- data/lib/clerk/models/operations/createagenttask_response.rbi +19 -0
- data/lib/clerk/models/operations/createapikey_responsebody.rb +1 -1
- data/lib/clerk/models/operations/createbulkinvitations_requestbody.rb +1 -1
- data/lib/clerk/models/operations/createinvitation_request.rb +1 -1
- data/lib/clerk/models/operations/createm2mtoken_request.rb +5 -1
- data/lib/clerk/models/operations/createm2mtoken_request.rbi +2 -0
- data/lib/clerk/models/operations/createm2mtoken_responsebody.rb +1 -1
- data/lib/clerk/models/operations/createoauthapplication_request.rb +2 -2
- data/lib/clerk/models/operations/createroleset_request.rb +1 -1
- data/lib/clerk/models/operations/createsamlconnection_requestbody_1.rb +3 -3
- data/lib/clerk/models/operations/createsamlconnection_requestbody_2.rb +3 -3
- data/lib/clerk/models/operations/createsessiontoken_responsebody.rb +1 -1
- data/lib/clerk/models/operations/createsessiontokenfromtemplate_responsebody.rb +1 -1
- data/lib/clerk/models/operations/createuser_request.rb +5 -5
- data/lib/clerk/models/operations/data.rb +1 -1
- data/lib/clerk/models/operations/deleteapikey_responsebody.rb +1 -1
- data/lib/clerk/models/operations/getapikey_responsebody.rb +1 -1
- data/lib/clerk/models/operations/getinstanceoauthapplicationsettings_response.rb +44 -0
- data/lib/clerk/models/operations/getinstanceoauthapplicationsettings_response.rbi +19 -0
- data/lib/clerk/models/operations/getorganizationbillingcreditbalance_request.rb +32 -0
- data/lib/clerk/models/operations/getorganizationbillingcreditbalance_request.rbi +13 -0
- data/lib/clerk/models/operations/getorganizationbillingcreditbalance_response.rb +44 -0
- data/lib/clerk/models/operations/getorganizationbillingcreditbalance_response.rbi +19 -0
- data/lib/clerk/models/operations/getpublicinterstitial_request.rb +2 -2
- data/lib/clerk/models/operations/getuserbillingcreditbalance_request.rb +32 -0
- data/lib/clerk/models/operations/getuserbillingcreditbalance_request.rbi +13 -0
- data/lib/clerk/models/operations/getuserbillingcreditbalance_response.rb +44 -0
- data/lib/clerk/models/operations/getuserbillingcreditbalance_response.rbi +19 -0
- data/lib/clerk/models/operations/getuserlist_request.rb +2 -2
- data/lib/clerk/models/operations/getuserscount_request.rb +2 -2
- data/lib/clerk/models/operations/listallorganizationdomains_request.rb +3 -3
- data/lib/clerk/models/operations/listinstanceorganizationinvitations_status.rb +1 -0
- data/lib/clerk/models/operations/listorganizationinvitations_status.rb +1 -0
- data/lib/clerk/models/operations/listwaitlistentries_request.rb +1 -1
- data/lib/clerk/models/operations/m2m_token.rb +1 -1
- data/lib/clerk/models/operations/on_behalf_of.rb +37 -0
- data/lib/clerk/models/operations/on_behalf_of.rbi +15 -0
- data/lib/clerk/models/operations/permissions.rb +19 -0
- data/lib/clerk/models/operations/permissions.rbi +11 -0
- data/lib/clerk/models/operations/refreshsession_requestbody.rb +1 -1
- data/lib/clerk/models/operations/revokeagenttask_request.rb +32 -0
- data/lib/clerk/models/operations/revokeagenttask_request.rbi +13 -0
- data/lib/clerk/models/operations/revokeagenttask_response.rb +44 -0
- data/lib/clerk/models/operations/revokeagenttask_response.rbi +19 -0
- data/lib/clerk/models/operations/revokeapikey_responsebody.rb +1 -1
- data/lib/clerk/models/operations/revokem2mtoken_responsebody.rb +1 -1
- data/lib/clerk/models/operations/token_format.rb +20 -0
- data/lib/clerk/models/operations/token_format.rbi +11 -0
- data/lib/clerk/models/operations/updateapikey_responsebody.rb +1 -1
- data/lib/clerk/models/operations/updateinstance_request.rb +2 -2
- data/lib/clerk/models/operations/updateinstanceoauthapplicationsettings_request.rb +36 -0
- data/lib/clerk/models/operations/updateinstanceoauthapplicationsettings_request.rbi +15 -0
- data/lib/clerk/models/operations/updateinstanceoauthapplicationsettings_response.rb +44 -0
- data/lib/clerk/models/operations/updateinstanceoauthapplicationsettings_response.rbi +19 -0
- data/lib/clerk/models/operations/updateoauthapplication_requestbody.rb +2 -2
- data/lib/clerk/models/operations/updateroleset_requestbody.rb +1 -1
- data/lib/clerk/models/operations/updatesamlconnection_requestbody.rb +2 -2
- data/lib/clerk/models/operations/updateuser_requestbody.rb +2 -2
- data/lib/clerk/models/operations/updateusermetadata_requestbody.rb +1 -1
- data/lib/clerk/models/operations/usersgetorganizationinvitations_status.rb +1 -0
- data/lib/clerk/models/operations/verifyapikey_responsebody.rb +1 -1
- data/lib/clerk/models/operations/verifym2mtoken_responsebody.rb +1 -1
- data/lib/clerk/models/operations/verifyoauthaccesstoken_request.rb +2 -2
- data/lib/clerk/models/operations/verifytotp_responsebody.rb +1 -1
- data/lib/clerk/models/operations.rb +18 -0
- data/lib/clerk/oauthaccesstokens.rb +8 -3
- data/lib/clerk/oauthapplications.rb +29 -9
- data/lib/clerk/openapiclient.rb +4 -2
- data/lib/clerk/organizationdomains.rb +27 -10
- data/lib/clerk/organizationinvitations.rb +43 -20
- data/lib/clerk/organizationmemberships.rb +27 -10
- data/lib/clerk/organizationpermissions.rb +25 -8
- data/lib/clerk/organizationroles.rb +33 -10
- data/lib/clerk/organizations.rb +379 -16
- data/lib/clerk/phonenumbers.rb +21 -7
- data/lib/clerk/proxy.rb +1 -1
- data/lib/clerk/proxychecks.rb +10 -5
- data/lib/clerk/redirecturls.rb +20 -6
- data/lib/clerk/rolesets.rb +36 -13
- data/lib/clerk/samlconnections.rb +25 -8
- data/lib/clerk/sdkconfiguration.rb +3 -3
- data/lib/clerk/sessions.rb +40 -14
- data/lib/clerk/signintokens.rb +12 -4
- data/lib/clerk/signups.rb +12 -4
- data/lib/clerk/templates.rb +10 -5
- data/lib/clerk/testingtokens.rb +7 -2
- data/lib/clerk/users.rb +475 -49
- data/lib/clerk/utils/request_bodies.rb +8 -3
- data/lib/clerk/utils/security.rb +10 -0
- data/lib/clerk/utils/url.rb +11 -5
- data/lib/clerk/utils/utils.rb +33 -3
- data/lib/clerk/waitlistentries.rb +32 -12
- data/lib/clerk/webhooks.rb +15 -4
- data/lib/clerk_sdk_ruby.rb +1 -0
- data/lib/crystalline/metadata_fields.rb +66 -9
- data/lib/crystalline/module.rb +3 -3
- data/lib/crystalline/types.rb +11 -3
- metadata +107 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: db8bc4332245acdcfcfcb5a9c064849a988ff177242924be39fe34eb42c073d3
|
|
4
|
+
data.tar.gz: 87dd21000aa81fd53801977b1738b4da46d38a88981b0c10c3327446ad024466
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d72e3ad7be718f501dce4fbfb1b8a797f54de6f7a38fb764f0558a4bc87450ef294e6a289a5cad74432aa3859017fcb2c0cfa64993407d9c00c8cf278cb38b8f
|
|
7
|
+
data.tar.gz: 7a4b5cdec0de4395365ea07e2ac174099ce8c6b4e5a25b6d72e1261ae3414911055943a779f889fddc7b44cfb9219579631b886e3c0ddf210ffc07d408c4f779
|
data/lib/clerk/actortokens.rb
CHANGED
|
@@ -38,8 +38,10 @@ module Clerk
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
|
|
42
|
+
|
|
41
43
|
|
|
42
|
-
def create(request: nil, retries: nil, timeout_ms: nil)
|
|
44
|
+
def create(request: nil, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
43
45
|
# create - Create actor token
|
|
44
46
|
# Create an actor token that can be used to impersonate the given user.
|
|
45
47
|
# The `actor` parameter needs to include at least a "sub" key whose value is the ID of the actor (impersonating) user.
|
|
@@ -51,7 +53,7 @@ module Clerk
|
|
|
51
53
|
req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
|
|
52
54
|
headers['content-type'] = req_content_type
|
|
53
55
|
|
|
54
|
-
if form
|
|
56
|
+
if form && !form.empty?
|
|
55
57
|
body = Utils.encode_form(form)
|
|
56
58
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
57
59
|
body = URI.encode_www_form(data)
|
|
@@ -101,6 +103,9 @@ module Clerk
|
|
|
101
103
|
req.headers.merge!(headers)
|
|
102
104
|
req.options.timeout = timeout unless timeout.nil?
|
|
103
105
|
Utils.configure_request_security(req, security)
|
|
106
|
+
http_headers&.each do |key, value|
|
|
107
|
+
req.headers[key.to_s] = value
|
|
108
|
+
end
|
|
104
109
|
|
|
105
110
|
@sdk_configuration.hooks.before_request(
|
|
106
111
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -184,7 +189,7 @@ module Clerk
|
|
|
184
189
|
|
|
185
190
|
|
|
186
191
|
|
|
187
|
-
def revoke(actor_token_id:, retries: nil, timeout_ms: nil)
|
|
192
|
+
def revoke(actor_token_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
188
193
|
# revoke - Revoke actor token
|
|
189
194
|
# Revokes a pending actor token.
|
|
190
195
|
request = Models::Operations::RevokeActorTokenRequest.new(
|
|
@@ -242,6 +247,9 @@ module Clerk
|
|
|
242
247
|
req.headers.merge!(headers)
|
|
243
248
|
req.options.timeout = timeout unless timeout.nil?
|
|
244
249
|
Utils.configure_request_security(req, security)
|
|
250
|
+
http_headers&.each do |key, value|
|
|
251
|
+
req.headers[key.to_s] = value
|
|
252
|
+
end
|
|
245
253
|
|
|
246
254
|
@sdk_configuration.hooks.before_request(
|
|
247
255
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -322,5 +330,5 @@ module Clerk
|
|
|
322
330
|
|
|
323
331
|
end
|
|
324
332
|
end
|
|
325
|
-
|
|
333
|
+
end
|
|
326
334
|
end
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: false
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
require 'faraday'
|
|
7
|
+
require 'faraday/multipart'
|
|
8
|
+
require 'faraday/retry'
|
|
9
|
+
require_relative 'sdk_hooks/hooks'
|
|
10
|
+
require_relative 'utils/retries'
|
|
11
|
+
|
|
12
|
+
module Clerk
|
|
13
|
+
|
|
14
|
+
class AgentTasks
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def initialize(sdk_config)
|
|
21
|
+
@sdk_configuration = sdk_config
|
|
22
|
+
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def get_url(base_url:, url_variables: nil)
|
|
27
|
+
sd_base_url, sd_options = @sdk_configuration.get_server_details
|
|
28
|
+
|
|
29
|
+
if base_url.nil?
|
|
30
|
+
base_url = sd_base_url
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
if url_variables.nil?
|
|
34
|
+
url_variables = sd_options
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
return Utils.template_url base_url, url_variables
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def create(request: nil, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
45
|
+
# create - Create agent task
|
|
46
|
+
# Create an agent task on behalf of a user.
|
|
47
|
+
# The response contains a URL that, when visited, creates a session for the user.
|
|
48
|
+
# The agent_id is stable per agent_name within an instance. The task_id is unique per call.
|
|
49
|
+
url, params = @sdk_configuration.get_server_details
|
|
50
|
+
base_url = Utils.template_url(url, params)
|
|
51
|
+
url = "#{base_url}/agents/tasks"
|
|
52
|
+
headers = {}
|
|
53
|
+
|
|
54
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
|
|
55
|
+
headers['content-type'] = req_content_type
|
|
56
|
+
|
|
57
|
+
if form && !form.empty?
|
|
58
|
+
body = Utils.encode_form(form)
|
|
59
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
60
|
+
body = URI.encode_www_form(data)
|
|
61
|
+
else
|
|
62
|
+
body = data
|
|
63
|
+
end
|
|
64
|
+
headers['Accept'] = 'application/json'
|
|
65
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
66
|
+
retries ||= @sdk_configuration.retry_config
|
|
67
|
+
retries ||= Utils::RetryConfig.new(
|
|
68
|
+
backoff: Utils::BackoffStrategy.new(
|
|
69
|
+
exponent: 1.5,
|
|
70
|
+
initial_interval: 500,
|
|
71
|
+
max_elapsed_time: 3_600_000,
|
|
72
|
+
max_interval: 60_000
|
|
73
|
+
),
|
|
74
|
+
retry_connection_errors: true,
|
|
75
|
+
strategy: 'backoff'
|
|
76
|
+
)
|
|
77
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
78
|
+
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
79
|
+
|
|
80
|
+
security = @sdk_configuration.security_source&.call
|
|
81
|
+
|
|
82
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
83
|
+
timeout ||= @sdk_configuration.timeout
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
connection = @sdk_configuration.client.dup
|
|
87
|
+
connection.request :retry, retry_options
|
|
88
|
+
|
|
89
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
90
|
+
config: @sdk_configuration,
|
|
91
|
+
base_url: base_url,
|
|
92
|
+
oauth2_scopes: nil,
|
|
93
|
+
operation_id: 'CreateAgentTask',
|
|
94
|
+
security_source: @sdk_configuration.security_source
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
error = nil
|
|
98
|
+
http_response = nil
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
begin
|
|
102
|
+
http_response = connection.post(url) do |req|
|
|
103
|
+
req.body = body
|
|
104
|
+
req.headers.merge!(headers)
|
|
105
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
106
|
+
Utils.configure_request_security(req, security)
|
|
107
|
+
http_headers&.each do |key, value|
|
|
108
|
+
req.headers[key.to_s] = value
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
@sdk_configuration.hooks.before_request(
|
|
112
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
113
|
+
hook_ctx: hook_ctx
|
|
114
|
+
),
|
|
115
|
+
request: req
|
|
116
|
+
)
|
|
117
|
+
end
|
|
118
|
+
rescue StandardError => e
|
|
119
|
+
error = e
|
|
120
|
+
ensure
|
|
121
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
122
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
123
|
+
error: error,
|
|
124
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
125
|
+
hook_ctx: hook_ctx
|
|
126
|
+
),
|
|
127
|
+
response: http_response
|
|
128
|
+
)
|
|
129
|
+
else
|
|
130
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
131
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
132
|
+
hook_ctx: hook_ctx
|
|
133
|
+
),
|
|
134
|
+
response: http_response
|
|
135
|
+
)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if http_response.nil?
|
|
139
|
+
raise error if !error.nil?
|
|
140
|
+
raise 'no response'
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
145
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
146
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
147
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
148
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
149
|
+
hook_ctx: hook_ctx
|
|
150
|
+
),
|
|
151
|
+
response: http_response
|
|
152
|
+
)
|
|
153
|
+
response_data = http_response.env.response_body
|
|
154
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::AgentTask)
|
|
155
|
+
response = Models::Operations::CreateAgentTaskResponse.new(
|
|
156
|
+
status_code: http_response.status,
|
|
157
|
+
content_type: content_type,
|
|
158
|
+
raw_response: http_response,
|
|
159
|
+
agent_task: obj
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
return response
|
|
163
|
+
else
|
|
164
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
165
|
+
end
|
|
166
|
+
elsif Utils.match_status_code(http_response.status, ['400', '404', '422'])
|
|
167
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
168
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
169
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
170
|
+
hook_ctx: hook_ctx
|
|
171
|
+
),
|
|
172
|
+
response: http_response
|
|
173
|
+
)
|
|
174
|
+
response_data = http_response.env.response_body
|
|
175
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
176
|
+
obj.raw_response = http_response
|
|
177
|
+
raise obj
|
|
178
|
+
else
|
|
179
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
180
|
+
end
|
|
181
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
182
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
183
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
184
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
185
|
+
else
|
|
186
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
187
|
+
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
def revoke(agent_task_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
194
|
+
# revoke - Revoke agent task
|
|
195
|
+
# Revokes a pending agent task.
|
|
196
|
+
request = Models::Operations::RevokeAgentTaskRequest.new(
|
|
197
|
+
agent_task_id: agent_task_id
|
|
198
|
+
)
|
|
199
|
+
url, params = @sdk_configuration.get_server_details
|
|
200
|
+
base_url = Utils.template_url(url, params)
|
|
201
|
+
url = Utils.generate_url(
|
|
202
|
+
Models::Operations::RevokeAgentTaskRequest,
|
|
203
|
+
base_url,
|
|
204
|
+
'/agents/tasks/{agent_task_id}/revoke',
|
|
205
|
+
request
|
|
206
|
+
)
|
|
207
|
+
headers = {}
|
|
208
|
+
|
|
209
|
+
headers['Accept'] = 'application/json'
|
|
210
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
211
|
+
retries ||= @sdk_configuration.retry_config
|
|
212
|
+
retries ||= Utils::RetryConfig.new(
|
|
213
|
+
backoff: Utils::BackoffStrategy.new(
|
|
214
|
+
exponent: 1.5,
|
|
215
|
+
initial_interval: 500,
|
|
216
|
+
max_elapsed_time: 3_600_000,
|
|
217
|
+
max_interval: 60_000
|
|
218
|
+
),
|
|
219
|
+
retry_connection_errors: true,
|
|
220
|
+
strategy: 'backoff'
|
|
221
|
+
)
|
|
222
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
223
|
+
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
224
|
+
|
|
225
|
+
security = @sdk_configuration.security_source&.call
|
|
226
|
+
|
|
227
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
228
|
+
timeout ||= @sdk_configuration.timeout
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
connection = @sdk_configuration.client.dup
|
|
232
|
+
connection.request :retry, retry_options
|
|
233
|
+
|
|
234
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
235
|
+
config: @sdk_configuration,
|
|
236
|
+
base_url: base_url,
|
|
237
|
+
oauth2_scopes: nil,
|
|
238
|
+
operation_id: 'RevokeAgentTask',
|
|
239
|
+
security_source: @sdk_configuration.security_source
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
error = nil
|
|
243
|
+
http_response = nil
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
begin
|
|
247
|
+
http_response = connection.post(url) do |req|
|
|
248
|
+
req.headers.merge!(headers)
|
|
249
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
250
|
+
Utils.configure_request_security(req, security)
|
|
251
|
+
http_headers&.each do |key, value|
|
|
252
|
+
req.headers[key.to_s] = value
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
@sdk_configuration.hooks.before_request(
|
|
256
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
257
|
+
hook_ctx: hook_ctx
|
|
258
|
+
),
|
|
259
|
+
request: req
|
|
260
|
+
)
|
|
261
|
+
end
|
|
262
|
+
rescue StandardError => e
|
|
263
|
+
error = e
|
|
264
|
+
ensure
|
|
265
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
266
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
267
|
+
error: error,
|
|
268
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
269
|
+
hook_ctx: hook_ctx
|
|
270
|
+
),
|
|
271
|
+
response: http_response
|
|
272
|
+
)
|
|
273
|
+
else
|
|
274
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
275
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
276
|
+
hook_ctx: hook_ctx
|
|
277
|
+
),
|
|
278
|
+
response: http_response
|
|
279
|
+
)
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
if http_response.nil?
|
|
283
|
+
raise error if !error.nil?
|
|
284
|
+
raise 'no response'
|
|
285
|
+
end
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
289
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
290
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
291
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
292
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
293
|
+
hook_ctx: hook_ctx
|
|
294
|
+
),
|
|
295
|
+
response: http_response
|
|
296
|
+
)
|
|
297
|
+
response_data = http_response.env.response_body
|
|
298
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::AgentTask)
|
|
299
|
+
response = Models::Operations::RevokeAgentTaskResponse.new(
|
|
300
|
+
status_code: http_response.status,
|
|
301
|
+
content_type: content_type,
|
|
302
|
+
raw_response: http_response,
|
|
303
|
+
agent_task: obj
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
return response
|
|
307
|
+
else
|
|
308
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
309
|
+
end
|
|
310
|
+
elsif Utils.match_status_code(http_response.status, ['400', '404'])
|
|
311
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
312
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
313
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
314
|
+
hook_ctx: hook_ctx
|
|
315
|
+
),
|
|
316
|
+
response: http_response
|
|
317
|
+
)
|
|
318
|
+
response_data = http_response.env.response_body
|
|
319
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
320
|
+
obj.raw_response = http_response
|
|
321
|
+
raise obj
|
|
322
|
+
else
|
|
323
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
324
|
+
end
|
|
325
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
326
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
327
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
328
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
329
|
+
else
|
|
330
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
331
|
+
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
end
|
|
@@ -38,8 +38,10 @@ module Clerk
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
|
|
42
|
+
|
|
41
43
|
|
|
42
|
-
def list(paginated: nil, limit: nil, offset: nil, retries: nil, timeout_ms: nil)
|
|
44
|
+
def list(paginated: nil, limit: nil, offset: nil, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
43
45
|
# list - List all identifiers on the allow-list
|
|
44
46
|
# Get a list of all identifiers allowed to sign up to an instance
|
|
45
47
|
request = Models::Operations::ListAllowlistIdentifiersRequest.new(
|
|
@@ -96,6 +98,9 @@ module Clerk
|
|
|
96
98
|
req.options.timeout = timeout unless timeout.nil?
|
|
97
99
|
req.params = query_params
|
|
98
100
|
Utils.configure_request_security(req, security)
|
|
101
|
+
http_headers&.each do |key, value|
|
|
102
|
+
req.headers[key.to_s] = value
|
|
103
|
+
end
|
|
99
104
|
|
|
100
105
|
@sdk_configuration.hooks.before_request(
|
|
101
106
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -179,7 +184,7 @@ module Clerk
|
|
|
179
184
|
|
|
180
185
|
|
|
181
186
|
|
|
182
|
-
def create(request: nil, retries: nil, timeout_ms: nil)
|
|
187
|
+
def create(request: nil, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
183
188
|
# create - Add identifier to the allow-list
|
|
184
189
|
# Create an identifier allowed to sign up to an instance
|
|
185
190
|
url, params = @sdk_configuration.get_server_details
|
|
@@ -190,7 +195,7 @@ module Clerk
|
|
|
190
195
|
req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
|
|
191
196
|
headers['content-type'] = req_content_type
|
|
192
197
|
|
|
193
|
-
if form
|
|
198
|
+
if form && !form.empty?
|
|
194
199
|
body = Utils.encode_form(form)
|
|
195
200
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
196
201
|
body = URI.encode_www_form(data)
|
|
@@ -240,6 +245,9 @@ module Clerk
|
|
|
240
245
|
req.headers.merge!(headers)
|
|
241
246
|
req.options.timeout = timeout unless timeout.nil?
|
|
242
247
|
Utils.configure_request_security(req, security)
|
|
248
|
+
http_headers&.each do |key, value|
|
|
249
|
+
req.headers[key.to_s] = value
|
|
250
|
+
end
|
|
243
251
|
|
|
244
252
|
@sdk_configuration.hooks.before_request(
|
|
245
253
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -323,7 +331,7 @@ module Clerk
|
|
|
323
331
|
|
|
324
332
|
|
|
325
333
|
|
|
326
|
-
def delete(identifier_id:, retries: nil, timeout_ms: nil)
|
|
334
|
+
def delete(identifier_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
327
335
|
# delete - Delete identifier from allow-list
|
|
328
336
|
# Delete an identifier from the instance allow-list
|
|
329
337
|
request = Models::Operations::DeleteAllowlistIdentifierRequest.new(
|
|
@@ -381,6 +389,9 @@ module Clerk
|
|
|
381
389
|
req.headers.merge!(headers)
|
|
382
390
|
req.options.timeout = timeout unless timeout.nil?
|
|
383
391
|
Utils.configure_request_security(req, security)
|
|
392
|
+
http_headers&.each do |key, value|
|
|
393
|
+
req.headers[key.to_s] = value
|
|
394
|
+
end
|
|
384
395
|
|
|
385
396
|
@sdk_configuration.hooks.before_request(
|
|
386
397
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -461,5 +472,5 @@ module Clerk
|
|
|
461
472
|
|
|
462
473
|
end
|
|
463
474
|
end
|
|
464
|
-
|
|
475
|
+
end
|
|
465
476
|
end
|
data/lib/clerk/api_keys.rb
CHANGED
|
@@ -38,8 +38,10 @@ module Clerk
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
|
|
42
|
+
|
|
41
43
|
|
|
42
|
-
def create_api_key(request:, retries: nil, timeout_ms: nil)
|
|
44
|
+
def create_api_key(request:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
43
45
|
# create_api_key - Create an API Key
|
|
44
46
|
url, params = @sdk_configuration.get_server_details
|
|
45
47
|
base_url = Utils.template_url(url, params)
|
|
@@ -50,7 +52,7 @@ module Clerk
|
|
|
50
52
|
headers['content-type'] = req_content_type
|
|
51
53
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
52
54
|
|
|
53
|
-
if form
|
|
55
|
+
if form && !form.empty?
|
|
54
56
|
body = Utils.encode_form(form)
|
|
55
57
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
56
58
|
body = URI.encode_www_form(data)
|
|
@@ -100,6 +102,9 @@ module Clerk
|
|
|
100
102
|
req.headers.merge!(headers)
|
|
101
103
|
req.options.timeout = timeout unless timeout.nil?
|
|
102
104
|
Utils.configure_request_security(req, security)
|
|
105
|
+
http_headers&.each do |key, value|
|
|
106
|
+
req.headers[key.to_s] = value
|
|
107
|
+
end
|
|
103
108
|
|
|
104
109
|
@sdk_configuration.hooks.before_request(
|
|
105
110
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -198,7 +203,7 @@ module Clerk
|
|
|
198
203
|
|
|
199
204
|
|
|
200
205
|
|
|
201
|
-
def get_api_keys(request:, retries: nil, timeout_ms: nil)
|
|
206
|
+
def get_api_keys(request:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
202
207
|
# get_api_keys - Get API Keys
|
|
203
208
|
url, params = @sdk_configuration.get_server_details
|
|
204
209
|
base_url = Utils.template_url(url, params)
|
|
@@ -249,6 +254,9 @@ module Clerk
|
|
|
249
254
|
req.options.timeout = timeout unless timeout.nil?
|
|
250
255
|
req.params = query_params
|
|
251
256
|
Utils.configure_request_security(req, security)
|
|
257
|
+
http_headers&.each do |key, value|
|
|
258
|
+
req.headers[key.to_s] = value
|
|
259
|
+
end
|
|
252
260
|
|
|
253
261
|
@sdk_configuration.hooks.before_request(
|
|
254
262
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -347,7 +355,7 @@ module Clerk
|
|
|
347
355
|
|
|
348
356
|
|
|
349
357
|
|
|
350
|
-
def get_api_key(api_key_id:, retries: nil, timeout_ms: nil)
|
|
358
|
+
def get_api_key(api_key_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
351
359
|
# get_api_key - Get an API Key by ID
|
|
352
360
|
request = Models::Operations::GetApiKeyRequest.new(
|
|
353
361
|
api_key_id: api_key_id
|
|
@@ -404,6 +412,9 @@ module Clerk
|
|
|
404
412
|
req.headers.merge!(headers)
|
|
405
413
|
req.options.timeout = timeout unless timeout.nil?
|
|
406
414
|
Utils.configure_request_security(req, security)
|
|
415
|
+
http_headers&.each do |key, value|
|
|
416
|
+
req.headers[key.to_s] = value
|
|
417
|
+
end
|
|
407
418
|
|
|
408
419
|
@sdk_configuration.hooks.before_request(
|
|
409
420
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -502,7 +513,7 @@ module Clerk
|
|
|
502
513
|
|
|
503
514
|
|
|
504
515
|
|
|
505
|
-
def update_api_key(body:, api_key_id:, retries: nil, timeout_ms: nil)
|
|
516
|
+
def update_api_key(body:, api_key_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
506
517
|
# update_api_key - Update an API Key
|
|
507
518
|
request = Models::Operations::UpdateApiKeyRequest.new(
|
|
508
519
|
api_key_id: api_key_id,
|
|
@@ -522,7 +533,7 @@ module Clerk
|
|
|
522
533
|
headers['content-type'] = req_content_type
|
|
523
534
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
524
535
|
|
|
525
|
-
if form
|
|
536
|
+
if form && !form.empty?
|
|
526
537
|
body = Utils.encode_form(form)
|
|
527
538
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
528
539
|
body = URI.encode_www_form(data)
|
|
@@ -572,6 +583,9 @@ module Clerk
|
|
|
572
583
|
req.headers.merge!(headers)
|
|
573
584
|
req.options.timeout = timeout unless timeout.nil?
|
|
574
585
|
Utils.configure_request_security(req, security)
|
|
586
|
+
http_headers&.each do |key, value|
|
|
587
|
+
req.headers[key.to_s] = value
|
|
588
|
+
end
|
|
575
589
|
|
|
576
590
|
@sdk_configuration.hooks.before_request(
|
|
577
591
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -670,7 +684,7 @@ module Clerk
|
|
|
670
684
|
|
|
671
685
|
|
|
672
686
|
|
|
673
|
-
def delete_api_key(api_key_id:, retries: nil, timeout_ms: nil)
|
|
687
|
+
def delete_api_key(api_key_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
674
688
|
# delete_api_key - Delete an API Key
|
|
675
689
|
request = Models::Operations::DeleteApiKeyRequest.new(
|
|
676
690
|
api_key_id: api_key_id
|
|
@@ -727,6 +741,9 @@ module Clerk
|
|
|
727
741
|
req.headers.merge!(headers)
|
|
728
742
|
req.options.timeout = timeout unless timeout.nil?
|
|
729
743
|
Utils.configure_request_security(req, security)
|
|
744
|
+
http_headers&.each do |key, value|
|
|
745
|
+
req.headers[key.to_s] = value
|
|
746
|
+
end
|
|
730
747
|
|
|
731
748
|
@sdk_configuration.hooks.before_request(
|
|
732
749
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -825,7 +842,7 @@ module Clerk
|
|
|
825
842
|
|
|
826
843
|
|
|
827
844
|
|
|
828
|
-
def get_api_key_secret(api_key_id:, retries: nil, timeout_ms: nil)
|
|
845
|
+
def get_api_key_secret(api_key_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
829
846
|
# get_api_key_secret - Get an API Key Secret
|
|
830
847
|
request = Models::Operations::GetApiKeySecretRequest.new(
|
|
831
848
|
api_key_id: api_key_id
|
|
@@ -882,6 +899,9 @@ module Clerk
|
|
|
882
899
|
req.headers.merge!(headers)
|
|
883
900
|
req.options.timeout = timeout unless timeout.nil?
|
|
884
901
|
Utils.configure_request_security(req, security)
|
|
902
|
+
http_headers&.each do |key, value|
|
|
903
|
+
req.headers[key.to_s] = value
|
|
904
|
+
end
|
|
885
905
|
|
|
886
906
|
@sdk_configuration.hooks.before_request(
|
|
887
907
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -980,7 +1000,7 @@ module Clerk
|
|
|
980
1000
|
|
|
981
1001
|
|
|
982
1002
|
|
|
983
|
-
def revoke_api_key(body:, api_key_id:, retries: nil, timeout_ms: nil)
|
|
1003
|
+
def revoke_api_key(body:, api_key_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
984
1004
|
# revoke_api_key - Revoke an API Key
|
|
985
1005
|
request = Models::Operations::RevokeApiKeyRequest.new(
|
|
986
1006
|
api_key_id: api_key_id,
|
|
@@ -1000,7 +1020,7 @@ module Clerk
|
|
|
1000
1020
|
headers['content-type'] = req_content_type
|
|
1001
1021
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
1002
1022
|
|
|
1003
|
-
if form
|
|
1023
|
+
if form && !form.empty?
|
|
1004
1024
|
body = Utils.encode_form(form)
|
|
1005
1025
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
1006
1026
|
body = URI.encode_www_form(data)
|
|
@@ -1050,6 +1070,9 @@ module Clerk
|
|
|
1050
1070
|
req.headers.merge!(headers)
|
|
1051
1071
|
req.options.timeout = timeout unless timeout.nil?
|
|
1052
1072
|
Utils.configure_request_security(req, security)
|
|
1073
|
+
http_headers&.each do |key, value|
|
|
1074
|
+
req.headers[key.to_s] = value
|
|
1075
|
+
end
|
|
1053
1076
|
|
|
1054
1077
|
@sdk_configuration.hooks.before_request(
|
|
1055
1078
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -1148,7 +1171,7 @@ module Clerk
|
|
|
1148
1171
|
|
|
1149
1172
|
|
|
1150
1173
|
|
|
1151
|
-
def verify_api_key(request:, retries: nil, timeout_ms: nil)
|
|
1174
|
+
def verify_api_key(request:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
1152
1175
|
# verify_api_key - Verify an API Key
|
|
1153
1176
|
url, params = @sdk_configuration.get_server_details
|
|
1154
1177
|
base_url = Utils.template_url(url, params)
|
|
@@ -1159,7 +1182,7 @@ module Clerk
|
|
|
1159
1182
|
headers['content-type'] = req_content_type
|
|
1160
1183
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
1161
1184
|
|
|
1162
|
-
if form
|
|
1185
|
+
if form && !form.empty?
|
|
1163
1186
|
body = Utils.encode_form(form)
|
|
1164
1187
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
1165
1188
|
body = URI.encode_www_form(data)
|
|
@@ -1209,6 +1232,9 @@ module Clerk
|
|
|
1209
1232
|
req.headers.merge!(headers)
|
|
1210
1233
|
req.options.timeout = timeout unless timeout.nil?
|
|
1211
1234
|
Utils.configure_request_security(req, security)
|
|
1235
|
+
http_headers&.each do |key, value|
|
|
1236
|
+
req.headers[key.to_s] = value
|
|
1237
|
+
end
|
|
1212
1238
|
|
|
1213
1239
|
@sdk_configuration.hooks.before_request(
|
|
1214
1240
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -1304,5 +1330,5 @@ module Clerk
|
|
|
1304
1330
|
|
|
1305
1331
|
end
|
|
1306
1332
|
end
|
|
1307
|
-
|
|
1333
|
+
end
|
|
1308
1334
|
end
|