Skip to content

Commit 75c684f

Browse files
feat(generated): Pipes, PipesProvider, UserManagement (batch 6c21f6dc) (#531)
Co-authored-by: workos-sdk-automation[bot] <255426317+workos-sdk-automation[bot]@users.noreply.github.com>
1 parent b162486 commit 75c684f

21 files changed

Lines changed: 99 additions & 76 deletions
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
* [#531](https://github.com/workos/workos-ruby/pull/531) fix(generated): regenerate from spec
2+
3+
**Features**
4+
* **[pipes](https://workos.com/docs/reference/pipes)**:
5+
* Added `config` to `DataIntegrationsGetDataIntegrationAuthorizeUrlRequest`
6+
* Added `client_credentials` to `DataIntegrationAuthMethods`
7+
* Added `client_credentials` to `DataIntegrationsListResponseDataAuthMethods`
8+
* Added `client_credentials` to `DataIntegrationsListResponseDataConnectedAccountAuthMethod`
9+
* Added `config` to Pipes models
10+
* **[connect](https://workos.com/docs/reference/workos-connect/standalone)**:
11+
* Added `client_credentials` to `ConnectedAccountAuthMethod`
12+
13+
**Fixes**
14+
* **[user_management](https://workos.com/docs/reference/authkit/user)**:
15+
* Changed errors for endpoint `POST /user_management/invitations`
16+
* Changed errors for endpoint `POST /user_management/invitations/{id}/resend`
17+
* Changed errors for endpoint `POST /user_management/magic_auth`
18+
* Changed errors for endpoint `POST /user_management/authenticate`

.last-synced-sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f40851a620a1ba0badec95e80faac475382c8dd0
1+
904c5bccd2c6d0511ad2d0760e57d139143f1773

lib/workos/pipes.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def list_data_integrations(
6060
# @param enabled [Boolean, nil] Whether the Data Integration is enabled. Defaults to `false`.
6161
# @param scopes [Array<String>, nil] The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
6262
# @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.
6364
# @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"]`.
6465
# @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.
6566
# @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 @@ def create_data_integration(
7172
enabled: nil,
7273
scopes: WorkOS::OMIT,
7374
auth_methods: nil,
75+
config: nil,
7476
credentials: nil,
7577
api_key: nil,
7678
custom_provider: nil,
@@ -80,6 +82,7 @@ def create_data_integration(
8082
"provider" => provider,
8183
"enabled" => enabled,
8284
"auth_methods" => auth_methods,
85+
"config" => config,
8386
"credentials" => credentials,
8487
"api_key" => api_key,
8588
"custom_provider" => custom_provider
@@ -210,19 +213,22 @@ def update_data_integration_api_key(
210213
# @param user_id [String] The ID of the user to authorize.
211214
# @param organization_id [String, nil] An organization ID to scope the authorization to a specific organization.
212215
# @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.
213217
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
214218
# @return [WorkOS::DataIntegrationAuthorizeUrlResponse]
215219
def authorize_data_integration(
216220
slug:,
217221
user_id:,
218222
organization_id: nil,
219223
return_to: nil,
224+
config: nil,
220225
request_options: {}
221226
)
222227
body = {
223228
"user_id" => user_id,
224229
"organization_id" => organization_id,
225-
"return_to" => return_to
230+
"return_to" => return_to,
231+
"config" => config
226232
}.compact
227233
response = @client.request(
228234
method: :post,

lib/workos/pipes/create_data_integration.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class CreateDataIntegration < WorkOS::Types::BaseModel
1010
enabled: :enabled,
1111
scopes: :scopes,
1212
auth_methods: :auth_methods,
13+
config: :config,
1314
credentials: :credentials,
1415
api_key: :api_key,
1516
custom_provider: :custom_provider
@@ -21,6 +22,7 @@ class CreateDataIntegration < WorkOS::Types::BaseModel
2122
:enabled,
2223
:scopes,
2324
:auth_methods,
25+
:config,
2426
:credentials,
2527
:api_key,
2628
:custom_provider
@@ -32,6 +34,7 @@ def initialize(json)
3234
@enabled = hash[:enabled]
3335
@scopes = hash[:scopes] || []
3436
@auth_methods = hash[:auth_methods] || []
37+
@config = hash[:config] || {}
3538
@credentials = hash[:credentials] ? WorkOS::DataIntegrationCredentialsInput.new(hash[:credentials]) : nil
3639
@api_key = hash[:api_key] ? WorkOS::ApiKeyInstallation.new(hash[:api_key]) : nil
3740
@custom_provider = hash[:custom_provider] ? WorkOS::CustomProviderDefinition.new(hash[:custom_provider]) : nil

lib/workos/pipes/data_integration.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class DataIntegration < WorkOS::Types::BaseModel
1717
auth_methods: :auth_methods,
1818
credentials: :credentials,
1919
installation: :installation,
20+
config: :config,
2021
custom_provider: :custom_provider,
2122
created_at: :created_at,
2223
updated_at: :updated_at
@@ -35,6 +36,7 @@ class DataIntegration < WorkOS::Types::BaseModel
3536
:auth_methods,
3637
:credentials,
3738
:installation,
39+
:config,
3840
:custom_provider,
3941
:created_at,
4042
:updated_at
@@ -53,6 +55,7 @@ def initialize(json)
5355
@auth_methods = hash[:auth_methods] || []
5456
@credentials = hash[:credentials] ? WorkOS::DataIntegrationCredential.new(hash[:credentials]) : nil
5557
@installation = hash[:installation] ? WorkOS::DataIntegrationInstallation.new(hash[:installation]) : nil
58+
@config = hash[:config] || {}
5659
@custom_provider = hash[:custom_provider] ? WorkOS::DataIntegrationCustomProvider.new(hash[:custom_provider]) : nil
5760
@created_at = hash[:created_at]
5861
@updated_at = hash[:updated_at]

lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,22 @@ class DataIntegrationsGetDataIntegrationAuthorizeUrlRequest < WorkOS::Types::Bas
77
HASH_ATTRS = {
88
user_id: :user_id,
99
organization_id: :organization_id,
10-
return_to: :return_to
10+
return_to: :return_to,
11+
config: :config
1112
}.freeze
1213

1314
attr_accessor \
1415
:user_id,
1516
:organization_id,
16-
:return_to
17+
:return_to,
18+
:config
1719

1820
def initialize(json)
1921
hash = self.class.normalize(json)
2022
@user_id = hash[:user_id]
2123
@organization_id = hash[:organization_id]
2224
@return_to = hash[:return_to]
25+
@config = hash[:config] || {}
2326
end
2427
end
2528
end

lib/workos/pipes_provider.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def list_organization_data_integration_configurations(
3636
# @param scopes [Array<String>, nil] The OAuth scopes to request for the organization. Pass `null` to inherit the provider scopes.
3737
# @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.
3838
# @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.
3940
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
4041
# @return [WorkOS::DataIntegrationConfigurationResponse]
4142
def update_organization_data_integration_configuration(
@@ -45,12 +46,14 @@ def update_organization_data_integration_configuration(
4546
scopes: WorkOS::OMIT,
4647
client_id: nil,
4748
client_secret: nil,
49+
config: nil,
4850
request_options: {}
4951
)
5052
body = {
5153
"enabled" => enabled,
5254
"client_id" => client_id,
53-
"client_secret" => client_secret
55+
"client_secret" => client_secret,
56+
"config" => config
5457
}.compact
5558
body["scopes"] = scopes unless scopes.equal?(WorkOS::OMIT)
5659
response = @client.request(

lib/workos/pipes_provider/configure_data_integration_body.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,24 @@ class ConfigureDataIntegrationBody < WorkOS::Types::BaseModel
88
enabled: :enabled,
99
scopes: :scopes,
1010
client_id: :client_id,
11-
client_secret: :client_secret
11+
client_secret: :client_secret,
12+
config: :config
1213
}.freeze
1314

1415
attr_accessor \
1516
:enabled,
1617
:scopes,
1718
:client_id,
18-
:client_secret
19+
:client_secret,
20+
:config
1921

2022
def initialize(json)
2123
hash = self.class.normalize(json)
2224
@enabled = hash[:enabled]
2325
@scopes = hash[:scopes] || []
2426
@client_id = hash[:client_id]
2527
@client_secret = hash[:client_secret]
28+
@config = hash[:config] || {}
2629
end
2730
end
2831
end

lib/workos/pipes_provider/data_integration_configuration_response.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class DataIntegrationConfigurationResponse < WorkOS::Types::BaseModel
1212
name: :name,
1313
enabled: :enabled,
1414
scopes: :scopes,
15+
config: :config,
1516
created_at: :created_at,
1617
updated_at: :updated_at,
1718
credentials: :credentials
@@ -25,6 +26,7 @@ class DataIntegrationConfigurationResponse < WorkOS::Types::BaseModel
2526
:name,
2627
:enabled,
2728
:scopes,
29+
:config,
2830
:created_at,
2931
:updated_at,
3032
:credentials
@@ -38,6 +40,7 @@ def initialize(json)
3840
@name = hash[:name]
3941
@enabled = hash[:enabled]
4042
@scopes = hash[:scopes] || []
43+
@config = hash[:config] || {}
4144
@created_at = hash[:created_at]
4245
@updated_at = hash[:updated_at]
4346
@credentials = hash[:credentials] ? WorkOS::DataIntegrationCredentials.new(hash[:credentials]) : nil

lib/workos/types/connected_account_auth_method.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ module Types
77
class ConnectedAccountAuthMethod
88
OAUTH = "oauth"
99
API_KEY = "api_key"
10-
ALL = [OAUTH, API_KEY].freeze
10+
CLIENT_CREDENTIALS = "client_credentials"
11+
ALL = [OAUTH, API_KEY, CLIENT_CREDENTIALS].freeze
1112
end
1213
end
1314
end

0 commit comments

Comments
 (0)