airbyte-source-shopify 2.6.6__py3-none-any.whl → 2.7.0.dev202503201259__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: airbyte-source-shopify
3
- Version: 2.6.6
3
+ Version: 2.7.0.dev202503201259
4
4
  Summary: Source CDK implementation for Shopify.
5
5
  License: ELv2
6
6
  Author: Airbyte
@@ -42,7 +42,7 @@ source_shopify/schemas/orders.json,sha256=DbipJlJqW2lzuGF2ce4JLRa4H491kVVAWBsoh8
42
42
  source_shopify/schemas/pages.json,sha256=J7jxtk2nE_q-0oHmGz8orFq3EfSjJqUvF6qPJtiZCrg,2093
43
43
  source_shopify/schemas/price_rules.json,sha256=aZ-Re9Oc9g0ci8SPn0_ufvKPsGDBcTaXHVsq_9-Ygq4,7004
44
44
  source_shopify/schemas/product_images.json,sha256=0l3ACfOfnXz8N8oMHwvvfZUFKeeuZ2DlRRu5-FxUhaI,1760
45
- source_shopify/schemas/product_variants.json,sha256=gEX-ZjfE95zJndX6MfmImCg499vYh97t7OWD5EQPHF0,8267
45
+ source_shopify/schemas/product_variants.json,sha256=aTubzg5lhK52kyxzy_2pD1xOAkE4qOGgOoDUsbvOJY8,8400
46
46
  source_shopify/schemas/products.json,sha256=n7m1ndEnAM7Pee5ca0JZWCl5Y0VffGmTZjqjHhiht1I,22609
47
47
  source_shopify/schemas/shop.json,sha256=vEGiTvEYX7qnMq06MRVBycqih49h49xjTNC6gJuxTWs,8137
48
48
  source_shopify/schemas/smart_collections.json,sha256=kv7dINsvgzJ0RyKfFNKjU0apdNDXwQaHfnNZfQsshcU,2009
@@ -51,19 +51,19 @@ source_shopify/schemas/transactions.json,sha256=vbwscH3UcAtbSsC70mBka4oNaFR4S3S6
51
51
  source_shopify/scopes.py,sha256=UVDERXNismYSnRaXwUXcn8x7Z6EtoNKOHts0Vs_Kl2I,6443
52
52
  source_shopify/shopify_graphql/bulk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  source_shopify/shopify_graphql/bulk/exceptions.py,sha256=4dj7Za4xIfwL-zf8joT9svF_RSoGlE3GviMiIl1e1rs,2532
54
- source_shopify/shopify_graphql/bulk/job.py,sha256=_GL2WXK23yJjYcnOzuiBgpBxvng3RF_ezPhl265puz4,27635
55
- source_shopify/shopify_graphql/bulk/query.py,sha256=jWALChkDaQ1upglE-qwv-gBCGXKjWK8vWup-o61DlB4,123798
54
+ source_shopify/shopify_graphql/bulk/job.py,sha256=UsYeXhjNJNHTv7su7p66rJ3BC5cNJkj3c9Iyuc2klbg,27535
55
+ source_shopify/shopify_graphql/bulk/query.py,sha256=4DtHwa5AaJyHP28EnqGdRH3TV68JyrN74yJmEfQehw0,124455
56
56
  source_shopify/shopify_graphql/bulk/record.py,sha256=X6VGngugv7a_S8UEeDo121BkdCVLj5nWlHK76A21kyo,16898
57
57
  source_shopify/shopify_graphql/bulk/retry.py,sha256=R5rSJJE8D5zcj6mN-OmmNO2aFZEIdjAlWclDDVW5KPI,2626
58
58
  source_shopify/shopify_graphql/bulk/status.py,sha256=RmuQ2XsYL3iRCpVGxea9F1wXGmbwasDCSXjaTyL4LMA,328
59
59
  source_shopify/shopify_graphql/bulk/tools.py,sha256=nUQ2ZmPTKJNJdfLToR6KJtLKcJFCChSifkAOvwg0Vss,4065
