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.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +3 -3
  3. data/.fern/replay.lock +7 -1
  4. data/.version +1 -1
  5. data/CHANGELOG.md +7 -0
  6. data/EXAMPLES.md +44 -0
  7. data/examples/ruby-api/Gemfile.lock +1 -1
  8. data/lib/auth0/actions/client.rb +47 -6
  9. data/lib/auth0/actions/executions/client.rb +4 -1
  10. data/lib/auth0/actions/modules/client.rb +40 -6
  11. data/lib/auth0/actions/modules/versions/client.rb +19 -3
  12. data/lib/auth0/actions/triggers/bindings/client.rb +12 -2
  13. data/lib/auth0/actions/triggers/client.rb +4 -1
  14. data/lib/auth0/actions/versions/client.rb +27 -4
  15. data/lib/auth0/agents/client.rb +22 -4
  16. data/lib/auth0/anomaly/blocks/client.rb +6 -0
  17. data/lib/auth0/api/authentication_endpoints.rb +40 -0
  18. data/lib/auth0/attack_protection/bot_detection/client.rb +8 -2
  19. data/lib/auth0/attack_protection/breached_password_detection/client.rb +8 -2
  20. data/lib/auth0/attack_protection/brute_force_protection/client.rb +8 -2
  21. data/lib/auth0/attack_protection/captcha/client.rb +8 -2
  22. data/lib/auth0/attack_protection/phone_provider_protection/client.rb +8 -2
  23. data/lib/auth0/attack_protection/suspicious_ip_throttling/client.rb +8 -2
  24. data/lib/auth0/branding/client.rb +8 -2
  25. data/lib/auth0/branding/phone/providers/client.rb +31 -5
  26. data/lib/auth0/branding/phone/templates/client.rb +39 -7
  27. data/lib/auth0/branding/templates/client.rb +10 -1
  28. data/lib/auth0/branding/themes/client.rb +162 -4
  29. data/lib/auth0/client.rb +8 -8
  30. data/lib/auth0/client_grants/client.rb +28 -4
  31. data/lib/auth0/client_grants/organizations/client.rb +9 -1
  32. data/lib/auth0/clients/client.rb +46 -7
  33. data/lib/auth0/clients/connections/client.rb +11 -1
  34. data/lib/auth0/clients/credentials/client.rb +36 -7
  35. data/lib/auth0/clients/types/create_client_request_content.rb +2 -0
  36. data/lib/auth0/clients/types/update_client_request_content.rb +2 -0
  37. data/lib/auth0/connection_profiles/client.rb +30 -6
  38. data/lib/auth0/connections/client.rb +37 -4
  39. data/lib/auth0/connections/clients/client.rb +21 -2
  40. data/lib/auth0/connections/directory_provisioning/client.rb +73 -8
  41. data/lib/auth0/connections/directory_provisioning/synchronizations/client.rb +4 -1
  42. data/lib/auth0/connections/keys/client.rb +31 -8
  43. data/lib/auth0/connections/scim_configuration/client.rb +37 -6
  44. data/lib/auth0/connections/scim_configuration/tokens/client.rb +14 -2
  45. data/lib/auth0/connections/users/client.rb +6 -0
  46. data/lib/auth0/custom_domains/client.rb +43 -8
  47. data/lib/auth0/device_credentials/client.rb +25 -2
  48. data/lib/auth0/email_templates/client.rb +19 -4
  49. data/lib/auth0/emails/provider/client.rb +23 -3
  50. data/lib/auth0/event_streams/client.rb +38 -5
  51. data/lib/auth0/event_streams/deliveries/client.rb +19 -2
  52. data/lib/auth0/event_streams/redeliveries/client.rb +10 -1
  53. data/lib/auth0/events/client.rb +7 -0
  54. data/lib/auth0/experimentation/client.rb +19 -0
  55. data/lib/auth0/experimentation/experiments/client.rb +63 -0
  56. data/lib/auth0/experimentation/experiments/types/advance_ramp_request_content.rb +15 -0
  57. data/lib/auth0/flows/client.rb +28 -4
  58. data/lib/auth0/flows/executions/client.rb +23 -2
  59. data/lib/auth0/flows/vault/connections/client.rb +31 -4
  60. data/lib/auth0/forms/client.rb +27 -4
  61. data/lib/auth0/groups/client.rb +21 -2
  62. data/lib/auth0/groups/members/client.rb +10 -1
  63. data/lib/auth0/groups/roles/client.rb +20 -1
  64. data/lib/auth0/guardian/client.rb +77 -0
  65. data/lib/auth0/guardian/enrollments/client.rb +11 -2
  66. data/lib/auth0/guardian/factors/client.rb +21 -5
  67. data/lib/auth0/guardian/factors/duo/settings/client.rb +12 -3
  68. data/lib/auth0/guardian/factors/email/client.rb +93 -0
  69. data/lib/auth0/guardian/factors/email/types/set_email_factor_settings_request_content.rb +17 -0
  70. data/lib/auth0/guardian/factors/phone/client.rb +110 -8
  71. data/lib/auth0/guardian/factors/phone/types/set_phone_factor_settings_request_content.rb +17 -0
  72. data/lib/auth0/guardian/factors/push_notification/client.rb +48 -12
  73. data/lib/auth0/guardian/factors/sms/client.rb +32 -9
  74. data/lib/auth0/guardian/policies/client.rb +8 -2
  75. data/lib/auth0/guardian/types/set_guardian_settings_request_content.rb +17 -0
  76. data/lib/auth0/hooks/client.rb +33 -4
  77. data/lib/auth0/hooks/secrets/client.rb +38 -4
  78. data/lib/auth0/jobs/client.rb +4 -1
  79. data/lib/auth0/jobs/errors/client.rb +9 -4
  80. data/lib/auth0/jobs/users_exports/client.rb +4 -1
  81. data/lib/auth0/jobs/users_imports/client.rb +14 -6
  82. data/lib/auth0/jobs/verification_email/client.rb +4 -1
  83. data/lib/auth0/keys/custom_signing/client.rb +13 -2
  84. data/lib/auth0/keys/encryption/client.rb +33 -5
  85. data/lib/auth0/keys/network_acls/client.rb +19 -3
  86. data/lib/auth0/keys/signing/client.rb +21 -7
  87. data/lib/auth0/log_streams/client.rb +29 -7
  88. data/lib/auth0/logs/client.rb +16 -2
  89. data/lib/auth0/network_acls/client.rb +41 -4
  90. data/lib/auth0/organizations/client.rb +109 -5
  91. data/lib/auth0/organizations/client_grants/client.rb +25 -2
  92. data/lib/auth0/organizations/clients/client.rb +38 -4
  93. data/lib/auth0/organizations/connections/client.rb +37 -4
  94. data/lib/auth0/organizations/connections/types/create_organization_all_connection_request_parameters.rb +2 -0
  95. data/lib/auth0/organizations/connections/types/update_organization_connection_request_parameters.rb +2 -0
  96. data/lib/auth0/organizations/discovery_domains/client.rb +42 -5
  97. data/lib/auth0/organizations/enabled_connections/client.rb +36 -4
  98. data/lib/auth0/organizations/groups/client.rb +8 -1
  99. data/lib/auth0/organizations/groups/roles/client.rb +23 -1
  100. data/lib/auth0/organizations/invitations/client.rb +40 -3
  101. data/lib/auth0/organizations/members/client.rb +23 -1
  102. data/lib/auth0/organizations/members/effective_roles/client.rb +9 -1
  103. data/lib/auth0/organizations/members/effective_roles/sources/groups/client.rb +10 -1
  104. data/lib/auth0/organizations/members/roles/client.rb +24 -1
  105. data/lib/auth0/organizations/organization_template/client.rb +16 -1
  106. data/lib/auth0/organizations/roles/groups/client.rb +9 -1
  107. data/lib/auth0/organizations/roles/members/client.rb +11 -1
  108. data/lib/auth0/organizations/types/search_organizations_request_parameters.rb +19 -0
  109. data/lib/auth0/prompts/client.rb +8 -2
  110. data/lib/auth0/prompts/custom_text/client.rb +20 -2
  111. data/lib/auth0/prompts/partials/client.rb +16 -2
  112. data/lib/auth0/prompts/rendering/client.rb +34 -4
  113. data/lib/auth0/rate_limit_policies/client.rb +37 -4
  114. data/lib/auth0/refresh_tokens/client.rb +25 -3
  115. data/lib/auth0/resource_servers/client.rb +102 -4
  116. data/lib/auth0/resource_servers/types/create_resource_server_request_content.rb +4 -0
  117. data/lib/auth0/resource_servers/types/search_resource_servers_request_parameters.rb +23 -0
  118. data/lib/auth0/resource_servers/types/update_resource_server_request_content.rb +4 -0
  119. data/lib/auth0/risk_assessments/settings/client.rb +8 -2
  120. data/lib/auth0/risk_assessments/settings/new_device/client.rb +8 -2
  121. data/lib/auth0/roles/client.rb +26 -4
  122. data/lib/auth0/roles/groups/client.rb +20 -1
  123. data/lib/auth0/roles/permissions/client.rb +27 -1
  124. data/lib/auth0/roles/users/client.rb +15 -1
  125. data/lib/auth0/rules/client.rb +33 -4
  126. data/lib/auth0/rules_configs/client.rb +19 -5
  127. data/lib/auth0/self_service_profiles/client.rb +23 -4
  128. data/lib/auth0/self_service_profiles/custom_text/client.rb +23 -3
  129. data/lib/auth0/self_service_profiles/sso_ticket/client.rb +10 -1
  130. data/lib/auth0/sessions/client.rb +14 -2
  131. data/lib/auth0/stats/client.rb +16 -5
  132. data/lib/auth0/supplemental_signals/client.rb +8 -2
  133. data/lib/auth0/tenants/settings/client.rb +11 -2
  134. data/lib/auth0/tenants/settings/types/update_tenant_settings_request_content.rb +2 -0
  135. data/lib/auth0/tickets/client.rb +8 -2
  136. data/lib/auth0/token_exchange_profiles/client.rb +26 -3
  137. data/lib/auth0/types/advance_ramp_response_content.rb +15 -0
  138. data/lib/auth0/types/anonymous_sessions.rb +10 -0
  139. data/lib/auth0/types/client.rb +6 -0
  140. data/lib/auth0/types/client_my_organization_patch_configuration.rb +4 -0
  141. data/lib/auth0/types/client_my_organization_post_configuration.rb +4 -0
  142. data/lib/auth0/types/client_my_organization_response_configuration.rb +4 -0
  143. data/lib/auth0/types/connection_identity_provider_enum.rb +4 -13
  144. data/lib/auth0/types/connection_options_ad.rb +2 -0
  145. data/lib/auth0/types/connection_options_adfs.rb +2 -0
  146. data/lib/auth0/types/connection_options_azure_ad.rb +2 -0
  147. data/lib/auth0/types/connection_options_common_saml.rb +2 -0
  148. data/lib/auth0/types/connection_options_ping_federate.rb +2 -0
  149. data/lib/auth0/types/connection_options_saml.rb +2 -0
  150. data/lib/auth0/types/connection_properties_options.rb +4 -0
  151. data/lib/auth0/types/connection_strategy_enum.rb +4 -13
  152. data/lib/auth0/types/connection_thumbprints_sha384.rb +23 -0
  153. data/lib/auth0/types/connection_thumbprints_sha384ad.rb +23 -0
  154. data/lib/auth0/types/connection_thumbprints_sha384saml.rb +23 -0
  155. data/lib/auth0/types/create_anonymous_sessions.rb +10 -0
  156. data/lib/auth0/types/create_client_response_content.rb +6 -0
  157. data/lib/auth0/types/create_organization_all_connection_response_content.rb +2 -0
  158. data/lib/auth0/types/create_resource_server_response_content.rb +4 -0
  159. data/lib/auth0/types/get_client_response_content.rb +6 -0
  160. data/lib/auth0/types/get_email_factor_settings_response_content.rb +11 -0
  161. data/lib/auth0/types/get_guardian_settings_response_content.rb +15 -0
  162. data/lib/auth0/types/get_organization_all_connection_response_content.rb +2 -0
  163. data/lib/auth0/types/get_phone_factor_settings_response_content.rb +11 -0
  164. data/lib/auth0/types/get_resource_server_response_content.rb +4 -0
  165. data/lib/auth0/types/get_tenant_settings_response_content.rb +2 -0
  166. data/lib/auth0/types/oauth_scope.rb +1 -2
  167. data/lib/auth0/types/organization_all_connection_post.rb +2 -0
  168. data/lib/auth0/types/organization_member_access_level_enum.rb +14 -0
  169. data/lib/auth0/types/organization_member_access_level_enum_with_null.rb +14 -0
  170. data/lib/auth0/types/organization_sort_field_enum.rb +13 -0
  171. data/lib/auth0/types/resource_server.rb +4 -0
  172. data/lib/auth0/types/resource_server_access_token.rb +10 -0
  173. data/lib/auth0/types/resource_server_access_token_claims_mapping.rb +10 -0
  174. data/lib/auth0/types/resource_server_access_token_custom_claims_mapping.rb +23 -0
  175. data/lib/auth0/types/resource_server_access_token_custom_claims_mapping_rule.rb +11 -0
  176. data/lib/auth0/types/resource_server_search_response.rb +53 -0
  177. data/lib/auth0/types/resource_server_sort_field_enum.rb +13 -0
  178. data/lib/auth0/types/resource_server_subject_type_authorization.rb +2 -0
  179. data/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user.rb +10 -0
  180. data/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user_policy_enum.rb +12 -0
  181. data/lib/auth0/types/rotate_client_secret_response_content.rb +6 -0
  182. data/lib/auth0/types/search_organization.rb +23 -0
  183. data/lib/auth0/types/{list_template_organizations_paginated_response_content.rb → search_organizations_paginated_response_content.rb} +3 -3
  184. data/lib/auth0/types/search_parser_enum.rb +12 -0
  185. data/lib/auth0/types/search_resource_servers_response_content.rb +11 -0
  186. data/lib/auth0/types/set_email_factor_settings_response_content.rb +11 -0
  187. data/lib/auth0/types/set_guardian_settings_response_content.rb +15 -0
  188. data/lib/auth0/types/set_phone_factor_settings_response_content.rb +11 -0
  189. data/lib/auth0/types/tenant_settings_sessions.rb +2 -0
  190. data/lib/auth0/types/tenant_settings_sessions_anonymous.rb +12 -0
  191. data/lib/auth0/types/update_anonymous_sessions.rb +10 -0
  192. data/lib/auth0/types/update_client_response_content.rb +6 -0
  193. data/lib/auth0/types/update_connection_options.rb +4 -0
  194. data/lib/auth0/types/update_organization_all_connection_response_content.rb +2 -0
  195. data/lib/auth0/types/update_resource_server_response_content.rb +4 -0
  196. data/lib/auth0/types/update_tenant_settings_response_content.rb +2 -0
  197. data/lib/auth0/user_attribute_profiles/client.rb +40 -6
  198. data/lib/auth0/user_blocks/client.rb +20 -2
  199. data/lib/auth0/user_grants/client.rb +17 -1
  200. data/lib/auth0/users/authentication_methods/client.rb +57 -9
  201. data/lib/auth0/users/authenticators/client.rb +3 -0
  202. data/lib/auth0/users/client.rb +54 -9
  203. data/lib/auth0/users/connected_accounts/client.rb +8 -1
  204. data/lib/auth0/users/effective_permissions/client.rb +9 -1
  205. data/lib/auth0/users/effective_permissions/sources/roles/client.rb +10 -1
  206. data/lib/auth0/users/effective_roles/client.rb +8 -1
  207. data/lib/auth0/users/effective_roles/sources/groups/client.rb +9 -1
  208. data/lib/auth0/users/enrollments/client.rb +9 -4
  209. data/lib/auth0/users/groups/client.rb +11 -1
  210. data/lib/auth0/users/identities/client.rb +17 -5
  211. data/lib/auth0/users/logs/client.rb +10 -1
  212. data/lib/auth0/users/multifactor/client.rb +9 -0
  213. data/lib/auth0/users/organizations/client.rb +9 -1
  214. data/lib/auth0/users/permissions/client.rb +27 -1
  215. data/lib/auth0/users/refresh_token/client.rb +12 -1
  216. data/lib/auth0/users/risk_assessments/client.rb +7 -0
  217. data/lib/auth0/users/roles/client.rb +21 -1
  218. data/lib/auth0/users/sessions/client.rb +12 -1
  219. data/lib/auth0/verifiable_credentials/verification/templates/client.rb +32 -4
  220. data/lib/auth0/version.rb +1 -1
  221. data/lib/auth0.rb +46 -16
  222. data/wiremock/wiremock-mappings.json +333 -191
  223. metadata +40 -10
  224. data/lib/auth0/organization_templates/client.rb +0 -220
  225. data/lib/auth0/organization_templates/types/create_organization_template_request_content.rb +0 -35
  226. data/lib/auth0/organization_templates/types/list_organization_templates_request_parameters.rb +0 -13
  227. data/lib/auth0/organization_templates/types/list_template_organizations_request_parameters.rb +0 -15
  228. data/lib/auth0/organization_templates/types/update_organization_template_request_content.rb +0 -37
  229. data/lib/auth0/types/list_organization_templates_paginated_response_content.rb +0 -11
  230. data/lib/auth0/types/organization_template_assigned_organization.rb +0 -10
