airbyte-agent-zendesk-support 0.18.76__tar.gz → 0.18.77__tar.gz
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-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/CHANGELOG.md +5 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/PKG-INFO +3 -3
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/README.md +2 -2
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/cloud_utils/client.py +62 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/hosted_executor.py +54 -25
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/connector.py +112 -9
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/pyproject.toml +1 -1
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/.gitignore +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/AUTH.md +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/REFERENCE.md +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/auth_strategies.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/auth_template.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/cloud_utils/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/connector_model_loader.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/constants.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/exceptions.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/local_executor.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/models.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/extensions.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http/adapters/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http/adapters/httpx_adapter.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http/config.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http/exceptions.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http/protocols.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http/response.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http_client.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/introspection.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/logging/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/logging/logger.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/logging/types.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/config.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/models.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/redactor.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/session.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/performance/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/performance/instrumentation.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/performance/metrics.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/base.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/components.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/connector.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/extensions.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/operations.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/security.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/secrets.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/config.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/events.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/tracker.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/types.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/utils.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/validation.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/_vendored/connector_sdk/validation_replication.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/connector_model.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/models.py +0 -0
- {airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/airbyte_agent_zendesk_support/types.py +0 -0
{airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/CHANGELOG.md
RENAMED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Zendesk Support changelog
|
|
2
2
|
|
|
3
|
+
## [0.18.77] - 2026-01-30
|
|
4
|
+
- Updated connector definition (YAML version 0.1.11)
|
|
5
|
+
- Source commit: b184da3e
|
|
6
|
+
- SDK version: 0.1.0
|
|
7
|
+
|
|
3
8
|
## [0.18.76] - 2026-01-30
|
|
4
9
|
- Updated connector definition (YAML version 0.1.11)
|
|
5
10
|
- Source commit: 40765c71
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: airbyte-agent-zendesk-support
|
|
3
|
-
Version: 0.18.
|
|
3
|
+
Version: 0.18.77
|
|
4
4
|
Summary: Airbyte Zendesk-Support 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/
|
|
@@ -157,7 +157,7 @@ See the official [Zendesk-Support API reference](https://developer.zendesk.com/a
|
|
|
157
157
|
|
|
158
158
|
## Version information
|
|
159
159
|
|
|
160
|
-
- **Package version:** 0.18.
|
|
160
|
+
- **Package version:** 0.18.77
|
|
161
161
|
- **Connector version:** 0.1.11
|
|
162
|
-
- **Generated with Connector SDK commit SHA:**
|
|
162
|
+
- **Generated with Connector SDK commit SHA:** b184da3e22ef8521d2eeebf3c96a0fe8da2424f5
|
|
163
163
|
- **Changelog:** [View changelog](https://github.com/airbytehq/airbyte-agent-connectors/blob/main/connectors/zendesk-support/CHANGELOG.md)
|
|
@@ -124,7 +124,7 @@ See the official [Zendesk-Support API reference](https://developer.zendesk.com/a
|
|
|
124
124
|
|
|
125
125
|
## Version information
|
|
126
126
|
|
|
127
|
-
- **Package version:** 0.18.
|
|
127
|
+
- **Package version:** 0.18.77
|
|
128
128
|
- **Connector version:** 0.1.11
|
|
129
|
-
- **Generated with Connector SDK commit SHA:**
|
|
129
|
+
- **Generated with Connector SDK commit SHA:** b184da3e22ef8521d2eeebf3c96a0fe8da2424f5
|
|
130
130
|
- **Changelog:** [View changelog](https://github.com/airbytehq/airbyte-agent-connectors/blob/main/connectors/zendesk-support/CHANGELOG.md)
|
|
@@ -161,6 +161,68 @@ class AirbyteCloudClient:
|
|
|
161
161
|
connector_id = connectors[0]["id"]
|
|
162
162
|
return connector_id
|
|
163
163
|
|
|
164
|
+
async def create_source(
|
|
165
|
+
self,
|
|
166
|
+
name: str,
|
|
167
|
+
connector_definition_id: str,
|
|
168
|
+
external_user_id: str,
|
|
169
|
+
credentials: dict[str, Any],
|
|
170
|
+
replication_config: dict[str, Any] | None = None,
|
|
171
|
+
) -> str:
|
|
172
|
+
"""Create a new source on Airbyte Agent Platform.
|
|
173
|
+
|
|
174
|
+
Args:
|
|
175
|
+
name: Source name
|
|
176
|
+
connector_definition_id: UUID of the connector definition
|
|
177
|
+
external_user_id: User identifier
|
|
178
|
+
credentials: Connector auth config dict
|
|
179
|
+
replication_config: Optional replication settings (e.g., start_date for
|
|
180
|
+
connectors with x-airbyte-replication-config). Required for REPLICATION
|
|
181
|
+
mode sources like Intercom.
|
|
182
|
+
|
|
183
|
+
Returns:
|
|
184
|
+
The created source ID (UUID string)
|
|
185
|
+
|
|
186
|
+
Raises:
|
|
187
|
+
httpx.HTTPStatusError: If creation fails
|
|
188
|
+
|
|
189
|
+
Example:
|
|
190
|
+
source_id = await client.create_source(
|
|
191
|
+
name="My Gong Source",
|
|
192
|
+
connector_definition_id="32382e40-3b49-4b99-9c5c-4076501914e7",
|
|
193
|
+
external_user_id="my-workspace",
|
|
194
|
+
credentials={"access_key": "...", "access_key_secret": "..."}
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
# For REPLICATION mode sources (e.g., Intercom):
|
|
198
|
+
source_id = await client.create_source(
|
|
199
|
+
name="My Intercom Source",
|
|
200
|
+
connector_definition_id="d8313939-3782-41b0-be29-b3ca20d8dd3a",
|
|
201
|
+
external_user_id="my-workspace",
|
|
202
|
+
credentials={"access_token": "..."},
|
|
203
|
+
replication_config={"start_date": "2024-01-01T00:00:00Z"}
|
|
204
|
+
)
|
|
205
|
+
"""
|
|
206
|
+
token = await self.get_bearer_token()
|
|
207
|
+
url = f"{self.API_BASE_URL}/v1/integrations/connectors"
|
|
208
|
+
headers = {"Authorization": f"Bearer {token}"}
|
|
209
|
+
|
|
210
|
+
request_body: dict[str, Any] = {
|
|
211
|
+
"name": name,
|
|
212
|
+
"definition_id": connector_definition_id,
|
|
213
|
+
"external_user_id": external_user_id,
|
|
214
|
+
"credentials": credentials,
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if replication_config is not None:
|
|
218
|
+
request_body["replication_config"] = replication_config
|
|
219
|
+
|
|
220
|
+
response = await self._http_client.post(url, json=request_body, headers=headers)
|
|
221
|
+
response.raise_for_status()
|
|
222
|
+
|
|
223
|
+
data = response.json()
|
|
224
|
+
return data["id"]
|
|
225
|
+
|
|
164
226
|
async def execute_connector(
|
|
165
227
|
self,
|
|
166
228
|
connector_id: str,
|
|
@@ -19,19 +19,26 @@ class HostedExecutor:
|
|
|
19
19
|
instead of directly calling external services. The cloud API handles all
|
|
20
20
|
connector logic, secrets management, and execution.
|
|
21
21
|
|
|
22
|
-
The executor
|
|
22
|
+
The executor uses the AirbyteCloudClient to:
|
|
23
23
|
1. Authenticate with the Airbyte Platform (bearer token with caching)
|
|
24
|
-
2. Look up the user's connector
|
|
24
|
+
2. Look up the user's connector (if connector_id not provided)
|
|
25
25
|
3. Execute the connector operation via the cloud API
|
|
26
26
|
|
|
27
27
|
Implements ExecutorProtocol.
|
|
28
28
|
|
|
29
29
|
Example:
|
|
30
|
-
# Create executor with
|
|
30
|
+
# Create executor with explicit connector_id (no lookup needed)
|
|
31
|
+
executor = HostedExecutor(
|
|
32
|
+
airbyte_client_id="client_abc123",
|
|
33
|
+
airbyte_client_secret="secret_xyz789",
|
|
34
|
+
connector_id="existing-source-uuid",
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
# Or create executor with user ID for lookup
|
|
31
38
|
executor = HostedExecutor(
|
|
32
|
-
external_user_id="user-123",
|
|
33
39
|
airbyte_client_id="client_abc123",
|
|
34
40
|
airbyte_client_secret="secret_xyz789",
|
|
41
|
+
external_user_id="user-123",
|
|
35
42
|
connector_definition_id="abc123-def456-ghi789",
|
|
36
43
|
)
|
|
37
44
|
|
|
@@ -51,28 +58,48 @@ class HostedExecutor:
|
|
|
51
58
|
|
|
52
59
|
def __init__(
|
|
53
60
|
self,
|
|
54
|
-
external_user_id: str,
|
|
55
61
|
airbyte_client_id: str,
|
|
56
62
|
airbyte_client_secret: str,
|
|
57
|
-
|
|
63
|
+
connector_id: str | None = None,
|
|
64
|
+
external_user_id: str | None = None,
|
|
65
|
+
connector_definition_id: str | None = None,
|
|
58
66
|
):
|
|
59
67
|
"""Initialize hosted executor.
|
|
60
68
|
|
|
69
|
+
Either provide connector_id directly OR (external_user_id + connector_definition_id)
|
|
70
|
+
for lookup.
|
|
71
|
+
|
|
61
72
|
Args:
|
|
62
|
-
external_user_id: User identifier in the Airbyte system
|
|
63
73
|
airbyte_client_id: Airbyte client ID for authentication
|
|
64
74
|
airbyte_client_secret: Airbyte client secret for authentication
|
|
65
|
-
|
|
66
|
-
|
|
75
|
+
connector_id: Direct connector/source ID (skips lookup if provided)
|
|
76
|
+
external_user_id: User identifier in the Airbyte system (for lookup)
|
|
77
|
+
connector_definition_id: Connector definition ID (for lookup)
|
|
78
|
+
|
|
79
|
+
Raises:
|
|
80
|
+
ValueError: If neither connector_id nor (external_user_id + connector_definition_id) provided
|
|
67
81
|
|
|
68
82
|
Example:
|
|
83
|
+
# With explicit connector_id (no lookup)
|
|
84
|
+
executor = HostedExecutor(
|
|
85
|
+
airbyte_client_id="client_abc123",
|
|
86
|
+
airbyte_client_secret="secret_xyz789",
|
|
87
|
+
connector_id="existing-source-uuid",
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
# With lookup by user + definition
|
|
69
91
|
executor = HostedExecutor(
|
|
70
|
-
external_user_id="user-123",
|
|
71
92
|
airbyte_client_id="client_abc123",
|
|
72
93
|
airbyte_client_secret="secret_xyz789",
|
|
94
|
+
external_user_id="user-123",
|
|
73
95
|
connector_definition_id="abc123-def456-ghi789",
|
|
74
96
|
)
|
|
75
97
|
"""
|
|
98
|
+
# Validate: either connector_id OR (external_user_id + connector_definition_id) required
|
|
99
|
+
if not connector_id and not (external_user_id and connector_definition_id):
|
|
100
|
+
raise ValueError("Either connector_id OR (external_user_id + connector_definition_id) must be provided")
|
|
101
|
+
|
|
102
|
+
self._connector_id = connector_id
|
|
76
103
|
self._external_user_id = external_user_id
|
|
77
104
|
self._connector_definition_id = connector_definition_id
|
|
78
105
|
|
|
@@ -86,10 +113,9 @@ class HostedExecutor:
|
|
|
86
113
|
"""Execute connector via cloud API (ExecutorProtocol implementation).
|
|
87
114
|
|
|
88
115
|
Flow:
|
|
89
|
-
1.
|
|
90
|
-
2.
|
|
91
|
-
3.
|
|
92
|
-
4. Parse the response into ExecutionResult
|
|
116
|
+
1. Use provided connector_id or look up from external_user_id + definition_id
|
|
117
|
+
2. Execute the connector operation via the cloud API
|
|
118
|
+
3. Parse the response into ExecutionResult
|
|
93
119
|
|
|
94
120
|
Args:
|
|
95
121
|
config: Execution configuration (entity, action, params)
|
|
@@ -98,7 +124,7 @@ class HostedExecutor:
|
|
|
98
124
|
ExecutionResult with success/failure status
|
|
99
125
|
|
|
100
126
|
Raises:
|
|
101
|
-
ValueError: If no connector or multiple connectors found for user
|
|
127
|
+
ValueError: If no connector or multiple connectors found for user (when doing lookup)
|
|
102
128
|
httpx.HTTPStatusError: If API returns 4xx/5xx status code
|
|
103
129
|
httpx.RequestError: If network request fails
|
|
104
130
|
|
|
@@ -114,23 +140,26 @@ class HostedExecutor:
|
|
|
114
140
|
|
|
115
141
|
with tracer.start_as_current_span("airbyte.hosted_executor.execute") as span:
|
|
116
142
|
# Add span attributes for observability
|
|
117
|
-
|
|
143
|
+
if self._connector_definition_id:
|
|
144
|
+
span.set_attribute("connector.definition_id", self._connector_definition_id)
|
|
118
145
|
span.set_attribute("connector.entity", config.entity)
|
|
119
146
|
span.set_attribute("connector.action", config.action)
|
|
120
|
-
|
|
147
|
+
if self._external_user_id:
|
|
148
|
+
span.set_attribute("user.external_id", self._external_user_id)
|
|
121
149
|
if config.params:
|
|
122
150
|
# Only add non-sensitive param keys
|
|
123
151
|
span.set_attribute("connector.param_keys", list(config.params.keys()))
|
|
124
152
|
|
|
125
153
|
try:
|
|
126
|
-
#
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
154
|
+
# Use provided connector_id or look it up
|
|
155
|
+
if self._connector_id:
|
|
156
|
+
connector_id = self._connector_id
|
|
157
|
+
else:
|
|
158
|
+
# Look up connector by external_user_id + definition_id
|
|
159
|
+
connector_id = await self._cloud_client.get_connector_id(
|
|
160
|
+
external_user_id=self._external_user_id, # type: ignore[arg-type]
|
|
161
|
+
connector_definition_id=self._connector_definition_id, # type: ignore[arg-type]
|
|
162
|
+
)
|
|
134
163
|
|
|
135
164
|
span.set_attribute("connector.connector_id", connector_id)
|
|
136
165
|
|
|
@@ -84,6 +84,7 @@ from .types import (
|
|
|
84
84
|
)
|
|
85
85
|
if TYPE_CHECKING:
|
|
86
86
|
from .models import ZendeskSupportAuthConfig
|
|
87
|
+
|
|
87
88
|
# Import specific auth config classes for multi-auth isinstance checks
|
|
88
89
|
from .models import ZendeskSupportOauth20AuthConfig, ZendeskSupportApiTokenAuthConfig
|
|
89
90
|
# Import response models and envelope models at runtime
|
|
@@ -305,6 +306,7 @@ class ZendeskSupportConnector:
|
|
|
305
306
|
external_user_id: str | None = None,
|
|
306
307
|
airbyte_client_id: str | None = None,
|
|
307
308
|
airbyte_client_secret: str | None = None,
|
|
309
|
+
connector_id: str | None = None,
|
|
308
310
|
on_token_refresh: Any | None = None,
|
|
309
311
|
subdomain: str | None = None ):
|
|
310
312
|
"""
|
|
@@ -312,20 +314,28 @@ class ZendeskSupportConnector:
|
|
|
312
314
|
|
|
313
315
|
Supports both local and hosted execution modes:
|
|
314
316
|
- Local mode: Provide `auth_config` for direct API calls
|
|
315
|
-
- Hosted mode: Provide
|
|
317
|
+
- Hosted mode: Provide Airbyte credentials with either `connector_id` or `external_user_id`
|
|
316
318
|
|
|
317
319
|
Args:
|
|
318
320
|
auth_config: Typed authentication configuration (required for local mode)
|
|
319
|
-
external_user_id: External user ID (
|
|
321
|
+
external_user_id: External user ID (for hosted mode lookup)
|
|
320
322
|
airbyte_client_id: Airbyte OAuth client ID (required for hosted mode)
|
|
321
323
|
airbyte_client_secret: Airbyte OAuth client secret (required for hosted mode)
|
|
324
|
+
connector_id: Specific connector/source ID (for hosted mode, skips lookup)
|
|
322
325
|
on_token_refresh: Optional callback for OAuth2 token refresh persistence.
|
|
323
326
|
Called with new_tokens dict when tokens are refreshed. Can be sync or async.
|
|
324
327
|
Example: lambda tokens: save_to_database(tokens) subdomain: Your Zendesk subdomain
|
|
325
328
|
Examples:
|
|
326
329
|
# Local mode (direct API calls)
|
|
327
330
|
connector = ZendeskSupportConnector(auth_config=ZendeskSupportAuthConfig(access_token="...", refresh_token="..."))
|
|
328
|
-
# Hosted mode (
|
|
331
|
+
# Hosted mode with explicit connector_id (no lookup needed)
|
|
332
|
+
connector = ZendeskSupportConnector(
|
|
333
|
+
airbyte_client_id="client_abc123",
|
|
334
|
+
airbyte_client_secret="secret_xyz789",
|
|
335
|
+
connector_id="existing-source-uuid"
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
# Hosted mode with lookup by external_user_id
|
|
329
339
|
connector = ZendeskSupportConnector(
|
|
330
340
|
external_user_id="user-123",
|
|
331
341
|
airbyte_client_id="client_abc123",
|
|
@@ -343,21 +353,24 @@ class ZendeskSupportConnector:
|
|
|
343
353
|
on_token_refresh=save_tokens
|
|
344
354
|
)
|
|
345
355
|
"""
|
|
346
|
-
# Hosted mode:
|
|
347
|
-
|
|
356
|
+
# Hosted mode: Airbyte credentials + either connector_id OR external_user_id
|
|
357
|
+
is_hosted = airbyte_client_id and airbyte_client_secret and (connector_id or external_user_id)
|
|
358
|
+
|
|
359
|
+
if is_hosted:
|
|
348
360
|
from ._vendored.connector_sdk.executor import HostedExecutor
|
|
349
361
|
self._executor = HostedExecutor(
|
|
350
|
-
external_user_id=external_user_id,
|
|
351
362
|
airbyte_client_id=airbyte_client_id,
|
|
352
363
|
airbyte_client_secret=airbyte_client_secret,
|
|
353
|
-
|
|
364
|
+
connector_id=connector_id,
|
|
365
|
+
external_user_id=external_user_id,
|
|
366
|
+
connector_definition_id=str(ZendeskSupportConnectorModel.id) if not connector_id else None,
|
|
354
367
|
)
|
|
355
368
|
else:
|
|
356
369
|
# Local mode: auth_config required
|
|
357
370
|
if not auth_config:
|
|
358
371
|
raise ValueError(
|
|
359
|
-
"Either provide (
|
|
360
|
-
"or auth_config for local mode"
|
|
372
|
+
"Either provide Airbyte credentials (airbyte_client_id, airbyte_client_secret) with "
|
|
373
|
+
"connector_id or external_user_id for hosted mode, or auth_config for local mode"
|
|
361
374
|
)
|
|
362
375
|
|
|
363
376
|
from ._vendored.connector_sdk.executor import LocalExecutor
|
|
@@ -957,6 +970,96 @@ class ZendeskSupportConnector:
|
|
|
957
970
|
)
|
|
958
971
|
return entity_def.entity_schema if entity_def else None
|
|
959
972
|
|
|
973
|
+
@property
|
|
974
|
+
def connector_id(self) -> str | None:
|
|
975
|
+
"""Get the connector/source ID (only available in hosted mode).
|
|
976
|
+
|
|
977
|
+
Returns:
|
|
978
|
+
The connector ID if in hosted mode, None if in local mode.
|
|
979
|
+
|
|
980
|
+
Example:
|
|
981
|
+
connector = await ZendeskSupportConnector.create_hosted(...)
|
|
982
|
+
print(f"Created connector: {connector.connector_id}")
|
|
983
|
+
"""
|
|
984
|
+
if hasattr(self, '_executor') and hasattr(self._executor, '_connector_id'):
|
|
985
|
+
return self._executor._connector_id
|
|
986
|
+
return None
|
|
987
|
+
|
|
988
|
+
# ===== HOSTED MODE FACTORY =====
|
|
989
|
+
|
|
990
|
+
@classmethod
|
|
991
|
+
async def create_hosted(
|
|
992
|
+
cls,
|
|
993
|
+
*,
|
|
994
|
+
external_user_id: str,
|
|
995
|
+
airbyte_client_id: str,
|
|
996
|
+
airbyte_client_secret: str,
|
|
997
|
+
auth_config: "ZendeskSupportAuthConfig",
|
|
998
|
+
name: str | None = None,
|
|
999
|
+
replication_config: dict[str, Any] | None = None,
|
|
1000
|
+
) -> "ZendeskSupportConnector":
|
|
1001
|
+
"""
|
|
1002
|
+
Create a new hosted connector on Airbyte Cloud.
|
|
1003
|
+
|
|
1004
|
+
This factory method:
|
|
1005
|
+
1. Creates a source on Airbyte Cloud with the provided credentials
|
|
1006
|
+
2. Returns a connector configured with the new connector_id
|
|
1007
|
+
|
|
1008
|
+
Args:
|
|
1009
|
+
external_user_id: Workspace identifier in Airbyte Cloud
|
|
1010
|
+
airbyte_client_id: Airbyte OAuth client ID
|
|
1011
|
+
airbyte_client_secret: Airbyte OAuth client secret
|
|
1012
|
+
auth_config: Typed auth config (same as local mode)
|
|
1013
|
+
name: Optional source name (defaults to connector name + external_user_id)
|
|
1014
|
+
replication_config: Optional replication settings dict.
|
|
1015
|
+
Required for connectors with x-airbyte-replication-config (REPLICATION mode sources).
|
|
1016
|
+
|
|
1017
|
+
Returns:
|
|
1018
|
+
A ZendeskSupportConnector instance configured in hosted mode
|
|
1019
|
+
|
|
1020
|
+
Example:
|
|
1021
|
+
# Create a new hosted connector with API key auth
|
|
1022
|
+
connector = await ZendeskSupportConnector.create_hosted(
|
|
1023
|
+
external_user_id="my-workspace",
|
|
1024
|
+
airbyte_client_id="client_abc",
|
|
1025
|
+
airbyte_client_secret="secret_xyz",
|
|
1026
|
+
auth_config=ZendeskSupportAuthConfig(access_token="...", refresh_token="..."),
|
|
1027
|
+
)
|
|
1028
|
+
|
|
1029
|
+
# Use the connector
|
|
1030
|
+
result = await connector.execute("entity", "list", {})
|
|
1031
|
+
"""
|
|
1032
|
+
from ._vendored.connector_sdk.cloud_utils import AirbyteCloudClient
|
|
1033
|
+
|
|
1034
|
+
client = AirbyteCloudClient(
|
|
1035
|
+
client_id=airbyte_client_id,
|
|
1036
|
+
client_secret=airbyte_client_secret,
|
|
1037
|
+
)
|
|
1038
|
+
|
|
1039
|
+
try:
|
|
1040
|
+
# Build credentials from auth_config
|
|
1041
|
+
credentials = auth_config.model_dump(exclude_none=True)
|
|
1042
|
+
replication_config_dict = replication_config.model_dump(exclude_none=True) if replication_config else None
|
|
1043
|
+
|
|
1044
|
+
# Create source on Airbyte Cloud
|
|
1045
|
+
source_name = name or f"{cls.connector_name} - {external_user_id}"
|
|
1046
|
+
source_id = await client.create_source(
|
|
1047
|
+
name=source_name,
|
|
1048
|
+
connector_definition_id=str(ZendeskSupportConnectorModel.id),
|
|
1049
|
+
external_user_id=external_user_id,
|
|
1050
|
+
credentials=credentials,
|
|
1051
|
+
replication_config=replication_config_dict,
|
|
1052
|
+
)
|
|
1053
|
+
finally:
|
|
1054
|
+
await client.close()
|
|
1055
|
+
|
|
1056
|
+
# Return connector configured with the new connector_id
|
|
1057
|
+
return cls(
|
|
1058
|
+
airbyte_client_id=airbyte_client_id,
|
|
1059
|
+
airbyte_client_secret=airbyte_client_secret,
|
|
1060
|
+
connector_id=source_id,
|
|
1061
|
+
)
|
|
1062
|
+
|
|
960
1063
|
|
|
961
1064
|
|
|
962
1065
|
class TicketsQuery:
|
|
File without changes
|
|
File without changes
|
{airbyte_agent_zendesk_support-0.18.76 → airbyte_agent_zendesk_support-0.18.77}/REFERENCE.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|