-
Notifications
You must be signed in to change notification settings - Fork 32
feat(generated): Pipes (batch 8ad8e447) #550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| * [#550](https://github.com/workos/workos-ruby/pull/550) fix(generated): regenerate from spec | ||
|
|
||
| **Features** | ||
| * **[pipes](https://workos.com/docs/reference/pipes)**: | ||
| * Added `connected_account_id` to `DataIntegrationsVendCredentialsRequest` | ||
| * Added `connected_account_id` to `DataIntegrationsGetUserTokenRequest` | ||
| * Added parameter `UserManagementDataProviders.getUserDataInstallation.connected_account_id` | ||
| * Changed errors for endpoint `GET /user_management/users/{user_id}/connected_accounts/{slug}` | ||
| * Added parameter `UserManagementDataProviders.updateUserDataInstallation.connected_account_id` | ||
| * Changed errors for endpoint `PUT /user_management/users/{user_id}/connected_accounts/{slug}` | ||
| * Added parameter `UserManagementDataProviders.deleteUserDataInstallation.connected_account_id` | ||
| * Changed errors for endpoint `DELETE /user_management/users/{user_id}/connected_accounts/{slug}` | ||
| * Added `connected_accounts` to `DataIntegrationsListResponseData` | ||
| * Changed errors for endpoint `PUT /data-integrations/{slug}` | ||
| * Changed errors for endpoint `PUT /data-integrations/{slug}/api-key` | ||
| * Changed errors for endpoint `PUT /data-integrations/{slug}/client-credentials` | ||
| * Changed errors for endpoint `POST /data-integrations/{slug}/credentials` | ||
| * Changed errors for endpoint `POST /data-integrations/{provider}/token` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| edb560e2be3f54b668ea8d11fa5a060c87ab5087 | ||
| 6fba233c50a5b651b2df7b859b75bfe715bc825a |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,30 +107,33 @@ module WorkOS | |
| slug: String, | ||
| user_id: String, | ||
| organization_id: T.nilable(String), | ||
| connected_account_id: T.nilable(String), | ||
| request_options: T::Hash[Symbol, T.untyped] | ||
| ).returns(WorkOS::DataIntegrationCredentialsResponse) | ||
| end | ||
| def create_data_integration_credential(slug:, user_id:, organization_id:, request_options:); end | ||
| def create_data_integration_credential(slug:, user_id:, organization_id:, connected_account_id:, request_options:); end | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The Ruby methods allow callers to omit Prompt To Fix With AIThis is a comment left during a code review.
Path: rbi/workos/pipes.rbi
Line: 114
Comment:
**Optional keyword declared required**
The Ruby methods allow callers to omit `connected_account_id` by defaulting it to `nil`, but these RBI declarations make the keyword required. Existing Sorbet callers that omit it will therefore get a missing-keyword error even though the call is valid at runtime. Preserve the runtime default in all five updated Pipes declarations.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly. |
||
|
|
||
| sig do | ||
| params( | ||
| provider: String, | ||
| user_id: String, | ||
| organization_id: T.nilable(String), | ||
| connected_account_id: T.nilable(String), | ||
| request_options: T::Hash[Symbol, T.untyped] | ||
| ).returns(WorkOS::DataIntegrationAccessTokenResponse) | ||
| end | ||
| def get_access_token(provider:, user_id:, organization_id:, request_options:); end | ||
| def get_access_token(provider:, user_id:, organization_id:, connected_account_id:, request_options:); end | ||
|
|
||
| sig do | ||
| params( | ||
| user_id: String, | ||
| slug: String, | ||
| organization_id: T.nilable(String), | ||
| connected_account_id: T.nilable(String), | ||
| request_options: T::Hash[Symbol, T.untyped] | ||
| ).returns(WorkOS::ConnectedAccount) | ||
| end | ||
| def get_user_connected_account(user_id:, slug:, organization_id:, request_options:); end | ||
| def get_user_connected_account(user_id:, slug:, organization_id:, connected_account_id:, request_options:); end | ||
|
|
||
| sig do | ||
| params( | ||
|
|
@@ -157,20 +160,22 @@ module WorkOS | |
| scopes: T.nilable(T::Array[String]), | ||
| state: T.nilable(String), | ||
| organization_id: T.nilable(String), | ||
| connected_account_id: T.nilable(String), | ||
| request_options: T::Hash[Symbol, T.untyped] | ||
| ).returns(WorkOS::ConnectedAccount) | ||
| end | ||
| def update_user_connected_account(user_id:, slug:, access_token:, refresh_token:, expires_at:, scopes:, state:, organization_id:, request_options:); end | ||
| def update_user_connected_account(user_id:, slug:, access_token:, refresh_token:, expires_at:, scopes:, state:, organization_id:, connected_account_id:, request_options:); end | ||
|
|
||
| sig do | ||
| params( | ||
| user_id: String, | ||
| slug: String, | ||
| organization_id: T.nilable(String), | ||
| connected_account_id: T.nilable(String), | ||
| request_options: T::Hash[Symbol, T.untyped] | ||
| ).returns(NilClass) | ||
| end | ||
| def delete_user_connected_account(user_id:, slug:, organization_id:, request_options:); end | ||
| def delete_user_connected_account(user_id:, slug:, organization_id:, connected_account_id:, request_options:); end | ||
|
|
||
| sig do | ||
| params( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -240,7 +240,8 @@ def test_data_integrations_list_response_data_round_trip | |
| "ownership" => "stub", | ||
| "created_at" => "stub", | ||
| "updated_at" => "stub", | ||
| "connected_account" => nil | ||
| "connected_account" => nil, | ||
| "connected_accounts" => [] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new fixture uses an empty Knowledge Base Used: Connect, Pipes, and Admin Portal Prompt To Fix With AIThis is a comment left during a code review.
Path: test/workos/test_pipes_model_round_trip.rb
Line: 244
Comment:
**Nested accounts remain untested**
The new fixture uses an empty `connected_accounts` array, so it never exercises construction or serialization of a nested connected-account model. Use at least one representative account and assert its nested values; otherwise an incorrect element class or serialization mapping could pass this test.
**Knowledge Base Used:** [Connect, Pipes, and Admin Portal](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-ruby/-/docs/connect-pipes-and-admin-portal.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
| } | ||
| model = WorkOS::DataIntegrationsListResponseData.new(fixture.to_json) | ||
| json = model.to_h | ||
|
|
@@ -397,7 +398,8 @@ def test_data_integrations_upsert_client_credentials_request_round_trip | |
| def test_data_integrations_vend_credentials_request_round_trip | ||
| fixture = { | ||
| "user_id" => "stub", | ||
| "organization_id" => "stub" | ||
| "organization_id" => "stub", | ||
| "connected_account_id" => "stub" | ||
| } | ||
| model = WorkOS::DataIntegrationsVendCredentialsRequest.new(fixture.to_json) | ||
| json = model.to_h | ||
|
|
@@ -409,7 +411,8 @@ def test_data_integrations_vend_credentials_request_round_trip | |
| def test_data_integrations_get_user_token_request_round_trip | ||
| fixture = { | ||
| "user_id" => "stub", | ||
| "organization_id" => nil | ||
| "organization_id" => nil, | ||
| "connected_account_id" => "stub" | ||
| } | ||
| model = WorkOS::DataIntegrationsGetUserTokenRequest.new(fixture.to_json) | ||
| json = model.to_h | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of the five updated operations has a request test that supplies
connected_account_idand checks where it is serialized. Add coverage for both the POST-body and query-parameter forms so a future generator regression cannot silently place the account selector in the wrong part of the request.Knowledge Base Used: Connect, Pipes, and Admin Portal
Prompt To Fix With AI
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!