airbyte-source-shopify 3.2.0__tar.gz → 3.2.0.dev202602040050__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.
Files changed (71) hide show
  1. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/PKG-INFO +1 -1
  2. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/pyproject.toml +1 -1
  3. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/product_variants.json +10 -2
  4. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/shopify_graphql/bulk/query.py +38 -1
  5. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/README.md +0 -0
  6. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/__init__.py +0 -0
  7. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/auth.py +0 -0
  8. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/config_migrations.py +0 -0
  9. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/http_request.py +0 -0
  10. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/run.py +0 -0
  11. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/abandoned_checkouts.json +0 -0
  12. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/articles.json +0 -0
  13. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/balance_transactions.json +0 -0
  14. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/blogs.json +0 -0
  15. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/collection_products.json +0 -0
  16. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/collections.json +0 -0
  17. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/collects.json +0 -0
  18. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/countries.json +0 -0
  19. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/custom_collections.json +0 -0
  20. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/customer_address.json +0 -0
  21. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/customer_journey_summary.json +0 -0
  22. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/customers.json +0 -0
  23. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/deleted_products.json +0 -0
  24. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/discount_codes.json +0 -0
  25. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/disputes.json +0 -0
  26. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/draft_orders.json +0 -0
  27. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/fulfillment_orders.json +0 -0
  28. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/fulfillments.json +0 -0
  29. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/inventory_items.json +0 -0
  30. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/inventory_levels.json +0 -0
  31. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/locations.json +0 -0
  32. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/metafield_articles.json +0 -0
  33. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/metafield_blogs.json +0 -0
  34. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/metafield_collections.json +0 -0
  35. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/metafield_customers.json +0 -0
  36. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/metafield_draft_orders.json +0 -0
  37. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/metafield_locations.json +0 -0
  38. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/metafield_orders.json +0 -0
  39. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/metafield_pages.json +0 -0
  40. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/metafield_product_images.json +0 -0
  41. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/metafield_product_variants.json +0 -0
  42. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/metafield_products.json +0 -0
  43. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/metafield_shops.json +0 -0
  44. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/metafield_smart_collections.json +0 -0
  45. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/order_agreements.json +0 -0
  46. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/order_refunds.json +0 -0
  47. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/order_risks.json +0 -0
  48. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/orders.json +0 -0
  49. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/pages.json +0 -0
  50. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/price_rules.json +0 -0
  51. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/product_images.json +0 -0
  52. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/products.json +0 -0
  53. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/profile_location_groups.json +0 -0
  54. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/shop.json +0 -0
  55. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/smart_collections.json +0 -0
  56. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/tender_transactions.json +0 -0
  57. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/schemas/transactions.json +0 -0
  58. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/scopes.py +0 -0
  59. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/shopify_graphql/bulk/__init__.py +0 -0
  60. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/shopify_graphql/bulk/exceptions.py +0 -0
  61. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/shopify_graphql/bulk/job.py +0 -0
  62. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/shopify_graphql/bulk/record.py +0 -0
  63. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/shopify_graphql/bulk/retry.py +0 -0
  64. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/shopify_graphql/bulk/status.py +0 -0
  65. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/shopify_graphql/bulk/tools.py +0 -0
  66. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/source.py +0 -0
  67. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/spec.json +0 -0
  68. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/streams/base_streams.py +0 -0
  69. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/streams/streams.py +0 -0
  70. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/transform.py +0 -0
  71. {airbyte_source_shopify-3.2.0 → airbyte_source_shopify-3.2.0.dev202602040050}/source_shopify/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-source-shopify
3
- Version: 3.2.0
3
+ Version: 3.2.0.dev202602040050
4
4
  Summary: Source CDK implementation for Shopify.
5
5
  Home-page: https://airbyte.com
6
6
  License: ELv2
@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
3
3
  build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
- version = "3.2.0"
6
+ version = "3.2.0.dev.202602040050"
7
7
  name = "airbyte-source-shopify"
8
8
  description = "Source CDK implementation for Shopify."