@@ -90,6 +90,9 @@ module Auth0
90
90
  # @option request_options [Hash{String => Object}] :additional_body_parameters
91
91
  # @option request_options [Integer] :timeout_in_seconds
92
92
  #
93
+ # @example
94
+ # client.log_streams.list
95
+ #
93
96
  # @return [Array[Auth0::Types::LogStreamResponseSchema]]
94
97
  def list(request_options: {}, **_params)
95
98
  request = Auth0::Internal::JSON::Request.new(
@@ -104,10 +107,12 @@ module Auth0
104
107
  raise Auth0::Errors::TimeoutError
105
108
  end
106
109
  code = response.code.to_i
107
- return if code.between?(200, 299)
108
-
109
- error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
110
- raise error_class.new(response.body, code: code)
110
+ if code.between?(200, 299)
111
+ Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::LogStreamResponseSchema], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true)))
112
+ else
113
+ error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
114
+ raise error_class.new(response.body, code: code)
115
+ end
111
116
  end
112
117
 
113
118
  # Create a log stream.
@@ -316,6 +321,14 @@ module Auth0
316
321
  # @option request_options [Hash{String => Object}] :additional_body_parameters
317
322
  # @option request_options [Integer] :timeout_in_seconds
318
323
  #
324
+ # @example
325
+ # client.log_streams.create(
326
+ # type: "http",
327
+ # sink: {
328
+ # http_endpoint: "httpEndpoint"
329
+ # }
330
+ # )
331
+ #
319
332
  # @return [Auth0::Types::CreateLogStreamResponseContent]
