airbyte-agent-zendesk-support 0.18.77__tar.gz → 0.18.79__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.77 → airbyte_agent_zendesk_support-0.18.79}/AUTH.md +53 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/CHANGELOG.md +10 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/PKG-INFO +3 -3
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/README.md +2 -2
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/cloud_utils/client.py +72 -9
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/base.py +32 -1
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/extensions.py +19 -1
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/security.py +37 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/connector.py +91 -4
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/pyproject.toml +1 -1
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/.gitignore +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/REFERENCE.md +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/auth_strategies.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/auth_template.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/cloud_utils/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/connector_model_loader.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/constants.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/exceptions.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/hosted_executor.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/local_executor.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/models.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/extensions.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http/adapters/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http/adapters/httpx_adapter.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http/config.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http/exceptions.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http/protocols.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http/response.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/http_client.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/introspection.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/logging/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/logging/logger.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/logging/types.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/config.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/models.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/redactor.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/session.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/performance/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/performance/instrumentation.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/performance/metrics.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/components.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/connector.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/operations.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/secrets.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/__init__.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/config.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/events.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/tracker.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/types.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/utils.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/validation.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/_vendored/connector_sdk/validation_replication.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/connector_model.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/models.py +0 -0
- {airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/airbyte_agent_zendesk_support/types.py +0 -0
|
@@ -87,6 +87,59 @@ curl -X POST "https://api.airbyte.ai/v1/integrations/connectors" \
|
|
|
87
87
|
}'
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
#### Bring your own OAuth flow
|
|
93
|
+
To implement your own OAuth flow, use Airbyte's server-side OAuth API endpoints. For a complete guide, see [Implement your own OAuth flow](https://docs.airbyte.com/ai-agents/quickstarts/tutorial-server-side-oauth).
|
|
94
|
+
|
|
95
|
+
**Step 1: Initiate the OAuth flow**
|
|
96
|
+
|
|
97
|
+
Request a consent URL for your user.
|
|
98
|
+
|
|
99
|
+
| Field Name | Type | Required | Description |
|
|
100
|
+
|------------|------|----------|-------------|
|
|
101
|
+
| `external_user_id` | `string` | Yes | Your unique identifier for the end user |
|
|
102
|
+
| `connector_type` | `string` | Yes | The connector type (e.g., "Zendesk-Support") |
|
|
103
|
+
| `redirect_url` | `string` | Yes | URL to redirect to after OAuth authorization |
|
|
104
|
+
|
|
105
|
+
Example request:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
curl -X POST "https://api.airbyte.ai/v1/integrations/connectors/oauth/initiate" \
|
|
109
|
+
-H "Authorization: Bearer <BEARER_TOKEN>" \
|
|
110
|
+
-H "Content-Type: application/json" \
|
|
111
|
+
-d '{
|
|
112
|
+
"external_user_id": "<EXTERNAL_USER_ID>",
|
|
113
|
+
"connector_type": "Zendesk-Support",
|
|
114
|
+
"redirect_url": "https://yourapp.com/oauth/callback"
|
|
115
|
+
}'
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Redirect your user to the `consent_url` from the response. After they authorize, they'll be redirected back to your app with a `secret_id` query parameter.
|
|
119
|
+
|
|
120
|
+
**Step 2: Create a connector with the secret ID**
|
|
121
|
+
|
|
122
|
+
| Field Name | Type | Required | Description |
|
|
123
|
+
|------------|------|----------|-------------|
|
|
124
|
+
| `external_user_id` | `string` | Yes | Your unique identifier for the end user |
|
|
125
|
+
| `connector_type` | `string` | Yes | The connector type (e.g., "Zendesk-Support") |
|
|
126
|
+
| `name` | `string` | Yes | A name for this connector instance |
|
|
127
|
+
| `server_side_oauth_secret_id` | `string` | Yes | The secret_id from the OAuth callback |
|
|
128
|
+
|
|
129
|
+
Example request:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
curl -X POST "https://api.airbyte.ai/v1/integrations/connectors" \
|
|
133
|
+
-H "Authorization: Bearer <BEARER_TOKEN>" \
|
|
134
|
+
-H "Content-Type: application/json" \
|
|
135
|
+
-d '{
|
|
136
|
+
"external_user_id": "<EXTERNAL_USER_ID>",
|
|
137
|
+
"connector_type": "Zendesk-Support",
|
|
138
|
+
"name": "My Zendesk-Support Connector",
|
|
139
|
+
"server_side_oauth_secret_id": "<secret_id_from_callback>"
|
|
140
|
+
}'
|
|
141
|
+
```
|
|
142
|
+
|
|
90
143
|
#### Token
|
|
91
144
|
Create a connector with Token credentials.
|
|
92
145
|
|
{airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/CHANGELOG.md
RENAMED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Zendesk Support changelog
|
|
2
2
|
|
|
3
|
+
## [0.18.79] - 2026-02-02
|
|
4
|
+
- Updated connector definition (YAML version 0.1.11)
|
|
5
|
+
- Source commit: 94024675
|
|
6
|
+
- SDK version: 0.1.0
|
|
7
|
+
|
|
8
|
+
## [0.18.78] - 2026-02-02
|
|
9
|
+
- Updated connector definition (YAML version 0.1.11)
|
|
10
|
+
- Source commit: 9d9866b0
|
|
11
|
+
- SDK version: 0.1.0
|
|
12
|
+
|
|
3
13
|
## [0.18.77] - 2026-01-30
|
|
4
14
|
- Updated connector definition (YAML version 0.1.11)
|
|
5
15
|
- Source commit: b184da3e
|
|
@@ -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.79
|
|
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.79
|
|
161
161
|
- **Connector version:** 0.1.11
|
|
162
|
-
- **Generated with Connector SDK commit SHA:**
|
|
162
|
+
- **Generated with Connector SDK commit SHA:** 940246757c7476ed4edd7d16b873ebe54ea2b456
|
|
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.79
|
|
128
128
|
- **Connector version:** 0.1.11
|
|
129
|
-
- **Generated with Connector SDK commit SHA:**
|
|
129
|
+
- **Generated with Connector SDK commit SHA:** 940246757c7476ed4edd7d16b873ebe54ea2b456
|
|
130
130
|
- **Changelog:** [View changelog](https://github.com/airbytehq/airbyte-agent-connectors/blob/main/connectors/zendesk-support/CHANGELOG.md)
|
|
@@ -161,24 +161,80 @@ class AirbyteCloudClient:
|
|
|
161
161
|
connector_id = connectors[0]["id"]
|
|
162
162
|
return connector_id
|
|
163
163
|
|
|
164
|
+
async def initiate_oauth(
|
|
165
|
+
self,
|
|
166
|
+
definition_id: str,
|
|
167
|
+
external_user_id: str,
|
|
168
|
+
redirect_url: str,
|
|
169
|
+
) -> str:
|
|
170
|
+
"""Initiate a server-side OAuth flow.
|
|
171
|
+
|
|
172
|
+
Starts the OAuth flow for a connector. Returns a consent URL where the
|
|
173
|
+
end user should be redirected to grant access. After completing consent,
|
|
174
|
+
they'll be redirected to your redirect_url with a `server_side_oauth_secret_id`
|
|
175
|
+
query parameter that can be used with `create_source()`.
|
|
176
|
+
|
|
177
|
+
Args:
|
|
178
|
+
definition_id: Connector definition UUID
|
|
179
|
+
external_user_id: Workspace identifier
|
|
180
|
+
redirect_url: URL where users will be redirected after OAuth consent
|
|
181
|
+
|
|
182
|
+
Returns:
|
|
183
|
+
The OAuth consent URL
|
|
184
|
+
|
|
185
|
+
Raises:
|
|
186
|
+
httpx.HTTPStatusError: If the request fails
|
|
187
|
+
|
|
188
|
+
Example:
|
|
189
|
+
consent_url = await client.initiate_oauth(
|
|
190
|
+
definition_id="d8313939-3782-41b0-be29-b3ca20d8dd3a",
|
|
191
|
+
external_user_id="my-workspace",
|
|
192
|
+
redirect_url="https://myapp.com/oauth/callback",
|
|
193
|
+
)
|
|
194
|
+
# Redirect user to: consent_url
|
|
195
|
+
# After consent: https://myapp.com/oauth/callback?server_side_oauth_secret_id=...
|
|
196
|
+
"""
|
|
197
|
+
token = await self.get_bearer_token()
|
|
198
|
+
url = f"{self.API_BASE_URL}/api/v1/integrations/connectors/oauth/initiate"
|
|
199
|
+
headers = {"Authorization": f"Bearer {token}"}
|
|
200
|
+
request_body = {
|
|
201
|
+
"external_user_id": external_user_id,
|
|
202
|
+
"definition_id": definition_id,
|
|
203
|
+
"redirect_url": redirect_url,
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
response = await self._http_client.post(url, json=request_body, headers=headers)
|
|
207
|
+
response.raise_for_status()
|
|
208
|
+
return response.json()["consent_url"]
|
|
209
|
+
|
|
164
210
|
async def create_source(
|
|
165
211
|
self,
|
|
166
212
|
name: str,
|
|
167
213
|
connector_definition_id: str,
|
|
168
214
|
external_user_id: str,
|
|
169
|
-
credentials: dict[str, Any],
|
|
215
|
+
credentials: dict[str, Any] | None = None,
|
|
170
216
|
replication_config: dict[str, Any] | None = None,
|
|
217
|
+
server_side_oauth_secret_id: str | None = None,
|
|
218
|
+
source_template_id: str | None = None,
|
|
171
219
|
) -> str:
|
|
172
|
-
"""Create a new source on Airbyte
|
|
220
|
+
"""Create a new source on Airbyte Cloud.
|
|
221
|
+
|
|
222
|
+
Supports two authentication modes:
|
|
223
|
+
1. Direct credentials: Provide `credentials` dict
|
|
224
|
+
2. Server-side OAuth: Provide `server_side_oauth_secret_id` from OAuth flow
|
|
173
225
|
|
|
174
226
|
Args:
|
|
175
227
|
name: Source name
|
|
176
228
|
connector_definition_id: UUID of the connector definition
|
|
177
229
|
external_user_id: User identifier
|
|
178
|
-
credentials: Connector auth config dict
|
|
230
|
+
credentials: Connector auth config dict. Required unless using OAuth.
|
|
179
231
|
replication_config: Optional replication settings (e.g., start_date for
|
|
180
232
|
connectors with x-airbyte-replication-config). Required for REPLICATION
|
|
181
233
|
mode sources like Intercom.
|
|
234
|
+
server_side_oauth_secret_id: OAuth secret ID from initiate_oauth redirect.
|
|
235
|
+
When provided, credentials are not required.
|
|
236
|
+
source_template_id: Source template ID. Required when organization has
|
|
237
|
+
multiple source templates for this connector type.
|
|
182
238
|
|
|
183
239
|
Returns:
|
|
184
240
|
The created source ID (UUID string)
|
|
@@ -187,19 +243,21 @@ class AirbyteCloudClient:
|
|
|
187
243
|
httpx.HTTPStatusError: If creation fails
|
|
188
244
|
|
|
189
245
|
Example:
|
|
246
|
+
# With direct credentials:
|
|
190
247
|
source_id = await client.create_source(
|
|
191
|
-
name="My
|
|
192
|
-
connector_definition_id="
|
|
248
|
+
name="My Intercom Source",
|
|
249
|
+
connector_definition_id="d8313939-3782-41b0-be29-b3ca20d8dd3a",
|
|
193
250
|
external_user_id="my-workspace",
|
|
194
|
-
credentials={"
|
|
251
|
+
credentials={"access_token": "..."},
|
|
252
|
+
replication_config={"start_date": "2024-01-01T00:00:00Z"}
|
|
195
253
|
)
|
|
196
254
|
|
|
197
|
-
#
|
|
255
|
+
# With server-side OAuth:
|
|
198
256
|
source_id = await client.create_source(
|
|
199
257
|
name="My Intercom Source",
|
|
200
258
|
connector_definition_id="d8313939-3782-41b0-be29-b3ca20d8dd3a",
|
|
201
259
|
external_user_id="my-workspace",
|
|
202
|
-
|
|
260
|
+
server_side_oauth_secret_id="airbyte_oauth_..._secret_...",
|
|
203
261
|
replication_config={"start_date": "2024-01-01T00:00:00Z"}
|
|
204
262
|
)
|
|
205
263
|
"""
|
|
@@ -211,11 +269,16 @@ class AirbyteCloudClient:
|
|
|
211
269
|
"name": name,
|
|
212
270
|
"definition_id": connector_definition_id,
|
|
213
271
|
"external_user_id": external_user_id,
|
|
214
|
-
"credentials": credentials,
|
|
215
272
|
}
|
|
216
273
|
|
|
274
|
+
if credentials is not None:
|
|
275
|
+
request_body["credentials"] = credentials
|
|
217
276
|
if replication_config is not None:
|
|
218
277
|
request_body["replication_config"] = replication_config
|
|
278
|
+
if server_side_oauth_secret_id is not None:
|
|
279
|
+
request_body["server_side_oauth_secret_id"] = server_side_oauth_secret_id
|
|
280
|
+
if source_template_id is not None:
|
|
281
|
+
request_body["source_template_id"] = source_template_id
|
|
219
282
|
|
|
220
283
|
response = await self._http_client.post(url, json=request_body, headers=headers)
|
|
221
284
|
response.raise_for_status()
|
|
@@ -10,7 +10,7 @@ from enum import StrEnum
|
|
|
10
10
|
from typing import Any, Dict
|
|
11
11
|
from uuid import UUID
|
|
12
12
|
|
|
13
|
-
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
|
13
|
+
from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
|
|
14
14
|
from pydantic_core import Url
|
|
15
15
|
|
|
16
16
|
from .extensions import CacheConfig, ReplicationConfig, RetryConfig
|
|
@@ -210,3 +210,34 @@ class Server(BaseModel):
|
|
|
210
210
|
raise ValueError("Server URL cannot be empty")
|
|
211
211
|
# Allow both absolute URLs and relative paths
|
|
212
212
|
return v
|
|
213
|
+
|
|
214
|
+
@model_validator(mode="after")
|
|
215
|
+
def validate_replication_environment_mapping(self) -> "Server":
|
|
216
|
+
"""Validate that x-airbyte-replication-environment-mapping sources exist in variables.
|
|
217
|
+
|
|
218
|
+
For simple mappings like {"subdomain": "subdomain"}, the key is the source variable.
|
|
219
|
+
For transform mappings like {"domain": {"source": "subdomain", "format": "..."}},
|
|
220
|
+
the "source" field is the source variable.
|
|
221
|
+
"""
|
|
222
|
+
env_mapping = self.x_airbyte_replication_environment_mapping
|
|
223
|
+
if not env_mapping or not self.variables:
|
|
224
|
+
return self
|
|
225
|
+
|
|
226
|
+
variable_names = set(self.variables.keys())
|
|
227
|
+
|
|
228
|
+
for env_key, mapping_value in env_mapping.items():
|
|
229
|
+
if isinstance(mapping_value, str):
|
|
230
|
+
source_var = env_key
|
|
231
|
+
elif isinstance(mapping_value, EnvironmentMappingTransform):
|
|
232
|
+
source_var = mapping_value.source
|
|
233
|
+
else:
|
|
234
|
+
continue
|
|
235
|
+
|
|
236
|
+
if source_var not in variable_names:
|
|
237
|
+
available = ", ".join(sorted(variable_names)) if variable_names else "(none)"
|
|
238
|
+
raise ValueError(
|
|
239
|
+
f"x-airbyte-replication-environment-mapping: source variable '{source_var}' "
|
|
240
|
+
f"not found in server variables. Available: {available}"
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
return self
|
|
@@ -14,7 +14,7 @@ are implemented.
|
|
|
14
14
|
|
|
15
15
|
from typing import Literal
|
|
16
16
|
|
|
17
|
-
from pydantic import BaseModel, ConfigDict, Field
|
|
17
|
+
from pydantic import BaseModel, ConfigDict, Field, model_validator
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class PaginationConfig(BaseModel):
|
|
@@ -252,6 +252,24 @@ class ReplicationConfig(BaseModel):
|
|
|
252
252
|
description="Mapping from replication_config field names to source_config field names",
|
|
253
253
|
)
|
|
254
254
|
|
|
255
|
+
@model_validator(mode="after")
|
|
256
|
+
def validate_replication_config_key_mapping(self) -> "ReplicationConfig":
|
|
257
|
+
"""Validate that replication_config_key_mapping keys exist in properties.
|
|
258
|
+
|
|
259
|
+
The mapping is: {local_key: airbyte_path}
|
|
260
|
+
We validate that local_key exists in our properties.
|
|
261
|
+
"""
|
|
262
|
+
if self.replication_config_key_mapping and self.properties:
|
|
263
|
+
property_names = set(self.properties.keys())
|
|
264
|
+
for local_key, airbyte_path in self.replication_config_key_mapping.items():
|
|
265
|
+
if local_key not in property_names:
|
|
266
|
+
available = ", ".join(sorted(property_names)) if property_names else "(none)"
|
|
267
|
+
raise ValueError(
|
|
268
|
+
f"replication_config_key_mapping: local key '{local_key}' "
|
|
269
|
+
f"(mapped to '{airbyte_path}') not found in properties. Available: {available}"
|
|
270
|
+
)
|
|
271
|
+
return self
|
|
272
|
+
|
|
255
273
|
|
|
256
274
|
class CacheConfig(BaseModel):
|
|
257
275
|
"""
|
|
@@ -81,6 +81,21 @@ class AuthConfigOption(BaseModel):
|
|
|
81
81
|
description="Mapping from source config paths (e.g., 'credentials.api_key') to auth config keys for direct connectors",
|
|
82
82
|
)
|
|
83
83
|
|
|
84
|
+
@model_validator(mode="after")
|
|
85
|
+
def validate_replication_auth_key_mapping(self) -> "AuthConfigOption":
|
|
86
|
+
"""Validate that replication_auth_key_mapping target keys exist in properties."""
|
|
87
|
+
if self.replication_auth_key_mapping and self.properties:
|
|
88
|
+
property_names = set(self.properties.keys())
|
|
89
|
+
for airbyte_path, our_key in self.replication_auth_key_mapping.items():
|
|
90
|
+
if our_key not in property_names:
|
|
91
|
+
option_context = f"oneOf option '{self.title}'" if self.title else "oneOf option"
|
|
92
|
+
available = ", ".join(sorted(property_names)) if property_names else "(none)"
|
|
93
|
+
raise ValueError(
|
|
94
|
+
f"replication_auth_key_mapping in {option_context}: target key '{our_key}' "
|
|
95
|
+
f"(mapped from '{airbyte_path}') not found in properties. Available: {available}"
|
|
96
|
+
)
|
|
97
|
+
return self
|
|
98
|
+
|
|
84
99
|
|
|
85
100
|
class AirbyteAuthConfig(BaseModel):
|
|
86
101
|
"""
|
|
@@ -146,8 +161,30 @@ class AirbyteAuthConfig(BaseModel):
|
|
|
146
161
|
if not self.auth_mapping:
|
|
147
162
|
raise ValueError("Single auth option must have auth_mapping")
|
|
148
163
|
|
|
164
|
+
# Validate replication_auth_key_mapping targets exist in properties
|
|
165
|
+
if self.replication_auth_key_mapping and self.properties:
|
|
166
|
+
self._validate_replication_auth_key_mapping(self.replication_auth_key_mapping, self.properties, context="x-airbyte-auth-config")
|
|
167
|
+
|
|
149
168
|
return self
|
|
150
169
|
|
|
170
|
+
@staticmethod
|
|
171
|
+
def _validate_replication_auth_key_mapping(mapping: Dict[str, str], properties: Dict[str, AuthConfigFieldSpec], context: str) -> None:
|
|
172
|
+
"""Validate that replication_auth_key_mapping target keys exist in properties.
|
|
173
|
+
|
|
174
|
+
Args:
|
|
175
|
+
mapping: The replication_auth_key_mapping dict (airbyte_path -> our_key)
|
|
176
|
+
properties: The properties dict from x-airbyte-auth-config
|
|
177
|
+
context: Context string for error messages
|
|
178
|
+
"""
|
|
179
|
+
property_names = set(properties.keys())
|
|
180
|
+
for airbyte_path, our_key in mapping.items():
|
|
181
|
+
if our_key not in property_names:
|
|
182
|
+
available = ", ".join(sorted(property_names)) if property_names else "(none)"
|
|
183
|
+
raise ValueError(
|
|
184
|
+
f"replication_auth_key_mapping in {context}: target key '{our_key}' "
|
|
185
|
+
f"(mapped from '{airbyte_path}') not found in properties. Available: {available}"
|
|
186
|
+
)
|
|
187
|
+
|
|
151
188
|
|
|
152
189
|
class SecurityScheme(BaseModel):
|
|
153
190
|
"""
|
|
@@ -987,6 +987,59 @@ class ZendeskSupportConnector:
|
|
|
987
987
|
|
|
988
988
|
# ===== HOSTED MODE FACTORY =====
|
|
989
989
|
|
|
990
|
+
@classmethod
|
|
991
|
+
async def initiate_oauth(
|
|
992
|
+
cls,
|
|
993
|
+
*,
|
|
994
|
+
external_user_id: str,
|
|
995
|
+
redirect_url: str,
|
|
996
|
+
airbyte_client_id: str,
|
|
997
|
+
airbyte_client_secret: str,
|
|
998
|
+
) -> str:
|
|
999
|
+
"""
|
|
1000
|
+
Initiate server-side OAuth flow for this connector.
|
|
1001
|
+
|
|
1002
|
+
Returns a consent URL where the end user should be redirected to grant access.
|
|
1003
|
+
After completing consent, they'll be redirected to your redirect_url with a
|
|
1004
|
+
`server_side_oauth_secret_id` query parameter that can be used with `create_hosted()`.
|
|
1005
|
+
|
|
1006
|
+
Args:
|
|
1007
|
+
external_user_id: Workspace identifier in Airbyte Cloud
|
|
1008
|
+
redirect_url: URL where users will be redirected after OAuth consent
|
|
1009
|
+
airbyte_client_id: Airbyte OAuth client ID
|
|
1010
|
+
airbyte_client_secret: Airbyte OAuth client secret
|
|
1011
|
+
|
|
1012
|
+
Returns:
|
|
1013
|
+
The OAuth consent URL
|
|
1014
|
+
|
|
1015
|
+
Example:
|
|
1016
|
+
consent_url = await ZendeskSupportConnector.initiate_oauth(
|
|
1017
|
+
external_user_id="my-workspace",
|
|
1018
|
+
redirect_url="https://myapp.com/oauth/callback",
|
|
1019
|
+
airbyte_client_id="client_abc",
|
|
1020
|
+
airbyte_client_secret="secret_xyz",
|
|
1021
|
+
)
|
|
1022
|
+
# Redirect user to: consent_url
|
|
1023
|
+
# After consent, user arrives at: https://myapp.com/oauth/callback?server_side_oauth_secret_id=...
|
|
1024
|
+
"""
|
|
1025
|
+
from ._vendored.connector_sdk.cloud_utils import AirbyteCloudClient
|
|
1026
|
+
|
|
1027
|
+
client = AirbyteCloudClient(
|
|
1028
|
+
client_id=airbyte_client_id,
|
|
1029
|
+
client_secret=airbyte_client_secret,
|
|
1030
|
+
)
|
|
1031
|
+
|
|
1032
|
+
try:
|
|
1033
|
+
consent_url = await client.initiate_oauth(
|
|
1034
|
+
definition_id=str(ZendeskSupportConnectorModel.id),
|
|
1035
|
+
external_user_id=external_user_id,
|
|
1036
|
+
redirect_url=redirect_url,
|
|
1037
|
+
)
|
|
1038
|
+
finally:
|
|
1039
|
+
await client.close()
|
|
1040
|
+
|
|
1041
|
+
return consent_url
|
|
1042
|
+
|
|
990
1043
|
@classmethod
|
|
991
1044
|
async def create_hosted(
|
|
992
1045
|
cls,
|
|
@@ -994,9 +1047,11 @@ class ZendeskSupportConnector:
|
|
|
994
1047
|
external_user_id: str,
|
|
995
1048
|
airbyte_client_id: str,
|
|
996
1049
|
airbyte_client_secret: str,
|
|
997
|
-
auth_config: "ZendeskSupportAuthConfig",
|
|
1050
|
+
auth_config: "ZendeskSupportAuthConfig" | None = None,
|
|
1051
|
+
server_side_oauth_secret_id: str | None = None,
|
|
998
1052
|
name: str | None = None,
|
|
999
1053
|
replication_config: dict[str, Any] | None = None,
|
|
1054
|
+
source_template_id: str | None = None,
|
|
1000
1055
|
) -> "ZendeskSupportConnector":
|
|
1001
1056
|
"""
|
|
1002
1057
|
Create a new hosted connector on Airbyte Cloud.
|
|
@@ -1005,18 +1060,29 @@ class ZendeskSupportConnector:
|
|
|
1005
1060
|
1. Creates a source on Airbyte Cloud with the provided credentials
|
|
1006
1061
|
2. Returns a connector configured with the new connector_id
|
|
1007
1062
|
|
|
1063
|
+
Supports two authentication modes:
|
|
1064
|
+
1. Direct credentials: Provide `auth_config` with typed credentials
|
|
1065
|
+
2. Server-side OAuth: Provide `server_side_oauth_secret_id` from OAuth flow
|
|
1066
|
+
|
|
1008
1067
|
Args:
|
|
1009
1068
|
external_user_id: Workspace identifier in Airbyte Cloud
|
|
1010
1069
|
airbyte_client_id: Airbyte OAuth client ID
|
|
1011
1070
|
airbyte_client_secret: Airbyte OAuth client secret
|
|
1012
|
-
auth_config: Typed auth config
|
|
1071
|
+
auth_config: Typed auth config. Required unless using server_side_oauth_secret_id.
|
|
1072
|
+
server_side_oauth_secret_id: OAuth secret ID from initiate_oauth redirect.
|
|
1073
|
+
When provided, auth_config is not required.
|
|
1013
1074
|
name: Optional source name (defaults to connector name + external_user_id)
|
|
1014
1075
|
replication_config: Optional replication settings dict.
|
|
1015
1076
|
Required for connectors with x-airbyte-replication-config (REPLICATION mode sources).
|
|
1077
|
+
source_template_id: Source template ID. Required when organization has
|
|
1078
|
+
multiple source templates for this connector type.
|
|
1016
1079
|
|
|
1017
1080
|
Returns:
|
|
1018
1081
|
A ZendeskSupportConnector instance configured in hosted mode
|
|
1019
1082
|
|
|
1083
|
+
Raises:
|
|
1084
|
+
ValueError: If neither or both auth_config and server_side_oauth_secret_id provided
|
|
1085
|
+
|
|
1020
1086
|
Example:
|
|
1021
1087
|
# Create a new hosted connector with API key auth
|
|
1022
1088
|
connector = await ZendeskSupportConnector.create_hosted(
|
|
@@ -1026,9 +1092,27 @@ class ZendeskSupportConnector:
|
|
|
1026
1092
|
auth_config=ZendeskSupportAuthConfig(access_token="...", refresh_token="..."),
|
|
1027
1093
|
)
|
|
1028
1094
|
|
|
1095
|
+
# With server-side OAuth:
|
|
1096
|
+
connector = await ZendeskSupportConnector.create_hosted(
|
|
1097
|
+
external_user_id="my-workspace",
|
|
1098
|
+
airbyte_client_id="client_abc",
|
|
1099
|
+
airbyte_client_secret="secret_xyz",
|
|
1100
|
+
server_side_oauth_secret_id="airbyte_oauth_..._secret_...",
|
|
1101
|
+
)
|
|
1102
|
+
|
|
1029
1103
|
# Use the connector
|
|
1030
1104
|
result = await connector.execute("entity", "list", {})
|
|
1031
1105
|
"""
|
|
1106
|
+
# Validate: exactly one of auth_config or server_side_oauth_secret_id required
|
|
1107
|
+
if auth_config is None and server_side_oauth_secret_id is None:
|
|
1108
|
+
raise ValueError(
|
|
1109
|
+
"Either auth_config or server_side_oauth_secret_id must be provided"
|
|
1110
|
+
)
|
|
1111
|
+
if auth_config is not None and server_side_oauth_secret_id is not None:
|
|
1112
|
+
raise ValueError(
|
|
1113
|
+
"Cannot provide both auth_config and server_side_oauth_secret_id"
|
|
1114
|
+
)
|
|
1115
|
+
|
|
1032
1116
|
from ._vendored.connector_sdk.cloud_utils import AirbyteCloudClient
|
|
1033
1117
|
|
|
1034
1118
|
client = AirbyteCloudClient(
|
|
@@ -1037,8 +1121,8 @@ class ZendeskSupportConnector:
|
|
|
1037
1121
|
)
|
|
1038
1122
|
|
|
1039
1123
|
try:
|
|
1040
|
-
# Build credentials from auth_config
|
|
1041
|
-
credentials = auth_config.model_dump(exclude_none=True)
|
|
1124
|
+
# Build credentials from auth_config (if provided)
|
|
1125
|
+
credentials = auth_config.model_dump(exclude_none=True) if auth_config else None
|
|
1042
1126
|
replication_config_dict = replication_config.model_dump(exclude_none=True) if replication_config else None
|
|
1043
1127
|
|
|
1044
1128
|
# Create source on Airbyte Cloud
|
|
@@ -1049,6 +1133,8 @@ class ZendeskSupportConnector:
|
|
|
1049
1133
|
external_user_id=external_user_id,
|
|
1050
1134
|
credentials=credentials,
|
|
1051
1135
|
replication_config=replication_config_dict,
|
|
1136
|
+
server_side_oauth_secret_id=server_side_oauth_secret_id,
|
|
1137
|
+
source_template_id=source_template_id,
|
|
1052
1138
|
)
|
|
1053
1139
|
finally:
|
|
1054
1140
|
await client.close()
|
|
@@ -1062,6 +1148,7 @@ class ZendeskSupportConnector:
|
|
|
1062
1148
|
|
|
1063
1149
|
|
|
1064
1150
|
|
|
1151
|
+
|
|
1065
1152
|
class TicketsQuery:
|
|
1066
1153
|
"""
|
|
1067
1154
|
Query class for Tickets entity operations.
|
|
File without changes
|
{airbyte_agent_zendesk_support-0.18.77 → airbyte_agent_zendesk_support-0.18.79}/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
|