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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc611df696780876221e91e7224c6e562b8845b6ef8261060d0caa9863d6a548
4
- data.tar.gz: e85fdf0102ac9355077ca9618857e57cf9c83a100e35fe564d45f926620b4c60
3
+ metadata.gz: cdd34814af8763e14c4a6e1fe6435225a0316a5d937fbc214647230755d860bf
4
+ data.tar.gz: 245b66bbddb2838693109d99f557ac7bb801f274ed141f01fe9c2e918ef7323c
5
5
  SHA512:
6
- metadata.gz: abfd19dba0146c27cdc8ddfe82e3f6751a563f9d053e22c3101e8dbd4af53f9340478aed3cbd79697005c553d3447c9b5c261c03fecf1a9e1cd02bcbb16c8b0f
7
- data.tar.gz: d1aa14351de8f1e3ddd462039ce850d97779762d73b51a40faf4c5a0fe346d8d41816fe4b7728aaa1928c905a5578b1e0ca8ae3cb6e4ba3c97c0849e7cdcd8fa
6
+ metadata.gz: c717e94de8376afc15caac98ada3f9987aa4849d4bb403b255b74a113f97a3961d6ac247683e50aae907d228c239c0af5e91d48258c37926a6262cf1516eb69e
7
+ data.tar.gz: 8a6ec6c299f4cd9368b0556d6225911577a5dfc5950152c0ba45e96a89749638a527ffb1cd0ce7cac8be35d7932a41182b8718afdf57874ba39b8c8a5ee07214
data/.fern/metadata.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "cliVersion": "5.92.1",
3
3
  "generatorName": "fernapi/fern-ruby-sdk",
4
- "generatorVersion": "1.17.8",
4
+ "generatorVersion": "1.24.1",
5
5
  "generatorConfig": {
6
6
  "clientModuleName": "Management",
7
7
  "package-name": "auth0",
@@ -10,8 +10,8 @@
10
10
  "offsetSemantics": "page-index",
11
11
  "useDefaultRequestParameterValues": true
12
12
  },
13
- "originGitCommit": "7f24c4964990643851db215c3e2f6ff220fca35b",
13
+ "originGitCommit": "147c530f85f27d4dbbec076dde0bcd7a4b17ed5c",
14
14
  "originGitCommitIsDirty": true,
15
15
  "invokedBy": "manual",
16
- "sdkVersion": "6.1.1"
16
+ "sdkVersion": "6.2.1"
17
17
  }
data/.fern/replay.lock CHANGED
@@ -42,5 +42,11 @@ generations:
42
42
  cli_version: unknown
43
43
  generator_versions:
44
44
  fernapi/fern-ruby-sdk: 1.17.8
45
- current_generation: 78116dc530cd08317c9323863f3127c2fdec29ee
45
+ - commit_sha: 83074ed870797568e512cc7f0fb71dc679cdd7f4
46
+ tree_hash: cbc5c6ccd2dfd5be3b5d68f7bc45a51e62fa6704
47
+ timestamp: 2026-09-15T12:33:08.051Z
48
+ cli_version: unknown
49
+ generator_versions:
50
+ fernapi/fern-ruby-sdk: 1.24.1
51
+ current_generation: 83074ed870797568e512cc7f0fb71dc679cdd7f4
46
52
  patches: []
