workos 10.1.0 → 10.2.1

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 (59) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/block-generated-edits.yml +1 -1
  3. data/.github/workflows/ci.yml +2 -2
  4. data/.github/workflows/docs.yml +2 -2
  5. data/.github/workflows/lint.yml +2 -2
  6. data/.github/workflows/release-please.yml +3 -3
  7. data/.github/workflows/release.yml +2 -2
  8. data/.last-synced-sha +1 -1
  9. data/.oagen-manifest.json +12 -0
  10. data/.release-please-manifest.json +1 -1
  11. data/CHANGELOG.md +63 -0
  12. data/Gemfile.lock +2 -2
  13. data/lib/workos/base_client.rb +14 -1
  14. data/lib/workos/connect.rb +2 -2
  15. data/lib/workos/events.rb +2 -2
  16. data/lib/workos/groups.rb +6 -2
  17. data/lib/workos/pipes/connected_account.rb +9 -0
  18. data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +9 -0
  19. data/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +31 -0
  20. data/lib/workos/pipes.rb +39 -2
  21. data/lib/workos/shared/agent_registration_refreshed.rb +34 -0
  22. data/lib/workos/shared/agent_registration_refreshed_data.rb +7 -0
  23. data/lib/workos/shared/waitlist_user.rb +3 -0
  24. data/lib/workos/types/authenticate_response_authentication_method.rb +3 -1
  25. data/lib/workos/types/connection_activated_data_connection_type.rb +3 -1
  26. data/lib/workos/types/connection_type.rb +3 -1
  27. data/lib/workos/types/connections_connection_type.rb +3 -1
  28. data/lib/workos/types/create_data_integration_auth_methods.rb +1 -5
  29. data/lib/workos/types/create_user_password_salt_position.rb +13 -0
  30. data/lib/workos/types/create_webhook_endpoint_events.rb +2 -1
  31. data/lib/workos/types/update_user_password_salt_position.rb +9 -0
  32. data/lib/workos/types/user_identities_get_item_provider.rb +3 -1
  33. data/lib/workos/user_management/create_user.rb +5 -2
  34. data/lib/workos/user_management/update_user.rb +5 -2
  35. data/lib/workos/user_management.rb +15 -7
  36. data/lib/workos/version.rb +1 -1
  37. data/rbi/workos/agent_registration_refreshed.rbi +54 -0
  38. data/rbi/workos/agent_registration_refreshed_data.rbi +24 -0
  39. data/rbi/workos/connected_account.rbi +18 -0
  40. data/rbi/workos/create_user.rbi +6 -0
  41. data/rbi/workos/custom_provider_definition.rbi +4 -4
  42. data/rbi/workos/data_integration.rbi +2 -2
  43. data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +18 -0
  44. data/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +48 -0
  45. data/rbi/workos/events.rbi +2 -2
  46. data/rbi/workos/groups.rbi +2 -1
  47. data/rbi/workos/pipes.rbi +13 -0
  48. data/rbi/workos/radar_sms_challenge_code_session_authenticate_request.rbi +4 -4
  49. data/rbi/workos/update_user.rbi +6 -0
  50. data/rbi/workos/user_management.rbi +6 -2
  51. data/rbi/workos/waitlist_user.rbi +6 -0
  52. data/test/workos/test_base_client.rb +155 -0
  53. data/test/workos/test_events.rb +2 -2
  54. data/test/workos/test_pipes.rb +8 -0
  55. data/test/workos/test_pipes_model_round_trip.rb +24 -3
  56. data/test/workos/test_shared_model_round_trip.rb +91 -0
  57. data/test/workos/test_user_management.rb +6 -6
  58. data/test/workos/test_user_management_model_round_trip.rb +4 -4
  59. metadata +9 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ed7a1c92c327c1fe2a2f2a582be522670e33f085ca6b7b44f8cb3c968e231bf
4
- data.tar.gz: d78826116d38974783cb835dd51890b7aa98dbb2fab67a4a9bc00b8e691c3f0b
3
+ metadata.gz: b7aff393f8f0d21fe3ff062ac8a0f835ad3d2f43bcfc300d55ec9f5a19688774
4
+ data.tar.gz: b94cd0e24ce40d7e61bc0c9d3578f14b1c627a4ebf935fdbad7d295584c75dec
5
5
  SHA512:
6
- metadata.gz: fa5d2429aa5a63556852efadafb0c01cd2d9d26500513cbe520d4501fb8ade808423a7245f302726d295c24b4a9f7714c280a955964b5bf401bdc2d17be18b9e
7
- data.tar.gz: 061b36f82c50b4a2e5c0f8ba94777f1dac191ceddc3206683d472f28775979a10161bd926cf902c618cfddb22bce50f5706bee986a7088dc7678af2dcfe6a59e
6
+ metadata.gz: 235bb3273c2b574dad6cd967b69d5b832cc0bbfbcb7f8389e0eb53e909f915a6698047f68abf7e6826196e7e62a94a43c73686207236439a44c608198be374eb
7
+ data.tar.gz: bdb237a96780cac60c5bbe0ab7f0bc41bea1d31f38928111ef7a470f3d0e21d7b15e35b6190b7f0588f63dd707d442846293630260c3cd29b8ccf2d9dee7dac6
@@ -8,6 +8,6 @@ on:
8
8
 