320
333
  def create(request_options: {}, **params)
321
334
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -333,7 +346,7 @@ module Auth0
333
346
  end
334
347
  code = response.code.to_i
335
348
  if code.between?(200, 299)
336
- Auth0::Types::CreateLogStreamResponseContent.load(response.body)
349
+ (response.body.to_s.empty? ? nil : Auth0::Types::CreateLogStreamResponseContent.load(response.body))
337
350
  else
338
351
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
339
352
  raise error_class.new(response.body, code: code)
@@ -502,6 +515,9 @@ module Auth0
502
515
  # @option request_options [Integer] :timeout_in_seconds
503
516
  # @option params [String] :id
504
517
  #
518
+ # @example
519
+ # client.log_streams.get(id: "id")
520
+ #
505
521
  # @return [Auth0::Types::GetLogStreamResponseContent]
506
522
  def get(request_options: {}, **params)
507
523
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -518,7 +534,7 @@ module Auth0
518
534
  end
519
535
  code = response.code.to_i
520
536
  if code.between?(200, 299)
521
- Auth0::Types::GetLogStreamResponseContent.load(response.body)
537
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetLogStreamResponseContent.load(response.body))
522
538
  else
523
539
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
524
540
  raise error_class.new(response.body, code: code)
@@ -536,6 +552,9 @@ module Auth0
536
552
  # @option request_options [Integer] :timeout_in_seconds
