auth0 6.2.0 → 6.3.0
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/.fern/metadata.json +3 -3
- data/.fern/replay.lock +7 -1
- data/.version +1 -1
- data/CHANGELOG.md +7 -0
- data/EXAMPLES.md +44 -0
- data/examples/ruby-api/Gemfile.lock +1 -1
- data/lib/auth0/actions/client.rb +47 -6
- data/lib/auth0/actions/executions/client.rb +4 -1
- data/lib/auth0/actions/modules/client.rb +40 -6
- data/lib/auth0/actions/modules/versions/client.rb +19 -3
- data/lib/auth0/actions/triggers/bindings/client.rb +12 -2
- data/lib/auth0/actions/triggers/client.rb +4 -1
- data/lib/auth0/actions/versions/client.rb +27 -4
- data/lib/auth0/agents/client.rb +22 -4
- data/lib/auth0/anomaly/blocks/client.rb +6 -0
- data/lib/auth0/api/authentication_endpoints.rb +40 -0
- data/lib/auth0/attack_protection/bot_detection/client.rb +8 -2
- data/lib/auth0/attack_protection/breached_password_detection/client.rb +8 -2
- data/lib/auth0/attack_protection/brute_force_protection/client.rb +8 -2
- data/lib/auth0/attack_protection/captcha/client.rb +8 -2
- data/lib/auth0/attack_protection/phone_provider_protection/client.rb +8 -2
- data/lib/auth0/attack_protection/suspicious_ip_throttling/client.rb +8 -2
- data/lib/auth0/branding/client.rb +8 -2
- data/lib/auth0/branding/phone/providers/client.rb +31 -5
- data/lib/auth0/branding/phone/templates/client.rb +39 -7
- data/lib/auth0/branding/templates/client.rb +10 -1
- data/lib/auth0/branding/themes/client.rb +162 -4
- data/lib/auth0/client.rb +8 -8
- data/lib/auth0/client_grants/client.rb +28 -4
- data/lib/auth0/client_grants/organizations/client.rb +9 -1
- data/lib/auth0/clients/client.rb +46 -7
- data/lib/auth0/clients/connections/client.rb +11 -1
- data/lib/auth0/clients/credentials/client.rb +36 -7
- data/lib/auth0/clients/types/create_client_request_content.rb +2 -0
- data/lib/auth0/clients/types/update_client_request_content.rb +2 -0
- data/lib/auth0/connection_profiles/client.rb +30 -6
- data/lib/auth0/connections/client.rb +37 -4
- data/lib/auth0/connections/clients/client.rb +21 -2
- data/lib/auth0/connections/directory_provisioning/client.rb +73 -8
- data/lib/auth0/connections/directory_provisioning/synchronizations/client.rb +4 -1
- data/lib/auth0/connections/keys/client.rb +31 -8
- data/lib/auth0/connections/scim_configuration/client.rb +37 -6
- data/lib/auth0/connections/scim_configuration/tokens/client.rb +14 -2
- data/lib/auth0/connections/users/client.rb +6 -0
- data/lib/auth0/custom_domains/client.rb +43 -8
- data/lib/auth0/device_credentials/client.rb +25 -2
- data/lib/auth0/email_templates/client.rb +19 -4
- data/lib/auth0/emails/provider/client.rb +23 -3
- data/lib/auth0/event_streams/client.rb +38 -5
- data/lib/auth0/event_streams/deliveries/client.rb +19 -2
- data/lib/auth0/event_streams/redeliveries/client.rb +10 -1
- data/lib/auth0/events/client.rb +7 -0
- data/lib/auth0/experimentation/client.rb +19 -0
- data/lib/auth0/experimentation/experiments/client.rb +63 -0
- data/lib/auth0/experimentation/experiments/types/advance_ramp_request_content.rb +15 -0
- data/lib/auth0/flows/client.rb +28 -4
- data/lib/auth0/flows/executions/client.rb +23 -2
- data/lib/auth0/flows/vault/connections/client.rb +31 -4
- data/lib/auth0/forms/client.rb +27 -4
- data/lib/auth0/groups/client.rb +21 -2
- data/lib/auth0/groups/members/client.rb +10 -1
- data/lib/auth0/groups/roles/client.rb +20 -1
- data/lib/auth0/guardian/client.rb +77 -0
- data/lib/auth0/guardian/enrollments/client.rb +11 -2
- data/lib/auth0/guardian/factors/client.rb +21 -5
- data/lib/auth0/guardian/factors/duo/settings/client.rb +12 -3
- data/lib/auth0/guardian/factors/email/client.rb +93 -0
- data/lib/auth0/guardian/factors/email/types/set_email_factor_settings_request_content.rb +17 -0
- data/lib/auth0/guardian/factors/phone/client.rb +110 -8
- data/lib/auth0/guardian/factors/phone/types/set_phone_factor_settings_request_content.rb +17 -0
- data/lib/auth0/guardian/factors/push_notification/client.rb +48 -12
- data/lib/auth0/guardian/factors/sms/client.rb +32 -9
- data/lib/auth0/guardian/policies/client.rb +8 -2
- data/lib/auth0/guardian/types/set_guardian_settings_request_content.rb +17 -0
- data/lib/auth0/hooks/client.rb +33 -4
- data/lib/auth0/hooks/secrets/client.rb +38 -4
- data/lib/auth0/jobs/client.rb +4 -1
- data/lib/auth0/jobs/errors/client.rb +9 -4
- data/lib/auth0/jobs/users_exports/client.rb +4 -1
- data/lib/auth0/jobs/users_imports/client.rb +14 -6
- data/lib/auth0/jobs/verification_email/client.rb +4 -1
- data/lib/auth0/keys/custom_signing/client.rb +13 -2
- data/lib/auth0/keys/encryption/client.rb +33 -5
- data/lib/auth0/keys/network_acls/client.rb +19 -3
- data/lib/auth0/keys/signing/client.rb +21 -7
- data/lib/auth0/log_streams/client.rb +29 -7
- data/lib/auth0/logs/client.rb +16 -2
- data/lib/auth0/network_acls/client.rb +41 -4
- data/lib/auth0/organizations/client.rb +109 -5
- data/lib/auth0/organizations/client_grants/client.rb +25 -2
- data/lib/auth0/organizations/clients/client.rb +38 -4
- data/lib/auth0/organizations/connections/client.rb +37 -4
- data/lib/auth0/organizations/connections/types/create_organization_all_connection_request_parameters.rb +2 -0
- data/lib/auth0/organizations/connections/types/update_organization_connection_request_parameters.rb +2 -0
- data/lib/auth0/organizations/discovery_domains/client.rb +42 -5
- data/lib/auth0/organizations/enabled_connections/client.rb +36 -4
- data/lib/auth0/organizations/groups/client.rb +8 -1
- data/lib/auth0/organizations/groups/roles/client.rb +23 -1
- data/lib/auth0/organizations/invitations/client.rb +40 -3
- data/lib/auth0/organizations/members/client.rb +23 -1
- data/lib/auth0/organizations/members/effective_roles/client.rb +9 -1
- data/lib/auth0/organizations/members/effective_roles/sources/groups/client.rb +10 -1
- data/lib/auth0/organizations/members/roles/client.rb +24 -1
- data/lib/auth0/organizations/organization_template/client.rb +16 -1
- data/lib/auth0/organizations/roles/groups/client.rb +9 -1
- data/lib/auth0/organizations/roles/members/client.rb +11 -1
- data/lib/auth0/organizations/types/search_organizations_request_parameters.rb +19 -0
- data/lib/auth0/prompts/client.rb +8 -2
- data/lib/auth0/prompts/custom_text/client.rb +20 -2
- data/lib/auth0/prompts/partials/client.rb +16 -2
- data/lib/auth0/prompts/rendering/client.rb +34 -4
- data/lib/auth0/rate_limit_policies/client.rb +37 -4
- data/lib/auth0/refresh_tokens/client.rb +25 -3
- data/lib/auth0/resource_servers/client.rb +102 -4
- data/lib/auth0/resource_servers/types/create_resource_server_request_content.rb +4 -0
- data/lib/auth0/resource_servers/types/search_resource_servers_request_parameters.rb +23 -0
- data/lib/auth0/resource_servers/types/update_resource_server_request_content.rb +4 -0
- data/lib/auth0/risk_assessments/settings/client.rb +8 -2
- data/lib/auth0/risk_assessments/settings/new_device/client.rb +8 -2
- data/lib/auth0/roles/client.rb +26 -4
- data/lib/auth0/roles/groups/client.rb +20 -1
- data/lib/auth0/roles/permissions/client.rb +27 -1
- data/lib/auth0/roles/users/client.rb +15 -1
- data/lib/auth0/rules/client.rb +33 -4
- data/lib/auth0/rules_configs/client.rb +19 -5
- data/lib/auth0/self_service_profiles/client.rb +23 -4
- data/lib/auth0/self_service_profiles/custom_text/client.rb +23 -3
- data/lib/auth0/self_service_profiles/sso_ticket/client.rb +10 -1
- data/lib/auth0/sessions/client.rb +14 -2
- data/lib/auth0/stats/client.rb +16 -5
- data/lib/auth0/supplemental_signals/client.rb +8 -2
- data/lib/auth0/tenants/settings/client.rb +11 -2
- data/lib/auth0/tenants/settings/types/update_tenant_settings_request_content.rb +2 -0
- data/lib/auth0/tickets/client.rb +8 -2
- data/lib/auth0/token_exchange_profiles/client.rb +26 -3
- data/lib/auth0/types/advance_ramp_response_content.rb +15 -0
- data/lib/auth0/types/anonymous_sessions.rb +10 -0
- data/lib/auth0/types/client.rb +6 -0
- data/lib/auth0/types/client_my_organization_patch_configuration.rb +4 -0
- data/lib/auth0/types/client_my_organization_post_configuration.rb +4 -0
- data/lib/auth0/types/client_my_organization_response_configuration.rb +4 -0
- data/lib/auth0/types/connection_identity_provider_enum.rb +4 -13
- data/lib/auth0/types/connection_options_ad.rb +2 -0
- data/lib/auth0/types/connection_options_adfs.rb +2 -0
- data/lib/auth0/types/connection_options_azure_ad.rb +2 -0
- data/lib/auth0/types/connection_options_common_saml.rb +2 -0
- data/lib/auth0/types/connection_options_ping_federate.rb +2 -0
- data/lib/auth0/types/connection_options_saml.rb +2 -0
- data/lib/auth0/types/connection_properties_options.rb +4 -0
- data/lib/auth0/types/connection_strategy_enum.rb +4 -13
- data/lib/auth0/types/connection_thumbprints_sha384.rb +23 -0
- data/lib/auth0/types/connection_thumbprints_sha384ad.rb +23 -0
- data/lib/auth0/types/connection_thumbprints_sha384saml.rb +23 -0
- data/lib/auth0/types/create_anonymous_sessions.rb +10 -0
- data/lib/auth0/types/create_client_response_content.rb +6 -0
- data/lib/auth0/types/create_organization_all_connection_response_content.rb +2 -0
- data/lib/auth0/types/create_resource_server_response_content.rb +4 -0
- data/lib/auth0/types/get_client_response_content.rb +6 -0
- data/lib/auth0/types/get_email_factor_settings_response_content.rb +11 -0
- data/lib/auth0/types/get_guardian_settings_response_content.rb +15 -0
- data/lib/auth0/types/get_organization_all_connection_response_content.rb +2 -0
- data/lib/auth0/types/get_phone_factor_settings_response_content.rb +11 -0
- data/lib/auth0/types/get_resource_server_response_content.rb +4 -0
- data/lib/auth0/types/get_tenant_settings_response_content.rb +2 -0
- data/lib/auth0/types/oauth_scope.rb +1 -2
- data/lib/auth0/types/organization_all_connection_post.rb +2 -0
- data/lib/auth0/types/organization_member_access_level_enum.rb +14 -0
- data/lib/auth0/types/organization_member_access_level_enum_with_null.rb +14 -0
- data/lib/auth0/types/organization_sort_field_enum.rb +13 -0
- data/lib/auth0/types/resource_server.rb +4 -0
- data/lib/auth0/types/resource_server_access_token.rb +10 -0
- data/lib/auth0/types/resource_server_access_token_claims_mapping.rb +10 -0
- data/lib/auth0/types/resource_server_access_token_custom_claims_mapping.rb +23 -0
- data/lib/auth0/types/resource_server_access_token_custom_claims_mapping_rule.rb +11 -0
- data/lib/auth0/types/resource_server_search_response.rb +53 -0
- data/lib/auth0/types/resource_server_sort_field_enum.rb +13 -0
- data/lib/auth0/types/resource_server_subject_type_authorization.rb +2 -0
- data/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user.rb +10 -0
- data/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user_policy_enum.rb +12 -0
- data/lib/auth0/types/rotate_client_secret_response_content.rb +6 -0
- data/lib/auth0/types/search_organization.rb +23 -0
- data/lib/auth0/types/{list_template_organizations_paginated_response_content.rb → search_organizations_paginated_response_content.rb} +3 -3
- data/lib/auth0/types/search_parser_enum.rb +12 -0
- data/lib/auth0/types/search_resource_servers_response_content.rb +11 -0
- data/lib/auth0/types/set_email_factor_settings_response_content.rb +11 -0
- data/lib/auth0/types/set_guardian_settings_response_content.rb +15 -0
- data/lib/auth0/types/set_phone_factor_settings_response_content.rb +11 -0
- data/lib/auth0/types/tenant_settings_sessions.rb +2 -0
- data/lib/auth0/types/tenant_settings_sessions_anonymous.rb +12 -0
- data/lib/auth0/types/update_anonymous_sessions.rb +10 -0
- data/lib/auth0/types/update_client_response_content.rb +6 -0
- data/lib/auth0/types/update_connection_options.rb +4 -0
- data/lib/auth0/types/update_organization_all_connection_response_content.rb +2 -0
- data/lib/auth0/types/update_resource_server_response_content.rb +4 -0
- data/lib/auth0/types/update_tenant_settings_response_content.rb +2 -0
- data/lib/auth0/user_attribute_profiles/client.rb +40 -6
- data/lib/auth0/user_blocks/client.rb +20 -2
- data/lib/auth0/user_grants/client.rb +17 -1
- data/lib/auth0/users/authentication_methods/client.rb +57 -9
- data/lib/auth0/users/authenticators/client.rb +3 -0
- data/lib/auth0/users/client.rb +54 -9
- data/lib/auth0/users/connected_accounts/client.rb +8 -1
- data/lib/auth0/users/effective_permissions/client.rb +9 -1
- data/lib/auth0/users/effective_permissions/sources/roles/client.rb +10 -1
- data/lib/auth0/users/effective_roles/client.rb +8 -1
- data/lib/auth0/users/effective_roles/sources/groups/client.rb +9 -1
- data/lib/auth0/users/enrollments/client.rb +9 -4
- data/lib/auth0/users/groups/client.rb +11 -1
- data/lib/auth0/users/identities/client.rb +17 -5
- data/lib/auth0/users/logs/client.rb +10 -1
- data/lib/auth0/users/multifactor/client.rb +9 -0
- data/lib/auth0/users/organizations/client.rb +9 -1
- data/lib/auth0/users/permissions/client.rb +27 -1
- data/lib/auth0/users/refresh_token/client.rb +12 -1
- data/lib/auth0/users/risk_assessments/client.rb +7 -0
- data/lib/auth0/users/roles/client.rb +21 -1
- data/lib/auth0/users/sessions/client.rb +12 -1
- data/lib/auth0/verifiable_credentials/verification/templates/client.rb +32 -4
- data/lib/auth0/version.rb +1 -1
- data/lib/auth0.rb +46 -16
- data/wiremock/wiremock-mappings.json +333 -191
- metadata +40 -10
- data/lib/auth0/organization_templates/client.rb +0 -220
- data/lib/auth0/organization_templates/types/create_organization_template_request_content.rb +0 -35
- data/lib/auth0/organization_templates/types/list_organization_templates_request_parameters.rb +0 -13
- data/lib/auth0/organization_templates/types/list_template_organizations_request_parameters.rb +0 -15
- data/lib/auth0/organization_templates/types/update_organization_template_request_content.rb +0 -37
- data/lib/auth0/types/list_organization_templates_paginated_response_content.rb +0 -11
- data/lib/auth0/types/organization_template_assigned_organization.rb +0 -10
|
@@ -20,6 +20,12 @@ module Auth0
|
|
|
20
20
|
# @option params [String, nil] :from
|
|
21
21
|
# @option params [Integer, nil] :take
|
|
22
22
|
#
|
|
23
|
+
# @example
|
|
24
|
+
# client.event_streams.list(
|
|
25
|
+
# from: "from",
|
|
26
|
+
# take: 1
|
|
27
|
+
# )
|
|
28
|
+
#
|
|
23
29
|
# @return [Auth0::Types::ListEventStreamsResponseContent]
|
|
24
30
|
def list(request_options: {}, **params)
|
|
25
31
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -47,7 +53,7 @@ module Auth0
|
|
|
47
53
|
end
|
|
48
54
|
code = response.code.to_i
|
|
49
55
|
if code.between?(200, 299)
|
|
50
|
-
parsed_response = Auth0::Types::ListEventStreamsResponseContent.load(response.body)
|
|
56
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListEventStreamsResponseContent.load(response.body))
|
|
51
57
|
[parsed_response, response]
|
|
52
58
|
else
|
|
53
59
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -64,6 +70,18 @@ module Auth0
|
|
|
64
70
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
65
71
|
# @option request_options [Integer] :timeout_in_seconds
|
|
66
72
|
#
|
|
73
|
+
# @example
|
|
74
|
+
# client.event_streams.create(destination: {
|
|
75
|
+
# type: "webhook",
|
|
76
|
+
# configuration: {
|
|
77
|
+
# webhook_endpoint: "webhook_endpoint",
|
|
78
|
+
# webhook_authorization: {
|
|
79
|
+
# method_: "basic",
|
|
80
|
+
# username: "username"
|
|
81
|
+
# }
|
|
82
|
+
# }
|
|
83
|
+
# })
|
|
84
|
+
#
|
|
67
85
|
# @return [Auth0::Types::CreateEventStreamResponseContent]
|
|
68
86
|
def create(request_options: {}, **params)
|
|
69
87
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -81,7 +99,7 @@ module Auth0
|
|
|
81
99
|
end
|
|
82
100
|
code = response.code.to_i
|
|
83
101
|
if code.between?(200, 299)
|
|
84
|
-
Auth0::Types::CreateEventStreamResponseContent.load(response.body)
|
|
102
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateEventStreamResponseContent.load(response.body))
|
|
85
103
|
else
|
|
86
104
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
87
105
|
raise error_class.new(response.body, code: code)
|
|
@@ -97,6 +115,9 @@ module Auth0
|
|
|
97
115
|
# @option request_options [Integer] :timeout_in_seconds
|
|
98
116
|
# @option params [String] :id
|
|
99
117
|
#
|
|
118
|
+
# @example
|
|
119
|
+
# client.event_streams.get(id: "id")
|
|
120
|
+
#
|
|
100
121
|
# @return [Auth0::Types::GetEventStreamResponseContent]
|
|
101
122
|
def get(request_options: {}, **params)
|
|
102
123
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -113,7 +134,7 @@ module Auth0
|
|
|
113
134
|
end
|
|
114
135
|
code = response.code.to_i
|
|
115
136
|
if code.between?(200, 299)
|
|
116
|
-
Auth0::Types::GetEventStreamResponseContent.load(response.body)
|
|
137
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetEventStreamResponseContent.load(response.body))
|
|
117
138
|
else
|
|
118
139
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
119
140
|
raise error_class.new(response.body, code: code)
|
|
@@ -129,6 +150,9 @@ module Auth0
|
|
|
129
150
|
# @option request_options [Integer] :timeout_in_seconds
|
|
130
151
|
# @option params [String] :id
|
|
131
152
|
#
|
|
153
|
+
# @example
|
|
154
|
+
# client.event_streams.delete(id: "id")
|
|
155
|
+
#
|
|
132
156
|
# @return [untyped]
|
|
133
157
|
def delete(request_options: {}, **params)
|
|
134
158
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -159,6 +183,9 @@ module Auth0
|
|
|
159
183
|
# @option request_options [Integer] :timeout_in_seconds
|
|
160
184
|
# @option params [String] :id
|
|
161
185
|
#
|
|
186
|
+
# @example
|
|
187
|
+
# client.event_streams.update(id: "id")
|
|
188
|
+
#
|
|
162
189
|
# @return [Auth0::Types::UpdateEventStreamResponseContent]
|
|
163
190
|
def update(request_options: {}, **params)
|
|
164
191
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -180,7 +207,7 @@ module Auth0
|
|
|
180
207
|
end
|
|
181
208
|
code = response.code.to_i
|
|
182
209
|
if code.between?(200, 299)
|
|
183
|
-
Auth0::Types::UpdateEventStreamResponseContent.load(response.body)
|
|
210
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateEventStreamResponseContent.load(response.body))
|
|
184
211
|
else
|
|
185
212
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
186
213
|
raise error_class.new(response.body, code: code)
|
|
@@ -196,6 +223,12 @@ module Auth0
|
|
|
196
223
|
# @option request_options [Integer] :timeout_in_seconds
|
|
197
224
|
# @option params [String] :id
|
|
198
225
|
#
|
|
226
|
+
# @example
|
|
227
|
+
# client.event_streams.test(
|
|
228
|
+
# id: "id",
|
|
229
|
+
# event_type: "connection.created"
|
|
230
|
+
# )
|
|
231
|
+
#
|
|
199
232
|
# @return [Auth0::Types::CreateEventStreamTestEventResponseContent]
|
|
200
233
|
def test(request_options: {}, **params)
|
|
201
234
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -217,7 +250,7 @@ module Auth0
|
|
|
217
250
|
end
|
|
218
251
|
code = response.code.to_i
|
|
219
252
|
if code.between?(200, 299)
|
|
220
|
-
Auth0::Types::CreateEventStreamTestEventResponseContent.load(response.body)
|
|
253
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateEventStreamTestEventResponseContent.load(response.body))
|
|
221
254
|
else
|
|
222
255
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
223
256
|
raise error_class.new(response.body, code: code)
|
|
@@ -26,6 +26,17 @@ module Auth0
|
|
|
26
26
|
# @option params [String, nil] :from
|
|
27
27
|
# @option params [Integer, nil] :take
|
|
28
28
|
#
|
|
29
|
+
# @example
|
|
30
|
+
# client.event_streams.deliveries.list(
|
|
31
|
+
# id: "id",
|
|
32
|
+
# statuses: "statuses",
|
|
33
|
+
# event_types: "event_types",
|
|
34
|
+
# date_from: "date_from",
|
|
35
|
+
# date_to: "date_to",
|
|
36
|
+
# from: "from",
|
|
37
|
+
# take: 1
|
|
38
|
+
# )
|
|
39
|
+
#
|
|
29
40
|
# @return [Auth0::Types::ListEventStreamDeliveriesResponseContent]
|
|
30
41
|
def list(request_options: {}, **params)
|
|
31
42
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -57,7 +68,7 @@ module Auth0
|
|
|
57
68
|
end
|
|
58
69
|
code = response.code.to_i
|
|
59
70
|
if code.between?(200, 299)
|
|
60
|
-
parsed_response = Auth0::Types::ListEventStreamDeliveriesResponseContent.load(response.body)
|
|
71
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListEventStreamDeliveriesResponseContent.load(response.body))
|
|
61
72
|
[parsed_response, response]
|
|
62
73
|
else
|
|
63
74
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -76,6 +87,12 @@ module Auth0
|
|
|
76
87
|
# @option params [String] :id
|
|
77
88
|
# @option params [String] :event_id
|
|
78
89
|
#
|
|
90
|
+
# @example
|
|
91
|
+
# client.event_streams.deliveries.get_history(
|
|
92
|
+
# id: "id",
|
|
93
|
+
# event_id: "event_id"
|
|
94
|
+
# )
|
|
95
|
+
#
|
|
79
96
|
# @return [Auth0::Types::GetEventStreamDeliveryHistoryResponseContent]
|
|
80
97
|
def get_history(request_options: {}, **params)
|
|
81
98
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -92,7 +109,7 @@ module Auth0
|
|
|
92
109
|
end
|
|
93
110
|
code = response.code.to_i
|
|
94
111
|
if code.between?(200, 299)
|
|
95
|
-
Auth0::Types::GetEventStreamDeliveryHistoryResponseContent.load(response.body)
|
|
112
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetEventStreamDeliveryHistoryResponseContent.load(response.body))
|
|
96
113
|
else
|
|
97
114
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
98
115
|
raise error_class.new(response.body, code: code)
|
|
@@ -20,6 +20,9 @@ module Auth0
|
|
|
20
20
|
# @option request_options [Integer] :timeout_in_seconds
|
|
21
21
|
# @option params [String] :id
|
|
22
22
|
#
|
|
23
|
+
# @example
|
|
24
|
+
# client.event_streams.redeliveries.create(id: "id")
|
|
25
|
+
#
|
|
23
26
|
# @return [Auth0::Types::CreateEventStreamRedeliveryResponseContent]
|
|
24
27
|
def create(request_options: {}, **params)
|
|
25
28
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -41,7 +44,7 @@ module Auth0
|
|
|
41
44
|
end
|
|
42
45
|
code = response.code.to_i
|
|
43
46
|
if code.between?(200, 299)
|
|
44
|
-
Auth0::Types::CreateEventStreamRedeliveryResponseContent.load(response.body)
|
|
47
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateEventStreamRedeliveryResponseContent.load(response.body))
|
|
45
48
|
else
|
|
46
49
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
47
50
|
raise error_class.new(response.body, code: code)
|
|
@@ -58,6 +61,12 @@ module Auth0
|
|
|
58
61
|
# @option params [String] :id
|
|
59
62
|
# @option params [String] :event_id
|
|
60
63
|
#
|
|
64
|
+
# @example
|
|
65
|
+
# client.event_streams.redeliveries.create_by_id(
|
|
66
|
+
# id: "id",
|
|
67
|
+
# event_id: "event_id"
|
|
68
|
+
# )
|
|
69
|
+
#
|
|
61
70
|
# @return [untyped]
|
|
62
71
|
def create_by_id(request_options: {}, **params)
|
|
63
72
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
data/lib/auth0/events/client.rb
CHANGED
|
@@ -23,6 +23,13 @@ module Auth0
|
|
|
23
23
|
# @option params [String, nil] :from_timestamp
|
|
24
24
|
# @option params [Auth0::Types::EventStreamSubscribeEventsEventTypeEnum, nil] :event_type
|
|
25
25
|
#
|
|
26
|
+
# @example
|
|
27
|
+
# client.events.subscribe(
|
|
28
|
+
# from: "from",
|
|
29
|
+
# from_timestamp: "from_timestamp",
|
|
30
|
+
# event_type: ["connection.created"]
|
|
31
|
+
# )
|
|
32
|
+
#
|
|
26
33
|
# @return [untyped]
|
|
27
34
|
def subscribe(request_options: {}, **params)
|
|
28
35
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Auth0
|
|
4
|
+
module Experimentation
|
|
5
|
+
class Client
|
|
6
|
+
# @param client [Auth0::Internal::Http::RawClient]
|
|
7
|
+
#
|
|
8
|
+
# @return [void]
|
|
9
|
+
def initialize(client:)
|
|
10
|
+
@client = client
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# @return [Auth0::Experiments::Client]
|
|
14
|
+
def experiments
|
|
15
|
+
@experiments ||= Auth0::Experimentation::Experiments::Client.new(client: @client)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Auth0
|
|
4
|
+
module Experimentation
|
|
5
|
+
module Experiments
|
|
6
|
+
class Client
|
|
7
|
+
# @param client [Auth0::Internal::Http::RawClient]
|
|
8
|
+
#
|
|
9
|
+
# @return [void]
|
|
10
|
+
def initialize(client:)
|
|
11
|
+
@client = client
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Increments the current ramp index to the requested target level. Up-only: the target must be the immediate
|
|
15
|
+
# next level in the schedule. Idempotent: calling with the current level returns success without writing
|
|
16
|
+
# anything.
|
|
17
|
+
#
|
|
18
|
+
# @param request_options [Hash]
|
|
19
|
+
# @param params [Auth0::Experimentation::Experiments::Types::AdvanceRampRequestContent]
|
|
20
|
+
# @option request_options [String] :base_url
|
|
21
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
22
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
23
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
24
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
25
|
+
# @option params [String] :id
|
|
26
|
+
#
|
|
27
|
+
# @example
|
|
28
|
+
# client.experimentation.experiments.advance_ramp(
|
|
29
|
+
# id: "id",
|
|
30
|
+
# target_level: 1
|
|
31
|
+
# )
|
|
32
|
+
#
|
|
33
|
+
# @return [Auth0::Types::AdvanceRampResponseContent]
|
|
34
|
+
def advance_ramp(request_options: {}, **params)
|
|
35
|
+
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
36
|
+
request_data = Auth0::Experimentation::Experiments::Types::AdvanceRampRequestContent.new(params).to_h
|
|
37
|
+
non_body_param_names = %w[id]
|
|
38
|
+
body = request_data.except(*non_body_param_names)
|
|
39
|
+
|
|
40
|
+
request = Auth0::Internal::JSON::Request.new(
|
|
41
|
+
base_url: request_options[:base_url],
|
|
42
|
+
method: "POST",
|
|
43
|
+
path: "experimentation/experiments/#{URI.encode_uri_component(params[:id].to_s)}/advance-ramp",
|
|
44
|
+
body: body,
|
|
45
|
+
request_options: request_options
|
|
46
|
+
)
|
|
47
|
+
begin
|
|
48
|
+
response = @client.send(request)
|
|
49
|
+
rescue Net::HTTPRequestTimeout
|
|
50
|
+
raise Auth0::Errors::TimeoutError
|
|
51
|
+
end
|
|
52
|
+
code = response.code.to_i
|
|
53
|
+
if code.between?(200, 299)
|
|
54
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::AdvanceRampResponseContent.load(response.body))
|
|
55
|
+
else
|
|
56
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
57
|
+
raise error_class.new(response.body, code: code)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Auth0
|
|
4
|
+
module Experimentation
|
|
5
|
+
module Experiments
|
|
6
|
+
module Types
|
|
7
|
+
class AdvanceRampRequestContent < Internal::Types::Model
|
|
8
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :target_level, -> { Integer }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/lib/auth0/flows/client.rb
CHANGED
|
@@ -23,6 +23,15 @@ module Auth0
|
|
|
23
23
|
# @option params [Auth0::Types::ListFlowsRequestParametersHydrateEnum, nil] :hydrate
|
|
24
24
|
# @option params [Boolean, nil] :synchronous
|
|
25
25
|
#
|
|
26
|
+
# @example
|
|
27
|
+
# client.flows.list(
|
|
28
|
+
# page: 1,
|
|
29
|
+
# per_page: 1,
|
|
30
|
+
# include_totals: true,
|
|
31
|
+
# hydrate: ["form_count"],
|
|
32
|
+
# synchronous: true
|
|
33
|
+
# )
|
|
34
|
+
#
|
|
26
35
|
# @return [Auth0::Types::ListFlowsOffsetPaginatedResponseContent]
|
|
27
36
|
def list(request_options: {}, **params)
|
|
28
37
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -54,7 +63,7 @@ module Auth0
|
|
|
54
63
|
end
|
|
55
64
|
code = response.code.to_i
|
|
56
65
|
if code.between?(200, 299)
|
|
57
|
-
parsed_response = Auth0::Types::ListFlowsOffsetPaginatedResponseContent.load(response.body)
|
|
66
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListFlowsOffsetPaginatedResponseContent.load(response.body))
|
|
58
67
|
[parsed_response, response]
|
|
59
68
|
else
|
|
60
69
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -71,6 +80,9 @@ module Auth0
|
|
|
71
80
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
72
81
|
# @option request_options [Integer] :timeout_in_seconds
|
|
73
82
|
#
|
|
83
|
+
# @example
|
|
84
|
+
# client.flows.create(name: "name")
|
|
85
|
+
#
|
|
74
86
|
# @return [Auth0::Types::CreateFlowResponseContent]
|
|
75
87
|
def create(request_options: {}, **params)
|
|
76
88
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -88,7 +100,7 @@ module Auth0
|
|
|
88
100
|
end
|
|
89
101
|
code = response.code.to_i
|
|
90
102
|
if code.between?(200, 299)
|
|
91
|
-
Auth0::Types::CreateFlowResponseContent.load(response.body)
|
|
103
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateFlowResponseContent.load(response.body))
|
|
92
104
|
else
|
|
93
105
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
94
106
|
raise error_class.new(response.body, code: code)
|
|
@@ -105,6 +117,12 @@ module Auth0
|
|
|
105
117
|
# @option params [String] :id
|
|
106
118
|
# @option params [Auth0::Types::GetFlowRequestParametersHydrateEnum, nil] :hydrate
|
|
107
119
|
#
|
|
120
|
+
# @example
|
|
121
|
+
# client.flows.get(
|
|
122
|
+
# id: "id",
|
|
123
|
+
# hydrate: ["form_count"]
|
|
124
|
+
# )
|
|
125
|
+
#
|
|
108
126
|
# @return [Auth0::Types::GetFlowResponseContent]
|
|
109
127
|
def get(request_options: {}, **params)
|
|
110
128
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -125,7 +143,7 @@ module Auth0
|
|
|
125
143
|
end
|
|
126
144
|
code = response.code.to_i
|
|
127
145
|
if code.between?(200, 299)
|
|
128
|
-
Auth0::Types::GetFlowResponseContent.load(response.body)
|
|
146
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetFlowResponseContent.load(response.body))
|
|
129
147
|
else
|
|
130
148
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
131
149
|
raise error_class.new(response.body, code: code)
|
|
@@ -141,6 +159,9 @@ module Auth0
|
|
|
141
159
|
# @option request_options [Integer] :timeout_in_seconds
|
|
142
160
|
# @option params [String] :id
|
|
143
161
|
#
|
|
162
|
+
# @example
|
|
163
|
+
# client.flows.delete(id: "id")
|
|
164
|
+
#
|
|
144
165
|
# @return [untyped]
|
|
145
166
|
def delete(request_options: {}, **params)
|
|
146
167
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -171,6 +192,9 @@ module Auth0
|
|
|
171
192
|
# @option request_options [Integer] :timeout_in_seconds
|
|
172
193
|
# @option params [String] :id
|
|
173
194
|
#
|
|
195
|
+
# @example
|
|
196
|
+
# client.flows.update(id: "id")
|
|
197
|
+
#
|
|
174
198
|
# @return [Auth0::Types::UpdateFlowResponseContent]
|
|
175
199
|
def update(request_options: {}, **params)
|
|
176
200
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -192,7 +216,7 @@ module Auth0
|
|
|
192
216
|
end
|
|
193
217
|
code = response.code.to_i
|
|
194
218
|
if code.between?(200, 299)
|
|
195
|
-
Auth0::Types::UpdateFlowResponseContent.load(response.body)
|
|
219
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateFlowResponseContent.load(response.body))
|
|
196
220
|
else
|
|
197
221
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
198
222
|
raise error_class.new(response.body, code: code)
|
|
@@ -23,6 +23,14 @@ module Auth0
|
|
|
23
23
|
# @option params [String, nil] :from
|
|
24
24
|
# @option params [Integer, nil] :take
|
|
25
25
|
#
|
|
26
|
+
# @example
|
|
27
|
+
# client.flows.executions.list(
|
|
28
|
+
# flow_id: "flow_id",
|
|
29
|
+
# include_totals: true,
|
|
30
|
+
# from: "from",
|
|
31
|
+
# take: 1
|
|
32
|
+
# )
|
|
33
|
+
#
|
|
26
34
|
# @return [Auth0::Types::ListFlowExecutionsPaginatedResponseContent]
|
|
27
35
|
def list(request_options: {}, **params)
|
|
28
36
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -51,7 +59,7 @@ module Auth0
|
|
|
51
59
|
end
|
|
52
60
|
code = response.code.to_i
|
|
53
61
|
if code.between?(200, 299)
|
|
54
|
-
parsed_response = Auth0::Types::ListFlowExecutionsPaginatedResponseContent.load(response.body)
|
|
62
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListFlowExecutionsPaginatedResponseContent.load(response.body))
|
|
55
63
|
[parsed_response, response]
|
|
56
64
|
else
|
|
57
65
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -71,6 +79,13 @@ module Auth0
|
|
|
71
79
|
# @option params [String] :execution_id
|
|
72
80
|
# @option params [Auth0::Types::GetFlowExecutionRequestParametersHydrateEnum, nil] :hydrate
|
|
73
81
|
#
|
|
82
|
+
# @example
|
|
83
|
+
# client.flows.executions.get(
|
|
84
|
+
# flow_id: "flow_id",
|
|
85
|
+
# execution_id: "execution_id",
|
|
86
|
+
# hydrate: ["debug"]
|
|
87
|
+
# )
|
|
88
|
+
#
|
|
74
89
|
# @return [Auth0::Types::GetFlowExecutionResponseContent]
|
|
75
90
|
def get(request_options: {}, **params)
|
|
76
91
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -91,7 +106,7 @@ module Auth0
|
|
|
91
106
|
end
|
|
92
107
|
code = response.code.to_i
|
|
93
108
|
if code.between?(200, 299)
|
|
94
|
-
Auth0::Types::GetFlowExecutionResponseContent.load(response.body)
|
|
109
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetFlowExecutionResponseContent.load(response.body))
|
|
95
110
|
else
|
|
96
111
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
97
112
|
raise error_class.new(response.body, code: code)
|
|
@@ -108,6 +123,12 @@ module Auth0
|
|
|
108
123
|
# @option params [String] :flow_id
|
|
109
124
|
# @option params [String] :execution_id
|
|
110
125
|
#
|
|
126
|
+
# @example
|
|
127
|
+
# client.flows.executions.delete(
|
|
128
|
+
# flow_id: "flow_id",
|
|
129
|
+
# execution_id: "execution_id"
|
|
130
|
+
# )
|
|
131
|
+
#
|
|
111
132
|
# @return [untyped]
|
|
112
133
|
def delete(request_options: {}, **params)
|
|
113
134
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -23,6 +23,13 @@ module Auth0
|
|
|
23
23
|
# @option params [Integer, nil] :per_page
|
|
24
24
|
# @option params [Boolean, nil] :include_totals
|
|
25
25
|
#
|
|
26
|
+
# @example
|
|
27
|
+
# client.flows.vault.connections.list(
|
|
28
|
+
# page: 1,
|
|
29
|
+
# per_page: 1,
|
|
30
|
+
# include_totals: true
|
|
31
|
+
# )
|
|
32
|
+
#
|
|
26
33
|
# @return [Auth0::Types::ListFlowsVaultConnectionsOffsetPaginatedResponseContent]
|
|
27
34
|
def list(request_options: {}, **params)
|
|
28
35
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -52,7 +59,7 @@ module Auth0
|
|
|
52
59
|
end
|
|
53
60
|
code = response.code.to_i
|
|
54
61
|
if code.between?(200, 299)
|
|
55
|
-
parsed_response = Auth0::Types::ListFlowsVaultConnectionsOffsetPaginatedResponseContent.load(response.body)
|
|
62
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListFlowsVaultConnectionsOffsetPaginatedResponseContent.load(response.body))
|
|
56
63
|
[parsed_response, response]
|
|
57
64
|
else
|
|
58
65
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -69,6 +76,17 @@ module Auth0
|
|
|
69
76
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
70
77
|
# @option request_options [Integer] :timeout_in_seconds
|
|
71
78
|
#
|
|
79
|
+
# @example
|
|
80
|
+
# client.flows.vault.connections.create(request: {
|
|
81
|
+
# name: "name",
|
|
82
|
+
# app_id: "ACTIVECAMPAIGN",
|
|
83
|
+
# setup: {
|
|
84
|
+
# type: "API_KEY",
|
|
85
|
+
# api_key: "api_key",
|
|
86
|
+
# base_url: "base_url"
|
|
87
|
+
# }
|
|
88
|
+
# })
|
|
89
|
+
#
|
|
72
90
|
# @return [Auth0::Types::CreateFlowsVaultConnectionResponseContent]
|
|
73
91
|
def create(request_options: {}, **params)
|
|
74
92
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -86,7 +104,7 @@ module Auth0
|
|
|
86
104
|
end
|
|
87
105
|
code = response.code.to_i
|
|
88
106
|
if code.between?(200, 299)
|
|
89
|
-
Auth0::Types::CreateFlowsVaultConnectionResponseContent.load(response.body)
|
|
107
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateFlowsVaultConnectionResponseContent.load(response.body))
|
|
90
108
|
else
|
|
91
109
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
92
110
|
raise error_class.new(response.body, code: code)
|
|
@@ -102,6 +120,9 @@ module Auth0
|
|
|
102
120
|
# @option request_options [Integer] :timeout_in_seconds
|
|
103
121
|
# @option params [String] :id
|
|
104
122
|
#
|
|
123
|
+
# @example
|
|
124
|
+
# client.flows.vault.connections.get(id: "id")
|
|
125
|
+
#
|
|
105
126
|
# @return [Auth0::Types::GetFlowsVaultConnectionResponseContent]
|
|
106
127
|
def get(request_options: {}, **params)
|
|
107
128
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -118,7 +139,7 @@ module Auth0
|
|
|
118
139
|
end
|
|
119
140
|
code = response.code.to_i
|
|
120
141
|
if code.between?(200, 299)
|
|
121
|
-
Auth0::Types::GetFlowsVaultConnectionResponseContent.load(response.body)
|
|
142
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetFlowsVaultConnectionResponseContent.load(response.body))
|
|
122
143
|
else
|
|
123
144
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
124
145
|
raise error_class.new(response.body, code: code)
|
|
@@ -134,6 +155,9 @@ module Auth0
|
|
|
134
155
|
# @option request_options [Integer] :timeout_in_seconds
|
|
135
156
|
# @option params [String] :id
|
|
136
157
|
#
|
|
158
|
+
# @example
|
|
159
|
+
# client.flows.vault.connections.delete(id: "id")
|
|
160
|
+
#
|
|
137
161
|
# @return [untyped]
|
|
138
162
|
def delete(request_options: {}, **params)
|
|
139
163
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -164,6 +188,9 @@ module Auth0
|
|
|
164
188
|
# @option request_options [Integer] :timeout_in_seconds
|
|
165
189
|
# @option params [String] :id
|
|
166
190
|
#
|
|
191
|
+
# @example
|
|
192
|
+
# client.flows.vault.connections.update(id: "id")
|
|
193
|
+
#
|
|
167
194
|
# @return [Auth0::Types::UpdateFlowsVaultConnectionResponseContent]
|
|
168
195
|
def update(request_options: {}, **params)
|
|
169
196
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -185,7 +212,7 @@ module Auth0
|
|
|
185
212
|
end
|
|
186
213
|
code = response.code.to_i
|
|
187
214
|
if code.between?(200, 299)
|
|
188
|
-
Auth0::Types::UpdateFlowsVaultConnectionResponseContent.load(response.body)
|
|
215
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateFlowsVaultConnectionResponseContent.load(response.body))
|
|
189
216
|
else
|
|
190
217
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
191
218
|
raise error_class.new(response.body, code: code)
|
data/lib/auth0/forms/client.rb
CHANGED
|
@@ -22,6 +22,14 @@ module Auth0
|
|
|
22
22
|
# @option params [Boolean, nil] :include_totals
|
|
23
23
|
# @option params [Auth0::Types::FormsRequestParametersHydrateEnum, nil] :hydrate
|
|
24
24
|
#
|
|
25
|
+
# @example
|
|
26
|
+
# client.forms.list(
|
|
27
|
+
# page: 1,
|
|
28
|
+
# per_page: 1,
|
|
29
|
+
# include_totals: true,
|
|
30
|
+
# hydrate: ["flow_count"]
|
|
31
|
+
# )
|
|
32
|
+
#
|
|
25
33
|
# @return [Auth0::Types::ListFormsOffsetPaginatedResponseContent]
|
|
26
34
|
def list(request_options: {}, **params)
|
|
27
35
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -52,7 +60,7 @@ module Auth0
|
|
|
52
60
|
end
|
|
53
61
|
code = response.code.to_i
|
|
54
62
|
if code.between?(200, 299)
|
|
55
|
-
parsed_response = Auth0::Types::ListFormsOffsetPaginatedResponseContent.load(response.body)
|
|
63
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListFormsOffsetPaginatedResponseContent.load(response.body))
|
|
56
64
|
[parsed_response, response]
|
|
57
65
|
else
|
|
58
66
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -69,6 +77,9 @@ module Auth0
|
|
|
69
77
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
70
78
|
# @option request_options [Integer] :timeout_in_seconds
|
|
71
79
|
#
|
|
80
|
+
# @example
|
|
81
|
+
# client.forms.create(name: "name")
|
|
82
|
+
#
|
|
72
83
|
# @return [Auth0::Types::CreateFormResponseContent]
|
|
73
84
|
def create(request_options: {}, **params)
|
|
74
85
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -86,7 +97,7 @@ module Auth0
|
|
|
86
97
|
end
|
|
87
98
|
code = response.code.to_i
|
|
88
99
|
if code.between?(200, 299)
|
|
89
|
-
Auth0::Types::CreateFormResponseContent.load(response.body)
|
|
100
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateFormResponseContent.load(response.body))
|
|
90
101
|
else
|
|
91
102
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
92
103
|
raise error_class.new(response.body, code: code)
|
|
@@ -103,6 +114,12 @@ module Auth0
|
|
|
103
114
|
# @option params [String] :id
|
|
104
115
|
# @option params [Auth0::Types::FormsRequestParametersHydrateEnum, nil] :hydrate
|
|
105
116
|
#
|
|
117
|
+
# @example
|
|
118
|
+
# client.forms.get(
|
|
119
|
+
# id: "id",
|
|
120
|
+
# hydrate: ["flow_count"]
|
|
121
|
+
# )
|
|
122
|
+
#
|
|
106
123
|
# @return [Auth0::Types::GetFormResponseContent]
|
|
107
124
|
def get(request_options: {}, **params)
|
|
108
125
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -123,7 +140,7 @@ module Auth0
|
|
|
123
140
|
end
|
|
124
141
|
code = response.code.to_i
|
|
125
142
|
if code.between?(200, 299)
|
|
126
|
-
Auth0::Types::GetFormResponseContent.load(response.body)
|
|
143
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetFormResponseContent.load(response.body))
|
|
127
144
|
else
|
|
128
145
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
129
146
|
raise error_class.new(response.body, code: code)
|
|
@@ -139,6 +156,9 @@ module Auth0
|
|
|
139
156
|
# @option request_options [Integer] :timeout_in_seconds
|
|
140
157
|
# @option params [String] :id
|
|
141
158
|
#
|
|
159
|
+
# @example
|
|
160
|
+
# client.forms.delete(id: "id")
|
|
161
|
+
#
|
|
142
162
|
# @return [untyped]
|
|
143
163
|
def delete(request_options: {}, **params)
|
|
144
164
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -169,6 +189,9 @@ module Auth0
|
|
|
169
189
|
# @option request_options [Integer] :timeout_in_seconds
|
|
170
190
|
# @option params [String] :id
|
|
171
191
|
#
|
|
192
|
+
# @example
|
|
193
|
+
# client.forms.update(id: "id")
|
|
194
|
+
#
|
|
172
195
|
# @return [Auth0::Types::UpdateFormResponseContent]
|
|
173
196
|
def update(request_options: {}, **params)
|
|
174
197
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -190,7 +213,7 @@ module Auth0
|
|
|
190
213
|
end
|
|
191
214
|
code = response.code.to_i
|
|
192
215
|
if code.between?(200, 299)
|
|
193
|
-
Auth0::Types::UpdateFormResponseContent.load(response.body)
|
|
216
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateFormResponseContent.load(response.body))
|
|
194
217
|
else
|
|
195
218
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
196
219
|
raise error_class.new(response.body, code: code)
|