data/.version CHANGED
@@ -1 +1 @@
1
- v6.2.0
1
+ v6.3.0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## [v6.3.0](https://github.com/auth0/ruby-auth0/tree/v6.3.0) (2026-09-16)
4
+ [Full Changelog](https://github.com/auth0/ruby-auth0/compare/v6.2.0...v6.3.0)
5
+
6
+ **Added**
7
+ - feat: add Experiment Center advance-ramp, Guardian AFC factor settings, and Anonymous Sessions fields; remove top-level OrganizationTemplates client [\#803](https://github.com/auth0/ruby-auth0/pull/803) ([fern-api[bot]](https://github.com/apps/fern-api))
8
+ - feat: add Device Authorization Flow to the Authentication API [\#794](https://github.com/auth0/ruby-auth0/pull/794) ([gagalago](https://github.com/gagalago))
9
+
3
10
  ## [v6.2.0](https://github.com/auth0/ruby-auth0/tree/v6.2.0) (2026-09-02)
4
11
  [Full Changelog](https://github.com/auth0/ruby-auth0/compare/v6.1.0...v6.2.0)
5
12
 
data/EXAMPLES.md CHANGED
@@ -16,6 +16,50 @@ client.authorization_url 'http://localhost:3000'
16
16
  # => #<URI::HTTPS https://YOUR_DOMAIN/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000>
17
17
  ```
18
18
 
19
+ ## Device Authorization Flow
20
+
21
+ The [Device Authorization Flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/device-authorization-flow) lets input-constrained devices, such as a CLI or a smart TV, obtain tokens by having the user complete the login in a browser elsewhere.
22
+
23
+ Start the flow, show the user code to the user, then poll for the tokens until they finish:
24
+
25
+ ```ruby
26
+ require 'auth0'
27
+
28
+ client = Auth0::Client.new(
29
+ client_id: ENV['AUTH0_RUBY_CLIENT_ID'],
30
+ domain: ENV['AUTH0_RUBY_DOMAIN']
31
+ )
32
+
33
+ flow = client.start_device_flow(
34
+ scope: 'openid profile offline_access',
35
+ audience: 'https://api.example.com'
36
+ )
37
+
38
+ puts "Go to #{flow['verification_uri']} and enter the code #{flow['user_code']}"
39
+
40
+ # Poll no more frequently than the interval Auth0 returns, until the code expires.
41
+ interval = flow['interval']
42
+
43
+ tokens = loop do
44
+ sleep interval
45
+
46
+ begin
47
+ break client.exchange_device_code_for_tokens(flow['device_code'])
48
+ rescue Auth0::HTTPError => e
49
+ # While the user has not finished, Auth0 answers with an `error` of
50
+ # `authorization_pending` or `slow_down`. Anything else is terminal.
51
+ error = JSON.parse(e.message)['error'] rescue nil
52
+ raise unless %w[authorization_pending slow_down].include?(error)
53
+
54
+ # RFC 8628 section 3.5: on `slow_down`, add 5 seconds to the interval and
55
+ # keep polling at the slower rate from then on.
56
+ interval += 5 if error == 'slow_down'
57
+ end
58
+ end
59
+
60
+ tokens.access_token
61
+ ```
62
+
19
63
  ## Management API Client
20
64
 
21
65
  As a simple example of how to get started with the Management API, we'll create an admin route to point to a list of all users from Auth0:
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- auth0 (6.2.0)
4
+ auth0 (6.3.0)
5
5
  addressable (~> 2.8)
6
6
  jwt (>= 2.7, < 4.0)
7
7
  rest-client (~> 2.1)
@@ -26,6 +26,16 @@ module Auth0
26
26
  # @option params [Integer, nil] :per_page
27
27
  # @option params [Boolean, nil] :installed
28
28
  #
29
+ # @example
30
+ # client.actions.list(
31
+ # trigger_id: "post-login",
32
+ # action_name: "actionName",
33
+ # deployed: true,
34
+ # page: 1,
35
+ # per_page: 1,
36
+ # installed: true
37
+ # )
38
+ #
29
39
  # @return [Auth0::Types::ListActionsPaginatedResponseContent]
30
40
  def list(request_options: {}, **params)
31
41
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -58,7 +68,7 @@ module Auth0
58
68
  end
59
69
  code = response.code.to_i
60
70
  if code.between?(200, 299)
61
- parsed_response = Auth0::Types::ListActionsPaginatedResponseContent.load(response.body)
71
+ parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListActionsPaginatedResponseContent.load(response.body))
62
72
  [parsed_response, response]
63
73
  else
64
74
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
@@ -78,6 +88,14 @@ module Auth0
78
88
  # @option request_options [Hash{String => Object}] :additional_body_parameters
79
89
  # @option request_options [Integer] :timeout_in_seconds
80
90
  #
91
+ # @example
92
+ # client.actions.create(
93
+ # name: "name",
94
+ # supported_triggers: [{
95
+ # id: "post-login"
96
+ # }]
97
+ # )
98
+ #
81
99
  # @return [Auth0::Types::CreateActionResponseContent]
82
100
  def create(request_options: {}, **params)
83
101
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -95,7 +113,7 @@ module Auth0
95
113
  end
96
114
  code = response.code.to_i
97
115
  if code.between?(200, 299)
98
- Auth0::Types::CreateActionResponseContent.load(response.body)
116
+ (response.body.to_s.empty? ? nil : Auth0::Types::CreateActionResponseContent.load(response.body))
99
117
  else
100
118
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
101
119
  raise error_class.new(response.body, code: code)
@@ -113,6 +131,9 @@ module Auth0
113
131
  # @option request_options [Integer] :timeout_in_seconds
114
132
  # @option params [String] :id
115
133
  #
134
+ # @example
135
+ # client.actions.get(id: "id")
136
+ #
116
137
  # @return [Auth0::Types::GetActionResponseContent]
117
138
  def get(request_options: {}, **params)
118
139
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -129,7 +150,7 @@ module Auth0
129
150
  end
130
151
  code = response.code.to_i
131
152
  if code.between?(200, 299)
132
- Auth0::Types::GetActionResponseContent.load(response.body)
153
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetActionResponseContent.load(response.body))
133
154
  else
134
155
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
135
156
  raise error_class.new(response.body, code: code)
@@ -149,6 +170,12 @@ module Auth0
149
170
  # @option params [String] :id
150
171
  # @option params [Boolean, nil] :force
151
172
  #
173
+ # @example
174
+ # client.actions.delete(
175
+ # id: "id",
176
+ # force: true
177
+ # )
178
+ #
152
179
  # @return [untyped]
153
180
  def delete(request_options: {}, **params)
154
181
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -186,6 +213,9 @@ module Auth0
186
213
  # @option request_options [Integer] :timeout_in_seconds
187
214
  # @option params [String] :id
188
215
  #
216
+ # @example
217
+ # client.actions.update(id: "id")
218
+ #
189
219
  # @return [Auth0::Types::UpdateActionResponseContent]
190
220
  def update(request_options: {}, **params)
191
221
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -207,7 +237,7 @@ module Auth0
207
237
  end
208
238
  code = response.code.to_i
209
239
  if code.between?(200, 299)
210
- Auth0::Types::UpdateActionResponseContent.load(response.body)
240
+ (response.body.to_s.empty? ? nil : Auth0::Types::UpdateActionResponseContent.load(response.body))
211
241
  else
212
242
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
213
243
  raise error_class.new(response.body, code: code)
@@ -227,6 +257,9 @@ module Auth0
227
257
  # @option request_options [Integer] :timeout_in_seconds
228
258
  # @option params [String] :id
229
259
  #
260
+ # @example
261
+ # client.actions.deploy(id: "id")
262
+ #
230
263
  # @return [Auth0::Types::DeployActionResponseContent]
231
264
  def deploy(request_options: {}, **params)
232
265
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -243,7 +276,7 @@ module Auth0
243
276
  end
244
277
  code = response.code.to_i
245
278
  if code.between?(200, 299)
246
- Auth0::Types::DeployActionResponseContent.load(response.body)
279
+ (response.body.to_s.empty? ? nil : Auth0::Types::DeployActionResponseContent.load(response.body))
247
280
  else
248
281
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
249
282
  raise error_class.new(response.body, code: code)
@@ -262,6 +295,14 @@ module Auth0
262
295
  # @option request_options [Integer] :timeout_in_seconds
263
296
  # @option params [String] :id
264
297
  #
298
+ # @example
299
+ # client.actions.test(
300
+ # id: "id",
301
+ # payload: {
302
+ # key: "value"
303
+ # }
304
+ # )
305
+ #
265
306
  # @return [Auth0::Types::TestActionResponseContent]
266
307
  def test(request_options: {}, **params)
267
308
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -283,7 +324,7 @@ module Auth0
283
324
  end
284
325
  code = response.code.to_i
285
326
  if code.between?(200, 299)
286
- Auth0::Types::TestActionResponseContent.load(response.body)
327
+ (response.body.to_s.empty? ? nil : Auth0::Types::TestActionResponseContent.load(response.body))
287
328
  else
288
329
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
289
330
  raise error_class.new(response.body, code: code)
@@ -24,6 +24,9 @@ module Auth0
24
24
  # @option request_options [Integer] :timeout_in_seconds
25
25
  # @option params [String] :id
26
26
  #
27
+ # @example
28
+ # client.actions.executions.get(id: "id")
29
+ #
27
30
  # @return [Auth0::Types::GetActionExecutionResponseContent]
28
31
  def get(request_options: {}, **params)
29
32
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -40,7 +43,7 @@ module Auth0
40
43
  end
41
44
  code = response.code.to_i
42
45
  if code.between?(200, 299)
43
- Auth0::Types::GetActionExecutionResponseContent.load(response.body)
46
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetActionExecutionResponseContent.load(response.body))
44
47
  else
45
48
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
46
49
  raise error_class.new(response.body, code: code)
@@ -23,6 +23,12 @@ module Auth0
23
23
  # @option params [Integer, nil] :page
24
24
  # @option params [Integer, nil] :per_page
25
25
  #
26
+ # @example
27
+ # client.actions.modules.list(
28
+ # page: 1,
29
+ # per_page: 1
30
+ # )
31
+ #
26
32
  # @return [Auth0::Types::GetActionModulesResponseContent]
27
33
  def list(request_options: {}, **params)
28
34
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -51,7 +57,7 @@ module Auth0
51
57
  end
52
58
  code = response.code.to_i
53
59
  if code.between?(200, 299)
54
- parsed_response = Auth0::Types::GetActionModulesResponseContent.load(response.body)
60
+ parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::GetActionModulesResponseContent.load(response.body))
55
61
  [parsed_response, response]
56
62
  else
57
63
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
@@ -70,6 +76,12 @@ module Auth0
70
76
  # @option request_options [Hash{String => Object}] :additional_body_parameters
71
77
  # @option request_options [Integer] :timeout_in_seconds
72
78
  #
79
+ # @example
80
+ # client.actions.modules.create(
81
+ # name: "name",
82
+ # code: "code"
83
+ # )
84
+ #
73
85
  # @return [Auth0::Types::CreateActionModuleResponseContent]
74
86
  def create(request_options: {}, **params)
75
87
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -87,7 +99,7 @@ module Auth0
87
99
  end
88
100
  code = response.code.to_i
89
101
  if code.between?(200, 299)
90
- Auth0::Types::CreateActionModuleResponseContent.load(response.body)
102
+ (response.body.to_s.empty? ? nil : Auth0::Types::CreateActionModuleResponseContent.load(response.body))
91
103
  else
92
104
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
93
105
  raise error_class.new(response.body, code: code)
@@ -105,6 +117,9 @@ module Auth0
105
117
  # @option request_options [Integer] :timeout_in_seconds
106
118
  # @option params [String] :id
107
119
  #
120
+ # @example
121
+ # client.actions.modules.get(id: "id")
122
+ #
108
123
  # @return [Auth0::Types::GetActionModuleResponseContent]
109
124
  def get(request_options: {}, **params)
110
125
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -121,7 +136,7 @@ module Auth0
121
136
  end
122
137
  code = response.code.to_i
123
138
  if code.between?(200, 299)
124
- Auth0::Types::GetActionModuleResponseContent.load(response.body)
139
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetActionModuleResponseContent.load(response.body))
125
140
  else
126
141
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
127
142
  raise error_class.new(response.body, code: code)
@@ -139,6 +154,9 @@ module Auth0
139
154
  # @option request_options [Integer] :timeout_in_seconds
140
155
  # @option params [String] :id
141
156
  #
157
+ # @example
158
+ # client.actions.modules.delete(id: "id")
159
+ #
142
160
  # @return [untyped]
143
161
  def delete(request_options: {}, **params)
144
162
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -171,6 +189,9 @@ module Auth0
171
189
  # @option request_options [Integer] :timeout_in_seconds
172
190
  # @option params [String] :id
173
191
  #
192
+ # @example
193
+ # client.actions.modules.update(id: "id")
194
+ #
174
195
  # @return [Auth0::Types::UpdateActionModuleResponseContent]
175
196
  def update(request_options: {}, **params)
176
197
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -192,7 +213,7 @@ module Auth0
192
213
  end
193
214
  code = response.code.to_i
194
215
  if code.between?(200, 299)
195
- Auth0::Types::UpdateActionModuleResponseContent.load(response.body)
216
+ (response.body.to_s.empty? ? nil : Auth0::Types::UpdateActionModuleResponseContent.load(response.body))
196
217
  else
197
218
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
198
219
  raise error_class.new(response.body, code: code)
@@ -213,6 +234,13 @@ module Auth0
213
234
  # @option params [Integer, nil] :page
214
235
  # @option params [Integer, nil] :per_page
215
236
  #
237
+ # @example
238
+ # client.actions.modules.list_actions(
239
+ # id: "id",
240
+ # page: 1,
241
+ # per_page: 1
242
+ # )
243
+ #
216
244
  # @return [Auth0::Types::GetActionModuleActionsResponseContent]
217
245
  def list_actions(request_options: {}, **params)
218
246
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -241,7 +269,7 @@ module Auth0
241
269
  end
242
270
  code = response.code.to_i
243
271
  if code.between?(200, 299)
244
- parsed_response = Auth0::Types::GetActionModuleActionsResponseContent.load(response.body)
272
+ parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::GetActionModuleActionsResponseContent.load(response.body))
245
273
  [parsed_response, response]
246
274
  else
247
275
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
@@ -262,6 +290,12 @@ module Auth0
262
290
  # @option request_options [Integer] :timeout_in_seconds
263
291
  # @option params [String] :id
264
292
  #
293
+ # @example
294
+ # client.actions.modules.rollback(
295
+ # id: "id",
296
+ # module_version_id: "module_version_id"
297
+ # )
298
+ #
265
299
  # @return [Auth0::Types::RollbackActionModuleResponseContent]
266
300
  def rollback(request_options: {}, **params)
267
301
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -283,7 +317,7 @@ module Auth0
283
317
  end
284
318
  code = response.code.to_i
285
319
  if code.between?(200, 299)
286
- Auth0::Types::RollbackActionModuleResponseContent.load(response.body)
320
+ (response.body.to_s.empty? ? nil : Auth0::Types::RollbackActionModuleResponseContent.load(response.body))
287
321
  else
288
322
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
289
323
  raise error_class.new(response.body, code: code)
@@ -25,6 +25,13 @@ module Auth0
25
25
  # @option params [Integer, nil] :page
26
26
  # @option params [Integer, nil] :per_page
27
27
  #
28
+ # @example
29
+ # client.actions.modules.versions.list(
30
+ # id: "id",
31
+ # page: 1,
32
+ # per_page: 1
33
+ # )
34
+ #
28
35
  # @return [Auth0::Types::GetActionModuleVersionsResponseContent]
29
36
  def list(request_options: {}, **params)
30
37
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -53,7 +60,7 @@ module Auth0
53
60
  end
54
61
  code = response.code.to_i
55
62
  if code.between?(200, 299)
56
- parsed_response = Auth0::Types::GetActionModuleVersionsResponseContent.load(response.body)
63
+ parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::GetActionModuleVersionsResponseContent.load(response.body))
57
64
  [parsed_response, response]
58
65
  else
59
66
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
@@ -75,6 +82,9 @@ module Auth0
75
82
  # @option request_options [Integer] :timeout_in_seconds
76
83
  # @option params [String] :id
77
84
  #
85
+ # @example
86
+ # client.actions.modules.versions.create(id: "id")
87
+ #
78
88
  # @return [Auth0::Types::CreateActionModuleVersionResponseContent]
79
89
  def create(request_options: {}, **params)
80
90
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -91,7 +101,7 @@ module Auth0
91
101
  end
92
102
  code = response.code.to_i
93
103
  if code.between?(200, 299)
94
- Auth0::Types::CreateActionModuleVersionResponseContent.load(response.body)
104
+ (response.body.to_s.empty? ? nil : Auth0::Types::CreateActionModuleVersionResponseContent.load(response.body))
95
105
  else
96
106
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
97
107
  raise error_class.new(response.body, code: code)
@@ -110,6 +120,12 @@ module Auth0
110
120
  # @option params [String] :id
111
121
  # @option params [String] :version_id
112
122
  #
123
+ # @example
124
+ # client.actions.modules.versions.get(
125
+ # id: "id",
126
+ # version_id: "versionId"
127
+ # )
128
+ #
113
129
  # @return [Auth0::Types::GetActionModuleVersionResponseContent]
114
130
  def get(request_options: {}, **params)
115
131
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -126,7 +142,7 @@ module Auth0
126
142
  end
127
143
  code = response.code.to_i
128
144
  if code.between?(200, 299)
129
- Auth0::Types::GetActionModuleVersionResponseContent.load(response.body)
145
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetActionModuleVersionResponseContent.load(response.body))
130
146
  else
131
147
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
132
148
  raise error_class.new(response.body, code: code)
@@ -27,6 +27,13 @@ module Auth0
27
27
  # @option params [Integer, nil] :page
28
28
  # @option params [Integer, nil] :per_page
29
29
  #
30
+ # @example
31
+ # client.actions.triggers.bindings.list(
32
+ # trigger_id: "post-login",
33
+ # page: 1,
34
+ # per_page: 1
35
+ # )
36
+ #
30
37
  # @return [Auth0::Types::ListActionBindingsPaginatedResponseContent]
31
38
  def list(request_options: {}, **params)
32
39
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -55,7 +62,7 @@ module Auth0
55
62
  end
56
63
  code = response.code.to_i
57
64
  if code.between?(200, 299)
58
- parsed_response = Auth0::Types::ListActionBindingsPaginatedResponseContent.load(response.body)
65
+ parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListActionBindingsPaginatedResponseContent.load(response.body))
59
66
  [parsed_response, response]
60
67
  else
61
68
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
@@ -77,6 +84,9 @@ module Auth0
77
84
  # @option request_options [Integer] :timeout_in_seconds
78
85
  # @option params [Auth0::Types::ActionTriggerTypeEnum] :trigger_id
79
86
  #
87
+ # @example
88
+ # client.actions.triggers.bindings.update_many(trigger_id: "post-login")
89
+ #
80
90
  # @return [Auth0::Types::UpdateActionBindingsResponseContent]
81
91
  def update_many(request_options: {}, **params)
82
92
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -98,7 +108,7 @@ module Auth0
98
108
  end
99
109
  code = response.code.to_i
100
110
  if code.between?(200, 299)
101
- Auth0::Types::UpdateActionBindingsResponseContent.load(response.body)
111
+ (response.body.to_s.empty? ? nil : Auth0::Types::UpdateActionBindingsResponseContent.load(response.body))
102
112
  else
103
113
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
104
114
  raise error_class.new(response.body, code: code)
@@ -22,6 +22,9 @@ module Auth0
22
22
  # @option request_options [Hash{String => Object}] :additional_body_parameters
23
23
  # @option request_options [Integer] :timeout_in_seconds
24
24
  #
25
+ # @example
26
+ # client.actions.triggers.list
27
+ #
25
28
  # @return [Auth0::Types::ListActionTriggersResponseContent]
26
29
  def list(request_options: {}, **_params)
27
30
  request = Auth0::Internal::JSON::Request.new(
@@ -37,7 +40,7 @@ module Auth0
37
40
  end
38
41
  code = response.code.to_i
39
42
  if code.between?(200, 299)
40
- Auth0::Types::ListActionTriggersResponseContent.load(response.body)
43
+ (response.body.to_s.empty? ? nil : Auth0::Types::ListActionTriggersResponseContent.load(response.body))
41
44
  else
42
45
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
43
46
  raise error_class.new(response.body, code: code)
@@ -25,6 +25,13 @@ module Auth0
25
25
  # @option params [Integer, nil] :page
26
26
  # @option params [Integer, nil] :per_page
27
27
  #
28
+ # @example
29
+ # client.actions.versions.list(
30
+ # action_id: "actionId",
31
+ # page: 1,
32
+ # per_page: 1
33
+ # )
34
+ #
28
35
  # @return [Auth0::Types::ListActionVersionsPaginatedResponseContent]
29
36
  def list(request_options: {}, **params)
30
37
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -53,7 +60,7 @@ module Auth0
53
60
  end
54
61
  code = response.code.to_i
55
62
  if code.between?(200, 299)
56
- parsed_response = Auth0::Types::ListActionVersionsPaginatedResponseContent.load(response.body)
63
+ parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListActionVersionsPaginatedResponseContent.load(response.body))
57
64
  [parsed_response, response]
58
65
  else
59
66
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
@@ -75,6 +82,12 @@ module Auth0
75
82
  # @option params [String] :action_id
76
83
  # @option params [String] :id
77
84
  #
85
+ # @example
86
+ # client.actions.versions.get(
87
+ # action_id: "actionId",
88
+ # id: "id"
89
+ # )
90
+ #
78
91
  # @return [Auth0::Types::GetActionVersionResponseContent]
79
92
  def get(request_options: {}, **params)
80
93
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -91,7 +104,7 @@ module Auth0
91
104
  end
92
105
  code = response.code.to_i
93
106
  if code.between?(200, 299)
94
- Auth0::Types::GetActionVersionResponseContent.load(response.body)
107
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetActionVersionResponseContent.load(response.body))
95
108
  else
96
109
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
97
110
  raise error_class.new(response.body, code: code)
@@ -112,14 +125,24 @@ module Auth0
112
125
  # @option params [String] :action_id
113
126
  # @option params [String] :id
114
127
  #
128
+ # @example
129
+ # client.actions.versions.deploy(
130
+ # action_id: "actionId",
131
+ # id: "id",
132
+ # request: {}
133
+ # )
134
+ #
115
135
  # @return [Auth0::Types::DeployActionVersionResponseContent]
116
136
  def deploy(request_options: {}, **params)
117
137
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
138
+ path_param_names = %i[action_id id]
139
+ body_params = params.except(*path_param_names)
140
+
118
141
  request = Auth0::Internal::JSON::Request.new(
119
142
  base_url: request_options[:base_url],
120
143
  method: "POST",
121
144
  path: "actions/actions/#{URI.encode_uri_component(params[:action_id].to_s)}/versions/#{URI.encode_uri_component(params[:id].to_s)}/deploy",
122
- body: params,
145
+ body: body_params,
123
146
  request_options: request_options
124
147
  )
125
148
  begin
@@ -129,7 +152,7 @@ module Auth0
129
152
  end
130
153
  code = response.code.to_i
131
154
  if code.between?(200, 299)
132
- Auth0::Types::DeployActionVersionResponseContent.load(response.body)
155
+ (response.body.to_s.empty? ? nil : Auth0::Types::DeployActionVersionResponseContent.load(response.body))
133
156
  else
134
157
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
135
158
  raise error_class.new(response.body, code: code)