Skip to content

Commit ff17675

Browse files
committed
updates
1 parent 8525d1f commit ff17675

1,242 files changed

Lines changed: 44591 additions & 1579 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.

src/workos/admin_portal/_resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from .._types import RequestOptions, enum_value
1111
from .models import IntentOptions, PortalLinkResponse
12-
from workos.common.models import GenerateLinkIntent
12+
from workos.common.models.generate_link_intent import GenerateLinkIntent
1313

1414

1515
class AdminPortal:

src/workos/admin_portal/models/generate_link.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from workos._types import _raise_deserialize_error
1010

1111
from .intent_options import IntentOptions
12-
from workos.common.models import GenerateLinkIntent
12+
from workos.common.models.generate_link_intent import GenerateLinkIntent
1313

1414

1515
@dataclass(slots=True)
Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,6 @@
11
# This file is auto-generated by oagen. Do not edit.
22

3-
from __future__ import annotations
3+
from typing_extensions import TypeAlias
4+
from workos.common.models.api_key_created_data_owner import ApiKeyCreatedDataOwner
45

5-
from dataclasses import dataclass
6-
from typing import Any, Dict, Literal
7-
from workos._types import _raise_deserialize_error
8-
9-
10-
@dataclass(slots=True)
11-
class ApiKeyOwner:
12-
"""The entity that owns the API Key."""
13-
14-
type: Literal["organization"]
15-
"""The type of the API Key owner."""
16-
id: str
17-
"""Unique identifier of the API Key owner."""
18-
19-
@classmethod
20-
def from_dict(cls, data: Dict[str, Any]) -> "ApiKeyOwner":
21-
"""Deserialize from a dictionary."""
22-
try:
23-
return cls(
24-
type=data["type"],
25-
id=data["id"],
26-
)
27-
except (KeyError, ValueError) as e:
28-
_raise_deserialize_error("ApiKeyOwner", e)
29-
30-
def to_dict(self) -> Dict[str, Any]:
31-
"""Serialize to a dictionary."""
32-
result: Dict[str, Any] = {}
33-
result["type"] = self.type
34-
result["id"] = self.id
35-
return result
6+
ApiKeyOwner: TypeAlias = ApiKeyCreatedDataOwner
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# This file is auto-generated by oagen. Do not edit.
22

3-
from .api_key_owner import ApiKeyOwner
3+
from typing_extensions import TypeAlias
4+
from workos.common.models.api_key_created_data_owner import ApiKeyCreatedDataOwner
45

5-
ApiKeyWithValueOwner = ApiKeyOwner
6+
ApiKeyWithValueOwner: TypeAlias = ApiKeyCreatedDataOwner
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This file is auto-generated by oagen. Do not edit.
22

3-
from workos.connect.models import ApplicationsOrder
3+
from typing_extensions import TypeAlias
4+
from workos.connect.models.applications_order import ApplicationsOrder
45

5-
OrganizationsApiKeysOrder = ApplicationsOrder
6+
OrganizationsApiKeysOrder: TypeAlias = ApplicationsOrder
67
__all__ = ["OrganizationsApiKeysOrder"]

src/workos/audit_logs/_resource.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
AuditLogSchemaJson,
1818
AuditLogSchemaTarget,
1919
)
20-
from workos.organizations.models import AuditLogsRetentionJson
20+
from workos.organizations.models.audit_logs_retention_json import AuditLogsRetentionJson
2121
from .models import AuditLogsOrder
2222
from .._pagination import AsyncPage, SyncPage
2323

@@ -309,7 +309,7 @@ def create_exports(
309309
range_start: ISO-8601 value for start of the export range.
310310
range_end: ISO-8601 value for end of the export range.
311311
actions: List of actions to filter against.
312-
actors: Deprecated. Use `actor_names` instead.
312+
actors: (deprecated) Deprecated. Use `actor_names` instead.
313313
actor_names: List of actor names to filter against.
314314
actor_ids: List of actor IDs to filter against.
315315
targets: List of target types to filter against.
@@ -664,7 +664,7 @@ async def create_exports(
664664
range_start: ISO-8601 value for start of the export range.
665665
range_end: ISO-8601 value for end of the export range.
666666
actions: List of actions to filter against.
667-
actors: Deprecated. Use `actor_names` instead.
667+
actors: (deprecated) Deprecated. Use `actor_names` instead.
668668
actor_names: List of actor names to filter against.
669669
actor_ids: List of actor IDs to filter against.
670670
targets: List of target types to filter against.
Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,6 @@
11
# This file is auto-generated by oagen. Do not edit.
22

3-
from __future__ import annotations
3+
from typing_extensions import TypeAlias
4+
from .audit_log_event_actor import AuditLogEventActor
45

5-
from dataclasses import dataclass
6-
from typing import Any, Dict, Optional, Union
7-
from workos._types import _raise_deserialize_error
8-
9-
10-
@dataclass(slots=True)
11-
class AuditLogEventTarget:
12-
"""Audit Log Event Target model."""
13-
14-
id: str
15-
"""Target identifier."""
16-
type: str
17-
"""Target type."""
18-
name: Optional[str] = None
19-
"""Optional target name."""
20-
metadata: Optional[Dict[str, Union[str, float, bool]]] = None
21-
"""Additional data associated with the event or entity."""
22-
23-
@classmethod
24-
def from_dict(cls, data: Dict[str, Any]) -> "AuditLogEventTarget":
25-
"""Deserialize from a dictionary."""
26-
try:
27-
return cls(
28-
id=data["id"],
29-
type=data["type"],
30-
name=data.get("name"),
31-
metadata=data.get("metadata"),
32-
)
33-
except (KeyError, ValueError) as e:
34-
_raise_deserialize_error("AuditLogEventTarget", e)
35-
36-
def to_dict(self) -> Dict[str, Any]:
37-
"""Serialize to a dictionary."""
38-
result: Dict[str, Any] = {}
39-
result["id"] = self.id
40-
result["type"] = self.type
41-
if self.name is not None:
42-
result["name"] = self.name
43-
if self.metadata is not None:
44-
result["metadata"] = self.metadata
45-
return result
6+
AuditLogEventTarget: TypeAlias = AuditLogEventActor

src/workos/audit_logs/models/audit_log_export_creation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ class AuditLogExportCreation:
2020
actions: Optional[List[str]] = None
2121
"""List of actions to filter against."""
2222
actors: Optional[List[str]] = None
23-
"""Deprecated. Use `actor_names` instead."""
23+
"""Deprecated. Use `actor_names` instead.
24+
25+
.. deprecated::"""
2426
actor_names: Optional[List[str]] = None
2527
"""List of actor names to filter against."""
2628
actor_ids: Optional[List[str]] = None

src/workos/audit_logs/models/audit_log_export_json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing import Any, Dict, Literal, Optional
99
from workos._types import _raise_deserialize_error
1010
from workos._types import _format_datetime, _parse_datetime
11-
from workos.common.models import AuditLogExportJsonState
11+
from workos.common.models.audit_log_export_json_state import AuditLogExportJsonState
1212

1313

1414
@dataclass(slots=True)
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# This file is auto-generated by oagen. Do not edit.
22

3+
from typing_extensions import TypeAlias
34
from .audit_log_schema_actor import AuditLogSchemaActor
45

5-
AuditLogSchemaJsonActor = AuditLogSchemaActor
6+
AuditLogSchemaJsonActor: TypeAlias = AuditLogSchemaActor

0 commit comments

Comments
 (0)