Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
* [#413](https://github.com/workos/workos-php/pull/413) feat(generated): regenerate from spec (1 change)

**Features**
* **[pipes](https://workos.com/docs/reference/pipes)**:
* Added model `DataIntegrationCredentialsDto`
* Added model `CustomProviderDefinition`
* Added model `CreateDataIntegration`
* Added model `UpdateCustomProviderDefinition`
* Added model `UpdateDataIntegration`
* Added model `DataIntegration`
* Added model `DataIntegrationList`
* Added model `DataIntegrationListListMetadata`
* Added model `DataIntegrationCredential`
* Added model `DataIntegrationCustomProvider`
* Added enum `DataIntegrationCredentialsType`
* Added enum `CustomProviderDefinitionAuthenticateVia`
* Added enum `UpdateCustomProviderDefinitionAuthenticateVia`
* Added enum `DataIntegrationState`
* Added enum `DataIntegrationCredentialType`
* Added enum `DataIntegrationCustomProviderAuthenticateVia`
* Added endpoint `GET /data-integrations`
* Added endpoint `POST /data-integrations`
* Added endpoint `GET /data-integrations/{slug}`
* Added endpoint `PUT /data-integrations/{slug}`
* Added endpoint `DELETE /data-integrations/{slug}`
* Added endpoint `POST /user_management/users/{user_id}/connected_accounts/{slug}`
* Added endpoint `PUT /user_management/users/{user_id}/connected_accounts/{slug}`
2 changes: 1 addition & 1 deletion .last-synced-sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dc04d30b352063b5c97e45de03be5c83629f5412
4b4e0618779460dbebc1cf5e0f02197c21796d1f
57 changes: 56 additions & 1 deletion .oagen-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 2,
"language": "php",
"generatedAt": "2026-07-01T18:19:15.811Z",
"generatedAt": "2026-07-02T14:58:50.844Z",
"files": [
"lib/Resource/ActionAuthenticationDenied.php",
"lib/Resource/ActionAuthenticationDeniedData.php",
Expand Down Expand Up @@ -130,6 +130,7 @@
"lib/Resource/ConnectApplicationRedirectUri.php",
"lib/Resource/ConnectedAccount.php",
"lib/Resource/ConnectedAccountAuthMethod.php",
"lib/Resource/ConnectedAccountDto.php",
"lib/Resource/ConnectedAccountState.php",
"lib/Resource/Connection.php",
"lib/Resource/ConnectionActivated.php",
Expand Down Expand Up @@ -161,6 +162,7 @@
"lib/Resource/CreateAuthorizationPermission.php",
"lib/Resource/CreateAuthorizationResource.php",
"lib/Resource/CreateCORSOrigin.php",
"lib/Resource/CreateDataIntegration.php",
"lib/Resource/CreateDataKeyRequest.php",
"lib/Resource/CreateDataKeyResponse.php",
"lib/Resource/CreateGroup.php",
Expand All @@ -185,21 +187,30 @@
"lib/Resource/CreateUserPasswordHashType.php",
"lib/Resource/CreateWebhookEndpoint.php",
"lib/Resource/CreateWebhookEndpointEvents.php",
"lib/Resource/CustomProviderDefinition.php",
"lib/Resource/CustomProviderDefinitionAuthenticateVia.php",
"lib/Resource/DataIntegration.php",
"lib/Resource/DataIntegrationAccessTokenResponse.php",
"lib/Resource/DataIntegrationAccessTokenResponseAccessToken.php",
"lib/Resource/DataIntegrationAccessTokenResponseError.php",
"lib/Resource/DataIntegrationAuthorizeUrlResponse.php",
"lib/Resource/DataIntegrationConfigurationListResponse.php",
"lib/Resource/DataIntegrationConfigurationResponse.php",
"lib/Resource/DataIntegrationCredential.php",
"lib/Resource/DataIntegrationCredentialType.php",
"lib/Resource/DataIntegrationCredentials.php",
"lib/Resource/DataIntegrationCredentialsCredentialsType.php",
"lib/Resource/DataIntegrationCredentialsDto.php",
"lib/Resource/DataIntegrationCredentialsResponse.php",
"lib/Resource/DataIntegrationCredentialsResponseCredential.php",
"lib/Resource/DataIntegrationCustomProvider.php",
"lib/Resource/DataIntegrationState.php",
"lib/Resource/DataIntegrationsGetDataIntegrationAuthorizeUrlRequest.php",
"lib/Resource/DataIntegrationsGetUserTokenRequest.php",
"lib/Resource/DataIntegrationsListResponse.php",
"lib/Resource/DataIntegrationsListResponseData.php",
"lib/Resource/DataIntegrationsListResponseDataConnectedAccount.php",
"lib/Resource/DataIntegrationsListResponseDataConnectedAccountState.php",
"lib/Resource/DataIntegrationsListResponseDataOwnership.php",
"lib/Resource/DataIntegrationsUpsertApiKeyRequest.php",
"lib/Resource/DataIntegrationsVendCredentialsRequest.php",
Expand Down Expand Up @@ -458,6 +469,8 @@
"lib/Resource/UpdateAuditLogsRetention.php",
"lib/Resource/UpdateAuthorizationPermission.php",
"lib/Resource/UpdateAuthorizationResource.php",
"lib/Resource/UpdateCustomProviderDefinition.php",
"lib/Resource/UpdateDataIntegration.php",
"lib/Resource/UpdateGroup.php",
"lib/Resource/UpdateJWTTemplate.php",
"lib/Resource/UpdateOAuthApplication.php",
Expand Down Expand Up @@ -688,6 +701,7 @@
"tests/Fixtures/connect_application_oauth.json",
"tests/Fixtures/connect_application_oauth_redirect_uris.json",
"tests/Fixtures/connected_account.json",
"tests/Fixtures/connected_account_dto.json",
"tests/Fixtures/connection.json",
"tests/Fixtures/connection_activated.json",
"tests/Fixtures/connection_activated_data.json",
Expand All @@ -712,6 +726,7 @@
"tests/Fixtures/create_authorization_permission.json",
"tests/Fixtures/create_authorization_resource.json",
"tests/Fixtures/create_cors_origin.json",
"tests/Fixtures/create_data_integration.json",
"tests/Fixtures/create_data_key_request.json",
"tests/Fixtures/create_data_key_response.json",
"tests/Fixtures/create_group.json",
Expand All @@ -733,14 +748,19 @@
"tests/Fixtures/create_user_invite_options.json",
"tests/Fixtures/create_user_organization_membership.json",
"tests/Fixtures/create_webhook_endpoint.json",
"tests/Fixtures/custom_provider_definition.json",
"tests/Fixtures/data_integration.json",
"tests/Fixtures/data_integration_access_token_response.json",
"tests/Fixtures/data_integration_access_token_response_access_token.json",
"tests/Fixtures/data_integration_authorize_url_response.json",
"tests/Fixtures/data_integration_configuration_list_response.json",
"tests/Fixtures/data_integration_configuration_response.json",
"tests/Fixtures/data_integration_credential.json",
"tests/Fixtures/data_integration_credentials.json",
"tests/Fixtures/data_integration_credentials_dto.json",
"tests/Fixtures/data_integration_credentials_response.json",
"tests/Fixtures/data_integration_credentials_response_credential.json",
"tests/Fixtures/data_integration_custom_provider.json",
"tests/Fixtures/data_integrations_get_data_integration_authorize_url_request.json",
"tests/Fixtures/data_integrations_get_user_token_request.json",
"tests/Fixtures/data_integrations_list_response.json",
Expand Down Expand Up @@ -869,6 +889,7 @@
"tests/Fixtures/list_connect_application.json",
"tests/Fixtures/list_connection.json",
"tests/Fixtures/list_cors_origin_response.json",
"tests/Fixtures/list_data_integration.json",
"tests/Fixtures/list_directory.json",
"tests/Fixtures/list_directory_group.json",
"tests/Fixtures/list_directory_user_with_groups.json",
Expand Down Expand Up @@ -1011,6 +1032,8 @@
"tests/Fixtures/update_audit_logs_retention.json",
"tests/Fixtures/update_authorization_permission.json",
"tests/Fixtures/update_authorization_resource.json",
"tests/Fixtures/update_custom_provider_definition.json",
"tests/Fixtures/update_data_integration.json",
"tests/Fixtures/update_group.json",
"tests/Fixtures/update_jwt_template.json",
"tests/Fixtures/update_oauth_application.json",
Expand Down Expand Up @@ -1890,6 +1913,38 @@
"GET /user_management/redirect_uris": {
"sdkMethod": "listRedirectUris",
"service": "userManagement"
},
"GET /data-integrations": {
"sdkMethod": "listDataIntegrations",
"service": "pipes"
},
"POST /data-integrations": {
"sdkMethod": "createDataIntegration",
"service": "pipes"
},
"GET /data-integrations/{slug}": {
"sdkMethod": "getDataIntegration",
"service": "pipes"
},
"PUT /data-integrations/{slug}": {
"sdkMethod": "updateDataIntegration",
"service": "pipes"
},
"DELETE /data-integrations/{slug}": {
"sdkMethod": "deleteDataIntegration",
"service": "pipes"
},
"POST /user_management/radar_challenges": {
"sdkMethod": "createRadarChallenge",
"service": "userManagement"
},
"POST /user_management/users/{user_id}/connected_accounts/{slug}": {
"sdkMethod": "createUserConnectedAccount",
"service": "pipes"
},
"PUT /user_management/users/{user_id}/connected_accounts/{slug}": {
"sdkMethod": "updateUserConnectedAccount",
"service": "pipes"
}
}
}
51 changes: 51 additions & 0 deletions lib/Resource/ConnectedAccountDto.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

declare(strict_types=1);

// This file is auto-generated by oagen. Do not edit.

namespace WorkOS\Resource;

readonly class ConnectedAccountDto implements \JsonSerializable
{
use JsonSerializableTrait;

public function __construct(
/** The OAuth access token for the connected account. */
public ?string $accessToken = null,
/** The OAuth refresh token for the connected account. */
public ?string $refreshToken = null,
/** The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire. */
public ?\DateTimeImmutable $expiresAt = null,
/**
* The OAuth scopes granted for this connection.
* @var array<string>|null
*/
public ?array $scopes = null,
/** Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided. */
public ?ConnectedAccountState $state = null,
) {
}

public static function fromArray(array $data): self
{
return new self(
accessToken: $data['access_token'] ?? null,
refreshToken: $data['refresh_token'] ?? null,
expiresAt: isset($data['expires_at']) ? new \DateTimeImmutable($data['expires_at']) : null,
scopes: $data['scopes'] ?? null,
state: isset($data['state']) ? ConnectedAccountState::from($data['state']) : null,
);
}

public function toArray(): array
{
return [
'access_token' => $this->accessToken,
'refresh_token' => $this->refreshToken,
'expires_at' => $this->expiresAt?->format(\DateTimeInterface::RFC3339_EXTENDED),
'scopes' => $this->scopes,
'state' => $this->state?->value,
];
}
}
1 change: 0 additions & 1 deletion lib/Resource/ConnectedAccountState.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ enum ConnectedAccountState: string
{
case Connected = 'connected';
case NeedsReauthorization = 'needs_reauthorization';
case Disconnected = 'disconnected';
}
55 changes: 55 additions & 0 deletions lib/Resource/CreateDataIntegration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php

declare(strict_types=1);

// This file is auto-generated by oagen. Do not edit.

namespace WorkOS\Resource;

readonly class CreateDataIntegration implements \JsonSerializable
{
use JsonSerializableTrait;

public function __construct(
/** The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug. */
public string $provider,
/** An optional description of the Data Integration. */
public ?string $description = null,
/** Whether the Data Integration is enabled. Defaults to `false`. */
public ?bool $enabled = null,
/**
* The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
* @var array<string>|null
*/
public ?array $scopes = null,
/** The credentials to configure for the Data Integration. Required for both built-in and custom providers. */
public ?DataIntegrationCredentialsDto $credentials = null,
/** The OAuth definition for a custom provider. Supply this to define a custom provider; omit it to create an integration for a built-in provider. */
public ?CustomProviderDefinition $customProvider = null,
) {
}

public static function fromArray(array $data): self
{
return new self(
provider: $data['provider'],
description: $data['description'] ?? null,
enabled: $data['enabled'] ?? null,
scopes: $data['scopes'] ?? null,
credentials: isset($data['credentials']) ? DataIntegrationCredentialsDto::fromArray($data['credentials']) : null,
customProvider: isset($data['custom_provider']) ? CustomProviderDefinition::fromArray($data['custom_provider']) : null,
);
}

public function toArray(): array
{
return [
'provider' => $this->provider,
'description' => $this->description,
'enabled' => $this->enabled,
'scopes' => $this->scopes,
'credentials' => $this->credentials?->toArray(),
'custom_provider' => $this->customProvider?->toArray(),
];
}
}
75 changes: 75 additions & 0 deletions lib/Resource/CustomProviderDefinition.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php

declare(strict_types=1);

// This file is auto-generated by oagen. Do not edit.

namespace WorkOS\Resource;

readonly class CustomProviderDefinition implements \JsonSerializable
{
use JsonSerializableTrait;

public function __construct(
/** A descriptive name for the custom provider. */
public string $name,
/** The provider's OAuth authorization endpoint. */
public string $authorizationUrl,
/** The provider's OAuth token endpoint. */
public string $tokenUrl,
/** The endpoint used to refresh tokens, if different from the token endpoint. */
public ?string $refreshTokenUrl = null,
/** Whether PKCE is used during the authorization code flow. Defaults to `true`. */
public ?bool $pkceEnabled = null,
/** The separator used to join requested scopes. Defaults to a space. */
public ?string $requestScopeSeparator = null,
/** Whether at least one scope must be selected when connecting an account. Defaults to `false`. */
public ?bool $scopesRequired = null,
/** Whether a client secret is required for this provider. Defaults to `true`. */
public ?bool $clientSecretRequired = null,
/**
* Additional static query parameters appended to the authorization request.
* @var array<string, string>|null
*/
public ?array $additionalAuthorizationParameters = null,
/** The Content-Type used when exchanging the token request. */
public ?string $tokenBodyContentType = null,
/** How client credentials are sent when exchanging authorization codes and refreshing tokens. */
public ?CustomProviderDefinitionAuthenticateVia $authenticateVia = null,
) {
}

public static function fromArray(array $data): self
{
return new self(
name: $data['name'],
authorizationUrl: $data['authorization_url'],
tokenUrl: $data['token_url'],
refreshTokenUrl: $data['refresh_token_url'] ?? null,
pkceEnabled: $data['pkce_enabled'] ?? null,
requestScopeSeparator: $data['request_scope_separator'] ?? null,
scopesRequired: $data['scopes_required'] ?? null,
clientSecretRequired: $data['client_secret_required'] ?? null,
additionalAuthorizationParameters: $data['additional_authorization_parameters'] ?? null,
tokenBodyContentType: $data['token_body_content_type'] ?? null,
authenticateVia: isset($data['authenticate_via']) ? CustomProviderDefinitionAuthenticateVia::from($data['authenticate_via']) : null,
);
}

public function toArray(): array
{
return [
'name' => $this->name,
'authorization_url' => $this->authorizationUrl,
'token_url' => $this->tokenUrl,
'refresh_token_url' => $this->refreshTokenUrl,
'pkce_enabled' => $this->pkceEnabled,
'request_scope_separator' => $this->requestScopeSeparator,
'scopes_required' => $this->scopesRequired,
'client_secret_required' => $this->clientSecretRequired,
'additional_authorization_parameters' => $this->additionalAuthorizationParameters,
'token_body_content_type' => $this->tokenBodyContentType,
'authenticate_via' => $this->authenticateVia?->value,
];
}
}
13 changes: 13 additions & 0 deletions lib/Resource/CustomProviderDefinitionAuthenticateVia.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

// This file is auto-generated by oagen. Do not edit.

namespace WorkOS\Resource;

enum CustomProviderDefinitionAuthenticateVia: string
{
case RequestBody = 'request_body';
case BasicAuthHeader = 'basic_auth_header';
}
Loading