Skip to content
Closed
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,11 @@
* [#679](https://github.com/workos/workos-python/pull/679) feat(generated): regenerate from spec (1 change)

**Features**
* **[pipes](https://workos.com/docs/reference/pipes)**:
* Added model `DataIntegrationCredentialsResponse`
* Added model `DataIntegrationCredentialsResponseCredential`
* Added model `DataIntegrationsUpsertApiKeyRequest`
* Added model `DataIntegrationsVendCredentialsRequest`
* Added enum `DataIntegrationCredentialsResponseError`
* Added endpoint `PUT /data-integrations/{slug}/api-key`
* Added endpoint `POST /data-integrations/{slug}/credentials`
2 changes: 1 addition & 1 deletion .last-synced-sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1a2f47b20f63f2c8f0eb56bbd2adb3b5947d693a
e122f280d5635b7a6d39c7ce6dc24cd52e267e1c
41 changes: 40 additions & 1 deletion .oagen-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 2,
"language": "python",
"generatedAt": "2026-06-17T20:55:36.392Z",
"generatedAt": "2026-06-30T19:54:11.665Z",
"files": [
"src/workos/_client.py",
"src/workos/admin_portal/__init__.py",
Expand All @@ -12,6 +12,8 @@
"src/workos/admin_portal/models/intent_options.py",
"src/workos/admin_portal/models/portal_link_response.py",
"src/workos/admin_portal/models/sso_intent_options.py",
"src/workos/agents/__init__.py",
"src/workos/agents/models/__init__.py",
"src/workos/api_keys/__init__.py",
"src/workos/api_keys/_resource.py",
"src/workos/api_keys/models/__init__.py",
Expand Down Expand Up @@ -100,6 +102,7 @@
"src/workos/common/models/audit_log_configuration_log_stream_type.py",
"src/workos/common/models/audit_log_configuration_state.py",
"src/workos/common/models/audit_log_export_state.py",
"src/workos/common/models/auth_method_mismatch_error.py",
"src/workos/common/models/authenticate_response_authentication_method.py",
"src/workos/common/models/authenticate_response_impersonator.py",
"src/workos/common/models/authentication_challenge.py",
Expand Down Expand Up @@ -164,6 +167,7 @@
"src/workos/common/models/connect_application_m2m.py",
"src/workos/common/models/connect_application_oauth.py",
"src/workos/common/models/connect_application_oauth_redirect_uris.py",
"src/workos/common/models/connected_account.py",
"src/workos/common/models/connected_account_auth_method.py",
"src/workos/common/models/connected_account_state.py",
"src/workos/common/models/connection_activated.py",
Expand Down Expand Up @@ -200,6 +204,7 @@
"src/workos/common/models/create_webhook_endpoint_events.py",
"src/workos/common/models/data_integration_access_token_response_error.py",
"src/workos/common/models/data_integration_credentials_credentials_type.py",
"src/workos/common/models/data_integration_credentials_response_error.py",
"src/workos/common/models/data_integrations_list_response_data_auth_methods.py",
"src/workos/common/models/data_integrations_list_response_data_connected_account_auth_method.py",
"src/workos/common/models/data_integrations_list_response_data_connected_account_state.py",
Expand Down Expand Up @@ -546,11 +551,15 @@
"src/workos/pipes/models/data_integration_access_token_response.py",
"src/workos/pipes/models/data_integration_access_token_response_access_token.py",
"src/workos/pipes/models/data_integration_authorize_url_response.py",
"src/workos/pipes/models/data_integration_credentials_response.py",
"src/workos/pipes/models/data_integration_credentials_response_credential.py",
"src/workos/pipes/models/data_integrations_get_data_integration_authorize_url_request.py",
"src/workos/pipes/models/data_integrations_get_user_token_request.py",
"src/workos/pipes/models/data_integrations_list_response.py",
"src/workos/pipes/models/data_integrations_list_response_data.py",
"src/workos/pipes/models/data_integrations_list_response_data_connected_account.py",
"src/workos/pipes/models/data_integrations_upsert_api_key_request.py",
"src/workos/pipes/models/data_integrations_vend_credentials_request.py",
"src/workos/pipes_provider/__init__.py",
"src/workos/pipes_provider/_resource.py",
"src/workos/pipes_provider/models/__init__.py",
Expand Down Expand Up @@ -586,6 +595,7 @@
"src/workos/sso/models/token_query.py",
"src/workos/types/__init__.py",
"src/workos/types/admin_portal/__init__.py",
"src/workos/types/agents/__init__.py",
"src/workos/types/api_keys/__init__.py",
"src/workos/types/audit_logs/__init__.py",
"src/workos/types/authorization/__init__.py",
Expand Down Expand Up @@ -729,6 +739,7 @@
"tests/fixtures/audit_log_schema_target.json",
"tests/fixtures/audit_log_schema_target_input.json",
"tests/fixtures/audit_logs_retention.json",
"tests/fixtures/auth_method_mismatch_error.json",
"tests/fixtures/authenticate_response.json",
"tests/fixtures/authenticate_response_impersonator.json",
"tests/fixtures/authenticate_response_oauth_token.json",
Expand Down Expand Up @@ -854,11 +865,15 @@
"tests/fixtures/data_integration_configuration_list_response.json",
"tests/fixtures/data_integration_configuration_response.json",
"tests/fixtures/data_integration_credentials.json",
"tests/fixtures/data_integration_credentials_response.json",
"tests/fixtures/data_integration_credentials_response_credential.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",
"tests/fixtures/data_integrations_list_response_data.json",
"tests/fixtures/data_integrations_list_response_data_connected_account.json",
"tests/fixtures/data_integrations_upsert_api_key_request.json",
"tests/fixtures/data_integrations_vend_credentials_request.json",
"tests/fixtures/decrypt_request.json",
"tests/fixtures/decrypt_response.json",
"tests/fixtures/delete_group_role_assignments_by_criteria.json",
Expand Down Expand Up @@ -1980,6 +1995,30 @@
"GET /audit_logs/exports/{auditLogExportId}": {
"sdkMethod": "get_export",
"service": "audit_logs"
},
"POST /agents/credentials/validate": {
"sdkMethod": "create_validate",
"service": "agents"
},
"GET /agents/registrations/{id}": {
"sdkMethod": "get_registration",
"service": "agents"
},
"PUT /data-integrations/{slug}/api-key": {
"sdkMethod": "update_data_integration_api_key",
"service": "pipes"
},
"POST /data-integrations/{slug}/credentials": {
"sdkMethod": "create_data_integration_credential",
"service": "pipes"
},
"GET /user_management/cors_origins": {
"sdkMethod": "list_cors_origins",
"service": "user_management"
},
"GET /user_management/redirect_uris": {
"sdkMethod": "list_redirect_uris",
"service": "user_management"
}
}
}
11 changes: 11 additions & 0 deletions src/workos/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
WorkOSClient as _SyncBase,
AsyncWorkOSClient as _AsyncBase,
)
from .agents._resource import Agents, AsyncAgents
from .multi_factor_auth._resource import MultiFactorAuth, AsyncMultiFactorAuth
from .connect._resource import Connect, AsyncConnect
from .authorization._resource import Authorization, AsyncAuthorization
Expand Down Expand Up @@ -44,6 +45,11 @@
class WorkOSClient(_SyncBase):
"""Synchronous WorkOS API client with service accessors."""

