Skip to content

feat: add group, pipes, and authorization additive API support#367

Merged
gjtorikian merged 2 commits intomainfrom
additive-api-support
Apr 20, 2026
Merged

feat: add group, pipes, and authorization additive API support#367
gjtorikian merged 2 commits intomainfrom
additive-api-support

Conversation

@workos-sdk-automation
Copy link
Copy Markdown
Contributor

@workos-sdk-automation workos-sdk-automation bot commented Apr 20, 2026

A user wrote in noting that some data was missing; this was due to a slight error in the oagen-emitter logic.

@workos-sdk-automation workos-sdk-automation bot requested review from a team as code owners April 20, 2026 18:22
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 20, 2026

Greptile Summary

This auto-generated PR adds resource classes for Group events, GroupMemberAdded/Removed payloads, PasswordHashed, PasswordPlaintext, and RoleMultiple/Single service DTOs, along with supporting DataIntegrationAccessTokenResponseAccessToken and DataIntegrationAccessTokenResponseError types for the Pipes API.

  • The core data-missing bug described in the PR description appears not yet fixed: DataIntegrationAccessTokenResponse (the class returned by Pipes::createDataIntegrationToken) is still an empty class with no properties and deserializes nothing. The newly added DataIntegrationAccessTokenResponseAccessToken and DataIntegrationAccessTokenResponseError are unreferenced from it, so callers still cannot read the access token, active flag, or error from the response.

Confidence Score: 4/5

The group and authorization classes look correct, but the Pipes access token fix is incomplete — the parent response class is still empty and the new nested types are never wired in.

One P1 finding: the primary motivation of the PR (fixing missing data in the access token response) does not appear to be addressed in DataIntegrationAccessTokenResponse itself, which remains a no-op class.

lib/Resource/DataIntegrationAccessTokenResponse.php (not in the diff but should be) and lib/Resource/DataIntegrationAccessTokenResponseAccessToken.php

Important Files Changed

Filename Overview
lib/Resource/DataIntegrationAccessTokenResponseAccessToken.php New class representing the access_token sub-object, but the parent DataIntegrationAccessTokenResponse is still empty and never uses it — the data-missing bug is not resolved.
lib/Resource/DataIntegrationAccessTokenResponseError.php Correct enum for error values; unreferenced by parent class in this PR.
lib/Resource/Group.php New Group resource class with correct fromArray/toArray round-trip and DateTimeImmutable handling.
lib/Resource/GroupCreated.php GroupCreated event wrapper; correct structure mirroring existing DsyncGroupCreated pattern.
lib/Resource/GroupMemberAdded.php GroupMemberAdded event wrapper using GroupMemberAddedData; correct fromArray delegation.
lib/Resource/GroupMemberAddedData.php Payload DTO with group_id and organization_membership_id fields; consistent with fixture.
lib/Service/RoleMultiple.php Previously flagged type bug (string vs array) is now fixed — $slugs is correctly typed as array.
lib/Service/PasswordHashed.php Simple request DTO holding hash and hashType; no issues.
lib/Service/PasswordPlaintext.php Simple request DTO holding plaintext password; no issues with the class itself.

Class Diagram

%%{init: {'theme': 'neutral'}}%%
classDiagram
    class DataIntegrationAccessTokenResponse {
        +fromArray(array data) self
        +toArray() array
    }
    class DataIntegrationAccessTokenResponseAccessToken {
        +string object
        +string accessToken
        +string|null expiresAt
        +array scopes
        +array missingScopes
    }
    class DataIntegrationAccessTokenResponseError {
        <<enumeration>>
        NeedsReauthorization
        NotInstalled
    }
    DataIntegrationAccessTokenResponse ..> DataIntegrationAccessTokenResponseAccessToken : missing link
    DataIntegrationAccessTokenResponse ..> DataIntegrationAccessTokenResponseError : missing link
    class Group {
        +string object
        +string id
        +string organizationId
        +string name
        +string|null description
        +DateTimeImmutable createdAt
        +DateTimeImmutable updatedAt
    }
    class GroupCreated { +Group data }
    class GroupDeleted { +Group data }
    class GroupUpdated { +Group data }
    class GroupMemberAdded { +GroupMemberAddedData data }
    class GroupMemberRemoved { +GroupMemberRemovedData data }
    class GroupMemberAddedData {
        +string groupId
        +string organizationMembershipId
    }
    class GroupMemberRemovedData {
        +string groupId
        +string organizationMembershipId
    }
    GroupCreated --> Group
    GroupDeleted --> Group
    GroupUpdated --> Group
    GroupMemberAdded --> GroupMemberAddedData
    GroupMemberRemoved --> GroupMemberRemovedData
Loading

Reviews (2): Last reviewed commit: "fix core array issue" | Re-trigger Greptile

Comment thread lib/Service/RoleMultiple.php Outdated
@gjtorikian gjtorikian merged commit c90a5d6 into main Apr 20, 2026
8 checks passed
@gjtorikian gjtorikian deleted the additive-api-support branch April 20, 2026 18:31
Comment on lines +1 to +10
<?php

declare(strict_types=1);

// This file is auto-generated by oagen. Do not edit.

namespace WorkOS\Resource;

/** The [access token](https://workos.com/docs/reference/pipes/access-token) object, present when `active` is `true`. */
readonly class DataIntegrationAccessTokenResponseAccessToken implements \JsonSerializable
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 New nested types never wired into parent class

DataIntegrationAccessTokenResponse (the class actually returned by Pipes::createDataIntegrationToken) is still completely empty — it has no constructor properties and deserializes nothing. The two new classes added in this PR (DataIntegrationAccessTokenResponseAccessToken, DataIntegrationAccessTokenResponseError) exist in isolation but are never referenced from DataIntegrationAccessTokenResponse, so callers still cannot access the access token, active flag, or error from the API response. The original "data was missing" bug is not fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant