feat(generated): Changes to pipes - #450
workos-sdk-automation[bot] wants to merge 4 commits into
Conversation
|
| string $slug, | ||
| ?\WorkOS\RequestOptions $options = null, | ||
| ): \WorkOS\Resource\ConnectedAccount { | ||
| $body = [ |
There was a problem hiding this comment.
Credential updates send empty bodies When a caller installs or rotates an API key through PUT, this method sends no
user_id or secret. The client-credentials PUT likewise omits user_id, client_id, and client_secret. Both requests lack fields required for the documented upsert, so installation and rotation cannot succeed. The new POST methods are creation-only and cannot rotate an existing connection.
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/Service/Pipes.php
Line: 240
Comment:
**Credential updates send empty bodies** When a caller installs or rotates an API key through PUT, this method sends no `user_id` or `secret`. The client-credentials PUT likewise omits `user_id`, `client_id`, and `client_secret`. Both requests lack fields required for the documented upsert, so installation and rotation cannot succeed. The new POST methods are creation-only and cannot rotate an existing connection.
**Knowledge Base Used:**
- [Application and data integrations](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-php/-/docs/integrations.md)
- [Connect and data integrations](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-php/-/docs/connect-and-data-integrations.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| ?\WorkOS\Resource\PipeConnectedAccountState $state = null, | ||
| ?bool $supportsMultipleConnections = null, | ||
| ?string $connectedAccountId = null, | ||
| ?string $connectionIntent = null, |
There was a problem hiding this comment.
Reauthorization selectors are dropped When a caller supplies
connectionIntent: 'reauthorize' and a connectedAccountId, this organization update sends neither field. The user update also drops them. The request therefore cannot target the specified connection and may update the compatibility connection instead.
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/Service/Pipes.php
Line: 618
Comment:
**Reauthorization selectors are dropped** When a caller supplies `connectionIntent: 'reauthorize'` and a `connectedAccountId`, this organization update sends neither field. The user update also drops them. The request therefore cannot target the specified connection and may update the compatibility connection instead.
**Knowledge Base Used:**
- [Application and data integrations](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-php/-/docs/integrations.md)
- [Connect and data integrations](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-php/-/docs/connect-and-data-integrations.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| ?\DateTimeImmutable $expiresAt = null, | ||
| ?array $scopes = null, | ||
| ?\WorkOS\Resource\PipeConnectedAccountState $state = null, | ||
| ?string $connectionIntent = null, |
There was a problem hiding this comment.
Positional organization IDs become intents For an existing positional
createUserConnectedAccount call, the organization ID now lands in connectionIntent instead of organizationId. It is sent as connection_intent, which only accepts add, so the request is rejected rather than creating the connection.
Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/Service/Pipes.php
Line: 752
Comment:
**Positional organization IDs become intents** For an existing positional `createUserConnectedAccount` call, the organization ID now lands in `connectionIntent` instead of `organizationId`. It is sent as `connection_intent`, which only accepts `add`, so the request is rejected rather than creating the connection.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| $fixture = $this->loadFixture('connected_account'); | ||
| $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]); | ||
| $result = $client->pipes()->updateDataIntegrationApiKey('test_slug', userId: 'test_value', secret: 'test_value'); | ||
| $result = $client->pipes()->createDataIntegrationApiKey('test_slug', userId: 'test_value', secret: 'test_value', connectionIntent: 'test_value'); |
There was a problem hiding this comment.
Creation tests use invalid intents Both new POST tests pass
test_value even though the endpoint requires add, and they check only that connection_intent exists. The tests can therefore pass for requests the API would reject, leaving the new creation contract untested. Use add and assert the serialized value.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/Service/PipesTest.php
Line: 90
Comment:
**Creation tests use invalid intents** Both new POST tests pass `test_value` even though the endpoint requires `add`, and they check only that `connection_intent` exists. The tests can therefore pass for requests the API would reject, leaving the new creation contract untested. Use `add` and assert the serialized value.
---
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!
Summary
feat(pipes): Change Pipes API surface
Triggered by workos/openapi-spec@0b0182d
BEGIN_COMMIT_OVERRIDE
feat(pipes): Change Pipes API surface (#450)
END_COMMIT_OVERRIDE