9
9
  authors = [ "Airbyte <contact@airbyte.io>",]
@@ -52,12 +52,20 @@
52
52
  "items": {
53
53
  "type": ["null", "object"],
54
54
  "properties": {
55
+ "id": {
56
+ "description": "The unique identifier for the product option.",
57
+ "type": ["null", "integer"]
58
+ },
55
59
  "name": {
56
- "description": "The product options name.",
60
+ "description": "The product option's name.",
57
61
  "type": ["null", "string"]
58
62
  },
63
+ "position": {
64
+ "description": "The display order of the product option.",
65
+ "type": ["null", "integer"]
66
+ },
59
67
  "value": {
60
- "description": "The product options value.",
68
+ "description": "The product option's value.",
61
69
  "type": ["null", "string"]
62
70
  },
63
71
  "option_value": {
@@ -2791,7 +2791,13 @@ class ProductVariant(ShopifyBulkQuery):
2791
2791
  Field(name="selectedOptions", alias="options", fields=option_fields),
2792
2792
  Field(name="image", fields=image_fields),
2793
2793
  Field(name="inventoryQuantity", alias="old_inventory_quantity"),
2794
- Field(name="product", fields=[Field(name="id", alias="product_id")]),
2794
+ Field(
2795
+ name="product",
2796
+ fields=[
2797
+ Field(name="id", alias="product_id"),
2798
+ Field(name="options", alias="product_options", fields=["id", "name", "position"]),
2799
+ ],
2800
+ ),
2795
2801
  Field(name="inventoryItem", fields=inventory_item_fields),
2796
2802
  ] + presentment_prices
2797
2803
 
@@ -2838,6 +2844,34 @@ class ProductVariant(ShopifyBulkQuery):
2838
2844
  entity = record.get(from_property, {})
2839
2845
  return self.tools.resolve_str_id(entity.get(id_field)) if entity else None
2840
2846
 
2847
+ def _enrich_options_with_product_options(self, record: MutableMapping[str, Any]) -> None:
2848
+ """
2849
+ Enriches the variant's options with id and position from the product's options.
2850
+ Matches options by name and adds the corresponding ProductOption id and position.
2851
+ """
2852
+ options = record.get("options") or []
2853
+ product = record.get("product") or {}
2854
+ product_options = product.get("product_options") or []
2855
+
2856
+ # Build a lookup map from option name to ProductOption data
2857
+ product_options_map = {}
2858
+ for product_option in product_options:
2859
+ if product_option:
2860
+ name = product_option.get("name")
2861
+ if name:
2862
+ product_options_map[name] = {
2863
+ "id": self.tools.resolve_str_id(product_option.get("id")),
2864
+ "position": product_option.get("position"),
2865
+ }
2866
+
2867
+ # Enrich each option with id and position from the matching ProductOption
2868
+ for option in options:
2869
+ if option:
2870
+ option_name = option.get("name")
2871
+ if option_name and option_name in product_options_map:
2872
+ option["id"] = product_options_map[option_name]["id"]
2873
+ option["position"] = product_options_map[option_name]["position"]
2874
+
2841
2875
  def record_process_components(self, record: MutableMapping[str, Any]) -> Iterable[MutableMapping[str, Any]]:
2842
2876
  """
2843
2877
  Defines how to process collected components.
@@ -2850,6 +2884,9 @@ class ProductVariant(ShopifyBulkQuery):
2850
2884
  record["presentment_prices"] = self._process_presentment_prices(record_components.get("ProductVariantPricePair", []))
2851
2885
  record.pop("record_components")
2852
2886
 
2887
+ # enrich options with id and position from product options (must be done before product is removed)
2888
+ self._enrich_options_with_product_options(record)
2889
+
2853
2890
  # unnest mandatory fields from their placeholders
2854
2891
  record["product_id"] = self._unnest_and_resolve_id(record, "product", "product_id")
2855
2892
  record["inventory_item_id"] = self._unnest_and_resolve_id(record, "inventoryItem", "inventory_item_id")