workos 10.3.0 → 10.5.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 (210) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +2 -2
  3. data/.github/workflows/docs.yml +4 -4
  4. data/.github/workflows/lint.yml +2 -2
  5. data/.github/workflows/release-please.yml +3 -3
  6. data/.github/workflows/release.yml +2 -2
  7. data/.last-synced-sha +1 -1
  8. data/.oagen-manifest.json +326 -158
  9. data/.release-please-manifest.json +1 -1
  10. data/.ruby-version +1 -1
  11. data/CHANGELOG.md +388 -0
  12. data/Gemfile.lock +14 -14
  13. data/README.md +23 -0
  14. data/lib/workos/admin_portal/generate_link.rb +3 -0
  15. data/lib/workos/admin_portal/revoke_link.rb +22 -0
  16. data/lib/workos/admin_portal.rb +29 -2
  17. data/lib/workos/agents/agent_blueprint.rb +3 -0
  18. data/lib/workos/agents/agent_blueprint_invocable_as.rb +18 -0
  19. data/lib/workos/agents/agent_blueprints_create_request.rb +3 -0
  20. data/lib/workos/agents/agent_blueprints_create_request_invocable_as.rb +18 -0
  21. data/lib/workos/agents/agent_blueprints_update_request.rb +3 -0
  22. data/lib/workos/agents/agent_blueprints_update_request_invocable_as.rb +18 -0
  23. data/lib/workos/agents/agent_registration.rb +3 -0
  24. data/lib/workos/agents.rb +30 -1
  25. data/lib/workos/api_keys/validate_api_key.rb +12 -1
  26. data/lib/workos/authorization/user_role_assignment_source.rb +5 -2
  27. data/lib/workos/authorization/user_role_assignment_source_group.rb +7 -0
  28. data/lib/workos/base_client.rb +6 -2
  29. data/lib/workos/configuration.rb +3 -2
  30. data/lib/workos/directory_sync/directory_sync_rate_limit_error.rb +25 -0
  31. data/lib/workos/directory_sync/directory_sync_response.rb +18 -0
  32. data/lib/workos/directory_sync.rb +19 -0
  33. data/lib/workos/feature_flags/flag_updated_context_previous_attribute_data.rb +3 -0
  34. data/lib/workos/feature_flags/flag_updated_context_previous_attribute_data_owner.rb +7 -0
  35. data/lib/workos/inflections.rb +2 -0
  36. data/lib/workos/multi_factor_auth.rb +1 -1
  37. data/lib/workos/pipes/add_data_integrations_get_data_integration_authorize_url_request.rb +37 -0
  38. data/lib/workos/pipes/connected_account.rb +15 -0
  39. data/lib/workos/pipes/connected_account_input.rb +6 -0
  40. data/lib/workos/pipes/connected_account_write_response.rb +73 -0
  41. data/lib/workos/pipes/connected_account_write_response_warning.rb +22 -0
  42. data/lib/workos/pipes/create_connected_account.rb +40 -0
  43. data/lib/workos/pipes/create_data_integration.rb +3 -0
  44. data/lib/workos/pipes/create_organization_connected_account.rb +43 -0
  45. data/lib/workos/pipes/data_integration.rb +3 -0
  46. data/lib/workos/pipes/data_integration_credentials_response.rb +1 -1
  47. data/lib/workos/pipes/data_integration_installation.rb +9 -0
  48. data/lib/workos/pipes/{data_integration_credentials_response_credential.rb → data_integration_vended_credential.rb} +9 -3
  49. data/lib/workos/pipes/data_integrations_create_api_key_connection_request.rb +37 -0
  50. data/lib/workos/pipes/data_integrations_create_client_credentials_connection_request.rb +43 -0
  51. data/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb +6 -0
  52. data/lib/workos/pipes/data_integrations_get_user_token_request.rb +11 -2
  53. data/lib/workos/pipes/data_integrations_list_response_data.rb +18 -3
  54. data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +15 -0
  55. data/lib/workos/pipes/data_integrations_upsert_api_key_request.rb +28 -1
  56. data/lib/workos/pipes/data_integrations_upsert_api_key_request_2.rb +37 -0
  57. data/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +9 -0
  58. data/lib/workos/pipes/data_integrations_upsert_client_credentials_request_2.rb +43 -0
  59. data/lib/workos/pipes/data_integrations_vend_credentials_request.rb +11 -2
  60. data/lib/workos/pipes/organization_connected_account.rb +40 -0
  61. data/lib/workos/pipes/reauthorize_data_integrations_get_data_integration_authorize_url_request.rb +40 -0
  62. data/lib/workos/pipes/reauthorize_data_integrations_upsert_api_key_request.rb +40 -0
  63. data/lib/workos/pipes/reauthorize_data_integrations_upsert_client_credentials_request.rb +46 -0
  64. data/lib/workos/pipes.rb +498 -30
  65. data/lib/workos/session_manager.rb +11 -6
  66. data/lib/workos/shared/account_selection_required_error.rb +22 -0
  67. data/lib/workos/shared/agent_blueprint_created_data.rb +3 -0
  68. data/lib/workos/shared/agent_blueprint_created_data_invocable_as.rb +18 -0
  69. data/lib/workos/shared/agent_blueprint_updated_data.rb +40 -1
  70. data/lib/workos/shared/agent_blueprint_updated_data_invocable_as.rb +18 -0
  71. data/lib/workos/shared/pipe_connected_account.rb +21 -0
  72. data/lib/workos/shared/pipes_account_connection_add_failed.rb +34 -0
  73. data/lib/workos/shared/pipes_account_connection_add_failed_data.rb +49 -0
  74. data/lib/workos/shared/pipes_account_connection_connected.rb +34 -0
  75. data/lib/workos/shared/pipes_account_connection_connection_failed.rb +34 -0
  76. data/lib/workos/shared/pipes_account_connection_connection_failed_data.rb +7 -0
  77. data/lib/workos/shared/pipes_account_connection_disconnected.rb +34 -0
  78. data/lib/workos/shared/pipes_account_connection_reauthorization_needed.rb +34 -0
  79. data/lib/workos/shared/pipes_connected_account_connection_failed_data.rb +1 -40
  80. data/lib/workos/sso/token_query.rb +3 -0
  81. data/lib/workos/sso.rb +3 -0
  82. data/lib/workos/types/add_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +13 -0
  83. data/lib/workos/types/agent_blueprint_created_data_invocable_as_instance_types.rb +13 -0
  84. data/lib/workos/types/agent_blueprint_invocable_as_instance_types.rb +9 -0
  85. data/lib/workos/types/agent_blueprint_updated_data_invocable_as_instance_types.rb +9 -0
  86. data/lib/workos/types/agent_blueprints_create_request_invocable_as_instance_types.rb +9 -0
  87. data/lib/workos/types/agent_blueprints_update_request_invocable_as_instance_types.rb +9 -0
  88. data/lib/workos/types/agent_instance_created_data_type.rb +1 -5
  89. data/lib/workos/types/agent_instance_deleted_data_type.rb +1 -1
  90. data/lib/workos/types/agent_instance_type.rb +1 -1
  91. data/lib/workos/types/connected_account_connection_role.rb +13 -0
  92. data/lib/workos/types/connected_account_write_response_auth_method.rb +9 -0
  93. data/lib/workos/types/connected_account_write_response_connection_role.rb +9 -0
  94. data/lib/workos/types/connected_account_write_response_state.rb +9 -0
  95. data/lib/workos/types/create_connected_account_state.rb +9 -0
  96. data/lib/workos/types/create_data_integration_ownership.rb +9 -0
  97. data/lib/workos/types/create_organization_connected_account_state.rb +9 -0
  98. data/lib/workos/types/create_webhook_endpoint_events.rb +6 -1
  99. data/lib/workos/types/data_integration_installation_connection_role.rb +9 -0
  100. data/lib/workos/types/data_integration_ownership.rb +9 -0
  101. data/lib/workos/types/data_integrations_create_api_key_connection_request_connection_owner.rb +9 -0
  102. data/lib/workos/types/data_integrations_create_client_credentials_connection_request_connection_owner.rb +9 -0
  103. data/lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +9 -0
  104. data/lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb +9 -0
  105. data/lib/workos/types/data_integrations_list_response_data_connected_account_connection_role.rb +9 -0
  106. data/lib/workos/types/data_integrations_list_response_data_connection_owner.rb +9 -0
  107. data/lib/workos/types/data_integrations_upsert_api_key_request_2_connection_owner.rb +9 -0
  108. data/lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb +9 -0
  109. data/lib/workos/types/data_integrations_upsert_client_credentials_request_2_connection_owner.rb +9 -0
  110. data/lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb +9 -0
  111. data/lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb +9 -0
  112. data/lib/workos/types/organization_connected_account_state.rb +9 -0
  113. data/lib/workos/types/pipe_connected_account_auth_method.rb +9 -0
  114. data/lib/workos/types/pipe_connected_account_connection_role.rb +9 -0
  115. data/lib/workos/types/pipes_ownership.rb +9 -0
  116. data/lib/workos/types/reauthorize_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +9 -0
  117. data/lib/workos/types/reauthorize_data_integrations_upsert_api_key_request_connection_owner.rb +9 -0
  118. data/lib/workos/types/reauthorize_data_integrations_upsert_client_credentials_request_connection_owner.rb +9 -0
  119. data/lib/workos/types/resource_export_completed_data_resource_type.rb +4 -1
  120. data/lib/workos/types/vault_dek_rekeyed_data_actor_source.rb +9 -0
  121. data/lib/workos/user_management/authkit_oauth_resource.rb +34 -0
  122. data/lib/workos/user_management/create_authkit_oauth_resource.rb +22 -0
  123. data/lib/workos/user_management.rb +88 -1
  124. data/lib/workos/vault/vault_dek_rekeyed.rb +34 -0
  125. data/lib/workos/vault/vault_dek_rekeyed_data.rb +31 -0
  126. data/lib/workos/version.rb +1 -1
  127. data/rbi/workos/account_selection_required_error.rbi +30 -0
  128. data/rbi/workos/add_data_integrations_get_data_integration_authorize_url_request.rbi +60 -0
  129. data/rbi/workos/admin_portal.rbi +11 -1
  130. data/rbi/workos/agent_blueprint.rbi +6 -0
  131. data/rbi/workos/agent_blueprint_created_data.rbi +6 -0
  132. data/rbi/workos/agent_blueprint_created_data_invocable_as.rbi +24 -0
  133. data/rbi/workos/agent_blueprint_invocable_as.rbi +24 -0
  134. data/rbi/workos/agent_blueprint_updated_data.rbi +6 -0
  135. data/rbi/workos/agent_blueprint_updated_data_invocable_as.rbi +24 -0
  136. data/rbi/workos/agent_blueprints_create_request.rbi +6 -0
  137. data/rbi/workos/agent_blueprints_create_request_invocable_as.rbi +24 -0
  138. data/rbi/workos/agent_blueprints_update_request.rbi +6 -0
  139. data/rbi/workos/agent_blueprints_update_request_invocable_as.rbi +24 -0
  140. data/rbi/workos/agent_registration.rbi +6 -0
  141. data/rbi/workos/agents.rbi +14 -3
  142. data/rbi/workos/authkit_oauth_resource.rbi +54 -0
  143. data/rbi/workos/connected_account.rbi +30 -0
  144. data/rbi/workos/connected_account_input.rbi +12 -0
  145. data/rbi/workos/connected_account_write_response.rbi +132 -0
  146. data/rbi/workos/connected_account_write_response_warning.rbi +30 -0
  147. data/rbi/workos/create_authkit_oauth_resource.rbi +30 -0
  148. data/rbi/workos/create_connected_account.rbi +66 -0
  149. data/rbi/workos/create_data_integration.rbi +6 -0
  150. data/rbi/workos/create_organization_connected_account.rbi +72 -0
  151. data/rbi/workos/data_integration.rbi +6 -0
  152. data/rbi/workos/data_integration_credentials_response.rbi +2 -2
  153. data/rbi/workos/data_integration_installation.rbi +19 -1
  154. data/rbi/workos/data_integration_vended_credential.rbi +66 -0
  155. data/rbi/workos/data_integrations_create_api_key_connection_request.rbi +60 -0
  156. data/rbi/workos/data_integrations_create_client_credentials_connection_request.rbi +72 -0
  157. data/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi +12 -0
  158. data/rbi/workos/data_integrations_get_user_token_request.rbi +18 -0
  159. data/rbi/workos/data_integrations_list_response_data.rbi +12 -0
  160. data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +30 -0
  161. data/rbi/workos/data_integrations_upsert_api_key_request.rbi +18 -0
  162. data/rbi/workos/data_integrations_upsert_api_key_request_2.rbi +60 -0
  163. data/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +18 -0
  164. data/rbi/workos/data_integrations_upsert_client_credentials_request_2.rbi +72 -0
  165. data/rbi/workos/data_integrations_vend_credentials_request.rbi +18 -0
  166. data/rbi/workos/directory_sync.rbi +8 -0
  167. data/rbi/workos/directory_sync_rate_limit_error.rbi +36 -0
  168. data/rbi/workos/directory_sync_response.rbi +24 -0
  169. data/rbi/workos/flag_updated_context_previous_attribute_data.rbi +6 -0
  170. data/rbi/workos/flag_updated_context_previous_attribute_data_owner.rbi +36 -0
  171. data/rbi/workos/generate_link.rbi +6 -0
  172. data/rbi/workos/organization_connected_account.rbi +66 -0
  173. data/rbi/workos/pipe_connected_account.rbi +42 -0
  174. data/rbi/workos/pipes.rbi +176 -16
  175. data/rbi/workos/pipes_account_connection_add_failed.rbi +54 -0
  176. data/rbi/workos/pipes_account_connection_add_failed_data.rbi +84 -0
  177. data/rbi/workos/pipes_account_connection_connected.rbi +54 -0
  178. data/rbi/workos/pipes_account_connection_connection_failed.rbi +54 -0
  179. data/rbi/workos/pipes_account_connection_connection_failed_data.rbi +84 -0
  180. data/rbi/workos/pipes_account_connection_disconnected.rbi +54 -0
  181. data/rbi/workos/pipes_account_connection_reauthorization_needed.rbi +54 -0
  182. data/rbi/workos/pipes_connected_account_connection_failed_data.rbi +6 -0
  183. data/rbi/workos/reauthorize_data_integrations_get_data_integration_authorize_url_request.rbi +66 -0
  184. data/rbi/workos/reauthorize_data_integrations_upsert_api_key_request.rbi +66 -0
  185. data/rbi/workos/reauthorize_data_integrations_upsert_client_credentials_request.rbi +78 -0
  186. data/rbi/workos/revoke_link.rbi +30 -0
  187. data/rbi/workos/sso.rbi +2 -1
  188. data/rbi/workos/token_query.rbi +6 -0
  189. data/rbi/workos/user_management.rbi +28 -0
  190. data/rbi/workos/user_role_assignment_source.rbi +6 -0
  191. data/rbi/workos/user_role_assignment_source_group.rbi +30 -0
  192. data/rbi/workos/vault_dek_rekeyed.rbi +54 -0
  193. data/rbi/workos/{data_integration_credentials_response_credential.rbi → vault_dek_rekeyed_data.rbi} +13 -19
  194. data/test/workos/test_admin_portal.rb +9 -1
  195. data/test/workos/test_admin_portal_model_round_trip.rb +14 -0
  196. data/test/workos/test_agents.rb +8 -0
  197. data/test/workos/test_agents_model_round_trip.rb +35 -0
  198. data/test/workos/test_authorization_model_round_trip.rb +15 -1
  199. data/test/workos/test_directory_sync.rb +8 -0
  200. data/test/workos/test_directory_sync_model_round_trip.rb +24 -0
  201. data/test/workos/test_feature_flags_model_round_trip.rb +16 -0
  202. data/test/workos/test_pipes.rb +80 -0
  203. data/test/workos/test_pipes_model_round_trip.rb +317 -18
  204. data/test/workos/test_session.rb +63 -0
  205. data/test/workos/test_shared_model_round_trip.rb +185 -0
  206. data/test/workos/test_sso_model_round_trip.rb +1 -0
  207. data/test/workos/test_user_management.rb +24 -0
  208. data/test/workos/test_user_management_model_round_trip.rb +32 -0
  209. data/test/workos/test_vault_model_round_trip.rb +33 -0
  210. metadata +107 -3
