feat(generated): Changes to agents, pipes, and user_management - #443
Conversation
…iKeys, AuditLogs, Authorization, ClientApi, Connect, DirectorySync, Events, FeatureFlags, Groups, MultiFactorAuth, OrganizationDomains, OrganizationMembership, Organizations, Pipes, PipesProvider, PlatformTeams, Radar, SSO, UserManagement, Vault, Webhooks, Widgets
|
| */ | ||
| public function createDataIntegration( | ||
| string $provider, | ||
| ?\WorkOS\Resource\PipesOwnership $ownership = null, |
There was a problem hiding this comment.
Adding $ownership before the existing $description argument breaks positional callers of createDataIntegration(). For example, a previously valid call that passes a description as its second argument now supplies that string to ?PipesOwnership and throws a TypeError. The same insertion pattern affects Agents::listSessions(), where existing positional blueprint and instance filters are silently rebound to organization and blueprint filters. Append new optional parameters after the existing endpoint arguments to preserve the published call order.
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/Service/Pipes.php
Line: 78
Comment:
**Positional calls break**
Adding `$ownership` before the existing `$description` argument breaks positional callers of `createDataIntegration()`. For example, a previously valid call that passes a description as its second argument now supplies that string to `?PipesOwnership` and throws a `TypeError`. The same insertion pattern affects `Agents::listSessions()`, where existing positional blueprint and instance filters are silently rebound to organization and blueprint filters. Append new optional parameters after the existing endpoint arguments to preserve the published call order.
**Knowledge Base Used:**
- [Application and data integrations](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-php/-/docs/integrations.md)
- [Agents and blueprints](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-php/-/docs/agents-and-blueprints.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| $body = array_filter([ | ||
| 'description' => $description, | ||
| 'enabled' => $enabled, | ||
| 'scopes' => $scopes, | ||
| 'credentials' => $credentials, | ||
| 'api_key' => $apiKey, | ||
| 'custom_provider' => $customProvider, | ||
| ], fn ($v) => $v !== null); |
There was a problem hiding this comment.
The new organization update method documents scopes: null as the way to reset scopes, but this filter removes the scopes key before the request is serialized. A caller following the documented contract therefore sends an omitted field, leaving the integration's scopes unchanged instead of resetting them. The method needs to distinguish an omitted argument from an explicit JSON null.
Knowledge Base Used: Application and data integrations
Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/Service/Pipes.php
Line: 389-396
Comment:
**Scope reset is discarded**
The new organization update method documents `scopes: null` as the way to reset scopes, but this filter removes the `scopes` key before the request is serialized. A caller following the documented contract therefore sends an omitted field, leaving the integration's scopes unchanged instead of resetting them. The method needs to distinguish an omitted argument from an explicit JSON `null`.
**Knowledge Base Used:** [Application and data integrations](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-php/-/docs/integrations.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| ?array $scopes = null, | ||
| ?\WorkOS\Resource\PipeConnectedAccountState $state = null, | ||
| ?string $organizationId = null, | ||
| ?bool $supportsMultipleConnections = null, |
There was a problem hiding this comment.
updateUserConnectedAccount() accepts supportsMultipleConnections, but it never includes the value in the query or request body. Passing true therefore has no effect: the server continues using the compatibility connection contract instead of the requested plural contract and cannot reliably update the selected connection when several accounts exist.
Knowledge Base Used: Application and data integrations
Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/Service/Pipes.php
Line: 565
Comment:
**Connection flag is ignored**
`updateUserConnectedAccount()` accepts `supportsMultipleConnections`, but it never includes the value in the query or request body. Passing `true` therefore has no effect: the server continues using the compatibility connection contract instead of the requested plural contract and cannot reliably update the selected connection when several accounts exist.
**Knowledge Base Used:** [Application and data integrations](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-php/-/docs/integrations.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
feat(agents): Add parameter
AgentsSessions.list.organization_idAgentsSessions.list.organization_id.feat(pipes): Update Pipes API surface
PipesOwnership.usertoCreateDataIntegrationOwnership.usertoDataIntegrationOwnership.GET /data-integrations/{slug}/organization.PUT /data-integrations/{slug}/organization.DELETE /data-integrations/{slug}/organization.Pipes.listDataIntegrations.ownership.GET /data-integrations.PUT /user_management/users/{user_id}/connected_accounts/{slug}.DELETE /user_management/users/{user_id}/connected_accounts/{slug}.feat(user_management): Add user management API surface
CreateAuthkitOAuthResource.AuthkitOAuthResource.UserManagementAuthkitOAuthResources.fix(pipes): Update Pipes API surface
userland_userfromCreateDataIntegrationOwnership.userland_userfromDataIntegrationOwnership.POST /user_management/users/{user_id}/connected_accounts/{slug}.Triggered by workos/openapi-spec@0b4d419
BEGIN_COMMIT_OVERRIDE
feat(agents): Add parameter
AgentsSessions.list.organization_id(#443)feat(pipes): Update Pipes API surface (#443)
feat(user_management): Add user management API surface (#443)
fix(pipes): Update Pipes API surface (#443)
END_COMMIT_OVERRIDE