537
553
  # @option params [String] :id
538
554
  #
555
+ # @example
556
+ # client.log_streams.delete(id: "id")
557
+ #
539
558
  # @return [untyped]
540
559
  def delete(request_options: {}, **params)
541
560
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -641,6 +660,9 @@ module Auth0
641
660
  # @option request_options [Integer] :timeout_in_seconds
642
661
  # @option params [String] :id
643
662
  #
663
+ # @example
664
+ # client.log_streams.update(id: "id")
665
+ #
644
666
  # @return [Auth0::Types::UpdateLogStreamResponseContent]
645
667
  def update(request_options: {}, **params)
646
668
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -662,7 +684,7 @@ module Auth0
662
684
  end
663
685
  code = response.code.to_i
664
686
  if code.between?(200, 299)
665
- Auth0::Types::UpdateLogStreamResponseContent.load(response.body)
687
+ (response.body.to_s.empty? ? nil : Auth0::Types::UpdateLogStreamResponseContent.load(response.body))
666
688
  else
667
689
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
668
690
  raise error_class.new(response.body, code: code)
@@ -64,6 +64,17 @@ module Auth0
64
64
  # @option params [Boolean, nil] :include_totals
65
65
  # @option params [String, nil] :search
66
66
  #
67
+ # @example
68
+ # client.logs.list(
69
+ # page: 1,
70
+ # per_page: 1,
71
+ # sort: "sort",
72
+ # fields: "fields",
73
+ # include_fields: true,
74
+ # include_totals: true,
75
+ # search: "search"
76
+ # )
77
+ #
67
78
  # @return [Auth0::Types::ListLogOffsetPaginatedResponseContent]
