Merged
Conversation
Contributor
Author
|
This documentation shows "access_token" and "refresh_token" should be part of AuthenticationResponse payload. I have updated the resource accordingly. |
…able, and add accessToken, refreshToken, and impersonator properties
…s for improved type documentation
Contributor
Author
|
This documentation shows "role" should be part of OrganizationMembership payload. I have updated the resource accordingly. I have also type hinted the class properties to resolve IDE issues. |
Member
|
@bradenkeith it looks like there's some conflicts and test failures in this. |
And allow to be passed when creating or updating a user or organization.
…ndard attributes (workos#261)
And fix typo in getOrganization docstring
… property (workos#267) Co-authored-by: Eric Roberts <ericroberts@gmail.com>
* Add WebhookResponse class for handling webhook actions and responses * Refactor WebhookResponse create method and improve validation * Resolve linting error --------- Co-authored-by: Braden Keith <bkeith@romegadigital.com>
…information and improve clarity
…information and improve formatting
Contributor
Author
|
@nicknisi Should be good for another review. Thank you. |
nicknisi
approved these changes
Apr 2, 2025
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 <ericroberts@gmail.com> * 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 <bkeith@romegadigital.com> * 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 <bkeith@romegadigital.com> Co-authored-by: Eric Roberts <ericroberts@gmail.com> Co-authored-by: Matt Dzwonczyk <9063128+mattgd@users.noreply.github.com> Co-authored-by: Pepe <pgarciag93@gmail.com>
shadowhand
reviewed
Apr 29, 2025
Comment on lines
+16
to
+34
| * @param array $event An associative array with the following keys: | ||
| * - **action** (string, *required*): Specific activity performed by the actor. | ||
| * - **occurred_at** (string, *required*): ISO-8601 datetime when the event occurred. | ||
| * - **actor** (array, *required*): Associative array describing the actor. | ||
| * - **id** (string, *required*): Unique identifier for the actor. | ||
| * - **name** (string, *optional*): Name of the actor. | ||
| * - **type** (string, *required*): Type or role of the actor. | ||
| * - **metadata** (array, *optional*): Arbitrary key-value data. | ||
| * - **targets** (array, *required*): Array of associative arrays for each target. | ||
| * Each target includes: | ||
| * - **id** (string, *required*): Unique identifier for the target. | ||
| * - **name** (string, *optional*): Name of the target. | ||
| * - **type** (string, *required*): Type or category of the target. | ||
| * - **metadata** (array, *optional*): Arbitrary key-value data. | ||
| * - **context** (array, *required*): Associative array providing additional context. | ||
| * - **location** (string, *required*): Location associated with the event. | ||
| * - **user_agent** (string, *optional*): User agent string if applicable. | ||
| * - **version** (int, *optional*): Event version. Required if the version is not 1. | ||
| * - **metadata** (array, *optional*): Additional arbitrary key-value data for the event. |
There was a problem hiding this comment.
Using array shapes would improve this even more.
shadowhand
reviewed
Apr 29, 2025
|
|
||
|
|
||
| /** | ||
| * @deprecated 1.12.0 Use `verifyChallenge` instead. This method will be removed in a future major version. |
shadowhand
reviewed
Apr 29, 2025
| /** | ||
| * Class OrganizationMembership. | ||
| * | ||
| * @property 'organization_membership' $object |
shadowhand
reviewed
Apr 29, 2025
Comment on lines
+13
to
+18
| * @property-read ?object{ | ||
| * object: 'user_data', | ||
| * email: string, | ||
| * first_name: string, | ||
| * last_name: string | ||
| * } $user_data User information for registration events |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR has 2 elements to it:
Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.