Skip to content

Commit cca3d23

Browse files
chore(generated): regenerate shared files for all services
1 parent ef0619e commit cca3d23

310 files changed

Lines changed: 3402 additions & 3042 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-
ae3ebbb08d9b4bf9b2391558e820b7eb6f511fb9
1+
4ac3f26093f019e2b5603b2c4746102e45d534b8

.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",
@@ -1666,6 +1674,10 @@
16661674
"sdkMethod": "authorize_data_integration",
16671675
"service": "pipes"
16681676
},
1677+
"PUT /data-integrations/{slug}/client-credentials": {
1678+
"sdkMethod": "update_data_integration_client_credentials",
1679+
"service": "pipes"
1680+
},
16691681
"POST /data-integrations/{slug}/credentials": {
16701682
"sdkMethod": "create_data_integration_credential",
16711683
"service": "pipes"

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

src/workos/agents/_resource.py

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,28 @@
22

33
from __future__ import annotations
44

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

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

10+
from workos.common.models.agent_admin_validate_credential_request_type import (
11+
AgentAdminValidateCredentialRequestType,
12+
)
13+
1014
from .._types import RequestOptions, enum_value
1115
from .models import (
1216
AgentAdminLinkClaimAttemptToExternalUserRequestUser,
1317
AgentCredentialValidation,
1418
AgentRegistration,
1519
ClaimViewResponse,
1620
)
17-
from workos.common.models.agent_admin_validate_credential_request_type import (
18-
AgentAdminValidateCredentialRequestType,
19-
)
2021

2122

2223
class Agents:
2324
"""Agents API resources."""
2425

25-
def __init__(self, client: "WorkOSClient") -> None:
26+
def __init__(self, client: WorkOSClient) -> None:
2627
self._client = client
2728

2829
def update_attempts(
@@ -31,8 +32,8 @@ def update_attempts(
3132
type: Literal["link_external_user"],
3233
claim_attempt_token: str,
3334
user: AgentAdminLinkClaimAttemptToExternalUserRequestUser,
34-
organization_id: Optional[str] = None,
35-
request_options: Optional[RequestOptions] = None,
35+
organization_id: str | None = None,
36+
request_options: RequestOptions | None = None,
3637
) -> ClaimViewResponse:
3738
"""Link a claim attempt to an external user
3839
@@ -56,7 +57,7 @@ def update_attempts(
5657
RateLimitExceededError: If rate limited (429).
5758
ServerError: If the server returns a 5xx error.
5859
"""
59-
body: Dict[str, Any] = {
60+
body: dict[str, Any] = {
6061
k: v
6162
for k, v in {
6263
"type": type,
@@ -77,10 +78,10 @@ def update_attempts(
7778
def create_validate(
7879
self,
7980
*,
80-
type: Union[AgentAdminValidateCredentialRequestType, str],
81+
type: AgentAdminValidateCredentialRequestType | str,
8182
credential: str,
82-
audience: Optional[str] = None,
83-
request_options: Optional[RequestOptions] = None,
83+
audience: str | None = None,
84+
request_options: RequestOptions | None = None,
8485
) -> AgentCredentialValidation:
8586
"""Validate an agent credential
8687
@@ -101,7 +102,7 @@ def create_validate(
101102
RateLimitExceededError: If rate limited (429).
102103
ServerError: If the server returns a 5xx error.
103104
"""
104-
body: Dict[str, Any] = {
105+
body: dict[str, Any] = {
105106
k: v
106107
for k, v in {
107108
"type": enum_value(type),
@@ -122,7 +123,7 @@ def get_registration(
122123
self,
123124
id: str,
124125
*,
125-
request_options: Optional[RequestOptions] = None,
126+
request_options: RequestOptions | None = None,
126127
) -> AgentRegistration:
127128
"""Get an agent registration
128129
@@ -152,7 +153,7 @@ def get_registration(
152153
class AsyncAgents:
153154
"""Agents API resources (async)."""
154155

155-
def __init__(self, client: "AsyncWorkOSClient") -> None:
156+
def __init__(self, client: AsyncWorkOSClient) -> None:
156157
self._client = client
157158

158159
async def update_attempts(
@@ -161,8 +162,8 @@ async def update_attempts(
161162
type: Literal["link_external_user"],
162163
claim_attempt_token: str,
163164
user: AgentAdminLinkClaimAttemptToExternalUserRequestUser,
164-
organization_id: Optional[str] = None,
165-
request_options: Optional[RequestOptions] = None,
165+
organization_id: str | None = None,
166+
request_options: RequestOptions | None = None,
166167
) -> ClaimViewResponse:
167168
"""Link a claim attempt to an external user
168169
@@ -186,7 +187,7 @@ async def update_attempts(
186187
RateLimitExceededError: If rate limited (429).
187188
ServerError: If the server returns a 5xx error.
188189
"""
189-
body: Dict[str, Any] = {
190+
body: dict[str, Any] = {
190191
k: v
191192
for k, v in {
192193
"type": type,
@@ -207,10 +208,10 @@ async def update_attempts(
207208
async def create_validate(
208209
self,
209210
*,
210-
type: Union[AgentAdminValidateCredentialRequestType, str],
211+
type: AgentAdminValidateCredentialRequestType | str,
211212
credential: str,
212-
audience: Optional[str] = None,
213-
request_options: Optional[RequestOptions] = None,
213+
audience: str | None = None,
214+
request_options: RequestOptions | None = None,
214215
) -> AgentCredentialValidation:
215216
"""Validate an agent credential
216217
@@ -231,7 +232,7 @@ async def create_validate(
231232
RateLimitExceededError: If rate limited (429).
232233
ServerError: If the server returns a 5xx error.
233234
"""
234-
body: Dict[str, Any] = {
235+
body: dict[str, Any] = {
235236
k: v
236237
for k, v in {
237238
"type": enum_value(type),
@@ -252,7 +253,7 @@ async def get_registration(
252253
self,
253254
id: str,
254255
*,
255-
request_options: Optional[RequestOptions] = None,
256+
request_options: RequestOptions | None = None,
256257
) -> AgentRegistration:
257258
"""Get an agent registration
258259

0 commit comments

Comments
 (0)