68
79
  def list(request_options: {}, **params)
69
80
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -97,7 +108,7 @@ module Auth0
97
108
  end
98
109
  code = response.code.to_i
99
110
  if code.between?(200, 299)
100
- parsed_response = Auth0::Types::ListLogOffsetPaginatedResponseContent.load(response.body)
111
+ parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListLogOffsetPaginatedResponseContent.load(response.body))
101
112
  [parsed_response, response]
102
113
  else
103
114
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
@@ -117,6 +128,9 @@ module Auth0
117
128
  # @option request_options [Integer] :timeout_in_seconds
118
129
  # @option params [String] :id
119
130
  #
131
+ # @example
132
+ # client.logs.get(id: "id")
133
+ #
120
134
  # @return [Auth0::Types::GetLogResponseContent]
121
135
  def get(request_options: {}, **params)
122
136
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -133,7 +147,7 @@ module Auth0
133
147
  end
134
148
  code = response.code.to_i
135
149
  if code.between?(200, 299)
136
- Auth0::Types::GetLogResponseContent.load(response.body)
150
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetLogResponseContent.load(response.body))
137
151
  else
138
152
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
139
153
  raise error_class.new(response.body, code: code)
@@ -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.network_acls.list(
28
+ # page: 1,
29
+ # per_page: 1,
30
+ # include_totals: true
31
+ # )
32
+ #
26
33
  # @return [Auth0::Types::ListNetworkACLsOffsetPaginatedResponseContent]
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::ListNetworkACLsOffsetPaginatedResponseContent.load(response.body)
62
+ parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListNetworkACLsOffsetPaginatedResponseContent.load(response.body))
56
63
  [parsed_response, response]
57
64
  else
58
65
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
@@ -71,6 +78,16 @@ module Auth0
71
78
  # @option request_options [Hash{String => Object}] :additional_body_parameters
72
79
  # @option request_options [Integer] :timeout_in_seconds
73
80
  #
81
+ # @example
82
+ # client.network_acls.create(
83
+ # description: "description",
84
+ # active: true,
85
+ # rule: {
86
+ # action: {},
87
+ # scope: "management"
88
+ # }
89
+ # )
90
+ #
74
91
  # @return [untyped]
75
92
  def create(request_options: {}, **params)
76
93
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -104,6 +121,9 @@ module Auth0
104
121
  # @option request_options [Integer] :timeout_in_seconds
105
122
  # @option params [String] :id
106
123
  #
124
+ # @example
125
+ # client.network_acls.get(id: "id")
126
+ #
107
127
  # @return [Auth0::Types::GetNetworkACLsResponseContent]
108
128
  def get(request_options: {}, **params)
109
129
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -120,7 +140,7 @@ module Auth0
120
140
  end
121
141
  code = response.code.to_i
122
142
  if code.between?(200, 299)
123
- Auth0::Types::GetNetworkACLsResponseContent.load(response.body)
143
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetNetworkACLsResponseContent.load(response.body))
124
144
  else
125
145
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
126
146
  raise error_class.new(response.body, code: code)
@@ -138,6 +158,17 @@ module Auth0
138
158
  # @option request_options [Integer] :timeout_in_seconds
139
159
  # @option params [String] :id
140
160
  #
161
+ # @example
162
+ # client.network_acls.set(
163
+ # id: "id",
164
+ # description: "description",
165
+ # active: true,
166
+ # rule: {
167
+ # action: {},
168
+ # scope: "management"
169
+ # }
170
+ # )
171
+ #
141
172
  # @return [Auth0::Types::SetNetworkACLsResponseContent]
142
173
  def set(request_options: {}, **params)
143
174
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -159,7 +190,7 @@ module Auth0
159
190
  end
160
191
  code = response.code.to_i
161
192
  if code.between?(200, 299)
162
- Auth0::Types::SetNetworkACLsResponseContent.load(response.body)
193
+ (response.body.to_s.empty? ? nil : Auth0::Types::SetNetworkACLsResponseContent.load(response.body))
163
194
  else
164
195
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
165
196
  raise error_class.new(response.body, code: code)
