airbyte-agent-shopify 0.1.25__py3-none-any.whl → 0.1.26__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airbyte_agent_shopify/__init__.py +2 -2
- airbyte_agent_shopify/_vendored/connector_sdk/schema/base.py +32 -1
- airbyte_agent_shopify/_vendored/connector_sdk/schema/extensions.py +19 -1
- airbyte_agent_shopify/_vendored/connector_sdk/schema/security.py +37 -0
- airbyte_agent_shopify/models.py +16 -16
- {airbyte_agent_shopify-0.1.25.dist-info → airbyte_agent_shopify-0.1.26.dist-info}/METADATA +3 -3
- {airbyte_agent_shopify-0.1.25.dist-info → airbyte_agent_shopify-0.1.26.dist-info}/RECORD +8 -8
- {airbyte_agent_shopify-0.1.25.dist-info → airbyte_agent_shopify-0.1.26.dist-info}/WHEEL +0 -0
|
@@ -19,8 +19,8 @@ from .models import (
|
|
|
19
19
|
Refund,
|
|
20
20
|
Order,
|
|
21
21
|
OrderList,
|
|
22
|
-
ProductVariant,
|
|
23
22
|
ProductImage,
|
|
23
|
+
ProductVariant,
|
|
24
24
|
Product,
|
|
25
25
|
ProductList,
|
|
26
26
|
ProductVariantList,
|
|
@@ -193,8 +193,8 @@ __all__ = [
|
|
|
193
193
|
"Refund",
|
|
194
194
|
"Order",
|
|
195
195
|
"OrderList",
|
|
196
|
-
"ProductVariant",
|
|
197
196
|
"ProductImage",
|
|
197
|
+
"ProductVariant",
|
|
198
198
|
"Product",
|
|
199
199
|
"ProductList",
|
|
200
200
|
"ProductVariantList",
|
|
@@ -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
|
"""
|
airbyte_agent_shopify/models.py
CHANGED
|
@@ -329,6 +329,22 @@ class OrderList(BaseModel):
|
|
|
329
329
|
|
|
330
330
|
orders: Union[list[Order], Any] = Field(default=None)
|
|
331
331
|
|
|
332
|
+
class ProductImage(BaseModel):
|
|
333
|
+
"""A product image"""
|
|
334
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
335
|
+
|
|
336
|
+
id: Union[int, Any] = Field(default=None)
|
|
337
|
+
product_id: Union[int | None, Any] = Field(default=None)
|
|
338
|
+
position: Union[int | None, Any] = Field(default=None)
|
|
339
|
+
created_at: Union[str | None, Any] = Field(default=None)
|
|
340
|
+
updated_at: Union[str | None, Any] = Field(default=None)
|
|
341
|
+
alt: Union[str | None, Any] = Field(default=None)
|
|
342
|
+
width: Union[int | None, Any] = Field(default=None)
|
|
343
|
+
height: Union[int | None, Any] = Field(default=None)
|
|
344
|
+
src: Union[str | None, Any] = Field(default=None)
|
|
345
|
+
variant_ids: Union[list[int] | None, Any] = Field(default=None)
|
|
346
|
+
admin_graphql_api_id: Union[str | None, Any] = Field(default=None)
|
|
347
|
+
|
|
332
348
|
class ProductVariant(BaseModel):
|
|
333
349
|
"""A product variant"""
|
|
334
350
|
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
@@ -360,22 +376,6 @@ class ProductVariant(BaseModel):
|
|
|
360
376
|
requires_shipping: Union[bool | None, Any] = Field(default=None)
|
|
361
377
|
admin_graphql_api_id: Union[str | None, Any] = Field(default=None)
|
|
362
378
|
|
|
363
|
-
class ProductImage(BaseModel):
|
|
364
|
-
"""A product image"""
|
|
365
|
-
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
366
|
-
|
|
367
|
-
id: Union[int, Any] = Field(default=None)
|
|
368
|
-
product_id: Union[int | None, Any] = Field(default=None)
|
|
369
|
-
position: Union[int | None, Any] = Field(default=None)
|
|
370
|
-
created_at: Union[str | None, Any] = Field(default=None)
|
|
371
|
-
updated_at: Union[str | None, Any] = Field(default=None)
|
|
372
|
-
alt: Union[str | None, Any] = Field(default=None)
|
|
373
|
-
width: Union[int | None, Any] = Field(default=None)
|
|
374
|
-
height: Union[int | None, Any] = Field(default=None)
|
|
375
|
-
src: Union[str | None, Any] = Field(default=None)
|
|
376
|
-
variant_ids: Union[list[int] | None, Any] = Field(default=None)
|
|
377
|
-
admin_graphql_api_id: Union[str | None, Any] = Field(default=None)
|
|
378
|
-
|
|
379
379
|
class Product(BaseModel):
|
|
380
380
|
"""A Shopify product"""
|
|
381
381
|
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: airbyte-agent-shopify
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.26
|
|
4
4
|
Summary: Airbyte Shopify 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/
|
|
@@ -171,7 +171,7 @@ See the official [Shopify API reference](https://shopify.dev/docs/api/admin-rest
|
|
|
171
171
|
|
|
172
172
|
## Version information
|
|
173
173
|
|
|
174
|
-
- **Package version:** 0.1.
|
|
174
|
+
- **Package version:** 0.1.26
|
|
175
175
|
- **Connector version:** 0.1.3
|
|
176
|
-
- **Generated with Connector SDK commit SHA:**
|
|
176
|
+
- **Generated with Connector SDK commit SHA:** 940246757c7476ed4edd7d16b873ebe54ea2b456
|
|
177
177
|
- **Changelog:** [View changelog](https://github.com/airbytehq/airbyte-agent-connectors/blob/main/connectors/shopify/CHANGELOG.md)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
airbyte_agent_shopify/__init__.py,sha256=
|
|
1
|
+
airbyte_agent_shopify/__init__.py,sha256=StHPXanN9aFcsIpOleHtEa0d2ybT3B8BV7YMhAJ5IpM,9711
|
|
2
2
|
airbyte_agent_shopify/connector.py,sha256=tfPJuuqBBkvjMJaid7UuYD1JkIIGmBUqQzAZ902q2ws,99627
|
|
3
3
|
airbyte_agent_shopify/connector_model.py,sha256=OOKD-zmjbVv-MX-r3c-QF3alQqn6vKTDjRjAF6y0ddQ,691056
|
|
4
|
-
airbyte_agent_shopify/models.py,sha256=
|
|
4
|
+
airbyte_agent_shopify/models.py,sha256=OH8mFD-sGhFg4WZP_GjUbLbb_KZsgAvt2STrZbiyhPI,61514
|
|
5
5
|
airbyte_agent_shopify/types.py,sha256=AwQ4PR2wZmHNuryriCFdRxf9q48J1mnPwspUB1b-L_o,10221
|
|
6
6
|
airbyte_agent_shopify/_vendored/__init__.py,sha256=ILl7AHXMui__swyrjxrh9yRa4dLiwBvV6axPWFWty80,38
|
|
7
7
|
airbyte_agent_shopify/_vendored/connector_sdk/__init__.py,sha256=T5o7roU6NSpH-lCAGZ338sE5dlh4ZU6i6IkeG1zpems,1949
|
|
@@ -43,16 +43,16 @@ airbyte_agent_shopify/_vendored/connector_sdk/performance/__init__.py,sha256=Sp5
|
|
|
43
43
|
airbyte_agent_shopify/_vendored/connector_sdk/performance/instrumentation.py,sha256=_dXvNiqdndIBwDjeDKNViWzn_M5FkSUsMmJtFldrmsM,1504
|
|
44
44
|
airbyte_agent_shopify/_vendored/connector_sdk/performance/metrics.py,sha256=FRff7dKt4iwt_A7pxV5n9kAGBR756PC7q8-weWygPSM,2817
|
|
45
45
|
airbyte_agent_shopify/_vendored/connector_sdk/schema/__init__.py,sha256=Uymu-QuzGJuMxexBagIvUxpVAigIuIhz3KeBl_Vu4Ko,1638
|
|
46
|
-
airbyte_agent_shopify/_vendored/connector_sdk/schema/base.py,sha256=
|
|
46
|
+
airbyte_agent_shopify/_vendored/connector_sdk/schema/base.py,sha256=0R0aR4HjcJpu3vN0jZ4nPBEwVZ_7J9_XLQgWaQGT3Fs,8476
|
|
47
47
|
airbyte_agent_shopify/_vendored/connector_sdk/schema/components.py,sha256=nJIPieavwX3o3ODvdtLHPk84d_V229xmg6LDfwEHjzc,8119
|
|
48
48
|
airbyte_agent_shopify/_vendored/connector_sdk/schema/connector.py,sha256=mSZk1wr2YSdRj9tTRsPAuIlCzd_xZLw-Bzl1sMwE0rE,3731
|
|
49
|
-
airbyte_agent_shopify/_vendored/connector_sdk/schema/extensions.py,sha256=
|
|
49
|
+
airbyte_agent_shopify/_vendored/connector_sdk/schema/extensions.py,sha256=DqWCvyWKLnPxAbJirq6uITf-MBeJRVCcsEjySF4fuhQ,10558
|
|
50
50
|
airbyte_agent_shopify/_vendored/connector_sdk/schema/operations.py,sha256=St-A75m6sZUZlsoM6WcoPaShYu_X1K19pdyPvJbabOE,6214
|
|
51
|
-
airbyte_agent_shopify/_vendored/connector_sdk/schema/security.py,sha256=
|
|
51
|
+
airbyte_agent_shopify/_vendored/connector_sdk/schema/security.py,sha256=5UeaN63InuInS_XHNZSm5yDXrMLm5lhz298l-3GSc_4,11435
|
|
52
52
|
airbyte_agent_shopify/_vendored/connector_sdk/telemetry/__init__.py,sha256=RaLgkBU4dfxn1LC5Y0Q9rr2PJbrwjxvPgBLmq8_WafE,211
|
|
53
53
|
airbyte_agent_shopify/_vendored/connector_sdk/telemetry/config.py,sha256=tLmQwAFD0kP1WyBGWBS3ysaudN9H3e-3EopKZi6cGKg,885
|
|
54
54
|
airbyte_agent_shopify/_vendored/connector_sdk/telemetry/events.py,sha256=8Y1NbXiwISX-V_wRofY7PqcwEXD0dLMnntKkY6XFU2s,1328
|
|
55
55
|
airbyte_agent_shopify/_vendored/connector_sdk/telemetry/tracker.py,sha256=SginFQbHqVUVYG82NnNzG34O-tAQ_wZYjGDcuo0q4Kk,5584
|
|
56
|
-
airbyte_agent_shopify-0.1.
|
|
57
|
-
airbyte_agent_shopify-0.1.
|
|
58
|
-
airbyte_agent_shopify-0.1.
|
|
56
|
+
airbyte_agent_shopify-0.1.26.dist-info/METADATA,sha256=PSiVxIZwGptlJagSIqBnRoKCOONhQYY0Nck2CIu5s40,7999
|
|
57
|
+
airbyte_agent_shopify-0.1.26.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
58
|
+
airbyte_agent_shopify-0.1.26.dist-info/RECORD,,
|
|
File without changes
|