@@ -132,6 +132,34 @@ module WorkOS
132
132
  end
133
133
  def revoke_session(session_id:, request_options:); end
134
134
 
135
+ sig do
136
+ params(
137
+ before: T.nilable(String),
138
+ after: T.nilable(String),
139
+ limit: T.nilable(Integer),
140
+ order: T.nilable(String),
141
+ request_options: T::Hash[Symbol, T.untyped]
142
+ ).returns(T::Array[WorkOS::AuthkitOAuthResource])
143
+ end
144
+ def list_authkit_oauth_resources(before:, after:, limit:, order:, request_options:); end
145
+
146
+ sig do
147
+ params(
148
+ uri: String,
149
+ default: T.nilable(T::Boolean),
150
+ request_options: T::Hash[Symbol, T.untyped]
151
+ ).returns(WorkOS::AuthkitOAuthResource)
152
+ end
153
+ def create_authkit_oauth_resource(uri:, default:, request_options:); end
154
+
155
+ sig do
156
+ params(
157
+ id: String,
158
+ request_options: T::Hash[Symbol, T.untyped]
159
+ ).returns(NilClass)
160
+ end
161
+ def delete_authkit_oauth_resource(id:, request_options:); end
162
+
135
163
  sig do
136
164
  params(
137
165
  before: T.nilable(String),
@@ -21,6 +21,12 @@ module WorkOS
21
21
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
22
22
  def group_role_assignment_id=(value); end
23
23
 
24
+ sig { returns(T.nilable(WorkOS::UserRoleAssignmentSourceGroup)) }
25
+ def group; end
26
+
27
+ sig { params(value: T.nilable(WorkOS::UserRoleAssignmentSourceGroup)).returns(T.nilable(WorkOS::UserRoleAssignmentSourceGroup)) }
28
+ def group=(value); end
29
+
24
30
  sig { returns(T::Hash[Symbol, T.untyped]) }
25
31
  def to_h; end
26
32
 
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ # typed: strong
6
+
7
+ module WorkOS
8
+ class UserRoleAssignmentSourceGroup
9
+ sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
10
+ def initialize(json); end
11
+
12
+ sig { returns(String) }
13
+ def id; end
14
+
15
+ sig { params(value: String).returns(String) }
16
+ def id=(value); end
17
+
18
+ sig { returns(String) }
19
+ def name; end
20
+
21
+ sig { params(value: String).returns(String) }
22
+ def name=(value); end
23
+
24
+ sig { returns(T::Hash[Symbol, T.untyped]) }
25
+ def to_h; end
26
+
27
+ sig { params(args: T.untyped).returns(String) }
28
+ def to_json(*args); end
29
+ end
30
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ # typed: strong
6
+
7
+ module WorkOS
8
+ class VaultDekRekeyed
9
+ sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
10
+ def initialize(json); end
11
+
12
+ sig { returns(String) }
13
+ def object; end
14
+
15
+ sig { params(value: String).returns(String) }
16
+ def object=(value); end
17
+
18
+ sig { returns(String) }
19
+ def id; end
20
+
21
+ sig { params(value: String).returns(String) }
22
+ def id=(value); end
23
+
24
+ sig { returns(String) }
25
+ def event; end
26
+
27
+ sig { params(value: String).returns(String) }
28
+ def event=(value); end
29
+
30
+ sig { returns(WorkOS::VaultDekRekeyedData) }
31
+ def data; end
32
+
33
+ sig { params(value: WorkOS::VaultDekRekeyedData).returns(WorkOS::VaultDekRekeyedData) }
34
+ def data=(value); end
35
+
36
+ sig { returns(String) }
37
+ def created_at; end
38
+
39
+ sig { params(value: String).returns(String) }
40
+ def created_at=(value); end
41
+
42
+ sig { returns(T.nilable(WorkOS::EventContext)) }
43
+ def context; end
44
+
45
+ sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) }
46
+ def context=(value); end
47
+
48
+ sig { returns(T::Hash[Symbol, T.untyped]) }
49
+ def to_h; end
50
+
51
+ sig { params(args: T.untyped).returns(String) }
52
+ def to_json(*args); end
53
+ end
54
+ end
@@ -5,45 +5,39 @@
5
5
  # typed: strong
