Skip to content

Commit f7188a1

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

511 files changed

Lines changed: 5061 additions & 4465 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+
* [#710](https://github.com/workos/workos-python/pull/710) feat(generated)!: regenerate from spec (3 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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@
119119
"src/workos/common/models/agent_registration_kind.py",
120120
"src/workos/common/models/agent_registration_organization_switched.py",
121121
"src/workos/common/models/agent_registration_organization_switched_data.py",
122+
"src/workos/common/models/agent_registration_refreshed.py",
123+
"src/workos/common/models/agent_registration_refreshed_data.py",
122124
"src/workos/common/models/agent_registration_revoked.py",
123125
"src/workos/common/models/agent_registration_revoked_data.py",
124126
"src/workos/common/models/agent_registration_status.py",
@@ -240,6 +242,7 @@
240242
"src/workos/common/models/create_data_integration_auth_methods.py",
241243
"src/workos/common/models/create_user_invite_options_locale.py",
242244
"src/workos/common/models/create_user_password_hash_type.py",
245+
"src/workos/common/models/create_user_password_salt_position.py",
243246
"src/workos/common/models/create_webhook_endpoint_events.py",
244247
"src/workos/common/models/custom_provider_definition_authenticate_via.py",
245248
"src/workos/common/models/data_integration_access_token_response_error.py",
@@ -465,6 +468,7 @@
465468
"src/workos/common/models/slim_role.py",
466469
"src/workos/common/models/update_custom_provider_definition_authenticate_via.py",
467470
"src/workos/common/models/update_user_password_hash_type.py",
471+
"src/workos/common/models/update_user_password_salt_position.py",
468472
"src/workos/common/models/update_webhook_endpoint_events.py",
469473
"src/workos/common/models/update_webhook_endpoint_status.py",
470474
"src/workos/common/models/user.py",
@@ -620,6 +624,7 @@
620624
"src/workos/pipes/models/data_integrations_list_response_data.py",
621625
"src/workos/pipes/models/data_integrations_list_response_data_connected_account.py",
622626
"src/workos/pipes/models/data_integrations_upsert_api_key_request.py",
627+
"src/workos/pipes/models/data_integrations_upsert_client_credentials_request.py",
623628
"src/workos/pipes/models/data_integrations_vend_credentials_request.py",
624629
"src/workos/pipes/models/update_custom_provider_definition.py",
625630
"src/workos/pipes/models/update_data_integration.py",
@@ -801,6 +806,8 @@
801806
"tests/fixtures/agent_registration_expired_data.json",
802807
"tests/fixtures/agent_registration_organization_switched.json",
803808
"tests/fixtures/agent_registration_organization_switched_data.json",
809+
"tests/fixtures/agent_registration_refreshed.json",
810+
"tests/fixtures/agent_registration_refreshed_data.json",
804811
"tests/fixtures/agent_registration_revoked.json",
805812
"tests/fixtures/agent_registration_revoked_data.json",
806813
"tests/fixtures/api_key.json",
@@ -982,6 +989,7 @@
982989
"tests/fixtures/data_integrations_list_response_data.json",
983990
"tests/fixtures/data_integrations_list_response_data_connected_account.json",
984991
"tests/fixtures/data_integrations_upsert_api_key_request.json",
992+
"tests/fixtures/data_integrations_upsert_client_credentials_request.json",
985993
"tests/fixtures/data_integrations_vend_credentials_request.json",
986994
"tests/fixtures/decrypt_request.json",
987995
"tests/fixtures/decrypt_response.json",
@@ -2217,6 +2225,10 @@
22172225
"GET /audit_logs/exports/{auditLogExportId}": {
22182226
"sdkMethod": "get_export",
22192227
"service": "audit_logs"
2228+
},
2229+
"PUT /data-integrations/{slug}/client-credentials": {
2230+
"sdkMethod": "update_data_integration_client_credentials",
2231+
"service": "pipes"
22202232
}
22212233
}
22222234
}

src/workos/admin_portal/_resource.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,32 @@
22

33
from __future__ import annotations
44

5-
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
5+
from typing import TYPE_CHECKING, Any
66

77
if TYPE_CHECKING:
88
from .._client import AsyncWorkOSClient, WorkOSClient
99

10+
from workos.common.models.generate_link_intent import GenerateLinkIntent
11+
1012
from .._types import RequestOptions, enum_value
1113
from .models import PortalLinkResponse
12-
from workos.common.models.generate_link_intent import GenerateLinkIntent
1314

1415

1516
class AdminPortal:
1617
"""Admin Portal API resources."""
1718

18-
def __init__(self, client: "WorkOSClient") -> None:
19+
def __init__(self, client: WorkOSClient) -> None:
1920
self._client = client
2021