60
60
  source_shopify/source.py,sha256=WmtSMHMop9NvREj0VUR6P8qWYWyv21y6rFk42bPBzAo,8445
61
61
  source_shopify/spec.json,sha256=ITYWiQ-NrI5VISk5qmUQhp9ChUE2FV18d8xzVzPwvAg,6144
62
- source_shopify/streams/base_streams.py,sha256=-Yww6tSot5xG4MSwSK2JWHjR3DDFYM9q5Lw3GAKDNsc,40491
62
+ source_shopify/streams/base_streams.py,sha256=UMbGFMDWVdkKR3d7-JkR5GbaIJVGaWiMpWnaWefWFNE,40491
63
63
  source_shopify/streams/streams.py,sha256=UoWe89U5xfM2jdgCpWqRv5S4tXGM7GTMU0gq8nCr9oU,9618
64
64
  source_shopify/transform.py,sha256=mn0htL812_90zc_YszGQa0hHcIZQpYYdmk8IqpZm5TI,4685
65
65
  source_shopify/utils.py,sha256=CAEKcxIroBo6kRFCyvC1bfOyfbGy7Z7seqZB7Eekl44,14209
66
- airbyte_source_shopify-2.6.6.dist-info/METADATA,sha256=APdY1Pm4qiuAyc-8-DCS2UardtZresP7BW0yj6D0H9E,5309
67
- airbyte_source_shopify-2.6.6.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
68
- airbyte_source_shopify-2.6.6.dist-info/entry_points.txt,sha256=SyTwKSsPk9MCdPf01saWpnp8hcmZOgBssVcSIvMbBeQ,57
69
- airbyte_source_shopify-2.6.6.dist-info/RECORD,,
66
+ airbyte_source_shopify-2.7.0.dev202503201259.dist-info/METADATA,sha256=J1czuCYa9LmfwyNo3UxaA3VS8L9SPzQ7--kjQmUW-GQ,5325
67
+ airbyte_source_shopify-2.7.0.dev202503201259.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
68
+ airbyte_source_shopify-2.7.0.dev202503201259.dist-info/entry_points.txt,sha256=SyTwKSsPk9MCdPf01saWpnp8hcmZOgBssVcSIvMbBeQ,57
69
+ airbyte_source_shopify-2.7.0.dev202503201259.dist-info/RECORD,,
@@ -236,6 +236,10 @@
236
236
  "tax_code": {
237
237
  "description": "The tax code for the product variant.",
238
238
  "type": ["null", "string"]
239
+ },
240
+ "tracked": {
241
+ "description": "Whether inventory levels are tracked for the item.",
242
+ "type": ["null", "boolean"]
239
243
  }
240
244
  }
241
245
  }
@@ -246,8 +246,7 @@ class ShopifyBulkManager:
246
246
  _, canceled_response = self.http_client.send_request(
247
247
  http_method="POST",
248
248
  url=self.base_url,
249
- data=ShopifyBulkTemplates.cancel(self._job_id),
250
- headers={"Content-Type": "application/graphql"},
249
+ json={"query": ShopifyBulkTemplates.cancel(self._job_id)},
251
250
  request_kwargs={},
252
251
  )
253
252
  # mark the job was self-canceled
@@ -405,8 +404,7 @@ class ShopifyBulkManager:
405
404
  _, response = self.http_client.send_request(
406
405
  http_method="POST",
407
406
  url=self.base_url,
408
- data=ShopifyBulkTemplates.status(self._job_id),
409
- headers={"Content-Type": "application/graphql"},
407
+ json={"query": ShopifyBulkTemplates.status(self._job_id)},
410
408
  request_kwargs={},
411
409
  )
412
410
  self._job_healthcheck(response)
@@ -2652,7 +2652,15 @@ class ProductVariant(ShopifyBulkQuery):
2652
2652
  Field(name="src", alias="image_src"),
2653
2653
  Field(name="url", alias="image_url"),
2654
2654
  ]
