orq-ai-sdk 4.2.0rc48__py3-none-any.whl → 4.2.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orq_ai_sdk/_hooks/globalhook.py +0 -1
- orq_ai_sdk/_version.py +3 -3
- orq_ai_sdk/audio.py +30 -0
- orq_ai_sdk/chat.py +22 -0
- orq_ai_sdk/completions.py +438 -0
- orq_ai_sdk/contacts.py +43 -886
- orq_ai_sdk/deployments.py +61 -0
- orq_ai_sdk/edits.py +364 -0
- orq_ai_sdk/embeddings.py +344 -0
- orq_ai_sdk/generations.py +370 -0
- orq_ai_sdk/images.py +28 -0
- orq_ai_sdk/models/__init__.py +3839 -424
- orq_ai_sdk/models/conversationresponse.py +1 -1
- orq_ai_sdk/models/conversationwithmessagesresponse.py +1 -1
- orq_ai_sdk/models/createagentrequestop.py +768 -12
- orq_ai_sdk/models/createagentresponse.py +68 -2
- orq_ai_sdk/models/createchatcompletionop.py +538 -313
- orq_ai_sdk/models/createcompletionop.py +2078 -0
- orq_ai_sdk/models/createcontactop.py +5 -10
- orq_ai_sdk/models/createconversationop.py +1 -1
- orq_ai_sdk/models/createconversationresponseop.py +2 -2
- orq_ai_sdk/models/createdatasetitemop.py +4 -4
- orq_ai_sdk/models/createdatasetop.py +1 -1
- orq_ai_sdk/models/createdatasourceop.py +1 -1
- orq_ai_sdk/models/createembeddingop.py +579 -0
- orq_ai_sdk/models/createevalop.py +14 -14
- orq_ai_sdk/models/createidentityop.py +1 -1
- orq_ai_sdk/models/createimageeditop.py +715 -0
- orq_ai_sdk/models/createimageop.py +228 -82
- orq_ai_sdk/models/createimagevariationop.py +706 -0
- orq_ai_sdk/models/creatememoryop.py +4 -2
- orq_ai_sdk/models/createmoderationop.py +521 -0
- orq_ai_sdk/models/createpromptop.py +375 -6
- orq_ai_sdk/models/creatererankop.py +608 -0
- orq_ai_sdk/models/createresponseop.py +2567 -0
- orq_ai_sdk/models/createspeechop.py +466 -0
- orq_ai_sdk/models/createtoolop.py +6 -6
- orq_ai_sdk/models/createtranscriptionop.py +732 -0
- orq_ai_sdk/models/createtranslationop.py +702 -0
- orq_ai_sdk/models/deploymentgetconfigop.py +17 -7
- orq_ai_sdk/models/deploymentsop.py +1 -0
- orq_ai_sdk/models/deploymentstreamop.py +7 -0
- orq_ai_sdk/models/filegetop.py +1 -1
- orq_ai_sdk/models/filelistop.py +1 -1
- orq_ai_sdk/models/fileuploadop.py +1 -1
- orq_ai_sdk/models/generateconversationnameop.py +1 -1
- orq_ai_sdk/models/getallmemoriesop.py +4 -2
- orq_ai_sdk/models/getallpromptsop.py +188 -3
- orq_ai_sdk/models/getalltoolsop.py +6 -6
- orq_ai_sdk/models/getevalsop.py +17 -17
- orq_ai_sdk/models/getonepromptop.py +188 -3
- orq_ai_sdk/models/getpromptversionop.py +188 -3
- orq_ai_sdk/models/invokedeploymentrequest.py +11 -4
- orq_ai_sdk/models/listagentsop.py +372 -0
- orq_ai_sdk/models/listdatasetdatapointsop.py +4 -4
- orq_ai_sdk/models/listdatasetsop.py +1 -1
- orq_ai_sdk/models/listdatasourcesop.py +1 -1
- orq_ai_sdk/models/listidentitiesop.py +1 -1
- orq_ai_sdk/models/listmodelsop.py +1 -0
- orq_ai_sdk/models/listpromptversionsop.py +188 -3
- orq_ai_sdk/models/partdoneevent.py +1 -1
- orq_ai_sdk/models/post_v2_router_ocrop.py +408 -0
- orq_ai_sdk/models/publiccontact.py +9 -3
- orq_ai_sdk/models/publicidentity.py +62 -0
- orq_ai_sdk/models/reasoningpart.py +1 -1
- orq_ai_sdk/models/responsedoneevent.py +14 -11
- orq_ai_sdk/models/retrieveagentrequestop.py +382 -0
- orq_ai_sdk/models/retrievedatapointop.py +4 -4
- orq_ai_sdk/models/retrievedatasetop.py +1 -1
- orq_ai_sdk/models/retrievedatasourceop.py +1 -1
- orq_ai_sdk/models/retrieveidentityop.py +1 -1
- orq_ai_sdk/models/retrievememoryop.py +4 -2
- orq_ai_sdk/models/retrievetoolop.py +6 -6
- orq_ai_sdk/models/runagentop.py +379 -9
- orq_ai_sdk/models/streamrunagentop.py +385 -9
- orq_ai_sdk/models/updateagentop.py +770 -12
- orq_ai_sdk/models/updateconversationop.py +1 -1
- orq_ai_sdk/models/updatedatapointop.py +4 -4
- orq_ai_sdk/models/updatedatasetop.py +1 -1
- orq_ai_sdk/models/updatedatasourceop.py +1 -1
- orq_ai_sdk/models/updateevalop.py +14 -14
- orq_ai_sdk/models/updateidentityop.py +1 -1
- orq_ai_sdk/models/updatememoryop.py +4 -2
- orq_ai_sdk/models/updatepromptop.py +375 -6
- orq_ai_sdk/models/updatetoolop.py +7 -7
- orq_ai_sdk/moderations.py +218 -0
- orq_ai_sdk/orq_completions.py +666 -0
- orq_ai_sdk/orq_responses.py +398 -0
- orq_ai_sdk/rerank.py +330 -0
- orq_ai_sdk/router.py +89 -641
- orq_ai_sdk/speech.py +333 -0
- orq_ai_sdk/transcriptions.py +416 -0
- orq_ai_sdk/translations.py +384 -0
- orq_ai_sdk/variations.py +364 -0
- orq_ai_sdk-4.2.12.dist-info/METADATA +888 -0
- {orq_ai_sdk-4.2.0rc48.dist-info → orq_ai_sdk-4.2.12.dist-info}/RECORD +98 -75
- {orq_ai_sdk-4.2.0rc48.dist-info → orq_ai_sdk-4.2.12.dist-info}/WHEEL +1 -1
- orq_ai_sdk/models/deletecontactop.py +0 -44
- orq_ai_sdk/models/listcontactsop.py +0 -265
- orq_ai_sdk/models/retrievecontactop.py +0 -142
- orq_ai_sdk/models/updatecontactop.py +0 -233
- orq_ai_sdk-4.2.0rc48.dist-info/METADATA +0 -788
- {orq_ai_sdk-4.2.0rc48.dist-info → orq_ai_sdk-4.2.12.dist-info}/top_level.txt +0 -0
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from dataclasses import dataclass, field
|
|
5
|
-
from datetime import datetime
|
|
6
|
-
import httpx
|
|
7
|
-
from orq_ai_sdk.models import OrqError
|
|
8
|
-
from orq_ai_sdk.types import (
|
|
9
|
-
BaseModel,
|
|
10
|
-
Nullable,
|
|
11
|
-
OptionalNullable,
|
|
12
|
-
UNSET,
|
|
13
|
-
UNSET_SENTINEL,
|
|
14
|
-
)
|
|
15
|
-
from orq_ai_sdk.utils import FieldMetadata, PathParamMetadata, parse_datetime
|
|
16
|
-
import pydantic
|
|
17
|
-
from pydantic import model_serializer
|
|
18
|
-
from typing import Any, Dict, List, Optional
|
|
19
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class RetrieveContactRequestTypedDict(TypedDict):
|
|
23
|
-
id: str
|
|
24
|
-
r"""Unique contact id or external id"""
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class RetrieveContactRequest(BaseModel):
|
|
28
|
-
id: Annotated[
|
|
29
|
-
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
30
|
-
]
|
|
31
|
-
r"""Unique contact id or external id"""
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class RetrieveContactContactsResponseBodyData(BaseModel):
|
|
35
|
-
error: str
|
|
36
|
-
r"""Error message"""
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
@dataclass(unsafe_hash=True)
|
|
40
|
-
class RetrieveContactContactsResponseBody(OrqError):
|
|
41
|
-
r"""Contact not found"""
|
|
42
|
-
|
|
43
|
-
data: RetrieveContactContactsResponseBodyData = field(hash=False)
|
|
44
|
-
|
|
45
|
-
def __init__(
|
|
46
|
-
self,
|
|
47
|
-
data: RetrieveContactContactsResponseBodyData,
|
|
48
|
-
raw_response: httpx.Response,
|
|
49
|
-
body: Optional[str] = None,
|
|
50
|
-
):
|
|
51
|
-
message = body or raw_response.text
|
|
52
|
-
super().__init__(message, raw_response, body)
|
|
53
|
-
object.__setattr__(self, "data", data)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
class RetrieveContactResponseBodyTypedDict(TypedDict):
|
|
57
|
-
r"""Contact details"""
|
|
58
|
-
|
|
59
|
-
id: str
|
|
60
|
-
r"""Unique ULID (Universally Unique Lexicographically Sortable Identifier) for the contact"""
|
|
61
|
-
external_id: str
|
|
62
|
-
r"""Unique string value to identify the contact user in the customer's system. This should be the same ID you use in your system to reference this user."""
|
|
63
|
-
display_name: NotRequired[Nullable[str]]
|
|
64
|
-
r"""Display name or nickname of the contact user. This is typically shown in user interfaces."""
|
|
65
|
-
email: NotRequired[Nullable[str]]
|
|
66
|
-
r"""Email address of the contact user"""
|
|
67
|
-
avatar_url: NotRequired[Nullable[str]]
|
|
68
|
-
r"""URL linking to the contact user's avatar image"""
|
|
69
|
-
tags: NotRequired[List[str]]
|
|
70
|
-
r"""Array of tags associated with the contact. Useful for organizing and filtering contacts by categories, departments, or custom classifications."""
|
|
71
|
-
metadata: NotRequired[Dict[str, Any]]
|
|
72
|
-
r"""Additional custom metadata associated with the contact as key-value pairs. Use this to store any extra information specific to your application."""
|
|
73
|
-
created: NotRequired[datetime]
|
|
74
|
-
r"""The date and time the resource was created"""
|
|
75
|
-
updated: NotRequired[datetime]
|
|
76
|
-
r"""The date and time the resource was last updated"""
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
class RetrieveContactResponseBody(BaseModel):
|
|
80
|
-
r"""Contact details"""
|
|
81
|
-
|
|
82
|
-
id: Annotated[str, pydantic.Field(alias="_id")]
|
|
83
|
-
r"""Unique ULID (Universally Unique Lexicographically Sortable Identifier) for the contact"""
|
|
84
|
-
|
|
85
|
-
external_id: str
|
|
86
|
-
r"""Unique string value to identify the contact user in the customer's system. This should be the same ID you use in your system to reference this user."""
|
|
87
|
-
|
|
88
|
-
display_name: OptionalNullable[str] = UNSET
|
|
89
|
-
r"""Display name or nickname of the contact user. This is typically shown in user interfaces."""
|
|
90
|
-
|
|
91
|
-
email: OptionalNullable[str] = UNSET
|
|
92
|
-
r"""Email address of the contact user"""
|
|
93
|
-
|
|
94
|
-
avatar_url: OptionalNullable[str] = UNSET
|
|
95
|
-
r"""URL linking to the contact user's avatar image"""
|
|
96
|
-
|
|
97
|
-
tags: Optional[List[str]] = None
|
|
98
|
-
r"""Array of tags associated with the contact. Useful for organizing and filtering contacts by categories, departments, or custom classifications."""
|
|
99
|
-
|
|
100
|
-
metadata: Optional[Dict[str, Any]] = None
|
|
101
|
-
r"""Additional custom metadata associated with the contact as key-value pairs. Use this to store any extra information specific to your application."""
|
|
102
|
-
|
|
103
|
-
created: Optional[datetime] = None
|
|
104
|
-
r"""The date and time the resource was created"""
|
|
105
|
-
|
|
106
|
-
updated: Optional[datetime] = parse_datetime("2026-01-20T13:00:20.021Z")
|
|
107
|
-
r"""The date and time the resource was last updated"""
|
|
108
|
-
|
|
109
|
-
@model_serializer(mode="wrap")
|
|
110
|
-
def serialize_model(self, handler):
|
|
111
|
-
optional_fields = set(
|
|
112
|
-
[
|
|
113
|
-
"display_name",
|
|
114
|
-
"email",
|
|
115
|
-
"avatar_url",
|
|
116
|
-
"tags",
|
|
117
|
-
"metadata",
|
|
118
|
-
"created",
|
|
119
|
-
"updated",
|
|
120
|
-
]
|
|
121
|
-
)
|
|
122
|
-
nullable_fields = set(["display_name", "email", "avatar_url"])
|
|
123
|
-
serialized = handler(self)
|
|
124
|
-
m = {}
|
|
125
|
-
|
|
126
|
-
for n, f in type(self).model_fields.items():
|
|
127
|
-
k = f.alias or n
|
|
128
|
-
val = serialized.get(k)
|
|
129
|
-
is_nullable_and_explicitly_set = (
|
|
130
|
-
k in nullable_fields
|
|
131
|
-
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
132
|
-
)
|
|
133
|
-
|
|
134
|
-
if val != UNSET_SENTINEL:
|
|
135
|
-
if (
|
|
136
|
-
val is not None
|
|
137
|
-
or k not in optional_fields
|
|
138
|
-
or is_nullable_and_explicitly_set
|
|
139
|
-
):
|
|
140
|
-
m[k] = val
|
|
141
|
-
|
|
142
|
-
return m
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from dataclasses import dataclass, field
|
|
5
|
-
from datetime import datetime
|
|
6
|
-
import httpx
|
|
7
|
-
from orq_ai_sdk.models import OrqError
|
|
8
|
-
from orq_ai_sdk.types import (
|
|
9
|
-
BaseModel,
|
|
10
|
-
Nullable,
|
|
11
|
-
OptionalNullable,
|
|
12
|
-
UNSET,
|
|
13
|
-
UNSET_SENTINEL,
|
|
14
|
-
)
|
|
15
|
-
from orq_ai_sdk.utils import (
|
|
16
|
-
FieldMetadata,
|
|
17
|
-
PathParamMetadata,
|
|
18
|
-
RequestMetadata,
|
|
19
|
-
parse_datetime,
|
|
20
|
-
)
|
|
21
|
-
import pydantic
|
|
22
|
-
from pydantic import model_serializer
|
|
23
|
-
from typing import Any, Dict, List, Optional
|
|
24
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class UpdateContactRequestBodyTypedDict(TypedDict):
|
|
28
|
-
r"""Contact fields to update"""
|
|
29
|
-
|
|
30
|
-
display_name: NotRequired[Nullable[str]]
|
|
31
|
-
r"""Display name or nickname of the contact user. This is typically shown in user interfaces."""
|
|
32
|
-
email: NotRequired[Nullable[str]]
|
|
33
|
-
r"""Email address of the contact user"""
|
|
34
|
-
avatar_url: NotRequired[Nullable[str]]
|
|
35
|
-
r"""URL linking to the contact user's avatar image"""
|
|
36
|
-
tags: NotRequired[List[str]]
|
|
37
|
-
r"""Array of tags associated with the contact. Useful for organizing and filtering contacts by categories, departments, or custom classifications."""
|
|
38
|
-
metadata: NotRequired[Dict[str, Any]]
|
|
39
|
-
r"""Additional custom metadata associated with the contact as key-value pairs. Use this to store any extra information specific to your application."""
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
class UpdateContactRequestBody(BaseModel):
|
|
43
|
-
r"""Contact fields to update"""
|
|
44
|
-
|
|
45
|
-
display_name: OptionalNullable[str] = UNSET
|
|
46
|
-
r"""Display name or nickname of the contact user. This is typically shown in user interfaces."""
|
|
47
|
-
|
|
48
|
-
email: OptionalNullable[str] = UNSET
|
|
49
|
-
r"""Email address of the contact user"""
|
|
50
|
-
|
|
51
|
-
avatar_url: OptionalNullable[str] = UNSET
|
|
52
|
-
r"""URL linking to the contact user's avatar image"""
|
|
53
|
-
|
|
54
|
-
tags: Optional[List[str]] = None
|
|
55
|
-
r"""Array of tags associated with the contact. Useful for organizing and filtering contacts by categories, departments, or custom classifications."""
|
|
56
|
-
|
|
57
|
-
metadata: Optional[Dict[str, Any]] = None
|
|
58
|
-
r"""Additional custom metadata associated with the contact as key-value pairs. Use this to store any extra information specific to your application."""
|
|
59
|
-
|
|
60
|
-
@model_serializer(mode="wrap")
|
|
61
|
-
def serialize_model(self, handler):
|
|
62
|
-
optional_fields = set(
|
|
63
|
-
["display_name", "email", "avatar_url", "tags", "metadata"]
|
|
64
|
-
)
|
|
65
|
-
nullable_fields = set(["display_name", "email", "avatar_url"])
|
|
66
|
-
serialized = handler(self)
|
|
67
|
-
m = {}
|
|
68
|
-
|
|
69
|
-
for n, f in type(self).model_fields.items():
|
|
70
|
-
k = f.alias or n
|
|
71
|
-
val = serialized.get(k)
|
|
72
|
-
is_nullable_and_explicitly_set = (
|
|
73
|
-
k in nullable_fields
|
|
74
|
-
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
if val != UNSET_SENTINEL:
|
|
78
|
-
if (
|
|
79
|
-
val is not None
|
|
80
|
-
or k not in optional_fields
|
|
81
|
-
or is_nullable_and_explicitly_set
|
|
82
|
-
):
|
|
83
|
-
m[k] = val
|
|
84
|
-
|
|
85
|
-
return m
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
class UpdateContactRequestTypedDict(TypedDict):
|
|
89
|
-
id: str
|
|
90
|
-
r"""Unique contact id or external id"""
|
|
91
|
-
request_body: NotRequired[UpdateContactRequestBodyTypedDict]
|
|
92
|
-
r"""Contact fields to update"""
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
class UpdateContactRequest(BaseModel):
|
|
96
|
-
id: Annotated[
|
|
97
|
-
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
98
|
-
]
|
|
99
|
-
r"""Unique contact id or external id"""
|
|
100
|
-
|
|
101
|
-
request_body: Annotated[
|
|
102
|
-
Optional[UpdateContactRequestBody],
|
|
103
|
-
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
|
104
|
-
] = None
|
|
105
|
-
r"""Contact fields to update"""
|
|
106
|
-
|
|
107
|
-
@model_serializer(mode="wrap")
|
|
108
|
-
def serialize_model(self, handler):
|
|
109
|
-
optional_fields = set(["RequestBody"])
|
|
110
|
-
serialized = handler(self)
|
|
111
|
-
m = {}
|
|
112
|
-
|
|
113
|
-
for n, f in type(self).model_fields.items():
|
|
114
|
-
k = f.alias or n
|
|
115
|
-
val = serialized.get(k)
|
|
116
|
-
|
|
117
|
-
if val != UNSET_SENTINEL:
|
|
118
|
-
if val is not None or k not in optional_fields:
|
|
119
|
-
m[k] = val
|
|
120
|
-
|
|
121
|
-
return m
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
class UpdateContactContactsResponseBodyData(BaseModel):
|
|
125
|
-
message: str
|
|
126
|
-
r"""Error message"""
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
@dataclass(unsafe_hash=True)
|
|
130
|
-
class UpdateContactContactsResponseBody(OrqError):
|
|
131
|
-
r"""Contact not found"""
|
|
132
|
-
|
|
133
|
-
data: UpdateContactContactsResponseBodyData = field(hash=False)
|
|
134
|
-
|
|
135
|
-
def __init__(
|
|
136
|
-
self,
|
|
137
|
-
data: UpdateContactContactsResponseBodyData,
|
|
138
|
-
raw_response: httpx.Response,
|
|
139
|
-
body: Optional[str] = None,
|
|
140
|
-
):
|
|
141
|
-
fallback = body or raw_response.text
|
|
142
|
-
message = str(data.message) or fallback
|
|
143
|
-
super().__init__(message, raw_response, body)
|
|
144
|
-
object.__setattr__(self, "data", data)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
class UpdateContactResponseBodyTypedDict(TypedDict):
|
|
148
|
-
r"""Updated contact"""
|
|
149
|
-
|
|
150
|
-
id: str
|
|
151
|
-
r"""Unique ULID (Universally Unique Lexicographically Sortable Identifier) for the contact"""
|
|
152
|
-
external_id: str
|
|
153
|
-
r"""Unique string value to identify the contact user in the customer's system. This should be the same ID you use in your system to reference this user."""
|
|
154
|
-
display_name: NotRequired[Nullable[str]]
|
|
155
|
-
r"""Display name or nickname of the contact user. This is typically shown in user interfaces."""
|
|
156
|
-
email: NotRequired[Nullable[str]]
|
|
157
|
-
r"""Email address of the contact user"""
|
|
158
|
-
avatar_url: NotRequired[Nullable[str]]
|
|
159
|
-
r"""URL linking to the contact user's avatar image"""
|
|
160
|
-
tags: NotRequired[List[str]]
|
|
161
|
-
r"""Array of tags associated with the contact. Useful for organizing and filtering contacts by categories, departments, or custom classifications."""
|
|
162
|
-
metadata: NotRequired[Dict[str, Any]]
|
|
163
|
-
r"""Additional custom metadata associated with the contact as key-value pairs. Use this to store any extra information specific to your application."""
|
|
164
|
-
created: NotRequired[datetime]
|
|
165
|
-
r"""The date and time the resource was created"""
|
|
166
|
-
updated: NotRequired[datetime]
|
|
167
|
-
r"""The date and time the resource was last updated"""
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
class UpdateContactResponseBody(BaseModel):
|
|
171
|
-
r"""Updated contact"""
|
|
172
|
-
|
|
173
|
-
id: Annotated[str, pydantic.Field(alias="_id")]
|
|
174
|
-
r"""Unique ULID (Universally Unique Lexicographically Sortable Identifier) for the contact"""
|
|
175
|
-
|
|
176
|
-
external_id: str
|
|
177
|
-
r"""Unique string value to identify the contact user in the customer's system. This should be the same ID you use in your system to reference this user."""
|
|
178
|
-
|
|
179
|
-
display_name: OptionalNullable[str] = UNSET
|
|
180
|
-
r"""Display name or nickname of the contact user. This is typically shown in user interfaces."""
|
|
181
|
-
|
|
182
|
-
email: OptionalNullable[str] = UNSET
|
|
183
|
-
r"""Email address of the contact user"""
|
|
184
|
-
|
|
185
|
-
avatar_url: OptionalNullable[str] = UNSET
|
|
186
|
-
r"""URL linking to the contact user's avatar image"""
|
|
187
|
-
|
|
188
|
-
tags: Optional[List[str]] = None
|
|
189
|
-
r"""Array of tags associated with the contact. Useful for organizing and filtering contacts by categories, departments, or custom classifications."""
|
|
190
|
-
|
|
191
|
-
metadata: Optional[Dict[str, Any]] = None
|
|
192
|
-
r"""Additional custom metadata associated with the contact as key-value pairs. Use this to store any extra information specific to your application."""
|
|
193
|
-
|
|
194
|
-
created: Optional[datetime] = None
|
|
195
|
-
r"""The date and time the resource was created"""
|
|
196
|
-
|
|
197
|
-
updated: Optional[datetime] = parse_datetime("2026-01-20T13:00:20.021Z")
|
|
198
|
-
r"""The date and time the resource was last updated"""
|
|
199
|
-
|
|
200
|
-
@model_serializer(mode="wrap")
|
|
201
|
-
def serialize_model(self, handler):
|
|
202
|
-
optional_fields = set(
|
|
203
|
-
[
|
|
204
|
-
"display_name",
|
|
205
|
-
"email",
|
|
206
|
-
"avatar_url",
|
|
207
|
-
"tags",
|
|
208
|
-
"metadata",
|
|
209
|
-
"created",
|
|
210
|
-
"updated",
|
|
211
|
-
]
|
|
212
|
-
)
|
|
213
|
-
nullable_fields = set(["display_name", "email", "avatar_url"])
|
|
214
|
-
serialized = handler(self)
|
|
215
|
-
m = {}
|
|
216
|
-
|
|
217
|
-
for n, f in type(self).model_fields.items():
|
|
218
|
-
k = f.alias or n
|
|
219
|
-
val = serialized.get(k)
|
|
220
|
-
is_nullable_and_explicitly_set = (
|
|
221
|
-
k in nullable_fields
|
|
222
|
-
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
223
|
-
)
|
|
224
|
-
|
|
225
|
-
if val != UNSET_SENTINEL:
|
|
226
|
-
if (
|
|
227
|
-
val is not None
|
|
228
|
-
or k not in optional_fields
|
|
229
|
-
or is_nullable_and_explicitly_set
|
|
230
|
-
):
|
|
231
|
-
m[k] = val
|
|
232
|
-
|
|
233
|
-
return m
|