Skip to content

Commit d7cb2d5

Browse files
feat(generated): Changes to events and user_management (#428)
Co-authored-by: workos-sdk-automation[bot] <255426317+workos-sdk-automation[bot]@users.noreply.github.com>
1 parent 7df1141 commit d7cb2d5

51 files changed

Lines changed: 443 additions & 46 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.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
* [#428](https://github.com/workos/workos-php/pull/428) feat(generated)!: regenerate from spec (2 changes)
2+
3+
**⚠️ Breaking**
4+
* **[events](https://workos.com/docs/reference/events)**:
5+
* Changed required status for parameter `Events.list.events`
6+
7+
**Features**
8+
* **[groups](https://workos.com/docs/reference/groups)**:
9+
* Added parameter `Groups.list.search`
10+
* **[connect](https://workos.com/docs/reference/workos-connect/standalone)**:
11+
* Added `client_id` to `ConnectedAccount`
12+
* Added `client_secret_last_4` to `ConnectedAccount`
13+
* Added `config` to `ConnectedAccount`
14+
* **[pipes](https://workos.com/docs/reference/pipes)**:
15+
* Added `client_id` to `DataIntegrationsListResponseDataConnectedAccount`
16+
* Added `client_secret_last_4` to `DataIntegrationsListResponseDataConnectedAccount`
17+
* Added `config` to `DataIntegrationsListResponseDataConnectedAccount`
18+
* Changed errors for endpoint `POST /data-integrations/{slug}/credentials`
19+
* Made `CustomProviderDefinition.authorization_url` optional
20+
* Made `CustomProviderDefinition.token_url` optional
21+
* Added model `DataIntegrationsUpsertClientCredentialsRequest`
22+
* Added `client_credentials` to `CreateDataIntegrationAuthMethods`
23+
* Added endpoint `PUT /data-integrations/{slug}/client-credentials`
24+
* **[sso](https://workos.com/docs/reference/sso)**:
25+
* Added `XOAuth` to `ConnectionType`
26+
* Added `XOAuth` to `ProfileConnectionType`
27+
* Added `XOAuth` to `ConnectionsConnectionType`
28+
* Added `GrokOAuth` to `ConnectionType`
29+
* Added `GrokOAuth` to `ProfileConnectionType`
30+
* Added `GrokOAuth` to `ConnectionsConnectionType`
31+
* **[user_management](https://workos.com/docs/reference/authkit/user)**:
32+
* Changed errors for endpoint `DELETE /user_management/users/{id}`
33+
* Added `password_salt_position` to `CreateUser`
34+
* Added `password_salt_position` to `UpdateUser`
35+
* Made `RadarSmsChallengeCodeSessionAuthenticateRequest.verification_id` optional
36+
* Made `RadarSmsChallengeCodeSessionAuthenticateRequest.phone_number` optional
37+
* Added enum `CreateUserPasswordSaltPosition`
38+
* Added enum `UpdateUserPasswordSaltPosition`
39+
* Added `XOAuth` to `AuthenticateResponseAuthenticationMethod`
40+
* Added `XOAuth` to `UserIdentitiesGetItemProvider`
41+
* Added `GrokOAuth` to `AuthenticateResponseAuthenticationMethod`
42+
* Added `GrokOAuth` to `UserIdentitiesGetItemProvider`
43+
* **[webhooks](https://workos.com/docs/reference/webhooks)**:
44+
* Added `agent.registration.refreshed` to `CreateWebhookEndpointEvents`
45+
* Added `agent.registration.refreshed` to `UpdateWebhookEndpointEvents`
46+
47+
**Fixes**
48+
* **[pipes](https://workos.com/docs/reference/pipes)**:
49+
* Changed the type of `DataIntegration.credentials`
50+
* **[user_management](https://workos.com/docs/reference/authkit/user)**:
51+
* Changed errors for endpoint `POST /user_management/authenticate`
52+
* Changed errors for endpoint `POST /user_management/users`
53+
* Changed errors for endpoint `PUT /user_management/users/{id}`

.last-synced-sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ae3ebbb08d9b4bf9b2391558e820b7eb6f511fb9
1+
a07d8e7988d035c2d727787f18f64d71b4b89a84

.oagen-manifest.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
"lib/Resource/AgentRegistrationKind.php",
3838
"lib/Resource/AgentRegistrationOrganizationSwitched.php",
3939
"lib/Resource/AgentRegistrationOrganizationSwitchedData.php",
40+
"lib/Resource/AgentRegistrationRefreshed.php",
41+
"lib/Resource/AgentRegistrationRefreshedData.php",
4042
"lib/Resource/AgentRegistrationRevoked.php",
4143
"lib/Resource/AgentRegistrationRevokedData.php",
4244
"lib/Resource/AgentRegistrationStatus.php",
@@ -221,6 +223,7 @@
221223
"lib/Resource/CreateUserInviteOptionsLocale.php",
222224
"lib/Resource/CreateUserOrganizationMembership.php",
223225
"lib/Resource/CreateUserPasswordHashType.php",
226+
"lib/Resource/CreateUserPasswordSaltPosition.php",
224227
"lib/Resource/CreateWebhookEndpoint.php",
225228
"lib/Resource/CreateWebhookEndpointEvents.php",
226229
"lib/Resource/CustomProviderDefinition.php",
@@ -250,6 +253,7 @@
250253
"lib/Resource/DataIntegrationsListResponseDataConnectedAccount.php",
251254
"lib/Resource/DataIntegrationsListResponseDataOwnership.php",
252255
"lib/Resource/DataIntegrationsUpsertApiKeyRequest.php",
256+
"lib/Resource/DataIntegrationsUpsertClientCredentialsRequest.php",
253257
"lib/Resource/DataIntegrationsVendCredentialsRequest.php",
254258
"lib/Resource/DecryptRequest.php",
255259
"lib/Resource/DecryptResponse.php",
@@ -666,6 +670,8 @@
666670
"tests/Fixtures/agent_registration_expired_data.json",
667671
"tests/Fixtures/agent_registration_organization_switched.json",
668672
"tests/Fixtures/agent_registration_organization_switched_data.json",
673+
"tests/Fixtures/agent_registration_refreshed.json",
674+
"tests/Fixtures/agent_registration_refreshed_data.json",
669675
"tests/Fixtures/agent_registration_revoked.json",
670676
"tests/Fixtures/agent_registration_revoked_data.json",
671677
"tests/Fixtures/api_key.json",
@@ -848,6 +854,7 @@
848854
"tests/Fixtures/data_integrations_list_response_data.json",
849855
"tests/Fixtures/data_integrations_list_response_data_connected_account.json",
850856
"tests/Fixtures/data_integrations_upsert_api_key_request.json",
857+
"tests/Fixtures/data_integrations_upsert_client_credentials_request.json",
851858
"tests/Fixtures/data_integrations_vend_credentials_request.json",
852859
"tests/Fixtures/decrypt_request.json",
853860
"tests/Fixtures/decrypt_response.json",
@@ -2057,6 +2064,10 @@
20572064
"GET /audit_logs/exports/{auditLogExportId}": {
20582065
"sdkMethod": "getExport",
20592066
"service": "auditLogs"
2067+
},
2068+
"PUT /data-integrations/{slug}/client-credentials": {
2069+
"sdkMethod": "updateDataIntegrationClientCredentials",
2070+
"service": "pipes"
20602071
}
20612072
}
20622073
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
// This file is auto-generated by oagen. Do not edit.
6+
7+
namespace WorkOS\Resource;
8+
9+
readonly class AgentRegistrationRefreshed implements \JsonSerializable
10+
{
11+
use JsonSerializableTrait;
12+
13+
public function __construct(
14+
/** Distinguishes the Event object. */
15+
public string $object,
16+
/** Unique identifier for the event. */
17+
public string $id,
18+
public string $event,
19+
/** The event payload. */
20+
public AgentRegistrationRefreshedData $data,
21+
/** An ISO 8601 timestamp. */
22+
public \DateTimeImmutable $createdAt,
23+
public ?EventContext $context = null,
24+
) {
25+
}
26+
27+
public static function fromArray(array $data): self
28+
{
29+
return new self(
30+
object: $data['object'] ?? 'event',
31+
id: $data['id'],
32+
event: $data['event'] ?? 'agent.registration.refreshed',
33+
data: AgentRegistrationRefreshedData::fromArray($data['data']),
34+
createdAt: new \DateTimeImmutable($data['created_at']),
35+
context: isset($data['context']) ? EventContext::fromArray($data['context']) : null,
36+
);
37+
}
38+
39+
public function toArray(): array
40+
{
41+
return [
42+
'object' => $this->object,
43+
'id' => $this->id,
44+
'event' => $this->event,
45+
'data' => $this->data->toArray(),
46+
'created_at' => $this->createdAt->format(\DateTimeInterface::RFC3339_EXTENDED),
47+
'context' => $this->context?->toArray(),
48+
];
49+
}
50+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
// This file is auto-generated by oagen. Do not edit.
6+
7+
namespace WorkOS\Resource;
8+
9+
/** The event payload. */
10+
readonly class AgentRegistrationRefreshedData implements \JsonSerializable
11+
{
12+
use JsonSerializableTrait;
13+
14+
public function __construct(
15+
/** The agent registration whose identity assertion was refreshed. */
16+
public string $agentRegistrationId,
17+
) {
18+
}
19+
20+
public static function fromArray(array $data): self
21+
{
22+
return new self(
23+
agentRegistrationId: $data['agent_registration_id'],
24+
);
25+
}
26+
27+
public function toArray(): array
28+
{
29+
return [
30+
'agent_registration_id' => $this->agentRegistrationId,
31+
];
32+
}
33+
}

lib/Resource/AuthenticateResponseAuthenticationMethod.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ enum AuthenticateResponseAuthenticationMethod: string
1919
case GitHubOAuth = 'GitHubOAuth';
2020
case GitLabOAuth = 'GitLabOAuth';
2121
case GoogleOAuth = 'GoogleOAuth';
22+
case GrokOAuth = 'GrokOAuth';
23+
case XoAuth = 'XOAuth';
2224
case IntuitOAuth = 'IntuitOAuth';
2325
case LinkedInOAuth = 'LinkedInOAuth';
2426
case MicrosoftOAuth = 'MicrosoftOAuth';

lib/Resource/ConnectedAccount.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ public function __construct(
3939
public ?DataIntegrationAuthMethods $authMethod = null,
4040
/** The last four characters of the API key, or `null` for OAuth connections. */
4141
public ?string $apiKeyLast4 = null,
42+
/** The client ID supplied for this connection. Only present when `auth_method` is `client_credentials`. */
43+
public ?string $clientId = null,
44+
/** The last four characters of the client secret supplied for this connection, or `null` when it can't be read. Only present when `auth_method` is `client_credentials`. */
45+
public ?string $clientSecretLast4 = null,
46+
/**
47+
* The connection-level configuration values stored for this connection — the fields the provider declares at `installation` scope, excluding any it declares as secret. Only present when `auth_method` is `client_credentials`.
48+
* @var array<string, string>|null
49+
*/
50+
public ?array $config = null,
4251
) {
4352
}
4453

@@ -55,6 +64,9 @@ public static function fromArray(array $data): self
5564
updatedAt: $data['updated_at'],
5665
authMethod: isset($data['auth_method']) ? DataIntegrationAuthMethods::from($data['auth_method']) : null,
5766
apiKeyLast4: $data['api_key_last_4'] ?? null,
67+
clientId: $data['client_id'] ?? null,
68+
clientSecretLast4: $data['client_secret_last_4'] ?? null,
69+
config: $data['config'] ?? null,
5870
);
5971
}
6072

@@ -71,6 +83,9 @@ public function toArray(): array
7183
'updated_at' => $this->updatedAt,
7284
'auth_method' => $this->authMethod?->value,
7385
'api_key_last_4' => $this->apiKeyLast4,
86+
'client_id' => $this->clientId,
87+
'client_secret_last_4' => $this->clientSecretLast4,
88+
'config' => $this->config,
7489
];
7590
}
7691
}

lib/Resource/ConnectionDeletedDataConnectionType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ enum ConnectionDeletedDataConnectionType: string
3030
case GoogleOAuth = 'GoogleOAuth';
3131
case GoogleOidc = 'GoogleOIDC';
3232
case GoogleSAML = 'GoogleSAML';
33+
case GrokOAuth = 'GrokOAuth';
34+
case XoAuth = 'XOAuth';
3335
case IntuitOAuth = 'IntuitOAuth';
3436
case JumpCloudSAML = 'JumpCloudSAML';
3537
case KeycloakSAML = 'KeycloakSAML';

lib/Resource/ConnectionType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ enum ConnectionType: string
3131
case GoogleOAuth = 'GoogleOAuth';
3232
case GoogleOidc = 'GoogleOIDC';
3333
case GoogleSAML = 'GoogleSAML';
34+
case GrokOAuth = 'GrokOAuth';
35+
case XoAuth = 'XOAuth';
3436
case IntuitOAuth = 'IntuitOAuth';
3537
case JumpCloudSAML = 'JumpCloudSAML';
3638
case KeycloakSAML = 'KeycloakSAML';

lib/Resource/ConnectionsConnectionType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ enum ConnectionsConnectionType: string
2929
case GoogleOAuth = 'GoogleOAuth';
3030
case GoogleOidc = 'GoogleOIDC';
3131
case GoogleSAML = 'GoogleSAML';
32+
case GrokOAuth = 'GrokOAuth';
33+
case XoAuth = 'XOAuth';
3234
case IntuitOAuth = 'IntuitOAuth';
3335
case JumpCloudSAML = 'JumpCloudSAML';
3436
case KeycloakSAML = 'KeycloakSAML';

0 commit comments

Comments
 (0)