@functools.cached_property
def agents(self) -> Agents:
"""Agents API resources."""
return Agents(self)

@functools.cached_property
def multi_factor_auth(self) -> MultiFactorAuth:
"""Multi Factor Auth API resources."""
Expand Down Expand Up @@ -182,6 +188,11 @@ def pkce(self) -> PKCE:
class AsyncWorkOSClient(_AsyncBase):
"""Asynchronous WorkOS API client with service accessors."""

@functools.cached_property
def agents(self) -> AsyncAgents:
"""Agents API resources."""
return AsyncAgents(self)

@functools.cached_property
def multi_factor_auth(self) -> AsyncMultiFactorAuth:
"""Multi Factor Auth API resources."""
Expand Down
8 changes: 3 additions & 5 deletions src/workos/admin_portal/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# This file is auto-generated by oagen. Do not edit.

from .domain_verification_intent_options import (
DomainVerificationIntentOptions as DomainVerificationIntentOptions,
)
from .domain_verification_intent_options import * # noqa: F401,F403
from .generate_link import GenerateLink as GenerateLink
from .intent_options import IntentOptions as IntentOptions
from .intent_options import * # noqa: F401,F403
from .portal_link_response import PortalLinkResponse as PortalLinkResponse
from .sso_intent_options import SSOIntentOptions as SSOIntentOptions
from .sso_intent_options import * # noqa: F401,F403
4 changes: 4 additions & 0 deletions src/workos/agents/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This file is auto-generated by oagen. Do not edit.

