From 028ff6984bac28e96db8df7b99da2dd02f4c2fdc Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 17:55:00 +0000 Subject: [PATCH] feat(generated)!: regenerate from spec (4 changes) --- .last-synced-sha | 2 +- .oagen-manifest.json | 2 +- lib/Service/Authorization.php | 18 +++++++++++++++--- lib/Service/SSO.php | 2 +- tests/Service/AuthorizationTest.php | 14 +++++++++----- 5 files changed, 27 insertions(+), 11 deletions(-) diff --git a/.last-synced-sha b/.last-synced-sha index 047fc7ee..1e1c7499 100644 --- a/.last-synced-sha +++ b/.last-synced-sha @@ -1 +1 @@ -a10d9ecb766d2dd996aecb19aa9c801d78bb7c26 +13aaa9a125fc87d1ed23acd5ef740382510296be diff --git a/.oagen-manifest.json b/.oagen-manifest.json index 8a832128..54c9134f 100644 --- a/.oagen-manifest.json +++ b/.oagen-manifest.json @@ -1,7 +1,7 @@ { "version": 2, "language": "php", - "generatedAt": "2026-05-06T22:17:34.176Z", + "generatedAt": "2026-05-18T17:54:50.669Z", "files": [ "lib/Resource/ActionAuthenticationDenied.php", "lib/Resource/ActionAuthenticationDeniedData.php", diff --git a/lib/Service/Authorization.php b/lib/Service/Authorization.php index f5cef0a9..b71e563a 100644 --- a/lib/Service/Authorization.php +++ b/lib/Service/Authorization.php @@ -189,6 +189,9 @@ public function listEffectivePermissionsByExternalId( * @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 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. * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\UserRoleAssignment> * @throws \WorkOS\Exception\WorkOSException */ @@ -198,6 +201,9 @@ public function listRoleAssignments( ?string $after = null, ?int $limit = null, \WorkOS\Resource\PaginationOrder $order = \WorkOS\Resource\PaginationOrder::Desc, + ?string $resourceId = null, + ?string $resourceExternalId = null, + ?string $resourceTypeSlug = null, ?\WorkOS\RequestOptions $options = null, ): \WorkOS\PaginatedResponse { $query = array_filter([ @@ -205,6 +211,9 @@ public function listRoleAssignments( 'after' => $after, 'limit' => $limit, 'order' => $order->value, + 'resource_id' => $resourceId, + 'resource_external_id' => $resourceExternalId, + 'resource_type_slug' => $resourceTypeSlug, ], fn ($v) => $v !== null); return $this->client->requestPage( method: 'GET', @@ -661,6 +670,7 @@ public function listMembershipsForResourceByExternalId( * @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 string|null $roleSlug Filter assignments by the slug of the role. * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\UserRoleAssignment> * @throws \WorkOS\Exception\WorkOSException */ @@ -672,6 +682,7 @@ public function listRoleAssignmentsForResourceByExternalId( ?string $after = null, ?int $limit = null, \WorkOS\Resource\PaginationOrder $order = \WorkOS\Resource\PaginationOrder::Desc, + ?string $roleSlug = null, ?\WorkOS\RequestOptions $options = null, ): \WorkOS\PaginatedResponse { $query = array_filter([ @@ -679,6 +690,7 @@ public function listRoleAssignmentsForResourceByExternalId( 'after' => $after, 'limit' => $limit, 'order' => $order->value, + 'role_slug' => $roleSlug, ], fn ($v) => $v !== null); return $this->client->requestPage( method: 'GET', @@ -701,7 +713,6 @@ public function listRoleAssignmentsForResourceByExternalId( * @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. - * @param string|null $search Search resources by name. * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\AuthorizationResource> * @throws \WorkOS\Exception\WorkOSException */ @@ -714,7 +725,6 @@ public function listResources( ?string $organizationId = null, ?string $resourceTypeSlug = null, ?string $resourceExternalId = null, - ?string $search = null, ?\WorkOS\RequestOptions $options = null, ): \WorkOS\PaginatedResponse { $query = array_filter([ @@ -725,7 +735,6 @@ public function listResources( 'organization_id' => $organizationId, 'resource_type_slug' => $resourceTypeSlug, 'resource_external_id' => $resourceExternalId, - 'search' => $search, ], fn ($v) => $v !== null); if ($parent instanceof ParentById) { $query['parent_resource_id'] = $parent->resourceId; @@ -918,6 +927,7 @@ public function listMembershipsForResource( * @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 string|null $roleSlug Filter assignments by the slug of the role. * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\UserRoleAssignment> * @throws \WorkOS\Exception\WorkOSException */ @@ -927,6 +937,7 @@ public function listRoleAssignmentsForResource( ?string $after = null, ?int $limit = null, \WorkOS\Resource\PaginationOrder $order = \WorkOS\Resource\PaginationOrder::Desc, + ?string $roleSlug = null, ?\WorkOS\RequestOptions $options = null, ): \WorkOS\PaginatedResponse { $query = array_filter([ @@ -934,6 +945,7 @@ public function listRoleAssignmentsForResource( 'after' => $after, 'limit' => $limit, 'order' => $order->value, + 'role_slug' => $roleSlug, ], fn ($v) => $v !== null); return $this->client->requestPage( method: 'GET', diff --git a/lib/Service/SSO.php b/lib/Service/SSO.php index 77107ef3..f2a6f340 100644 --- a/lib/Service/SSO.php +++ b/lib/Service/SSO.php @@ -119,7 +119,7 @@ public function deleteConnection( * * You can persist the WorkOS organization ID with application user or team identifiers. WorkOS will use the organization ID to determine the appropriate connection and the IdP to direct the user to for authentication. * @param string|null $domainHint Can be used to pre-fill the domain field when initiating authentication with Microsoft OAuth or with a Google SAML connection type. - * @param string|null $loginHint Can be used to pre-fill the username/email address field of the IdP sign-in page for the user, if you know their username ahead of time. Currently supported for OAuth, OpenID Connect, Okta, and Entra ID connections. + * @param string|null $loginHint Can be used to pre-fill the username/email address field of the IdP sign-in page for the user, if you know their username ahead of time. Currently supported for OAuth, OpenID Connect, Okta, Entra ID, and custom SAML connections. * @param string|null $nonce A random string generated by the client that is used to mitigate replay attacks. * @return string * @throws \WorkOS\Exception\ConfigurationException diff --git a/tests/Service/AuthorizationTest.php b/tests/Service/AuthorizationTest.php index 873caa20..10dc6f8b 100644 --- a/tests/Service/AuthorizationTest.php +++ b/tests/Service/AuthorizationTest.php @@ -81,7 +81,7 @@ public function testListRoleAssignments(): void { $fixture = $this->loadFixture('list_user_role_assignment'); $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]); - $result = $client->authorization()->listRoleAssignments('test_organization_membership_id', before: 'test_value', after: 'test_value', limit: 1, order: \WorkOS\Resource\PaginationOrder::Normal); + $result = $client->authorization()->listRoleAssignments('test_organization_membership_id', before: 'test_value', after: 'test_value', limit: 1, order: \WorkOS\Resource\PaginationOrder::Normal, resourceId: 'test_value', resourceExternalId: 'test_value', resourceTypeSlug: 'test_value'); $this->assertInstanceOf(\WorkOS\PaginatedResponse::class, $result); $request = $this->getLastRequest(); $this->assertSame('GET', $request->getMethod()); @@ -91,6 +91,9 @@ public function testListRoleAssignments(): void $this->assertSame('test_value', $query['after']); $this->assertArrayHasKey('limit', $query); $this->assertSame('normal', $query['order']); + $this->assertSame('test_value', $query['resource_id']); + $this->assertSame('test_value', $query['resource_external_id']); + $this->assertSame('test_value', $query['resource_type_slug']); } public function testAssignRole(): void @@ -290,7 +293,7 @@ public function testListRoleAssignmentsForResourceByExternalId(): void { $fixture = $this->loadFixture('list_user_role_assignment'); $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]); - $result = $client->authorization()->listRoleAssignmentsForResourceByExternalId('test_organization_id', 'test_resource_type_slug', 'test_external_id', before: 'test_value', after: 'test_value', limit: 1, order: \WorkOS\Resource\PaginationOrder::Normal); + $result = $client->authorization()->listRoleAssignmentsForResourceByExternalId('test_organization_id', 'test_resource_type_slug', 'test_external_id', before: 'test_value', after: 'test_value', limit: 1, order: \WorkOS\Resource\PaginationOrder::Normal, roleSlug: 'test_value'); $this->assertInstanceOf(\WorkOS\PaginatedResponse::class, $result); $request = $this->getLastRequest(); $this->assertSame('GET', $request->getMethod()); @@ -300,13 +303,14 @@ public function testListRoleAssignmentsForResourceByExternalId(): void $this->assertSame('test_value', $query['after']); $this->assertArrayHasKey('limit', $query); $this->assertSame('normal', $query['order']); + $this->assertSame('test_value', $query['role_slug']); } public function testListResources(): void { $fixture = $this->loadFixture('list_authorization_resource'); $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]); - $result = $client->authorization()->listResources(parent: new \WorkOS\Service\ParentById(resourceId: 'test_value'), before: 'test_value', after: 'test_value', limit: 1, order: \WorkOS\Resource\PaginationOrder::Normal, organizationId: 'test_value', resourceTypeSlug: 'test_value', resourceExternalId: 'test_value', search: 'test_value'); + $result = $client->authorization()->listResources(parent: new \WorkOS\Service\ParentById(resourceId: 'test_value'), before: 'test_value', after: 'test_value', limit: 1, order: \WorkOS\Resource\PaginationOrder::Normal, organizationId: 'test_value', resourceTypeSlug: 'test_value', resourceExternalId: 'test_value'); $this->assertInstanceOf(\WorkOS\PaginatedResponse::class, $result); $request = $this->getLastRequest(); $this->assertSame('GET', $request->getMethod()); @@ -320,7 +324,6 @@ public function testListResources(): void $this->assertSame('test_value', $query['organization_id']); $this->assertSame('test_value', $query['resource_type_slug']); $this->assertSame('test_value', $query['resource_external_id']); - $this->assertSame('test_value', $query['search']); } public function testCreateResource(): void @@ -401,7 +404,7 @@ public function testListRoleAssignmentsForResource(): void { $fixture = $this->loadFixture('list_user_role_assignment'); $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]); - $result = $client->authorization()->listRoleAssignmentsForResource('test_resource_id', before: 'test_value', after: 'test_value', limit: 1, order: \WorkOS\Resource\PaginationOrder::Normal); + $result = $client->authorization()->listRoleAssignmentsForResource('test_resource_id', before: 'test_value', after: 'test_value', limit: 1, order: \WorkOS\Resource\PaginationOrder::Normal, roleSlug: 'test_value'); $this->assertInstanceOf(\WorkOS\PaginatedResponse::class, $result); $request = $this->getLastRequest(); $this->assertSame('GET', $request->getMethod()); @@ -411,6 +414,7 @@ public function testListRoleAssignmentsForResource(): void $this->assertSame('test_value', $query['after']); $this->assertArrayHasKey('limit', $query); $this->assertSame('normal', $query['order']); + $this->assertSame('test_value', $query['role_slug']); } public function testListEnvironmentRoles(): void