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
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.
|
|
@@ -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
|
|
@@ -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)
|
|
@@ -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,
|
|
@@ -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,
|
|
@@ -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)
|
|
@@ -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
|
data/lib/clerk/betafeatures.rb
CHANGED
|
@@ -38,8 +38,10 @@ module Clerk
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
|
|
42
|
+
|
|
41
43
|
|
|
42
|
-
def update_instance_settings(request: nil, retries: nil, timeout_ms: nil)
|
|
44
|
+
def update_instance_settings(request: nil, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
43
45
|
# update_instance_settings - Update instance settings
|
|
44
46
|
# Updates the settings of an instance
|
|
45
47
|
url, params = @sdk_configuration.get_server_details
|
|
@@ -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(
|
|
@@ -183,7 +188,7 @@ module Clerk
|
|
|
183
188
|
|
|
184
189
|
|
|
185
190
|
|
|
186
|
-
def update_production_instance_domain(request: nil, retries: nil, timeout_ms: nil)
|
|
191
|
+
def update_production_instance_domain(request: nil, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
187
192
|
# update_production_instance_domain - Update production instance domain
|
|
188
193
|
# Change the domain of a production instance.
|
|
189
194
|
#
|
|
@@ -250,6 +255,9 @@ module Clerk
|
|
|
250
255
|
req.headers.merge!(headers)
|
|
251
256
|
req.options.timeout = timeout unless timeout.nil?
|
|
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(
|
|
@@ -321,5 +329,5 @@ module Clerk
|
|
|
321
329
|
|
|
322
330
|
end
|
|
323
331
|
end
|
|
324
|
-
|
|
332
|
+
end
|
|
325
333
|
end
|