from ._resource import Agents as Agents, AsyncAgents as AsyncAgents
from .models import *
2 changes: 2 additions & 0 deletions src/workos/agents/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file is auto-generated by oagen. Do not edit.

5 changes: 5 additions & 0 deletions src/workos/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
AuthenticationSSOTimedOutDataError as AuthenticationSSOTimedOutDataError,
)
from .models import AuthenticationSSOTimedOutDataSSO as AuthenticationSSOTimedOutDataSSO
from .models import AuthMethodMismatchError as AuthMethodMismatchError
from .models import AuthorizationPermission as AuthorizationPermission
from .models import ConnectApplication as ConnectApplication
from .models import ConnectApplicationM2M as ConnectApplicationM2M
Expand All @@ -130,6 +131,7 @@
)
from .models import ConnectApplicationUnknown as ConnectApplicationUnknown
from .models import ConnectApplicationVariant as ConnectApplicationVariant
from .models import ConnectedAccount as ConnectedAccount
from .models import ConnectedAccountAuthMethod as ConnectedAccountAuthMethod
from .models import ConnectedAccountState as ConnectedAccountState
from .models import ConnectionActivated as ConnectionActivated
Expand Down Expand Up @@ -174,6 +176,9 @@
from .models import (
DataIntegrationCredentialsCredentialsType as DataIntegrationCredentialsCredentialsType,
)
from .models import (
DataIntegrationCredentialsResponseError as DataIntegrationCredentialsResponseError,
)
from .models import (
DataIntegrationsListResponseDataAuthMethods as DataIntegrationsListResponseDataAuthMethods,
)
Expand Down
7 changes: 7 additions & 0 deletions src/workos/common/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@
from .authentication_sso_timed_out_data_sso import (
AuthenticationSSOTimedOutDataSSO as AuthenticationSSOTimedOutDataSSO,
)
from .auth_method_mismatch_error import (
AuthMethodMismatchError as AuthMethodMismatchError,
)
from .authorization_permission import AuthorizationPermission as AuthorizationPermission
from .connect_application import ConnectApplication as ConnectApplication
from .connect_application_m2m import ConnectApplicationM2M as ConnectApplicationM2M
Expand All @@ -218,6 +221,7 @@
)
from .connect_application import ConnectApplicationUnknown as ConnectApplicationUnknown
from .connect_application import ConnectApplicationVariant as ConnectApplicationVariant
from .connected_account import ConnectedAccount as ConnectedAccount
from .connected_account_auth_method import (
ConnectedAccountAuthMethod as ConnectedAccountAuthMethod,
)
Expand Down Expand Up @@ -290,6 +294,9 @@
from .data_integration_credentials_credentials_type import (
DataIntegrationCredentialsCredentialsType as DataIntegrationCredentialsCredentialsType,
)
from .data_integration_credentials_response_error import (
DataIntegrationCredentialsResponseError as DataIntegrationCredentialsResponseError,
)
from .data_integrations_list_response_data_auth_methods import (
DataIntegrationsListResponseDataAuthMethods as DataIntegrationsListResponseDataAuthMethods,
)
Expand Down
35 changes: 35 additions & 0 deletions src/workos/common/models/auth_method_mismatch_error.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This file is auto-generated by oagen. Do not edit.

from __future__ import annotations

from dataclasses import dataclass
from typing import Any, Dict, Literal
from workos._types import _raise_deserialize_error


@dataclass(slots=True)
class AuthMethodMismatchError:
"""Auth Method Mismatch Error model."""

code: Literal["auth_method_mismatch"]
"""Error code indicating the endpoint does not match the installation auth method."""
message: str
"""A human-readable explanation of the mismatch."""

