airbyte-agent-zendesk-chat 0.1.1__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.
- airbyte_agent_zendesk_chat/__init__.py +193 -0
- airbyte_agent_zendesk_chat/_vendored/__init__.py +1 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/__init__.py +82 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/auth_strategies.py +1120 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/auth_template.py +135 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/cloud_utils/__init__.py +5 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/cloud_utils/client.py +213 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/connector_model_loader.py +965 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/constants.py +78 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/exceptions.py +23 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/executor/__init__.py +31 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/executor/hosted_executor.py +196 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/executor/local_executor.py +1724 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/executor/models.py +190 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/extensions.py +693 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/http/__init__.py +37 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/http/adapters/__init__.py +9 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/http/adapters/httpx_adapter.py +251 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/http/config.py +98 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/http/exceptions.py +119 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/http/protocols.py +114 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/http/response.py +104 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/http_client.py +693 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/introspection.py +262 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/logging/__init__.py +11 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/logging/logger.py +273 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/logging/types.py +93 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/observability/__init__.py +11 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/observability/config.py +179 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/observability/models.py +19 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/observability/redactor.py +81 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/observability/session.py +103 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/performance/__init__.py +6 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/performance/instrumentation.py +57 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/performance/metrics.py +93 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/__init__.py +75 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/base.py +164 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/components.py +239 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/connector.py +120 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/extensions.py +230 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/operations.py +146 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/security.py +223 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/secrets.py +182 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/telemetry/__init__.py +10 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/telemetry/config.py +32 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/telemetry/events.py +59 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/telemetry/tracker.py +155 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/types.py +245 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/utils.py +60 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/validation.py +828 -0
- airbyte_agent_zendesk_chat/connector.py +1465 -0
- airbyte_agent_zendesk_chat/connector_model.py +2424 -0
- airbyte_agent_zendesk_chat/models.py +582 -0
- airbyte_agent_zendesk_chat/types.py +984 -0
- airbyte_agent_zendesk_chat-0.1.1.dist-info/METADATA +130 -0
- airbyte_agent_zendesk_chat-0.1.1.dist-info/RECORD +57 -0
- airbyte_agent_zendesk_chat-0.1.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Pydantic models for zendesk-chat connector.
|
|
3
|
+
|
|
4
|
+
This module contains Pydantic models used for authentication configuration
|
|
5
|
+
and response envelope types.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
11
|
+
from typing import TypeVar, Generic, Union, Any
|
|
12
|
+
|
|
13
|
+
# Authentication configuration
|
|
14
|
+
|
|
15
|
+
class ZendeskChatAuthConfig(BaseModel):
|
|
16
|
+
"""OAuth 2.0 Access Token - Authenticate using an OAuth 2.0 access token from Zendesk"""
|
|
17
|
+
|
|
18
|
+
model_config = ConfigDict(extra="forbid")
|
|
19
|
+
|
|
20
|
+
access_token: str
|
|
21
|
+
"""Your Zendesk Chat OAuth 2.0 access token"""
|
|
22
|
+
|
|
23
|
+
# ===== RESPONSE TYPE DEFINITIONS (PYDANTIC) =====
|
|
24
|
+
|
|
25
|
+
class Account(BaseModel):
|
|
26
|
+
"""Zendesk Chat account information"""
|
|
27
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
28
|
+
|
|
29
|
+
account_key: Union[str, Any] = Field(default=None)
|
|
30
|
+
status: Union[str | None, Any] = Field(default=None)
|
|
31
|
+
create_date: Union[str | None, Any] = Field(default=None)
|
|
32
|
+
billing: Union[Any, Any] = Field(default=None)
|
|
33
|
+
plan: Union[Any, Any] = Field(default=None)
|
|
34
|
+
|
|
35
|
+
class Billing(BaseModel):
|
|
36
|
+
"""Account billing information"""
|
|
37
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
38
|
+
|
|
39
|
+
company: Union[str | None, Any] = Field(default=None)
|
|
40
|
+
first_name: Union[str | None, Any] = Field(default=None)
|
|
41
|
+
last_name: Union[str | None, Any] = Field(default=None)
|
|
42
|
+
email: Union[str | None, Any] = Field(default=None)
|
|
43
|
+
phone: Union[str | None, Any] = Field(default=None)
|
|
44
|
+
address1: Union[str | None, Any] = Field(default=None)
|
|
45
|
+
address2: Union[str | None, Any] = Field(default=None)
|
|
46
|
+
city: Union[str | None, Any] = Field(default=None)
|
|
47
|
+
state: Union[str | None, Any] = Field(default=None)
|
|
48
|
+
postal_code: Union[str | None, Any] = Field(default=None)
|
|
49
|
+
country_code: Union[str | None, Any] = Field(default=None)
|
|
50
|
+
additional_info: Union[str | None, Any] = Field(default=None)
|
|
51
|
+
cycle: Union[int | None, Any] = Field(default=None)
|
|
52
|
+
|
|
53
|
+
class Plan(BaseModel):
|
|
54
|
+
"""Account plan details"""
|
|
55
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
56
|
+
|
|
57
|
+
name: Union[str | None, Any] = Field(default=None)
|
|
58
|
+
price: Union[float | None, Any] = Field(default=None)
|
|
59
|
+
max_agents: Union[int | None, Any] = Field(default=None)
|
|
60
|
+
max_departments: Union[str | None, Any] = Field(default=None)
|
|
61
|
+
max_concurrent_chats: Union[str | None, Any] = Field(default=None)
|
|
62
|
+
max_history_search_days: Union[str | None, Any] = Field(default=None)
|
|
63
|
+
max_advanced_triggers: Union[str | None, Any] = Field(default=None)
|
|
64
|
+
max_basic_triggers: Union[str | None, Any] = Field(default=None)
|
|
65
|
+
analytics: Union[bool | None, Any] = Field(default=None)
|
|
66
|
+
file_upload: Union[bool | None, Any] = Field(default=None)
|
|
67
|
+
rest_api: Union[bool | None, Any] = Field(default=None)
|
|
68
|
+
goals: Union[int | None, Any] = Field(default=None)
|
|
69
|
+
high_load: Union[bool | None, Any] = Field(default=None)
|
|
70
|
+
integrations: Union[bool | None, Any] = Field(default=None)
|
|
71
|
+
ip_restriction: Union[bool | None, Any] = Field(default=None)
|
|
72
|
+
monitoring: Union[bool | None, Any] = Field(default=None)
|
|
73
|
+
operating_hours: Union[bool | None, Any] = Field(default=None)
|
|
74
|
+
sla: Union[bool | None, Any] = Field(default=None)
|
|
75
|
+
support: Union[bool | None, Any] = Field(default=None)
|
|
76
|
+
unbranding: Union[bool | None, Any] = Field(default=None)
|
|
77
|
+
agent_leaderboard: Union[bool | None, Any] = Field(default=None)
|
|
78
|
+
agent_reports: Union[bool | None, Any] = Field(default=None)
|
|
79
|
+
chat_reports: Union[bool | None, Any] = Field(default=None)
|
|
80
|
+
daily_reports: Union[bool | None, Any] = Field(default=None)
|
|
81
|
+
email_reports: Union[bool | None, Any] = Field(default=None)
|
|
82
|
+
widget_customization: Union[str | None, Any] = Field(default=None)
|
|
83
|
+
long_desc: Union[str | None, Any] = Field(default=None)
|
|
84
|
+
short_desc: Union[str | None, Any] = Field(default=None)
|
|
85
|
+
|
|
86
|
+
class Agent(BaseModel):
|
|
87
|
+
"""Zendesk Chat agent"""
|
|
88
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
89
|
+
|
|
90
|
+
id: Union[int, Any] = Field(default=None)
|
|
91
|
+
email: Union[str | None, Any] = Field(default=None)
|
|
92
|
+
display_name: Union[str | None, Any] = Field(default=None)
|
|
93
|
+
first_name: Union[str | None, Any] = Field(default=None)
|
|
94
|
+
last_name: Union[str | None, Any] = Field(default=None)
|
|
95
|
+
enabled: Union[bool | None, Any] = Field(default=None)
|
|
96
|
+
role_id: Union[int | None, Any] = Field(default=None)
|
|
97
|
+
roles: Union[Any, Any] = Field(default=None)
|
|
98
|
+
departments: Union[list[int] | None, Any] = Field(default=None)
|
|
99
|
+
enabled_departments: Union[list[int] | None, Any] = Field(default=None)
|
|
100
|
+
skills: Union[list[int] | None, Any] = Field(default=None)
|
|
101
|
+
scope: Union[str | None, Any] = Field(default=None)
|
|
102
|
+
create_date: Union[str | None, Any] = Field(default=None)
|
|
103
|
+
last_login: Union[str | None, Any] = Field(default=None)
|
|
104
|
+
login_count: Union[int | None, Any] = Field(default=None)
|
|
105
|
+
|
|
106
|
+
class AgentRoles(BaseModel):
|
|
107
|
+
"""Agent role flags"""
|
|
108
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
109
|
+
|
|
110
|
+
administrator: Union[bool | None, Any] = Field(default=None)
|
|
111
|
+
owner: Union[bool | None, Any] = Field(default=None)
|
|
112
|
+
|
|
113
|
+
class AgentTimeline(BaseModel):
|
|
114
|
+
"""Agent activity timeline entry"""
|
|
115
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
116
|
+
|
|
117
|
+
agent_id: Union[int, Any] = Field(default=None)
|
|
118
|
+
start_time: Union[str | None, Any] = Field(default=None)
|
|
119
|
+
status: Union[str | None, Any] = Field(default=None)
|
|
120
|
+
duration: Union[float | None, Any] = Field(default=None)
|
|
121
|
+
engagement_count: Union[int | None, Any] = Field(default=None)
|
|
122
|
+
|
|
123
|
+
class Ban(BaseModel):
|
|
124
|
+
"""Banned visitor"""
|
|
125
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
126
|
+
|
|
127
|
+
id: Union[int, Any] = Field(default=None)
|
|
128
|
+
type: Union[str | None, Any] = Field(default=None)
|
|
129
|
+
ip_address: Union[str | None, Any] = Field(default=None)
|
|
130
|
+
visitor_id: Union[str | None, Any] = Field(default=None)
|
|
131
|
+
visitor_name: Union[str | None, Any] = Field(default=None)
|
|
132
|
+
reason: Union[str | None, Any] = Field(default=None)
|
|
133
|
+
created_at: Union[str | None, Any] = Field(default=None)
|
|
134
|
+
|
|
135
|
+
class ChatHistoryItem(BaseModel):
|
|
136
|
+
"""ChatHistoryItem type definition"""
|
|
137
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
138
|
+
|
|
139
|
+
type: Union[str | None, Any] = Field(default=None)
|
|
140
|
+
timestamp: Union[str | None, Any] = Field(default=None)
|
|
141
|
+
name: Union[str | None, Any] = Field(default=None)
|
|
142
|
+
nick: Union[str | None, Any] = Field(default=None)
|
|
143
|
+
msg: Union[str | None, Any] = Field(default=None)
|
|
144
|
+
msg_id: Union[str | None, Any] = Field(default=None)
|
|
145
|
+
channel: Union[str | None, Any] = Field(default=None)
|
|
146
|
+
department_id: Union[int | None, Any] = Field(default=None)
|
|
147
|
+
department_name: Union[str | None, Any] = Field(default=None)
|
|
148
|
+
rating: Union[str | None, Any] = Field(default=None)
|
|
149
|
+
new_rating: Union[str | None, Any] = Field(default=None)
|
|
150
|
+
tags: Union[list[str] | None, Any] = Field(default=None)
|
|
151
|
+
new_tags: Union[list[str] | None, Any] = Field(default=None)
|
|
152
|
+
options: Union[str | None, Any] = Field(default=None)
|
|
153
|
+
|
|
154
|
+
class ChatConversion(BaseModel):
|
|
155
|
+
"""ChatConversion type definition"""
|
|
156
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
157
|
+
|
|
158
|
+
id: Union[str | None, Any] = Field(default=None)
|
|
159
|
+
goal_id: Union[int | None, Any] = Field(default=None)
|
|
160
|
+
goal_name: Union[str | None, Any] = Field(default=None)
|
|
161
|
+
timestamp: Union[str | None, Any] = Field(default=None)
|
|
162
|
+
attribution: Union[Any, Any] = Field(default=None)
|
|
163
|
+
|
|
164
|
+
class WebpathItem(BaseModel):
|
|
165
|
+
"""WebpathItem type definition"""
|
|
166
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
167
|
+
|
|
168
|
+
from_: Union[str | None, Any] = Field(default=None, alias="from")
|
|
169
|
+
timestamp: Union[str | None, Any] = Field(default=None)
|
|
170
|
+
|
|
171
|
+
class ChatEngagement(BaseModel):
|
|
172
|
+
"""ChatEngagement type definition"""
|
|
173
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
174
|
+
|
|
175
|
+
id: Union[str | None, Any] = Field(default=None)
|
|
176
|
+
agent_id: Union[str | None, Any] = Field(default=None)
|
|
177
|
+
agent_name: Union[str | None, Any] = Field(default=None)
|
|
178
|
+
agent_full_name: Union[str | None, Any] = Field(default=None)
|
|
179
|
+
department_id: Union[int | None, Any] = Field(default=None)
|
|
180
|
+
timestamp: Union[str | None, Any] = Field(default=None)
|
|
181
|
+
duration: Union[float | None, Any] = Field(default=None)
|
|
182
|
+
accepted: Union[bool | None, Any] = Field(default=None)
|
|
183
|
+
assigned: Union[bool | None, Any] = Field(default=None)
|
|
184
|
+
started_by: Union[str | None, Any] = Field(default=None)
|
|
185
|
+
rating: Union[str | None, Any] = Field(default=None)
|
|
186
|
+
comment: Union[str | None, Any] = Field(default=None)
|
|
187
|
+
count: Union[Any, Any] = Field(default=None)
|
|
188
|
+
response_time: Union[Any, Any] = Field(default=None)
|
|
189
|
+
skills_requested: Union[list[int] | None, Any] = Field(default=None)
|
|
190
|
+
skills_fulfilled: Union[bool | None, Any] = Field(default=None)
|
|
191
|
+
|
|
192
|
+
class Chat(BaseModel):
|
|
193
|
+
"""Chat conversation transcript"""
|
|
194
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
195
|
+
|
|
196
|
+
id: Union[str, Any] = Field(default=None)
|
|
197
|
+
type: Union[str | None, Any] = Field(default=None)
|
|
198
|
+
timestamp: Union[str | None, Any] = Field(default=None)
|
|
199
|
+
update_timestamp: Union[str | None, Any] = Field(default=None)
|
|
200
|
+
duration: Union[int | None, Any] = Field(default=None)
|
|
201
|
+
department_id: Union[int | None, Any] = Field(default=None)
|
|
202
|
+
department_name: Union[str | None, Any] = Field(default=None)
|
|
203
|
+
agent_ids: Union[list[str] | None, Any] = Field(default=None)
|
|
204
|
+
agent_names: Union[list[str] | None, Any] = Field(default=None)
|
|
205
|
+
visitor: Union[Any, Any] = Field(default=None)
|
|
206
|
+
session: Union[Any, Any] = Field(default=None)
|
|
207
|
+
history: Union[list[ChatHistoryItem] | None, Any] = Field(default=None)
|
|
208
|
+
engagements: Union[list[ChatEngagement] | None, Any] = Field(default=None)
|
|
209
|
+
conversions: Union[list[ChatConversion] | None, Any] = Field(default=None)
|
|
210
|
+
count: Union[Any, Any] = Field(default=None)
|
|
211
|
+
response_time: Union[Any, Any] = Field(default=None)
|
|
212
|
+
rating: Union[str | None, Any] = Field(default=None)
|
|
213
|
+
comment: Union[str | None, Any] = Field(default=None)
|
|
214
|
+
tags: Union[list[str] | None, Any] = Field(default=None)
|
|
215
|
+
started_by: Union[str | None, Any] = Field(default=None)
|
|
216
|
+
triggered: Union[bool | None, Any] = Field(default=None)
|
|
217
|
+
triggered_response: Union[bool | None, Any] = Field(default=None)
|
|
218
|
+
missed: Union[bool | None, Any] = Field(default=None)
|
|
219
|
+
unread: Union[bool | None, Any] = Field(default=None)
|
|
220
|
+
deleted: Union[bool | None, Any] = Field(default=None)
|
|
221
|
+
message: Union[str | None, Any] = Field(default=None)
|
|
222
|
+
webpath: Union[list[WebpathItem] | None, Any] = Field(default=None)
|
|
223
|
+
zendesk_ticket_id: Union[int | None, Any] = Field(default=None)
|
|
224
|
+
|
|
225
|
+
class Visitor(BaseModel):
|
|
226
|
+
"""Visitor type definition"""
|
|
227
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
228
|
+
|
|
229
|
+
id: Union[str | None, Any] = Field(default=None)
|
|
230
|
+
name: Union[str | None, Any] = Field(default=None)
|
|
231
|
+
email: Union[str | None, Any] = Field(default=None)
|
|
232
|
+
phone: Union[str | None, Any] = Field(default=None)
|
|
233
|
+
notes: Union[str | None, Any] = Field(default=None)
|
|
234
|
+
|
|
235
|
+
class ChatSession(BaseModel):
|
|
236
|
+
"""ChatSession type definition"""
|
|
237
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
238
|
+
|
|
239
|
+
id: Union[str | None, Any] = Field(default=None)
|
|
240
|
+
browser: Union[str | None, Any] = Field(default=None)
|
|
241
|
+
platform: Union[str | None, Any] = Field(default=None)
|
|
242
|
+
user_agent: Union[str | None, Any] = Field(default=None)
|
|
243
|
+
ip: Union[str | None, Any] = Field(default=None)
|
|
244
|
+
city: Union[str | None, Any] = Field(default=None)
|
|
245
|
+
region: Union[str | None, Any] = Field(default=None)
|
|
246
|
+
country_code: Union[str | None, Any] = Field(default=None)
|
|
247
|
+
country_name: Union[str | None, Any] = Field(default=None)
|
|
248
|
+
start_date: Union[str | None, Any] = Field(default=None)
|
|
249
|
+
end_date: Union[str | None, Any] = Field(default=None)
|
|
250
|
+
|
|
251
|
+
class ConversionAttribution(BaseModel):
|
|
252
|
+
"""ConversionAttribution type definition"""
|
|
253
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
254
|
+
|
|
255
|
+
agent_id: Union[int | None, Any] = Field(default=None)
|
|
256
|
+
agent_name: Union[str | None, Any] = Field(default=None)
|
|
257
|
+
department_id: Union[int | None, Any] = Field(default=None)
|
|
258
|
+
department_name: Union[str | None, Any] = Field(default=None)
|
|
259
|
+
chat_timestamp: Union[str | None, Any] = Field(default=None)
|
|
260
|
+
|
|
261
|
+
class MessageCount(BaseModel):
|
|
262
|
+
"""MessageCount type definition"""
|
|
263
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
264
|
+
|
|
265
|
+
total: Union[int | None, Any] = Field(default=None)
|
|
266
|
+
agent: Union[int | None, Any] = Field(default=None)
|
|
267
|
+
visitor: Union[int | None, Any] = Field(default=None)
|
|
268
|
+
|
|
269
|
+
class ResponseTime(BaseModel):
|
|
270
|
+
"""ResponseTime type definition"""
|
|
271
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
272
|
+
|
|
273
|
+
first: Union[int | None, Any] = Field(default=None)
|
|
274
|
+
avg: Union[float | None, Any] = Field(default=None)
|
|
275
|
+
max: Union[int | None, Any] = Field(default=None)
|
|
276
|
+
|
|
277
|
+
class Department(BaseModel):
|
|
278
|
+
"""Department type definition"""
|
|
279
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
280
|
+
|
|
281
|
+
id: Union[int, Any] = Field(default=None)
|
|
282
|
+
name: Union[str | None, Any] = Field(default=None)
|
|
283
|
+
description: Union[str | None, Any] = Field(default=None)
|
|
284
|
+
enabled: Union[bool | None, Any] = Field(default=None)
|
|
285
|
+
members: Union[list[int] | None, Any] = Field(default=None)
|
|
286
|
+
settings: Union[Any, Any] = Field(default=None)
|
|
287
|
+
|
|
288
|
+
class DepartmentSettings(BaseModel):
|
|
289
|
+
"""DepartmentSettings type definition"""
|
|
290
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
291
|
+
|
|
292
|
+
chat_limit: Union[int | None, Any] = Field(default=None)
|
|
293
|
+
|
|
294
|
+
class Goal(BaseModel):
|
|
295
|
+
"""Goal type definition"""
|
|
296
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
297
|
+
|
|
298
|
+
id: Union[int, Any] = Field(default=None)
|
|
299
|
+
name: Union[str | None, Any] = Field(default=None)
|
|
300
|
+
description: Union[str | None, Any] = Field(default=None)
|
|
301
|
+
enabled: Union[bool | None, Any] = Field(default=None)
|
|
302
|
+
attribution_model: Union[str | None, Any] = Field(default=None)
|
|
303
|
+
attribution_window: Union[int | None, Any] = Field(default=None)
|
|
304
|
+
attribution_period: Union[int | None, Any] = Field(default=None)
|
|
305
|
+
settings: Union[dict[str, Any] | None, Any] = Field(default=None)
|
|
306
|
+
|
|
307
|
+
class Role(BaseModel):
|
|
308
|
+
"""Role type definition"""
|
|
309
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
310
|
+
|
|
311
|
+
id: Union[int, Any] = Field(default=None)
|
|
312
|
+
name: Union[str | None, Any] = Field(default=None)
|
|
313
|
+
description: Union[str | None, Any] = Field(default=None)
|
|
314
|
+
enabled: Union[bool | None, Any] = Field(default=None)
|
|
315
|
+
permissions: Union[dict[str, Any] | None, Any] = Field(default=None)
|
|
316
|
+
members_count: Union[int | None, Any] = Field(default=None)
|
|
317
|
+
|
|
318
|
+
class RoutingSettings(BaseModel):
|
|
319
|
+
"""RoutingSettings type definition"""
|
|
320
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
321
|
+
|
|
322
|
+
routing_mode: Union[str | None, Any] = Field(default=None)
|
|
323
|
+
chat_limit: Union[dict[str, Any] | None, Any] = Field(default=None)
|
|
324
|
+
skill_routing: Union[dict[str, Any] | None, Any] = Field(default=None)
|
|
325
|
+
reassignment: Union[dict[str, Any] | None, Any] = Field(default=None)
|
|
326
|
+
auto_idle: Union[dict[str, Any] | None, Any] = Field(default=None)
|
|
327
|
+
auto_accept: Union[dict[str, Any] | None, Any] = Field(default=None)
|
|
328
|
+
|
|
329
|
+
class Shortcut(BaseModel):
|
|
330
|
+
"""Shortcut type definition"""
|
|
331
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
332
|
+
|
|
333
|
+
id: Union[str, Any] = Field(default=None)
|
|
334
|
+
name: Union[str | None, Any] = Field(default=None)
|
|
335
|
+
message: Union[str | None, Any] = Field(default=None)
|
|
336
|
+
options: Union[str | None, Any] = Field(default=None)
|
|
337
|
+
tags: Union[list[str] | None, Any] = Field(default=None)
|
|
338
|
+
departments: Union[list[int] | None, Any] = Field(default=None)
|
|
339
|
+
agents: Union[list[int] | None, Any] = Field(default=None)
|
|
340
|
+
scope: Union[str | None, Any] = Field(default=None)
|
|
341
|
+
|
|
342
|
+
class Skill(BaseModel):
|
|
343
|
+
"""Skill type definition"""
|
|
344
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
345
|
+
|
|
346
|
+
id: Union[int, Any] = Field(default=None)
|
|
347
|
+
name: Union[str | None, Any] = Field(default=None)
|
|
348
|
+
description: Union[str | None, Any] = Field(default=None)
|
|
349
|
+
enabled: Union[bool | None, Any] = Field(default=None)
|
|
350
|
+
members: Union[list[int] | None, Any] = Field(default=None)
|
|
351
|
+
|
|
352
|
+
class Trigger(BaseModel):
|
|
353
|
+
"""Trigger type definition"""
|
|
354
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
355
|
+
|
|
356
|
+
id: Union[int, Any] = Field(default=None)
|
|
357
|
+
name: Union[str | None, Any] = Field(default=None)
|
|
358
|
+
description: Union[str | None, Any] = Field(default=None)
|
|
359
|
+
enabled: Union[bool | None, Any] = Field(default=None)
|
|
360
|
+
run_once: Union[bool | None, Any] = Field(default=None)
|
|
361
|
+
conditions: Union[list[dict[str, Any]] | None, Any] = Field(default=None)
|
|
362
|
+
actions: Union[list[dict[str, Any]] | None, Any] = Field(default=None)
|
|
363
|
+
departments: Union[list[int] | None, Any] = Field(default=None)
|
|
364
|
+
definition: Union[dict[str, Any] | None, Any] = Field(default=None)
|
|
365
|
+
|
|
366
|
+
# ===== METADATA TYPE DEFINITIONS (PYDANTIC) =====
|
|
367
|
+
# Meta types for operations that extract metadata (e.g., pagination info)
|
|
368
|
+
|
|
369
|
+
class AgentTimelineListResultMeta(BaseModel):
|
|
370
|
+
"""Metadata for agent_timeline.Action.LIST operation"""
|
|
371
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
372
|
+
|
|
373
|
+
next_page: Union[str | None, Any] = Field(default=None)
|
|
374
|
+
count: Union[int, Any] = Field(default=None)
|
|
375
|
+
|
|
376
|
+
class ChatsListResultMeta(BaseModel):
|
|
377
|
+
"""Metadata for chats.Action.LIST operation"""
|
|
378
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
379
|
+
|
|
380
|
+
next_page: Union[str | None, Any] = Field(default=None)
|
|
381
|
+
count: Union[int, Any] = Field(default=None)
|
|
382
|
+
|
|
383
|
+
# ===== RESPONSE ENVELOPE MODELS =====
|
|
384
|
+
|
|
385
|
+
# Type variables for generic envelope models
|
|
386
|
+
T = TypeVar('T')
|
|
387
|
+
S = TypeVar('S')
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
class ZendeskChatExecuteResult(BaseModel, Generic[T]):
|
|
391
|
+
"""Response envelope with data only.
|
|
392
|
+
|
|
393
|
+
Used for actions that return data without metadata.
|
|
394
|
+
"""
|
|
395
|
+
model_config = ConfigDict(extra="forbid")
|
|
396
|
+
|
|
397
|
+
data: T
|
|
398
|
+
"""Response data containing the result of the action."""
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
class ZendeskChatExecuteResultWithMeta(ZendeskChatExecuteResult[T], Generic[T, S]):
|
|
402
|
+
"""Response envelope with data and metadata.
|
|
403
|
+
|
|
404
|
+
Used for actions that return both data and metadata (e.g., pagination info).
|
|
405
|
+
"""
|
|
406
|
+
meta: S
|
|
407
|
+
"""Metadata about the response (e.g., pagination cursors, record counts)."""
|
|
408
|
+
|
|
409
|
+
# ===== SEARCH DATA MODELS =====
|
|
410
|
+
# Entity-specific Pydantic models for search result data
|
|
411
|
+
|
|
412
|
+
# Type variable for search data generic
|
|
413
|
+
D = TypeVar('D')
|
|
414
|
+
|
|
415
|
+
class AgentsSearchData(BaseModel):
|
|
416
|
+
"""Search result data for agents entity."""
|
|
417
|
+
model_config = ConfigDict(extra="allow")
|
|
418
|
+
|
|
419
|
+
id: int = None
|
|
420
|
+
"""Unique agent identifier"""
|
|
421
|
+
email: str | None = None
|
|
422
|
+
"""Agent email address"""
|
|
423
|
+
display_name: str | None = None
|
|
424
|
+
"""Agent display name"""
|
|
425
|
+
first_name: str | None = None
|
|
426
|
+
"""Agent first name"""
|
|
427
|
+
last_name: str | None = None
|
|
428
|
+
"""Agent last name"""
|
|
429
|
+
enabled: bool | None = None
|
|
430
|
+
"""Whether agent is enabled"""
|
|
431
|
+
role_id: int | None = None
|
|
432
|
+
"""Agent role ID"""
|
|
433
|
+
departments: list[Any] | None = None
|
|
434
|
+
"""Department IDs agent belongs to"""
|
|
435
|
+
create_date: str | None = None
|
|
436
|
+
"""When agent was created"""
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
class ChatsSearchData(BaseModel):
|
|
440
|
+
"""Search result data for chats entity."""
|
|
441
|
+
model_config = ConfigDict(extra="allow")
|
|
442
|
+
|
|
443
|
+
id: str = None
|
|
444
|
+
"""Unique chat identifier"""
|
|
445
|
+
timestamp: str | None = None
|
|
446
|
+
"""Chat start timestamp"""
|
|
447
|
+
update_timestamp: str | None = None
|
|
448
|
+
"""Last update timestamp"""
|
|
449
|
+
department_id: int | None = None
|
|
450
|
+
"""Department ID"""
|
|
451
|
+
department_name: str | None = None
|
|
452
|
+
"""Department name"""
|
|
453
|
+
duration: int | None = None
|
|
454
|
+
"""Chat duration in seconds"""
|
|
455
|
+
rating: str | None = None
|
|
456
|
+
"""Satisfaction rating"""
|
|
457
|
+
missed: bool | None = None
|
|
458
|
+
"""Whether chat was missed"""
|
|
459
|
+
agent_ids: list[Any] | None = None
|
|
460
|
+
"""IDs of agents in chat"""
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
class DepartmentsSearchData(BaseModel):
|
|
464
|
+
"""Search result data for departments entity."""
|
|
465
|
+
model_config = ConfigDict(extra="allow")
|
|
466
|
+
|
|
467
|
+
id: int = None
|
|
468
|
+
"""Department ID"""
|
|
469
|
+
name: str | None = None
|
|
470
|
+
"""Department name"""
|
|
471
|
+
enabled: bool | None = None
|
|
472
|
+
"""Whether department is enabled"""
|
|
473
|
+
members: list[Any] | None = None
|
|
474
|
+
"""Agent IDs in department"""
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
class ShortcutsSearchData(BaseModel):
|
|
478
|
+
"""Search result data for shortcuts entity."""
|
|
479
|
+
model_config = ConfigDict(extra="allow")
|
|
480
|
+
|
|
481
|
+
id: int = None
|
|
482
|
+
"""Shortcut ID"""
|
|
483
|
+
name: str | None = None
|
|
484
|
+
"""Shortcut name/trigger"""
|
|
485
|
+
message: str | None = None
|
|
486
|
+
"""Shortcut message content"""
|
|
487
|
+
tags: list[Any] | None = None
|
|
488
|
+
"""Tags applied when shortcut is used"""
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
class TriggersSearchData(BaseModel):
|
|
492
|
+
"""Search result data for triggers entity."""
|
|
493
|
+
model_config = ConfigDict(extra="allow")
|
|
494
|
+
|
|
495
|
+
id: int = None
|
|
496
|
+
"""Trigger ID"""
|
|
497
|
+
name: str | None = None
|
|
498
|
+
"""Trigger name"""
|
|
499
|
+
enabled: bool | None = None
|
|
500
|
+
"""Whether trigger is enabled"""
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
# ===== GENERIC SEARCH RESULT TYPES =====
|
|
504
|
+
|
|
505
|
+
class AirbyteSearchHit(BaseModel, Generic[D]):
|
|
506
|
+
"""A single search result with typed data."""
|
|
507
|
+
model_config = ConfigDict(extra="allow")
|
|
508
|
+
|
|
509
|
+
id: str | None = None
|
|
510
|
+
"""Unique identifier for the record."""
|
|
511
|
+
score: float | None = None
|
|
512
|
+
"""Relevance score for the match."""
|
|
513
|
+
data: D
|
|
514
|
+
"""The matched record data."""
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
class AirbyteSearchResult(BaseModel, Generic[D]):
|
|
518
|
+
"""Result from Airbyte cache search operations with typed hits."""
|
|
519
|
+
model_config = ConfigDict(extra="allow")
|
|
520
|
+
|
|
521
|
+
hits: list[AirbyteSearchHit[D]] = Field(default_factory=list)
|
|
522
|
+
"""List of matching records."""
|
|
523
|
+
next_cursor: str | None = None
|
|
524
|
+
"""Cursor for fetching the next page of results."""
|
|
525
|
+
took_ms: int | None = None
|
|
526
|
+
"""Time taken to execute the search in milliseconds."""
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
# ===== ENTITY-SPECIFIC SEARCH RESULT TYPE ALIASES =====
|
|
530
|
+
|
|
531
|
+
AgentsSearchResult = AirbyteSearchResult[AgentsSearchData]
|
|
532
|
+
"""Search result type for agents entity."""
|
|
533
|
+
|
|
534
|
+
ChatsSearchResult = AirbyteSearchResult[ChatsSearchData]
|
|
535
|
+
"""Search result type for chats entity."""
|
|
536
|
+
|
|
537
|
+
DepartmentsSearchResult = AirbyteSearchResult[DepartmentsSearchData]
|
|
538
|
+
"""Search result type for departments entity."""
|
|
539
|
+
|
|
540
|
+
ShortcutsSearchResult = AirbyteSearchResult[ShortcutsSearchData]
|
|
541
|
+
"""Search result type for shortcuts entity."""
|
|
542
|
+
|
|
543
|
+
TriggersSearchResult = AirbyteSearchResult[TriggersSearchData]
|
|
544
|
+
"""Search result type for triggers entity."""
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
# ===== OPERATION RESULT TYPE ALIASES =====
|
|
549
|
+
|
|
550
|
+
# Concrete type aliases for each operation result.
|
|
551
|
+
# These provide simpler, more readable type annotations than using the generic forms.
|
|
552
|
+
|
|
553
|
+
AgentsListResult = ZendeskChatExecuteResult[list[Agent]]
|
|
554
|
+
"""Result type for agents.list operation."""
|
|
555
|
+
|
|
556
|
+
AgentTimelineListResult = ZendeskChatExecuteResultWithMeta[list[AgentTimeline], AgentTimelineListResultMeta]
|
|
557
|
+
"""Result type for agent_timeline.list operation with data and metadata."""
|
|
558
|
+
|
|
559
|
+
BansListResult = ZendeskChatExecuteResult[dict[str, Any]]
|
|
560
|
+
"""Result type for bans.list operation."""
|
|
561
|
+
|
|
562
|
+
ChatsListResult = ZendeskChatExecuteResultWithMeta[list[Chat], ChatsListResultMeta]
|
|
563
|
+
"""Result type for chats.list operation with data and metadata."""
|
|
564
|
+
|
|
565
|
+
DepartmentsListResult = ZendeskChatExecuteResult[list[Department]]
|
|
566
|
+
"""Result type for departments.list operation."""
|
|
567
|
+
|
|
568
|
+
GoalsListResult = ZendeskChatExecuteResult[list[Goal]]
|
|
569
|
+
"""Result type for goals.list operation."""
|
|
570
|
+
|
|
571
|
+
RolesListResult = ZendeskChatExecuteResult[list[Role]]
|
|
572
|
+
"""Result type for roles.list operation."""
|
|
573
|
+
|
|
574
|
+
ShortcutsListResult = ZendeskChatExecuteResult[list[Shortcut]]
|
|
575
|
+
"""Result type for shortcuts.list operation."""
|
|
576
|
+
|
|
577
|
+
SkillsListResult = ZendeskChatExecuteResult[list[Skill]]
|
|
578
|
+
"""Result type for skills.list operation."""
|
|
579
|
+
|
|
580
|
+
TriggersListResult = ZendeskChatExecuteResult[list[Trigger]]
|
|
581
|
+
"""Result type for triggers.list operation."""
|
|
582
|
+
|