2122
def generate_link(
2223
self,
2324
*,
2425
organization: str,
25-
return_url: Optional[str] = None,
26-
success_url: Optional[str] = None,
27-
intent: Optional[Union[GenerateLinkIntent, str]] = None,
28-
it_contact_emails: Optional[List[str]] = None,
29-
request_options: Optional[RequestOptions] = None,
26+
return_url: str | None = None,
27+
success_url: str | None = None,
28+
intent: GenerateLinkIntent | str | None = None,
29+
it_contact_emails: list[str] | None = None,
30+
request_options: RequestOptions | None = None,
3031
) -> PortalLinkResponse:
3132
"""Generate a Portal Link
3233
@@ -59,7 +60,7 @@ def generate_link(
5960
RateLimitExceededError: If rate limited (429).
6061
ServerError: If the server returns a 5xx error.
6162
"""
62-
body: Dict[str, Any] = {
63+
body: dict[str, Any] = {
6364
k: v
6465
for k, v in {
6566
"return_url": return_url,
@@ -82,18 +83,18 @@ def generate_link(
8283
class AsyncAdminPortal:
8384
"""Admin Portal API resources (async)."""
8485

85-
def __init__(self, client: "AsyncWorkOSClient") -> None:
86+
def __init__(self, client: AsyncWorkOSClient) -> None:
8687
self._client = client
8788

8889
async def generate_link(
8990
self,
9091
*,
9192
organization: str,
92-
return_url: Optional[str] = None,
93-
success_url: Optional[str] = None,
94-
intent: Optional[Union[GenerateLinkIntent, str]] = None,
95-
it_contact_emails: Optional[List[str]] = None,
96-
request_options: Optional[RequestOptions] = None,
93+
return_url: str | None = None,
94+
success_url: str | None = None,
95+
intent: GenerateLinkIntent | str | None = None,
96+
it_contact_emails: list[str] | None = None,
97+
request_options: RequestOptions | None = None,
9798
) -> PortalLinkResponse:
9899
"""Generate a Portal Link
99100
@@ -126,7 +127,7 @@ async def generate_link(
126127
RateLimitExceededError: If rate limited (429).
127128
ServerError: If the server returns a 5xx error.
128129
"""
129-
body: Dict[str, Any] = {
130+
body: dict[str, Any] = {
130131
k: v
131132
for k, v in {
132133
"return_url": return_url,

src/workos/admin_portal/models/generate_link.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
from dataclasses import dataclass
66
from enum import Enum
7-
from typing import Any, Dict, List, Optional
7+
from typing import Any
8+
89
from workos._types import _raise_deserialize_error
910
from workos.common.models.generate_link_intent import GenerateLinkIntent
1011

@@ -15,11 +16,11 @@ class GenerateLink:
1516

1617
organization: str
1718
"""An [Organization](https://workos.com/docs/reference/organization) identifier."""
18-
return_url: Optional[str] = None
19+
return_url: str | None = None
1920
"""The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used."""
20-
success_url: Optional[str] = None
21+
success_url: str | None = None
2122
"""The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used."""
22-
intent: Optional["GenerateLinkIntent"] = None
23+
intent: GenerateLinkIntent | None = None
2324
"""
2425
The intent of the Admin Portal.
2526
- `sso` - Launch Admin Portal for creating SSO connections
@@ -29,11 +30,11 @@ class GenerateLink:
2930
- `domain_verification` - Launch Admin Portal for Domain Verification
3031
- `certificate_renewal` - Launch Admin Portal for renewing SAML Certificates
3132
- `bring_your_own_key` - Launch Admin Portal for configuring Bring Your Own Key"""
32-
it_contact_emails: Optional[List[str]] = None
33+
it_contact_emails: list[str] | None = None
3334
"""The email addresses of the IT contacts to grant access to the Admin Portal for the given organization. Accepts up to 20 emails."""
3435

3536
@classmethod
36-
def from_dict(cls, data: Dict[str, Any]) -> "GenerateLink":
37+
def from_dict(cls, data: dict[str, Any]) -> GenerateLink:
3738
"""Deserialize from a dictionary."""
3839
try:
3940
return cls(
@@ -48,9 +49,9 @@ def from_dict(cls, data: Dict[str, Any]) -> "GenerateLink":
4849
except (KeyError, ValueError) as e:
4950
_raise_deserialize_error("GenerateLink", e)
5051

51-
def to_dict(self) -> Dict[str, Any]:
52+
def to_dict(self) -> dict[str, Any]:
5253
"""Serialize to a dictionary."""
53-
result: Dict[str, Any] = {}
54+
result: dict[str, Any] = {}
5455
result["organization"] = self.organization
5556
if self.return_url is not None:
5657
result["return_url"] = self.return_url

src/workos/admin_portal/models/portal_link_response.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
from __future__ import annotations
44

55
from dataclasses import dataclass
6-
from typing import Any, Dict
6+
from typing import Any
7+
78
from workos._types import _raise_deserialize_error
89

910

@@ -15,7 +16,7 @@ class PortalLinkResponse:
1516
"""An ephemeral link to initiate the Admin Portal."""
1617

1718
@classmethod
18-
def from_dict(cls, data: Dict[str, Any]) -> "PortalLinkResponse":
19+
def from_dict(cls, data: dict[str, Any]) -> PortalLinkResponse:
1920
"""Deserialize from a dictionary."""
2021
try:
2122
return cls(
@@ -24,8 +25,8 @@ def from_dict(cls, data: Dict[str, Any]) -> "PortalLinkResponse":
2425
except (KeyError, ValueError) as e:
2526
_raise_deserialize_error("PortalLinkResponse", e)
2627

27-
def to_dict(self) -> Dict[str, Any]:
28+
def to_dict(self) -> dict[str, Any]:
2829
"""Serialize to a dictionary."""
29-
result: Dict[str, Any] = {}
30+
result: dict[str, Any] = {}
3031
result["link"] = self.link
3132
return result

0 commit comments

Comments
 (0)