9
9
  jobs:
10
10
  block-generated-edits:
11
- uses: workos/actions/.github/workflows/block-generated-edits.yml@main
11
+ uses: workos/actions/.github/workflows/block-generated-edits.yml@5c7450a04f5a182b346eae2d833b869e337b12bb # main
12
12
  secrets:
13
13
  SDK_BOT_PRIVATE_KEY: ${{ secrets.SDK_BOT_PRIVATE_KEY }}
@@ -21,8 +21,8 @@ jobs:
21
21
  - '3.4'
22
22
  - '4.0'
23
23
  steps:
24
- - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # 6.0.3
25
- - uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # 1.316.0
24
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # 6.1.0
25
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # 1.321.0
26
26
  with:
27
27
  ruby-version: ${{ matrix.ruby }}
28
28
  bundler-cache: true
@@ -14,8 +14,8 @@ jobs:
14
14
  permissions:
15
15
  contents: read
16
16
  steps:
17
- - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # 6.0.3
18
- - uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # 1.316.0
17
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # 6.1.0
18
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # 1.321.0
19
19
  with:
20
20
  bundler-cache: true
21
21
  - run: ./script/docs
@@ -15,8 +15,8 @@ jobs:
15
15
  name: Lint
16
16
  runs-on: ubuntu-latest
17
17
  steps:
18
- - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # 6.0.3
19
- - uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # 1.316.0
18
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # 6.1.0
19
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # 1.321.0
20
20
  with:
21
21
  bundler-cache: true
22
22
 
@@ -61,7 +61,7 @@ jobs:
61
61
  permission-pull-requests: write
62
62
 
63
63
  - name: Checkout release PR branch
64
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # 6.0.3
64
+ uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # 6.1.0
65
65
  with:
66
66
  ref: ${{ fromJSON(needs.release-please.outputs.pr).headBranchName }}
67
67
  token: ${{ steps.generate-token.outputs.token }}
@@ -155,7 +155,7 @@ jobs:
155
155
  git push
156
156
 
157
157
  - name: Set up Ruby
158
- uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # 1.316.0
158
+ uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # 1.321.0
159
159
  with:
160
160
  ruby-version: ruby
161
161
 
@@ -190,7 +190,7 @@ jobs:
190
190
  permission-contents: write
191
191
  permission-pull-requests: write
192
192
 
193
- - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # 6.0.3
193
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # 6.1.0
194
194
  with:
195
195
  token: ${{ steps.generate-token.outputs.token }}
196
196
 
@@ -22,10 +22,10 @@ jobs:
22
22
  role-to-assume: rg_oidc_akr_fn8dx45asckvmsnd2kka
23
23
 
24
24
  - name: Checkout
25
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # 6.0.3
25
+ uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # 6.1.0
26
26
 
27
27
  - name: Setup Ruby
28
- uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # 1.316.0
28
+ uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # 1.321.0
29
29
  with:
30
30
  bundler-cache: true
31
31
 
data/.last-synced-sha CHANGED
@@ -1 +1 @@
1
- ae3ebbb08d9b4bf9b2391558e820b7eb6f511fb9
1
+ a07d8e7988d035c2d727787f18f64d71b4b89a84
data/.oagen-manifest.json CHANGED
@@ -279,6 +279,7 @@
279
279
  "lib/workos/pipes/data_integrations_list_response_data.rb",
280
280
  "lib/workos/pipes/data_integrations_list_response_data_connected_account.rb",
281
281
  "lib/workos/pipes/data_integrations_upsert_api_key_request.rb",
282
+ "lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb",
282
283
  "lib/workos/pipes/data_integrations_vend_credentials_request.rb",
283
284
  "lib/workos/pipes/update_custom_provider_definition.rb",
284
285
  "lib/workos/pipes/update_data_integration.rb",
@@ -312,6 +313,8 @@
312
313
  "lib/workos/shared/agent_registration_expired_data.rb",
313
314
  "lib/workos/shared/agent_registration_organization_switched.rb",
314
315
  "lib/workos/shared/agent_registration_organization_switched_data.rb",
316
+ "lib/workos/shared/agent_registration_refreshed.rb",
317
+ "lib/workos/shared/agent_registration_refreshed_data.rb",
315
318
  "lib/workos/shared/agent_registration_revoked.rb",
316
319
  "lib/workos/shared/agent_registration_revoked_data.rb",
317
320
  "lib/workos/shared/auth_method_mismatch_error.rb",
@@ -405,6 +408,7 @@
405
408
  "lib/workos/types/create_data_integration_auth_methods.rb",
406
409
  "lib/workos/types/create_user_invite_options_locale.rb",
407
410
  "lib/workos/types/create_user_password_hash_type.rb",
411
+ "lib/workos/types/create_user_password_salt_position.rb",
408
412
  "lib/workos/types/create_webhook_endpoint_events.rb",
