From 919e48d68d9df1bdd66f1223989b1ad17d3f5c33 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 19:20:16 +0000 Subject: [PATCH 1/8] feat(user_management)!: Add name field to user models and remove returnTo from revokeSession --- lib/Resource/CreateUser.php | 4 ++++ lib/Resource/EmailChangeConfirmationUser.php | 4 ++++ lib/Resource/UpdateUser.php | 4 ++++ lib/Resource/User.php | 4 ++++ lib/Resource/UserObject.php | 4 ++++ lib/Service/UserManagement.php | 25 +++++++++++--------- 6 files changed, 34 insertions(+), 11 deletions(-) diff --git a/lib/Resource/CreateUser.php b/lib/Resource/CreateUser.php index da54f6ce..17910f46 100644 --- a/lib/Resource/CreateUser.php +++ b/lib/Resource/CreateUser.php @@ -17,6 +17,8 @@ public function __construct( public ?string $firstName = null, /** The last name of the user. */ public ?string $lastName = null, + /** The user's full name. */ + public ?string $name = null, /** Whether the user's email has been verified. */ public ?bool $emailVerified = null, /** @@ -41,6 +43,7 @@ public static function fromArray(array $data): self email: $data['email'], firstName: $data['first_name'] ?? null, lastName: $data['last_name'] ?? null, + name: $data['name'] ?? null, emailVerified: $data['email_verified'] ?? null, metadata: $data['metadata'] ?? null, externalId: $data['external_id'] ?? null, @@ -56,6 +59,7 @@ public function toArray(): array 'email' => $this->email, 'first_name' => $this->firstName, 'last_name' => $this->lastName, + 'name' => $this->name, 'email_verified' => $this->emailVerified, 'metadata' => $this->metadata, 'external_id' => $this->externalId, diff --git a/lib/Resource/EmailChangeConfirmationUser.php b/lib/Resource/EmailChangeConfirmationUser.php index 237641c6..058ba840 100644 --- a/lib/Resource/EmailChangeConfirmationUser.php +++ b/lib/Resource/EmailChangeConfirmationUser.php @@ -34,6 +34,8 @@ public function __construct( public \DateTimeImmutable $createdAt, /** An ISO 8601 timestamp. */ public \DateTimeImmutable $updatedAt, + /** The user's full name. */ + public ?string $name = null, /** * Object containing metadata key/value pairs associated with the user. * @var array|null @@ -58,6 +60,7 @@ public static function fromArray(array $data): self lastSignInAt: isset($data['last_sign_in_at']) ? new \DateTimeImmutable($data['last_sign_in_at']) : null, createdAt: new \DateTimeImmutable($data['created_at']), updatedAt: new \DateTimeImmutable($data['updated_at']), + name: $data['name'] ?? null, metadata: $data['metadata'] ?? null, locale: $data['locale'] ?? null, ); @@ -77,6 +80,7 @@ public function toArray(): array 'last_sign_in_at' => $this->lastSignInAt?->format(\DateTimeInterface::RFC3339_EXTENDED), 'created_at' => $this->createdAt->format(\DateTimeInterface::RFC3339_EXTENDED), 'updated_at' => $this->updatedAt->format(\DateTimeInterface::RFC3339_EXTENDED), + 'name' => $this->name, 'metadata' => $this->metadata, 'locale' => $this->locale, ]; diff --git a/lib/Resource/UpdateUser.php b/lib/Resource/UpdateUser.php index ffc727e4..84670781 100644 --- a/lib/Resource/UpdateUser.php +++ b/lib/Resource/UpdateUser.php @@ -17,6 +17,8 @@ public function __construct( public ?string $firstName = null, /** The last name of the user. */ public ?string $lastName = null, + /** The user's full name. */ + public ?string $name = null, /** Whether the user's email has been verified. */ public ?bool $emailVerified = null, /** @@ -43,6 +45,7 @@ public static function fromArray(array $data): self email: $data['email'] ?? null, firstName: $data['first_name'] ?? null, lastName: $data['last_name'] ?? null, + name: $data['name'] ?? null, emailVerified: $data['email_verified'] ?? null, metadata: $data['metadata'] ?? null, externalId: $data['external_id'] ?? null, @@ -59,6 +62,7 @@ public function toArray(): array 'email' => $this->email, 'first_name' => $this->firstName, 'last_name' => $this->lastName, + 'name' => $this->name, 'email_verified' => $this->emailVerified, 'metadata' => $this->metadata, 'external_id' => $this->externalId, diff --git a/lib/Resource/User.php b/lib/Resource/User.php index fe2f415c..ab0e7548 100644 --- a/lib/Resource/User.php +++ b/lib/Resource/User.php @@ -34,6 +34,8 @@ public function __construct( public \DateTimeImmutable $createdAt, /** An ISO 8601 timestamp. */ public \DateTimeImmutable $updatedAt, + /** The user's full name. */ + public ?string $name = null, /** * Object containing metadata key/value pairs associated with the user. * @var array|null @@ -58,6 +60,7 @@ public static function fromArray(array $data): self lastSignInAt: isset($data['last_sign_in_at']) ? new \DateTimeImmutable($data['last_sign_in_at']) : null, createdAt: new \DateTimeImmutable($data['created_at']), updatedAt: new \DateTimeImmutable($data['updated_at']), + name: $data['name'] ?? null, metadata: $data['metadata'] ?? null, locale: $data['locale'] ?? null, ); @@ -77,6 +80,7 @@ public function toArray(): array 'last_sign_in_at' => $this->lastSignInAt?->format(\DateTimeInterface::RFC3339_EXTENDED), 'created_at' => $this->createdAt->format(\DateTimeInterface::RFC3339_EXTENDED), 'updated_at' => $this->updatedAt->format(\DateTimeInterface::RFC3339_EXTENDED), + 'name' => $this->name, 'metadata' => $this->metadata, 'locale' => $this->locale, ]; diff --git a/lib/Resource/UserObject.php b/lib/Resource/UserObject.php index 5dad902c..8b749756 100644 --- a/lib/Resource/UserObject.php +++ b/lib/Resource/UserObject.php @@ -19,6 +19,8 @@ public function __construct( public ?string $firstName = null, /** The user's last name. */ public ?string $lastName = null, + /** The user's full name. */ + public ?string $name = null, /** * A set of key-value pairs to attach to the user. * @var array|null @@ -34,6 +36,7 @@ public static function fromArray(array $data): self email: $data['email'], firstName: $data['first_name'] ?? null, lastName: $data['last_name'] ?? null, + name: $data['name'] ?? null, metadata: $data['metadata'] ?? null, ); } @@ -45,6 +48,7 @@ public function toArray(): array 'email' => $this->email, 'first_name' => $this->firstName, 'last_name' => $this->lastName, + 'name' => $this->name, 'metadata' => $this->metadata, ]; } diff --git a/lib/Service/UserManagement.php b/lib/Service/UserManagement.php index df33f897..cca8b4b2 100644 --- a/lib/Service/UserManagement.php +++ b/lib/Service/UserManagement.php @@ -447,8 +447,8 @@ public function createDevice( * Logout * * Logout a user from the current [session](https://workos.com/docs/reference/authkit/session). - * @param string $sessionId The ID of the session to revoke. This can be extracted from the `sid` claim of the access token. - * @param string|null $returnTo The URL to redirect the user to after session revocation. + * @param string $sessionId The ID of the session. This can be extracted from the `sid` claim of the access token. + * @param string|null $returnTo The URL to redirect the user to after logout. * @return string */ public function getLogoutUrl( @@ -468,19 +468,16 @@ public function getLogoutUrl( * * Revoke a [user session](https://workos.com/docs/reference/authkit/session). * @param string $sessionId The ID of the session to revoke. This can be extracted from the `sid` claim of the access token. - * @param string|null $returnTo The URL to redirect the user to after session revocation. * @return mixed * @throws \WorkOS\Exception\WorkOSException */ public function revokeSession( string $sessionId, - ?string $returnTo = null, ?\WorkOS\RequestOptions $options = null, ): mixed { - $body = array_filter([ + $body = [ 'session_id' => $sessionId, - 'return_to' => $returnTo, - ], fn ($v) => $v !== null); + ]; $response = $this->client->request( method: 'POST', path: 'user_management/sessions/revoke', @@ -612,7 +609,7 @@ public function getPasswordReset( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param string|null $organization (deprecated) Filter users by the organization they are a member of. Deprecated in favor of `organization_id`. * @param string|null $organizationId Filter users by the organization they are a member of. * @param string|null $email Filter users by their email address. @@ -654,6 +651,7 @@ public function listUsers( * @param string $email The email address of the user. * @param string|null $firstName The first name of the user. * @param string|null $lastName The last name of the user. + * @param string|null $name The user's full name. * @param bool|null $emailVerified Whether the user's email has been verified. * @param array|null $metadata Object containing metadata key/value pairs associated with the user. * @param string|null $externalId The external ID of the user. @@ -665,6 +663,7 @@ public function createUser( string $email, ?string $firstName = null, ?string $lastName = null, + ?string $name = null, ?bool $emailVerified = null, ?array $metadata = null, ?string $externalId = null, @@ -675,6 +674,7 @@ public function createUser( 'email' => $email, 'first_name' => $firstName, 'last_name' => $lastName, + 'name' => $name, 'email_verified' => $emailVerified, 'metadata' => $metadata, 'external_id' => $externalId, @@ -742,6 +742,7 @@ public function getUser( * @param string|null $email The email address of the user. * @param string|null $firstName The first name of the user. * @param string|null $lastName The last name of the user. + * @param string|null $name The user's full name. * @param bool|null $emailVerified Whether the user's email has been verified. * @param array|null $metadata Object containing metadata key/value pairs associated with the user. * @param string|null $externalId The external ID of the user. @@ -755,6 +756,7 @@ public function updateUser( ?string $email = null, ?string $firstName = null, ?string $lastName = null, + ?string $name = null, ?bool $emailVerified = null, ?array $metadata = null, ?string $externalId = null, @@ -766,6 +768,7 @@ public function updateUser( 'email' => $email, 'first_name' => $firstName, 'last_name' => $lastName, + 'name' => $name, 'email_verified' => $emailVerified, 'metadata' => $metadata, 'external_id' => $externalId, @@ -931,7 +934,7 @@ public function getUserIdentities( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\UserSessionsListItem> * @throws \WorkOS\Exception\WorkOSException */ @@ -965,7 +968,7 @@ public function listSessions( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param string|null $organizationId The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join. * @param string|null $email The email address of the recipient. * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\UserInvite> @@ -1263,7 +1266,7 @@ public function createRedirectUri( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\AuthorizedConnectApplicationListData> * @throws \WorkOS\Exception\WorkOSException */ From a8f5877b11ce167427cd359c689e15a4be3360ad Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 19:20:16 +0000 Subject: [PATCH 2/8] feat(api_keys): Add expire API key operation and update expires_at requirement --- lib/Resource/ApiKeyCreatedData.php | 8 +- lib/Resource/ApiKeyRevokedData.php | 8 +- lib/Resource/ApiKeyUpdated.php | 50 ++++++++++++ lib/Resource/ApiKeyUpdatedData.php | 78 +++++++++++++++++++ lib/Resource/ApiKeyUpdatedDataOwner.php | 36 +++++++++ .../ApiKeyUpdatedDataPreviousAttribute.php | 33 ++++++++ lib/Resource/CreateWebhookEndpointEvents.php | 1 + lib/Resource/ExpireApiKey.php | 32 ++++++++ lib/Resource/UserApiKeyUpdatedDataOwner.php | 40 ++++++++++ lib/Service/ApiKeys.php | 27 +++++++ tests/Service/ApiKeysTest.php | 14 ++++ 11 files changed, 319 insertions(+), 8 deletions(-) create mode 100644 lib/Resource/ApiKeyUpdated.php create mode 100644 lib/Resource/ApiKeyUpdatedData.php create mode 100644 lib/Resource/ApiKeyUpdatedDataOwner.php create mode 100644 lib/Resource/ApiKeyUpdatedDataPreviousAttribute.php create mode 100644 lib/Resource/ExpireApiKey.php create mode 100644 lib/Resource/UserApiKeyUpdatedDataOwner.php diff --git a/lib/Resource/ApiKeyCreatedData.php b/lib/Resource/ApiKeyCreatedData.php index 6e340969..14405e78 100644 --- a/lib/Resource/ApiKeyCreatedData.php +++ b/lib/Resource/ApiKeyCreatedData.php @@ -24,6 +24,8 @@ public function __construct( public string $obfuscatedValue, /** The timestamp when the API key was last used. */ public ?string $lastUsedAt, + /** Timestamp when the API Key expires. Null means the key does not expire. */ + public ?\DateTimeImmutable $expiresAt, /** * The permissions granted to the API key. * @var array @@ -33,8 +35,6 @@ public function __construct( public string $createdAt, /** The timestamp when the API key was last updated. */ public string $updatedAt, - /** Timestamp when the API Key expires. Null means the key does not expire. */ - public ?\DateTimeImmutable $expiresAt = null, ) { } @@ -49,10 +49,10 @@ public static function fromArray(array $data): self name: $data['name'], obfuscatedValue: $data['obfuscated_value'], lastUsedAt: $data['last_used_at'] ?? null, + expiresAt: isset($data['expires_at']) ? new \DateTimeImmutable($data['expires_at']) : null, permissions: $data['permissions'], createdAt: $data['created_at'], updatedAt: $data['updated_at'], - expiresAt: isset($data['expires_at']) ? new \DateTimeImmutable($data['expires_at']) : null, ); } @@ -65,10 +65,10 @@ public function toArray(): array 'name' => $this->name, 'obfuscated_value' => $this->obfuscatedValue, 'last_used_at' => $this->lastUsedAt, + 'expires_at' => $this->expiresAt?->format(\DateTimeInterface::RFC3339_EXTENDED), 'permissions' => $this->permissions, 'created_at' => $this->createdAt, 'updated_at' => $this->updatedAt, - 'expires_at' => $this->expiresAt?->format(\DateTimeInterface::RFC3339_EXTENDED), ]; } } diff --git a/lib/Resource/ApiKeyRevokedData.php b/lib/Resource/ApiKeyRevokedData.php index 3f0a7898..78707950 100644 --- a/lib/Resource/ApiKeyRevokedData.php +++ b/lib/Resource/ApiKeyRevokedData.php @@ -24,6 +24,8 @@ public function __construct( public string $obfuscatedValue, /** The timestamp when the API key was last used. */ public ?string $lastUsedAt, + /** Timestamp when the API Key expires. Null means the key does not expire. */ + public ?\DateTimeImmutable $expiresAt, /** * The permissions granted to the API key. * @var array @@ -33,8 +35,6 @@ public function __construct( public string $createdAt, /** The timestamp when the API key was last updated. */ public string $updatedAt, - /** Timestamp when the API Key expires. Null means the key does not expire. */ - public ?\DateTimeImmutable $expiresAt = null, ) { } @@ -49,10 +49,10 @@ public static function fromArray(array $data): self name: $data['name'], obfuscatedValue: $data['obfuscated_value'], lastUsedAt: $data['last_used_at'] ?? null, + expiresAt: isset($data['expires_at']) ? new \DateTimeImmutable($data['expires_at']) : null, permissions: $data['permissions'], createdAt: $data['created_at'], updatedAt: $data['updated_at'], - expiresAt: isset($data['expires_at']) ? new \DateTimeImmutable($data['expires_at']) : null, ); } @@ -65,10 +65,10 @@ public function toArray(): array 'name' => $this->name, 'obfuscated_value' => $this->obfuscatedValue, 'last_used_at' => $this->lastUsedAt, + 'expires_at' => $this->expiresAt?->format(\DateTimeInterface::RFC3339_EXTENDED), 'permissions' => $this->permissions, 'created_at' => $this->createdAt, 'updated_at' => $this->updatedAt, - 'expires_at' => $this->expiresAt?->format(\DateTimeInterface::RFC3339_EXTENDED), ]; } } diff --git a/lib/Resource/ApiKeyUpdated.php b/lib/Resource/ApiKeyUpdated.php new file mode 100644 index 00000000..1cb50b89 --- /dev/null +++ b/lib/Resource/ApiKeyUpdated.php @@ -0,0 +1,50 @@ + $this->object, + 'id' => $this->id, + 'event' => $this->event, + 'data' => $this->data->toArray(), + 'created_at' => $this->createdAt->format(\DateTimeInterface::RFC3339_EXTENDED), + 'context' => $this->context?->toArray(), + ]; + } +} diff --git a/lib/Resource/ApiKeyUpdatedData.php b/lib/Resource/ApiKeyUpdatedData.php new file mode 100644 index 00000000..10bfa554 --- /dev/null +++ b/lib/Resource/ApiKeyUpdatedData.php @@ -0,0 +1,78 @@ + + */ + public array $permissions, + /** The timestamp when the API key was created. */ + public string $createdAt, + /** The timestamp when the API key was last updated. */ + public string $updatedAt, + /** Previous API key attributes before the update. */ + public ApiKeyUpdatedDataPreviousAttribute $previousAttributes, + ) { + } + + public static function fromArray(array $data): self + { + return new self( + object: $data['object'] ?? 'api_key', + id: $data['id'], + owner: match ($data['owner']['type'] ?? null) { + 'organization' => ApiKeyUpdatedDataOwner::fromArray($data['owner']), 'user' => UserApiKeyUpdatedDataOwner::fromArray($data['owner']), default => throw new \UnexpectedValueException(sprintf('Unknown type: %s', json_encode($data['owner']['type'] ?? null))) + }, + name: $data['name'], + obfuscatedValue: $data['obfuscated_value'], + lastUsedAt: $data['last_used_at'] ?? null, + expiresAt: isset($data['expires_at']) ? new \DateTimeImmutable($data['expires_at']) : null, + permissions: $data['permissions'], + createdAt: $data['created_at'], + updatedAt: $data['updated_at'], + previousAttributes: ApiKeyUpdatedDataPreviousAttribute::fromArray($data['previous_attributes']), + ); + } + + public function toArray(): array + { + return [ + 'object' => $this->object, + 'id' => $this->id, + 'owner' => $this->owner->toArray(), + 'name' => $this->name, + 'obfuscated_value' => $this->obfuscatedValue, + 'last_used_at' => $this->lastUsedAt, + 'expires_at' => $this->expiresAt?->format(\DateTimeInterface::RFC3339_EXTENDED), + 'permissions' => $this->permissions, + 'created_at' => $this->createdAt, + 'updated_at' => $this->updatedAt, + 'previous_attributes' => $this->previousAttributes->toArray(), + ]; + } +} diff --git a/lib/Resource/ApiKeyUpdatedDataOwner.php b/lib/Resource/ApiKeyUpdatedDataOwner.php new file mode 100644 index 00000000..cfd25d04 --- /dev/null +++ b/lib/Resource/ApiKeyUpdatedDataOwner.php @@ -0,0 +1,36 @@ + $this->type, + 'id' => $this->id, + ]; + } +} diff --git a/lib/Resource/ApiKeyUpdatedDataPreviousAttribute.php b/lib/Resource/ApiKeyUpdatedDataPreviousAttribute.php new file mode 100644 index 00000000..17ea1209 --- /dev/null +++ b/lib/Resource/ApiKeyUpdatedDataPreviousAttribute.php @@ -0,0 +1,33 @@ + $this->expiresAt?->format(\DateTimeInterface::RFC3339_EXTENDED), + ]; + } +} diff --git a/lib/Resource/CreateWebhookEndpointEvents.php b/lib/Resource/CreateWebhookEndpointEvents.php index 13db3efd..a1d01166 100644 --- a/lib/Resource/CreateWebhookEndpointEvents.php +++ b/lib/Resource/CreateWebhookEndpointEvents.php @@ -25,6 +25,7 @@ enum CreateWebhookEndpointEvents: string case AuthenticationRadarRiskDetected = 'authentication.radar_risk_detected'; case ApiKeyCreated = 'api_key.created'; case ApiKeyRevoked = 'api_key.revoked'; + case ApiKeyUpdated = 'api_key.updated'; case ConnectionActivated = 'connection.activated'; case ConnectionDeactivated = 'connection.deactivated'; case ConnectionSAMLCertificateRenewalRequired = 'connection.saml_certificate_renewal_required'; diff --git a/lib/Resource/ExpireApiKey.php b/lib/Resource/ExpireApiKey.php new file mode 100644 index 00000000..5d53c6a2 --- /dev/null +++ b/lib/Resource/ExpireApiKey.php @@ -0,0 +1,32 @@ + $this->expiresAt?->format(\DateTimeInterface::RFC3339_EXTENDED), + ]; + } +} diff --git a/lib/Resource/UserApiKeyUpdatedDataOwner.php b/lib/Resource/UserApiKeyUpdatedDataOwner.php new file mode 100644 index 00000000..0059cd45 --- /dev/null +++ b/lib/Resource/UserApiKeyUpdatedDataOwner.php @@ -0,0 +1,40 @@ + $this->type, + 'id' => $this->id, + 'organization_id' => $this->organizationId, + ]; + } +} diff --git a/lib/Service/ApiKeys.php b/lib/Service/ApiKeys.php index 920935db..248aac92 100644 --- a/lib/Service/ApiKeys.php +++ b/lib/Service/ApiKeys.php @@ -6,6 +6,7 @@ namespace WorkOS\Service; +use WorkOS\Resource\ApiKey; use WorkOS\Resource\ApiKeyValidationResponse; use WorkOS\Resource\OrganizationApiKey; use WorkOS\Resource\OrganizationApiKeyWithValue; @@ -126,4 +127,30 @@ public function deleteApiKey( options: $options, ); } + + /** + * Expire an API key + * + * Expire an API key immediately, schedule a future expiration, or clear a scheduled future expiration. + * @param string $id The unique ID of the API key. + * @param \DateTimeImmutable|null $expiresAt When the API key should expire. If omitted or in the past, the key expires immediately. Use null to clear a scheduled future expiration. + * @return \WorkOS\Resource\ApiKey + * @throws \WorkOS\Exception\WorkOSException + */ + public function createApiKeyExpire( + string $id, + ?\DateTimeImmutable $expiresAt = null, + ?\WorkOS\RequestOptions $options = null, + ): \WorkOS\Resource\ApiKey { + $body = array_filter([ + 'expires_at' => $expiresAt, + ], fn ($v) => $v !== null); + $response = $this->client->request( + method: 'POST', + path: 'api_keys/' . rawurlencode($id) . '/expire', + body: $body, + options: $options, + ); + return ApiKey::fromArray($response); + } } diff --git a/tests/Service/ApiKeysTest.php b/tests/Service/ApiKeysTest.php index 818752a3..3e386604 100644 --- a/tests/Service/ApiKeysTest.php +++ b/tests/Service/ApiKeysTest.php @@ -68,6 +68,20 @@ public function testDeleteApiKey(): void $this->assertStringEndsWith('api_keys/test_id', $request->getUri()->getPath()); } + public function testCreateApiKeyExpire(): void + { + $fixture = $this->loadFixture('api_key'); + $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]); + $result = $client->apiKeys()->createApiKeyExpire('test_id'); + $this->assertInstanceOf(\WorkOS\Resource\ApiKey::class, $result); + $this->assertSame($fixture['id'], $result->id); + $this->assertSame($fixture['name'], $result->name); + $this->assertIsArray($result->toArray()); + $request = $this->getLastRequest(); + $this->assertSame('POST', $request->getMethod()); + $this->assertStringEndsWith('api_keys/test_id/expire', $request->getUri()->getPath()); + } + public function testPaginationBoundary(): void { $fixture = $this->loadFixture('list_organization_api_key'); From 40a21bb052d2ae02e33e6ff5424a6b1c621bf455 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 19:20:16 +0000 Subject: [PATCH 3/8] feat(directory_sync): Replace dsync deactivated events with token lifecycle events --- lib/Resource/DsyncTokenCreated.php | 50 ++++++++++++++++++++++++ lib/Resource/DsyncTokenCreatedData.php | 53 ++++++++++++++++++++++++++ lib/Resource/DsyncTokenRevoked.php | 50 ++++++++++++++++++++++++ lib/Resource/DsyncTokenRevokedData.php | 53 ++++++++++++++++++++++++++ 4 files changed, 206 insertions(+) create mode 100644 lib/Resource/DsyncTokenCreated.php create mode 100644 lib/Resource/DsyncTokenCreatedData.php create mode 100644 lib/Resource/DsyncTokenRevoked.php create mode 100644 lib/Resource/DsyncTokenRevokedData.php diff --git a/lib/Resource/DsyncTokenCreated.php b/lib/Resource/DsyncTokenCreated.php new file mode 100644 index 00000000..ab918bce --- /dev/null +++ b/lib/Resource/DsyncTokenCreated.php @@ -0,0 +1,50 @@ + $this->object, + 'id' => $this->id, + 'event' => $this->event, + 'data' => $this->data->toArray(), + 'created_at' => $this->createdAt->format(\DateTimeInterface::RFC3339_EXTENDED), + 'context' => $this->context?->toArray(), + ]; + } +} diff --git a/lib/Resource/DsyncTokenCreatedData.php b/lib/Resource/DsyncTokenCreatedData.php new file mode 100644 index 00000000..4c0a85f9 --- /dev/null +++ b/lib/Resource/DsyncTokenCreatedData.php @@ -0,0 +1,53 @@ + $this->object, + 'id' => $this->id, + 'directory_id' => $this->directoryId, + 'token_suffix' => $this->tokenSuffix, + 'created_at' => $this->createdAt->format(\DateTimeInterface::RFC3339_EXTENDED), + 'organization_id' => $this->organizationId, + ]; + } +} diff --git a/lib/Resource/DsyncTokenRevoked.php b/lib/Resource/DsyncTokenRevoked.php new file mode 100644 index 00000000..5de7e246 --- /dev/null +++ b/lib/Resource/DsyncTokenRevoked.php @@ -0,0 +1,50 @@ + $this->object, + 'id' => $this->id, + 'event' => $this->event, + 'data' => $this->data->toArray(), + 'created_at' => $this->createdAt->format(\DateTimeInterface::RFC3339_EXTENDED), + 'context' => $this->context?->toArray(), + ]; + } +} diff --git a/lib/Resource/DsyncTokenRevokedData.php b/lib/Resource/DsyncTokenRevokedData.php new file mode 100644 index 00000000..2e866d03 --- /dev/null +++ b/lib/Resource/DsyncTokenRevokedData.php @@ -0,0 +1,53 @@ + $this->object, + 'id' => $this->id, + 'directory_id' => $this->directoryId, + 'token_suffix' => $this->tokenSuffix, + 'created_at' => $this->createdAt->format(\DateTimeInterface::RFC3339_EXTENDED), + 'organization_id' => $this->organizationId, + ]; + } +} From 652fae81cb9a97219158c9900005f9ee9c5e3957 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 19:20:16 +0000 Subject: [PATCH 4/8] feat(radar): Remove DOMAIN_SIGN_UP_RATE_LIMIT control type --- lib/Resource/RadarStandaloneResponseControl.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Resource/RadarStandaloneResponseControl.php b/lib/Resource/RadarStandaloneResponseControl.php index ae0e6908..b03af8b5 100644 --- a/lib/Resource/RadarStandaloneResponseControl.php +++ b/lib/Resource/RadarStandaloneResponseControl.php @@ -10,7 +10,6 @@ enum RadarStandaloneResponseControl: string { case BotDetection = 'bot_detection'; case BruteForceAttack = 'brute_force_attack'; - case DomainSignUpRateLimit = 'domain_sign_up_rate_limit'; case ImpossibleTravel = 'impossible_travel'; case RepeatSignUp = 'repeat_sign_up'; case StaleAccount = 'stale_account'; From 5f2071f538d39f848183a3aef78fa8b987d3f90c Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 19:20:16 +0000 Subject: [PATCH 5/8] feat(audit_logs): Add Snowflake log stream type --- lib/Resource/AuditLogConfigurationLogStreamType.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Resource/AuditLogConfigurationLogStreamType.php b/lib/Resource/AuditLogConfigurationLogStreamType.php index 59c88fff..7f134e3c 100644 --- a/lib/Resource/AuditLogConfigurationLogStreamType.php +++ b/lib/Resource/AuditLogConfigurationLogStreamType.php @@ -13,5 +13,6 @@ enum AuditLogConfigurationLogStreamType: string case GenericHttps = 'GenericHttps'; case GoogleCloudStorage = 'GoogleCloudStorage'; case S3 = 'S3'; + case Snowflake = 'Snowflake'; case Splunk = 'Splunk'; } From 89cf6bf7eb8f1b201097db6929924b02484d1f7f Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 19:20:16 +0000 Subject: [PATCH 6/8] chore(generated): shared regenerated files --- .last-synced-sha | 2 +- .oagen-manifest.json | 32 +++++++-- lib/Resource/DsyncDeactivated.php | 50 ------------- lib/Resource/DsyncDeactivatedData.php | 72 ------------------- lib/Resource/DsyncDeactivatedDataDomain.php | 40 ----------- lib/Resource/RevokeSession.php | 4 -- lib/Service/Authorization.php | 20 +++--- lib/Service/Connect.php | 2 +- lib/Service/DirectorySync.php | 4 +- lib/Service/Events.php | 2 +- lib/Service/Groups.php | 4 +- lib/Service/OrganizationMembershipService.php | 4 +- lib/Service/Organizations.php | 2 +- lib/Service/Webhooks.php | 2 +- tests/Fixtures/api_key_updated.json | 47 ++++++++++++ tests/Fixtures/api_key_updated_data.json | 21 ++++++ .../Fixtures/api_key_updated_data_owner.json | 4 ++ ...i_key_updated_data_previous_attribute.json | 3 + tests/Fixtures/authenticate_response.json | 3 +- tests/Fixtures/create_user.json | 3 +- tests/Fixtures/dsync_token_created.json | 34 +++++++++ tests/Fixtures/dsync_token_created_data.json | 8 +++ tests/Fixtures/dsync_token_revoked.json | 34 +++++++++ tests/Fixtures/dsync_token_revoked_data.json | 8 +++ tests/Fixtures/email_change.json | 3 +- tests/Fixtures/email_change_confirmation.json | 3 +- .../email_change_confirmation_user.json | 3 +- tests/Fixtures/expire_api_key.json | 3 + tests/Fixtures/list_user.json | 1 + .../list_user_organization_membership.json | 1 + ...rganization_membership_base_list_data.json | 1 + tests/Fixtures/organization_membership.json | 3 +- tests/Fixtures/reset_password_response.json | 3 +- .../send_verification_email_response.json | 3 +- tests/Fixtures/update_user.json | 3 +- tests/Fixtures/user.json | 3 +- .../user_api_key_updated_data_owner.json | 5 ++ tests/Fixtures/user_created.json | 3 +- tests/Fixtures/user_deleted.json | 3 +- .../user_management_login_request.json | 3 +- tests/Fixtures/user_object.json | 3 +- .../user_organization_membership.json | 3 +- ...rganization_membership_base_list_data.json | 3 +- tests/Fixtures/user_updated.json | 3 +- tests/Fixtures/verify_email_response.json | 3 +- 45 files changed, 252 insertions(+), 212 deletions(-) delete mode 100644 lib/Resource/DsyncDeactivated.php delete mode 100644 lib/Resource/DsyncDeactivatedData.php delete mode 100644 lib/Resource/DsyncDeactivatedDataDomain.php create mode 100644 tests/Fixtures/api_key_updated.json create mode 100644 tests/Fixtures/api_key_updated_data.json create mode 100644 tests/Fixtures/api_key_updated_data_owner.json create mode 100644 tests/Fixtures/api_key_updated_data_previous_attribute.json create mode 100644 tests/Fixtures/dsync_token_created.json create mode 100644 tests/Fixtures/dsync_token_created_data.json create mode 100644 tests/Fixtures/dsync_token_revoked.json create mode 100644 tests/Fixtures/dsync_token_revoked_data.json create mode 100644 tests/Fixtures/expire_api_key.json create mode 100644 tests/Fixtures/user_api_key_updated_data_owner.json diff --git a/.last-synced-sha b/.last-synced-sha index ad25d3d1..99cf20f6 100644 --- a/.last-synced-sha +++ b/.last-synced-sha @@ -1 +1 @@ -cb6857d51b453e3cbdb5bf3647d3ca229dd8af65 +d8c5a7de598792b1cee18d4a9842825110e5c74a diff --git a/.oagen-manifest.json b/.oagen-manifest.json index 546c6a4e..abc7b738 100644 --- a/.oagen-manifest.json +++ b/.oagen-manifest.json @@ -1,7 +1,7 @@ { "version": 2, "language": "php", - "generatedAt": "2026-05-28T14:19:36.431Z", + "generatedAt": "2026-06-03T19:19:56.689Z", "files": [ "lib/Resource/ActionAuthenticationDenied.php", "lib/Resource/ActionAuthenticationDeniedData.php", @@ -17,6 +17,10 @@ "lib/Resource/ApiKeyRevoked.php", "lib/Resource/ApiKeyRevokedData.php", "lib/Resource/ApiKeyRevokedDataOwner.php", + "lib/Resource/ApiKeyUpdated.php", + "lib/Resource/ApiKeyUpdatedData.php", + "lib/Resource/ApiKeyUpdatedDataOwner.php", + "lib/Resource/ApiKeyUpdatedDataPreviousAttribute.php", "lib/Resource/ApiKeyValidationResponse.php", "lib/Resource/ApplicationCredentialsListItem.php", "lib/Resource/AssignRole.php", @@ -205,9 +209,6 @@ "lib/Resource/DsyncActivated.php", "lib/Resource/DsyncActivatedData.php", "lib/Resource/DsyncActivatedDataDomain.php", - "lib/Resource/DsyncDeactivated.php", - "lib/Resource/DsyncDeactivatedData.php", - "lib/Resource/DsyncDeactivatedDataDomain.php", "lib/Resource/DsyncDeleted.php", "lib/Resource/DsyncDeletedData.php", "lib/Resource/DsyncDeletedDataState.php", @@ -220,6 +221,10 @@ "lib/Resource/DsyncGroupUserAddedData.php", "lib/Resource/DsyncGroupUserRemoved.php", "lib/Resource/DsyncGroupUserRemovedData.php", + "lib/Resource/DsyncTokenCreated.php", + "lib/Resource/DsyncTokenCreatedData.php", + "lib/Resource/DsyncTokenRevoked.php", + "lib/Resource/DsyncTokenRevokedData.php", "lib/Resource/DsyncUserCreated.php", "lib/Resource/DsyncUserDeleted.php", "lib/Resource/DsyncUserUpdated.php", @@ -240,6 +245,7 @@ "lib/Resource/EventContextGoogleAnalyticsSession.php", "lib/Resource/EventListListMetadata.php", "lib/Resource/EventSchema.php", + "lib/Resource/ExpireApiKey.php", "lib/Resource/ExternalAuthCompleteResponse.php", "lib/Resource/FeatureFlag.php", "lib/Resource/FeatureFlagOwner.php", @@ -447,6 +453,7 @@ "lib/Resource/UserApiKeyCreatedDataOwner.php", "lib/Resource/UserApiKeyOwner.php", "lib/Resource/UserApiKeyRevokedDataOwner.php", + "lib/Resource/UserApiKeyUpdatedDataOwner.php", "lib/Resource/UserApiKeyWithValue.php", "lib/Resource/UserApiKeyWithValueOwner.php", "lib/Resource/UserAuthenticationFactorEnrollResponse.php", @@ -556,6 +563,10 @@ "tests/Fixtures/api_key_revoked.json", "tests/Fixtures/api_key_revoked_data.json", "tests/Fixtures/api_key_revoked_data_owner.json", + "tests/Fixtures/api_key_updated.json", + "tests/Fixtures/api_key_updated_data.json", + "tests/Fixtures/api_key_updated_data_owner.json", + "tests/Fixtures/api_key_updated_data_previous_attribute.json", "tests/Fixtures/api_key_validation_response.json", "tests/Fixtures/application_credentials_list_item.json", "tests/Fixtures/assign_role.json", @@ -718,9 +729,6 @@ "tests/Fixtures/dsync_activated.json", "tests/Fixtures/dsync_activated_data.json", "tests/Fixtures/dsync_activated_data_domain.json", - "tests/Fixtures/dsync_deactivated.json", - "tests/Fixtures/dsync_deactivated_data.json", - "tests/Fixtures/dsync_deactivated_data_domain.json", "tests/Fixtures/dsync_deleted.json", "tests/Fixtures/dsync_deleted_data.json", "tests/Fixtures/dsync_group_created.json", @@ -731,6 +739,10 @@ "tests/Fixtures/dsync_group_user_added_data.json", "tests/Fixtures/dsync_group_user_removed.json", "tests/Fixtures/dsync_group_user_removed_data.json", + "tests/Fixtures/dsync_token_created.json", + "tests/Fixtures/dsync_token_created_data.json", + "tests/Fixtures/dsync_token_revoked.json", + "tests/Fixtures/dsync_token_revoked_data.json", "tests/Fixtures/dsync_user_created.json", "tests/Fixtures/dsync_user_deleted.json", "tests/Fixtures/dsync_user_updated.json", @@ -750,6 +762,7 @@ "tests/Fixtures/event_context_google_analytics_session.json", "tests/Fixtures/event_list_list_metadata.json", "tests/Fixtures/event_schema.json", + "tests/Fixtures/expire_api_key.json", "tests/Fixtures/external_auth_complete_response.json", "tests/Fixtures/feature_flag.json", "tests/Fixtures/feature_flag_owner.json", @@ -964,6 +977,7 @@ "tests/Fixtures/user_api_key_created_data_owner.json", "tests/Fixtures/user_api_key_owner.json", "tests/Fixtures/user_api_key_revoked_data_owner.json", + "tests/Fixtures/user_api_key_updated_data_owner.json", "tests/Fixtures/user_api_key_with_value.json", "tests/Fixtures/user_api_key_with_value_owner.json", "tests/Fixtures/user_authentication_factor_enroll_response.json", @@ -1737,6 +1751,10 @@ "sdkMethod": "deleteApiKey", "service": "apiKeys" }, + "POST /api_keys/{id}/expire": { + "sdkMethod": "createApiKeyExpire", + "service": "apiKeys" + }, "GET /user_management/users/{userId}/api_keys": { "sdkMethod": "listUserApiKeys", "service": "userManagement" diff --git a/lib/Resource/DsyncDeactivated.php b/lib/Resource/DsyncDeactivated.php deleted file mode 100644 index a93dceab..00000000 --- a/lib/Resource/DsyncDeactivated.php +++ /dev/null @@ -1,50 +0,0 @@ - $this->object, - 'id' => $this->id, - 'event' => $this->event, - 'data' => $this->data->toArray(), - 'created_at' => $this->createdAt->format(\DateTimeInterface::RFC3339_EXTENDED), - 'context' => $this->context?->toArray(), - ]; - } -} diff --git a/lib/Resource/DsyncDeactivatedData.php b/lib/Resource/DsyncDeactivatedData.php deleted file mode 100644 index c274a209..00000000 --- a/lib/Resource/DsyncDeactivatedData.php +++ /dev/null @@ -1,72 +0,0 @@ - - */ - public array $domains, - /** The ID of the organization the directory belongs to. */ - public ?string $organizationId = null, - ) { - } - - public static function fromArray(array $data): self - { - return new self( - object: $data['object'] ?? 'directory', - id: $data['id'], - type: DsyncDeletedDataType::from($data['type']), - state: DsyncDeletedDataState::from($data['state']), - name: $data['name'], - createdAt: new \DateTimeImmutable($data['created_at']), - updatedAt: new \DateTimeImmutable($data['updated_at']), - externalKey: $data['external_key'], - domains: array_map(fn ($item) => DsyncDeactivatedDataDomain::fromArray($item), $data['domains']), - organizationId: $data['organization_id'] ?? null, - ); - } - - public function toArray(): array - { - return [ - 'object' => $this->object, - 'id' => $this->id, - 'type' => $this->type->value, - 'state' => $this->state->value, - 'name' => $this->name, - 'created_at' => $this->createdAt->format(\DateTimeInterface::RFC3339_EXTENDED), - 'updated_at' => $this->updatedAt->format(\DateTimeInterface::RFC3339_EXTENDED), - 'external_key' => $this->externalKey, - 'domains' => array_map(fn ($item) => $item->toArray(), $this->domains), - 'organization_id' => $this->organizationId, - ]; - } -} diff --git a/lib/Resource/DsyncDeactivatedDataDomain.php b/lib/Resource/DsyncDeactivatedDataDomain.php deleted file mode 100644 index 596404d1..00000000 --- a/lib/Resource/DsyncDeactivatedDataDomain.php +++ /dev/null @@ -1,40 +0,0 @@ - $this->object, - 'id' => $this->id, - 'domain' => $this->domain, - ]; - } -} diff --git a/lib/Resource/RevokeSession.php b/lib/Resource/RevokeSession.php index f016b102..c66267bf 100644 --- a/lib/Resource/RevokeSession.php +++ b/lib/Resource/RevokeSession.php @@ -13,8 +13,6 @@ public function __construct( /** The ID of the session to revoke. This can be extracted from the `sid` claim of the access token. */ public string $sessionId, - /** The URL to redirect the user to after session revocation. */ - public ?string $returnTo = null, ) { } @@ -22,7 +20,6 @@ public static function fromArray(array $data): self { return new self( sessionId: $data['session_id'], - returnTo: $data['return_to'] ?? null, ); } @@ -30,7 +27,6 @@ public function toArray(): array { return [ 'session_id' => $this->sessionId, - 'return_to' => $this->returnTo, ]; } } diff --git a/lib/Service/Authorization.php b/lib/Service/Authorization.php index b71e563a..3deb7979 100644 --- a/lib/Service/Authorization.php +++ b/lib/Service/Authorization.php @@ -67,7 +67,7 @@ public function check( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param string $permissionSlug The permission slug to filter by. Only child resources where the organization membership has this permission are returned. * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\AuthorizationResource> * @throws \WorkOS\Exception\WorkOSException @@ -113,7 +113,7 @@ public function listResourcesForMembership( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\AuthorizationPermission> * @throws \WorkOS\Exception\WorkOSException */ @@ -151,7 +151,7 @@ public function listEffectivePermissions( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\AuthorizationPermission> * @throws \WorkOS\Exception\WorkOSException */ @@ -188,7 +188,7 @@ public function listEffectivePermissionsByExternalId( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param string|null $resourceId Filter assignments by the ID of the resource. * @param string|null $resourceExternalId Filter assignments by the external ID of the resource. * @param string|null $resourceTypeSlug Filter assignments by the slug of the resource type. @@ -624,7 +624,7 @@ public function deleteResourceByExternalId( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param string $permissionSlug The permission slug to filter by. Only users with this permission on the resource are returned. * @param \WorkOS\Resource\AuthorizationAssignment|null $assignment Filter by assignment type. Use "direct" for direct assignments only, or "indirect" to include inherited assignments. * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\UserOrganizationMembershipBaseListData> @@ -669,7 +669,7 @@ public function listMembershipsForResourceByExternalId( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param string|null $roleSlug Filter assignments by the slug of the role. * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\UserRoleAssignment> * @throws \WorkOS\Exception\WorkOSException @@ -709,7 +709,7 @@ public function listRoleAssignmentsForResourceByExternalId( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param string|null $organizationId Filter resources by organization ID. * @param string|null $resourceTypeSlug Filter resources by resource type slug. * @param string|null $resourceExternalId Filter resources by external ID. @@ -885,7 +885,7 @@ public function deleteResource( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param string $permissionSlug The permission slug to filter by. Only users with this permission on the resource are returned. * @param \WorkOS\Resource\AuthorizationAssignment|null $assignment Filter by assignment type. Use `direct` for direct assignments only, or `indirect` to include inherited assignments. * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\UserOrganizationMembershipBaseListData> @@ -926,7 +926,7 @@ public function listMembershipsForResource( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param string|null $roleSlug Filter assignments by the slug of the role. * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\UserRoleAssignment> * @throws \WorkOS\Exception\WorkOSException @@ -1115,7 +1115,7 @@ public function setEnvironmentRolePermissions( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\AuthorizationPermission> * @throws \WorkOS\Exception\WorkOSException */ diff --git a/lib/Service/Connect.php b/lib/Service/Connect.php index 6c981ddc..db63581c 100644 --- a/lib/Service/Connect.php +++ b/lib/Service/Connect.php @@ -64,7 +64,7 @@ public function completeOAuth2( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param string|null $organizationId Filter Connect Applications by organization ID. * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\ConnectApplication> * @throws \WorkOS\Exception\WorkOSException diff --git a/lib/Service/DirectorySync.php b/lib/Service/DirectorySync.php index 3b64cac4..110e3925 100644 --- a/lib/Service/DirectorySync.php +++ b/lib/Service/DirectorySync.php @@ -105,7 +105,7 @@ public function deleteDirectory( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param string|null $directory Unique identifier of the WorkOS Directory. This value can be obtained from the WorkOS dashboard or from the WorkOS API. * @param string|null $user Unique identifier of the WorkOS Directory User. This value can be obtained from the WorkOS API. * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\DirectoryGroup> @@ -164,7 +164,7 @@ public function getGroup( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param string|null $directory Unique identifier of the WorkOS Directory. This value can be obtained from the WorkOS dashboard or from the WorkOS API. * @param string|null $group Unique identifier of the WorkOS Directory Group. This value can be obtained from the WorkOS API. * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\DirectoryUserWithGroups> diff --git a/lib/Service/Events.php b/lib/Service/Events.php index c06588e7..80ea8c60 100644 --- a/lib/Service/Events.php +++ b/lib/Service/Events.php @@ -22,7 +22,7 @@ public function __construct( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param array|null $events Filter events by one or more event types (e.g. `dsync.user.created`). * @param string|null $rangeStart ISO-8601 date string to filter events created after this date. * @param string|null $rangeEnd ISO-8601 date string to filter events created before this date. diff --git a/lib/Service/Groups.php b/lib/Service/Groups.php index cfb9da8f..6012141b 100644 --- a/lib/Service/Groups.php +++ b/lib/Service/Groups.php @@ -24,7 +24,7 @@ public function __construct( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\Group> * @throws \WorkOS\Exception\WorkOSException */ @@ -163,7 +163,7 @@ public function deleteOrganizationGroup( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\UserOrganizationMembershipBaseListData> * @throws \WorkOS\Exception\WorkOSException */ diff --git a/lib/Service/OrganizationMembershipService.php b/lib/Service/OrganizationMembershipService.php index 4bae363c..aae6a1c0 100644 --- a/lib/Service/OrganizationMembershipService.php +++ b/lib/Service/OrganizationMembershipService.php @@ -24,7 +24,7 @@ public function __construct( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param string|null $organizationId The ID of the [organization](https://workos.com/docs/reference/organization) which the user belongs to. * @param array<\WorkOS\Resource\OrganizationMembershipStatus>|null $statuses Filter by the status of the organization membership. Array including any of `active`, `inactive`, or `pending`. * @param string|null $userId The ID of the [user](https://workos.com/docs/reference/authkit/user). @@ -222,7 +222,7 @@ public function reactivateOrganizationMembership( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\Group> * @throws \WorkOS\Exception\WorkOSException */ diff --git a/lib/Service/Organizations.php b/lib/Service/Organizations.php index 14028185..2de46545 100644 --- a/lib/Service/Organizations.php +++ b/lib/Service/Organizations.php @@ -23,7 +23,7 @@ public function __construct( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @param array|null $domains The domains of an Organization. Any Organization with a matching domain will be returned. * @param string|null $search Searchable text for an Organization. Matches against the organization name. * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\Organization> diff --git a/lib/Service/Webhooks.php b/lib/Service/Webhooks.php index e001b708..1360571c 100644 --- a/lib/Service/Webhooks.php +++ b/lib/Service/Webhooks.php @@ -22,7 +22,7 @@ public function __construct( * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. * @param string|null $after An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10. - * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. Defaults to "desc". + * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc". * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\WebhookEndpoint> * @throws \WorkOS\Exception\WorkOSException */ diff --git a/tests/Fixtures/api_key_updated.json b/tests/Fixtures/api_key_updated.json new file mode 100644 index 00000000..a3c1b69b --- /dev/null +++ b/tests/Fixtures/api_key_updated.json @@ -0,0 +1,47 @@ +{ + "object": "event", + "id": "event_01EHZNVPK3SFK441A1RGBFSHRT", + "event": "api_key.updated", + "data": { + "object": "api_key", + "id": "api_key_01EHWNCE74X7JSDV0X3SZ3KJNY", + "owner": { + "type": "organization", + "id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY" + }, + "name": "My API Key", + "obfuscated_value": "sk_test_...1234", + "last_used_at": "2026-01-15T12:00:00.000Z", + "expires_at": null, + "permissions": [ + "users:read", + "users:write" + ], + "created_at": "2026-01-15T12:00:00.000Z", + "updated_at": "2026-01-15T12:00:00.000Z", + "previous_attributes": { + "expires_at": null + } + }, + "created_at": "2026-01-15T12:00:00.000Z", + "context": { + "google_analytics_client_id": "GA1.2.1234567890.1234567890", + "google_analytics_sessions": [ + { + "containerId": "GTM-ABCDEF", + "sessionId": "1234567890", + "sessionNumber": "1" + } + ], + "ajs_anonymous_id": "ajs_anon_01EHWNCE74X7JSDV0X3SZ3KJNY", + "client_id": "client_01EHWNCE74X7JSDV0X3SZ3KJNY", + "actor": { + "id": "user_01EHWNCE74X7JSDV0X3SZ3KJNY", + "source": "api", + "name": "Jane Doe" + }, + "previous_attributes": { + "key": {} + } + } +} diff --git a/tests/Fixtures/api_key_updated_data.json b/tests/Fixtures/api_key_updated_data.json new file mode 100644 index 00000000..b606ee09 --- /dev/null +++ b/tests/Fixtures/api_key_updated_data.json @@ -0,0 +1,21 @@ +{ + "object": "api_key", + "id": "api_key_01EHWNCE74X7JSDV0X3SZ3KJNY", + "owner": { + "type": "organization", + "id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY" + }, + "name": "My API Key", + "obfuscated_value": "sk_test_...1234", + "last_used_at": "2026-01-15T12:00:00.000Z", + "expires_at": null, + "permissions": [ + "users:read", + "users:write" + ], + "created_at": "2026-01-15T12:00:00.000Z", + "updated_at": "2026-01-15T12:00:00.000Z", + "previous_attributes": { + "expires_at": null + } +} diff --git a/tests/Fixtures/api_key_updated_data_owner.json b/tests/Fixtures/api_key_updated_data_owner.json new file mode 100644 index 00000000..482d9913 --- /dev/null +++ b/tests/Fixtures/api_key_updated_data_owner.json @@ -0,0 +1,4 @@ +{ + "type": "organization", + "id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY" +} diff --git a/tests/Fixtures/api_key_updated_data_previous_attribute.json b/tests/Fixtures/api_key_updated_data_previous_attribute.json new file mode 100644 index 00000000..e147564f --- /dev/null +++ b/tests/Fixtures/api_key_updated_data_previous_attribute.json @@ -0,0 +1,3 @@ +{ + "expires_at": null +} diff --git a/tests/Fixtures/authenticate_response.json b/tests/Fixtures/authenticate_response.json index 5127ae3f..d3df5158 100644 --- a/tests/Fixtures/authenticate_response.json +++ b/tests/Fixtures/authenticate_response.json @@ -14,7 +14,8 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "locale": "en-US", "created_at": "2026-01-15T12:00:00.000Z", - "updated_at": "2026-01-15T12:00:00.000Z" + "updated_at": "2026-01-15T12:00:00.000Z", + "name": "Marcelina Davis" }, "organization_id": "org_01H945H0YD4F97JN9MATX7BYAG", "authkit_authorization_code": "authkit_authz_code_abc123", diff --git a/tests/Fixtures/create_user.json b/tests/Fixtures/create_user.json index d64790ef..9be7ecc7 100644 --- a/tests/Fixtures/create_user.json +++ b/tests/Fixtures/create_user.json @@ -9,5 +9,6 @@ "metadata": { "timezone": "America/New_York" }, - "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222" + "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222", + "name": "Marcelina Davis" } diff --git a/tests/Fixtures/dsync_token_created.json b/tests/Fixtures/dsync_token_created.json new file mode 100644 index 00000000..99677dc2 --- /dev/null +++ b/tests/Fixtures/dsync_token_created.json @@ -0,0 +1,34 @@ +{ + "object": "event", + "id": "event_01EHZNVPK3SFK441A1RGBFSHRT", + "event": "dsync.token.created", + "data": { + "object": "directory_token", + "id": "directory_token_01EHWNCE74X7JSDV0X3SZ3KJNY", + "directory_id": "directory_01EHWNCE74X7JSDV0X3SZ3KJNY", + "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", + "token_suffix": "a1b2", + "created_at": "2026-01-15T12:00:00.000Z" + }, + "created_at": "2026-01-15T12:00:00.000Z", + "context": { + "google_analytics_client_id": "GA1.2.1234567890.1234567890", + "google_analytics_sessions": [ + { + "containerId": "GTM-ABCDEF", + "sessionId": "1234567890", + "sessionNumber": "1" + } + ], + "ajs_anonymous_id": "ajs_anon_01EHWNCE74X7JSDV0X3SZ3KJNY", + "client_id": "client_01EHWNCE74X7JSDV0X3SZ3KJNY", + "actor": { + "id": "user_01EHWNCE74X7JSDV0X3SZ3KJNY", + "source": "api", + "name": "Jane Doe" + }, + "previous_attributes": { + "key": {} + } + } +} diff --git a/tests/Fixtures/dsync_token_created_data.json b/tests/Fixtures/dsync_token_created_data.json new file mode 100644 index 00000000..07597a72 --- /dev/null +++ b/tests/Fixtures/dsync_token_created_data.json @@ -0,0 +1,8 @@ +{ + "object": "directory_token", + "id": "directory_token_01EHWNCE74X7JSDV0X3SZ3KJNY", + "directory_id": "directory_01EHWNCE74X7JSDV0X3SZ3KJNY", + "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", + "token_suffix": "a1b2", + "created_at": "2026-01-15T12:00:00.000Z" +} diff --git a/tests/Fixtures/dsync_token_revoked.json b/tests/Fixtures/dsync_token_revoked.json new file mode 100644 index 00000000..dbb65b95 --- /dev/null +++ b/tests/Fixtures/dsync_token_revoked.json @@ -0,0 +1,34 @@ +{ + "object": "event", + "id": "event_01EHZNVPK3SFK441A1RGBFSHRT", + "event": "dsync.token.revoked", + "data": { + "object": "directory_token", + "id": "directory_token_01EHWNCE74X7JSDV0X3SZ3KJNY", + "directory_id": "directory_01EHWNCE74X7JSDV0X3SZ3KJNY", + "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", + "token_suffix": "a1b2", + "created_at": "2026-01-15T12:00:00.000Z" + }, + "created_at": "2026-01-15T12:00:00.000Z", + "context": { + "google_analytics_client_id": "GA1.2.1234567890.1234567890", + "google_analytics_sessions": [ + { + "containerId": "GTM-ABCDEF", + "sessionId": "1234567890", + "sessionNumber": "1" + } + ], + "ajs_anonymous_id": "ajs_anon_01EHWNCE74X7JSDV0X3SZ3KJNY", + "client_id": "client_01EHWNCE74X7JSDV0X3SZ3KJNY", + "actor": { + "id": "user_01EHWNCE74X7JSDV0X3SZ3KJNY", + "source": "api", + "name": "Jane Doe" + }, + "previous_attributes": { + "key": {} + } + } +} diff --git a/tests/Fixtures/dsync_token_revoked_data.json b/tests/Fixtures/dsync_token_revoked_data.json new file mode 100644 index 00000000..07597a72 --- /dev/null +++ b/tests/Fixtures/dsync_token_revoked_data.json @@ -0,0 +1,8 @@ +{ + "object": "directory_token", + "id": "directory_token_01EHWNCE74X7JSDV0X3SZ3KJNY", + "directory_id": "directory_01EHWNCE74X7JSDV0X3SZ3KJNY", + "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", + "token_suffix": "a1b2", + "created_at": "2026-01-15T12:00:00.000Z" +} diff --git a/tests/Fixtures/email_change.json b/tests/Fixtures/email_change.json index 41982624..39fdd60c 100644 --- a/tests/Fixtures/email_change.json +++ b/tests/Fixtures/email_change.json @@ -15,7 +15,8 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "locale": "en-US", "created_at": "2026-01-15T12:00:00.000Z", - "updated_at": "2026-01-15T12:00:00.000Z" + "updated_at": "2026-01-15T12:00:00.000Z", + "name": "Marcelina Davis" }, "new_email": "new.email@example.com", "expires_at": "2026-01-15T12:00:00.000Z", diff --git a/tests/Fixtures/email_change_confirmation.json b/tests/Fixtures/email_change_confirmation.json index 5da108ff..869bbb06 100644 --- a/tests/Fixtures/email_change_confirmation.json +++ b/tests/Fixtures/email_change_confirmation.json @@ -15,6 +15,7 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "locale": "en-US", "created_at": "2026-01-15T12:00:00.000Z", - "updated_at": "2026-01-15T12:00:00.000Z" + "updated_at": "2026-01-15T12:00:00.000Z", + "name": "Marcelina Davis" } } diff --git a/tests/Fixtures/email_change_confirmation_user.json b/tests/Fixtures/email_change_confirmation_user.json index dcd50576..7c9f3888 100644 --- a/tests/Fixtures/email_change_confirmation_user.json +++ b/tests/Fixtures/email_change_confirmation_user.json @@ -13,5 +13,6 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "locale": "en-US", "created_at": "2026-01-15T12:00:00.000Z", - "updated_at": "2026-01-15T12:00:00.000Z" + "updated_at": "2026-01-15T12:00:00.000Z", + "name": "Marcelina Davis" } diff --git a/tests/Fixtures/expire_api_key.json b/tests/Fixtures/expire_api_key.json new file mode 100644 index 00000000..f760abbc --- /dev/null +++ b/tests/Fixtures/expire_api_key.json @@ -0,0 +1,3 @@ +{ + "expires_at": "2030-01-01T00:00:00.000Z" +} diff --git a/tests/Fixtures/list_user.json b/tests/Fixtures/list_user.json index 390c74f9..3666c7cd 100644 --- a/tests/Fixtures/list_user.json +++ b/tests/Fixtures/list_user.json @@ -5,6 +5,7 @@ "id": "user_01E4ZCR3C56J083X43JQXF3JK5", "first_name": "Marcelina", "last_name": "Davis", + "name": "Marcelina Davis", "profile_picture_url": "https://workoscdn.com/images/v1/123abc", "email": "marcelina.davis@example.com", "email_verified": true, diff --git a/tests/Fixtures/list_user_organization_membership.json b/tests/Fixtures/list_user_organization_membership.json index b0764c60..ed1cc630 100644 --- a/tests/Fixtures/list_user_organization_membership.json +++ b/tests/Fixtures/list_user_organization_membership.json @@ -23,6 +23,7 @@ "id": "user_01E4ZCR3C56J083X43JQXF3JK5", "first_name": "Marcelina", "last_name": "Davis", + "name": "Marcelina Davis", "profile_picture_url": "https://workoscdn.com/images/v1/123abc", "email": "marcelina.davis@example.com", "email_verified": true, diff --git a/tests/Fixtures/list_user_organization_membership_base_list_data.json b/tests/Fixtures/list_user_organization_membership_base_list_data.json index f6dc992a..ba24d6d2 100644 --- a/tests/Fixtures/list_user_organization_membership_base_list_data.json +++ b/tests/Fixtures/list_user_organization_membership_base_list_data.json @@ -20,6 +20,7 @@ "id": "user_01E4ZCR3C56J083X43JQXF3JK5", "first_name": "Marcelina", "last_name": "Davis", + "name": "Marcelina Davis", "profile_picture_url": "https://workoscdn.com/images/v1/123abc", "email": "marcelina.davis@example.com", "email_verified": true, diff --git a/tests/Fixtures/organization_membership.json b/tests/Fixtures/organization_membership.json index efba3046..dabd745d 100644 --- a/tests/Fixtures/organization_membership.json +++ b/tests/Fixtures/organization_membership.json @@ -31,6 +31,7 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "locale": "en-US", "created_at": "2026-01-15T12:00:00.000Z", - "updated_at": "2026-01-15T12:00:00.000Z" + "updated_at": "2026-01-15T12:00:00.000Z", + "name": "Marcelina Davis" } } diff --git a/tests/Fixtures/reset_password_response.json b/tests/Fixtures/reset_password_response.json index 647d4c25..efd50117 100644 --- a/tests/Fixtures/reset_password_response.json +++ b/tests/Fixtures/reset_password_response.json @@ -14,6 +14,7 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "locale": "en-US", "created_at": "2026-01-15T12:00:00.000Z", - "updated_at": "2026-01-15T12:00:00.000Z" + "updated_at": "2026-01-15T12:00:00.000Z", + "name": "Marcelina Davis" } } diff --git a/tests/Fixtures/send_verification_email_response.json b/tests/Fixtures/send_verification_email_response.json index 647d4c25..efd50117 100644 --- a/tests/Fixtures/send_verification_email_response.json +++ b/tests/Fixtures/send_verification_email_response.json @@ -14,6 +14,7 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "locale": "en-US", "created_at": "2026-01-15T12:00:00.000Z", - "updated_at": "2026-01-15T12:00:00.000Z" + "updated_at": "2026-01-15T12:00:00.000Z", + "name": "Marcelina Davis" } } diff --git a/tests/Fixtures/update_user.json b/tests/Fixtures/update_user.json index 7242be17..7742b5bd 100644 --- a/tests/Fixtures/update_user.json +++ b/tests/Fixtures/update_user.json @@ -10,5 +10,6 @@ "timezone": "America/New_York" }, "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222", - "locale": "en-US" + "locale": "en-US", + "name": "Marcelina Davis" } diff --git a/tests/Fixtures/user.json b/tests/Fixtures/user.json index ea8be141..3a0564d4 100644 --- a/tests/Fixtures/user.json +++ b/tests/Fixtures/user.json @@ -13,5 +13,6 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "locale": "en-US", "created_at": "2026-01-15T12:00:00.000Z", - "updated_at": "2026-01-15T12:00:00.000Z" + "updated_at": "2026-01-15T12:00:00.000Z", + "name": "Marcelina Davis" } diff --git a/tests/Fixtures/user_api_key_updated_data_owner.json b/tests/Fixtures/user_api_key_updated_data_owner.json new file mode 100644 index 00000000..125ba4bc --- /dev/null +++ b/tests/Fixtures/user_api_key_updated_data_owner.json @@ -0,0 +1,5 @@ +{ + "type": "user", + "id": "user_01EHWNCE74X7JSDV0X3SZ3KJNY", + "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY" +} diff --git a/tests/Fixtures/user_created.json b/tests/Fixtures/user_created.json index b1082b0a..b28a2ae2 100644 --- a/tests/Fixtures/user_created.json +++ b/tests/Fixtures/user_created.json @@ -16,7 +16,8 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "locale": "en-US", "created_at": "2026-01-15T12:00:00.000Z", - "updated_at": "2026-01-15T12:00:00.000Z" + "updated_at": "2026-01-15T12:00:00.000Z", + "name": "Marcelina Davis" }, "created_at": "2026-01-15T12:00:00.000Z", "context": { diff --git a/tests/Fixtures/user_deleted.json b/tests/Fixtures/user_deleted.json index 94b795f0..0b32ac1d 100644 --- a/tests/Fixtures/user_deleted.json +++ b/tests/Fixtures/user_deleted.json @@ -16,7 +16,8 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "locale": "en-US", "created_at": "2026-01-15T12:00:00.000Z", - "updated_at": "2026-01-15T12:00:00.000Z" + "updated_at": "2026-01-15T12:00:00.000Z", + "name": "Marcelina Davis" }, "created_at": "2026-01-15T12:00:00.000Z", "context": { diff --git a/tests/Fixtures/user_management_login_request.json b/tests/Fixtures/user_management_login_request.json index 952fbbf4..44c7f1f7 100644 --- a/tests/Fixtures/user_management_login_request.json +++ b/tests/Fixtures/user_management_login_request.json @@ -8,7 +8,8 @@ "metadata": { "department": "Engineering", "role": "Developer" - } + }, + "name": "Marcelina Davis" }, "user_consent_options": [ { diff --git a/tests/Fixtures/user_object.json b/tests/Fixtures/user_object.json index 27b814fd..cc047963 100644 --- a/tests/Fixtures/user_object.json +++ b/tests/Fixtures/user_object.json @@ -6,5 +6,6 @@ "metadata": { "department": "Engineering", "role": "Developer" - } + }, + "name": "Marcelina Davis" } diff --git a/tests/Fixtures/user_organization_membership.json b/tests/Fixtures/user_organization_membership.json index 184279d9..5d765ced 100644 --- a/tests/Fixtures/user_organization_membership.json +++ b/tests/Fixtures/user_organization_membership.json @@ -31,6 +31,7 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "locale": "en-US", "created_at": "2026-01-15T12:00:00.000Z", - "updated_at": "2026-01-15T12:00:00.000Z" + "updated_at": "2026-01-15T12:00:00.000Z", + "name": "Marcelina Davis" } } diff --git a/tests/Fixtures/user_organization_membership_base_list_data.json b/tests/Fixtures/user_organization_membership_base_list_data.json index f3a20339..97583a01 100644 --- a/tests/Fixtures/user_organization_membership_base_list_data.json +++ b/tests/Fixtures/user_organization_membership_base_list_data.json @@ -28,6 +28,7 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "locale": "en-US", "created_at": "2026-01-15T12:00:00.000Z", - "updated_at": "2026-01-15T12:00:00.000Z" + "updated_at": "2026-01-15T12:00:00.000Z", + "name": "Marcelina Davis" } } diff --git a/tests/Fixtures/user_updated.json b/tests/Fixtures/user_updated.json index 1694e77d..b5c2ca4b 100644 --- a/tests/Fixtures/user_updated.json +++ b/tests/Fixtures/user_updated.json @@ -16,7 +16,8 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "locale": "en-US", "created_at": "2026-01-15T12:00:00.000Z", - "updated_at": "2026-01-15T12:00:00.000Z" + "updated_at": "2026-01-15T12:00:00.000Z", + "name": "Marcelina Davis" }, "created_at": "2026-01-15T12:00:00.000Z", "context": { diff --git a/tests/Fixtures/verify_email_response.json b/tests/Fixtures/verify_email_response.json index 647d4c25..efd50117 100644 --- a/tests/Fixtures/verify_email_response.json +++ b/tests/Fixtures/verify_email_response.json @@ -14,6 +14,7 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "locale": "en-US", "created_at": "2026-01-15T12:00:00.000Z", - "updated_at": "2026-01-15T12:00:00.000Z" + "updated_at": "2026-01-15T12:00:00.000Z", + "name": "Marcelina Davis" } } From b56d9cebfb8d0440034584777128dcee5d4e5216 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 19:20:23 +0000 Subject: [PATCH 7/8] chore(generated): add release notes fragment --- ...ee95fc33c4f813ac60adfa8c57d210db8183dd8.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .changelog-pending/2026-06-03T19-20-23-dee95fc33c4f813ac60adfa8c57d210db8183dd8.md diff --git a/.changelog-pending/2026-06-03T19-20-23-dee95fc33c4f813ac60adfa8c57d210db8183dd8.md b/.changelog-pending/2026-06-03T19-20-23-dee95fc33c4f813ac60adfa8c57d210db8183dd8.md new file mode 100644 index 00000000..0455e635 --- /dev/null +++ b/.changelog-pending/2026-06-03T19-20-23-dee95fc33c4f813ac60adfa8c57d210db8183dd8.md @@ -0,0 +1,21 @@ +* [#397](https://github.com/workos/workos-php/pull/397) feat(generated)!: regenerate from spec (5 changes) + + **⚠️ Breaking** + * **user_management:** Add name field to user models and remove returnTo from revokeSession + * Add `name` field (user's full name) to `User`, `CreateUser`, `UpdateUser`, `UserObject`, `EmailChangeConfirmationUser` models + * Add `name` parameter to `createUser()` and `updateUser()` methods + * Remove `returnTo` parameter from `revokeSession()` method (breaking change) + + **Features** + * **api_keys:** Add expire API key operation and update expires_at requirement + * Add `ApiKeys.createApiKeyExpire()` method to expire, schedule, or clear expiration of API keys + * Make `expires_at` field required in `ApiKeyCreatedData` and `ApiKeyRevokedData` + * Add new event models: `ApiKeyUpdated`, `ApiKeyUpdatedData`, `ApiKeyUpdatedDataOwner`, `UserApiKeyUpdatedDataOwner`, `ApiKeyUpdatedDataPreviousAttribute` + * Add `api_key.updated` webhook event type support + * **directory_sync:** Replace dsync deactivated events with token lifecycle events + * Remove `DsyncDeactivated`, `DsyncDeactivatedData`, `DsyncDeactivatedDataDomain` models (breaking changes) + * Add new token lifecycle event models: `DsyncTokenCreated`, `DsyncTokenCreatedData`, `DsyncTokenRevoked`, `DsyncTokenRevokedData` + * **radar:** Remove DOMAIN_SIGN_UP_RATE_LIMIT control type + * Remove `DOMAIN_SIGN_UP_RATE_LIMIT` enum value from `RadarStandaloneResponseControl` + * **audit_logs:** Add Snowflake log stream type + * Add `SNOWFLAKE` enum value to `AuditLogConfigurationLogStreamType` From c9f3b4481db8850ada979bab2d8cdabe9fa30dd2 Mon Sep 17 00:00:00 2001 From: "Garen J. Torikian" Date: Tue, 16 Jun 2026 20:22:55 -0400 Subject: [PATCH 8/8] update changelog --- ...ee95fc33c4f813ac60adfa8c57d210db8183dd8.md | 52 +++++++++++++------ .vscode/settings.json | 3 ++ 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/.changelog-pending/2026-06-03T19-20-23-dee95fc33c4f813ac60adfa8c57d210db8183dd8.md b/.changelog-pending/2026-06-03T19-20-23-dee95fc33c4f813ac60adfa8c57d210db8183dd8.md index 0455e635..f6257bac 100644 --- a/.changelog-pending/2026-06-03T19-20-23-dee95fc33c4f813ac60adfa8c57d210db8183dd8.md +++ b/.changelog-pending/2026-06-03T19-20-23-dee95fc33c4f813ac60adfa8c57d210db8183dd8.md @@ -1,21 +1,39 @@ -* [#397](https://github.com/workos/workos-php/pull/397) feat(generated)!: regenerate from spec (5 changes) +- [#397](https://github.com/workos/workos-php/pull/397) feat(generated)!: regenerate from spec (5 changes) **⚠️ Breaking** - * **user_management:** Add name field to user models and remove returnTo from revokeSession - * Add `name` field (user's full name) to `User`, `CreateUser`, `UpdateUser`, `UserObject`, `EmailChangeConfirmationUser` models - * Add `name` parameter to `createUser()` and `updateUser()` methods - * Remove `returnTo` parameter from `revokeSession()` method (breaking change) + - **[api_keys](https://workos.com/docs/reference/authkit/api-keys)**: + - Made `expires_at` required in API key models + - **[directory_sync](https://workos.com/docs/reference/directory-sync)**: + - Removed model `DsyncDeactivated` + - Removed model `DsyncDeactivatedData` + - Removed model `DsyncDeactivatedDataDomain` + - Removed enum `DsyncDeactivatedDataType` + - Removed enum `DsyncDeactivatedDataState` + - **[radar](https://workos.com/docs/reference/radar)**: + - Removed `domain_sign_up_rate_limit` from `RadarStandaloneResponseControl` + - **[user_management](https://workos.com/docs/reference/authkit/user)**: + - Removed `return_to` from `RevokeSession` **Features** - * **api_keys:** Add expire API key operation and update expires_at requirement - * Add `ApiKeys.createApiKeyExpire()` method to expire, schedule, or clear expiration of API keys - * Make `expires_at` field required in `ApiKeyCreatedData` and `ApiKeyRevokedData` - * Add new event models: `ApiKeyUpdated`, `ApiKeyUpdatedData`, `ApiKeyUpdatedDataOwner`, `UserApiKeyUpdatedDataOwner`, `ApiKeyUpdatedDataPreviousAttribute` - * Add `api_key.updated` webhook event type support - * **directory_sync:** Replace dsync deactivated events with token lifecycle events - * Remove `DsyncDeactivated`, `DsyncDeactivatedData`, `DsyncDeactivatedDataDomain` models (breaking changes) - * Add new token lifecycle event models: `DsyncTokenCreated`, `DsyncTokenCreatedData`, `DsyncTokenRevoked`, `DsyncTokenRevokedData` - * **radar:** Remove DOMAIN_SIGN_UP_RATE_LIMIT control type - * Remove `DOMAIN_SIGN_UP_RATE_LIMIT` enum value from `RadarStandaloneResponseControl` - * **audit_logs:** Add Snowflake log stream type - * Add `SNOWFLAKE` enum value to `AuditLogConfigurationLogStreamType` + - **[api_keys](https://workos.com/docs/reference/authkit/api-keys)**: + - Added model `ExpireApiKey` + - Added model `ApiKeyUpdated` + - Added model `ApiKeyUpdatedData` + - Added model `ApiKeyUpdatedDataOwner` + - Added model `UserApiKeyUpdatedDataOwner` + - Added model `ApiKeyUpdatedDataPreviousAttribute` + - Added endpoint `POST /api_keys/{id}/expire` + - **[audit_logs](https://workos.com/docs/reference/audit-logs)**: + - Added `Snowflake` to `AuditLogConfigurationLogStreamType` + - **[connect](https://workos.com/docs/reference/workos-connect/standalone)**: + - Added `name` to `UserObject` + - **[directory_sync](https://workos.com/docs/reference/directory-sync)**: + - Added model `DsyncTokenCreated` + - Added model `DsyncTokenCreatedData` + - Added model `DsyncTokenRevoked` + - Added model `DsyncTokenRevokedData` + - **[user_management](https://workos.com/docs/reference/authkit/user)**: + - Added `name` to user management models + - **[webhooks](https://workos.com/docs/reference/webhooks)**: + - Added `api_key.updated` to `CreateWebhookEndpointEvents` + - Added `api_key.updated` to `UpdateWebhookEndpointEvents` diff --git a/.vscode/settings.json b/.vscode/settings.json index f77c6209..62c17de3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,8 @@ }, "[json]": { "editor.defaultFormatter": "vscode.json-language-features" + }, + "[markdown]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" } }