@classmethod
def from_dict(cls, data: Dict[str, Any]) -> "AuthMethodMismatchError":
"""Deserialize from a dictionary."""
try:
return cls(
code=data.get("code", "auth_method_mismatch"),
message=data["message"],
)
except (KeyError, ValueError) as e:
_raise_deserialize_error("AuthMethodMismatchError", e)

def to_dict(self) -> Dict[str, Any]:
"""Serialize to a dictionary."""
result: Dict[str, Any] = {}
result["code"] = self.code
result["message"] = self.message
return result
91 changes: 91 additions & 0 deletions src/workos/common/models/connected_account.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# This file is auto-generated by oagen. Do not edit.

from __future__ import annotations

from dataclasses import dataclass
from enum import Enum
from typing import Any, Dict, List, Literal, Optional
from workos._types import _raise_deserialize_error
from .connected_account_auth_method import ConnectedAccountAuthMethod
from .connected_account_state import ConnectedAccountState


@dataclass(slots=True)
class ConnectedAccount:
"""Connected Account model."""

object: Literal["connected_account"]
"""Distinguishes the connected account object."""
id: str
"""The unique identifier of the connected account."""
user_id: Optional[str]
"""The [User](https://workos.com/docs/reference/authkit/user) identifier associated with this connection."""
organization_id: Optional[str]
"""The [Organization](https://workos.com/docs/reference/organization) identifier associated with this connection, or `null` if not scoped to an organization."""
scopes: List[str]
"""The OAuth scopes granted for this connection."""
state: "ConnectedAccountState"
"""The state of the connected account:
- `connected`: The connection is active and tokens are valid.
- `needs_reauthorization`: The user needs to reauthorize the connection, typically because required scopes have changed.
- `disconnected`: The connection has been disconnected."""
created_at: str
"""The timestamp when the connection was created."""
updated_at: str
"""The timestamp when the connection was last updated."""
auth_method: Optional["ConnectedAccountAuthMethod"] = None
"""The authentication method used for this connection (`oauth` or `api_key`). Defaults to `oauth` if absent."""
api_key_last_4: Optional[str] = None
"""The last four characters of the API key, or `null` for OAuth connections."""

@classmethod
def from_dict(cls, data: Dict[str, Any]) -> "ConnectedAccount":
"""Deserialize from a dictionary."""
try:
return cls(
object=data.get("object", "connected_account"),
id=data["id"],
user_id=data["user_id"],
organization_id=data["organization_id"],
scopes=data["scopes"],
state=ConnectedAccountState(data["state"]),
created_at=data["created_at"],
updated_at=data["updated_at"],
auth_method=ConnectedAccountAuthMethod(_v_auth_method)
if (_v_auth_method := data.get("auth_method")) is not None
else None,
api_key_last_4=data.get("api_key_last_4"),
)
except (KeyError, ValueError) as e:
_raise_deserialize_error("ConnectedAccount", e)

def to_dict(self) -> Dict[str, Any]:
"""Serialize to a dictionary."""
result: Dict[str, Any] = {}
result["object"] = self.object
result["id"] = self.id
if self.user_id is not None:
result["user_id"] = self.user_id
else:
result["user_id"] = None
if self.organization_id is not None:
result["organization_id"] = self.organization_id
else:
result["organization_id"] = None
result["scopes"] = self.scopes
result["state"] = (
self.state.value if isinstance(self.state, Enum) else self.state
)
result["created_at"] = self.created_at
result["updated_at"] = self.updated_at
if self.auth_method is not None:
result["auth_method"] = (
self.auth_method.value
if isinstance(self.auth_method, Enum)
else self.auth_method
)
if self.api_key_last_4 is not None:
result["api_key_last_4"] = self.api_key_last_4
else:
result["api_key_last_4"] = None
return result
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file is auto-generated by oagen. Do not edit.

from typing import TypeAlias
from .data_integration_access_token_response_error import (
DataIntegrationAccessTokenResponseError,
)

DataIntegrationCredentialsResponseError: TypeAlias = (
DataIntegrationAccessTokenResponseError
)
__all__ = ["DataIntegrationCredentialsResponseError"]
Loading
Loading