409
413
  "lib/workos/types/custom_provider_definition_authenticate_via.rb",
410
414
  "lib/workos/types/data_integration_access_token_response_error.rb",
@@ -484,6 +488,7 @@
484
488
  "lib/workos/types/sso_provider.rb",
485
489
  "lib/workos/types/update_custom_provider_definition_authenticate_via.rb",
486
490
  "lib/workos/types/update_user_password_hash_type.rb",
491
+ "lib/workos/types/update_user_password_salt_position.rb",
487
492
  "lib/workos/types/update_webhook_endpoint_events.rb",
488
493
  "lib/workos/types/update_webhook_endpoint_status.rb",
489
494
  "lib/workos/types/user_identities_get_item_provider.rb",
@@ -732,6 +737,8 @@
732
737
  "rbi/workos/agent_registration_expired_data.rbi",
733
738
  "rbi/workos/agent_registration_organization_switched.rbi",
734
739
  "rbi/workos/agent_registration_organization_switched_data.rbi",
740
+ "rbi/workos/agent_registration_refreshed.rbi",
741
+ "rbi/workos/agent_registration_refreshed_data.rbi",
735
742
  "rbi/workos/agent_registration_revoked.rbi",
736
743
  "rbi/workos/agent_registration_revoked_data.rbi",
737
744
  "rbi/workos/agents.rbi",
@@ -921,6 +928,7 @@
921
928
  "rbi/workos/data_integrations_list_response_data.rbi",
922
929
  "rbi/workos/data_integrations_list_response_data_connected_account.rbi",
923
930
  "rbi/workos/data_integrations_upsert_api_key_request.rbi",
931
+ "rbi/workos/data_integrations_upsert_client_credentials_request.rbi",
924
932
  "rbi/workos/data_integrations_vend_credentials_request.rbi",
925
933
  "rbi/workos/decrypt_request.rbi",
926
934
  "rbi/workos/decrypt_response.rbi",
@@ -2186,6 +2194,10 @@
2186
2194
  "GET /audit_logs/exports/{auditLogExportId}": {
2187
2195
  "sdkMethod": "get_export",
2188
2196
  "service": "audit_logs"
2197
+ },
2198
+ "PUT /data-integrations/{slug}/client-credentials": {
2199
+ "sdkMethod": "update_data_integration_client_credentials",
2200
+ "service": "pipes"
2189
2201
  }
2190
2202
  }
2191
2203
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "10.1.0"
2
+ ".": "10.2.1"
3
3
  }
data/CHANGELOG.md CHANGED
@@ -1,5 +1,68 @@
1
1
  # Changelog
2
2
 
3
+ ## [10.2.1](https://github.com/workos/workos-ruby/compare/v10.2.0...v10.2.1) (2026-08-20)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * explicitly evict connections if request does not complete as success ([e792414](https://github.com/workos/workos-ruby/commit/e79241473e9cb0e8898632723200a7e23682ff24))
9
+
10
+ ## [10.2.0](https://github.com/workos/workos-ruby/compare/v10.1.0...v10.2.0) (2026-08-11)
11
+
12
+ * [#533](https://github.com/workos/workos-ruby/pull/533) feat(generated)!: regenerate from spec (2 changes)
13
+
14
+ **⚠️ Breaking**
15
+ * **[events](https://workos.com/docs/reference/events)**:
16
+ * Changed required status for parameter `Events.list.events`
17
+
18
+ **Features**
19
+ * **[groups](https://workos.com/docs/reference/groups)**:
20
+ * Added parameter `Groups.list.search`
21
+ * **[connect](https://workos.com/docs/reference/workos-connect/standalone)**:
22
+ * Added `client_id` to `ConnectedAccount`
23
+ * Added `client_secret_last_4` to `ConnectedAccount`
24
+ * Added `config` to `ConnectedAccount`
25
+ * **[pipes](https://workos.com/docs/reference/pipes)**:
26
+ * Added `client_id` to `DataIntegrationsListResponseDataConnectedAccount`
27
+ * Added `client_secret_last_4` to `DataIntegrationsListResponseDataConnectedAccount`
28
+ * Added `config` to `DataIntegrationsListResponseDataConnectedAccount`
29
+ * Changed errors for endpoint `POST /data-integrations/{slug}/credentials`
30
+ * Made `CustomProviderDefinition.authorization_url` optional
31
+ * Made `CustomProviderDefinition.token_url` optional
32
+ * Added model `DataIntegrationsUpsertClientCredentialsRequest`
33
+ * Added `client_credentials` to `CreateDataIntegrationAuthMethods`
34
+ * Added endpoint `PUT /data-integrations/{slug}/client-credentials`
35
+ * **[sso](https://workos.com/docs/reference/sso)**:
36
+ * Added `XOAuth` to `ConnectionType`
37
+ * Added `XOAuth` to `ProfileConnectionType`
38
+ * Added `XOAuth` to `ConnectionsConnectionType`
39
+ * Added `GrokOAuth` to `ConnectionType`
40
+ * Added `GrokOAuth` to `ProfileConnectionType`
41
+ * Added `GrokOAuth` to `ConnectionsConnectionType`
42
+ * **[user_management](https://workos.com/docs/reference/authkit/user)**:
43
+ * Changed errors for endpoint `DELETE /user_management/users/{id}`
44
+ * Added `password_salt_position` to `CreateUser`
45
+ * Added `password_salt_position` to `UpdateUser`
46
+ * Made `RadarSmsChallengeCodeSessionAuthenticateRequest.verification_id` optional
47
+ * Made `RadarSmsChallengeCodeSessionAuthenticateRequest.phone_number` optional
48
+ * Added enum `CreateUserPasswordSaltPosition`
49
+ * Added enum `UpdateUserPasswordSaltPosition`
50
+ * Added `XOAuth` to `AuthenticateResponseAuthenticationMethod`
51
+ * Added `XOAuth` to `UserIdentitiesGetItemProvider`
52
+ * Added `GrokOAuth` to `AuthenticateResponseAuthenticationMethod`
53
+ * Added `GrokOAuth` to `UserIdentitiesGetItemProvider`
54
+ * **[webhooks](https://workos.com/docs/reference/webhooks)**:
55
+ * Added `agent.registration.refreshed` to `CreateWebhookEndpointEvents`
56
+ * Added `agent.registration.refreshed` to `UpdateWebhookEndpointEvents`
57
+
58
+ **Fixes**
59
+ * **[pipes](https://workos.com/docs/reference/pipes)**:
60
+ * Changed the type of `DataIntegration.credentials`
61
+ * **[user_management](https://workos.com/docs/reference/authkit/user)**:
62
+ * Changed errors for endpoint `POST /user_management/authenticate`
63
+ * Changed errors for endpoint `POST /user_management/users`
64
+ * Changed errors for endpoint `PUT /user_management/users/{id}`
65
+
3
66
  ## [10.1.0](https://github.com/workos/workos-ruby/compare/v10.0.0...v10.1.0) (2026-07-28)
4
67
 
5
68
  ### Features
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- workos (10.1.0)
4
+ workos (10.2.1)
5
5
  jwt (~> 3.1)
6
6
  logger (~> 1.7)
7
7
  zeitwerk (~> 2.6)
@@ -153,7 +153,7 @@ CHECKSUMS
153
153
  unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
154
154
  webmock (3.26.2) sha256=774556f2ea6371846cca68c01769b2eac0d134492d21f6d0ab5dd643965a4c90
155
155
  webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131
156
- workos (10.1.0)
156
+ workos (10.2.1)
157
157
  yard (0.9.44) sha256=eb087e9b631ccd887b049f303d489963945452d5e2a7eb49a5a74a7cf6887f28
158
158
  yard-markdown (0.7.1) sha256=06c378632dfe7ba053be9ba469eb4701aa0470e36bcf7e5546f353eb90c1bfd1
159
159
  zeitwerk (2.7.5) sha256=d8da92128c09ea6ec62c949011b00ed4a20242b255293dd66bf41545398f73dd
@@ -137,7 +137,20 @@ module WorkOS
137
137
  loggable_path = redact_path(request.path)
138
138
  log(:debug, "request start", method: request.method, path: loggable_path, attempt: attempt + 1)
139
139
  http = connection_for(base, timeout)
140
- response = http.request(request)
140
+ request_completed = false
141
+ begin
142
+ response = http.request(request)
143
+ request_completed = true
144
+ ensure
145
+ # Any exit from #request other than a returned response can leave
146
+ # the socket mid-stream: a connection error the rescue below knows
147
+ # about, one it doesn't (OpenSSL::SSL::SSLError,
148
+ # Net::HTTPBadResponse), or a non-local exit such as an
149
+ # application-level Timeout.timeout or Thread#kill. A half-read
150
+ # socket handed back to the pool desyncs the *next* request on this
151
+ # thread, so drop it here rather than in the rescue.
152
+ evict_connection(base) unless request_completed
153
+ end
141
154
  return response if response.is_a?(Net::HTTPSuccess)
142
155
 
143
156
  if attempt < retries && retryable?(response)
@@ -135,7 +135,7 @@ module WorkOS
135
135
  result
136
136
  end
137
137
 
138
- # Create oauth application.
138
+ # Create OAuth application.
139
139
  # @param name [String]
140
140
  # @param is_first_party [Boolean]
141
141
  # @param description [String, nil]
@@ -175,7 +175,7 @@ module WorkOS
175
175
  WorkOS::ConnectApplication.new(response.body)
176
176
  end
177
177
 
178
- # Create m2m application.
178
+ # Create M2M application.
179
179
  # @param name [String]
180
180
  # @param organization_id [String]
181
181
  # @param description [String, nil]
data/lib/workos/events.rb CHANGED
@@ -15,18 +15,18 @@ module WorkOS
15
15
  # @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
16
16
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
17
17
  # @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
18
- # @param events [Array<String>, nil] Filter events by one or more event types (e.g. `dsync.user.created`).
18
+ # @param events [Array<String>] Filter events by one or more event types (e.g. `dsync.user.created`).
19
19
  # @param range_start [String, nil] ISO-8601 date string to filter events created after this date.
20
20
  # @param range_end [String, nil] ISO-8601 date string to filter events created before this date.
21
21
  # @param organization_id [String, nil] Filter events by the [Organization](https://workos.com/docs/reference/organization) that the event is associated with.
22
22
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
23
23
  # @return [WorkOS::Types::ListStruct<WorkOS::EventSchema>]
24
24
  def list_events(
25
+ events:,
25
26
  before: nil,
26
27
  after: nil,
27
28
  limit: 10,
28
29
  order: "desc",
29
- events: nil,
30
30
  range_start: nil,
31
31
  range_end: nil,
32
32
  organization_id: nil,
data/lib/workos/groups.rb CHANGED
@@ -16,6 +16,7 @@ module WorkOS
16
16
  # @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
17
17
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
18
18
  # @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
19
+ # @param search [String, nil] Search groups by name or by group ID.
19
20
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
20
21
  # @return [WorkOS::Types::ListStruct<WorkOS::Group>]
21
22
  def list_organization_groups(
@@ -24,13 +25,15 @@ module WorkOS
24
25
  after: nil,
25
26
  limit: 10,
26
27
  order: "desc",
28
+ search: nil,
27
29
  request_options: {}
28
30
  )
29
31
  params = {
30
32
  "before" => before,
31
33
  "after" => after,
32
34
  "limit" => limit,
33
- "order" => order
35
+ "order" => order,
36
+ "search" => search
34
37
  }.compact
35
38
  response = @client.request(
36
39
  method: :get,
@@ -46,13 +49,14 @@ module WorkOS
46
49
  after: cursor,
47
50
  limit: limit,
48
51
  order: order,
52
+ search: search,
49
53
  request_options: request_options
50
54
  )
51
55
  }
52
56
  WorkOS::Types::ListStruct.from_response(
53
57
  response,
54
58
  model: WorkOS::Group,
55
- filters: {organization_id: organization_id, before: before, limit: limit, order: order},
59
+ filters: {organization_id: organization_id, before: before, limit: limit, order: order, search: search},
56
60
  fetch_next: fetch_next
57
61
  )
58
62
  end
@@ -12,6 +12,9 @@ module WorkOS
12
12
  scopes: :scopes,
13
13
  auth_method: :auth_method,
14
14
  api_key_last_4: :api_key_last_4,
15
+ client_id: :client_id,
16
+ client_secret_last_4: :client_secret_last_4,
17
+ config: :config,
15
18
  state: :state,
16
19
  created_at: :created_at,
17
20
  updated_at: :updated_at
@@ -25,6 +28,9 @@ module WorkOS
25
28
  :scopes,
26
29
  :auth_method,
27
30
  :api_key_last_4,
31
+ :client_id,
32
+ :client_secret_last_4,
33
+ :config,
28
34
  :state,
29
35
  :created_at,
30
36
  :updated_at
@@ -38,6 +44,9 @@ module WorkOS
38
44
  @scopes = hash[:scopes] || []
39
45
  @auth_method = hash[:auth_method]
40
46
  @api_key_last_4 = hash[:api_key_last_4]
47
+ @client_id = hash[:client_id]
48
+ @client_secret_last_4 = hash[:client_secret_last_4]
49
+ @config = hash[:config] || {}
41
50
  @state = hash[:state]
42
51
  @created_at = hash[:created_at]
43
52
  @updated_at = hash[:updated_at]
@@ -12,6 +12,9 @@ module WorkOS
12
12
  scopes: :scopes,
13
13
  auth_method: :auth_method,
14
14
  api_key_last_4: :api_key_last_4,
15
+ client_id: :client_id,
16
+ client_secret_last_4: :client_secret_last_4,
17
+ config: :config,
15
18
  state: :state,
16
19
  created_at: :created_at,
17
20
  updated_at: :updated_at,
@@ -29,6 +32,9 @@ module WorkOS
29
32
  :scopes,
30
33
  :auth_method,
31
34
  :api_key_last_4,
35
+ :client_id,
36
+ :client_secret_last_4,
37
+ :config,
32
38
  :state,
33
39
  :created_at,
34
40
  :updated_at
@@ -49,6 +55,9 @@ module WorkOS
49
55
  @scopes = hash[:scopes] || []
50
56
  @auth_method = hash[:auth_method]
51
57
  @api_key_last_4 = hash[:api_key_last_4]
58
+ @client_id = hash[:client_id]
59
+ @client_secret_last_4 = hash[:client_secret_last_4]
60
+ @config = hash[:config] || {}
52
61
  @state = hash[:state]
53
62
  @created_at = hash[:created_at]
54
63
  @updated_at = hash[:updated_at]
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class DataIntegrationsUpsertClientCredentialsRequest < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ user_id: :user_id,
9
+ organization_id: :organization_id,
10
+ client_id: :client_id,
11
+ client_secret: :client_secret,
12
+ config: :config
13
+ }.freeze
14
+
15
+ attr_accessor \
16
+ :user_id,
17
+ :organization_id,
18
+ :client_id,
19
+ :client_secret,
20
+ :config
21
+
22
+ def initialize(json)
23
+ hash = self.class.normalize(json)
24
+ @user_id = hash[:user_id]
25
+ @organization_id = hash[:organization_id]
26
+ @client_id = hash[:client_id]
27
+ @client_secret = hash[:client_secret]
28
+ @config = hash[:config] || {}
29
+ end
30
+ end
31
+ end
data/lib/workos/pipes.rb CHANGED
@@ -59,8 +59,8 @@ module WorkOS
59
59
  # @param description [String, nil] An optional description of the Data Integration.
60
60
  # @param enabled [Boolean, nil] Whether the Data Integration is enabled. Defaults to `false`.
61
61
  # @param scopes [Array<String>, nil] The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
62
- # @param auth_methods [Array<WorkOS::Types::CreateDataIntegrationAuthMethods>, nil] How accounts authenticate with the provider. Defaults to `["oauth"]`. Use `["api_key"]` to declare an API key integration; `credentials` is then not required and keys are supplied per-tenant (optionally via `api_key` on this request).
63
- # @param config [Hash{String => String}, nil] Provider-specific config values (e.g. a Snowflake `account_identifier`), keyed by the config field. Only fields the built-in provider declares are accepted.
62
+ # @param auth_methods [Array<WorkOS::Types::CreateDataIntegrationAuthMethods>, nil] How accounts authenticate with the provider. Defaults to `["oauth"]`. Use `["api_key"]` to declare an API key integration; `credentials` is then not required and keys are supplied per-tenant (optionally via `api_key` on this request). Use `["client_credentials"]` to declare a client-credentials integration; `credentials` is likewise not required and client credentials are supplied per-tenant.
63
+ # @param config [Hash{String => String}, nil] Provider-specific config values (e.g. a Snowflake `account`), keyed by the config field. Only fields the built-in provider declares are accepted.
64
64
  # @param credentials [WorkOS::DataIntegrationCredentialsInput, nil] The OAuth credentials to configure for the Data Integration. Required for OAuth integrations; omit when `auth_methods` is `["api_key"]`.
65
65
  # @param api_key [WorkOS::ApiKeyInstallation, nil] An optional API key to install for the first tenant on an `api_key` integration. Omit to declare a keyless integration; tenants can be added later via the per-installation API key path.
66
66
  # @param custom_provider [WorkOS::CustomProviderDefinition, nil] The OAuth definition for a custom provider. Supply this to define a custom provider; omit it to create an integration for a built-in provider.
@@ -242,6 +242,43 @@ module WorkOS
242
242
  result
243
243
  end
244
244
 
245
+ # Upsert client credentials for a connected account
246
+ # @param slug [String] The identifier of the integration.
247
+ # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier.
248
+ # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
249
+ # @param client_id [String] The OAuth client ID to store for this integration.
250
+ # @param client_secret [String] The OAuth client secret to store for this integration.
251
+ # @param config [Hash{String => String}, nil] Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
252
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
253
+ # @return [WorkOS::ConnectedAccount]
254
+ def update_data_integration_client_credentials(
255
+ slug:,
256
+ user_id:,
257
+ client_id:,
258
+ client_secret:,
259
+ organization_id: nil,
260
+ config: nil,
261
+ request_options: {}
262
+ )
263
+ body = {
264
+ "user_id" => user_id,
265
+ "organization_id" => organization_id,
266
+ "client_id" => client_id,
267
+ "client_secret" => client_secret,
268
+ "config" => config
269
+ }.compact
270
+ response = @client.request(
271
+ method: :put,
272
+ path: "/data-integrations/#{WorkOS::Util.encode_path(slug)}/client-credentials",
273
+ auth: true,
274
+ body: body,
275
+ request_options: request_options
276
+ )
277
+ result = WorkOS::ConnectedAccount.new(response.body)
278
+ result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
279
+ result
280
+ end
281
+
245
282
  # Vend credentials for a connected account
246
283
  # @param slug [String] The identifier of the integration.
247
284
  # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier.
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class AgentRegistrationRefreshed < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ object: :object,
9
+ id: :id,
10
+ event: :event,
11
+ data: :data,
12
+ created_at: :created_at,
13
+ context: :context
14
+ }.freeze
15
+
16
+ attr_accessor \
17
+ :object,
18
+ :id,
19
+ :event,
20
+ :data,
21
+ :created_at,
22
+ :context
23
+
24
+ def initialize(json)
25
+ hash = self.class.normalize(json)
26
+ @object = hash[:object]
27
+ @id = hash[:id]
28
+ @event = hash[:event]
29
+ @data = hash[:data] ? WorkOS::AgentRegistrationRefreshedData.new(hash[:data]) : nil
30
+ @created_at = hash[:created_at]
31
+ @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ AgentRegistrationRefreshedData = AgentRegistrationDeletedData
7
+ end
@@ -10,6 +10,7 @@ module WorkOS
10
10
  email: :email,
11
11
  state: :state,
12
12
  approved_at: :approved_at,
13
+ waitlist_id: :waitlist_id,
13
14
  created_at: :created_at,
14
15
  updated_at: :updated_at
15
16
  }.freeze
@@ -20,6 +21,7 @@ module WorkOS
20
21
  :email,
21
22
  :state,
22
23
  :approved_at,
24
+ :waitlist_id,
23
25
  :created_at,
24
26
  :updated_at
25
27
 
@@ -30,6 +32,7 @@ module WorkOS
30
32
  @email = hash[:email]
31
33
  @state = hash[:state]
32
34
  @approved_at = hash[:approved_at]
35
+ @waitlist_id = hash[:waitlist_id]
33
36
  @created_at = hash[:created_at]
34
37
  @updated_at = hash[:updated_at]
35
38
  end
@@ -16,6 +16,8 @@ module WorkOS
16
16
  GIT_HUB_OAUTH = "GitHubOAuth"
17
17
  GIT_LAB_OAUTH = "GitLabOAuth"
18
18
  GOOGLE_OAUTH = "GoogleOAuth"
19
+ GROK_OAUTH = "GrokOAuth"
20
+ XO_AUTH = "XOAuth"
19
21
  INTUIT_OAUTH = "IntuitOAuth"
20
22
  LINKED_IN_OAUTH = "LinkedInOAuth"
21
23
  MICROSOFT_OAUTH = "MicrosoftOAuth"
@@ -27,7 +29,7 @@ module WorkOS
27
29
  MAGIC_AUTH = "MagicAuth"
28
30
  IMPERSONATION = "Impersonation"
29
31
  MIGRATED_SESSION = "MigratedSession"
30
- ALL = [SSO, PASSWORD, PASSKEY, APPLE_OAUTH, BITBUCKET_OAUTH, CROSS_APP_AUTH, DISCORD_OAUTH, EXTERNAL_AUTH, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, INTUIT_OAUTH, LINKED_IN_OAUTH, MICROSOFT_OAUTH, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, XERO_OAUTH, MAGIC_AUTH, IMPERSONATION, MIGRATED_SESSION].freeze
32
+ ALL = [SSO, PASSWORD, PASSKEY, APPLE_OAUTH, BITBUCKET_OAUTH, CROSS_APP_AUTH, DISCORD_OAUTH, EXTERNAL_AUTH, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GROK_OAUTH, XO_AUTH, INTUIT_OAUTH, LINKED_IN_OAUTH, MICROSOFT_OAUTH, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, XERO_OAUTH, MAGIC_AUTH, IMPERSONATION, MIGRATED_SESSION].freeze
31
33
  end
32
34
  end
33
35
  end
@@ -27,6 +27,8 @@ module WorkOS
27
27
  GOOGLE_OAUTH = "GoogleOAuth"
28
28
  GOOGLE_OIDC = "GoogleOIDC"
29
29
  GOOGLE_SAML = "GoogleSAML"
30
+ GROK_OAUTH = "GrokOAuth"
31
+ XO_AUTH = "XOAuth"
30
32
  INTUIT_OAUTH = "IntuitOAuth"
31
33
  JUMP_CLOUD_SAML = "JumpCloudSAML"
32
34
  KEYCLOAK_SAML = "KeycloakSAML"
@@ -55,7 +57,7 @@ module WorkOS
55
57
  VERCEL_OAUTH = "VercelOAuth"
56
58
  V_MWARE_SAML = "VMwareSAML"
57
59
  XERO_OAUTH = "XeroOAuth"
58
- ALL = [ADFSSAML, ADP_OIDC, APPLE_OAUTH, AUTH_0_MIGRATION, AUTH_0_SAML, AZURE_SAML, BITBUCKET_OAUTH, CAS_SAML, CLASS_LINK_SAML, CLEVER_OIDC, CLOUDFLARE_SAML, CYBER_ARK_SAML, DISCORD_OAUTH, DUO_SAML, ENTRA_ID_OIDC, GENERIC_OIDC, GENERIC_SAML, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GOOGLE_OIDC, GOOGLE_SAML, INTUIT_OAUTH, JUMP_CLOUD_SAML, KEYCLOAK_SAML, LAST_PASS_SAML, LINKED_IN_OAUTH, LOGIN_GOV_OIDC, MAGIC_LINK, MICROSOFT_OAUTH, MINI_ORANGE_SAML, NET_IQ_SAML, OKTA_OIDC, OKTA_SAML, ONE_LOGIN_SAML, ORACLE_SAML, PING_FEDERATE_SAML, PING_ONE_SAML, RIPPLING_SAML, SALESFORCE_SAML, SHIBBOLETH_GENERIC_SAML, SHIBBOLETH_SAML, SIMPLE_SAML_PHP_SAML, SALESFORCE_OAUTH, SLACK_OAUTH, TEST_IDP, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, V_MWARE_SAML, XERO_OAUTH].freeze
60
+ ALL = [ADFSSAML, ADP_OIDC, APPLE_OAUTH, AUTH_0_MIGRATION, AUTH_0_SAML, AZURE_SAML, BITBUCKET_OAUTH, CAS_SAML, CLASS_LINK_SAML, CLEVER_OIDC, CLOUDFLARE_SAML, CYBER_ARK_SAML, DISCORD_OAUTH, DUO_SAML, ENTRA_ID_OIDC, GENERIC_OIDC, GENERIC_SAML, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GOOGLE_OIDC, GOOGLE_SAML, GROK_OAUTH, XO_AUTH, INTUIT_OAUTH, JUMP_CLOUD_SAML, KEYCLOAK_SAML, LAST_PASS_SAML, LINKED_IN_OAUTH, LOGIN_GOV_OIDC, MAGIC_LINK, MICROSOFT_OAUTH, MINI_ORANGE_SAML, NET_IQ_SAML, OKTA_OIDC, OKTA_SAML, ONE_LOGIN_SAML, ORACLE_SAML, PING_FEDERATE_SAML, PING_ONE_SAML, RIPPLING_SAML, SALESFORCE_SAML, SHIBBOLETH_GENERIC_SAML, SHIBBOLETH_SAML, SIMPLE_SAML_PHP_SAML, SALESFORCE_OAUTH, SLACK_OAUTH, TEST_IDP, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, V_MWARE_SAML, XERO_OAUTH].freeze
59
61
  end
60
62
  end
61
63
  end
@@ -28,6 +28,8 @@ module WorkOS
28
28
  GOOGLE_OAUTH = "GoogleOAuth"
29
29
  GOOGLE_OIDC = "GoogleOIDC"
30
30
  GOOGLE_SAML = "GoogleSAML"
31
+ GROK_OAUTH = "GrokOAuth"
32
+ XO_AUTH = "XOAuth"
31
33
  INTUIT_OAUTH = "IntuitOAuth"
32
34
  JUMP_CLOUD_SAML = "JumpCloudSAML"
33
35
  KEYCLOAK_SAML = "KeycloakSAML"
@@ -56,7 +58,7 @@ module WorkOS
56
58
  VERCEL_OAUTH = "VercelOAuth"
57
59
  V_MWARE_SAML = "VMwareSAML"
58
60
  XERO_OAUTH = "XeroOAuth"
59
- ALL = [PENDING, ADFSSAML, ADP_OIDC, APPLE_OAUTH, AUTH_0_MIGRATION, AUTH_0_SAML, AZURE_SAML, BITBUCKET_OAUTH, CAS_SAML, CLASS_LINK_SAML, CLEVER_OIDC, CLOUDFLARE_SAML, CYBER_ARK_SAML, DISCORD_OAUTH, DUO_SAML, ENTRA_ID_OIDC, GENERIC_OIDC, GENERIC_SAML, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GOOGLE_OIDC, GOOGLE_SAML, INTUIT_OAUTH, JUMP_CLOUD_SAML, KEYCLOAK_SAML, LAST_PASS_SAML, LINKED_IN_OAUTH, LOGIN_GOV_OIDC, MAGIC_LINK, MICROSOFT_OAUTH, MINI_ORANGE_SAML, NET_IQ_SAML, OKTA_OIDC, OKTA_SAML, ONE_LOGIN_SAML, ORACLE_SAML, PING_FEDERATE_SAML, PING_ONE_SAML, RIPPLING_SAML, SALESFORCE_SAML, SHIBBOLETH_GENERIC_SAML, SHIBBOLETH_SAML, SIMPLE_SAML_PHP_SAML, SALESFORCE_OAUTH, SLACK_OAUTH, TEST_IDP, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, V_MWARE_SAML, XERO_OAUTH].freeze
61
+ ALL = [PENDING, ADFSSAML, ADP_OIDC, APPLE_OAUTH, AUTH_0_MIGRATION, AUTH_0_SAML, AZURE_SAML, BITBUCKET_OAUTH, CAS_SAML, CLASS_LINK_SAML, CLEVER_OIDC, CLOUDFLARE_SAML, CYBER_ARK_SAML, DISCORD_OAUTH, DUO_SAML, ENTRA_ID_OIDC, GENERIC_OIDC, GENERIC_SAML, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GOOGLE_OIDC, GOOGLE_SAML, GROK_OAUTH, XO_AUTH, INTUIT_OAUTH, JUMP_CLOUD_SAML, KEYCLOAK_SAML, LAST_PASS_SAML, LINKED_IN_OAUTH, LOGIN_GOV_OIDC, MAGIC_LINK, MICROSOFT_OAUTH, MINI_ORANGE_SAML, NET_IQ_SAML, OKTA_OIDC, OKTA_SAML, ONE_LOGIN_SAML, ORACLE_SAML, PING_FEDERATE_SAML, PING_ONE_SAML, RIPPLING_SAML, SALESFORCE_SAML, SHIBBOLETH_GENERIC_SAML, SHIBBOLETH_SAML, SIMPLE_SAML_PHP_SAML, SALESFORCE_OAUTH, SLACK_OAUTH, TEST_IDP, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, V_MWARE_SAML, XERO_OAUTH].freeze
60
62
  end
61
63
  end
62
64
  end