@@ -177,6 +208,9 @@ module Auth0
177
208
  # @option request_options [Integer] :timeout_in_seconds
178
209
  # @option params [String] :id
179
210
  #
211
+ # @example
212
+ # client.network_acls.delete(id: "id")
213
+ #
180
214
  # @return [untyped]
181
215
  def delete(request_options: {}, **params)
182
216
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -209,6 +243,9 @@ module Auth0
209
243
  # @option request_options [Integer] :timeout_in_seconds
210
244
  # @option params [String] :id
211
245
  #
246
+ # @example
247
+ # client.network_acls.update(id: "id")
248
+ #
212
249
  # @return [Auth0::Types::UpdateNetworkACLResponseContent]
213
250
  def update(request_options: {}, **params)
214
251
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -230,7 +267,7 @@ module Auth0
230
267
  end
231
268
  code = response.code.to_i
232
269
  if code.between?(200, 299)
233
- Auth0::Types::UpdateNetworkACLResponseContent.load(response.body)
270
+ (response.body.to_s.empty? ? nil : Auth0::Types::UpdateNetworkACLResponseContent.load(response.body))
234
271
  else
235
272
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
236
273
  raise error_class.new(response.body, code: code)
@@ -44,6 +44,15 @@ module Auth0
44
44
  # @option params [String, nil] :sort
45
45
  # @option params [String, nil] :include_client_association_for
46
46
  #
47
+ # @example
48
+ # client.organizations.list(
49
+ # include_totals: true,
50
+ # from: "from",
51
+ # take: 1,
52
+ # sort: "sort",
53
+ # include_client_association_for: "include_client_association_for"
54
+ # )
55
+ #
47
56
  # @return [Auth0::Types::ListOrganizationsPaginatedResponseContent]
48
57
  def list(request_options: {}, **params)
49
58
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -74,7 +83,7 @@ module Auth0
74
83
  end
75
84
  code = response.code.to_i
76
85
  if code.between?(200, 299)
77
- parsed_response = Auth0::Types::ListOrganizationsPaginatedResponseContent.load(response.body)
86
+ parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationsPaginatedResponseContent.load(response.body))
78
87
  [parsed_response, response]
79
88
  else
80
89
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
@@ -95,6 +104,9 @@ module Auth0
95
104
  # @option request_options [Hash{String => Object}] :additional_body_parameters
96
105
  # @option request_options [Integer] :timeout_in_seconds
97
106
  #
107
+ # @example
108
+ # client.organizations.create(name: "name")
109
+ #
98
110
  # @return [Auth0::Types::CreateOrganizationResponseContent]
99
111
  def create(request_options: {}, **params)
100
112
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -112,7 +124,7 @@ module Auth0
112
124
  end
113
125
  code = response.code.to_i
114
126
  if code.between?(200, 299)
115
- Auth0::Types::CreateOrganizationResponseContent.load(response.body)
127
+ (response.body.to_s.empty? ? nil : Auth0::Types::CreateOrganizationResponseContent.load(response.body))
116
128
  else
117
129
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
118
130
  raise error_class.new(response.body, code: code)
@@ -130,6 +142,9 @@ module Auth0
130
142
  # @option request_options [Integer] :timeout_in_seconds
131
143
  # @option params [String] :name
132
144
  #
145
+ # @example
146
+ # client.organizations.get_by_name(name: "name")
147
+ #
133
148
  # @return [Auth0::Types::GetOrganizationByNameResponseContent]
134
149
  def get_by_name(request_options: {}, **params)
135
150
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -146,13 +161,93 @@ module Auth0
146
161
  end
147
162
  code = response.code.to_i
148
163
  if code.between?(200, 299)
149
- Auth0::Types::GetOrganizationByNameResponseContent.load(response.body)
164
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetOrganizationByNameResponseContent.load(response.body))
150
165
  else
151
166
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
152
167
  raise error_class.new(response.body, code: code)
153
168
  end
154
169
  end
155
170
 
