airbyte-agent-zendesk-support 0.18.39__py3-none-any.whl → 0.18.51__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_support/__init__.py +239 -18
- airbyte_agent_zendesk_support/_vendored/connector_sdk/connector_model_loader.py +3 -2
- airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/local_executor.py +181 -30
- airbyte_agent_zendesk_support/_vendored/connector_sdk/http_client.py +13 -6
- airbyte_agent_zendesk_support/_vendored/connector_sdk/logging/logger.py +10 -1
- airbyte_agent_zendesk_support/_vendored/connector_sdk/logging/types.py +1 -0
- airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/base.py +4 -1
- airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/connector.py +22 -33
- airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/extensions.py +122 -1
- airbyte_agent_zendesk_support/_vendored/connector_sdk/validation.py +12 -6
- airbyte_agent_zendesk_support/connector.py +1073 -157
- airbyte_agent_zendesk_support/connector_model.py +3 -3
- airbyte_agent_zendesk_support/models.py +628 -69
- airbyte_agent_zendesk_support/types.py +3716 -0
- {airbyte_agent_zendesk_support-0.18.39.dist-info → airbyte_agent_zendesk_support-0.18.51.dist-info}/METADATA +12 -9
- {airbyte_agent_zendesk_support-0.18.39.dist-info → airbyte_agent_zendesk_support-0.18.51.dist-info}/RECORD +17 -17
- {airbyte_agent_zendesk_support-0.18.39.dist-info → airbyte_agent_zendesk_support-0.18.51.dist-info}/WHEEL +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"""
|
|
2
|
-
|
|
2
|
+
Zendesk-Support connector.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
@@ -53,6 +53,31 @@ from .types import (
|
|
|
53
53
|
UsersListParams,
|
|
54
54
|
ViewsGetParams,
|
|
55
55
|
ViewsListParams,
|
|
56
|
+
AirbyteSearchParams,
|
|
57
|
+
BrandsSearchFilter,
|
|
58
|
+
BrandsSearchQuery,
|
|
59
|
+
GroupsSearchFilter,
|
|
60
|
+
GroupsSearchQuery,
|
|
61
|
+
OrganizationsSearchFilter,
|
|
62
|
+
OrganizationsSearchQuery,
|
|
63
|
+
SatisfactionRatingsSearchFilter,
|
|
64
|
+
SatisfactionRatingsSearchQuery,
|
|
65
|
+
TagsSearchFilter,
|
|
66
|
+
TagsSearchQuery,
|
|
67
|
+
TicketAuditsSearchFilter,
|
|
68
|
+
TicketAuditsSearchQuery,
|
|
69
|
+
TicketCommentsSearchFilter,
|
|
70
|
+
TicketCommentsSearchQuery,
|
|
71
|
+
TicketFieldsSearchFilter,
|
|
72
|
+
TicketFieldsSearchQuery,
|
|
73
|
+
TicketFormsSearchFilter,
|
|
74
|
+
TicketFormsSearchQuery,
|
|
75
|
+
TicketMetricsSearchFilter,
|
|
76
|
+
TicketMetricsSearchQuery,
|
|
77
|
+
TicketsSearchFilter,
|
|
78
|
+
TicketsSearchQuery,
|
|
79
|
+
UsersSearchFilter,
|
|
80
|
+
UsersSearchQuery,
|
|
56
81
|
)
|
|
57
82
|
if TYPE_CHECKING:
|
|
58
83
|
from .models import ZendeskSupportAuthConfig
|
|
@@ -63,49 +88,82 @@ from .models import (
|
|
|
63
88
|
ZendeskSupportExecuteResult,
|
|
64
89
|
ZendeskSupportExecuteResultWithMeta,
|
|
65
90
|
TicketsListResult,
|
|
66
|
-
TicketsGetResult,
|
|
67
91
|
UsersListResult,
|
|
68
|
-
UsersGetResult,
|
|
69
92
|
OrganizationsListResult,
|
|
70
|
-
OrganizationsGetResult,
|
|
71
93
|
GroupsListResult,
|
|
72
|
-
GroupsGetResult,
|
|
73
94
|
TicketCommentsListResult,
|
|
74
|
-
AttachmentsGetResult,
|
|
75
95
|
TicketAuditsListResult,
|
|
76
96
|
TicketAuditsListResult,
|
|
77
97
|
TicketMetricsListResult,
|
|
78
98
|
TicketFieldsListResult,
|
|
79
|
-
TicketFieldsGetResult,
|
|
80
99
|
BrandsListResult,
|
|
81
|
-
BrandsGetResult,
|
|
82
100
|
ViewsListResult,
|
|
83
|
-
ViewsGetResult,
|
|
84
101
|
MacrosListResult,
|
|
85
|
-
MacrosGetResult,
|
|
86
102
|
TriggersListResult,
|
|
87
|
-
TriggersGetResult,
|
|
88
103
|
AutomationsListResult,
|
|
89
|
-
AutomationsGetResult,
|
|
90
104
|
TagsListResult,
|
|
91
105
|
SatisfactionRatingsListResult,
|
|
92
|
-
SatisfactionRatingsGetResult,
|
|
93
106
|
GroupMembershipsListResult,
|
|
94
107
|
OrganizationMembershipsListResult,
|
|
95
108
|
SlaPoliciesListResult,
|
|
96
|
-
SlaPoliciesGetResult,
|
|
97
109
|
TicketFormsListResult,
|
|
98
|
-
TicketFormsGetResult,
|
|
99
110
|
ArticlesListResult,
|
|
100
|
-
ArticlesGetResult,
|
|
101
111
|
ArticleAttachmentsListResult,
|
|
102
|
-
|
|
112
|
+
Article,
|
|
113
|
+
ArticleAttachment,
|
|
114
|
+
Attachment,
|
|
115
|
+
Automation,
|
|
116
|
+
Brand,
|
|
117
|
+
Group,
|
|
118
|
+
GroupMembership,
|
|
119
|
+
Macro,
|
|
120
|
+
Organization,
|
|
121
|
+
OrganizationMembership,
|
|
122
|
+
SLAPolicy,
|
|
123
|
+
SatisfactionRating,
|
|
124
|
+
Tag,
|
|
125
|
+
Ticket,
|
|
126
|
+
TicketAudit,
|
|
127
|
+
TicketComment,
|
|
128
|
+
TicketField,
|
|
129
|
+
TicketForm,
|
|
130
|
+
TicketMetric,
|
|
131
|
+
Trigger,
|
|
132
|
+
User,
|
|
133
|
+
View,
|
|
134
|
+
AirbyteSearchHit,
|
|
135
|
+
AirbyteSearchResult,
|
|
136
|
+
BrandsSearchData,
|
|
137
|
+
BrandsSearchResult,
|
|
138
|
+
GroupsSearchData,
|
|
139
|
+
GroupsSearchResult,
|
|
140
|
+
OrganizationsSearchData,
|
|
141
|
+
OrganizationsSearchResult,
|
|
142
|
+
SatisfactionRatingsSearchData,
|
|
143
|
+
SatisfactionRatingsSearchResult,
|
|
144
|
+
TagsSearchData,
|
|
145
|
+
TagsSearchResult,
|
|
146
|
+
TicketAuditsSearchData,
|
|
147
|
+
TicketAuditsSearchResult,
|
|
148
|
+
TicketCommentsSearchData,
|
|
149
|
+
TicketCommentsSearchResult,
|
|
150
|
+
TicketFieldsSearchData,
|
|
151
|
+
TicketFieldsSearchResult,
|
|
152
|
+
TicketFormsSearchData,
|
|
153
|
+
TicketFormsSearchResult,
|
|
154
|
+
TicketMetricsSearchData,
|
|
155
|
+
TicketMetricsSearchResult,
|
|
156
|
+
TicketsSearchData,
|
|
157
|
+
TicketsSearchResult,
|
|
158
|
+
UsersSearchData,
|
|
159
|
+
UsersSearchResult,
|
|
103
160
|
)
|
|
104
161
|
|
|
105
162
|
# TypeVar for decorator type preservation
|
|
106
163
|
_F = TypeVar("_F", bound=Callable[..., Any])
|
|
107
164
|
|
|
108
165
|
|
|
166
|
+
|
|
109
167
|
class ZendeskSupportConnector:
|
|
110
168
|
"""
|
|
111
169
|
Type-safe Zendesk-Support API connector.
|
|
@@ -114,51 +172,51 @@ class ZendeskSupportConnector:
|
|
|
114
172
|
"""
|
|
115
173
|
|
|
116
174
|
connector_name = "zendesk-support"
|
|
117
|
-
connector_version = "0.1.
|
|
175
|
+
connector_version = "0.1.6"
|
|
118
176
|
vendored_sdk_version = "0.1.0" # Version of vendored connector-sdk
|
|
119
177
|
|
|
120
|
-
# Map of (entity, action) ->
|
|
121
|
-
|
|
178
|
+
# Map of (entity, action) -> needs_envelope for envelope wrapping decision
|
|
179
|
+
_ENVELOPE_MAP = {
|
|
122
180
|
("tickets", "list"): True,
|
|
123
|
-
("tickets", "get"):
|
|
181
|
+
("tickets", "get"): None,
|
|
124
182
|
("users", "list"): True,
|
|
125
|
-
("users", "get"):
|
|
183
|
+
("users", "get"): None,
|
|
126
184
|
("organizations", "list"): True,
|
|
127
|
-
("organizations", "get"):
|
|
185
|
+
("organizations", "get"): None,
|
|
128
186
|
("groups", "list"): True,
|
|
129
|
-
("groups", "get"):
|
|
187
|
+
("groups", "get"): None,
|
|
130
188
|
("ticket_comments", "list"): True,
|
|
131
|
-
("attachments", "get"):
|
|
132
|
-
("attachments", "download"):
|
|
189
|
+
("attachments", "get"): None,
|
|
190
|
+
("attachments", "download"): None,
|
|
133
191
|
("ticket_audits", "list"): True,
|
|
134
192
|
("ticket_audits", "list"): True,
|
|
135
193
|
("ticket_metrics", "list"): True,
|
|
136
194
|
("ticket_fields", "list"): True,
|
|
137
|
-
("ticket_fields", "get"):
|
|
195
|
+
("ticket_fields", "get"): None,
|
|
138
196
|
("brands", "list"): True,
|
|
139
|
-
("brands", "get"):
|
|
197
|
+
("brands", "get"): None,
|
|
140
198
|
("views", "list"): True,
|
|
141
|
-
("views", "get"):
|
|
199
|
+
("views", "get"): None,
|
|
142
200
|
("macros", "list"): True,
|
|
143
|
-
("macros", "get"):
|
|
201
|
+
("macros", "get"): None,
|
|
144
202
|
("triggers", "list"): True,
|
|
145
|
-
("triggers", "get"):
|
|
203
|
+
("triggers", "get"): None,
|
|
146
204
|
("automations", "list"): True,
|
|
147
|
-
("automations", "get"):
|
|
205
|
+
("automations", "get"): None,
|
|
148
206
|
("tags", "list"): True,
|
|
149
207
|
("satisfaction_ratings", "list"): True,
|
|
150
|
-
("satisfaction_ratings", "get"):
|
|
208
|
+
("satisfaction_ratings", "get"): None,
|
|
151
209
|
("group_memberships", "list"): True,
|
|
152
210
|
("organization_memberships", "list"): True,
|
|
153
211
|
("sla_policies", "list"): True,
|
|
154
|
-
("sla_policies", "get"):
|
|
212
|
+
("sla_policies", "get"): None,
|
|
155
213
|
("ticket_forms", "list"): True,
|
|
156
|
-
("ticket_forms", "get"):
|
|
214
|
+
("ticket_forms", "get"): None,
|
|
157
215
|
("articles", "list"): True,
|
|
158
|
-
("articles", "get"):
|
|
216
|
+
("articles", "get"): None,
|
|
159
217
|
("article_attachments", "list"): True,
|
|
160
|
-
("article_attachments", "get"):
|
|
161
|
-
("article_attachments", "download"):
|
|
218
|
+
("article_attachments", "get"): None,
|
|
219
|
+
("article_attachments", "download"): None,
|
|
162
220
|
}
|
|
163
221
|
|
|
164
222
|
# Map of (entity, action) -> {python_param_name: api_param_name}
|
|
@@ -335,7 +393,7 @@ class ZendeskSupportConnector:
|
|
|
335
393
|
entity: Literal["tickets"],
|
|
336
394
|
action: Literal["get"],
|
|
337
395
|
params: "TicketsGetParams"
|
|
338
|
-
) -> "
|
|
396
|
+
) -> "Ticket": ...
|
|
339
397
|
|
|
340
398
|
@overload
|
|
341
399
|
async def execute(
|
|
@@ -351,7 +409,7 @@ class ZendeskSupportConnector:
|
|
|
351
409
|
entity: Literal["users"],
|
|
352
410
|
action: Literal["get"],
|
|
353
411
|
params: "UsersGetParams"
|
|
354
|
-
) -> "
|
|
412
|
+
) -> "User": ...
|
|
355
413
|
|
|
356
414
|
@overload
|
|
357
415
|
async def execute(
|
|
@@ -367,7 +425,7 @@ class ZendeskSupportConnector:
|
|
|
367
425
|
entity: Literal["organizations"],
|
|
368
426
|
action: Literal["get"],
|
|
369
427
|
params: "OrganizationsGetParams"
|
|
370
|
-
) -> "
|
|
428
|
+
) -> "Organization": ...
|
|
371
429
|
|
|
372
430
|
@overload
|
|
373
431
|
async def execute(
|
|
@@ -383,7 +441,7 @@ class ZendeskSupportConnector:
|
|
|
383
441
|
entity: Literal["groups"],
|
|
384
442
|
action: Literal["get"],
|
|
385
443
|
params: "GroupsGetParams"
|
|
386
|
-
) -> "
|
|
444
|
+
) -> "Group": ...
|
|
387
445
|
|
|
388
446
|
@overload
|
|
389
447
|
async def execute(
|
|
@@ -399,7 +457,7 @@ class ZendeskSupportConnector:
|
|
|
399
457
|
entity: Literal["attachments"],
|
|
400
458
|
action: Literal["get"],
|
|
401
459
|
params: "AttachmentsGetParams"
|
|
402
|
-
) -> "
|
|
460
|
+
) -> "Attachment": ...
|
|
403
461
|
|
|
404
462
|
@overload
|
|
405
463
|
async def execute(
|
|
@@ -447,7 +505,7 @@ class ZendeskSupportConnector:
|
|
|
447
505
|
entity: Literal["ticket_fields"],
|
|
448
506
|
action: Literal["get"],
|
|
449
507
|
params: "TicketFieldsGetParams"
|
|
450
|
-
) -> "
|
|
508
|
+
) -> "TicketField": ...
|
|
451
509
|
|
|
452
510
|
@overload
|
|
453
511
|
async def execute(
|
|
@@ -463,7 +521,7 @@ class ZendeskSupportConnector:
|
|
|
463
521
|
entity: Literal["brands"],
|
|
464
522
|
action: Literal["get"],
|
|
465
523
|
params: "BrandsGetParams"
|
|
466
|
-
) -> "
|
|
524
|
+
) -> "Brand": ...
|
|
467
525
|
|
|
468
526
|
@overload
|
|
469
527
|
async def execute(
|
|
@@ -479,7 +537,7 @@ class ZendeskSupportConnector:
|
|
|
479
537
|
entity: Literal["views"],
|
|
480
538
|
action: Literal["get"],
|
|
481
539
|
params: "ViewsGetParams"
|
|
482
|
-
) -> "
|
|
540
|
+
) -> "View": ...
|
|
483
541
|
|
|
484
542
|
@overload
|
|
485
543
|
async def execute(
|
|
@@ -495,7 +553,7 @@ class ZendeskSupportConnector:
|
|
|
495
553
|
entity: Literal["macros"],
|
|
496
554
|
action: Literal["get"],
|
|
497
555
|
params: "MacrosGetParams"
|
|
498
|
-
) -> "
|
|
556
|
+
) -> "Macro": ...
|
|
499
557
|
|
|
500
558
|
@overload
|
|
501
559
|
async def execute(
|
|
@@ -511,7 +569,7 @@ class ZendeskSupportConnector:
|
|
|
511
569
|
entity: Literal["triggers"],
|
|
512
570
|
action: Literal["get"],
|
|
513
571
|
params: "TriggersGetParams"
|
|
514
|
-
) -> "
|
|
572
|
+
) -> "Trigger": ...
|
|
515
573
|
|
|
516
574
|
@overload
|
|
517
575
|
async def execute(
|
|
@@ -527,7 +585,7 @@ class ZendeskSupportConnector:
|
|
|
527
585
|
entity: Literal["automations"],
|
|
528
586
|
action: Literal["get"],
|
|
529
587
|
params: "AutomationsGetParams"
|
|
530
|
-
) -> "
|
|
588
|
+
) -> "Automation": ...
|
|
531
589
|
|
|
532
590
|
@overload
|
|
533
591
|
async def execute(
|
|
@@ -551,7 +609,7 @@ class ZendeskSupportConnector:
|
|
|
551
609
|
entity: Literal["satisfaction_ratings"],
|
|
552
610
|
action: Literal["get"],
|
|
553
611
|
params: "SatisfactionRatingsGetParams"
|
|
554
|
-
) -> "
|
|
612
|
+
) -> "SatisfactionRating": ...
|
|
555
613
|
|
|
556
614
|
@overload
|
|
557
615
|
async def execute(
|
|
@@ -583,7 +641,7 @@ class ZendeskSupportConnector:
|
|
|
583
641
|
entity: Literal["sla_policies"],
|
|
584
642
|
action: Literal["get"],
|
|
585
643
|
params: "SlaPoliciesGetParams"
|
|
586
|
-
) -> "
|
|
644
|
+
) -> "SLAPolicy": ...
|
|
587
645
|
|
|
588
646
|
@overload
|
|
589
647
|
async def execute(
|
|
@@ -599,7 +657,7 @@ class ZendeskSupportConnector:
|
|
|
599
657
|
entity: Literal["ticket_forms"],
|
|
600
658
|
action: Literal["get"],
|
|
601
659
|
params: "TicketFormsGetParams"
|
|
602
|
-
) -> "
|
|
660
|
+
) -> "TicketForm": ...
|
|
603
661
|
|
|
604
662
|
@overload
|
|
605
663
|
async def execute(
|
|
@@ -615,7 +673,7 @@ class ZendeskSupportConnector:
|
|
|
615
673
|
entity: Literal["articles"],
|
|
616
674
|
action: Literal["get"],
|
|
617
675
|
params: "ArticlesGetParams"
|
|
618
|
-
) -> "
|
|
676
|
+
) -> "Article": ...
|
|
619
677
|
|
|
620
678
|
@overload
|
|
621
679
|
async def execute(
|
|
@@ -631,7 +689,7 @@ class ZendeskSupportConnector:
|
|
|
631
689
|
entity: Literal["article_attachments"],
|
|
632
690
|
action: Literal["get"],
|
|
633
691
|
params: "ArticleAttachmentsGetParams"
|
|
634
|
-
) -> "
|
|
692
|
+
) -> "ArticleAttachment": ...
|
|
635
693
|
|
|
636
694
|
@overload
|
|
637
695
|
async def execute(
|
|
@@ -700,7 +758,7 @@ class ZendeskSupportConnector:
|
|
|
700
758
|
raise RuntimeError(f"Execution failed: {result.error}")
|
|
701
759
|
|
|
702
760
|
# Check if this operation has extractors configured
|
|
703
|
-
has_extractors = self.
|
|
761
|
+
has_extractors = self._ENVELOPE_MAP.get((entity, action), False)
|
|
704
762
|
|
|
705
763
|
if has_extractors:
|
|
706
764
|
# With extractors - return Pydantic envelope with data and meta
|
|
@@ -838,7 +896,8 @@ class TicketsQuery:
|
|
|
838
896
|
# Cast generic envelope to concrete typed result
|
|
839
897
|
return TicketsListResult(
|
|
840
898
|
data=result.data,
|
|
841
|
-
meta=result.meta
|
|
899
|
+
meta=result.meta
|
|
900
|
+
)
|
|
842
901
|
|
|
843
902
|
|
|
844
903
|
|
|
@@ -846,7 +905,7 @@ class TicketsQuery:
|
|
|
846
905
|
self,
|
|
847
906
|
ticket_id: str,
|
|
848
907
|
**kwargs
|
|
849
|
-
) ->
|
|
908
|
+
) -> Ticket:
|
|
850
909
|
"""
|
|
851
910
|
Returns a ticket by its ID
|
|
852
911
|
|
|
@@ -855,7 +914,7 @@ class TicketsQuery:
|
|
|
855
914
|
**kwargs: Additional parameters
|
|
856
915
|
|
|
857
916
|
Returns:
|
|
858
|
-
|
|
917
|
+
Ticket
|
|
859
918
|
"""
|
|
860
919
|
params = {k: v for k, v in {
|
|
861
920
|
"ticket_id": ticket_id,
|
|
@@ -863,11 +922,102 @@ class TicketsQuery:
|
|
|
863
922
|
}.items() if v is not None}
|
|
864
923
|
|
|
865
924
|
result = await self._connector.execute("tickets", "get", params)
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
925
|
+
return result
|
|
926
|
+
|
|
927
|
+
|
|
869
928
|
|
|
929
|
+
async def search(
|
|
930
|
+
self,
|
|
931
|
+
query: TicketsSearchQuery,
|
|
932
|
+
limit: int | None = None,
|
|
933
|
+
cursor: str | None = None,
|
|
934
|
+
fields: list[list[str]] | None = None,
|
|
935
|
+
) -> TicketsSearchResult:
|
|
936
|
+
"""
|
|
937
|
+
Search tickets records from Airbyte cache.
|
|
938
|
+
|
|
939
|
+
This operation searches cached data from Airbyte syncs.
|
|
940
|
+
Only available in hosted execution mode.
|
|
941
|
+
|
|
942
|
+
Available filter fields (TicketsSearchFilter):
|
|
943
|
+
- allow_attachments: Boolean indicating whether attachments are allowed on the ticket
|
|
944
|
+
- allow_channelback: Boolean indicating whether agents can reply to the ticket through the original channel
|
|
945
|
+
- assignee_id: Unique identifier of the agent currently assigned to the ticket
|
|
946
|
+
- brand_id: Unique identifier of the brand associated with the ticket in multi-brand accounts
|
|
947
|
+
- collaborator_ids: Array of user identifiers who are collaborating on the ticket
|
|
948
|
+
- created_at: Timestamp indicating when the ticket was created
|
|
949
|
+
- custom_fields: Array of custom field values specific to the account's ticket configuration
|
|
950
|
+
- custom_status_id: Unique identifier of the custom status applied to the ticket
|
|
951
|
+
- deleted_ticket_form_id: Unique identifier of the ticket form if it was deleted after the ticket was created
|
|
952
|
+
- description: Initial description or content of the ticket when it was created
|
|
953
|
+
- due_at: Timestamp indicating when the ticket is due for completion or resolution
|
|
954
|
+
- email_cc_ids: Array of user identifiers who are CC'd on ticket email notifications
|
|
955
|
+
- external_id: External identifier for the ticket, used for integrations with other systems
|
|
956
|
+
- fields: Array of ticket field values including both system and custom fields
|
|
957
|
+
- follower_ids: Array of user identifiers who are following the ticket for updates
|
|
958
|
+
- followup_ids: Array of identifiers for follow-up tickets related to this ticket
|
|
959
|
+
- forum_topic_id: Unique identifier linking the ticket to a forum topic if applicable
|
|
960
|
+
- from_messaging_channel: Boolean indicating whether the ticket originated from a messaging channel
|
|
961
|
+
- generated_timestamp: Timestamp updated for all ticket updates including system changes, used for incremental export co...
|
|
962
|
+
- group_id: Unique identifier of the agent group assigned to handle the ticket
|
|
963
|
+
- has_incidents: Boolean indicating whether this problem ticket has related incident tickets
|
|
964
|
+
- id: Unique identifier for the ticket
|
|
965
|
+
- is_public: Boolean indicating whether the ticket is publicly visible
|
|
966
|
+
- organization_id: Unique identifier of the organization associated with the ticket
|
|
967
|
+
- priority: Priority level assigned to the ticket (e.g., urgent, high, normal, low)
|
|
968
|
+
- problem_id: Unique identifier of the problem ticket if this is an incident ticket
|
|
969
|
+
- raw_subject: Original unprocessed subject line before any system modifications
|
|
970
|
+
- recipient: Email address or identifier of the ticket recipient
|
|
971
|
+
- requester_id: Unique identifier of the user who requested or created the ticket
|
|
972
|
+
- satisfaction_rating: Object containing customer satisfaction rating data for the ticket
|
|
973
|
+
- sharing_agreement_ids: Array of sharing agreement identifiers if the ticket is shared across Zendesk instances
|
|
974
|
+
- status: Current status of the ticket (e.g., new, open, pending, solved, closed)
|
|
975
|
+
- subject: Subject line of the ticket describing the issue or request
|
|
976
|
+
- submitter_id: Unique identifier of the user who submitted the ticket on behalf of the requester
|
|
977
|
+
- tags: Array of tags applied to the ticket for categorization and filtering
|
|
978
|
+
- ticket_form_id: Unique identifier of the ticket form used when creating the ticket
|
|
979
|
+
- type: Type of ticket (e.g., problem, incident, question, task)
|
|
980
|
+
- updated_at: Timestamp indicating when the ticket was last updated with a ticket event
|
|
981
|
+
- url: API URL to access the full ticket resource
|
|
982
|
+
- via: Object describing the channel and method through which the ticket was created
|
|
870
983
|
|
|
984
|
+
Args:
|
|
985
|
+
query: Filter and sort conditions. Supports operators like eq, neq, gt, gte, lt, lte,
|
|
986
|
+
in, like, fuzzy, keyword, not, and, or. Example: {"filter": {"eq": {"status": "active"}}}
|
|
987
|
+
limit: Maximum results to return (default 1000)
|
|
988
|
+
cursor: Pagination cursor from previous response's next_cursor
|
|
989
|
+
fields: Field paths to include in results. Each path is a list of keys for nested access.
|
|
990
|
+
Example: [["id"], ["user", "name"]] returns id and user.name fields.
|
|
991
|
+
|
|
992
|
+
Returns:
|
|
993
|
+
TicketsSearchResult with hits (list of AirbyteSearchHit[TicketsSearchData]) and pagination info
|
|
994
|
+
|
|
995
|
+
Raises:
|
|
996
|
+
NotImplementedError: If called in local execution mode
|
|
997
|
+
"""
|
|
998
|
+
params: dict[str, Any] = {"query": query}
|
|
999
|
+
if limit is not None:
|
|
1000
|
+
params["limit"] = limit
|
|
1001
|
+
if cursor is not None:
|
|
1002
|
+
params["cursor"] = cursor
|
|
1003
|
+
if fields is not None:
|
|
1004
|
+
params["fields"] = fields
|
|
1005
|
+
|
|
1006
|
+
result = await self._connector.execute("tickets", "search", params)
|
|
1007
|
+
|
|
1008
|
+
# Parse response into typed result
|
|
1009
|
+
return TicketsSearchResult(
|
|
1010
|
+
hits=[
|
|
1011
|
+
AirbyteSearchHit[TicketsSearchData](
|
|
1012
|
+
id=hit.get("id"),
|
|
1013
|
+
score=hit.get("score"),
|
|
1014
|
+
data=TicketsSearchData(**hit.get("data", {}))
|
|
1015
|
+
)
|
|
1016
|
+
for hit in result.get("hits", [])
|
|
1017
|
+
],
|
|
1018
|
+
next_cursor=result.get("next_cursor"),
|
|
1019
|
+
took_ms=result.get("took_ms")
|
|
1020
|
+
)
|
|
871
1021
|
|
|
872
1022
|
class UsersQuery:
|
|
873
1023
|
"""
|
|
@@ -908,7 +1058,8 @@ class UsersQuery:
|
|
|
908
1058
|
# Cast generic envelope to concrete typed result
|
|
909
1059
|
return UsersListResult(
|
|
910
1060
|
data=result.data,
|
|
911
|
-
meta=result.meta
|
|
1061
|
+
meta=result.meta
|
|
1062
|
+
)
|
|
912
1063
|
|
|
913
1064
|
|
|
914
1065
|
|
|
@@ -916,7 +1067,7 @@ class UsersQuery:
|
|
|
916
1067
|
self,
|
|
917
1068
|
user_id: str,
|
|
918
1069
|
**kwargs
|
|
919
|
-
) ->
|
|
1070
|
+
) -> User:
|
|
920
1071
|
"""
|
|
921
1072
|
Returns a user by their ID
|
|
922
1073
|
|
|
@@ -925,7 +1076,7 @@ class UsersQuery:
|
|
|
925
1076
|
**kwargs: Additional parameters
|
|
926
1077
|
|
|
927
1078
|
Returns:
|
|
928
|
-
|
|
1079
|
+
User
|
|
929
1080
|
"""
|
|
930
1081
|
params = {k: v for k, v in {
|
|
931
1082
|
"user_id": user_id,
|
|
@@ -933,12 +1084,102 @@ class UsersQuery:
|
|
|
933
1084
|
}.items() if v is not None}
|
|
934
1085
|
|
|
935
1086
|
result = await self._connector.execute("users", "get", params)
|
|
936
|
-
|
|
937
|
-
return UsersGetResult(
|
|
938
|
-
data=result.data )
|
|
1087
|
+
return result
|
|
939
1088
|
|
|
940
1089
|
|
|
941
1090
|
|
|
1091
|
+
async def search(
|
|
1092
|
+
self,
|
|
1093
|
+
query: UsersSearchQuery,
|
|
1094
|
+
limit: int | None = None,
|
|
1095
|
+
cursor: str | None = None,
|
|
1096
|
+
fields: list[list[str]] | None = None,
|
|
1097
|
+
) -> UsersSearchResult:
|
|
1098
|
+
"""
|
|
1099
|
+
Search users records from Airbyte cache.
|
|
1100
|
+
|
|
1101
|
+
This operation searches cached data from Airbyte syncs.
|
|
1102
|
+
Only available in hosted execution mode.
|
|
1103
|
+
|
|
1104
|
+
Available filter fields (UsersSearchFilter):
|
|
1105
|
+
- active: Indicates if the user account is currently active
|
|
1106
|
+
- alias: Alternative name or nickname for the user
|
|
1107
|
+
- chat_only: Indicates if the user can only interact via chat
|
|
1108
|
+
- created_at: Timestamp indicating when the user was created
|
|
1109
|
+
- custom_role_id: Identifier for a custom role assigned to the user
|
|
1110
|
+
- default_group_id: Identifier of the default group assigned to the user
|
|
1111
|
+
- details: Additional descriptive information about the user
|
|
1112
|
+
- email: Email address of the user
|
|
1113
|
+
- external_id: External system identifier for the user, used for integrations
|
|
1114
|
+
- iana_time_zone: IANA standard time zone identifier for the user
|
|
1115
|
+
- id: Unique identifier for the user
|
|
1116
|
+
- last_login_at: Timestamp of the user's most recent login
|
|
1117
|
+
- locale: Locale setting determining language and regional format preferences
|
|
1118
|
+
- locale_id: Identifier for the user's locale preference
|
|
1119
|
+
- moderator: Indicates if the user has moderator privileges
|
|
1120
|
+
- name: Display name of the user
|
|
1121
|
+
- notes: Internal notes about the user, visible only to agents
|
|
1122
|
+
- only_private_comments: Indicates if the user can only make private comments on tickets
|
|
1123
|
+
- organization_id: Identifier of the organization the user belongs to
|
|
1124
|
+
- permanently_deleted: Indicates if the user has been permanently deleted from the system
|
|
1125
|
+
- phone: Phone number of the user
|
|
1126
|
+
- photo: Profile photo or avatar of the user
|
|
1127
|
+
- report_csv: Indicates if the user receives reports in CSV format
|
|
1128
|
+
- restricted_agent: Indicates if the agent has restricted access permissions
|
|
1129
|
+
- role: Role assigned to the user defining their permissions level
|
|
1130
|
+
- role_type: Type classification of the user's role
|
|
1131
|
+
- shared: Indicates if the user is shared across multiple accounts
|
|
1132
|
+
- shared_agent: Indicates if the user is a shared agent across multiple brands or accounts
|
|
1133
|
+
- shared_phone_number: Indicates if the phone number is shared with other users
|
|
1134
|
+
- signature: Email signature text for the user
|
|
1135
|
+
- suspended: Indicates if the user account is suspended
|
|
1136
|
+
- tags: Labels or tags associated with the user for categorization
|
|
1137
|
+
- ticket_restriction: Defines which tickets the user can access based on restrictions
|
|
1138
|
+
- time_zone: Time zone setting for the user
|
|
1139
|
+
- two_factor_auth_enabled: Indicates if two-factor authentication is enabled for the user
|
|
1140
|
+
- updated_at: Timestamp indicating when the user was last updated
|
|
1141
|
+
- url: API endpoint URL for accessing the user's detailed information
|
|
1142
|
+
- user_fields: Custom field values specific to the user, stored as key-value pairs
|
|
1143
|
+
- verified: Indicates if the user's identity has been verified
|
|
1144
|
+
|
|
1145
|
+
Args:
|
|
1146
|
+
query: Filter and sort conditions. Supports operators like eq, neq, gt, gte, lt, lte,
|
|
1147
|
+
in, like, fuzzy, keyword, not, and, or. Example: {"filter": {"eq": {"status": "active"}}}
|
|
1148
|
+
limit: Maximum results to return (default 1000)
|
|
1149
|
+
cursor: Pagination cursor from previous response's next_cursor
|
|
1150
|
+
fields: Field paths to include in results. Each path is a list of keys for nested access.
|
|
1151
|
+
Example: [["id"], ["user", "name"]] returns id and user.name fields.
|
|
1152
|
+
|
|
1153
|
+
Returns:
|
|
1154
|
+
UsersSearchResult with hits (list of AirbyteSearchHit[UsersSearchData]) and pagination info
|
|
1155
|
+
|
|
1156
|
+
Raises:
|
|
1157
|
+
NotImplementedError: If called in local execution mode
|
|
1158
|
+
"""
|
|
1159
|
+
params: dict[str, Any] = {"query": query}
|
|
1160
|
+
if limit is not None:
|
|
1161
|
+
params["limit"] = limit
|
|
1162
|
+
if cursor is not None:
|
|
1163
|
+
params["cursor"] = cursor
|
|
1164
|
+
if fields is not None:
|
|
1165
|
+
params["fields"] = fields
|
|
1166
|
+
|
|
1167
|
+
result = await self._connector.execute("users", "search", params)
|
|
1168
|
+
|
|
1169
|
+
# Parse response into typed result
|
|
1170
|
+
return UsersSearchResult(
|
|
1171
|
+
hits=[
|
|
1172
|
+
AirbyteSearchHit[UsersSearchData](
|
|
1173
|
+
id=hit.get("id"),
|
|
1174
|
+
score=hit.get("score"),
|
|
1175
|
+
data=UsersSearchData(**hit.get("data", {}))
|
|
1176
|
+
)
|
|
1177
|
+
for hit in result.get("hits", [])
|
|
1178
|
+
],
|
|
1179
|
+
next_cursor=result.get("next_cursor"),
|
|
1180
|
+
took_ms=result.get("took_ms")
|
|
1181
|
+
)
|
|
1182
|
+
|
|
942
1183
|
class OrganizationsQuery:
|
|
943
1184
|
"""
|
|
944
1185
|
Query class for Organizations entity operations.
|
|
@@ -972,7 +1213,8 @@ class OrganizationsQuery:
|
|
|
972
1213
|
# Cast generic envelope to concrete typed result
|
|
973
1214
|
return OrganizationsListResult(
|
|
974
1215
|
data=result.data,
|
|
975
|
-
meta=result.meta
|
|
1216
|
+
meta=result.meta
|
|
1217
|
+
)
|
|
976
1218
|
|
|
977
1219
|
|
|
978
1220
|
|
|
@@ -980,7 +1222,7 @@ class OrganizationsQuery:
|
|
|
980
1222
|
self,
|
|
981
1223
|
organization_id: str,
|
|
982
1224
|
**kwargs
|
|
983
|
-
) ->
|
|
1225
|
+
) -> Organization:
|
|
984
1226
|
"""
|
|
985
1227
|
Returns an organization by its ID
|
|
986
1228
|
|
|
@@ -989,7 +1231,7 @@ class OrganizationsQuery:
|
|
|
989
1231
|
**kwargs: Additional parameters
|
|
990
1232
|
|
|
991
1233
|
Returns:
|
|
992
|
-
|
|
1234
|
+
Organization
|
|
993
1235
|
"""
|
|
994
1236
|
params = {k: v for k, v in {
|
|
995
1237
|
"organization_id": organization_id,
|
|
@@ -997,11 +1239,77 @@ class OrganizationsQuery:
|
|
|
997
1239
|
}.items() if v is not None}
|
|
998
1240
|
|
|
999
1241
|
result = await self._connector.execute("organizations", "get", params)
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
data=result.data )
|
|
1242
|
+
return result
|
|
1243
|
+
|
|
1003
1244
|
|
|
1004
1245
|
|
|
1246
|
+
async def search(
|
|
1247
|
+
self,
|
|
1248
|
+
query: OrganizationsSearchQuery,
|
|
1249
|
+
limit: int | None = None,
|
|
1250
|
+
cursor: str | None = None,
|
|
1251
|
+
fields: list[list[str]] | None = None,
|
|
1252
|
+
) -> OrganizationsSearchResult:
|
|
1253
|
+
"""
|
|
1254
|
+
Search organizations records from Airbyte cache.
|
|
1255
|
+
|
|
1256
|
+
This operation searches cached data from Airbyte syncs.
|
|
1257
|
+
Only available in hosted execution mode.
|
|
1258
|
+
|
|
1259
|
+
Available filter fields (OrganizationsSearchFilter):
|
|
1260
|
+
- created_at: Timestamp when the organization was created
|
|
1261
|
+
- deleted_at: Timestamp when the organization was deleted
|
|
1262
|
+
- details: Details about the organization, such as the address
|
|
1263
|
+
- domain_names: Array of domain names associated with this organization for automatic user assignment
|
|
1264
|
+
- external_id: Unique external identifier to associate the organization to an external record (case-insensitive)
|
|
1265
|
+
- group_id: ID of the group where new tickets from users in this organization are automatically assigned
|
|
1266
|
+
- id: Unique identifier automatically assigned when the organization is created
|
|
1267
|
+
- name: Unique name for the organization (mandatory field)
|
|
1268
|
+
- notes: Notes about the organization
|
|
1269
|
+
- organization_fields: Key-value object for custom organization fields
|
|
1270
|
+
- shared_comments: Boolean indicating whether end users in this organization can comment on each other's tickets
|
|
1271
|
+
- shared_tickets: Boolean indicating whether end users in this organization can see each other's tickets
|
|
1272
|
+
- tags: Array of tags associated with the organization
|
|
1273
|
+
- updated_at: Timestamp of the last update to the organization
|
|
1274
|
+
- url: The API URL of this organization
|
|
1275
|
+
|
|
1276
|
+
Args:
|
|
1277
|
+
query: Filter and sort conditions. Supports operators like eq, neq, gt, gte, lt, lte,
|
|
1278
|
+
in, like, fuzzy, keyword, not, and, or. Example: {"filter": {"eq": {"status": "active"}}}
|
|
1279
|
+
limit: Maximum results to return (default 1000)
|
|
1280
|
+
cursor: Pagination cursor from previous response's next_cursor
|
|
1281
|
+
fields: Field paths to include in results. Each path is a list of keys for nested access.
|
|
1282
|
+
Example: [["id"], ["user", "name"]] returns id and user.name fields.
|
|
1283
|
+
|
|
1284
|
+
Returns:
|
|
1285
|
+
OrganizationsSearchResult with hits (list of AirbyteSearchHit[OrganizationsSearchData]) and pagination info
|
|
1286
|
+
|
|
1287
|
+
Raises:
|
|
1288
|
+
NotImplementedError: If called in local execution mode
|
|
1289
|
+
"""
|
|
1290
|
+
params: dict[str, Any] = {"query": query}
|
|
1291
|
+
if limit is not None:
|
|
1292
|
+
params["limit"] = limit
|
|
1293
|
+
if cursor is not None:
|
|
1294
|
+
params["cursor"] = cursor
|
|
1295
|
+
if fields is not None:
|
|
1296
|
+
params["fields"] = fields
|
|
1297
|
+
|
|
1298
|
+
result = await self._connector.execute("organizations", "search", params)
|
|
1299
|
+
|
|
1300
|
+
# Parse response into typed result
|
|
1301
|
+
return OrganizationsSearchResult(
|
|
1302
|
+
hits=[
|
|
1303
|
+
AirbyteSearchHit[OrganizationsSearchData](
|
|
1304
|
+
id=hit.get("id"),
|
|
1305
|
+
score=hit.get("score"),
|
|
1306
|
+
data=OrganizationsSearchData(**hit.get("data", {}))
|
|
1307
|
+
)
|
|
1308
|
+
for hit in result.get("hits", [])
|
|
1309
|
+
],
|
|
1310
|
+
next_cursor=result.get("next_cursor"),
|
|
1311
|
+
took_ms=result.get("took_ms")
|
|
1312
|
+
)
|
|
1005
1313
|
|
|
1006
1314
|
class GroupsQuery:
|
|
1007
1315
|
"""
|
|
@@ -1039,7 +1347,8 @@ class GroupsQuery:
|
|
|
1039
1347
|
# Cast generic envelope to concrete typed result
|
|
1040
1348
|
return GroupsListResult(
|
|
1041
1349
|
data=result.data,
|
|
1042
|
-
meta=result.meta
|
|
1350
|
+
meta=result.meta
|
|
1351
|
+
)
|
|
1043
1352
|
|
|
1044
1353
|
|
|
1045
1354
|
|
|
@@ -1047,7 +1356,7 @@ class GroupsQuery:
|
|
|
1047
1356
|
self,
|
|
1048
1357
|
group_id: str,
|
|
1049
1358
|
**kwargs
|
|
1050
|
-
) ->
|
|
1359
|
+
) -> Group:
|
|
1051
1360
|
"""
|
|
1052
1361
|
Returns a group by its ID
|
|
1053
1362
|
|
|
@@ -1056,7 +1365,7 @@ class GroupsQuery:
|
|
|
1056
1365
|
**kwargs: Additional parameters
|
|
1057
1366
|
|
|
1058
1367
|
Returns:
|
|
1059
|
-
|
|
1368
|
+
Group
|
|
1060
1369
|
"""
|
|
1061
1370
|
params = {k: v for k, v in {
|
|
1062
1371
|
"group_id": group_id,
|
|
@@ -1064,11 +1373,71 @@ class GroupsQuery:
|
|
|
1064
1373
|
}.items() if v is not None}
|
|
1065
1374
|
|
|
1066
1375
|
result = await self._connector.execute("groups", "get", params)
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1376
|
+
return result
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
async def search(
|
|
1381
|
+
self,
|
|
1382
|
+
query: GroupsSearchQuery,
|
|
1383
|
+
limit: int | None = None,
|
|
1384
|
+
cursor: str | None = None,
|
|
1385
|
+
fields: list[list[str]] | None = None,
|
|
1386
|
+
) -> GroupsSearchResult:
|
|
1387
|
+
"""
|
|
1388
|
+
Search groups records from Airbyte cache.
|
|
1070
1389
|
|
|
1390
|
+
This operation searches cached data from Airbyte syncs.
|
|
1391
|
+
Only available in hosted execution mode.
|
|
1071
1392
|
|
|
1393
|
+
Available filter fields (GroupsSearchFilter):
|
|
1394
|
+
- created_at: Timestamp indicating when the group was created
|
|
1395
|
+
- default: Indicates if the group is the default one for the account
|
|
1396
|
+
- deleted: Indicates whether the group has been deleted
|
|
1397
|
+
- description: The description of the group
|
|
1398
|
+
- id: Unique identifier automatically assigned when creating groups
|
|
1399
|
+
- is_public: Indicates if the group is public (true) or private (false)
|
|
1400
|
+
- name: The name of the group
|
|
1401
|
+
- updated_at: Timestamp indicating when the group was last updated
|
|
1402
|
+
- url: The API URL of the group
|
|
1403
|
+
|
|
1404
|
+
Args:
|
|
1405
|
+
query: Filter and sort conditions. Supports operators like eq, neq, gt, gte, lt, lte,
|
|
1406
|
+
in, like, fuzzy, keyword, not, and, or. Example: {"filter": {"eq": {"status": "active"}}}
|
|
1407
|
+
limit: Maximum results to return (default 1000)
|
|
1408
|
+
cursor: Pagination cursor from previous response's next_cursor
|
|
1409
|
+
fields: Field paths to include in results. Each path is a list of keys for nested access.
|
|
1410
|
+
Example: [["id"], ["user", "name"]] returns id and user.name fields.
|
|
1411
|
+
|
|
1412
|
+
Returns:
|
|
1413
|
+
GroupsSearchResult with hits (list of AirbyteSearchHit[GroupsSearchData]) and pagination info
|
|
1414
|
+
|
|
1415
|
+
Raises:
|
|
1416
|
+
NotImplementedError: If called in local execution mode
|
|
1417
|
+
"""
|
|
1418
|
+
params: dict[str, Any] = {"query": query}
|
|
1419
|
+
if limit is not None:
|
|
1420
|
+
params["limit"] = limit
|
|
1421
|
+
if cursor is not None:
|
|
1422
|
+
params["cursor"] = cursor
|
|
1423
|
+
if fields is not None:
|
|
1424
|
+
params["fields"] = fields
|
|
1425
|
+
|
|
1426
|
+
result = await self._connector.execute("groups", "search", params)
|
|
1427
|
+
|
|
1428
|
+
# Parse response into typed result
|
|
1429
|
+
return GroupsSearchResult(
|
|
1430
|
+
hits=[
|
|
1431
|
+
AirbyteSearchHit[GroupsSearchData](
|
|
1432
|
+
id=hit.get("id"),
|
|
1433
|
+
score=hit.get("score"),
|
|
1434
|
+
data=GroupsSearchData(**hit.get("data", {}))
|
|
1435
|
+
)
|
|
1436
|
+
for hit in result.get("hits", [])
|
|
1437
|
+
],
|
|
1438
|
+
next_cursor=result.get("next_cursor"),
|
|
1439
|
+
took_ms=result.get("took_ms")
|
|
1440
|
+
)
|
|
1072
1441
|
|
|
1073
1442
|
class TicketCommentsQuery:
|
|
1074
1443
|
"""
|
|
@@ -1112,9 +1481,80 @@ class TicketCommentsQuery:
|
|
|
1112
1481
|
# Cast generic envelope to concrete typed result
|
|
1113
1482
|
return TicketCommentsListResult(
|
|
1114
1483
|
data=result.data,
|
|
1115
|
-
meta=result.meta
|
|
1484
|
+
meta=result.meta
|
|
1485
|
+
)
|
|
1486
|
+
|
|
1487
|
+
|
|
1488
|
+
|
|
1489
|
+
async def search(
|
|
1490
|
+
self,
|
|
1491
|
+
query: TicketCommentsSearchQuery,
|
|
1492
|
+
limit: int | None = None,
|
|
1493
|
+
cursor: str | None = None,
|
|
1494
|
+
fields: list[list[str]] | None = None,
|
|
1495
|
+
) -> TicketCommentsSearchResult:
|
|
1496
|
+
"""
|
|
1497
|
+
Search ticket_comments records from Airbyte cache.
|
|
1498
|
+
|
|
1499
|
+
This operation searches cached data from Airbyte syncs.
|
|
1500
|
+
Only available in hosted execution mode.
|
|
1116
1501
|
|
|
1502
|
+
Available filter fields (TicketCommentsSearchFilter):
|
|
1503
|
+
- attachments: List of files or media attached to the comment
|
|
1504
|
+
- audit_id: Identifier of the audit record associated with this comment event
|
|
1505
|
+
- author_id: Identifier of the user who created the comment
|
|
1506
|
+
- body: Content of the comment in its original format
|
|
1507
|
+
- created_at: Timestamp when the comment was created
|
|
1508
|
+
- event_type: Specific classification of the event within the ticket event stream
|
|
1509
|
+
- html_body: HTML-formatted content of the comment
|
|
1510
|
+
- id: Unique identifier for the comment event
|
|
1511
|
+
- metadata: Additional structured information about the comment not covered by standard fields
|
|
1512
|
+
- plain_body: Plain text content of the comment without formatting
|
|
1513
|
+
- public: Boolean indicating whether the comment is visible to end users or is an internal note
|
|
1514
|
+
- ticket_id: Identifier of the ticket to which this comment belongs
|
|
1515
|
+
- timestamp: Timestamp of when the event occurred in the incremental export stream
|
|
1516
|
+
- type: Type of event, typically indicating this is a comment event
|
|
1517
|
+
- uploads: Array of upload tokens or identifiers for files being attached to the comment
|
|
1518
|
+
- via: Channel or method through which the comment was submitted
|
|
1519
|
+
- via_reference_id: Reference identifier for the channel through which the comment was created
|
|
1117
1520
|
|
|
1521
|
+
Args:
|
|
1522
|
+
query: Filter and sort conditions. Supports operators like eq, neq, gt, gte, lt, lte,
|
|
1523
|
+
in, like, fuzzy, keyword, not, and, or. Example: {"filter": {"eq": {"status": "active"}}}
|
|
1524
|
+
limit: Maximum results to return (default 1000)
|
|
1525
|
+
cursor: Pagination cursor from previous response's next_cursor
|
|
1526
|
+
fields: Field paths to include in results. Each path is a list of keys for nested access.
|
|
1527
|
+
Example: [["id"], ["user", "name"]] returns id and user.name fields.
|
|
1528
|
+
|
|
1529
|
+
Returns:
|
|
1530
|
+
TicketCommentsSearchResult with hits (list of AirbyteSearchHit[TicketCommentsSearchData]) and pagination info
|
|
1531
|
+
|
|
1532
|
+
Raises:
|
|
1533
|
+
NotImplementedError: If called in local execution mode
|
|
1534
|
+
"""
|
|
1535
|
+
params: dict[str, Any] = {"query": query}
|
|
1536
|
+
if limit is not None:
|
|
1537
|
+
params["limit"] = limit
|
|
1538
|
+
if cursor is not None:
|
|
1539
|
+
params["cursor"] = cursor
|
|
1540
|
+
if fields is not None:
|
|
1541
|
+
params["fields"] = fields
|
|
1542
|
+
|
|
1543
|
+
result = await self._connector.execute("ticket_comments", "search", params)
|
|
1544
|
+
|
|
1545
|
+
# Parse response into typed result
|
|
1546
|
+
return TicketCommentsSearchResult(
|
|
1547
|
+
hits=[
|
|
1548
|
+
AirbyteSearchHit[TicketCommentsSearchData](
|
|
1549
|
+
id=hit.get("id"),
|
|
1550
|
+
score=hit.get("score"),
|
|
1551
|
+
data=TicketCommentsSearchData(**hit.get("data", {}))
|
|
1552
|
+
)
|
|
1553
|
+
for hit in result.get("hits", [])
|
|
1554
|
+
],
|
|
1555
|
+
next_cursor=result.get("next_cursor"),
|
|
1556
|
+
took_ms=result.get("took_ms")
|
|
1557
|
+
)
|
|
1118
1558
|
|
|
1119
1559
|
class AttachmentsQuery:
|
|
1120
1560
|
"""
|
|
@@ -1129,7 +1569,7 @@ class AttachmentsQuery:
|
|
|
1129
1569
|
self,
|
|
1130
1570
|
attachment_id: str,
|
|
1131
1571
|
**kwargs
|
|
1132
|
-
) ->
|
|
1572
|
+
) -> Attachment:
|
|
1133
1573
|
"""
|
|
1134
1574
|
Returns an attachment by its ID
|
|
1135
1575
|
|
|
@@ -1138,7 +1578,7 @@ class AttachmentsQuery:
|
|
|
1138
1578
|
**kwargs: Additional parameters
|
|
1139
1579
|
|
|
1140
1580
|
Returns:
|
|
1141
|
-
|
|
1581
|
+
Attachment
|
|
1142
1582
|
"""
|
|
1143
1583
|
params = {k: v for k, v in {
|
|
1144
1584
|
"attachment_id": attachment_id,
|
|
@@ -1146,9 +1586,7 @@ class AttachmentsQuery:
|
|
|
1146
1586
|
}.items() if v is not None}
|
|
1147
1587
|
|
|
1148
1588
|
result = await self._connector.execute("attachments", "get", params)
|
|
1149
|
-
|
|
1150
|
-
return AttachmentsGetResult(
|
|
1151
|
-
data=result.data )
|
|
1589
|
+
return result
|
|
1152
1590
|
|
|
1153
1591
|
|
|
1154
1592
|
|
|
@@ -1243,7 +1681,8 @@ class TicketAuditsQuery:
|
|
|
1243
1681
|
# Cast generic envelope to concrete typed result
|
|
1244
1682
|
return TicketAuditsListResult(
|
|
1245
1683
|
data=result.data,
|
|
1246
|
-
meta=result.meta
|
|
1684
|
+
meta=result.meta
|
|
1685
|
+
)
|
|
1247
1686
|
|
|
1248
1687
|
|
|
1249
1688
|
|
|
@@ -1274,10 +1713,72 @@ class TicketAuditsQuery:
|
|
|
1274
1713
|
# Cast generic envelope to concrete typed result
|
|
1275
1714
|
return TicketAuditsListResult(
|
|
1276
1715
|
data=result.data,
|
|
1277
|
-
meta=result.meta
|
|
1716
|
+
meta=result.meta
|
|
1717
|
+
)
|
|
1278
1718
|
|
|
1279
1719
|
|
|
1280
1720
|
|
|
1721
|
+
async def search(
|
|
1722
|
+
self,
|
|
1723
|
+
query: TicketAuditsSearchQuery,
|
|
1724
|
+
limit: int | None = None,
|
|
1725
|
+
cursor: str | None = None,
|
|
1726
|
+
fields: list[list[str]] | None = None,
|
|
1727
|
+
) -> TicketAuditsSearchResult:
|
|
1728
|
+
"""
|
|
1729
|
+
Search ticket_audits records from Airbyte cache.
|
|
1730
|
+
|
|
1731
|
+
This operation searches cached data from Airbyte syncs.
|
|
1732
|
+
Only available in hosted execution mode.
|
|
1733
|
+
|
|
1734
|
+
Available filter fields (TicketAuditsSearchFilter):
|
|
1735
|
+
- attachments: Files or documents attached to the audit
|
|
1736
|
+
- author_id: The unique identifier of the user who created the audit
|
|
1737
|
+
- created_at: Timestamp indicating when the audit was created
|
|
1738
|
+
- events: Array of events that occurred in this audit, such as field changes, comments, or tag updates
|
|
1739
|
+
- id: Unique identifier for the audit record, automatically assigned when the audit is created
|
|
1740
|
+
- metadata: Custom and system data associated with the audit
|
|
1741
|
+
- ticket_id: The unique identifier of the ticket associated with this audit
|
|
1742
|
+
- via: Describes how the audit was created, providing context about the creation source
|
|
1743
|
+
|
|
1744
|
+
Args:
|
|
1745
|
+
query: Filter and sort conditions. Supports operators like eq, neq, gt, gte, lt, lte,
|
|
1746
|
+
in, like, fuzzy, keyword, not, and, or. Example: {"filter": {"eq": {"status": "active"}}}
|
|
1747
|
+
limit: Maximum results to return (default 1000)
|
|
1748
|
+
cursor: Pagination cursor from previous response's next_cursor
|
|
1749
|
+
fields: Field paths to include in results. Each path is a list of keys for nested access.
|
|
1750
|
+
Example: [["id"], ["user", "name"]] returns id and user.name fields.
|
|
1751
|
+
|
|
1752
|
+
Returns:
|
|
1753
|
+
TicketAuditsSearchResult with hits (list of AirbyteSearchHit[TicketAuditsSearchData]) and pagination info
|
|
1754
|
+
|
|
1755
|
+
Raises:
|
|
1756
|
+
NotImplementedError: If called in local execution mode
|
|
1757
|
+
"""
|
|
1758
|
+
params: dict[str, Any] = {"query": query}
|
|
1759
|
+
if limit is not None:
|
|
1760
|
+
params["limit"] = limit
|
|
1761
|
+
if cursor is not None:
|
|
1762
|
+
params["cursor"] = cursor
|
|
1763
|
+
if fields is not None:
|
|
1764
|
+
params["fields"] = fields
|
|
1765
|
+
|
|
1766
|
+
result = await self._connector.execute("ticket_audits", "search", params)
|
|
1767
|
+
|
|
1768
|
+
# Parse response into typed result
|
|
1769
|
+
return TicketAuditsSearchResult(
|
|
1770
|
+
hits=[
|
|
1771
|
+
AirbyteSearchHit[TicketAuditsSearchData](
|
|
1772
|
+
id=hit.get("id"),
|
|
1773
|
+
score=hit.get("score"),
|
|
1774
|
+
data=TicketAuditsSearchData(**hit.get("data", {}))
|
|
1775
|
+
)
|
|
1776
|
+
for hit in result.get("hits", [])
|
|
1777
|
+
],
|
|
1778
|
+
next_cursor=result.get("next_cursor"),
|
|
1779
|
+
took_ms=result.get("took_ms")
|
|
1780
|
+
)
|
|
1781
|
+
|
|
1281
1782
|
class TicketMetricsQuery:
|
|
1282
1783
|
"""
|
|
1283
1784
|
Query class for TicketMetrics entity operations.
|
|
@@ -1311,9 +1812,93 @@ class TicketMetricsQuery:
|
|
|
1311
1812
|
# Cast generic envelope to concrete typed result
|
|
1312
1813
|
return TicketMetricsListResult(
|
|
1313
1814
|
data=result.data,
|
|
1314
|
-
meta=result.meta
|
|
1815
|
+
meta=result.meta
|
|
1816
|
+
)
|
|
1817
|
+
|
|
1818
|
+
|
|
1315
1819
|
|
|
1820
|
+
async def search(
|
|
1821
|
+
self,
|
|
1822
|
+
query: TicketMetricsSearchQuery,
|
|
1823
|
+
limit: int | None = None,
|
|
1824
|
+
cursor: str | None = None,
|
|
1825
|
+
fields: list[list[str]] | None = None,
|
|
1826
|
+
) -> TicketMetricsSearchResult:
|
|
1827
|
+
"""
|
|
1828
|
+
Search ticket_metrics records from Airbyte cache.
|
|
1829
|
+
|
|
1830
|
+
This operation searches cached data from Airbyte syncs.
|
|
1831
|
+
Only available in hosted execution mode.
|
|
1832
|
+
|
|
1833
|
+
Available filter fields (TicketMetricsSearchFilter):
|
|
1834
|
+
- agent_wait_time_in_minutes: Number of minutes the agent spent waiting during calendar and business hours
|
|
1835
|
+
- assigned_at: Timestamp when the ticket was assigned
|
|
1836
|
+
- assignee_stations: Number of assignees the ticket had
|
|
1837
|
+
- assignee_updated_at: Timestamp when the assignee last updated the ticket
|
|
1838
|
+
- created_at: Timestamp when the metric record was created
|
|
1839
|
+
- custom_status_updated_at: Timestamp when the ticket's custom status was last updated
|
|
1840
|
+
- first_resolution_time_in_minutes: Number of minutes to the first resolution time during calendar and business hours
|
|
1841
|
+
- full_resolution_time_in_minutes: Number of minutes to the full resolution during calendar and business hours
|
|
1842
|
+
- generated_timestamp: Timestamp of when record was last updated
|
|
1843
|
+
- group_stations: Number of groups the ticket passed through
|
|
1844
|
+
- id: Unique identifier for the ticket metric record
|
|
1845
|
+
- initially_assigned_at: Timestamp when the ticket was initially assigned
|
|
1846
|
+
- instance_id: ID of the Zendesk instance associated with the ticket
|
|
1847
|
+
- latest_comment_added_at: Timestamp when the latest comment was added
|
|
1848
|
+
- metric: Ticket metrics data
|
|
1849
|
+
- on_hold_time_in_minutes: Number of minutes on hold
|
|
1850
|
+
- reopens: Total number of times the ticket was reopened
|
|
1851
|
+
- replies: The number of public replies added to a ticket by an agent
|
|
1852
|
+
- reply_time_in_minutes: Number of minutes to the first reply during calendar and business hours
|
|
1853
|
+
- reply_time_in_seconds: Number of seconds to the first reply during calendar hours, only available for Messaging tickets
|
|
1854
|
+
- requester_updated_at: Timestamp when the requester last updated the ticket
|
|
1855
|
+
- requester_wait_time_in_minutes: Number of minutes the requester spent waiting during calendar and business hours
|
|
1856
|
+
- solved_at: Timestamp when the ticket was solved
|
|
1857
|
+
- status: The current status of the ticket (open, pending, solved, etc.).
|
|
1858
|
+
- status_updated_at: Timestamp when the status of the ticket was last updated
|
|
1859
|
+
- ticket_id: Identifier of the associated ticket
|
|
1860
|
+
- time: Time related to the ticket
|
|
1861
|
+
- type: Type of ticket
|
|
1862
|
+
- updated_at: Timestamp when the metric record was last updated
|
|
1863
|
+
- url: The API url of the ticket metric
|
|
1864
|
+
|
|
1865
|
+
Args:
|
|
1866
|
+
query: Filter and sort conditions. Supports operators like eq, neq, gt, gte, lt, lte,
|
|
1867
|
+
in, like, fuzzy, keyword, not, and, or. Example: {"filter": {"eq": {"status": "active"}}}
|
|
1868
|
+
limit: Maximum results to return (default 1000)
|
|
1869
|
+
cursor: Pagination cursor from previous response's next_cursor
|
|
1870
|
+
fields: Field paths to include in results. Each path is a list of keys for nested access.
|
|
1871
|
+
Example: [["id"], ["user", "name"]] returns id and user.name fields.
|
|
1316
1872
|
|
|
1873
|
+
Returns:
|
|
1874
|
+
TicketMetricsSearchResult with hits (list of AirbyteSearchHit[TicketMetricsSearchData]) and pagination info
|
|
1875
|
+
|
|
1876
|
+
Raises:
|
|
1877
|
+
NotImplementedError: If called in local execution mode
|
|
1878
|
+
"""
|
|
1879
|
+
params: dict[str, Any] = {"query": query}
|
|
1880
|
+
if limit is not None:
|
|
1881
|
+
params["limit"] = limit
|
|
1882
|
+
if cursor is not None:
|
|
1883
|
+
params["cursor"] = cursor
|
|
1884
|
+
if fields is not None:
|
|
1885
|
+
params["fields"] = fields
|
|
1886
|
+
|
|
1887
|
+
result = await self._connector.execute("ticket_metrics", "search", params)
|
|
1888
|
+
|
|
1889
|
+
# Parse response into typed result
|
|
1890
|
+
return TicketMetricsSearchResult(
|
|
1891
|
+
hits=[
|
|
1892
|
+
AirbyteSearchHit[TicketMetricsSearchData](
|
|
1893
|
+
id=hit.get("id"),
|
|
1894
|
+
score=hit.get("score"),
|
|
1895
|
+
data=TicketMetricsSearchData(**hit.get("data", {}))
|
|
1896
|
+
)
|
|
1897
|
+
for hit in result.get("hits", [])
|
|
1898
|
+
],
|
|
1899
|
+
next_cursor=result.get("next_cursor"),
|
|
1900
|
+
took_ms=result.get("took_ms")
|
|
1901
|
+
)
|
|
1317
1902
|
|
|
1318
1903
|
class TicketFieldsQuery:
|
|
1319
1904
|
"""
|
|
@@ -1351,7 +1936,8 @@ class TicketFieldsQuery:
|
|
|
1351
1936
|
# Cast generic envelope to concrete typed result
|
|
1352
1937
|
return TicketFieldsListResult(
|
|
1353
1938
|
data=result.data,
|
|
1354
|
-
meta=result.meta
|
|
1939
|
+
meta=result.meta
|
|
1940
|
+
)
|
|
1355
1941
|
|
|
1356
1942
|
|
|
1357
1943
|
|
|
@@ -1359,7 +1945,7 @@ class TicketFieldsQuery:
|
|
|
1359
1945
|
self,
|
|
1360
1946
|
ticket_field_id: str,
|
|
1361
1947
|
**kwargs
|
|
1362
|
-
) ->
|
|
1948
|
+
) -> TicketField:
|
|
1363
1949
|
"""
|
|
1364
1950
|
Returns a ticket field by its ID
|
|
1365
1951
|
|
|
@@ -1368,7 +1954,7 @@ class TicketFieldsQuery:
|
|
|
1368
1954
|
**kwargs: Additional parameters
|
|
1369
1955
|
|
|
1370
1956
|
Returns:
|
|
1371
|
-
|
|
1957
|
+
TicketField
|
|
1372
1958
|
"""
|
|
1373
1959
|
params = {k: v for k, v in {
|
|
1374
1960
|
"ticket_field_id": ticket_field_id,
|
|
@@ -1376,11 +1962,89 @@ class TicketFieldsQuery:
|
|
|
1376
1962
|
}.items() if v is not None}
|
|
1377
1963
|
|
|
1378
1964
|
result = await self._connector.execute("ticket_fields", "get", params)
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1965
|
+
return result
|
|
1966
|
+
|
|
1967
|
+
|
|
1382
1968
|
|
|
1969
|
+
async def search(
|
|
1970
|
+
self,
|
|
1971
|
+
query: TicketFieldsSearchQuery,
|
|
1972
|
+
limit: int | None = None,
|
|
1973
|
+
cursor: str | None = None,
|
|
1974
|
+
fields: list[list[str]] | None = None,
|
|
1975
|
+
) -> TicketFieldsSearchResult:
|
|
1976
|
+
"""
|
|
1977
|
+
Search ticket_fields records from Airbyte cache.
|
|
1978
|
+
|
|
1979
|
+
This operation searches cached data from Airbyte syncs.
|
|
1980
|
+
Only available in hosted execution mode.
|
|
1981
|
+
|
|
1982
|
+
Available filter fields (TicketFieldsSearchFilter):
|
|
1983
|
+
- active: Whether this field is currently available for use
|
|
1984
|
+
- agent_description: A description of the ticket field that only agents can see
|
|
1985
|
+
- collapsed_for_agents: If true, the field is shown to agents by default; if false, it is hidden alongside infrequently u...
|
|
1986
|
+
- created_at: Timestamp when the custom ticket field was created
|
|
1987
|
+
- custom_field_options: Array of option objects for custom ticket fields of type multiselect or tagger, containing name a...
|
|
1988
|
+
- custom_statuses: List of customized ticket statuses, only present for system ticket fields of type custom_status
|
|
1989
|
+
- description: Text describing the purpose of the ticket field to users
|
|
1990
|
+
- editable_in_portal: Whether this field is editable by end users in Help Center
|
|
1991
|
+
- id: Unique identifier for the ticket field, automatically assigned when created
|
|
1992
|
+
- key: Internal identifier or reference key for the field
|
|
1993
|
+
- position: The relative position of the ticket field on a ticket, controlling display order
|
|
1994
|
+
- raw_description: The dynamic content placeholder if present, or the description value if not
|
|
1995
|
+
- raw_title: The dynamic content placeholder if present, or the title value if not
|
|
1996
|
+
- raw_title_in_portal: The dynamic content placeholder if present, or the title_in_portal value if not
|
|
1997
|
+
- regexp_for_validation: For regexp fields only, the validation pattern for a field value to be deemed valid
|
|
1998
|
+
- removable: If false, this field is a system field that must be present on all tickets
|
|
1999
|
+
- required: If true, agents must enter a value in the field to change the ticket status to solved
|
|
2000
|
+
- required_in_portal: If true, end users must enter a value in the field to create a request
|
|
2001
|
+
- sub_type_id: For system ticket fields of type priority and status, controlling available options
|
|
2002
|
+
- system_field_options: Array of options for system ticket fields of type tickettype, priority, or status
|
|
2003
|
+
- tag: For checkbox fields only, a tag added to tickets when the checkbox field is selected
|
|
2004
|
+
- title: The title of the ticket field displayed to agents
|
|
2005
|
+
- title_in_portal: The title of the ticket field displayed to end users in Help Center
|
|
2006
|
+
- type: Field type such as text, textarea, checkbox, date, integer, decimal, regexp, multiselect, tagger,...
|
|
2007
|
+
- updated_at: Timestamp when the custom ticket field was last updated
|
|
2008
|
+
- url: The API URL for this ticket field resource
|
|
2009
|
+
- visible_in_portal: Whether this field is visible to end users in Help Center
|
|
1383
2010
|
|
|
2011
|
+
Args:
|
|
2012
|
+
query: Filter and sort conditions. Supports operators like eq, neq, gt, gte, lt, lte,
|
|
2013
|
+
in, like, fuzzy, keyword, not, and, or. Example: {"filter": {"eq": {"status": "active"}}}
|
|
2014
|
+
limit: Maximum results to return (default 1000)
|
|
2015
|
+
cursor: Pagination cursor from previous response's next_cursor
|
|
2016
|
+
fields: Field paths to include in results. Each path is a list of keys for nested access.
|
|
2017
|
+
Example: [["id"], ["user", "name"]] returns id and user.name fields.
|
|
2018
|
+
|
|
2019
|
+
Returns:
|
|
2020
|
+
TicketFieldsSearchResult with hits (list of AirbyteSearchHit[TicketFieldsSearchData]) and pagination info
|
|
2021
|
+
|
|
2022
|
+
Raises:
|
|
2023
|
+
NotImplementedError: If called in local execution mode
|
|
2024
|
+
"""
|
|
2025
|
+
params: dict[str, Any] = {"query": query}
|
|
2026
|
+
if limit is not None:
|
|
2027
|
+
params["limit"] = limit
|
|
2028
|
+
if cursor is not None:
|
|
2029
|
+
params["cursor"] = cursor
|
|
2030
|
+
if fields is not None:
|
|
2031
|
+
params["fields"] = fields
|
|
2032
|
+
|
|
2033
|
+
result = await self._connector.execute("ticket_fields", "search", params)
|
|
2034
|
+
|
|
2035
|
+
# Parse response into typed result
|
|
2036
|
+
return TicketFieldsSearchResult(
|
|
2037
|
+
hits=[
|
|
2038
|
+
AirbyteSearchHit[TicketFieldsSearchData](
|
|
2039
|
+
id=hit.get("id"),
|
|
2040
|
+
score=hit.get("score"),
|
|
2041
|
+
data=TicketFieldsSearchData(**hit.get("data", {}))
|
|
2042
|
+
)
|
|
2043
|
+
for hit in result.get("hits", [])
|
|
2044
|
+
],
|
|
2045
|
+
next_cursor=result.get("next_cursor"),
|
|
2046
|
+
took_ms=result.get("took_ms")
|
|
2047
|
+
)
|
|
1384
2048
|
|
|
1385
2049
|
class BrandsQuery:
|
|
1386
2050
|
"""
|
|
@@ -1415,7 +2079,8 @@ class BrandsQuery:
|
|
|
1415
2079
|
# Cast generic envelope to concrete typed result
|
|
1416
2080
|
return BrandsListResult(
|
|
1417
2081
|
data=result.data,
|
|
1418
|
-
meta=result.meta
|
|
2082
|
+
meta=result.meta
|
|
2083
|
+
)
|
|
1419
2084
|
|
|
1420
2085
|
|
|
1421
2086
|
|
|
@@ -1423,7 +2088,7 @@ class BrandsQuery:
|
|
|
1423
2088
|
self,
|
|
1424
2089
|
brand_id: str,
|
|
1425
2090
|
**kwargs
|
|
1426
|
-
) ->
|
|
2091
|
+
) -> Brand:
|
|
1427
2092
|
"""
|
|
1428
2093
|
Returns a brand by its ID
|
|
1429
2094
|
|
|
@@ -1432,7 +2097,7 @@ class BrandsQuery:
|
|
|
1432
2097
|
**kwargs: Additional parameters
|
|
1433
2098
|
|
|
1434
2099
|
Returns:
|
|
1435
|
-
|
|
2100
|
+
Brand
|
|
1436
2101
|
"""
|
|
1437
2102
|
params = {k: v for k, v in {
|
|
1438
2103
|
"brand_id": brand_id,
|
|
@@ -1440,12 +2105,79 @@ class BrandsQuery:
|
|
|
1440
2105
|
}.items() if v is not None}
|
|
1441
2106
|
|
|
1442
2107
|
result = await self._connector.execute("brands", "get", params)
|
|
1443
|
-
|
|
1444
|
-
return BrandsGetResult(
|
|
1445
|
-
data=result.data )
|
|
2108
|
+
return result
|
|
1446
2109
|
|
|
1447
2110
|
|
|
1448
2111
|
|
|
2112
|
+
async def search(
|
|
2113
|
+
self,
|
|
2114
|
+
query: BrandsSearchQuery,
|
|
2115
|
+
limit: int | None = None,
|
|
2116
|
+
cursor: str | None = None,
|
|
2117
|
+
fields: list[list[str]] | None = None,
|
|
2118
|
+
) -> BrandsSearchResult:
|
|
2119
|
+
"""
|
|
2120
|
+
Search brands records from Airbyte cache.
|
|
2121
|
+
|
|
2122
|
+
This operation searches cached data from Airbyte syncs.
|
|
2123
|
+
Only available in hosted execution mode.
|
|
2124
|
+
|
|
2125
|
+
Available filter fields (BrandsSearchFilter):
|
|
2126
|
+
- active: Indicates whether the brand is set as active
|
|
2127
|
+
- brand_url: The public URL of the brand
|
|
2128
|
+
- created_at: Timestamp when the brand was created
|
|
2129
|
+
- default: Indicates whether the brand is the default brand for tickets generated from non-branded channels
|
|
2130
|
+
- has_help_center: Indicates whether the brand has a Help Center enabled
|
|
2131
|
+
- help_center_state: The state of the Help Center, with allowed values of enabled, disabled, or restricted
|
|
2132
|
+
- host_mapping: The host mapping configuration for the brand, visible only to administrators
|
|
2133
|
+
- id: Unique identifier automatically assigned when the brand is created
|
|
2134
|
+
- is_deleted: Indicates whether the brand has been deleted
|
|
2135
|
+
- logo: Brand logo image file represented as an Attachment object
|
|
2136
|
+
- name: The name of the brand
|
|
2137
|
+
- signature_template: The signature template used for the brand
|
|
2138
|
+
- subdomain: The subdomain associated with the brand
|
|
2139
|
+
- ticket_form_ids: Array of ticket form IDs that are available for use by this brand
|
|
2140
|
+
- updated_at: Timestamp when the brand was last updated
|
|
2141
|
+
- url: The API URL for accessing this brand resource
|
|
2142
|
+
|
|
2143
|
+
Args:
|
|
2144
|
+
query: Filter and sort conditions. Supports operators like eq, neq, gt, gte, lt, lte,
|
|
2145
|
+
in, like, fuzzy, keyword, not, and, or. Example: {"filter": {"eq": {"status": "active"}}}
|
|
2146
|
+
limit: Maximum results to return (default 1000)
|
|
2147
|
+
cursor: Pagination cursor from previous response's next_cursor
|
|
2148
|
+
fields: Field paths to include in results. Each path is a list of keys for nested access.
|
|
2149
|
+
Example: [["id"], ["user", "name"]] returns id and user.name fields.
|
|
2150
|
+
|
|
2151
|
+
Returns:
|
|
2152
|
+
BrandsSearchResult with hits (list of AirbyteSearchHit[BrandsSearchData]) and pagination info
|
|
2153
|
+
|
|
2154
|
+
Raises:
|
|
2155
|
+
NotImplementedError: If called in local execution mode
|
|
2156
|
+
"""
|
|
2157
|
+
params: dict[str, Any] = {"query": query}
|
|
2158
|
+
if limit is not None:
|
|
2159
|
+
params["limit"] = limit
|
|
2160
|
+
if cursor is not None:
|
|
2161
|
+
params["cursor"] = cursor
|
|
2162
|
+
if fields is not None:
|
|
2163
|
+
params["fields"] = fields
|
|
2164
|
+
|
|
2165
|
+
result = await self._connector.execute("brands", "search", params)
|
|
2166
|
+
|
|
2167
|
+
# Parse response into typed result
|
|
2168
|
+
return BrandsSearchResult(
|
|
2169
|
+
hits=[
|
|
2170
|
+
AirbyteSearchHit[BrandsSearchData](
|
|
2171
|
+
id=hit.get("id"),
|
|
2172
|
+
score=hit.get("score"),
|
|
2173
|
+
data=BrandsSearchData(**hit.get("data", {}))
|
|
2174
|
+
)
|
|
2175
|
+
for hit in result.get("hits", [])
|
|
2176
|
+
],
|
|
2177
|
+
next_cursor=result.get("next_cursor"),
|
|
2178
|
+
took_ms=result.get("took_ms")
|
|
2179
|
+
)
|
|
2180
|
+
|
|
1449
2181
|
class ViewsQuery:
|
|
1450
2182
|
"""
|
|
1451
2183
|
Query class for Views entity operations.
|
|
@@ -1494,7 +2226,8 @@ class ViewsQuery:
|
|
|
1494
2226
|
# Cast generic envelope to concrete typed result
|
|
1495
2227
|
return ViewsListResult(
|
|
1496
2228
|
data=result.data,
|
|
1497
|
-
meta=result.meta
|
|
2229
|
+
meta=result.meta
|
|
2230
|
+
)
|
|
1498
2231
|
|
|
1499
2232
|
|
|
1500
2233
|
|
|
@@ -1502,7 +2235,7 @@ class ViewsQuery:
|
|
|
1502
2235
|
self,
|
|
1503
2236
|
view_id: str,
|
|
1504
2237
|
**kwargs
|
|
1505
|
-
) ->
|
|
2238
|
+
) -> View:
|
|
1506
2239
|
"""
|
|
1507
2240
|
Returns a view by its ID
|
|
1508
2241
|
|
|
@@ -1511,7 +2244,7 @@ class ViewsQuery:
|
|
|
1511
2244
|
**kwargs: Additional parameters
|
|
1512
2245
|
|
|
1513
2246
|
Returns:
|
|
1514
|
-
|
|
2247
|
+
View
|
|
1515
2248
|
"""
|
|
1516
2249
|
params = {k: v for k, v in {
|
|
1517
2250
|
"view_id": view_id,
|
|
@@ -1519,9 +2252,7 @@ class ViewsQuery:
|
|
|
1519
2252
|
}.items() if v is not None}
|
|
1520
2253
|
|
|
1521
2254
|
result = await self._connector.execute("views", "get", params)
|
|
1522
|
-
|
|
1523
|
-
return ViewsGetResult(
|
|
1524
|
-
data=result.data )
|
|
2255
|
+
return result
|
|
1525
2256
|
|
|
1526
2257
|
|
|
1527
2258
|
|
|
@@ -1579,7 +2310,8 @@ class MacrosQuery:
|
|
|
1579
2310
|
# Cast generic envelope to concrete typed result
|
|
1580
2311
|
return MacrosListResult(
|
|
1581
2312
|
data=result.data,
|
|
1582
|
-
meta=result.meta
|
|
2313
|
+
meta=result.meta
|
|
2314
|
+
)
|
|
1583
2315
|
|
|
1584
2316
|
|
|
1585
2317
|
|
|
@@ -1587,7 +2319,7 @@ class MacrosQuery:
|
|
|
1587
2319
|
self,
|
|
1588
2320
|
macro_id: str,
|
|
1589
2321
|
**kwargs
|
|
1590
|
-
) ->
|
|
2322
|
+
) -> Macro:
|
|
1591
2323
|
"""
|
|
1592
2324
|
Returns a macro by its ID
|
|
1593
2325
|
|
|
@@ -1596,7 +2328,7 @@ class MacrosQuery:
|
|
|
1596
2328
|
**kwargs: Additional parameters
|
|
1597
2329
|
|
|
1598
2330
|
Returns:
|
|
1599
|
-
|
|
2331
|
+
Macro
|
|
1600
2332
|
"""
|
|
1601
2333
|
params = {k: v for k, v in {
|
|
1602
2334
|
"macro_id": macro_id,
|
|
@@ -1604,9 +2336,7 @@ class MacrosQuery:
|
|
|
1604
2336
|
}.items() if v is not None}
|
|
1605
2337
|
|
|
1606
2338
|
result = await self._connector.execute("macros", "get", params)
|
|
1607
|
-
|
|
1608
|
-
return MacrosGetResult(
|
|
1609
|
-
data=result.data )
|
|
2339
|
+
return result
|
|
1610
2340
|
|
|
1611
2341
|
|
|
1612
2342
|
|
|
@@ -1652,7 +2382,8 @@ class TriggersQuery:
|
|
|
1652
2382
|
# Cast generic envelope to concrete typed result
|
|
1653
2383
|
return TriggersListResult(
|
|
1654
2384
|
data=result.data,
|
|
1655
|
-
meta=result.meta
|
|
2385
|
+
meta=result.meta
|
|
2386
|
+
)
|
|
1656
2387
|
|
|
1657
2388
|
|
|
1658
2389
|
|
|
@@ -1660,7 +2391,7 @@ class TriggersQuery:
|
|
|
1660
2391
|
self,
|
|
1661
2392
|
trigger_id: str,
|
|
1662
2393
|
**kwargs
|
|
1663
|
-
) ->
|
|
2394
|
+
) -> Trigger:
|
|
1664
2395
|
"""
|
|
1665
2396
|
Returns a trigger by its ID
|
|
1666
2397
|
|
|
@@ -1669,7 +2400,7 @@ class TriggersQuery:
|
|
|
1669
2400
|
**kwargs: Additional parameters
|
|
1670
2401
|
|
|
1671
2402
|
Returns:
|
|
1672
|
-
|
|
2403
|
+
Trigger
|
|
1673
2404
|
"""
|
|
1674
2405
|
params = {k: v for k, v in {
|
|
1675
2406
|
"trigger_id": trigger_id,
|
|
@@ -1677,9 +2408,7 @@ class TriggersQuery:
|
|
|
1677
2408
|
}.items() if v is not None}
|
|
1678
2409
|
|
|
1679
2410
|
result = await self._connector.execute("triggers", "get", params)
|
|
1680
|
-
|
|
1681
|
-
return TriggersGetResult(
|
|
1682
|
-
data=result.data )
|
|
2411
|
+
return result
|
|
1683
2412
|
|
|
1684
2413
|
|
|
1685
2414
|
|
|
@@ -1722,7 +2451,8 @@ class AutomationsQuery:
|
|
|
1722
2451
|
# Cast generic envelope to concrete typed result
|
|
1723
2452
|
return AutomationsListResult(
|
|
1724
2453
|
data=result.data,
|
|
1725
|
-
meta=result.meta
|
|
2454
|
+
meta=result.meta
|
|
2455
|
+
)
|
|
1726
2456
|
|
|
1727
2457
|
|
|
1728
2458
|
|
|
@@ -1730,7 +2460,7 @@ class AutomationsQuery:
|
|
|
1730
2460
|
self,
|
|
1731
2461
|
automation_id: str,
|
|
1732
2462
|
**kwargs
|
|
1733
|
-
) ->
|
|
2463
|
+
) -> Automation:
|
|
1734
2464
|
"""
|
|
1735
2465
|
Returns an automation by its ID
|
|
1736
2466
|
|
|
@@ -1739,7 +2469,7 @@ class AutomationsQuery:
|
|
|
1739
2469
|
**kwargs: Additional parameters
|
|
1740
2470
|
|
|
1741
2471
|
Returns:
|
|
1742
|
-
|
|
2472
|
+
Automation
|
|
1743
2473
|
"""
|
|
1744
2474
|
params = {k: v for k, v in {
|
|
1745
2475
|
"automation_id": automation_id,
|
|
@@ -1747,9 +2477,7 @@ class AutomationsQuery:
|
|
|
1747
2477
|
}.items() if v is not None}
|
|
1748
2478
|
|
|
1749
2479
|
result = await self._connector.execute("automations", "get", params)
|
|
1750
|
-
|
|
1751
|
-
return AutomationsGetResult(
|
|
1752
|
-
data=result.data )
|
|
2480
|
+
return result
|
|
1753
2481
|
|
|
1754
2482
|
|
|
1755
2483
|
|
|
@@ -1786,9 +2514,65 @@ class TagsQuery:
|
|
|
1786
2514
|
# Cast generic envelope to concrete typed result
|
|
1787
2515
|
return TagsListResult(
|
|
1788
2516
|
data=result.data,
|
|
1789
|
-
meta=result.meta
|
|
2517
|
+
meta=result.meta
|
|
2518
|
+
)
|
|
2519
|
+
|
|
2520
|
+
|
|
2521
|
+
|
|
2522
|
+
async def search(
|
|
2523
|
+
self,
|
|
2524
|
+
query: TagsSearchQuery,
|
|
2525
|
+
limit: int | None = None,
|
|
2526
|
+
cursor: str | None = None,
|
|
2527
|
+
fields: list[list[str]] | None = None,
|
|
2528
|
+
) -> TagsSearchResult:
|
|
2529
|
+
"""
|
|
2530
|
+
Search tags records from Airbyte cache.
|
|
1790
2531
|
|
|
2532
|
+
This operation searches cached data from Airbyte syncs.
|
|
2533
|
+
Only available in hosted execution mode.
|
|
1791
2534
|
|
|
2535
|
+
Available filter fields (TagsSearchFilter):
|
|
2536
|
+
- count: The number of times this tag has been used across resources
|
|
2537
|
+
- name: The tag name string used to label and categorize resources
|
|
2538
|
+
|
|
2539
|
+
Args:
|
|
2540
|
+
query: Filter and sort conditions. Supports operators like eq, neq, gt, gte, lt, lte,
|
|
2541
|
+
in, like, fuzzy, keyword, not, and, or. Example: {"filter": {"eq": {"status": "active"}}}
|
|
2542
|
+
limit: Maximum results to return (default 1000)
|
|
2543
|
+
cursor: Pagination cursor from previous response's next_cursor
|
|
2544
|
+
fields: Field paths to include in results. Each path is a list of keys for nested access.
|
|
2545
|
+
Example: [["id"], ["user", "name"]] returns id and user.name fields.
|
|
2546
|
+
|
|
2547
|
+
Returns:
|
|
2548
|
+
TagsSearchResult with hits (list of AirbyteSearchHit[TagsSearchData]) and pagination info
|
|
2549
|
+
|
|
2550
|
+
Raises:
|
|
2551
|
+
NotImplementedError: If called in local execution mode
|
|
2552
|
+
"""
|
|
2553
|
+
params: dict[str, Any] = {"query": query}
|
|
2554
|
+
if limit is not None:
|
|
2555
|
+
params["limit"] = limit
|
|
2556
|
+
if cursor is not None:
|
|
2557
|
+
params["cursor"] = cursor
|
|
2558
|
+
if fields is not None:
|
|
2559
|
+
params["fields"] = fields
|
|
2560
|
+
|
|
2561
|
+
result = await self._connector.execute("tags", "search", params)
|
|
2562
|
+
|
|
2563
|
+
# Parse response into typed result
|
|
2564
|
+
return TagsSearchResult(
|
|
2565
|
+
hits=[
|
|
2566
|
+
AirbyteSearchHit[TagsSearchData](
|
|
2567
|
+
id=hit.get("id"),
|
|
2568
|
+
score=hit.get("score"),
|
|
2569
|
+
data=TagsSearchData(**hit.get("data", {}))
|
|
2570
|
+
)
|
|
2571
|
+
for hit in result.get("hits", [])
|
|
2572
|
+
],
|
|
2573
|
+
next_cursor=result.get("next_cursor"),
|
|
2574
|
+
took_ms=result.get("took_ms")
|
|
2575
|
+
)
|
|
1792
2576
|
|
|
1793
2577
|
class SatisfactionRatingsQuery:
|
|
1794
2578
|
"""
|
|
@@ -1832,7 +2616,8 @@ class SatisfactionRatingsQuery:
|
|
|
1832
2616
|
# Cast generic envelope to concrete typed result
|
|
1833
2617
|
return SatisfactionRatingsListResult(
|
|
1834
2618
|
data=result.data,
|
|
1835
|
-
meta=result.meta
|
|
2619
|
+
meta=result.meta
|
|
2620
|
+
)
|
|
1836
2621
|
|
|
1837
2622
|
|
|
1838
2623
|
|
|
@@ -1840,7 +2625,7 @@ class SatisfactionRatingsQuery:
|
|
|
1840
2625
|
self,
|
|
1841
2626
|
satisfaction_rating_id: str,
|
|
1842
2627
|
**kwargs
|
|
1843
|
-
) ->
|
|
2628
|
+
) -> SatisfactionRating:
|
|
1844
2629
|
"""
|
|
1845
2630
|
Returns a satisfaction rating by its ID
|
|
1846
2631
|
|
|
@@ -1849,7 +2634,7 @@ class SatisfactionRatingsQuery:
|
|
|
1849
2634
|
**kwargs: Additional parameters
|
|
1850
2635
|
|
|
1851
2636
|
Returns:
|
|
1852
|
-
|
|
2637
|
+
SatisfactionRating
|
|
1853
2638
|
"""
|
|
1854
2639
|
params = {k: v for k, v in {
|
|
1855
2640
|
"satisfaction_rating_id": satisfaction_rating_id,
|
|
@@ -1857,11 +2642,74 @@ class SatisfactionRatingsQuery:
|
|
|
1857
2642
|
}.items() if v is not None}
|
|
1858
2643
|
|
|
1859
2644
|
result = await self._connector.execute("satisfaction_ratings", "get", params)
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
2645
|
+
return result
|
|
2646
|
+
|
|
2647
|
+
|
|
2648
|
+
|
|
2649
|
+
async def search(
|
|
2650
|
+
self,
|
|
2651
|
+
query: SatisfactionRatingsSearchQuery,
|
|
2652
|
+
limit: int | None = None,
|
|
2653
|
+
cursor: str | None = None,
|
|
2654
|
+
fields: list[list[str]] | None = None,
|
|
2655
|
+
) -> SatisfactionRatingsSearchResult:
|
|
2656
|
+
"""
|
|
2657
|
+
Search satisfaction_ratings records from Airbyte cache.
|
|
1863
2658
|
|
|
2659
|
+
This operation searches cached data from Airbyte syncs.
|
|
2660
|
+
Only available in hosted execution mode.
|
|
1864
2661
|
|
|
2662
|
+
Available filter fields (SatisfactionRatingsSearchFilter):
|
|
2663
|
+
- assignee_id: The identifier of the agent assigned to the ticket at the time the rating was submitted
|
|
2664
|
+
- comment: Optional comment provided by the requester with the rating
|
|
2665
|
+
- created_at: Timestamp indicating when the satisfaction rating was created
|
|
2666
|
+
- group_id: The identifier of the group assigned to the ticket at the time the rating was submitted
|
|
2667
|
+
- id: Unique identifier for the satisfaction rating, automatically assigned upon creation
|
|
2668
|
+
- reason: Free-text reason for a bad rating provided by the requester in a follow-up question
|
|
2669
|
+
- reason_id: Identifier for the predefined reason given for a negative rating, only applicable when score is '...
|
|
2670
|
+
- requester_id: The identifier of the ticket requester who submitted the satisfaction rating
|
|
2671
|
+
- score: The satisfaction rating value: 'offered', 'unoffered', 'good', or 'bad'
|
|
2672
|
+
- ticket_id: The identifier of the ticket being rated
|
|
2673
|
+
- updated_at: Timestamp indicating when the satisfaction rating was last updated
|
|
2674
|
+
- url: The API URL of this satisfaction rating resource
|
|
2675
|
+
|
|
2676
|
+
Args:
|
|
2677
|
+
query: Filter and sort conditions. Supports operators like eq, neq, gt, gte, lt, lte,
|
|
2678
|
+
in, like, fuzzy, keyword, not, and, or. Example: {"filter": {"eq": {"status": "active"}}}
|
|
2679
|
+
limit: Maximum results to return (default 1000)
|
|
2680
|
+
cursor: Pagination cursor from previous response's next_cursor
|
|
2681
|
+
fields: Field paths to include in results. Each path is a list of keys for nested access.
|
|
2682
|
+
Example: [["id"], ["user", "name"]] returns id and user.name fields.
|
|
2683
|
+
|
|
2684
|
+
Returns:
|
|
2685
|
+
SatisfactionRatingsSearchResult with hits (list of AirbyteSearchHit[SatisfactionRatingsSearchData]) and pagination info
|
|
2686
|
+
|
|
2687
|
+
Raises:
|
|
2688
|
+
NotImplementedError: If called in local execution mode
|
|
2689
|
+
"""
|
|
2690
|
+
params: dict[str, Any] = {"query": query}
|
|
2691
|
+
if limit is not None:
|
|
2692
|
+
params["limit"] = limit
|
|
2693
|
+
if cursor is not None:
|
|
2694
|
+
params["cursor"] = cursor
|
|
2695
|
+
if fields is not None:
|
|
2696
|
+
params["fields"] = fields
|
|
2697
|
+
|
|
2698
|
+
result = await self._connector.execute("satisfaction_ratings", "search", params)
|
|
2699
|
+
|
|
2700
|
+
# Parse response into typed result
|
|
2701
|
+
return SatisfactionRatingsSearchResult(
|
|
2702
|
+
hits=[
|
|
2703
|
+
AirbyteSearchHit[SatisfactionRatingsSearchData](
|
|
2704
|
+
id=hit.get("id"),
|
|
2705
|
+
score=hit.get("score"),
|
|
2706
|
+
data=SatisfactionRatingsSearchData(**hit.get("data", {}))
|
|
2707
|
+
)
|
|
2708
|
+
for hit in result.get("hits", [])
|
|
2709
|
+
],
|
|
2710
|
+
next_cursor=result.get("next_cursor"),
|
|
2711
|
+
took_ms=result.get("took_ms")
|
|
2712
|
+
)
|
|
1865
2713
|
|
|
1866
2714
|
class GroupMembershipsQuery:
|
|
1867
2715
|
"""
|
|
@@ -1896,7 +2744,8 @@ class GroupMembershipsQuery:
|
|
|
1896
2744
|
# Cast generic envelope to concrete typed result
|
|
1897
2745
|
return GroupMembershipsListResult(
|
|
1898
2746
|
data=result.data,
|
|
1899
|
-
meta=result.meta
|
|
2747
|
+
meta=result.meta
|
|
2748
|
+
)
|
|
1900
2749
|
|
|
1901
2750
|
|
|
1902
2751
|
|
|
@@ -1933,7 +2782,8 @@ class OrganizationMembershipsQuery:
|
|
|
1933
2782
|
# Cast generic envelope to concrete typed result
|
|
1934
2783
|
return OrganizationMembershipsListResult(
|
|
1935
2784
|
data=result.data,
|
|
1936
|
-
meta=result.meta
|
|
2785
|
+
meta=result.meta
|
|
2786
|
+
)
|
|
1937
2787
|
|
|
1938
2788
|
|
|
1939
2789
|
|
|
@@ -1970,7 +2820,8 @@ class SlaPoliciesQuery:
|
|
|
1970
2820
|
# Cast generic envelope to concrete typed result
|
|
1971
2821
|
return SlaPoliciesListResult(
|
|
1972
2822
|
data=result.data,
|
|
1973
|
-
meta=result.meta
|
|
2823
|
+
meta=result.meta
|
|
2824
|
+
)
|
|
1974
2825
|
|
|
1975
2826
|
|
|
1976
2827
|
|
|
@@ -1978,7 +2829,7 @@ class SlaPoliciesQuery:
|
|
|
1978
2829
|
self,
|
|
1979
2830
|
sla_policy_id: str,
|
|
1980
2831
|
**kwargs
|
|
1981
|
-
) ->
|
|
2832
|
+
) -> SLAPolicy:
|
|
1982
2833
|
"""
|
|
1983
2834
|
Returns an SLA policy by its ID
|
|
1984
2835
|
|
|
@@ -1987,7 +2838,7 @@ class SlaPoliciesQuery:
|
|
|
1987
2838
|
**kwargs: Additional parameters
|
|
1988
2839
|
|
|
1989
2840
|
Returns:
|
|
1990
|
-
|
|
2841
|
+
SLAPolicy
|
|
1991
2842
|
"""
|
|
1992
2843
|
params = {k: v for k, v in {
|
|
1993
2844
|
"sla_policy_id": sla_policy_id,
|
|
@@ -1995,9 +2846,7 @@ class SlaPoliciesQuery:
|
|
|
1995
2846
|
}.items() if v is not None}
|
|
1996
2847
|
|
|
1997
2848
|
result = await self._connector.execute("sla_policies", "get", params)
|
|
1998
|
-
|
|
1999
|
-
return SlaPoliciesGetResult(
|
|
2000
|
-
data=result.data )
|
|
2849
|
+
return result
|
|
2001
2850
|
|
|
2002
2851
|
|
|
2003
2852
|
|
|
@@ -2040,7 +2889,8 @@ class TicketFormsQuery:
|
|
|
2040
2889
|
# Cast generic envelope to concrete typed result
|
|
2041
2890
|
return TicketFormsListResult(
|
|
2042
2891
|
data=result.data,
|
|
2043
|
-
meta=result.meta
|
|
2892
|
+
meta=result.meta
|
|
2893
|
+
)
|
|
2044
2894
|
|
|
2045
2895
|
|
|
2046
2896
|
|
|
@@ -2048,7 +2898,7 @@ class TicketFormsQuery:
|
|
|
2048
2898
|
self,
|
|
2049
2899
|
ticket_form_id: str,
|
|
2050
2900
|
**kwargs
|
|
2051
|
-
) ->
|
|
2901
|
+
) -> TicketForm:
|
|
2052
2902
|
"""
|
|
2053
2903
|
Returns a ticket form by its ID
|
|
2054
2904
|
|
|
@@ -2057,7 +2907,7 @@ class TicketFormsQuery:
|
|
|
2057
2907
|
**kwargs: Additional parameters
|
|
2058
2908
|
|
|
2059
2909
|
Returns:
|
|
2060
|
-
|
|
2910
|
+
TicketForm
|
|
2061
2911
|
"""
|
|
2062
2912
|
params = {k: v for k, v in {
|
|
2063
2913
|
"ticket_form_id": ticket_form_id,
|
|
@@ -2065,11 +2915,79 @@ class TicketFormsQuery:
|
|
|
2065
2915
|
}.items() if v is not None}
|
|
2066
2916
|
|
|
2067
2917
|
result = await self._connector.execute("ticket_forms", "get", params)
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
data=result.data )
|
|
2918
|
+
return result
|
|
2919
|
+
|
|
2071
2920
|
|
|
2072
2921
|
|
|
2922
|
+
async def search(
|
|
2923
|
+
self,
|
|
2924
|
+
query: TicketFormsSearchQuery,
|
|
2925
|
+
limit: int | None = None,
|
|
2926
|
+
cursor: str | None = None,
|
|
2927
|
+
fields: list[list[str]] | None = None,
|
|
2928
|
+
) -> TicketFormsSearchResult:
|
|
2929
|
+
"""
|
|
2930
|
+
Search ticket_forms records from Airbyte cache.
|
|
2931
|
+
|
|
2932
|
+
This operation searches cached data from Airbyte syncs.
|
|
2933
|
+
Only available in hosted execution mode.
|
|
2934
|
+
|
|
2935
|
+
Available filter fields (TicketFormsSearchFilter):
|
|
2936
|
+
- active: Indicates if the form is set as active
|
|
2937
|
+
- agent_conditions: Array of condition sets for agent workspaces
|
|
2938
|
+
- created_at: Timestamp when the ticket form was created
|
|
2939
|
+
- default: Indicates if the form is the default form for this account
|
|
2940
|
+
- display_name: The name of the form that is displayed to an end user
|
|
2941
|
+
- end_user_conditions: Array of condition sets for end user products
|
|
2942
|
+
- end_user_visible: Indicates if the form is visible to the end user
|
|
2943
|
+
- id: Unique identifier for the ticket form, automatically assigned when creating the form
|
|
2944
|
+
- in_all_brands: Indicates if the form is available for use in all brands on this account
|
|
2945
|
+
- name: The name of the ticket form
|
|
2946
|
+
- position: The position of this form among other forms in the account, such as in a dropdown
|
|
2947
|
+
- raw_display_name: The dynamic content placeholder if present, or the display_name value if not
|
|
2948
|
+
- raw_name: The dynamic content placeholder if present, or the name value if not
|
|
2949
|
+
- restricted_brand_ids: IDs of all brands that this ticket form is restricted to
|
|
2950
|
+
- ticket_field_ids: IDs of all ticket fields included in this ticket form, ordered to determine field display sequenc...
|
|
2951
|
+
- updated_at: Timestamp of the last update to the ticket form
|
|
2952
|
+
- url: URL of the ticket form
|
|
2953
|
+
|
|
2954
|
+
Args:
|
|
2955
|
+
query: Filter and sort conditions. Supports operators like eq, neq, gt, gte, lt, lte,
|
|
2956
|
+
in, like, fuzzy, keyword, not, and, or. Example: {"filter": {"eq": {"status": "active"}}}
|
|
2957
|
+
limit: Maximum results to return (default 1000)
|
|
2958
|
+
cursor: Pagination cursor from previous response's next_cursor
|
|
2959
|
+
fields: Field paths to include in results. Each path is a list of keys for nested access.
|
|
2960
|
+
Example: [["id"], ["user", "name"]] returns id and user.name fields.
|
|
2961
|
+
|
|
2962
|
+
Returns:
|
|
2963
|
+
TicketFormsSearchResult with hits (list of AirbyteSearchHit[TicketFormsSearchData]) and pagination info
|
|
2964
|
+
|
|
2965
|
+
Raises:
|
|
2966
|
+
NotImplementedError: If called in local execution mode
|
|
2967
|
+
"""
|
|
2968
|
+
params: dict[str, Any] = {"query": query}
|
|
2969
|
+
if limit is not None:
|
|
2970
|
+
params["limit"] = limit
|
|
2971
|
+
if cursor is not None:
|
|
2972
|
+
params["cursor"] = cursor
|
|
2973
|
+
if fields is not None:
|
|
2974
|
+
params["fields"] = fields
|
|
2975
|
+
|
|
2976
|
+
result = await self._connector.execute("ticket_forms", "search", params)
|
|
2977
|
+
|
|
2978
|
+
# Parse response into typed result
|
|
2979
|
+
return TicketFormsSearchResult(
|
|
2980
|
+
hits=[
|
|
2981
|
+
AirbyteSearchHit[TicketFormsSearchData](
|
|
2982
|
+
id=hit.get("id"),
|
|
2983
|
+
score=hit.get("score"),
|
|
2984
|
+
data=TicketFormsSearchData(**hit.get("data", {}))
|
|
2985
|
+
)
|
|
2986
|
+
for hit in result.get("hits", [])
|
|
2987
|
+
],
|
|
2988
|
+
next_cursor=result.get("next_cursor"),
|
|
2989
|
+
took_ms=result.get("took_ms")
|
|
2990
|
+
)
|
|
2073
2991
|
|
|
2074
2992
|
class ArticlesQuery:
|
|
2075
2993
|
"""
|
|
@@ -2110,7 +3028,8 @@ class ArticlesQuery:
|
|
|
2110
3028
|
# Cast generic envelope to concrete typed result
|
|
2111
3029
|
return ArticlesListResult(
|
|
2112
3030
|
data=result.data,
|
|
2113
|
-
meta=result.meta
|
|
3031
|
+
meta=result.meta
|
|
3032
|
+
)
|
|
2114
3033
|
|
|
2115
3034
|
|
|
2116
3035
|
|
|
@@ -2118,7 +3037,7 @@ class ArticlesQuery:
|
|
|
2118
3037
|
self,
|
|
2119
3038
|
id: str | None = None,
|
|
2120
3039
|
**kwargs
|
|
2121
|
-
) ->
|
|
3040
|
+
) -> Article:
|
|
2122
3041
|
"""
|
|
2123
3042
|
Retrieves the details of a specific article
|
|
2124
3043
|
|
|
@@ -2127,7 +3046,7 @@ class ArticlesQuery:
|
|
|
2127
3046
|
**kwargs: Additional parameters
|
|
2128
3047
|
|
|
2129
3048
|
Returns:
|
|
2130
|
-
|
|
3049
|
+
Article
|
|
2131
3050
|
"""
|
|
2132
3051
|
params = {k: v for k, v in {
|
|
2133
3052
|
"id": id,
|
|
@@ -2135,9 +3054,7 @@ class ArticlesQuery:
|
|
|
2135
3054
|
}.items() if v is not None}
|
|
2136
3055
|
|
|
2137
3056
|
result = await self._connector.execute("articles", "get", params)
|
|
2138
|
-
|
|
2139
|
-
return ArticlesGetResult(
|
|
2140
|
-
data=result.data )
|
|
3057
|
+
return result
|
|
2141
3058
|
|
|
2142
3059
|
|
|
2143
3060
|
|
|
@@ -2177,7 +3094,8 @@ class ArticleAttachmentsQuery:
|
|
|
2177
3094
|
# Cast generic envelope to concrete typed result
|
|
2178
3095
|
return ArticleAttachmentsListResult(
|
|
2179
3096
|
data=result.data,
|
|
2180
|
-
meta=result.meta
|
|
3097
|
+
meta=result.meta
|
|
3098
|
+
)
|
|
2181
3099
|
|
|
2182
3100
|
|
|
2183
3101
|
|
|
@@ -2186,7 +3104,7 @@ class ArticleAttachmentsQuery:
|
|
|
2186
3104
|
article_id: str,
|
|
2187
3105
|
attachment_id: str,
|
|
2188
3106
|
**kwargs
|
|
2189
|
-
) ->
|
|
3107
|
+
) -> ArticleAttachment:
|
|
2190
3108
|
"""
|
|
2191
3109
|
Retrieves the metadata of a specific attachment for a specific article
|
|
2192
3110
|
|
|
@@ -2196,7 +3114,7 @@ class ArticleAttachmentsQuery:
|
|
|
2196
3114
|
**kwargs: Additional parameters
|
|
2197
3115
|
|
|
2198
3116
|
Returns:
|
|
2199
|
-
|
|
3117
|
+
ArticleAttachment
|
|
2200
3118
|
"""
|
|
2201
3119
|
params = {k: v for k, v in {
|
|
2202
3120
|
"article_id": article_id,
|
|
@@ -2205,9 +3123,7 @@ class ArticleAttachmentsQuery:
|
|
|
2205
3123
|
}.items() if v is not None}
|
|
2206
3124
|
|
|
2207
3125
|
result = await self._connector.execute("article_attachments", "get", params)
|
|
2208
|
-
|
|
2209
|
-
return ArticleAttachmentsGetResult(
|
|
2210
|
-
data=result.data )
|
|
3126
|
+
return result
|
|
2211
3127
|
|
|
2212
3128
|
|
|
2213
3129
|
|