6
6
 
7
7
  module WorkOS
8
- class DataIntegrationCredentialsResponseCredential
8
+ class VaultDekRekeyedData
9
9
  sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
10
10
  def initialize(json); end
11
11
 
12
12
  sig { returns(String) }
13
- def object; end
13
+ def actor_id; end
14
14
 
15
15
  sig { params(value: String).returns(String) }
16
- def object=(value); end
16
+ def actor_id=(value); end
17
17
 
18
18
  sig { returns(String) }
19
- def auth_method; end
19
+ def actor_source; end
20
20
 
21
21
  sig { params(value: String).returns(String) }
22
- def auth_method=(value); end
22
+ def actor_source=(value); end
23
23
 
24
24
  sig { returns(String) }
25
- def value; end
25
+ def actor_name; end
26
26
 
27
27
  sig { params(value: String).returns(String) }
28
- def value=(value); end
29
-
30
- sig { returns(T.nilable(String)) }
31
- def expires_at; end
32
-
33
- sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
34
- def expires_at=(value); end
28
+ def actor_name=(value); end
35
29
 
36
30
  sig { returns(T::Array[String]) }
37
- def scopes; end
31
+ def key_ids; end
38
32
 
39
33
  sig { params(value: T::Array[String]).returns(T::Array[String]) }