171
+ # Retrieve details of organizations matching a search criteria. It is possible to:
172
+ #
173
+ # - Specify a search criteria for organizations
174
+ # - Search via `name`
175
+ # - Search via `display_name`
176
+ # - Substring matching (`contains` and `ends-with`) requires at least 3 characters
177
+ # - Use wildcards
178
+ #
179
+ # The `q` query parameter can be used to get organizations that match the specified criteria on `name` OR
180
+ # `display_name`.
181
+ #
182
+ # This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the `parser`
183
+ # parameter to specify "scim" or "lucene" syntax (default: "lucene").
184
+ #
185
+ # Results are eventually consistent and may not reflect recent updates immediately.
186
+ #
187
+ # **Sortable fields:** `name`, `display_name`, `created_at` (ascending only). Defaults to insertion order (oldest
188
+ # first).
189
+ #
190
+ # @param request_options [Hash]
191
+ # @param params [Hash]
192
+ # @option request_options [String] :base_url
193
+ # @option request_options [Hash{String => Object}] :additional_headers
194
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
195
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
196
+ # @option request_options [Integer] :timeout_in_seconds
197
+ # @option params [String, nil] :q
198
+ # @option params [Auth0::Types::SearchParserEnum, nil] :parser
199
+ # @option params [Integer, nil] :take
200
+ # @option params [String, nil] :from
201
+ # @option params [Auth0::Types::OrganizationSortFieldEnum, nil] :sort
202
+ #
203
+ # @example
204
+ # client.organizations.search(
205
+ # q: "q",
206
+ # parser: "scim",
207
+ # take: 1,
208
+ # from: "from",
209
+ # sort: "name"
210
+ # )
211
+ #
212
+ # @return [Auth0::Types::SearchOrganizationsPaginatedResponseContent]
213
+ def search(request_options: {}, **params)
214
+ params = Auth0::Internal::Types::Utils.normalize_keys(params)
215
+ query_params = {}
216
+ query_params["q"] = params[:q] if params.key?(:q)
217
+ query_params["parser"] = params[:parser] if params.key?(:parser)
218
+ query_params["take"] = params.fetch(:take, 50)
219
+ query_params["from"] = params[:from] if params.key?(:from)
220
+ query_params["sort"] = params[:sort] if params.key?(:sort)
221
+
222
+ Auth0::Internal::CursorItemIterator.new(
223
+ cursor_field: :next_,
224
+ item_field: :organizations,
225
+ initial_cursor: query_params["from"]
226
+ ) do |next_cursor|
227
+ query_params["from"] = next_cursor
228
+ request = Auth0::Internal::JSON::Request.new(
229
+ base_url: request_options[:base_url],
230
+ method: "GET",
231
+ path: "organizations/search",
232
+ query: query_params,
233
+ request_options: request_options
234
+ )
235
+ begin
236
+ response = @client.send(request)
237
+ rescue Net::HTTPRequestTimeout
238
+ raise Auth0::Errors::TimeoutError
239
+ end
240
+ code = response.code.to_i
241
+ if code.between?(200, 299)
242
+ parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::SearchOrganizationsPaginatedResponseContent.load(response.body))
243
+ [parsed_response, response]
244
+ else
245
+ error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
246
+ raise error_class.new(response.body, code: code)
247
+ end
248
+ end
249
+ end
250
+
156
251
  # Retrieve details about a single Organization specified by ID.
157
252
  #
158
253
  # @param request_options [Hash]
@@ -164,6 +259,9 @@ module Auth0
164
259
  # @option request_options [Integer] :timeout_in_seconds
165
260
  # @option params [String] :id
166
261
  #
262
+ # @example
263
+ # client.organizations.get(id: "id")
264
+ #
167
265
  # @return [Auth0::Types::GetOrganizationResponseContent]
168
266
  def get(request_options: {}, **params)
169
267
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -180,7 +278,7 @@ module Auth0
180
278
  end
181
279
  code = response.code.to_i
182
280
  if code.between?(200, 299)
183
- Auth0::Types::GetOrganizationResponseContent.load(response.body)
281
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetOrganizationResponseContent.load(response.body))
184
282
  else
185
283
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
186
284
  raise error_class.new(response.body, code: code)
@@ -201,6 +299,9 @@ module Auth0
201
299
  # @option request_options [Integer] :timeout_in_seconds
202
300
  # @option params [String] :id
203
301
  #
302
+ # @example
303
+ # client.organizations.delete(id: "id")
304
+ #
204
305
  # @return [untyped]
205
306
  def delete(request_options: {}, **params)
206
307
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -235,6 +336,9 @@ module Auth0
235
336
  # @option request_options [Integer] :timeout_in_seconds
236
337
  # @option params [String] :id
237
338
  #
339
+ # @example
340
+ # client.organizations.update(id: "id")
341
+ #
238
342
  # @return [Auth0::Types::UpdateOrganizationResponseContent]
239
343
  def update(request_options: {}, **params)
240
344
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -256,7 +360,7 @@ module Auth0
256
360
  end
257
361
  code = response.code.to_i
258
362
  if code.between?(200, 299)
259
- Auth0::Types::UpdateOrganizationResponseContent.load(response.body)
363
+ (response.body.to_s.empty? ? nil : Auth0::Types::UpdateOrganizationResponseContent.load(response.body))
260
364
  else
261
365
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
262
366
  raise error_class.new(response.body, code: code)
@@ -26,6 +26,17 @@ module Auth0
26
26
  # @option params [Integer, nil] :per_page
27
27
  # @option params [Boolean, nil] :include_totals
28
28
  #
29
+ # @example
30
+ # client.organizations.client_grants.list(
31
+ # id: "id",
32
+ # audience: "audience",
33
+ # client_id: "client_id",
34
+ # grant_ids: ["grant_ids"],
35
+ # page: 1,
36
+ # per_page: 1,
37
+ # include_totals: true
38
+ # )
39
+ #
29
40
  # @return [Auth0::Types::ListOrganizationClientGrantsOffsetPaginatedResponseContent]
30
41
  def list(request_options: {}, **params)
31
42
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -58,7 +69,7 @@ module Auth0
58
69
  end
59
70
  code = response.code.to_i
60
71
  if code.between?(200, 299)
61
- parsed_response = Auth0::Types::ListOrganizationClientGrantsOffsetPaginatedResponseContent.load(response.body)
72
+ parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationClientGrantsOffsetPaginatedResponseContent.load(response.body))
62
73
  [parsed_response, response]
63
74
  else
64
75
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
@@ -76,6 +87,12 @@ module Auth0
76
87
  # @option request_options [Integer] :timeout_in_seconds
