airbyte-agent-zendesk-chat 0.1.14__py3-none-any.whl → 0.1.22__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.
Potentially problematic release.
This version of airbyte-agent-zendesk-chat might be problematic. Click here for more details.
- airbyte_agent_zendesk_chat/__init__.py +4 -2
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/connector_model_loader.py +4 -8
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/executor/hosted_executor.py +5 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/executor/local_executor.py +81 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/executor/models.py +12 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/http_client.py +1 -1
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/introspection.py +12 -5
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/operations.py +10 -0
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/security.py +0 -1
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/types.py +16 -1
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/validation.py +20 -0
- airbyte_agent_zendesk_chat/connector.py +42 -2
- airbyte_agent_zendesk_chat/connector_model.py +2 -2
- airbyte_agent_zendesk_chat/models.py +40 -21
- {airbyte_agent_zendesk_chat-0.1.14.dist-info → airbyte_agent_zendesk_chat-0.1.22.dist-info}/METADATA +12 -12
- {airbyte_agent_zendesk_chat-0.1.14.dist-info → airbyte_agent_zendesk_chat-0.1.22.dist-info}/RECORD +17 -17
- {airbyte_agent_zendesk_chat-0.1.14.dist-info → airbyte_agent_zendesk_chat-0.1.22.dist-info}/WHEEL +0 -0
|
@@ -14,10 +14,10 @@ from .models import (
|
|
|
14
14
|
AgentRoles,
|
|
15
15
|
AgentTimeline,
|
|
16
16
|
Ban,
|
|
17
|
+
ChatEngagement,
|
|
17
18
|
ChatConversion,
|
|
18
19
|
WebpathItem,
|
|
19
20
|
ChatHistoryItem,
|
|
20
|
-
ChatEngagement,
|
|
21
21
|
Chat,
|
|
22
22
|
Visitor,
|
|
23
23
|
ChatSession,
|
|
@@ -34,6 +34,7 @@ from .models import (
|
|
|
34
34
|
Trigger,
|
|
35
35
|
AgentTimelineListResultMeta,
|
|
36
36
|
ChatsListResultMeta,
|
|
37
|
+
ZendeskChatCheckResult,
|
|
37
38
|
ZendeskChatExecuteResult,
|
|
38
39
|
ZendeskChatExecuteResultWithMeta,
|
|
39
40
|
AgentsListResult,
|
|
@@ -109,10 +110,10 @@ __all__ = [
|
|
|
109
110
|
"AgentRoles",
|
|
110
111
|
"AgentTimeline",
|
|
111
112
|
"Ban",
|
|
113
|
+
"ChatEngagement",
|
|
112
114
|
"ChatConversion",
|
|
113
115
|
"WebpathItem",
|
|
114
116
|
"ChatHistoryItem",
|
|
115
|
-
"ChatEngagement",
|
|
116
117
|
"Chat",
|
|
117
118
|
"Visitor",
|
|
118
119
|
"ChatSession",
|
|
@@ -129,6 +130,7 @@ __all__ = [
|
|
|
129
130
|
"Trigger",
|
|
130
131
|
"AgentTimelineListResultMeta",
|
|
131
132
|
"ChatsListResultMeta",
|
|
133
|
+
"ZendeskChatCheckResult",
|
|
132
134
|
"ZendeskChatExecuteResult",
|
|
133
135
|
"ZendeskChatExecuteResultWithMeta",
|
|
134
136
|
"AgentsListResult",
|
|
@@ -496,6 +496,9 @@ def convert_openapi_to_connector_model(spec: OpenAPIConnector) -> ConnectorModel
|
|
|
496
496
|
# Extract untested flag
|
|
497
497
|
untested = getattr(operation, "x_airbyte_untested", None) or False
|
|
498
498
|
|
|
499
|
+
# Extract preferred_for_check flag
|
|
500
|
+
preferred_for_check = getattr(operation, "x_airbyte_preferred_for_check", None) or False
|
|
501
|
+
|
|
499
502
|
# Create endpoint definition
|
|
500
503
|
endpoint = EndpointDefinition(
|
|
501
504
|
method=method_name.upper(),
|
|
@@ -520,6 +523,7 @@ def convert_openapi_to_connector_model(spec: OpenAPIConnector) -> ConnectorModel
|
|
|
520
523
|
graphql_body=graphql_body,
|
|
521
524
|
file_field=file_field,
|
|
522
525
|
untested=untested,
|
|
526
|
+
preferred_for_check=preferred_for_check,
|
|
523
527
|
)
|
|
524
528
|
|
|
525
529
|
# Add to entities map
|
|
@@ -758,7 +762,6 @@ def _generate_default_auth_config(auth_type: AuthType) -> AirbyteAuthConfig:
|
|
|
758
762
|
description="Authentication bearer token",
|
|
759
763
|
format=None,
|
|
760
764
|
pattern=None,
|
|
761
|
-
airbyte_secret=False,
|
|
762
765
|
default=None,
|
|
763
766
|
)
|
|
764
767
|
},
|
|
@@ -778,7 +781,6 @@ def _generate_default_auth_config(auth_type: AuthType) -> AirbyteAuthConfig:
|
|
|
778
781
|
description="Authentication username",
|
|
779
782
|
format=None,
|
|
780
783
|
pattern=None,
|
|
781
|
-
airbyte_secret=False,
|
|
782
784
|
default=None,
|
|
783
785
|
),
|
|
784
786
|
"password": AuthConfigFieldSpec(
|
|
@@ -787,7 +789,6 @@ def _generate_default_auth_config(auth_type: AuthType) -> AirbyteAuthConfig:
|
|
|
787
789
|
description="Authentication password",
|
|
788
790
|
format=None,
|
|
789
791
|
pattern=None,
|
|
790
|
-
airbyte_secret=False,
|
|
791
792
|
default=None,
|
|
792
793
|
),
|
|
793
794
|
},
|
|
@@ -807,7 +808,6 @@ def _generate_default_auth_config(auth_type: AuthType) -> AirbyteAuthConfig:
|
|
|
807
808
|
description="API authentication key",
|
|
808
809
|
format=None,
|
|
809
810
|
pattern=None,
|
|
810
|
-
airbyte_secret=False,
|
|
811
811
|
default=None,
|
|
812
812
|
)
|
|
813
813
|
},
|
|
@@ -832,7 +832,6 @@ def _generate_default_auth_config(auth_type: AuthType) -> AirbyteAuthConfig:
|
|
|
832
832
|
description="OAuth2 access token",
|
|
833
833
|
format=None,
|
|
834
834
|
pattern=None,
|
|
835
|
-
airbyte_secret=False,
|
|
836
835
|
default=None,
|
|
837
836
|
),
|
|
838
837
|
"refresh_token": AuthConfigFieldSpec(
|
|
@@ -841,7 +840,6 @@ def _generate_default_auth_config(auth_type: AuthType) -> AirbyteAuthConfig:
|
|
|
841
840
|
description="OAuth2 refresh token (optional)",
|
|
842
841
|
format=None,
|
|
843
842
|
pattern=None,
|
|
844
|
-
airbyte_secret=False,
|
|
845
843
|
default=None,
|
|
846
844
|
),
|
|
847
845
|
"client_id": AuthConfigFieldSpec(
|
|
@@ -850,7 +848,6 @@ def _generate_default_auth_config(auth_type: AuthType) -> AirbyteAuthConfig:
|
|
|
850
848
|
description="OAuth2 client ID (optional)",
|
|
851
849
|
format=None,
|
|
852
850
|
pattern=None,
|
|
853
|
-
airbyte_secret=False,
|
|
854
851
|
default=None,
|
|
855
852
|
),
|
|
856
853
|
"client_secret": AuthConfigFieldSpec(
|
|
@@ -859,7 +856,6 @@ def _generate_default_auth_config(auth_type: AuthType) -> AirbyteAuthConfig:
|
|
|
859
856
|
description="OAuth2 client secret (optional)",
|
|
860
857
|
format=None,
|
|
861
858
|
pattern=None,
|
|
862
|
-
airbyte_secret=False,
|
|
863
859
|
default=None,
|
|
864
860
|
),
|
|
865
861
|
},
|
|
@@ -164,6 +164,11 @@ class HostedExecutor:
|
|
|
164
164
|
span.record_exception(e)
|
|
165
165
|
raise
|
|
166
166
|
|
|
167
|
+
async def check(self) -> ExecutionResult:
|
|
168
|
+
"""Perform a health check via the cloud API."""
|
|
169
|
+
config = ExecutionConfig(entity="*", action="check", params={})
|
|
170
|
+
return await self.execute(config)
|
|
171
|
+
|
|
167
172
|
def _parse_execution_result(self, response: dict) -> ExecutionResult:
|
|
168
173
|
"""Parse API response into ExecutionResult.
|
|
169
174
|
|
|
@@ -70,6 +70,14 @@ class _OperationContext:
|
|
|
70
70
|
self.validate_required_body_fields = executor._validate_required_body_fields
|
|
71
71
|
self.extract_records = executor._extract_records
|
|
72
72
|
|
|
73
|
+
@property
|
|
74
|
+
def standard_handler(self) -> _StandardOperationHandler | None:
|
|
75
|
+
"""Return the standard operation handler, or None if not registered."""
|
|
76
|
+
for h in self.executor._operation_handlers:
|
|
77
|
+
if isinstance(h, _StandardOperationHandler):
|
|
78
|
+
return h
|
|
79
|
+
return None
|
|
80
|
+
|
|
73
81
|
|
|
74
82
|
class _OperationHandler(Protocol):
|
|
75
83
|
"""Protocol for operation handlers."""
|
|
@@ -544,6 +552,79 @@ class LocalExecutor:
|
|
|
544
552
|
# These are "expected" execution errors - return them in ExecutionResult
|
|
545
553
|
return ExecutionResult(success=False, data={}, error=str(e))
|
|
546
554
|
|
|
555
|
+
async def check(self) -> ExecutionResult:
|
|
556
|
+
"""Perform a health check by running a lightweight list operation.
|
|
557
|
+
|
|
558
|
+
Finds the operation marked with preferred_for_check=True, or falls back
|
|
559
|
+
to the first list operation. Executes it with limit=1 to verify
|
|
560
|
+
connectivity and credentials.
|
|
561
|
+
|
|
562
|
+
Returns:
|
|
563
|
+
ExecutionResult with data containing status, error, and checked operation details.
|
|
564
|
+
"""
|
|
565
|
+
check_entity = None
|
|
566
|
+
check_endpoint = None
|
|
567
|
+
|
|
568
|
+
# Look for preferred check operation
|
|
569
|
+
for (ent_name, op_action), endpoint in self._operation_index.items():
|
|
570
|
+
if getattr(endpoint, "preferred_for_check", False):
|
|
571
|
+
check_entity = ent_name
|
|
572
|
+
check_endpoint = endpoint
|
|
573
|
+
break
|
|
574
|
+
|
|
575
|
+
# Fallback to first list operation
|
|
576
|
+
if check_endpoint is None:
|
|
577
|
+
for (ent_name, op_action), endpoint in self._operation_index.items():
|
|
578
|
+
if op_action == Action.LIST:
|
|
579
|
+
check_entity = ent_name
|
|
580
|
+
check_endpoint = endpoint
|
|
581
|
+
break
|
|
582
|
+
|
|
583
|
+
if check_endpoint is None or check_entity is None:
|
|
584
|
+
return ExecutionResult(
|
|
585
|
+
success=True,
|
|
586
|
+
data={
|
|
587
|
+
"status": "unhealthy",
|
|
588
|
+
"error": "No list operation available for health check",
|
|
589
|
+
},
|
|
590
|
+
)
|
|
591
|
+
|
|
592
|
+
# Find the standard handler to execute the list operation
|
|
593
|
+
standard_handler = next(
|
|
594
|
+
(h for h in self._operation_handlers if isinstance(h, _StandardOperationHandler)),
|
|
595
|
+
None,
|
|
596
|
+
)
|
|
597
|
+
|
|
598
|
+
if standard_handler is None:
|
|
599
|
+
return ExecutionResult(
|
|
600
|
+
success=True,
|
|
601
|
+
data={
|
|
602
|
+
"status": "unhealthy",
|
|
603
|
+
"error": "No standard handler available",
|
|
604
|
+
},
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
try:
|
|
608
|
+
await standard_handler.execute_operation(check_entity, Action.LIST, {"limit": 1})
|
|
609
|
+
return ExecutionResult(
|
|
610
|
+
success=True,
|
|
611
|
+
data={
|
|
612
|
+
"status": "healthy",
|
|
613
|
+
"checked_entity": check_entity,
|
|
614
|
+
"checked_action": "list",
|
|
615
|
+
},
|
|
616
|
+
)
|
|
617
|
+
except Exception as e:
|
|
618
|
+
return ExecutionResult(
|
|
619
|
+
success=True,
|
|
620
|
+
data={
|
|
621
|
+
"status": "unhealthy",
|
|
622
|
+
"error": str(e),
|
|
623
|
+
"checked_entity": check_entity,
|
|
624
|
+
"checked_action": "list",
|
|
625
|
+
},
|
|
626
|
+
)
|
|
627
|
+
|
|
547
628
|
async def _execute_operation(
|
|
548
629
|
self,
|
|
549
630
|
entity: str,
|
|
@@ -154,6 +154,18 @@ class ExecutorProtocol(Protocol):
|
|
|
154
154
|
"""
|
|
155
155
|
...
|
|
156
156
|
|
|
157
|
+
async def check(self) -> ExecutionResult:
|
|
158
|
+
"""Perform a health check to verify connectivity and credentials.
|
|
159
|
+
|
|
160
|
+
Returns:
|
|
161
|
+
ExecutionResult with data containing:
|
|
162
|
+
- status: "healthy" or "unhealthy"
|
|
163
|
+
- error: Error message if unhealthy
|
|
164
|
+
- checked_entity: Entity used for the check
|
|
165
|
+
- checked_action: Action used for the check
|
|
166
|
+
"""
|
|
167
|
+
...
|
|
168
|
+
|
|
157
169
|
|
|
158
170
|
# ============================================================================
|
|
159
171
|
# Executor Exceptions
|
|
@@ -490,7 +490,7 @@ class HTTPClient:
|
|
|
490
490
|
|
|
491
491
|
if not response_text.strip():
|
|
492
492
|
response_data = {}
|
|
493
|
-
elif "application/json" in content_type or not content_type:
|
|
493
|
+
elif "application/json" in content_type or "+json" in content_type or not content_type:
|
|
494
494
|
response_data = await response.json()
|
|
495
495
|
else:
|
|
496
496
|
error_msg = f"Expected JSON response for {method.upper()} {url}, got content-type: {content_type}"
|
|
@@ -380,7 +380,11 @@ def describe_entities(model: ConnectorModelProtocol) -> list[dict[str, Any]]:
|
|
|
380
380
|
return entities
|
|
381
381
|
|
|
382
382
|
|
|
383
|
-
def generate_tool_description(
|
|
383
|
+
def generate_tool_description(
|
|
384
|
+
model: ConnectorModelProtocol,
|
|
385
|
+
*,
|
|
386
|
+
enable_hosted_mode_features: bool = True,
|
|
387
|
+
) -> str:
|
|
384
388
|
"""Generate AI tool description from connector metadata.
|
|
385
389
|
|
|
386
390
|
Produces a detailed description that includes:
|
|
@@ -393,6 +397,7 @@ def generate_tool_description(model: ConnectorModelProtocol) -> str:
|
|
|
393
397
|
|
|
394
398
|
Args:
|
|
395
399
|
model: Object conforming to ConnectorModelProtocol (e.g., ConnectorModel)
|
|
400
|
+
enable_hosted_mode_features: When False, omit hosted-mode search guidance from the docstring.
|
|
396
401
|
|
|
397
402
|
Returns:
|
|
398
403
|
Formatted description string suitable for AI tool documentation
|
|
@@ -402,8 +407,9 @@ def generate_tool_description(model: ConnectorModelProtocol) -> str:
|
|
|
402
407
|
# at the first empty line and only keeps the initial section.
|
|
403
408
|
|
|
404
409
|
# Entity/action parameter details (including pagination params like limit, starting_after)
|
|
405
|
-
search_field_paths = _collect_search_field_paths(model)
|
|
406
|
-
|
|
410
|
+
search_field_paths = _collect_search_field_paths(model) if enable_hosted_mode_features else {}
|
|
411
|
+
# Avoid a "PARAMETERS:" header because some docstring parsers treat it as a params section marker.
|
|
412
|
+
lines.append("ENTITIES (ACTIONS + PARAMS):")
|
|
407
413
|
for entity in model.entities:
|
|
408
414
|
lines.append(f" {entity.name}:")
|
|
409
415
|
actions = getattr(entity, "actions", []) or []
|
|
@@ -427,8 +433,9 @@ def generate_tool_description(model: ConnectorModelProtocol) -> str:
|
|
|
427
433
|
lines.append(" To paginate: pass starting_after=<last_id> while has_more is true")
|
|
428
434
|
|
|
429
435
|
lines.append("GUIDELINES:")
|
|
430
|
-
|
|
431
|
-
|
|
436
|
+
if enable_hosted_mode_features:
|
|
437
|
+
lines.append(' - Prefer cached search over direct API calls when using execute(): action="search" whenever possible.')
|
|
438
|
+
lines.append(" - Direct API actions (list/get/download) are slower and should be used only if search cannot answer the query.")
|
|
432
439
|
lines.append(" - Keep results small: use params.fields, params.query.filter, small params.limit, and cursor pagination.")
|
|
433
440
|
lines.append(" - If output is too large, refine the query with tighter filters/fields/limit.")
|
|
434
441
|
|
|
@@ -86,6 +86,16 @@ class Operation(BaseModel):
|
|
|
86
86
|
"Validation will generate a warning instead of an error when cassettes are missing."
|
|
87
87
|
),
|
|
88
88
|
)
|
|
89
|
+
x_airbyte_preferred_for_check: bool | None = Field(
|
|
90
|
+
None,
|
|
91
|
+
alias="x-airbyte-preferred-for-check",
|
|
92
|
+
description=(
|
|
93
|
+
"Mark this list operation as the preferred operation for health checks. "
|
|
94
|
+
"When the CHECK action is executed, this operation will be used instead of "
|
|
95
|
+
"falling back to the first available list operation. Choose a lightweight, "
|
|
96
|
+
"always-available endpoint (e.g., users, accounts)."
|
|
97
|
+
),
|
|
98
|
+
)
|
|
89
99
|
|
|
90
100
|
# Future extensions (commented out, defined for future use)
|
|
91
101
|
# from .extensions import PaginationConfig
|
|
@@ -55,7 +55,6 @@ class AuthConfigFieldSpec(BaseModel):
|
|
|
55
55
|
description: str | None = None
|
|
56
56
|
format: str | None = None # e.g., "email", "uri"
|
|
57
57
|
pattern: str | None = None # Regex validation
|
|
58
|
-
airbyte_secret: bool = Field(False, alias="airbyte_secret")
|
|
59
58
|
default: Any | None = None
|
|
60
59
|
|
|
61
60
|
|
|
@@ -15,7 +15,16 @@ from .schema.security import AirbyteAuthConfig
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class Action(str, Enum):
|
|
18
|
-
"""Supported actions for Entity operations.
|
|
18
|
+
"""Supported actions for Entity operations.
|
|
19
|
+
|
|
20
|
+
Standard CRUD actions:
|
|
21
|
+
GET, CREATE, UPDATE, DELETE, LIST
|
|
22
|
+
|
|
23
|
+
Special actions:
|
|
24
|
+
API_SEARCH - Search via API endpoint
|
|
25
|
+
DOWNLOAD - Download file content
|
|
26
|
+
AUTHORIZE - OAuth authorization flow
|
|
27
|
+
"""
|
|
19
28
|
|
|
20
29
|
GET = "get"
|
|
21
30
|
CREATE = "create"
|
|
@@ -223,6 +232,12 @@ class EndpointDefinition(BaseModel):
|
|
|
223
232
|
description="Mark operation as untested to skip cassette validation (from x-airbyte-untested extension)",
|
|
224
233
|
)
|
|
225
234
|
|
|
235
|
+
# Health check support (Airbyte extension)
|
|
236
|
+
preferred_for_check: bool = Field(
|
|
237
|
+
False,
|
|
238
|
+
description="Mark this list operation as preferred for health checks (from x-airbyte-preferred-for-check extension)",
|
|
239
|
+
)
|
|
240
|
+
|
|
226
241
|
|
|
227
242
|
class EntityDefinition(BaseModel):
|
|
228
243
|
"""Definition of an API entity."""
|
|
@@ -810,11 +810,31 @@ def validate_connector_readiness(connector_dir: str | Path) -> Dict[str, Any]:
|
|
|
810
810
|
|
|
811
811
|
success = operations_missing_cassettes == 0 and cassettes_invalid == 0 and total_operations > 0
|
|
812
812
|
|
|
813
|
+
# Check for preferred_for_check on at least one list operation
|
|
814
|
+
has_preferred_check = False
|
|
815
|
+
for entity in config.entities:
|
|
816
|
+
for action_val in entity.actions:
|
|
817
|
+
endpoint = entity.endpoints.get(action_val)
|
|
818
|
+
if endpoint and getattr(endpoint, "preferred_for_check", False):
|
|
819
|
+
has_preferred_check = True
|
|
820
|
+
break
|
|
821
|
+
if has_preferred_check:
|
|
822
|
+
break
|
|
823
|
+
|
|
824
|
+
readiness_warnings = []
|
|
825
|
+
if not has_preferred_check:
|
|
826
|
+
readiness_warnings.append(
|
|
827
|
+
"No operation has x-airbyte-preferred-for-check: true. "
|
|
828
|
+
"Add this extension to a lightweight list operation (e.g., users.list) "
|
|
829
|
+
"to enable reliable health checks."
|
|
830
|
+
)
|
|
831
|
+
|
|
813
832
|
return {
|
|
814
833
|
"success": success,
|
|
815
834
|
"connector_name": config.name,
|
|
816
835
|
"connector_path": str(connector_path),
|
|
817
836
|
"validation_results": validation_results,
|
|
837
|
+
"readiness_warnings": readiness_warnings,
|
|
818
838
|
"summary": {
|
|
819
839
|
"total_operations": total_operations,
|
|
820
840
|
"operations_with_cassettes": operations_with_cassettes,
|
|
@@ -53,6 +53,7 @@ if TYPE_CHECKING:
|
|
|
53
53
|
from .models import ZendeskChatAuthConfig
|
|
54
54
|
# Import response models and envelope models at runtime
|
|
55
55
|
from .models import (
|
|
56
|
+
ZendeskChatCheckResult,
|
|
56
57
|
ZendeskChatExecuteResult,
|
|
57
58
|
ZendeskChatExecuteResultWithMeta,
|
|
58
59
|
AgentsListResult,
|
|
@@ -136,7 +137,7 @@ class ZendeskChatConnector:
|
|
|
136
137
|
"""
|
|
137
138
|
|
|
138
139
|
connector_name = "zendesk-chat"
|
|
139
|
-
connector_version = "0.1.
|
|
140
|
+
connector_version = "0.1.6"
|
|
140
141
|
vendored_sdk_version = "0.1.0" # Version of vendored connector-sdk
|
|
141
142
|
|
|
142
143
|
# Map of (entity, action) -> needs_envelope for envelope wrapping decision
|
|
@@ -512,6 +513,40 @@ class ZendeskChatConnector:
|
|
|
512
513
|
# No extractors - return raw response data
|
|
513
514
|
return result.data
|
|
514
515
|
|
|
516
|
+
# ===== HEALTH CHECK METHOD =====
|
|
517
|
+
|
|
518
|
+
async def check(self) -> ZendeskChatCheckResult:
|
|
519
|
+
"""
|
|
520
|
+
Perform a health check to verify connectivity and credentials.
|
|
521
|
+
|
|
522
|
+
Executes a lightweight list operation (limit=1) to validate that
|
|
523
|
+
the connector can communicate with the API and credentials are valid.
|
|
524
|
+
|
|
525
|
+
Returns:
|
|
526
|
+
ZendeskChatCheckResult with status ("healthy" or "unhealthy") and optional error message
|
|
527
|
+
|
|
528
|
+
Example:
|
|
529
|
+
result = await connector.check()
|
|
530
|
+
if result.status == "healthy":
|
|
531
|
+
print("Connection verified!")
|
|
532
|
+
else:
|
|
533
|
+
print(f"Check failed: {result.error}")
|
|
534
|
+
"""
|
|
535
|
+
result = await self._executor.check()
|
|
536
|
+
|
|
537
|
+
if result.success and isinstance(result.data, dict):
|
|
538
|
+
return ZendeskChatCheckResult(
|
|
539
|
+
status=result.data.get("status", "unhealthy"),
|
|
540
|
+
error=result.data.get("error"),
|
|
541
|
+
checked_entity=result.data.get("checked_entity"),
|
|
542
|
+
checked_action=result.data.get("checked_action"),
|
|
543
|
+
)
|
|
544
|
+
else:
|
|
545
|
+
return ZendeskChatCheckResult(
|
|
546
|
+
status="unhealthy",
|
|
547
|
+
error=result.error or "Unknown error during health check",
|
|
548
|
+
)
|
|
549
|
+
|
|
515
550
|
# ===== INTROSPECTION METHODS =====
|
|
516
551
|
|
|
517
552
|
@classmethod
|
|
@@ -520,6 +555,7 @@ class ZendeskChatConnector:
|
|
|
520
555
|
func: _F | None = None,
|
|
521
556
|
*,
|
|
522
557
|
update_docstring: bool = True,
|
|
558
|
+
enable_hosted_mode_features: bool = True,
|
|
523
559
|
max_output_chars: int | None = DEFAULT_MAX_OUTPUT_CHARS,
|
|
524
560
|
) -> _F | Callable[[_F], _F]:
|
|
525
561
|
"""
|
|
@@ -538,12 +574,16 @@ class ZendeskChatConnector:
|
|
|
538
574
|
|
|
539
575
|
Args:
|
|
540
576
|
update_docstring: When True, append connector capabilities to __doc__.
|
|
577
|
+
enable_hosted_mode_features: When False, omit hosted-mode search sections from docstrings.
|
|
541
578
|
max_output_chars: Max serialized output size before raising. Use None to disable.
|
|
542
579
|
"""
|
|
543
580
|
|
|
544
581
|
def decorate(inner: _F) -> _F:
|
|
545
582
|
if update_docstring:
|
|
546
|
-
description = generate_tool_description(
|
|
583
|
+
description = generate_tool_description(
|
|
584
|
+
ZendeskChatConnectorModel,
|
|
585
|
+
enable_hosted_mode_features=enable_hosted_mode_features,
|
|
586
|
+
)
|
|
547
587
|
original_doc = inner.__doc__ or ""
|
|
548
588
|
if original_doc.strip():
|
|
549
589
|
full_doc = f"{original_doc.strip()}\n{description}"
|
|
@@ -26,7 +26,7 @@ from uuid import (
|
|
|
26
26
|
ZendeskChatConnectorModel: ConnectorModel = ConnectorModel(
|
|
27
27
|
id=UUID('40d24d0f-b8f9-4fe0-9e6c-b06c0f3f45e4'),
|
|
28
28
|
name='zendesk-chat',
|
|
29
|
-
version='0.1.
|
|
29
|
+
version='0.1.6',
|
|
30
30
|
base_url='https://{subdomain}.zendesk.com/api/v2/chat',
|
|
31
31
|
auth=AuthConfig(
|
|
32
32
|
type=AuthType.BEARER,
|
|
@@ -40,7 +40,6 @@ ZendeskChatConnectorModel: ConnectorModel = ConnectorModel(
|
|
|
40
40
|
'access_token': AuthConfigFieldSpec(
|
|
41
41
|
title='Access Token',
|
|
42
42
|
description='Your Zendesk Chat OAuth 2.0 access token',
|
|
43
|
-
airbyte_secret=True,
|
|
44
43
|
),
|
|
45
44
|
},
|
|
46
45
|
auth_mapping={'token': '${access_token}'},
|
|
@@ -365,6 +364,7 @@ ZendeskChatConnectorModel: ConnectorModel = ConnectorModel(
|
|
|
365
364
|
},
|
|
366
365
|
},
|
|
367
366
|
record_extractor='$',
|
|
367
|
+
preferred_for_check=True,
|
|
368
368
|
),
|
|
369
369
|
Action.GET: EndpointDefinition(
|
|
370
370
|
method='GET',
|
|
@@ -132,6 +132,27 @@ class Ban(BaseModel):
|
|
|
132
132
|
reason: Union[str | None, Any] = Field(default=None)
|
|
133
133
|
created_at: Union[str | None, Any] = Field(default=None)
|
|
134
134
|
|
|
135
|
+
class ChatEngagement(BaseModel):
|
|
136
|
+
"""ChatEngagement type definition"""
|
|
137
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
138
|
+
|
|
139
|
+
id: Union[str | None, Any] = Field(default=None)
|
|
140
|
+
agent_id: Union[str | None, Any] = Field(default=None)
|
|
141
|
+
agent_name: Union[str | None, Any] = Field(default=None)
|
|
142
|
+
agent_full_name: Union[str | None, Any] = Field(default=None)
|
|
143
|
+
department_id: Union[int | None, Any] = Field(default=None)
|
|
144
|
+
timestamp: Union[str | None, Any] = Field(default=None)
|
|
145
|
+
duration: Union[float | None, Any] = Field(default=None)
|
|
146
|
+
accepted: Union[bool | None, Any] = Field(default=None)
|
|
147
|
+
assigned: Union[bool | None, Any] = Field(default=None)
|
|
148
|
+
started_by: Union[str | None, Any] = Field(default=None)
|
|
149
|
+
rating: Union[str | None, Any] = Field(default=None)
|
|
150
|
+
comment: Union[str | None, Any] = Field(default=None)
|
|
151
|
+
count: Union[Any, Any] = Field(default=None)
|
|
152
|
+
response_time: Union[Any, Any] = Field(default=None)
|
|
153
|
+
skills_requested: Union[list[int] | None, Any] = Field(default=None)
|
|
154
|
+
skills_fulfilled: Union[bool | None, Any] = Field(default=None)
|
|
155
|
+
|
|
135
156
|
class ChatConversion(BaseModel):
|
|
136
157
|
"""ChatConversion type definition"""
|
|
137
158
|
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
@@ -168,27 +189,6 @@ class ChatHistoryItem(BaseModel):
|
|
|
168
189
|
new_tags: Union[list[str] | None, Any] = Field(default=None)
|
|
169
190
|
options: Union[str | None, Any] = Field(default=None)
|
|
170
191
|
|
|
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
192
|
class Chat(BaseModel):
|
|
193
193
|
"""Chat conversation transcript"""
|
|
194
194
|
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
@@ -380,6 +380,25 @@ class ChatsListResultMeta(BaseModel):
|
|
|
380
380
|
next_page: Union[str | None, Any] = Field(default=None)
|
|
381
381
|
count: Union[int, Any] = Field(default=None)
|
|
382
382
|
|
|
383
|
+
# ===== CHECK RESULT MODEL =====
|
|
384
|
+
|
|
385
|
+
class ZendeskChatCheckResult(BaseModel):
|
|
386
|
+
"""Result of a health check operation.
|
|
387
|
+
|
|
388
|
+
Returned by the check() method to indicate connectivity and credential status.
|
|
389
|
+
"""
|
|
390
|
+
model_config = ConfigDict(extra="forbid")
|
|
391
|
+
|
|
392
|
+
status: str
|
|
393
|
+
"""Health check status: 'healthy' or 'unhealthy'."""
|
|
394
|
+
error: str | None = None
|
|
395
|
+
"""Error message if status is 'unhealthy', None otherwise."""
|
|
396
|
+
checked_entity: str | None = None
|
|
397
|
+
"""Entity name used for the health check."""
|
|
398
|
+
checked_action: str | None = None
|
|
399
|
+
"""Action name used for the health check."""
|
|
400
|
+
|
|
401
|
+
|
|
383
402
|
# ===== RESPONSE ENVELOPE MODELS =====
|
|
384
403
|
|
|
385
404
|
# Type variables for generic envelope models
|
{airbyte_agent_zendesk_chat-0.1.14.dist-info → airbyte_agent_zendesk_chat-0.1.22.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: airbyte-agent-zendesk-chat
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.22
|
|
4
4
|
Summary: Airbyte Zendesk-Chat Connector for AI platforms
|
|
5
5
|
Project-URL: Homepage, https://github.com/airbytehq/airbyte-agent-connectors
|
|
6
6
|
Project-URL: Documentation, https://docs.airbyte.com/ai-agents/
|
|
@@ -130,13 +130,11 @@ async def zendesk-chat_execute(entity: str, action: str, params: dict | None = N
|
|
|
130
130
|
return await connector.execute(entity, action, params or {})
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
## Replication Configuration
|
|
134
|
-
|
|
135
|
-
This connector supports replication configuration for MULTI mode sources. See the [full reference documentation](./REFERENCE.md#replication-configuration) for details on available options like `start_date`.
|
|
136
|
-
|
|
137
133
|
## Full documentation
|
|
138
134
|
|
|
139
|
-
|
|
135
|
+
### Entities and actions
|
|
136
|
+
|
|
137
|
+
This connector supports the following entities and actions. For more details, see this connector's [full reference documentation](REFERENCE.md).
|
|
140
138
|
|
|
141
139
|
| Entity | Actions |
|
|
142
140
|
|--------|---------|
|
|
@@ -154,14 +152,16 @@ This connector supports the following entities and actions.
|
|
|
154
152
|
| Triggers | [List](./REFERENCE.md#triggers-list) |
|
|
155
153
|
|
|
156
154
|
|
|
157
|
-
|
|
155
|
+
### Authentication and configuration
|
|
156
|
+
|
|
157
|
+
For all authentication and configuration options, see the connector's [authentication documentation](AUTH.md).
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
### Zendesk-Chat API docs
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
See the official [Zendesk-Chat API reference](https://developer.zendesk.com/api-reference/live-chat/chat-api/introduction/).
|
|
162
162
|
|
|
163
163
|
## Version information
|
|
164
164
|
|
|
165
|
-
- **Package version:** 0.1.
|
|
166
|
-
- **Connector version:** 0.1.
|
|
167
|
-
- **Generated with Connector SDK commit SHA:**
|
|
165
|
+
- **Package version:** 0.1.22
|
|
166
|
+
- **Connector version:** 0.1.6
|
|
167
|
+
- **Generated with Connector SDK commit SHA:** c718c683a61ee72524442b7fd5e9ac3a1b94698c
|
{airbyte_agent_zendesk_chat-0.1.14.dist-info → airbyte_agent_zendesk_chat-0.1.22.dist-info}/RECORD
RENAMED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
airbyte_agent_zendesk_chat/__init__.py,sha256
|
|
2
|
-
airbyte_agent_zendesk_chat/connector.py,sha256=
|
|
3
|
-
airbyte_agent_zendesk_chat/connector_model.py,sha256=
|
|
4
|
-
airbyte_agent_zendesk_chat/models.py,sha256=
|
|
1
|
+
airbyte_agent_zendesk_chat/__init__.py,sha256=-DntOY51ByEygmkKUUo9DADbpX-9q7hTLvSAodN-wkE,4350
|
|
2
|
+
airbyte_agent_zendesk_chat/connector.py,sha256=OjYSWgMcQiIQp8h9iG1mR4Sp8ioFShQLfm1KXpcdy_M,46936
|
|
3
|
+
airbyte_agent_zendesk_chat/connector_model.py,sha256=4kxSVv1lu-hGlndFbnmc1GTO1mXclPtE9hUCCyQiVdo,122098
|
|
4
|
+
airbyte_agent_zendesk_chat/models.py,sha256=FDQy1ClD_YJOLkm6gdblUP8_Q0cZPEDTZoNmnp5rCGw,24506
|
|
5
5
|
airbyte_agent_zendesk_chat/types.py,sha256=C5laH7V__abYm0F1Jck49Az6SCJQdnXLgtahxponDgM,28925
|
|
6
6
|
airbyte_agent_zendesk_chat/_vendored/__init__.py,sha256=ILl7AHXMui__swyrjxrh9yRa4dLiwBvV6axPWFWty80,38
|
|
7
7
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/__init__.py,sha256=T5o7roU6NSpH-lCAGZ338sE5dlh4ZU6i6IkeG1zpems,1949
|
|
8
8
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/auth_strategies.py,sha256=5Sb9moUp623o67Q2wMa8iZldJH08y4gQdoutoO_75Iw,42088
|
|
9
9
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/auth_template.py,sha256=nju4jqlFC_KI82ILNumNIyiUtRJcy7J94INIZ0QraI4,4454
|
|
10
|
-
airbyte_agent_zendesk_chat/_vendored/connector_sdk/connector_model_loader.py,sha256=
|
|
10
|
+
airbyte_agent_zendesk_chat/_vendored/connector_sdk/connector_model_loader.py,sha256=ecm0Cdj1SyhDOpEi2wUzzrJNkgt0wViB0Q-YTrDPsjU,41698
|
|
11
11
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/constants.py,sha256=AtzOvhDMWbRJgpsQNWl5tkogHD6mWgEY668PgRmgtOY,2737
|
|
12
12
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/exceptions.py,sha256=ss5MGv9eVPmsbLcLWetuu3sDmvturwfo6Pw3M37Oq5k,481
|
|
13
13
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/extensions.py,sha256=XWRRoJOOrwUHSKbuQt5DU7CCu8ePzhd_HuP7c_uD77w,21376
|
|
14
|
-
airbyte_agent_zendesk_chat/_vendored/connector_sdk/http_client.py,sha256=
|
|
15
|
-
airbyte_agent_zendesk_chat/_vendored/connector_sdk/introspection.py,sha256=
|
|
14
|
+
airbyte_agent_zendesk_chat/_vendored/connector_sdk/http_client.py,sha256=09Fclbq4wrg38EM2Yh2kHiykQVXqdAGby024elcEz8E,28027
|
|
15
|
+
airbyte_agent_zendesk_chat/_vendored/connector_sdk/introspection.py,sha256=e9uWn2ofpeehoBbzNgts_bjlKLn8ayA1Y3OpDC3b7ZA,19517
|
|
16
16
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/secrets.py,sha256=J9ezMu4xNnLW11xY5RCre6DHP7YMKZCqwGJfk7ufHAM,6855
|
|
17
|
-
airbyte_agent_zendesk_chat/_vendored/connector_sdk/types.py,sha256=
|
|
17
|
+
airbyte_agent_zendesk_chat/_vendored/connector_sdk/types.py,sha256=sRZ4rRkJXGfqdjfF3qb0kzrw_tu1cn-CmFSZKMMgF7o,9269
|
|
18
18
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/utils.py,sha256=G4LUXOC2HzPoND2v4tQW68R9uuPX9NQyCjaGxb7Kpl0,1958
|
|
19
|
-
airbyte_agent_zendesk_chat/_vendored/connector_sdk/validation.py,sha256=
|
|
19
|
+
airbyte_agent_zendesk_chat/_vendored/connector_sdk/validation.py,sha256=2Qof3QiOEEupTsT6F1MvMDCZTPl4IuzkeUUvn_IYFjg,32905
|
|
20
20
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/cloud_utils/__init__.py,sha256=4799Hv9f2zxDVj1aLyQ8JpTEuFTp_oOZMRz-NZCdBJg,134
|
|
21
21
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/cloud_utils/client.py,sha256=YxdRpQr9XjDzih6csSseBVGn9kfMtaqbOCXP0TPuzFY,7189
|
|
22
22
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/executor/__init__.py,sha256=EmG9YQNAjSuYCVB4D5VoLm4qpD1KfeiiOf7bpALj8p8,702
|
|
23
|
-
airbyte_agent_zendesk_chat/_vendored/connector_sdk/executor/hosted_executor.py,sha256=
|
|
24
|
-
airbyte_agent_zendesk_chat/_vendored/connector_sdk/executor/local_executor.py,sha256=
|
|
25
|
-
airbyte_agent_zendesk_chat/_vendored/connector_sdk/executor/models.py,sha256=
|
|
23
|
+
airbyte_agent_zendesk_chat/_vendored/connector_sdk/executor/hosted_executor.py,sha256=AC5aJtdcMPQfRuam0ZGE4QdhUBu2oGEmNZ6oVQLHTE8,7212
|
|
24
|
+
airbyte_agent_zendesk_chat/_vendored/connector_sdk/executor/local_executor.py,sha256=abtQOMZhJBrvE3ioKi-g-R_GZJZozYJNczYySQEEIX8,76981
|
|
25
|
+
airbyte_agent_zendesk_chat/_vendored/connector_sdk/executor/models.py,sha256=mUUBnuShKXxVIfsTOhMiI2rn2a-50jJG7SFGKT_P6Jk,6281
|
|
26
26
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/http/__init__.py,sha256=y8fbzZn-3yV9OxtYz8Dy6FFGI5v6TOqADd1G3xHH3Hw,911
|
|
27
27
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/http/config.py,sha256=6J7YIIwHC6sRu9i-yKa5XvArwK2KU60rlnmxzDZq3lw,3283
|
|
28
28
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/http/exceptions.py,sha256=eYdYmxqcwA6pgrSoRXNfR6_nRBGRH6upp2-r1jcKaZo,3586
|
|
@@ -46,12 +46,12 @@ airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/base.py,sha256=IoAucZQ
|
|
|
46
46
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/components.py,sha256=nJIPieavwX3o3ODvdtLHPk84d_V229xmg6LDfwEHjzc,8119
|
|
47
47
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/connector.py,sha256=mSZk1wr2YSdRj9tTRsPAuIlCzd_xZLw-Bzl1sMwE0rE,3731
|
|
48
48
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/extensions.py,sha256=5hgpFHK7fzpzegCkJk882DeIP79bCx_qairKJhvPMZ8,9590
|
|
49
|
-
airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/operations.py,sha256=
|
|
50
|
-
airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/security.py,sha256=
|
|
49
|
+
airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/operations.py,sha256=St-A75m6sZUZlsoM6WcoPaShYu_X1K19pdyPvJbabOE,6214
|
|
50
|
+
airbyte_agent_zendesk_chat/_vendored/connector_sdk/schema/security.py,sha256=1CVCavrPdHHyk7B6JtUD75yRS_hWLCemZF1zwGbdqxg,9036
|
|
51
51
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/telemetry/__init__.py,sha256=RaLgkBU4dfxn1LC5Y0Q9rr2PJbrwjxvPgBLmq8_WafE,211
|
|
52
52
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/telemetry/config.py,sha256=tLmQwAFD0kP1WyBGWBS3ysaudN9H3e-3EopKZi6cGKg,885
|
|
53
53
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/telemetry/events.py,sha256=8Y1NbXiwISX-V_wRofY7PqcwEXD0dLMnntKkY6XFU2s,1328
|
|
54
54
|
airbyte_agent_zendesk_chat/_vendored/connector_sdk/telemetry/tracker.py,sha256=Ftrk0_ddfM7dZG8hF9xBuPwhbc9D6JZ7Q9qs5o3LEyA,5579
|
|
55
|
-
airbyte_agent_zendesk_chat-0.1.
|
|
56
|
-
airbyte_agent_zendesk_chat-0.1.
|
|
57
|
-
airbyte_agent_zendesk_chat-0.1.
|
|
55
|
+
airbyte_agent_zendesk_chat-0.1.22.dist-info/METADATA,sha256=XWll22JrhcMiByQ-FiX_pmnFCklmr6ArmirFu7sn0Kk,6404
|
|
56
|
+
airbyte_agent_zendesk_chat-0.1.22.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
57
|
+
airbyte_agent_zendesk_chat-0.1.22.dist-info/RECORD,,
|
{airbyte_agent_zendesk_chat-0.1.14.dist-info → airbyte_agent_zendesk_chat-0.1.22.dist-info}/WHEEL
RENAMED
|
File without changes
|