Skip to content

Add support for creating, getting and updating users with external_id property #267

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

Merged
merged 2 commits into from
Mar 21, 2025

Conversation

pepeloper
Copy link
Contributor

Description

This PR adds support for creating a user with an external_id property, the option to get a user by their external_id, and the ability to update the external_id property for a user.

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

@pepeloper pepeloper requested a review from a team as a code owner March 19, 2025 22:20
@pepeloper pepeloper requested a review from gcarvelli March 19, 2025 22:20
@ericroberts
Copy link
Contributor

Thank you! I had made some of these changes in #268, I didn't notice this one first. I had forgotten to add getUserByExternalId though so I fixed the conflicts and this looks good to go

@mattgd mattgd merged commit a223b60 into workos:main Mar 21, 2025
5 checks passed
bradenkeith pushed a commit to bradenkeith/workos-php that referenced this pull request Mar 28, 2025
nicknisi pushed a commit that referenced this pull request Apr 2, 2025
* Improve Webhook and BaseWorkOSResource PHPDoc types

* Enhance Webhook class with improved code style and PHPDoc annotations

* Add accessToken and refreshToken to AuthenticationResponse class

* Update AuthenticationResponse class to include organizationId as nullable, and add accessToken, refreshToken, and impersonator properties

* Enhance OrganizationMembership class with additional PHPDoc properties for improved type documentation

* Add metadata and external id (#268)

And allow to be passed when creating or updating a user or organization.

* Add email standard attribute to DirectoryUser and mark deprecated standard attributes (#261)

* Add function to get organization by external id (#270)

And fix typo in getOrganization docstring

* Add support for creating, getting and updating users with external_id property (#267)

Co-authored-by: Eric Roberts <[email protected]>

* Bump to version 4.22.0. (#269)

* Structured responses to webhook events (#265)

* Add WebhookResponse class for handling webhook actions and responses

* Refactor WebhookResponse create method and improve validation

* Resolve linting error

---------

Co-authored-by: Braden Keith <[email protected]>

* Update deprecation notices in DirectoryUser class to include version information and improve clarity

* Update deprecation notices in Organizations class to include version information and improve formatting

* Update doc blocks for deprecation notices

* Update tests to expect Role Slug

---------

Co-authored-by: Braden Keith <[email protected]>
Co-authored-by: Eric Roberts <[email protected]>
Co-authored-by: Matt Dzwonczyk <[email protected]>
Co-authored-by: Pepe <[email protected]>
bradenkeith added a commit to bradenkeith/workos-php that referenced this pull request Apr 3, 2025
* Improve Webhook and BaseWorkOSResource PHPDoc types

* Enhance Webhook class with improved code style and PHPDoc annotations

* Add accessToken and refreshToken to AuthenticationResponse class

* Update AuthenticationResponse class to include organizationId as nullable, and add accessToken, refreshToken, and impersonator properties

* Enhance OrganizationMembership class with additional PHPDoc properties for improved type documentation

* Add metadata and external id (workos#268)

And allow to be passed when creating or updating a user or organization.

* Add email standard attribute to DirectoryUser and mark deprecated standard attributes (workos#261)

* Add function to get organization by external id (workos#270)

And fix typo in getOrganization docstring

* Add support for creating, getting and updating users with external_id property (workos#267)

Co-authored-by: Eric Roberts <[email protected]>

* Bump to version 4.22.0. (workos#269)

* Structured responses to webhook events (workos#265)

* Add WebhookResponse class for handling webhook actions and responses

* Refactor WebhookResponse create method and improve validation

* Resolve linting error

---------

Co-authored-by: Braden Keith <[email protected]>

* Update deprecation notices in DirectoryUser class to include version information and improve clarity

* Update deprecation notices in Organizations class to include version information and improve formatting

* Update doc blocks for deprecation notices

* Update tests to expect Role Slug

---------

Co-authored-by: Braden Keith <[email protected]>
Co-authored-by: Eric Roberts <[email protected]>
Co-authored-by: Matt Dzwonczyk <[email protected]>
Co-authored-by: Pepe <[email protected]>
bradenkeith pushed a commit to bradenkeith/workos-php that referenced this pull request Apr 3, 2025
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.

3 participants