workos 10.0.0 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.claude/CLAUDE.md +38 -0
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +12 -0
- data/.release-please-manifest.json +1 -1
- data/AGENTS.md +1 -0
- data/CHANGELOG.md +87 -0
- data/Gemfile.lock +2 -2
- data/lib/workos/connect.rb +2 -2
- data/lib/workos/events.rb +2 -2
- data/lib/workos/groups.rb +6 -2
- data/lib/workos/pipes/connected_account.rb +9 -0
- data/lib/workos/pipes/create_data_integration.rb +3 -0
- data/lib/workos/pipes/data_integration.rb +3 -0
- data/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb +5 -2
- data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +9 -0
- data/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +31 -0
- data/lib/workos/pipes.rb +45 -2
- data/lib/workos/pipes_provider/configure_data_integration_body.rb +5 -2
- data/lib/workos/pipes_provider/data_integration_configuration_response.rb +3 -0
- data/lib/workos/pipes_provider.rb +4 -1
- data/lib/workos/shared/agent_registration_refreshed.rb +34 -0
- data/lib/workos/shared/agent_registration_refreshed_data.rb +7 -0
- data/lib/workos/shared/waitlist_user.rb +3 -0
- data/lib/workos/sso/connection.rb +0 -3
- data/lib/workos/sso.rb +73 -26
- data/lib/workos/types/authenticate_response_authentication_method.rb +3 -1
- data/lib/workos/types/connected_account_auth_method.rb +2 -1
- data/lib/workos/types/connection_activated_data_connection_type.rb +3 -1
- data/lib/workos/types/connection_type.rb +3 -1
- data/lib/workos/types/connections_connection_type.rb +3 -1
- data/lib/workos/types/create_user_password_salt_position.rb +13 -0
- data/lib/workos/types/create_webhook_endpoint_events.rb +2 -1
- data/lib/workos/types/update_user_password_salt_position.rb +9 -0
- data/lib/workos/types/user_identities_get_item_provider.rb +3 -1
- data/lib/workos/user_management/create_user.rb +5 -2
- data/lib/workos/user_management/update_user.rb +5 -2
- data/lib/workos/user_management.rb +105 -51
- data/lib/workos/version.rb +1 -1
- data/rbi/workos/agent_registration_refreshed.rbi +54 -0
- data/rbi/workos/agent_registration_refreshed_data.rbi +24 -0
- data/rbi/workos/configure_data_integration_body.rbi +6 -0
- data/rbi/workos/connected_account.rbi +18 -0
- data/rbi/workos/connection.rbi +0 -6
- data/rbi/workos/create_data_integration.rbi +6 -0
- data/rbi/workos/create_user.rbi +6 -0
- data/rbi/workos/custom_provider_definition.rbi +4 -4
- data/rbi/workos/data_integration.rbi +8 -2
- data/rbi/workos/data_integration_configuration_response.rbi +6 -0
- data/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi +6 -0
- data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +18 -0
- data/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +48 -0
- data/rbi/workos/events.rbi +2 -2
- data/rbi/workos/groups.rbi +2 -1
- data/rbi/workos/pipes.rbi +17 -2
- data/rbi/workos/pipes_provider.rbi +2 -1
- data/rbi/workos/radar_sms_challenge_code_session_authenticate_request.rbi +4 -4
- data/rbi/workos/sso.rbi +26 -0
- data/rbi/workos/update_user.rbi +6 -0
- data/rbi/workos/user_management.rbi +36 -2
- data/rbi/workos/waitlist_user.rbi +6 -0
- data/test/workos/test_authkit_helpers.rb +22 -10
- data/test/workos/test_events.rb +2 -2
- data/test/workos/test_pipes.rb +8 -0
- data/test/workos/test_pipes_model_round_trip.rb +28 -4
- data/test/workos/test_pipes_provider_model_round_trip.rb +3 -1
- data/test/workos/test_shared_model_round_trip.rb +29 -0
- data/test/workos/test_sso_model_round_trip.rb +0 -1
- data/test/workos/test_user_management.rb +6 -6
- data/test/workos/test_user_management_model_round_trip.rb +4 -4
- metadata +11 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63f6d02af5ecf1ab9f62af255a77ef281f8763b3e6c56feeb6ee87da3817c29d
|
|
4
|
+
data.tar.gz: 1691eb9636159a73295a6baabf6b63103bfc868f4f7660e49ae12644d7f27efa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b421f5433d3001c3dcb8de0aeddf93805bcbddd73c1a9c475b65f6c66b4e1a442d2a6eca5c37444f9dc97481abf5c7f05799bd914431de5411f368566e85a99
|
|
7
|
+
data.tar.gz: c6376c12ff9efe67ac13aaf63e63a3c5ddcad6926272b0cc1c36cde0ac4ed858c10157b3ee064143152a73c28674d848ecd81f200a2f64b1e7ae2a23def4c44a
|
data/.claude/CLAUDE.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# WorkOS Ruby SDK — Agent Context
|
|
2
|
+
|
|
3
|
+
Most code in this repository is **auto-generated**. It is emitted by the
|
|
4
|
+
oagen pipeline from the WorkOS OpenAPI spec. It is not hand-written here,
|
|
5
|
+
and most bugs in it cannot be fixed here.
|
|
6
|
+
|
|
7
|
+
## The generation pipeline
|
|
8
|
+
|
|
9
|
+
| Repo | Role |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| [workos/openapi-spec](https://github.com/workos/openapi-spec) | Source of truth for the API surface (the OpenAPI spec, exported by the WorkOS API) and the orchestration entrypoint for all SDK generation |
|
|
12
|
+
| [workos/oagen](https://github.com/workos/oagen) | The generator engine (spec → IR → code) |
|
|
13
|
+
| [workos/oagen-emitters](https://github.com/workos/oagen-emitters) | The per-language emitters, including the Ruby emitter that produces this repo's code |
|
|
14
|
+
|
|
15
|
+
Regeneration runs from a checkout of `openapi-spec`, never from this repo:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm run sdk:generate -- --lang ruby --output workos-ruby
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Generated vs. hand-maintained code
|
|
22
|
+
|
|
23
|
+
- Generated files begin with the header `# This file is auto-generated by oagen. Do not edit.` — treat them as build artifacts.
|
|
24
|
+
- Hand-maintained code is fenced with `@oagen-ignore-start` / `@oagen-ignore-end` markers, or lives in files marked `@oagen-ignore-file`. Only this code is editable in this repo.
|
|
25
|
+
|
|
26
|
+
## Where to fix an issue
|
|
27
|
+
|
|
28
|
+
| Symptom | Fix it in |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| Wrong or missing endpoint, field, type, or enum value | [workos/openapi-spec](https://github.com/workos/openapi-spec) (or the WorkOS API that exports the spec) |
|
|
31
|
+
| Generated Ruby code is broken or un-idiomatic | [workos/oagen-emitters](https://github.com/workos/oagen-emitters) |
|
|
32
|
+
| Generator behavior: naming, IR, pagination, compat checks | [workos/oagen](https://github.com/workos/oagen) |
|
|
33
|
+
| Code inside `@oagen-ignore` fences or ignore-marked files | This repo — edit normally |
|
|
34
|
+
|
|
35
|
+
Don't hand-edit a file that has the generated header — the next
|
|
36
|
+
`sdk:generate` run silently overwrites it. Instead, fix the emitter or the
|
|
37
|
+
spec upstream and regenerate. If a requested fix lands in a generated file,
|
|
38
|
+
say so and point at the upstream repo rather than patching it here.
|
data/.last-synced-sha
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
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
|
}
|
data/AGENTS.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.claude/CLAUDE.md
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,92 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [10.2.0](https://github.com/workos/workos-ruby/compare/v10.1.0...v10.2.0) (2026-08-11)
|
|
4
|
+
|
|
5
|
+
* [#533](https://github.com/workos/workos-ruby/pull/533) feat(generated)!: regenerate from spec (2 changes)
|
|
6
|
+
|
|
7
|
+
**⚠️ Breaking**
|
|
8
|
+
* **[events](https://workos.com/docs/reference/events)**:
|
|
9
|
+
* Changed required status for parameter `Events.list.events`
|
|
10
|
+
|
|
11
|
+
**Features**
|
|
12
|
+
* **[groups](https://workos.com/docs/reference/groups)**:
|
|
13
|
+
* Added parameter `Groups.list.search`
|
|
14
|
+
* **[connect](https://workos.com/docs/reference/workos-connect/standalone)**:
|
|
15
|
+
* Added `client_id` to `ConnectedAccount`
|
|
16
|
+
* Added `client_secret_last_4` to `ConnectedAccount`
|
|
17
|
+
* Added `config` to `ConnectedAccount`
|
|
18
|
+
* **[pipes](https://workos.com/docs/reference/pipes)**:
|
|
19
|
+
* Added `client_id` to `DataIntegrationsListResponseDataConnectedAccount`
|
|
20
|
+
* Added `client_secret_last_4` to `DataIntegrationsListResponseDataConnectedAccount`
|
|
21
|
+
* Added `config` to `DataIntegrationsListResponseDataConnectedAccount`
|
|
22
|
+
* Changed errors for endpoint `POST /data-integrations/{slug}/credentials`
|
|
23
|
+
* Made `CustomProviderDefinition.authorization_url` optional
|
|
24
|
+
* Made `CustomProviderDefinition.token_url` optional
|
|
25
|
+
* Added model `DataIntegrationsUpsertClientCredentialsRequest`
|
|
26
|
+
* Added `client_credentials` to `CreateDataIntegrationAuthMethods`
|
|
27
|
+
* Added endpoint `PUT /data-integrations/{slug}/client-credentials`
|
|
28
|
+
* **[sso](https://workos.com/docs/reference/sso)**:
|
|
29
|
+
* Added `XOAuth` to `ConnectionType`
|
|
30
|
+
* Added `XOAuth` to `ProfileConnectionType`
|
|
31
|
+
* Added `XOAuth` to `ConnectionsConnectionType`
|
|
32
|
+
* Added `GrokOAuth` to `ConnectionType`
|
|
33
|
+
* Added `GrokOAuth` to `ProfileConnectionType`
|
|
34
|
+
* Added `GrokOAuth` to `ConnectionsConnectionType`
|
|
35
|
+
* **[user_management](https://workos.com/docs/reference/authkit/user)**:
|
|
36
|
+
* Changed errors for endpoint `DELETE /user_management/users/{id}`
|
|
37
|
+
* Added `password_salt_position` to `CreateUser`
|
|
38
|
+
* Added `password_salt_position` to `UpdateUser`
|
|
39
|
+
* Made `RadarSmsChallengeCodeSessionAuthenticateRequest.verification_id` optional
|
|
40
|
+
* Made `RadarSmsChallengeCodeSessionAuthenticateRequest.phone_number` optional
|
|
41
|
+
* Added enum `CreateUserPasswordSaltPosition`
|
|
42
|
+
* Added enum `UpdateUserPasswordSaltPosition`
|
|
43
|
+
* Added `XOAuth` to `AuthenticateResponseAuthenticationMethod`
|
|
44
|
+
* Added `XOAuth` to `UserIdentitiesGetItemProvider`
|
|
45
|
+
* Added `GrokOAuth` to `AuthenticateResponseAuthenticationMethod`
|
|
46
|
+
* Added `GrokOAuth` to `UserIdentitiesGetItemProvider`
|
|
47
|
+
* **[webhooks](https://workos.com/docs/reference/webhooks)**:
|
|
48
|
+
* Added `agent.registration.refreshed` to `CreateWebhookEndpointEvents`
|
|
49
|
+
* Added `agent.registration.refreshed` to `UpdateWebhookEndpointEvents`
|
|
50
|
+
|
|
51
|
+
**Fixes**
|
|
52
|
+
* **[pipes](https://workos.com/docs/reference/pipes)**:
|
|
53
|
+
* Changed the type of `DataIntegration.credentials`
|
|
54
|
+
* **[user_management](https://workos.com/docs/reference/authkit/user)**:
|
|
55
|
+
* Changed errors for endpoint `POST /user_management/authenticate`
|
|
56
|
+
* Changed errors for endpoint `POST /user_management/users`
|
|
57
|
+
* Changed errors for endpoint `PUT /user_management/users/{id}`
|
|
58
|
+
|
|
59
|
+
## [10.1.0](https://github.com/workos/workos-ruby/compare/v10.0.0...v10.1.0) (2026-07-28)
|
|
60
|
+
|
|
61
|
+
### Features
|
|
62
|
+
|
|
63
|
+
* replace hand-written URL builders with generated ones ([b162486](https://github.com/workos/workos-ruby/commit/b1624866137d8364dda1726b0302b70bed00a75c))
|
|
64
|
+
|
|
65
|
+
* [#531](https://github.com/workos/workos-ruby/pull/531) fix(generated): regenerate from spec
|
|
66
|
+
|
|
67
|
+
**Features**
|
|
68
|
+
* **[pipes](https://workos.com/docs/reference/pipes)**:
|
|
69
|
+
* Added `config` to `DataIntegrationsGetDataIntegrationAuthorizeUrlRequest`
|
|
70
|
+
* Added `client_credentials` to `DataIntegrationAuthMethods`
|
|
71
|
+
* Added `client_credentials` to `DataIntegrationsListResponseDataAuthMethods`
|
|
72
|
+
* Added `client_credentials` to `DataIntegrationsListResponseDataConnectedAccountAuthMethod`
|
|
73
|
+
* Added `config` to Pipes models
|
|
74
|
+
* **[connect](https://workos.com/docs/reference/workos-connect/standalone)**:
|
|
75
|
+
* Added `client_credentials` to `ConnectedAccountAuthMethod`
|
|
76
|
+
|
|
77
|
+
**Fixes**
|
|
78
|
+
* **[user_management](https://workos.com/docs/reference/authkit/user)**:
|
|
79
|
+
* Changed errors for endpoint `POST /user_management/invitations`
|
|
80
|
+
* Changed errors for endpoint `POST /user_management/invitations/{id}/resend`
|
|
81
|
+
* Changed errors for endpoint `POST /user_management/magic_auth`
|
|
82
|
+
* Changed errors for endpoint `POST /user_management/authenticate`
|
|
83
|
+
|
|
84
|
+
* [#532](https://github.com/workos/workos-ruby/pull/532) fix(generated): regenerate from spec
|
|
85
|
+
|
|
86
|
+
**Fixes**
|
|
87
|
+
* **[sso](https://workos.com/docs/reference/sso)**:
|
|
88
|
+
* Removed `callback_endpoint` from `Connection`
|
|
89
|
+
|
|
3
90
|
## [10.0.0](https://github.com/workos/workos-ruby/compare/v9.5.0...v10.0.0) (2026-07-22)
|
|
4
91
|
|
|
5
92
|
### Bug Fixes
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
workos (10.
|
|
4
|
+
workos (10.2.0)
|
|
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.
|
|
156
|
+
workos (10.2.0)
|
|
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
|
data/lib/workos/connect.rb
CHANGED
|
@@ -135,7 +135,7 @@ module WorkOS
|
|
|
135
135
|
result
|
|
136
136
|
end
|
|
137
137
|
|
|
138
|
-
# Create
|
|
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
|
|
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
|
|
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]
|
|
@@ -10,6 +10,7 @@ module WorkOS
|
|
|
10
10
|
enabled: :enabled,
|
|
11
11
|
scopes: :scopes,
|
|
12
12
|
auth_methods: :auth_methods,
|
|
13
|
+
config: :config,
|
|
13
14
|
credentials: :credentials,
|
|
14
15
|
api_key: :api_key,
|
|
15
16
|
custom_provider: :custom_provider
|
|
@@ -21,6 +22,7 @@ module WorkOS
|
|
|
21
22
|
:enabled,
|
|
22
23
|
:scopes,
|
|
23
24
|
:auth_methods,
|
|
25
|
+
:config,
|
|
24
26
|
:credentials,
|
|
25
27
|
:api_key,
|
|
26
28
|
:custom_provider
|
|
@@ -32,6 +34,7 @@ module WorkOS
|
|
|
32
34
|
@enabled = hash[:enabled]
|
|
33
35
|
@scopes = hash[:scopes] || []
|
|
34
36
|
@auth_methods = hash[:auth_methods] || []
|
|
37
|
+
@config = hash[:config] || {}
|
|
35
38
|
@credentials = hash[:credentials] ? WorkOS::DataIntegrationCredentialsInput.new(hash[:credentials]) : nil
|
|
36
39
|
@api_key = hash[:api_key] ? WorkOS::ApiKeyInstallation.new(hash[:api_key]) : nil
|
|
37
40
|
@custom_provider = hash[:custom_provider] ? WorkOS::CustomProviderDefinition.new(hash[:custom_provider]) : nil
|
|
@@ -17,6 +17,7 @@ module WorkOS
|
|
|
17
17
|
auth_methods: :auth_methods,
|
|
18
18
|
credentials: :credentials,
|
|
19
19
|
installation: :installation,
|
|
20
|
+
config: :config,
|
|
20
21
|
custom_provider: :custom_provider,
|
|
21
22
|
created_at: :created_at,
|
|
22
23
|
updated_at: :updated_at
|
|
@@ -35,6 +36,7 @@ module WorkOS
|
|
|
35
36
|
:auth_methods,
|
|
36
37
|
:credentials,
|
|
37
38
|
:installation,
|
|
39
|
+
:config,
|
|
38
40
|
:custom_provider,
|
|
39
41
|
:created_at,
|
|
40
42
|
:updated_at
|
|
@@ -53,6 +55,7 @@ module WorkOS
|
|
|
53
55
|
@auth_methods = hash[:auth_methods] || []
|
|
54
56
|
@credentials = hash[:credentials] ? WorkOS::DataIntegrationCredential.new(hash[:credentials]) : nil
|
|
55
57
|
@installation = hash[:installation] ? WorkOS::DataIntegrationInstallation.new(hash[:installation]) : nil
|
|
58
|
+
@config = hash[:config] || {}
|
|
56
59
|
@custom_provider = hash[:custom_provider] ? WorkOS::DataIntegrationCustomProvider.new(hash[:custom_provider]) : nil
|
|
57
60
|
@created_at = hash[:created_at]
|
|
58
61
|
@updated_at = hash[:updated_at]
|
|
@@ -7,19 +7,22 @@ module WorkOS
|
|
|
7
7
|
HASH_ATTRS = {
|
|
8
8
|
user_id: :user_id,
|
|
9
9
|
organization_id: :organization_id,
|
|
10
|
-
return_to: :return_to
|
|
10
|
+
return_to: :return_to,
|
|
11
|
+
config: :config
|
|
11
12
|
}.freeze
|
|
12
13
|
|
|
13
14
|
attr_accessor \
|
|
14
15
|
:user_id,
|
|
15
16
|
:organization_id,
|
|
16
|
-
:return_to
|
|
17
|
+
:return_to,
|
|
18
|
+
:config
|
|
17
19
|
|
|
18
20
|
def initialize(json)
|
|
19
21
|
hash = self.class.normalize(json)
|
|
20
22
|
@user_id = hash[:user_id]
|
|
21
23
|
@organization_id = hash[:organization_id]
|
|
22
24
|
@return_to = hash[:return_to]
|
|
25
|
+
@config = hash[:config] || {}
|
|
23
26
|
end
|
|
24
27
|
end
|
|
25
28
|
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,
|
|
@@ -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,7 +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).
|
|
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.
|
|
63
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"]`.
|
|
64
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.
|
|
65
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.
|
|
@@ -71,6 +72,7 @@ module WorkOS
|
|
|
71
72
|
enabled: nil,
|
|
72
73
|
scopes: WorkOS::OMIT,
|
|
73
74
|
auth_methods: nil,
|
|
75
|
+
config: nil,
|
|
74
76
|
credentials: nil,
|
|
75
77
|
api_key: nil,
|
|
76
78
|
custom_provider: nil,
|
|
@@ -80,6 +82,7 @@ module WorkOS
|
|
|
80
82
|
"provider" => provider,
|
|
81
83
|
"enabled" => enabled,
|
|
82
84
|
"auth_methods" => auth_methods,
|
|
85
|
+
"config" => config,
|
|
83
86
|
"credentials" => credentials,
|
|
84
87
|
"api_key" => api_key,
|
|
85
88
|
"custom_provider" => custom_provider
|
|
@@ -210,6 +213,7 @@ module WorkOS
|
|
|
210
213
|
# @param user_id [String] The ID of the user to authorize.
|
|
211
214
|
# @param organization_id [String, nil] An organization ID to scope the authorization to a specific organization.
|
|
212
215
|
# @param return_to [String, nil] The URL to redirect the user to after authorization.
|
|
216
|
+
# @param config [Hash{String => String}, nil] Connect-time config values for the provider-declared `installation`-scope fields (e.g. a Zendesk `subdomain`), keyed by the config field. Only fields the provider declares may be supplied, and required fields must be provided unless already pinned on the integration.
|
|
213
217
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
214
218
|
# @return [WorkOS::DataIntegrationAuthorizeUrlResponse]
|
|
215
219
|
def authorize_data_integration(
|
|
@@ -217,12 +221,14 @@ module WorkOS
|
|
|
217
221
|
user_id:,
|
|
218
222
|
organization_id: nil,
|
|
219
223
|
return_to: nil,
|
|
224
|
+
config: nil,
|
|
220
225
|
request_options: {}
|
|
221
226
|
)
|
|
222
227
|
body = {
|
|
223
228
|
"user_id" => user_id,
|
|
224
229
|
"organization_id" => organization_id,
|
|
225
|
-
"return_to" => return_to
|
|
230
|
+
"return_to" => return_to,
|
|
231
|
+
"config" => config
|
|
226
232
|
}.compact
|
|
227
233
|
response = @client.request(
|
|
228
234
|
method: :post,
|
|
@@ -236,6 +242,43 @@ module WorkOS
|
|
|
236
242
|
result
|
|
237
243
|
end
|
|
238
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
|
+
|
|
239
282
|
# Vend credentials for a connected account
|
|
240
283
|
# @param slug [String] The identifier of the integration.
|
|
241
284
|
# @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier.
|
|
@@ -8,14 +8,16 @@ module WorkOS
|
|
|
8
8
|
enabled: :enabled,
|
|
9
9
|
scopes: :scopes,
|
|
10
10
|
client_id: :client_id,
|
|
11
|
-
client_secret: :client_secret
|
|
11
|
+
client_secret: :client_secret,
|
|
12
|
+
config: :config
|
|
12
13
|
}.freeze
|
|
13
14
|
|
|
14
15
|
attr_accessor \
|
|
15
16
|
:enabled,
|
|
16
17
|
:scopes,
|
|
17
18
|
:client_id,
|
|
18
|
-
:client_secret
|
|
19
|
+
:client_secret,
|
|
20
|
+
:config
|
|
19
21
|
|
|
20
22
|
def initialize(json)
|
|
21
23
|
hash = self.class.normalize(json)
|
|
@@ -23,6 +25,7 @@ module WorkOS
|
|
|
23
25
|
@scopes = hash[:scopes] || []
|
|
24
26
|
@client_id = hash[:client_id]
|
|
25
27
|
@client_secret = hash[:client_secret]
|
|
28
|
+
@config = hash[:config] || {}
|
|
26
29
|
end
|
|
27
30
|
end
|
|
28
31
|
end
|
|
@@ -12,6 +12,7 @@ module WorkOS
|
|
|
12
12
|
name: :name,
|
|
13
13
|
enabled: :enabled,
|
|
14
14
|
scopes: :scopes,
|
|
15
|
+
config: :config,
|
|
15
16
|
created_at: :created_at,
|
|
16
17
|
updated_at: :updated_at,
|
|
17
18
|
credentials: :credentials
|
|
@@ -25,6 +26,7 @@ module WorkOS
|
|
|
25
26
|
:name,
|
|
26
27
|
:enabled,
|
|
27
28
|
:scopes,
|
|
29
|
+
:config,
|
|
28
30
|
:created_at,
|
|
29
31
|
:updated_at,
|
|
30
32
|
:credentials
|
|
@@ -38,6 +40,7 @@ module WorkOS
|
|
|
38
40
|
@name = hash[:name]
|
|
39
41
|
@enabled = hash[:enabled]
|
|
40
42
|
@scopes = hash[:scopes] || []
|
|
43
|
+
@config = hash[:config] || {}
|
|
41
44
|
@created_at = hash[:created_at]
|
|
42
45
|
@updated_at = hash[:updated_at]
|
|
43
46
|
@credentials = hash[:credentials] ? WorkOS::DataIntegrationCredentials.new(hash[:credentials]) : nil
|
|
@@ -36,6 +36,7 @@ module WorkOS
|
|
|
36
36
|
# @param scopes [Array<String>, nil] The OAuth scopes to request for the organization. Pass `null` to inherit the provider scopes.
|
|
37
37
|
# @param client_id [String, nil] The OAuth client ID of the organization's own application. Must be provided together with `client_secret`, and only for providers whose credentials are supplied by the organization.
|
|
38
38
|
# @param client_secret [String, nil] The OAuth client secret of the organization's own application. Must be provided together with `client_id`.
|
|
39
|
+
# @param config [Hash{String => String}, nil] Provider-specific config values to set for the organization, keyed by config field. Only fields the provider declares are accepted, and each value must match that field's pattern. Accepted only for providers whose credentials are organization-managed; for shared or custom credential providers, config belongs on the integration itself (via the data-integrations API) and supplying it here is rejected.
|
|
39
40
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
40
41
|
# @return [WorkOS::DataIntegrationConfigurationResponse]
|
|
41
42
|
def update_organization_data_integration_configuration(
|
|
@@ -45,12 +46,14 @@ module WorkOS
|
|
|
45
46
|
scopes: WorkOS::OMIT,
|
|
46
47
|
client_id: nil,
|
|
47
48
|
client_secret: nil,
|
|
49
|
+
config: nil,
|
|
48
50
|
request_options: {}
|
|
49
51
|
)
|
|
50
52
|
body = {
|
|
51
53
|
"enabled" => enabled,
|
|
52
54
|
"client_id" => client_id,
|
|
53
|
-
"client_secret" => client_secret
|
|
55
|
+
"client_secret" => client_secret,
|
|
56
|
+
"config" => config
|
|
54
57
|
}.compact
|
|
55
58
|
body["scopes"] = scopes unless scopes.equal?(WorkOS::OMIT)
|
|
56
59
|
response = @client.request(
|