Skip to content

Commit 7ba9e12

Browse files
feat(generated)!: regenerate from spec (9 changes)
1 parent 8757177 commit 7ba9e12

104 files changed

Lines changed: 1560 additions & 372 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.last-synced-sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
92db0495807c86fbbc4d45bd266a6c1f5bcbb59c
1+
a10d9ecb766d2dd996aecb19aa9c801d78bb7c26

.oagen-manifest.json

Lines changed: 64 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": 2,
33
"language": "php",
4-
"generatedAt": "2026-04-28T15:07:27.545Z",
4+
"generatedAt": "2026-05-06T01:54:17.747Z",
55
"files": [
66
"lib/Resource/ActionAuthenticationDenied.php",
77
"lib/Resource/ActionAuthenticationDeniedData.php",
@@ -17,8 +17,6 @@
1717
"lib/Resource/ApiKeyRevokedData.php",
1818
"lib/Resource/ApiKeyRevokedDataOwner.php",
1919
"lib/Resource/ApiKeyValidationResponse.php",
20-
"lib/Resource/ApiKeyWithValue.php",
21-
"lib/Resource/ApiKeyWithValueOwner.php",
2220
"lib/Resource/ApplicationCredentialsListItem.php",
2321
"lib/Resource/AssignRole.php",
2422
"lib/Resource/AuditLogActionJson.php",
@@ -162,6 +160,7 @@
162160
"lib/Resource/CreateRedirectUri.php",
163161
"lib/Resource/CreateRole.php",
164162
"lib/Resource/CreateUser.php",
163+
"lib/Resource/CreateUserApiKey.php",
165164
"lib/Resource/CreateUserInviteOptions.php",
166165
"lib/Resource/CreateUserInviteOptionsLocale.php",
167166
"lib/Resource/CreateUserOrganizationMembership.php",
@@ -229,7 +228,6 @@
229228
"lib/Resource/EventContextGoogleAnalyticsSession.php",
230229
"lib/Resource/EventListListMetadata.php",
231230
"lib/Resource/EventSchema.php",
232-
"lib/Resource/EventsOrder.php",
233231
"lib/Resource/ExternalAuthCompleteResponse.php",
234232
"lib/Resource/FeatureFlag.php",
235233
"lib/Resource/FeatureFlagOwner.php",
@@ -298,6 +296,10 @@
298296
"lib/Resource/MagicAuthCreatedData.php",
299297
"lib/Resource/NewConnectApplicationSecret.php",
300298
"lib/Resource/Organization.php",
299+
"lib/Resource/OrganizationApiKey.php",
300+
"lib/Resource/OrganizationApiKeyOwner.php",
301+
"lib/Resource/OrganizationApiKeyWithValue.php",
302+
"lib/Resource/OrganizationApiKeyWithValueOwner.php",
301303
"lib/Resource/OrganizationCreated.php",
302304
"lib/Resource/OrganizationCreatedData.php",
303305
"lib/Resource/OrganizationCreatedDataDomain.php",
@@ -341,6 +343,7 @@
341343
"lib/Resource/OrganizationUpdated.php",
342344
"lib/Resource/OrganizationUpdatedData.php",
343345
"lib/Resource/OrganizationUpdatedDataDomain.php",
346+
"lib/Resource/PaginationOrder.php",
344347
"lib/Resource/PasswordReset.php",
345348
"lib/Resource/PasswordResetCreated.php",
346349
"lib/Resource/PasswordResetCreatedData.php",
@@ -376,8 +379,6 @@
376379
"lib/Resource/ResetPasswordResponse.php",
377380
"lib/Resource/RevokeSession.php",
378381
"lib/Resource/Role.php",
379-
"lib/Resource/RoleAssignment.php",
380-
"lib/Resource/RoleAssignmentResource.php",
381382
"lib/Resource/RoleCreated.php",
382383
"lib/Resource/RoleCreatedData.php",
383384
"lib/Resource/RoleDeleted.php",
@@ -418,6 +419,12 @@
418419
"lib/Resource/UpdateUserOrganizationMembership.php",
419420
"lib/Resource/UpdateWebhookEndpoint.php",
420421
"lib/Resource/User.php",
422+
"lib/Resource/UserApiKey.php",
423+
"lib/Resource/UserApiKeyCreatedDataOwner.php",
424+
"lib/Resource/UserApiKeyOwner.php",
425+
"lib/Resource/UserApiKeyRevokedDataOwner.php",
426+
"lib/Resource/UserApiKeyWithValue.php",
427+
"lib/Resource/UserApiKeyWithValueOwner.php",
421428
"lib/Resource/UserAuthenticationFactorEnrollResponse.php",
422429
"lib/Resource/UserConsentOption.php",
423430
"lib/Resource/UserConsentOptionChoice.php",
@@ -433,15 +440,19 @@
433440
"lib/Resource/UserObject.php",
434441
"lib/Resource/UserOrganizationMembership.php",
435442
"lib/Resource/UserOrganizationMembershipBaseListData.php",
443+
"lib/Resource/UserRoleAssignment.php",
444+
"lib/Resource/UserRoleAssignmentResource.php",
436445
"lib/Resource/UserSessionsAuthMethod.php",
437446
"lib/Resource/UserSessionsImpersonator.php",
438447
"lib/Resource/UserSessionsListItem.php",
439448
"lib/Resource/UserSessionsStatus.php",
440449
"lib/Resource/UserUpdated.php",
441450
"lib/Resource/ValidateApiKey.php",
451+
"lib/Resource/VaultByokKeyDeleted.php",
452+
"lib/Resource/VaultByokKeyDeletedData.php",
453+
"lib/Resource/VaultByokKeyProvider.php",
442454
"lib/Resource/VaultByokKeyVerificationCompleted.php",
443455
"lib/Resource/VaultByokKeyVerificationCompletedData.php",
444-
"lib/Resource/VaultByokKeyVerificationCompletedDataKeyProvider.php",
445456
"lib/Resource/VaultDataCreated.php",
446457
"lib/Resource/VaultDataCreatedData.php",
447458
"lib/Resource/VaultDataDeleted.php",
@@ -518,8 +529,6 @@
518529
"tests/Fixtures/api_key_revoked_data.json",
519530
"tests/Fixtures/api_key_revoked_data_owner.json",
520531
"tests/Fixtures/api_key_validation_response.json",
521-
"tests/Fixtures/api_key_with_value.json",
522-
"tests/Fixtures/api_key_with_value_owner.json",
523532
"tests/Fixtures/application_credentials_list_item.json",
524533
"tests/Fixtures/assign_role.json",
525534
"tests/Fixtures/audit_log_action_json.json",
@@ -646,6 +655,7 @@
646655
"tests/Fixtures/create_redirect_uri.json",
647656
"tests/Fixtures/create_role.json",
648657
"tests/Fixtures/create_user.json",
658+
"tests/Fixtures/create_user_api_key.json",
649659
"tests/Fixtures/create_user_invite_options.json",
650660
"tests/Fixtures/create_user_organization_membership.json",
651661
"tests/Fixtures/create_webhook_endpoint.json",
@@ -760,7 +770,6 @@
760770
"tests/Fixtures/jwks_response.json",
761771
"tests/Fixtures/jwks_response_keys.json",
762772
"tests/Fixtures/jwt_template_response.json",
763-
"tests/Fixtures/list_api_key.json",
764773
"tests/Fixtures/list_audit_log_action_json.json",
765774
"tests/Fixtures/list_audit_log_schema_json.json",
766775
"tests/Fixtures/list_authentication_factor.json",
@@ -776,11 +785,13 @@
776785
"tests/Fixtures/list_flag.json",
777786
"tests/Fixtures/list_group.json",
778787
"tests/Fixtures/list_organization.json",
779-
"tests/Fixtures/list_role_assignment.json",
788+
"tests/Fixtures/list_organization_api_key.json",
780789
"tests/Fixtures/list_user.json",
790+
"tests/Fixtures/list_user_api_key.json",
781791
"tests/Fixtures/list_user_invite.json",
782792
"tests/Fixtures/list_user_organization_membership.json",
783793
"tests/Fixtures/list_user_organization_membership_base_list_data.json",
794+
"tests/Fixtures/list_user_role_assignment.json",
784795
"tests/Fixtures/list_user_sessions_list_item.json",
785796
"tests/Fixtures/list_webhook_endpoint_json.json",
786797
"tests/Fixtures/magic_auth.json",
@@ -790,6 +801,10 @@
790801
"tests/Fixtures/mfa_totp_session_authenticate_request.json",
791802
"tests/Fixtures/new_connect_application_secret.json",
792803
"tests/Fixtures/organization.json",
804+
"tests/Fixtures/organization_api_key.json",
805+
"tests/Fixtures/organization_api_key_owner.json",
806+
"tests/Fixtures/organization_api_key_with_value.json",
807+
"tests/Fixtures/organization_api_key_with_value_owner.json",
793808
"tests/Fixtures/organization_created.json",
794809
"tests/Fixtures/organization_created_data.json",
795810
"tests/Fixtures/organization_created_data_domain.json",
@@ -857,8 +872,6 @@
857872
"tests/Fixtures/reset_password_response.json",
858873
"tests/Fixtures/revoke_session.json",
859874
"tests/Fixtures/role.json",
860-
"tests/Fixtures/role_assignment.json",
861-
"tests/Fixtures/role_assignment_resource.json",
862875
"tests/Fixtures/role_created.json",
863876
"tests/Fixtures/role_created_data.json",
864877
"tests/Fixtures/role_deleted.json",
@@ -897,6 +910,12 @@
897910
"tests/Fixtures/update_user_organization_membership.json",
898911
"tests/Fixtures/update_webhook_endpoint.json",
899912
"tests/Fixtures/user.json",
913+
"tests/Fixtures/user_api_key.json",
914+
"tests/Fixtures/user_api_key_created_data_owner.json",
915+
"tests/Fixtures/user_api_key_owner.json",
916+
"tests/Fixtures/user_api_key_revoked_data_owner.json",
917+
"tests/Fixtures/user_api_key_with_value.json",
918+
"tests/Fixtures/user_api_key_with_value_owner.json",
900919
"tests/Fixtures/user_authentication_factor_enroll_response.json",
901920
"tests/Fixtures/user_consent_option.json",
902921
"tests/Fixtures/user_consent_option_choice.json",
@@ -908,10 +927,14 @@
908927
"tests/Fixtures/user_object.json",
909928
"tests/Fixtures/user_organization_membership.json",
910929
"tests/Fixtures/user_organization_membership_base_list_data.json",
930+
"tests/Fixtures/user_role_assignment.json",
931+
"tests/Fixtures/user_role_assignment_resource.json",
911932
"tests/Fixtures/user_sessions_impersonator.json",
912933
"tests/Fixtures/user_sessions_list_item.json",
913934
"tests/Fixtures/user_updated.json",
914935
"tests/Fixtures/validate_api_key.json",
936+
"tests/Fixtures/vault_byok_key_deleted.json",
937+
"tests/Fixtures/vault_byok_key_deleted_data.json",
915938
"tests/Fixtures/vault_byok_key_verification_completed.json",
916939
"tests/Fixtures/vault_byok_key_verification_completed_data.json",
917940
"tests/Fixtures/vault_data_created.json",
@@ -962,14 +985,6 @@
962985
"tests/Service/WidgetsTest.php"
963986
],
964987
"operations": {
965-
"POST /api_keys/validations": {
966-
"sdkMethod": "createValidation",
967-
"service": "apiKeys"
968-
},
969-
"DELETE /api_keys/{id}": {
970-
"sdkMethod": "deleteApiKey",
971-
"service": "apiKeys"
972-
},
973988
"POST /auth/challenges/{id}/verify": {
974989
"sdkMethod": "verifyChallenge",
975990
"service": "multiFactorAuth"
@@ -1074,6 +1089,10 @@
10741089
"sdkMethod": "listMembershipsForResourceByExternalId",
10751090
"service": "authorization"
10761091
},
1092+
"GET /authorization/organizations/{organization_id}/resources/{resource_type_slug}/{external_id}/role_assignments": {
1093+
"sdkMethod": "listRoleAssignmentsForResourceByExternalId",
1094+
"service": "authorization"
1095+
},
10771096
"GET /authorization/resources": {
10781097
"sdkMethod": "listResources",
10791098
"service": "authorization"
@@ -1098,6 +1117,10 @@
10981117
"sdkMethod": "listMembershipsForResource",
10991118
"service": "authorization"
11001119
},
1120+
"GET /authorization/resources/{resource_id}/role_assignments": {
1121+
"sdkMethod": "listRoleAssignmentsForResource",
1122+
"service": "authorization"
1123+
},
11011124
"GET /authorization/roles": {
11021125
"sdkMethod": "listEnvironmentRoles",
11031126
"service": "authorization"
@@ -1506,6 +1529,10 @@
15061529
"sdkMethod": "revokeInvitation",
15071530
"service": "userManagement"
15081531
},
1532+
"GET /user_management/jwt_template": {
1533+
"sdkMethod": "listJWTTemplate",
1534+
"service": "userManagement"
1535+
},
15091536
"PUT /user_management/jwt_template": {
15101537
"sdkMethod": "updateJWTTemplate",
15111538
"service": "userManagement"
@@ -1606,6 +1633,22 @@
16061633
"sdkMethod": "createToken",
16071634
"service": "widgets"
16081635
},
1636+
"POST /api_keys/validations": {
1637+
"sdkMethod": "createValidation",
1638+
"service": "apiKeys"
1639+
},
1640+
"DELETE /api_keys/{id}": {
1641+
"sdkMethod": "deleteApiKey",
1642+
"service": "apiKeys"
1643+
},
1644+
"GET /user_management/users/{userId}/api_keys": {
1645+
"sdkMethod": "listUserApiKeys",
1646+
"service": "userManagement"
1647+
},
1648+
"POST /user_management/users/{userId}/api_keys": {
1649+
"sdkMethod": "createUserApiKey",
1650+
"service": "userManagement"
1651+
},
16091652
"GET /audit_logs/actions": {
16101653
"sdkMethod": "listActions",
16111654
"service": "auditLogs"

lib/Resource/ApiKey.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
namespace WorkOS\Resource;
88

9-
/** The API Key object if the value is valid, or `null` if invalid. */
109
readonly class ApiKey implements \JsonSerializable
1110
{
1211
use JsonSerializableTrait;
@@ -17,7 +16,7 @@ public function __construct(
1716
/** Unique identifier of the API Key. */
1817
public string $id,
1918
/** The entity that owns the API Key. */
20-
public ApiKeyOwner $owner,
19+
public ApiKeyOwner|UserApiKeyOwner $owner,
2120
/** A descriptive name for the API Key. */
2221
public string $name,
2322
/** An obfuscated representation of the API Key value. */
@@ -41,7 +40,9 @@ public static function fromArray(array $data): self
4140
return new self(
4241
object: $data['object'] ?? 'api_key',
4342
id: $data['id'],
44-
owner: ApiKeyOwner::fromArray($data['owner']),
43+
owner: match ($data['owner']['type'] ?? null) {
44+
'organization' => ApiKeyOwner::fromArray($data['owner']), 'user' => UserApiKeyOwner::fromArray($data['owner']), default => $data['owner']
45+
},
4546
name: $data['name'],
4647
obfuscatedValue: $data['obfuscated_value'],
4748
lastUsedAt: isset($data['last_used_at']) ? new \DateTimeImmutable($data['last_used_at']) : null,
@@ -56,7 +57,7 @@ public function toArray(): array
5657
return [
5758
'object' => $this->object,
5859
'id' => $this->id,
59-
'owner' => $this->owner->toArray(),
60+
'owner' => $this->owner,
6061
'name' => $this->name,
6162
'obfuscated_value' => $this->obfuscatedValue,
6263
'last_used_at' => $this->lastUsedAt?->format(\DateTimeInterface::RFC3339_EXTENDED),

lib/Resource/ApiKeyCreatedData.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __construct(
1717
/** Unique identifier of the API key. */
1818
public string $id,
1919
/** The owner of the API key. */
20-
public ApiKeyCreatedDataOwner $owner,
20+
public ApiKeyCreatedDataOwner|UserApiKeyCreatedDataOwner $owner,
2121
/** The name of the API key. */
2222
public string $name,
2323
/** The obfuscated value of the API key. */
@@ -41,7 +41,9 @@ public static function fromArray(array $data): self
4141
return new self(
4242
object: $data['object'] ?? 'api_key',
4343
id: $data['id'],
44-
owner: ApiKeyCreatedDataOwner::fromArray($data['owner']),
44+
owner: match ($data['owner']['type'] ?? null) {
45+
'organization' => ApiKeyCreatedDataOwner::fromArray($data['owner']), 'user' => UserApiKeyCreatedDataOwner::fromArray($data['owner']), default => $data['owner']
46+
},
4547
name: $data['name'],
4648
obfuscatedValue: $data['obfuscated_value'],
4749
lastUsedAt: $data['last_used_at'] ?? null,
@@ -56,7 +58,7 @@ public function toArray(): array
5658
return [
5759
'object' => $this->object,
5860
'id' => $this->id,
59-
'owner' => $this->owner->toArray(),
61+
'owner' => $this->owner,
6062
'name' => $this->name,
6163
'obfuscated_value' => $this->obfuscatedValue,
6264
'last_used_at' => $this->lastUsedAt,

lib/Resource/ApiKeyCreatedDataOwner.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
namespace WorkOS\Resource;
88

9-
/** The owner of the API key. */
109
readonly class ApiKeyCreatedDataOwner implements \JsonSerializable
1110
{
1211
use JsonSerializableTrait;

lib/Resource/ApiKeyOwner.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
namespace WorkOS\Resource;
88

9-
/** The entity that owns the API Key. */
109
readonly class ApiKeyOwner implements \JsonSerializable
1110
{
1211
use JsonSerializableTrait;

lib/Resource/ApiKeyRevokedData.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __construct(
1717
/** Unique identifier of the API key. */
1818
public string $id,
1919
/** The owner of the API key. */
20-
public ApiKeyRevokedDataOwner $owner,
20+
public ApiKeyRevokedDataOwner|UserApiKeyRevokedDataOwner $owner,
2121
/** The name of the API key. */
2222
public string $name,
2323
/** The obfuscated value of the API key. */
@@ -41,7 +41,9 @@ public static function fromArray(array $data): self
4141
return new self(
4242
object: $data['object'] ?? 'api_key',
4343
id: $data['id'],
44-
owner: ApiKeyRevokedDataOwner::fromArray($data['owner']),
44+
owner: match ($data['owner']['type'] ?? null) {
45+
'organization' => ApiKeyRevokedDataOwner::fromArray($data['owner']), 'user' => UserApiKeyRevokedDataOwner::fromArray($data['owner']), default => $data['owner']
46+
},
4547
name: $data['name'],
4648
obfuscatedValue: $data['obfuscated_value'],
4749
lastUsedAt: $data['last_used_at'] ?? null,
@@ -56,7 +58,7 @@ public function toArray(): array
5658
return [
5759
'object' => $this->object,
5860
'id' => $this->id,
59-
'owner' => $this->owner->toArray(),
61+
'owner' => $this->owner,
6062
'name' => $this->name,
6163
'obfuscated_value' => $this->obfuscatedValue,
6264
'last_used_at' => $this->lastUsedAt,

lib/Resource/ApiKeyRevokedDataOwner.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
namespace WorkOS\Resource;
88

9-
/** The owner of the API key. */
109
readonly class ApiKeyRevokedDataOwner implements \JsonSerializable
1110
{
1211
use JsonSerializableTrait;

0 commit comments

Comments
 (0)