2655
-
2655
+ measurement_fields = [
2656
+ Field(name="weight", fields=["value", "unit"]),
2657
+ ]
2658
+ inventory_item_fields = [
2659
+ Field(name="id", alias="inventory_item_id"),
2660
+ Field(name="tracked", alias="tracked"),
2661
+ Field(name="requiresShipping", alias="requiresShipping"),
2662
+ Field(name="measurement", alias="measurement", fields=measurement_fields),
2663
+ ]
2656
2664
  query_nodes: List[Field] = [
2657
2665
  "__typename",
2658
2666
  "id",
@@ -2662,25 +2670,19 @@ class ProductVariant(ShopifyBulkQuery):
2662
2670
  "position",
2663
2671
  "inventoryPolicy",
2664
2672
  "compareAtPrice",
2665
- "inventoryManagement",
2666
2673
  "createdAt",
2667
2674
  "updatedAt",
2668
2675
  "taxable",
2669
2676
  "barcode",
2670
- "weight",
2671
- "weightUnit",
2672
2677
  "inventoryQuantity",
2673
- "requiresShipping",
2674
2678
  "availableForSale",
2675
2679
  "displayName",
2676
2680
  "taxCode",
2677
2681
  Field(name="selectedOptions", alias="options", fields=option_fields),
2678
- Field(name="weight", alias="grams"),
2679
2682
  Field(name="image", fields=image_fields),
2680
2683
  Field(name="inventoryQuantity", alias="old_inventory_quantity"),
2681
2684
  Field(name="product", fields=[Field(name="id", alias="product_id")]),
2682
- Field(name="fulfillmentService", fields=[Field(name="handle", alias="fulfillment_service")]),
2683
- Field(name="inventoryItem", fields=[Field(name="id", alias="inventory_item_id")]),
2685
+ Field(name="inventoryItem", fields=inventory_item_fields),
2684
2686
  ] + presentment_prices
2685
2687
 
2686
2688
  return query_nodes
@@ -2741,6 +2743,12 @@ class ProductVariant(ShopifyBulkQuery):
2741
2743
  # unnest mandatory fields from their placeholders
2742
2744
  record["product_id"] = self._unnest_and_resolve_id(record, "product", "product_id")
2743
2745
  record["inventory_item_id"] = self._unnest_and_resolve_id(record, "inventoryItem", "inventory_item_id")
2746
+ inventory_item = record.get("inventoryItem")
2747
+ measurement_weight = record.get("inventoryItem", {}).get("measurement", {}).get("weight")
2748
+ record["weight"] = measurement_weight.get("value") if measurement_weight.get("value") else 0.0
2749
+ record["weight_unit"] = measurement_weight.get("unit") if measurement_weight else None
2750
+ record["tracked"] = inventory_item.get("tracked") if inventory_item else None
2751
+ record["requires_shipping"] = inventory_item.get("requiresShipping") if inventory_item else None
2744
2752
  record["image_id"] = self._unnest_and_resolve_id(record, "image", "image_id")
2745
2753
  image = record.get("image", {})
2746
2754
  record["image_src"] = image.get("image_src") if image else None
@@ -2751,7 +2759,7 @@ class ProductVariant(ShopifyBulkQuery):
2751
2759
  price = record.get("price")
2752
2760
  record["price"] = float(price) if price else None
2753
2761
  # cast the `grams` to integer
2754
- record["grams"] = int(record.get("grams", 0))
2762
+ record["grams"] = int(record.get("weight", 0))
2755
2763
  # convert date-time cursors
2756
2764
  record["createdAt"] = self.tools.from_iso8601_to_rfc3339(record, "createdAt")
2757
2765
  record["updatedAt"] = self.tools.from_iso8601_to_rfc3339(record, "updatedAt")
@@ -33,7 +33,7 @@ class ShopifyStream(HttpStream, ABC):
33
33
  logger = logging.getLogger("airbyte")
34
34
 
35
35
  # Latest Stable Release
36
- api_version = "2024-04"
36
+ api_version = "2025-01"
37
37
  # Page size
38
38
  limit = 250
39
39