40
- def scopes=(value); end
34
+ def key_ids=(value); end
41
35
 
42
- sig { returns(T::Array[String]) }
43
- def missing_scopes; end
36
+ sig { returns(T::Hash[String, String]) }
37
+ def key_context; end
44
38
 
45
- sig { params(value: T::Array[String]).returns(T::Array[String]) }
46
- def missing_scopes=(value); end
39
+ sig { params(value: T::Hash[String, String]).returns(T::Hash[String, String]) }
40
+ def key_context=(value); end
47
41
 
48
42
  sig { returns(T::Hash[Symbol, T.untyped]) }
49
43
  def to_h; end
@@ -18,9 +18,17 @@ class AdminPortalTest < Minitest::Test
18
18
  refute_nil result
19
19
  end
20
20
 
21
+ def test_revoke_link_returns_expected_result
22
+ stub_request(:post, %r{\Ahttps://api\.workos\.com/portal/revoke_link(\?|\z)})
23
+ .to_return(body: "{}", status: 200)
24
+ result = @client.admin_portal.revoke_link(organization: "stub", external_user_id: "stub")
25
+ assert_nil result
26
+ end
27
+
21
28
  # Parameterized authentication error tests (one per endpoint).
22
29
  [
23
- {name: :generate_link, verb: :post, url: %r{\Ahttps://api\.workos\.com/portal/generate_link(\?|\z)}, args: {organization: "stub"}}
30
+ {name: :generate_link, verb: :post, url: %r{\Ahttps://api\.workos\.com/portal/generate_link(\?|\z)}, args: {organization: "stub"}},
31
+ {name: :revoke_link, verb: :post, url: %r{\Ahttps://api\.workos\.com/portal/revoke_link(\?|\z)}, args: {organization: "stub", external_user_id: "stub"}}
24
32
  ].each do |spec|
25
33
  define_method("test_#{spec[:name]}_raises_authentication_error_on_401") do
26
34
  stub_request(spec[:verb], spec[:url])
@@ -10,6 +10,7 @@ class AdminPortalModelRoundTripTest < Minitest::Test
10
10
  "return_url" => "stub",
11
11
  "success_url" => "stub",
12
12
  "organization" => "stub",
13
+ "external_user_id" => "stub",
13
14
  "intent" => "stub",
14
15
  "it_contact_emails" => []
15
16
  }
@@ -20,6 +21,19 @@ class AdminPortalModelRoundTripTest < Minitest::Test
20
21
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
21
22
  end
22
23
 
24
+ def test_revoke_link_round_trip
25
+ fixture = {
26
+ "organization" => "stub",
27
+ "external_user_id" => "stub"
28
+ }
29
+ model = WorkOS::RevokeLink.new(fixture.to_json)
30
+ json = model.to_h
31
+ assert_kind_of Hash, json
32
+ assert_equal fixture["organization"], json[:organization]
33
+ assert_equal fixture["external_user_id"], json[:external_user_id]
34
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
35
+ end
36
+
23
37
  def test_portal_link_response_round_trip
24
38
  fixture = {
25
39
  "link" => "stub"
@@ -81,6 +81,13 @@ class AgentsTest < Minitest::Test
81
81
  refute_nil result
82
82
  end
83
83
 
84
+ def test_revoke_registration_returns_expected_result
85
+ stub_request(:post, %r{\Ahttps://api\.workos\.com/agents/registrations/stub/revoke(\?|\z)})
86
+ .to_return(body: "{}", status: 200)
87
+ result = @client.agents.revoke_registration(id: "stub")
88
+ refute_nil result
89
+ end
90
+
84
91
  def test_list_instances_returns_expected_result
85
92
  stub_request(:get, %r{\Ahttps://api\.workos\.com/agents/instances(\?|\z)})
86
93
  .to_return(body: '{"data": [], "list_metadata": {}}', status: 200)
@@ -135,6 +142,7 @@ class AgentsTest < Minitest::Test
135
142
  {name: :update_attempts, verb: :patch, url: %r{\Ahttps://api\.workos\.com/agents/claims/attempts(\?|\z)}, args: {type: "link_external_user", claim_attempt_token: "stub", user: {}}},
136
143
  {name: :create_validate, verb: :post, url: %r{\Ahttps://api\.workos\.com/agents/credentials/validate(\?|\z)}, args: {type: "stub", credential: "stub"}},
137
144
  {name: :get_registration, verb: :get, url: %r{\Ahttps://api\.workos\.com/agents/registrations/stub(\?|\z)}, args: {id: "stub"}},
145
+ {name: :revoke_registration, verb: :post, url: %r{\Ahttps://api\.workos\.com/agents/registrations/stub/revoke(\?|\z)}, args: {id: "stub"}},
138
146
  {name: :list_instances, verb: :get, url: %r{\Ahttps://api\.workos\.com/agents/instances(\?|\z)}},
139
147
  {name: :get_instance, verb: :get, url: %r{\Ahttps://api\.workos\.com/agents/instances/stub(\?|\z)}, args: {agent_instance_id: "stub"}},
140
148
  {name: :delete_instance, verb: :delete, url: %r{\Ahttps://api\.workos\.com/agents/instances/stub(\?|\z)}, args: {agent_instance_id: "stub"}},
@@ -11,6 +11,7 @@ class AgentsModelRoundTripTest < Minitest::Test
11
11
  "agent_identity" => {},
12
12
  "organization_id" => "stub",
13
13
  "status" => "stub",
14
+ "revoked_at" => nil,
14
15
  "kind" => "stub",
15
16
  "claim" => nil,
16
17
  "created_at" => "stub",
@@ -21,6 +22,7 @@ class AgentsModelRoundTripTest < Minitest::Test
21
22
  assert_kind_of Hash, json
22
23
  assert_equal fixture["id"], json[:id]
23
24
  assert_equal fixture["organization_id"], json[:organization_id]
25
+ assert_nil json[:revoked_at]
24
26
  assert_equal fixture["created_at"], json[:created_at]
25
27
  assert_equal fixture["updated_at"], json[:updated_at]
26
28
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
@@ -64,6 +66,7 @@ class AgentsModelRoundTripTest < Minitest::Test
64
66
  "description" => nil,
65
67
  "permissions" => [],
66
68
  "invocable_by" => {},
69
+ "invocable_as" => {},
67
70
  "session_settings" => {},
68
71
  "created_at" => "stub",
69
72
  "updated_at" => "stub"
@@ -182,6 +185,16 @@ class AgentsModelRoundTripTest < Minitest::Test
182
185
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
183
186
  end
184
187
 
188
+ def test_agent_blueprint_invocable_as_round_trip
189
+ fixture = {
190
+ "instance_types" => []
191
+ }
192
+ model = WorkOS::AgentBlueprintInvocableAs.new(fixture.to_json)
193
+ json = model.to_h
194
+ assert_kind_of Hash, json
195
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
196
+ end
197
+
185
198
  def test_agent_blueprint_session_setting_round_trip
186
199
  fixture = {
187
200
  "max_age_seconds" => 1,
@@ -251,6 +264,7 @@ class AgentsModelRoundTripTest < Minitest::Test
251
264
  "description" => "stub",
252
265
  "permissions" => [],
253
266
  "invocable_by" => {},
267
+ "invocable_as" => {},
254
268
  "session_settings" => {}
255
269
  }
256
270
  model = WorkOS::AgentBlueprintsCreateRequest.new(fixture.to_json)
@@ -271,6 +285,16 @@ class AgentsModelRoundTripTest < Minitest::Test
271
285
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
272
286
  end
273
287
 
288
+ def test_agent_blueprints_create_request_invocable_as_round_trip
289
+ fixture = {
290
+ "instance_types" => []
291
+ }
292
+ model = WorkOS::AgentBlueprintsCreateRequestInvocableAs.new(fixture.to_json)
293
+ json = model.to_h
294
+ assert_kind_of Hash, json
295
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
296
+ end
297
+
274
298
  def test_agent_blueprints_create_request_session_setting_round_trip
275
299
  fixture = {
276
300
  "max_age_seconds" => 1,
@@ -292,6 +316,7 @@ class AgentsModelRoundTripTest < Minitest::Test
292
316
  "description" => nil,
293
317
  "permissions" => [],
294
318
  "invocable_by" => {},
319
+ "invocable_as" => {},
295
320
  "session_settings" => {}
296
321
  }
297
322
  model = WorkOS::AgentBlueprintsUpdateRequest.new(fixture.to_json)
@@ -311,6 +336,16 @@ class AgentsModelRoundTripTest < Minitest::Test
311
336
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
312
337
  end
313
338
 
339
+ def test_agent_blueprints_update_request_invocable_as_round_trip
340
+ fixture = {
341
+ "instance_types" => []
342
+ }
343
+ model = WorkOS::AgentBlueprintsUpdateRequestInvocableAs.new(fixture.to_json)
344
+ json = model.to_h
345
+ assert_kind_of Hash, json
346
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
347
+ end
348
+
314
349
  def test_agent_blueprints_update_request_session_setting_round_trip
315
350
  fixture = {
316
351
  "max_age_seconds" => 1,
@@ -641,7 +641,8 @@ class AuthorizationModelRoundTripTest < Minitest::Test
641
641
  def test_user_role_assignment_source_round_trip
642
642
  fixture = {
643
643
  "type" => "stub",
644
- "group_role_assignment_id" => nil
644
+ "group_role_assignment_id" => nil,
645
+ "group" => nil
645
646
  }
646
647
  model = WorkOS::UserRoleAssignmentSource.new(fixture.to_json)
647
648
  json = model.to_h
@@ -690,4 +691,17 @@ class AuthorizationModelRoundTripTest < Minitest::Test
690
691
  assert_equal fixture["updated_at"], json[:updated_at]
691
692
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
692
693
  end
694
+
695
+ def test_user_role_assignment_source_group_round_trip
696
+ fixture = {
697
+ "id" => "stub",
698
+ "name" => "stub"
699
+ }
700
+ model = WorkOS::UserRoleAssignmentSourceGroup.new(fixture.to_json)
701
+ json = model.to_h
702
+ assert_kind_of Hash, json
703
+ assert_equal fixture["id"], json[:id]
704
+ assert_equal fixture["name"], json[:name]
705
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
706
+ end
693
707
  end
@@ -32,6 +32,13 @@ class DirectorySyncTest < Minitest::Test
32
32
  assert_nil result
33
33
  end
34
34
 
35
+ def test_create_directory_sync_returns_expected_result
36
+ stub_request(:post, %r{\Ahttps://api\.workos\.com/directories/stub/sync(\?|\z)})
37
+ .to_return(body: "{}", status: 200)
38
+ result = @client.directory_sync.create_directory_sync(id: "stub")
39
+ refute_nil result
40
+ end
41
+
35
42
  def test_list_groups_returns_expected_result
36
43
  stub_request(:get, %r{\Ahttps://api\.workos\.com/directory_groups(\?|\z)})
37
44
  .to_return(body: '{"data": [], "list_metadata": {}}', status: 200)
@@ -65,6 +72,7 @@ class DirectorySyncTest < Minitest::Test
65
72
  {name: :list_directories, verb: :get, url: %r{\Ahttps://api\.workos\.com/directories(\?|\z)}},
66
73
  {name: :get_directory, verb: :get, url: %r{\Ahttps://api\.workos\.com/directories/stub(\?|\z)}, args: {id: "stub"}},
67
74
  {name: :delete_directory, verb: :delete, url: %r{\Ahttps://api\.workos\.com/directories/stub(\?|\z)}, args: {id: "stub"}},
75
+ {name: :create_directory_sync, verb: :post, url: %r{\Ahttps://api\.workos\.com/directories/stub/sync(\?|\z)}, args: {id: "stub"}},
68
76
  {name: :list_groups, verb: :get, url: %r{\Ahttps://api\.workos\.com/directory_groups(\?|\z)}},
69
77
  {name: :get_group, verb: :get, url: %r{\Ahttps://api\.workos\.com/directory_groups/stub(\?|\z)}, args: {id: "stub"}},
70
78
  {name: :list_users, verb: :get, url: %r{\Ahttps://api\.workos\.com/directory_users(\?|\z)}},
@@ -31,6 +31,30 @@ class DirectorySyncModelRoundTripTest < Minitest::Test
31
31
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
32
32
  end
33
33
 
34
+ def test_directory_sync_response_round_trip
35
+ fixture = {
36
+ "status" => "queued"
37
+ }
38
+ model = WorkOS::DirectorySyncResponse.new(fixture.to_json)
39
+ json = model.to_h
40
+ assert_kind_of Hash, json
41
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
42
+ end
43
+
44
+ def test_directory_sync_rate_limit_error_round_trip
45
+ fixture = {
46
+ "code" => "directory_sync_rate_limited",
47
+ "message" => "stub",
48
+ "retry_after_seconds" => 1
49
+ }
50
+ model = WorkOS::DirectorySyncRateLimitError.new(fixture.to_json)
51
+ json = model.to_h
52
+ assert_kind_of Hash, json
53
+ assert_equal fixture["message"], json[:message]
54
+ assert_equal fixture["retry_after_seconds"], json[:retry_after_seconds]
55
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
56
+ end
57
+
34
58
  def test_directory_group_round_trip
35
59
  fixture = {
36
60
  "object" => "directory_group",
@@ -483,6 +483,7 @@ class FeatureFlagsModelRoundTripTest < Minitest::Test
483
483
  "name" => "stub",
484
484
  "description" => nil,
485
485
  "tags" => [],
486
+ "owner" => nil,
486
487
  "enabled" => true,
487
488
  "default_value" => true
488
489
  }
@@ -492,6 +493,21 @@ class FeatureFlagsModelRoundTripTest < Minitest::Test
492
493
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
493
494
  end
494
495
 
496
+ def test_flag_updated_context_previous_attribute_data_owner_round_trip
497
+ fixture = {
498
+ "email" => "stub",
499
+ "first_name" => nil,
500
+ "last_name" => nil
501
+ }
502
+ model = WorkOS::FlagUpdatedContextPreviousAttributeDataOwner.new(fixture.to_json)
503
+ json = model.to_h
504
+ assert_kind_of Hash, json
505
+ assert_equal fixture["email"], json[:email]
506
+ assert_nil json[:first_name]
507
+ assert_nil json[:last_name]
508
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
509
+ end
510
+
495
511
  def test_flag_round_trip
496
512
  fixture = {
497
513
  "object" => "feature_flag",
@@ -46,6 +46,13 @@ class PipesTest < Minitest::Test
46
46
  assert_nil result
47
47
  end
48
48
 
49
+ def test_create_data_integration_api_key_returns_expected_result
50
+ stub_request(:post, %r{\Ahttps://api\.workos\.com/data-integrations/stub/api-key(\?|\z)})
51
+ .to_return(body: "{}", status: 200)
52
+ result = @client.pipes.create_data_integration_api_key(slug: "stub", user_id: "stub", secret: "stub", connection_intent: "add")
53
+ refute_nil result
54
+ end
55
+
49
56
  def test_update_data_integration_api_key_returns_expected_result
50
57
  stub_request(:put, %r{\Ahttps://api\.workos\.com/data-integrations/stub/api-key(\?|\z)})
51
58
  .to_return(body: "{}", status: 200)
@@ -60,6 +67,13 @@ class PipesTest < Minitest::Test
60
67
  refute_nil result
61
68
  end
62
69
 
70
+ def test_create_data_integration_client_credential_returns_expected_result
71
+ stub_request(:post, %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)})
72
+ .to_return(body: "{}", status: 200)
73
+ result = @client.pipes.create_data_integration_client_credential(slug: "stub", user_id: "stub", client_id: "stub", client_secret: "stub", connection_intent: "add")
74
+ refute_nil result
75
+ end
76
+
63
77
  def test_update_data_integration_client_credentials_returns_expected_result
64
78
  stub_request(:put, %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)})
65
79
  .to_return(body: "{}", status: 200)
@@ -74,6 +88,27 @@ class PipesTest < Minitest::Test
74
88
  refute_nil result
75
89
  end
76
90
 
91
+ def test_list_data_integration_organization_returns_expected_result
92
+ stub_request(:get, %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)})
93
+ .to_return(body: "{}", status: 200)
94
+ result = @client.pipes.list_data_integration_organization(slug: "stub")
95
+ refute_nil result
96
+ end
97
+
98
+ def test_update_data_integration_organization_returns_expected_result
99
+ stub_request(:put, %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)})
100
+ .to_return(body: "{}", status: 200)
101
+ result = @client.pipes.update_data_integration_organization(slug: "stub")
102
+ refute_nil result
103
+ end
104
+
105
+ def test_delete_data_integration_organization_returns_expected_result
106
+ stub_request(:delete, %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)})
107
+ .to_return(body: "{}", status: 200)
108
+ result = @client.pipes.delete_data_integration_organization(slug: "stub")
109
+ assert_nil result
110
+ end
111
+
77
112
  def test_get_access_token_returns_expected_result
78
113
  stub_request(:post, %r{\Ahttps://api\.workos\.com/data-integrations/stub/token(\?|\z)})
79
114
  .to_return(body: "{}", status: 200)
@@ -81,6 +116,41 @@ class PipesTest < Minitest::Test
81
116
  refute_nil result
82
117
  end
83
118
 
119
+ def test_get_organization_connected_account_returns_expected_result
120
+ stub_request(:get, %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)})
121
+ .to_return(body: "{}", status: 200)
122
+ result = @client.pipes.get_organization_connected_account(organization_id: "stub", slug: "stub")
123
+ refute_nil result
124
+ end
125
+
126
+ def test_create_organization_connected_account_returns_expected_result
127
+ stub_request(:post, %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)})
128
+ .to_return(body: "{}", status: 200)
129
+ result = @client.pipes.create_organization_connected_account(organization_id: "stub", slug: "stub", user_id: "stub")
130
+ refute_nil result
131
+ end
132
+
133
+ def test_update_organization_connected_account_returns_expected_result
134
+ stub_request(:put, %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)})
135
+ .to_return(body: "{}", status: 200)
136
+ result = @client.pipes.update_organization_connected_account(organization_id: "stub", slug: "stub", user_id: "stub")
137
+ refute_nil result
138
+ end
139
+
140
+ def test_delete_organization_connected_account_returns_expected_result
141
+ stub_request(:delete, %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)})
142
+ .to_return(body: "{}", status: 200)
143
+ result = @client.pipes.delete_organization_connected_account(organization_id: "stub", slug: "stub")
144
+ assert_nil result
145
+ end
146
+
147
+ def test_list_organization_data_providers_returns_expected_result
148
+ stub_request(:get, %r{\Ahttps://api\.workos\.com/organizations/stub/data_providers(\?|\z)})
149
+ .to_return(body: "{}", status: 200)
150
+ result = @client.pipes.list_organization_data_providers(organization_id: "stub")
151
+ refute_nil result
152
+ end
153
+
84
154
  def test_get_user_connected_account_returns_expected_result
85
155
  stub_request(:get, %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)})
86
156
  .to_return(body: "{}", status: 200)
@@ -123,11 +193,21 @@ class PipesTest < Minitest::Test
123
193
  {name: :get_data_integration, verb: :get, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub(\?|\z)}, args: {slug: "stub"}},
124
194
  {name: :update_data_integration, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub(\?|\z)}, args: {slug: "stub"}},
125
195
  {name: :delete_data_integration, verb: :delete, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub(\?|\z)}, args: {slug: "stub"}},
196
+ {name: :create_data_integration_api_key, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/api-key(\?|\z)}, args: {slug: "stub", user_id: "stub", secret: "stub", connection_intent: "add"}},
126
197
  {name: :update_data_integration_api_key, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/api-key(\?|\z)}, args: {slug: "stub", user_id: "stub", secret: "stub"}},
127
198
  {name: :authorize_data_integration, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/authorize(\?|\z)}, args: {slug: "stub", user_id: "stub"}},
199
+ {name: :create_data_integration_client_credential, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)}, args: {slug: "stub", user_id: "stub", client_id: "stub", client_secret: "stub", connection_intent: "add"}},
128
200
  {name: :update_data_integration_client_credentials, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)}, args: {slug: "stub", user_id: "stub", client_id: "stub", client_secret: "stub"}},
129
201
  {name: :create_data_integration_credential, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/credentials(\?|\z)}, args: {slug: "stub", user_id: "stub"}},
202
+ {name: :list_data_integration_organization, verb: :get, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)}, args: {slug: "stub"}},
203
+ {name: :update_data_integration_organization, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)}, args: {slug: "stub"}},
204
+ {name: :delete_data_integration_organization, verb: :delete, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)}, args: {slug: "stub"}},
130
205
  {name: :get_access_token, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/token(\?|\z)}, args: {provider: "stub", user_id: "stub"}},
206
+ {name: :get_organization_connected_account, verb: :get, url: %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}, args: {organization_id: "stub", slug: "stub"}},
207
+ {name: :create_organization_connected_account, verb: :post, url: %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}, args: {organization_id: "stub", slug: "stub", user_id: "stub"}},
208
+ {name: :update_organization_connected_account, verb: :put, url: %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}, args: {organization_id: "stub", slug: "stub", user_id: "stub"}},
209
+ {name: :delete_organization_connected_account, verb: :delete, url: %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}, args: {organization_id: "stub", slug: "stub"}},
210
+ {name: :list_organization_data_providers, verb: :get, url: %r{\Ahttps://api\.workos\.com/organizations/stub/data_providers(\?|\z)}, args: {organization_id: "stub"}},
131
211
  {name: :get_user_connected_account, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)}, args: {user_id: "stub", slug: "stub"}},
132
212
  {name: :create_user_connected_account, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)}, args: {user_id: "stub", slug: "stub"}},
133
213
  {name: :update_user_connected_account, verb: :put, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)}, args: {user_id: "stub", slug: "stub"}},