clerk-sdk-ruby 5.1.2 → 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 +11 -3
- data/lib/clerk/agenttasks.rb +335 -0
- data/lib/clerk/allowlistidentifiers.rb +15 -4
- data/lib/clerk/api_keys.rb +35 -9
- data/lib/clerk/betafeatures.rb +11 -3
- data/lib/clerk/billing.rb +43 -11
- data/lib/clerk/blocklistidentifiers.rb +15 -4
- data/lib/clerk/clients.rb +15 -4
- data/lib/clerk/domains.rb +19 -5
- data/lib/clerk/emailaddresses.rb +21 -7
- data/lib/clerk/emailandsmstemplates.rb +7 -2
- data/lib/clerk/emailsmstemplates.rb +19 -5
- data/lib/clerk/instancesettings.rb +299 -8
- data/lib/clerk/invitations.rb +19 -5
- data/lib/clerk/jwks.rb +7 -2
- data/lib/clerk/jwttemplates.rb +23 -6
- data/lib/clerk/m2m.rb +23 -5
- data/lib/clerk/machines.rb +39 -10
- 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/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/balance.rb +44 -0
- data/lib/clerk/models/components/balance.rbi +19 -0
- data/lib/clerk/models/components/billingpaymentattempt.rb +5 -1
- 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 +5 -1
- data/lib/clerk/models/components/billingpriceresponse.rbi +2 -0
- data/lib/clerk/models/components/billingstatement.rb +1 -1
- 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/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/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 +5 -1
- 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/commercesubscriptionitem.rb +13 -1
- 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 +5 -1
- 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/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/schemas_commercesubscriptionitem.rb +1 -1
- data/lib/clerk/models/components/{payer.rb → schemas_commercesubscriptionitem_payer.rb} +1 -1
- data/lib/clerk/models/components/{payer.rbi → schemas_commercesubscriptionitem_payer.rbi} +2 -2
- data/lib/clerk/models/components/seats.rb +32 -0
- data/lib/clerk/models/components/seats.rbi +13 -0
- data/lib/clerk/models/components.rb +27 -2
- 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/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/createm2mtoken_request.rb +5 -1
- data/lib/clerk/models/operations/createm2mtoken_request.rbi +2 -0
- 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/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/listinstanceorganizationinvitations_status.rb +1 -0
- data/lib/clerk/models/operations/listorganizationinvitations_status.rb +1 -0
- 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/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/token_format.rb +20 -0
- data/lib/clerk/models/operations/token_format.rbi +11 -0
- 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/usersgetorganizationinvitations_status.rb +1 -0
- data/lib/clerk/models/operations.rb +18 -0
- data/lib/clerk/oauthaccesstokens.rb +7 -2
- data/lib/clerk/oauthapplications.rb +27 -7
- data/lib/clerk/openapiclient.rb +4 -2
- data/lib/clerk/organizationdomains.rb +23 -6
- data/lib/clerk/organizationinvitations.rb +32 -9
- data/lib/clerk/organizationmemberships.rb +23 -6
- data/lib/clerk/organizationpermissions.rb +23 -6
- data/lib/clerk/organizationroles.rb +31 -8
- data/lib/clerk/organizations.rb +374 -11
- data/lib/clerk/phonenumbers.rb +19 -5
- data/lib/clerk/proxychecks.rb +7 -2
- data/lib/clerk/redirecturls.rb +19 -5
- data/lib/clerk/rolesets.rb +31 -8
- data/lib/clerk/samlconnections.rb +23 -6
- data/lib/clerk/sdkconfiguration.rb +3 -3
- data/lib/clerk/sessions.rb +35 -9
- data/lib/clerk/signintokens.rb +11 -3
- data/lib/clerk/signups.rb +11 -3
- data/lib/clerk/templates.rb +7 -2
- data/lib/clerk/testingtokens.rb +7 -2
- data/lib/clerk/users.rb +458 -32
- data/lib/clerk/waitlistentries.rb +27 -7
- data/lib/clerk/webhooks.rb +15 -4
- data/lib/clerk_sdk_ruby.rb +1 -0
- data/lib/crystalline/types.rb +11 -3
- metadata +107 -6
|
@@ -11,6 +11,10 @@ module Clerk
|
|
|
11
11
|
autoload :AddRolesToRoleSetRequestBody, 'clerk/models/operations/addrolestoroleset_requestbody.rb'
|
|
12
12
|
autoload :AddRolesToRoleSetRequest, 'clerk/models/operations/addrolestoroleset_request.rb'
|
|
13
13
|
autoload :AddRolesToRoleSetResponse, 'clerk/models/operations/addrolestoroleset_response.rb'
|
|
14
|
+
autoload :AdjustOrganizationBillingCreditBalanceRequest, 'clerk/models/operations/adjustorganizationbillingcreditbalance_request.rb'
|
|
15
|
+
autoload :AdjustOrganizationBillingCreditBalanceResponse, 'clerk/models/operations/adjustorganizationbillingcreditbalance_response.rb'
|
|
16
|
+
autoload :AdjustUserBillingCreditBalanceRequest, 'clerk/models/operations/adjustuserbillingcreditbalance_request.rb'
|
|
17
|
+
autoload :AdjustUserBillingCreditBalanceResponse, 'clerk/models/operations/adjustuserbillingcreditbalance_response.rb'
|
|
14
18
|
autoload :AssignPermissionToOrganizationRoleRequest, 'clerk/models/operations/assignpermissiontoorganizationrole_request.rb'
|
|
15
19
|
autoload :AssignPermissionToOrganizationRoleResponse, 'clerk/models/operations/assignpermissiontoorganizationrole_response.rb'
|
|
16
20
|
autoload :BanUserRequest, 'clerk/models/operations/banuser_request.rb'
|
|
@@ -22,6 +26,8 @@ module Clerk
|
|
|
22
26
|
autoload :ClerkIdpOauthAccessToken, 'clerk/models/operations/clerkidpoauthaccesstoken.rb'
|
|
23
27
|
autoload :CreateActorTokenRequest, 'clerk/models/operations/createactortoken_request.rb'
|
|
24
28
|
autoload :CreateActorTokenResponse, 'clerk/models/operations/createactortoken_response.rb'
|
|
29
|
+
autoload :CreateAgentTaskRequest, 'clerk/models/operations/createagenttask_request.rb'
|
|
30
|
+
autoload :CreateAgentTaskResponse, 'clerk/models/operations/createagenttask_response.rb'
|
|
25
31
|
autoload :CreateAllowlistIdentifierRequest, 'clerk/models/operations/createallowlistidentifier_request.rb'
|
|
26
32
|
autoload :CreateAllowlistIdentifierResponse, 'clerk/models/operations/createallowlistidentifier_response.rb'
|
|
27
33
|
autoload :CreateBillingPriceTransitionRequest, 'clerk/models/operations/createbillingpricetransition_request.rb'
|
|
@@ -175,6 +181,7 @@ module Clerk
|
|
|
175
181
|
autoload :GetCommerceSubscriptionItemListStatus, 'clerk/models/operations/getcommercesubscriptionitemlist_status.rb'
|
|
176
182
|
autoload :GetEmailAddressRequest, 'clerk/models/operations/getemailaddress_request.rb'
|
|
177
183
|
autoload :GetEmailAddressResponse, 'clerk/models/operations/getemailaddress_response.rb'
|
|
184
|
+
autoload :GetInstanceOAuthApplicationSettingsResponse, 'clerk/models/operations/getinstanceoauthapplicationsettings_response.rb'
|
|
178
185
|
autoload :GetInstanceProtectResponse, 'clerk/models/operations/getinstanceprotect_response.rb'
|
|
179
186
|
autoload :GetInstanceResponse, 'clerk/models/operations/getinstance_response.rb'
|
|
180
187
|
autoload :GetJWKSResponse, 'clerk/models/operations/getjwks_response.rb'
|
|
@@ -188,6 +195,8 @@ module Clerk
|
|
|
188
195
|
autoload :GetOAuthAccessTokenResponse, 'clerk/models/operations/getoauthaccesstoken_response.rb'
|
|
189
196
|
autoload :GetOAuthApplicationRequest, 'clerk/models/operations/getoauthapplication_request.rb'
|
|
190
197
|
autoload :GetOAuthApplicationResponse, 'clerk/models/operations/getoauthapplication_response.rb'
|
|
198
|
+
autoload :GetOrganizationBillingCreditBalanceRequest, 'clerk/models/operations/getorganizationbillingcreditbalance_request.rb'
|
|
199
|
+
autoload :GetOrganizationBillingCreditBalanceResponse, 'clerk/models/operations/getorganizationbillingcreditbalance_response.rb'
|
|
191
200
|
autoload :GetOrganizationBillingSubscriptionRequest, 'clerk/models/operations/getorganizationbillingsubscription_request.rb'
|
|
192
201
|
autoload :GetOrganizationBillingSubscriptionResponse, 'clerk/models/operations/getorganizationbillingsubscription_response.rb'
|
|
193
202
|
autoload :GetOrganizationInvitationRequest, 'clerk/models/operations/getorganizationinvitation_request.rb'
|
|
@@ -221,6 +230,8 @@ module Clerk
|
|
|
221
230
|
autoload :GetTemplateRequest, 'clerk/models/operations/gettemplate_request.rb'
|
|
222
231
|
autoload :GetTemplateResponse, 'clerk/models/operations/gettemplate_response.rb'
|
|
223
232
|
autoload :GetTemplateTemplateType, 'clerk/models/operations/gettemplate_template_type.rb'
|
|
233
|
+
autoload :GetUserBillingCreditBalanceRequest, 'clerk/models/operations/getuserbillingcreditbalance_request.rb'
|
|
234
|
+
autoload :GetUserBillingCreditBalanceResponse, 'clerk/models/operations/getuserbillingcreditbalance_response.rb'
|
|
224
235
|
autoload :GetUserBillingSubscriptionRequest, 'clerk/models/operations/getuserbillingsubscription_request.rb'
|
|
225
236
|
autoload :GetUserBillingSubscriptionResponse, 'clerk/models/operations/getuserbillingsubscription_response.rb'
|
|
226
237
|
autoload :GetUserListRequest, 'clerk/models/operations/getuserlist_request.rb'
|
|
@@ -304,6 +315,8 @@ module Clerk
|
|
|
304
315
|
autoload :RevertTemplateTemplateType, 'clerk/models/operations/reverttemplate_template_type.rb'
|
|
305
316
|
autoload :RevokeActorTokenRequest, 'clerk/models/operations/revokeactortoken_request.rb'
|
|
306
317
|
autoload :RevokeActorTokenResponse, 'clerk/models/operations/revokeactortoken_response.rb'
|
|
318
|
+
autoload :RevokeAgentTaskRequest, 'clerk/models/operations/revokeagenttask_request.rb'
|
|
319
|
+
autoload :RevokeAgentTaskResponse, 'clerk/models/operations/revokeagenttask_response.rb'
|
|
307
320
|
autoload :RevokeInvitationRequest, 'clerk/models/operations/revokeinvitation_request.rb'
|
|
308
321
|
autoload :RevokeInvitationResponse, 'clerk/models/operations/revokeinvitation_response.rb'
|
|
309
322
|
autoload :RevokeOrganizationInvitationRequestBody, 'clerk/models/operations/revokeorganizationinvitation_requestbody.rb'
|
|
@@ -343,6 +356,8 @@ module Clerk
|
|
|
343
356
|
autoload :UpdateEmailAddressResponse, 'clerk/models/operations/updateemailaddress_response.rb'
|
|
344
357
|
autoload :UpdateInstanceAuthConfigRequest, 'clerk/models/operations/updateinstanceauthconfig_request.rb'
|
|
345
358
|
autoload :UpdateInstanceAuthConfigResponse, 'clerk/models/operations/updateinstanceauthconfig_response.rb'
|
|
359
|
+
autoload :UpdateInstanceOAuthApplicationSettingsRequest, 'clerk/models/operations/updateinstanceoauthapplicationsettings_request.rb'
|
|
360
|
+
autoload :UpdateInstanceOAuthApplicationSettingsResponse, 'clerk/models/operations/updateinstanceoauthapplicationsettings_response.rb'
|
|
346
361
|
autoload :UpdateInstanceOrganizationSettingsRequest, 'clerk/models/operations/updateinstanceorganizationsettings_request.rb'
|
|
347
362
|
autoload :UpdateInstanceOrganizationSettingsResponse, 'clerk/models/operations/updateinstanceorganizationsettings_response.rb'
|
|
348
363
|
autoload :UpdateInstanceProtectRequest, 'clerk/models/operations/updateinstanceprotect_request.rb'
|
|
@@ -484,6 +499,8 @@ module Clerk
|
|
|
484
499
|
autoload :GetM2MTokensResponse, 'clerk/models/operations/getm2mtokens_response.rb'
|
|
485
500
|
autoload :IncludeInvalid, 'clerk/models/operations/include_invalid.rb'
|
|
486
501
|
autoload :M2mToken, 'clerk/models/operations/m2m_token.rb'
|
|
502
|
+
autoload :OnBehalfOf, 'clerk/models/operations/on_behalf_of.rb'
|
|
503
|
+
autoload :Permissions, 'clerk/models/operations/permissions.rb'
|
|
487
504
|
autoload :Provider1, 'clerk/models/operations/provider_1.rb'
|
|
488
505
|
autoload :Provider2, 'clerk/models/operations/provider_2.rb'
|
|
489
506
|
autoload :RevokeApiKeyBadRequestError, 'clerk/models/operations/revokeapikey_badrequest_error.rb'
|
|
@@ -500,6 +517,7 @@ module Clerk
|
|
|
500
517
|
autoload :RevokeM2MTokenObject, 'clerk/models/operations/revokem2mtoken_object.rb'
|
|
501
518
|
autoload :RevokeM2MTokenRequest, 'clerk/models/operations/revokem2mtoken_request.rb'
|
|
502
519
|
autoload :RevokeM2MTokenResponse, 'clerk/models/operations/revokem2mtoken_response.rb'
|
|
520
|
+
autoload :TokenFormat, 'clerk/models/operations/token_format.rb'
|
|
503
521
|
autoload :UpdateApiKeyBadRequestError, 'clerk/models/operations/updateapikey_badrequest_error.rb'
|
|
504
522
|
autoload :UpdateApiKeyNotFoundError, 'clerk/models/operations/updateapikey_notfound_error.rb'
|
|
505
523
|
autoload :UpdateApiKeyRequestBody, 'clerk/models/operations/updateapikey_requestbody.rb'
|
|
@@ -38,8 +38,10 @@ module Clerk
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
|
|
42
|
+
|
|
41
43
|
|
|
42
|
-
def verify(request:, retries: nil, timeout_ms: nil)
|
|
44
|
+
def verify(request:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
43
45
|
# verify - Verify an OAuth Access Token
|
|
44
46
|
url, params = @sdk_configuration.get_server_details
|
|
45
47
|
base_url = Utils.template_url(url, params)
|
|
@@ -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(
|
|
@@ -195,5 +200,5 @@ module Clerk
|
|
|
195
200
|
|
|
196
201
|
end
|
|
197
202
|
end
|
|
198
|
-
|
|
203
|
+
end
|
|
199
204
|
end
|
|
@@ -38,8 +38,10 @@ module Clerk
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
|
|
42
|
+
|
|
41
43
|
|
|
42
|
-
def list(limit: nil, offset: nil, order_by: nil, name_query: nil, retries: nil, timeout_ms: nil)
|
|
44
|
+
def list(limit: nil, offset: nil, order_by: nil, name_query: nil, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
43
45
|
# list - Get a list of OAuth applications for an instance
|
|
44
46
|
# This request returns the list of OAuth applications for an instance.
|
|
45
47
|
# Results can be paginated using the optional `limit` and `offset` query parameters.
|
|
@@ -100,6 +102,9 @@ module Clerk
|
|
|
100
102
|
req.options.timeout = timeout unless timeout.nil?
|
|
101
103
|
req.params = query_params
|
|
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(
|
|
@@ -183,7 +188,7 @@ module Clerk
|
|
|
183
188
|
|
|
184
189
|
|
|
185
190
|
|
|
186
|
-
def create(request: nil, retries: nil, timeout_ms: nil)
|
|
191
|
+
def create(request: nil, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
187
192
|
# create - Create an OAuth application
|
|
188
193
|
# Creates a new OAuth application with the given name and callback URL for an instance.
|
|
189
194
|
# The callback URL must be a valid URL.
|
|
@@ -246,6 +251,9 @@ module Clerk
|
|
|
246
251
|
req.headers.merge!(headers)
|
|
247
252
|
req.options.timeout = timeout unless timeout.nil?
|
|
248
253
|
Utils.configure_request_security(req, security)
|
|
254
|
+
http_headers&.each do |key, value|
|
|
255
|
+
req.headers[key.to_s] = value
|
|
256
|
+
end
|
|
249
257
|
|
|
250
258
|
@sdk_configuration.hooks.before_request(
|
|
251
259
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -329,7 +337,7 @@ module Clerk
|
|
|
329
337
|
|
|
330
338
|
|
|
331
339
|
|
|
332
|
-
def get(oauth_application_id:, retries: nil, timeout_ms: nil)
|
|
340
|
+
def get(oauth_application_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
333
341
|
# get - Retrieve an OAuth application by ID
|
|
334
342
|
# Fetches the OAuth application whose ID matches the provided `id` in the path.
|
|
335
343
|
request = Models::Operations::GetOAuthApplicationRequest.new(
|
|
@@ -387,6 +395,9 @@ module Clerk
|
|
|
387
395
|
req.headers.merge!(headers)
|
|
388
396
|
req.options.timeout = timeout unless timeout.nil?
|
|
389
397
|
Utils.configure_request_security(req, security)
|
|
398
|
+
http_headers&.each do |key, value|
|
|
399
|
+
req.headers[key.to_s] = value
|
|
400
|
+
end
|
|
390
401
|
|
|
391
402
|
@sdk_configuration.hooks.before_request(
|
|
392
403
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -470,7 +481,7 @@ module Clerk
|
|
|
470
481
|
|
|
471
482
|
|
|
472
483
|
|
|
473
|
-
def update(body:, oauth_application_id:, retries: nil, timeout_ms: nil)
|
|
484
|
+
def update(body:, oauth_application_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
474
485
|
# update - Update an OAuth application
|
|
475
486
|
# Updates an existing OAuth application
|
|
476
487
|
request = Models::Operations::UpdateOAuthApplicationRequest.new(
|
|
@@ -541,6 +552,9 @@ module Clerk
|
|
|
541
552
|
req.headers.merge!(headers)
|
|
542
553
|
req.options.timeout = timeout unless timeout.nil?
|
|
543
554
|
Utils.configure_request_security(req, security)
|
|
555
|
+
http_headers&.each do |key, value|
|
|
556
|
+
req.headers[key.to_s] = value
|
|
557
|
+
end
|
|
544
558
|
|
|
545
559
|
@sdk_configuration.hooks.before_request(
|
|
546
560
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -624,7 +638,7 @@ module Clerk
|
|
|
624
638
|
|
|
625
639
|
|
|
626
640
|
|
|
627
|
-
def delete(oauth_application_id:, retries: nil, timeout_ms: nil)
|
|
641
|
+
def delete(oauth_application_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
628
642
|
# delete - Delete an OAuth application
|
|
629
643
|
# Deletes the given OAuth application.
|
|
630
644
|
# This is not reversible.
|
|
@@ -683,6 +697,9 @@ module Clerk
|
|
|
683
697
|
req.headers.merge!(headers)
|
|
684
698
|
req.options.timeout = timeout unless timeout.nil?
|
|
685
699
|
Utils.configure_request_security(req, security)
|
|
700
|
+
http_headers&.each do |key, value|
|
|
701
|
+
req.headers[key.to_s] = value
|
|
702
|
+
end
|
|
686
703
|
|
|
687
704
|
@sdk_configuration.hooks.before_request(
|
|
688
705
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -766,7 +783,7 @@ module Clerk
|
|
|
766
783
|
|
|
767
784
|
|
|
768
785
|
|
|
769
|
-
def rotate_secret(oauth_application_id:, retries: nil, timeout_ms: nil)
|
|
786
|
+
def rotate_secret(oauth_application_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
770
787
|
# rotate_secret - Rotate the client secret of the given OAuth application
|
|
771
788
|
# Rotates the OAuth application's client secret.
|
|
772
789
|
# When the client secret is rotated, make sure to update it in authorized OAuth clients.
|
|
@@ -825,6 +842,9 @@ module Clerk
|
|
|
825
842
|
req.headers.merge!(headers)
|
|
826
843
|
req.options.timeout = timeout unless timeout.nil?
|
|
827
844
|
Utils.configure_request_security(req, security)
|
|
845
|
+
http_headers&.each do |key, value|
|
|
846
|
+
req.headers[key.to_s] = value
|
|
847
|
+
end
|
|
828
848
|
|
|
829
849
|
@sdk_configuration.hooks.before_request(
|
|
830
850
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -905,5 +925,5 @@ module Clerk
|
|
|
905
925
|
|
|
906
926
|
end
|
|
907
927
|
end
|
|
908
|
-
|
|
928
|
+
end
|
|
909
929
|
end
|
data/lib/clerk/openapiclient.rb
CHANGED
|
@@ -15,7 +15,7 @@ module Clerk
|
|
|
15
15
|
class OpenAPIClient
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
attr_accessor :miscellaneous, :jwks, :clients, :email_addresses, :phone_numbers, :sessions, :email_sms_templates, :email_and_sms_templates, :templates, :users, :invitations, :organization_invitations, :allowlist_identifiers, :blocklist_identifiers, :beta_features, :actor_tokens, :domains, :instance_settings, :webhooks, :jwt_templates, :machines, :organizations, :organization_roles, :organization_memberships, :organization_domains, :proxy_checks, :redirect_urls, :sign_in_tokens, :sign_ups, :oauth_applications, :saml_connections, :testing_tokens, :waitlist_entries, :billing, :organization_permissions, :role_sets, :api_keys, :m2m, :oauth_access_tokens
|
|
18
|
+
attr_accessor :miscellaneous, :jwks, :clients, :email_addresses, :phone_numbers, :sessions, :email_sms_templates, :email_and_sms_templates, :templates, :users, :invitations, :organization_invitations, :allowlist_identifiers, :blocklist_identifiers, :beta_features, :actor_tokens, :domains, :instance_settings, :webhooks, :jwt_templates, :machines, :organizations, :organization_roles, :organization_memberships, :organization_domains, :proxy_checks, :redirect_urls, :sign_in_tokens, :sign_ups, :oauth_applications, :saml_connections, :testing_tokens, :agent_tasks, :waitlist_entries, :billing, :organization_permissions, :role_sets, :api_keys, :m2m, :oauth_access_tokens
|
|
19
19
|
|
|
20
20
|
# Instantiates the SDK, configuring it with the provided parameters.
|
|
21
21
|
#
|
|
@@ -97,6 +97,7 @@ module Clerk
|
|
|
97
97
|
@oauth_applications = OauthApplications.new(@sdk_configuration)
|
|
98
98
|
@saml_connections = SamlConnections.new(@sdk_configuration)
|
|
99
99
|
@testing_tokens = TestingTokens.new(@sdk_configuration)
|
|
100
|
+
@agent_tasks = AgentTasks.new(@sdk_configuration)
|
|
100
101
|
@waitlist_entries = WaitlistEntries.new(@sdk_configuration)
|
|
101
102
|
@billing = Billing.new(@sdk_configuration)
|
|
102
103
|
@organization_permissions = OrganizationPermissions.new(@sdk_configuration)
|
|
@@ -120,5 +121,6 @@ module Clerk
|
|
|
120
121
|
|
|
121
122
|
return Utils.template_url base_url, url_variables
|
|
122
123
|
end
|
|
123
|
-
|
|
124
|
+
|
|
125
|
+
end
|
|
124
126
|
end
|
|
@@ -38,8 +38,10 @@ module Clerk
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
|
|
42
|
+
|
|
41
43
|
|
|
42
|
-
def create(body:, organization_id:, retries: nil, timeout_ms: nil)
|
|
44
|
+
def create(body:, organization_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
43
45
|
# create - Create a new organization domain.
|
|
44
46
|
# Creates a new organization domain. By default the domain is verified, but can be optionally set to unverified.
|
|
45
47
|
request = Models::Operations::CreateOrganizationDomainRequest.new(
|
|
@@ -110,6 +112,9 @@ module Clerk
|
|
|
110
112
|
req.headers.merge!(headers)
|
|
111
113
|
req.options.timeout = timeout unless timeout.nil?
|
|
112
114
|
Utils.configure_request_security(req, security)
|
|
115
|
+
http_headers&.each do |key, value|
|
|
116
|
+
req.headers[key.to_s] = value
|
|
117
|
+
end
|
|
113
118
|
|
|
114
119
|
@sdk_configuration.hooks.before_request(
|
|
115
120
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -193,7 +198,7 @@ module Clerk
|
|
|
193
198
|
|
|
194
199
|
|
|
195
200
|
|
|
196
|
-
def list(request:, retries: nil, timeout_ms: nil)
|
|
201
|
+
def list(request:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
197
202
|
# list - Get a list of all domains of an organization.
|
|
198
203
|
# Get a list of all domains of an organization.
|
|
199
204
|
url, params = @sdk_configuration.get_server_details
|
|
@@ -250,6 +255,9 @@ module Clerk
|
|
|
250
255
|
req.options.timeout = timeout unless timeout.nil?
|
|
251
256
|
req.params = query_params
|
|
252
257
|
Utils.configure_request_security(req, security)
|
|
258
|
+
http_headers&.each do |key, value|
|
|
259
|
+
req.headers[key.to_s] = value
|
|
260
|
+
end
|
|
253
261
|
|
|
254
262
|
@sdk_configuration.hooks.before_request(
|
|
255
263
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -333,7 +341,7 @@ module Clerk
|
|
|
333
341
|
|
|
334
342
|
|
|
335
343
|
|
|
336
|
-
def update(body:, organization_id:, domain_id:, retries: nil, timeout_ms: nil)
|
|
344
|
+
def update(body:, organization_id:, domain_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
337
345
|
# update - Update an organization domain.
|
|
338
346
|
# Updates the properties of an existing organization domain.
|
|
339
347
|
request = Models::Operations::UpdateOrganizationDomainRequest.new(
|
|
@@ -405,6 +413,9 @@ module Clerk
|
|
|
405
413
|
req.headers.merge!(headers)
|
|
406
414
|
req.options.timeout = timeout unless timeout.nil?
|
|
407
415
|
Utils.configure_request_security(req, security)
|
|
416
|
+
http_headers&.each do |key, value|
|
|
417
|
+
req.headers[key.to_s] = value
|
|
418
|
+
end
|
|
408
419
|
|
|
409
420
|
@sdk_configuration.hooks.before_request(
|
|
410
421
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -488,7 +499,7 @@ module Clerk
|
|
|
488
499
|
|
|
489
500
|
|
|
490
501
|
|
|
491
|
-
def delete(organization_id:, domain_id:, retries: nil, timeout_ms: nil)
|
|
502
|
+
def delete(organization_id:, domain_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
492
503
|
# delete - Remove a domain from an organization.
|
|
493
504
|
# Removes the given domain from the organization.
|
|
494
505
|
request = Models::Operations::DeleteOrganizationDomainRequest.new(
|
|
@@ -547,6 +558,9 @@ module Clerk
|
|
|
547
558
|
req.headers.merge!(headers)
|
|
548
559
|
req.options.timeout = timeout unless timeout.nil?
|
|
549
560
|
Utils.configure_request_security(req, security)
|
|
561
|
+
http_headers&.each do |key, value|
|
|
562
|
+
req.headers[key.to_s] = value
|
|
563
|
+
end
|
|
550
564
|
|
|
551
565
|
@sdk_configuration.hooks.before_request(
|
|
552
566
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -630,7 +644,7 @@ module Clerk
|
|
|
630
644
|
|
|
631
645
|
|
|
632
646
|
|
|
633
|
-
def list_all(request:, retries: nil, timeout_ms: nil)
|
|
647
|
+
def list_all(request:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
634
648
|
# list_all - List all organization domains
|
|
635
649
|
# Retrieves a list of all organization domains within the current instance.
|
|
636
650
|
# This endpoint can be used to list all domains across all organizations
|
|
@@ -688,6 +702,9 @@ module Clerk
|
|
|
688
702
|
req.options.timeout = timeout unless timeout.nil?
|
|
689
703
|
req.params = query_params
|
|
690
704
|
Utils.configure_request_security(req, security)
|
|
705
|
+
http_headers&.each do |key, value|
|
|
706
|
+
req.headers[key.to_s] = value
|
|
707
|
+
end
|
|
691
708
|
|
|
692
709
|
@sdk_configuration.hooks.before_request(
|
|
693
710
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -768,5 +785,5 @@ module Clerk
|
|
|
768
785
|
|
|
769
786
|
end
|
|
770
787
|
end
|
|
771
|
-
|
|
788
|
+
end
|
|
772
789
|
end
|
|
@@ -38,8 +38,10 @@ module Clerk
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
|
|
42
|
+
|
|
41
43
|
|
|
42
|
-
def get_all(request:, retries: nil, timeout_ms: nil)
|
|
44
|
+
def get_all(request:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
43
45
|
# get_all - Get a list of organization invitations for the current instance
|
|
44
46
|
# This request returns the list of organization invitations for the instance.
|
|
45
47
|
# Results can be paginated using the optional `limit` and `offset` query parameters.
|
|
@@ -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(
|
|
@@ -194,7 +199,7 @@ module Clerk
|
|
|
194
199
|
|
|
195
200
|
|
|
196
201
|
|
|
197
|
-
def create(organization_id:, body: nil, retries: nil, timeout_ms: nil)
|
|
202
|
+
def create(organization_id:, body: nil, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
198
203
|
# create - Create and send an organization invitation
|
|
199
204
|
# Creates a new organization invitation and sends an email to the provided `email_address` with a link to accept the invitation and join the organization.
|
|
200
205
|
# You can specify the `role` for the invited organization member.
|
|
@@ -279,6 +284,9 @@ module Clerk
|
|
|
279
284
|
req.headers.merge!(headers)
|
|
280
285
|
req.options.timeout = timeout unless timeout.nil?
|
|
281
286
|
Utils.configure_request_security(req, security)
|
|
287
|
+
http_headers&.each do |key, value|
|
|
288
|
+
req.headers[key.to_s] = value
|
|
289
|
+
end
|
|
282
290
|
|
|
283
291
|
@sdk_configuration.hooks.before_request(
|
|
284
292
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -335,7 +343,7 @@ module Clerk
|
|
|
335
343
|
else
|
|
336
344
|
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'
|
|
337
345
|
end
|
|
338
|
-
elsif Utils.match_status_code(http_response.status, ['400', '403', '404', '422'])
|
|
346
|
+
elsif Utils.match_status_code(http_response.status, ['400', '402', '403', '404', '422'])
|
|
339
347
|
if Utils.match_content_type(content_type, 'application/json')
|
|
340
348
|
http_response = @sdk_configuration.hooks.after_success(
|
|
341
349
|
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
@@ -362,7 +370,7 @@ module Clerk
|
|
|
362
370
|
|
|
363
371
|
|
|
364
372
|
|
|
365
|
-
def list(request:, retries: nil, timeout_ms: nil)
|
|
373
|
+
def list(request:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
366
374
|
# list - Get a list of organization invitations
|
|
367
375
|
# This request returns the list of organization invitations.
|
|
368
376
|
# Results can be paginated using the optional `limit` and `offset` query parameters.
|
|
@@ -424,6 +432,9 @@ module Clerk
|
|
|
424
432
|
req.options.timeout = timeout unless timeout.nil?
|
|
425
433
|
req.params = query_params
|
|
426
434
|
Utils.configure_request_security(req, security)
|
|
435
|
+
http_headers&.each do |key, value|
|
|
436
|
+
req.headers[key.to_s] = value
|
|
437
|
+
end
|
|
427
438
|
|
|
428
439
|
@sdk_configuration.hooks.before_request(
|
|
429
440
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -507,7 +518,7 @@ module Clerk
|
|
|
507
518
|
|
|
508
519
|
|
|
509
520
|
|
|
510
|
-
def bulk_create(body:, organization_id:, retries: nil, timeout_ms: nil)
|
|
521
|
+
def bulk_create(body:, organization_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
511
522
|
# bulk_create - Bulk create and send organization invitations
|
|
512
523
|
# Creates new organization invitations in bulk and sends out emails to the provided email addresses with a link to accept the invitation and join the organization.
|
|
513
524
|
#
|
|
@@ -593,6 +604,9 @@ module Clerk
|
|
|
593
604
|
req.headers.merge!(headers)
|
|
594
605
|
req.options.timeout = timeout unless timeout.nil?
|
|
595
606
|
Utils.configure_request_security(req, security)
|
|
607
|
+
http_headers&.each do |key, value|
|
|
608
|
+
req.headers[key.to_s] = value
|
|
609
|
+
end
|
|
596
610
|
|
|
597
611
|
@sdk_configuration.hooks.before_request(
|
|
598
612
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -676,7 +690,7 @@ module Clerk
|
|
|
676
690
|
|
|
677
691
|
|
|
678
692
|
|
|
679
|
-
def list_pending(organization_id:, limit: nil, offset: nil, retries: nil, timeout_ms: nil)
|
|
693
|
+
def list_pending(organization_id:, limit: nil, offset: nil, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
680
694
|
# list_pending - Get a list of pending organization invitations
|
|
681
695
|
# This request returns the list of organization invitations with "pending" status.
|
|
682
696
|
# These are the organization invitations that can still be used to join the organization, but have not been accepted by the invited user yet.
|
|
@@ -745,6 +759,9 @@ module Clerk
|
|
|
745
759
|
req.options.timeout = timeout unless timeout.nil?
|
|
746
760
|
req.params = query_params
|
|
747
761
|
Utils.configure_request_security(req, security)
|
|
762
|
+
http_headers&.each do |key, value|
|
|
763
|
+
req.headers[key.to_s] = value
|
|
764
|
+
end
|
|
748
765
|
|
|
749
766
|
@sdk_configuration.hooks.before_request(
|
|
750
767
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -828,7 +845,7 @@ module Clerk
|
|
|
828
845
|
|
|
829
846
|
|
|
830
847
|
|
|
831
|
-
def get(organization_id:, invitation_id:, retries: nil, timeout_ms: nil)
|
|
848
|
+
def get(organization_id:, invitation_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
832
849
|
# get - Retrieve an organization invitation by ID
|
|
833
850
|
# Use this request to get an existing organization invitation by ID.
|
|
834
851
|
request = Models::Operations::GetOrganizationInvitationRequest.new(
|
|
@@ -887,6 +904,9 @@ module Clerk
|
|
|
887
904
|
req.headers.merge!(headers)
|
|
888
905
|
req.options.timeout = timeout unless timeout.nil?
|
|
889
906
|
Utils.configure_request_security(req, security)
|
|
907
|
+
http_headers&.each do |key, value|
|
|
908
|
+
req.headers[key.to_s] = value
|
|
909
|
+
end
|
|
890
910
|
|
|
891
911
|
@sdk_configuration.hooks.before_request(
|
|
892
912
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -970,7 +990,7 @@ module Clerk
|
|
|
970
990
|
|
|
971
991
|
|
|
972
992
|
|
|
973
|
-
def revoke(organization_id:, invitation_id:, body: nil, retries: nil, timeout_ms: nil)
|
|
993
|
+
def revoke(organization_id:, invitation_id:, body: nil, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
974
994
|
# revoke - Revoke a pending organization invitation
|
|
975
995
|
# Use this request to revoke a previously issued organization invitation.
|
|
976
996
|
# Revoking an organization invitation makes it invalid; the invited user will no longer be able to join the organization with the revoked invitation.
|
|
@@ -1045,6 +1065,9 @@ module Clerk
|
|
|
1045
1065
|
req.headers.merge!(headers)
|
|
1046
1066
|
req.options.timeout = timeout unless timeout.nil?
|
|
1047
1067
|
Utils.configure_request_security(req, security)
|
|
1068
|
+
http_headers&.each do |key, value|
|
|
1069
|
+
req.headers[key.to_s] = value
|
|
1070
|
+
end
|
|
1048
1071
|
|
|
1049
1072
|
@sdk_configuration.hooks.before_request(
|
|
1050
1073
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -1125,5 +1148,5 @@ module Clerk
|
|
|
1125
1148
|
|
|
1126
1149
|
end
|
|
1127
1150
|
end
|
|
1128
|
-
|
|
1151
|
+
end
|
|
1129
1152
|
end
|
|
@@ -38,8 +38,10 @@ module Clerk
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
|
|
42
|
+
|
|
41
43
|
|
|
42
|
-
def create(body:, organization_id:, retries: nil, timeout_ms: nil)
|
|
44
|
+
def create(body:, organization_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
43
45
|
# create - Create a new organization membership
|
|
44
46
|
# Adds a user as a member to the given organization.
|
|
45
47
|
# Only users in the same instance as the organization can be added as members.
|
|
@@ -115,6 +117,9 @@ module Clerk
|
|
|
115
117
|
req.headers.merge!(headers)
|
|
116
118
|
req.options.timeout = timeout unless timeout.nil?
|
|
117
119
|
Utils.configure_request_security(req, security)
|
|
120
|
+
http_headers&.each do |key, value|
|
|
121
|
+
req.headers[key.to_s] = value
|
|
122
|
+
end
|
|
118
123
|
|
|
119
124
|
@sdk_configuration.hooks.before_request(
|
|
120
125
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -198,7 +203,7 @@ module Clerk
|
|
|
198
203
|
|
|
199
204
|
|
|
200
205
|
|
|
201
|
-
def list(request:, retries: nil, timeout_ms: nil)
|
|
206
|
+
def list(request:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
202
207
|
# list - Get a list of all members of an organization
|
|
203
208
|
# Retrieves all user memberships for the given organization
|
|
204
209
|
url, params = @sdk_configuration.get_server_details
|
|
@@ -255,6 +260,9 @@ module Clerk
|
|
|
255
260
|
req.options.timeout = timeout unless timeout.nil?
|
|
256
261
|
req.params = query_params
|
|
257
262
|
Utils.configure_request_security(req, security)
|
|
263
|
+
http_headers&.each do |key, value|
|
|
264
|
+
req.headers[key.to_s] = value
|
|
265
|
+
end
|
|
258
266
|
|
|
259
267
|
@sdk_configuration.hooks.before_request(
|
|
260
268
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -338,7 +346,7 @@ module Clerk
|
|
|
338
346
|
|
|
339
347
|
|
|
340
348
|
|
|
341
|
-
def update(body:, organization_id:, user_id:, retries: nil, timeout_ms: nil)
|
|
349
|
+
def update(body:, organization_id:, user_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
342
350
|
# update - Update an organization membership
|
|
343
351
|
# Updates the properties of an existing organization membership
|
|
344
352
|
request = Models::Operations::UpdateOrganizationMembershipRequest.new(
|
|
@@ -410,6 +418,9 @@ module Clerk
|
|
|
410
418
|
req.headers.merge!(headers)
|
|
411
419
|
req.options.timeout = timeout unless timeout.nil?
|
|
412
420
|
Utils.configure_request_security(req, security)
|
|
421
|
+
http_headers&.each do |key, value|
|
|
422
|
+
req.headers[key.to_s] = value
|
|
423
|
+
end
|
|
413
424
|
|
|
414
425
|
@sdk_configuration.hooks.before_request(
|
|
415
426
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -493,7 +504,7 @@ module Clerk
|
|
|
493
504
|
|
|
494
505
|
|
|
495
506
|
|
|
496
|
-
def delete(organization_id:, user_id:, retries: nil, timeout_ms: nil)
|
|
507
|
+
def delete(organization_id:, user_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
497
508
|
# delete - Remove a member from an organization
|
|
498
509
|
# Removes the given membership from the organization
|
|
499
510
|
request = Models::Operations::DeleteOrganizationMembershipRequest.new(
|
|
@@ -552,6 +563,9 @@ module Clerk
|
|
|
552
563
|
req.headers.merge!(headers)
|
|
553
564
|
req.options.timeout = timeout unless timeout.nil?
|
|
554
565
|
Utils.configure_request_security(req, security)
|
|
566
|
+
http_headers&.each do |key, value|
|
|
567
|
+
req.headers[key.to_s] = value
|
|
568
|
+
end
|
|
555
569
|
|
|
556
570
|
@sdk_configuration.hooks.before_request(
|
|
557
571
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -635,7 +649,7 @@ module Clerk
|
|
|
635
649
|
|
|
636
650
|
|
|
637
651
|
|
|
638
|
-
def update_metadata(organization_id:, user_id:, body: nil, retries: nil, timeout_ms: nil)
|
|
652
|
+
def update_metadata(organization_id:, user_id:, body: nil, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
639
653
|
# update_metadata - Merge and update organization membership metadata
|
|
640
654
|
# Update an organization membership's metadata attributes by merging existing values with the provided parameters.
|
|
641
655
|
# Metadata values will be updated via a deep merge. Deep means that any nested JSON objects will be merged as well.
|
|
@@ -708,6 +722,9 @@ module Clerk
|
|
|
708
722
|
req.headers.merge!(headers)
|
|
709
723
|
req.options.timeout = timeout unless timeout.nil?
|
|
710
724
|
Utils.configure_request_security(req, security)
|
|
725
|
+
http_headers&.each do |key, value|
|
|
726
|
+
req.headers[key.to_s] = value
|
|
727
|
+
end
|
|
711
728
|
|
|
712
729
|
@sdk_configuration.hooks.before_request(
|
|
713
730
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -788,5 +805,5 @@ module Clerk
|
|
|
788
805
|
|
|
789
806
|
end
|
|
790
807
|
end
|
|
791
|
-
|
|
808
|
+
end
|
|
792
809
|
end
|