77
88
  # @option params [String] :id
78
89
  #
90
+ # @example
91
+ # client.organizations.client_grants.create(
92
+ # id: "id",
93
+ # grant_id: "grant_id"
94
+ # )
95
+ #
79
96
  # @return [Auth0::Types::AssociateOrganizationClientGrantResponseContent]
80
97
  def create(request_options: {}, **params)
81
98
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -97,7 +114,7 @@ module Auth0
97
114
  end
98
115
  code = response.code.to_i
99
116
  if code.between?(200, 299)
100
- Auth0::Types::AssociateOrganizationClientGrantResponseContent.load(response.body)
117
+ (response.body.to_s.empty? ? nil : Auth0::Types::AssociateOrganizationClientGrantResponseContent.load(response.body))
101
118
  else
102
119
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
103
120
  raise error_class.new(response.body, code: code)
@@ -114,6 +131,12 @@ module Auth0
114
131
  # @option params [String] :id
115
132
  # @option params [String] :grant_id
116
133
  #
134
+ # @example
135
+ # client.organizations.client_grants.delete(
136
+ # id: "id",
137
+ # grant_id: "grant_id"
138
+ # )
139
+ #
117
140
  # @return [untyped]
118
141
  def delete(request_options: {}, **params)
119
142
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -31,6 +31,13 @@ module Auth0
31
31
  # @option params [String, nil] :from
32
32
  # @option params [Integer, nil] :take
33
33
  #
34
+ # @example
35
+ # client.organizations.clients.list(
36
+ # id: "id",
37
+ # from: "from",
38
+ # take: 1
39
+ # )
40
+ #
34
41
  # @return [Auth0::Types::ListOrganizationClientsResponseContent]
35
42
  def list(request_options: {}, **params)
36
43
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -58,7 +65,7 @@ module Auth0
58
65
  end
59
66
  code = response.code.to_i
60
67
  if code.between?(200, 299)
61
- parsed_response = Auth0::Types::ListOrganizationClientsResponseContent.load(response.body)
68
+ parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationClientsResponseContent.load(response.body))
62
69
  [parsed_response, response]
63
70
  else
64
71
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
@@ -78,6 +85,15 @@ module Auth0
78
85
  # @option request_options [Integer] :timeout_in_seconds
79
86
  # @option params [String] :id
80
87
  #
88
+ # @example
89
+ # client.organizations.clients.create(
90
+ # id: "id",
91
+ # clients: [{
92
+ # client_id: "client_id",
93
+ # use_for_member_access: true
94
+ # }]
95
+ # )
96
+ #
81
97
  # @return [Array[Auth0::Types::OrganizationClient]]
82
98
  def create(request_options: {}, **params)
83
99
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -99,7 +115,7 @@ module Auth0
99
115
  end
100
116
  code = response.code.to_i
101
117
  if code.between?(200, 299)
102
- Auth0::Types::CreateOrganizationClientsResponseContent.load(response.body)
118
+ (response.body.to_s.empty? ? nil : Auth0::Types::CreateOrganizationClientsResponseContent.load(response.body))
103
119
  else
104
120
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
105
121
  raise error_class.new(response.body, code: code)
@@ -117,6 +133,12 @@ module Auth0
117
133
  # @option request_options [Integer] :timeout_in_seconds
118
134
  # @option params [String] :id
119
135
  #
136
+ # @example
137
+ # client.organizations.clients.delete(
138
+ # id: "id",
139
+ # clients: ["clients"]
140
+ # )
141
+ #
120
142
  # @return [untyped]
121
143
  def delete(request_options: {}, **params)
122
144
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -155,6 +177,12 @@ module Auth0
155
177
  # @option params [String] :id
156
178
  # @option params [String] :client_id
157
179
  #
180
+ # @example
181
+ # client.organizations.clients.get(
182
+ # id: "id",
183
+ # client_id: "client_id"
184
+ # )
185
+ #
158
186
  # @return [Auth0::Types::GetOrganizationClientResponseContent]
159
187
  def get(request_options: {}, **params)
160
188
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -171,7 +199,7 @@ module Auth0
171
199
  end
172
200
  code = response.code.to_i
173
201
  if code.between?(200, 299)
174
- Auth0::Types::GetOrganizationClientResponseContent.load(response.body)
202
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetOrganizationClientResponseContent.load(response.body))
175
203
  else
176
204
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
177
205
  raise error_class.new(response.body, code: code)
@@ -190,6 +218,12 @@ module Auth0
190
218
  # @option params [String] :id
191
219
  # @option params [String] :client_id
192
220
  #
221
+ # @example
222
+ # client.organizations.clients.update(
223
+ # id: "id",
224
+ # client_id: "client_id"
225
+ # )
226
+ #
193
227
  # @return [Auth0::Types::UpdateOrganizationClientResponseContent]
194
228
  def update(request_options: {}, **params)
195
229
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -211,7 +245,7 @@ module Auth0
211
245
  end
212
246
  code = response.code.to_i
213
247
  if code.between?(200, 299)
214
- Auth0::Types::UpdateOrganizationClientResponseContent.load(response.body)
248
+ (response.body.to_s.empty? ? nil : Auth0::Types::UpdateOrganizationClientResponseContent.load(response.body))
215
249
  else
216
250
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
217
251
  raise error_class.new(response.body, code: code)