airbyte-source-shopify 4.2.4__tar.gz → 4.2.6__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 (74) hide show
  1. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/PKG-INFO +5 -3
  2. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/pyproject.toml +3 -3
  3. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/shopify_graphql/bulk/query.py +3 -0
  4. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/streams/base_streams.py +4 -1
  5. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/streams/streams.py +11 -0
  6. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/.airbyte-pypi-readme.md +0 -0
  7. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/__init__.py +0 -0
  8. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/auth.py +0 -0
  9. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/config_migrations.py +0 -0
  10. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/http_request.py +0 -0
  11. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/run.py +0 -0
  12. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/abandoned_checkouts.json +0 -0
  13. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/articles.json +0 -0
  14. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/balance_transactions.json +0 -0
  15. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/blogs.json +0 -0
  16. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/collection_products.json +0 -0
  17. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/collections.json +0 -0
  18. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/collects.json +0 -0
  19. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/countries.json +0 -0
  20. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/custom_collections.json +0 -0
  21. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/customer_address.json +0 -0
  22. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/customer_journey_summary.json +0 -0
  23. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/customers.json +0 -0
  24. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/deleted_products.json +0 -0
  25. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/discount_codes.json +0 -0
  26. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/discount_codes_sync.json +0 -0
  27. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/disputes.json +0 -0
  28. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/draft_orders.json +0 -0
  29. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/fulfillment_orders.json +0 -0
  30. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/fulfillments.json +0 -0
  31. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/inventory_items.json +0 -0
  32. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/inventory_levels.json +0 -0
  33. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/locations.json +0 -0
  34. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/market_countries.json +0 -0
  35. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/metafield_articles.json +0 -0
  36. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/metafield_blogs.json +0 -0
  37. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/metafield_collections.json +0 -0
  38. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/metafield_customers.json +0 -0
  39. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/metafield_draft_orders.json +0 -0
  40. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/metafield_locations.json +0 -0
  41. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/metafield_orders.json +0 -0
  42. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/metafield_pages.json +0 -0
  43. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/metafield_product_images.json +0 -0
  44. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/metafield_product_variants.json +0 -0
  45. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/metafield_products.json +0 -0
  46. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/metafield_shops.json +0 -0
  47. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/metafield_smart_collections.json +0 -0
  48. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/order_agreements.json +0 -0
  49. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/order_refunds.json +0 -0
  50. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/order_risks.json +0 -0
  51. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/orders.json +0 -0
  52. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/pages.json +0 -0
  53. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/price_rules.json +0 -0
  54. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/product_images.json +0 -0
  55. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/product_variants.json +0 -0
  56. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/products.json +0 -0
  57. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/profile_location_groups.json +0 -0
  58. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/shop.json +0 -0
  59. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/smart_collections.json +0 -0
  60. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/tender_transactions.json +0 -0
  61. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/schemas/transactions.json +0 -0
  62. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/scopes.py +0 -0
  63. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/shopify_graphql/bulk/__init__.py +0 -0
  64. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/shopify_graphql/bulk/exceptions.py +0 -0
  65. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/shopify_graphql/bulk/external_sort.py +0 -0
  66. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/shopify_graphql/bulk/job.py +0 -0
  67. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/shopify_graphql/bulk/record.py +0 -0
  68. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/shopify_graphql/bulk/retry.py +0 -0
  69. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/shopify_graphql/bulk/status.py +0 -0
  70. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/shopify_graphql/bulk/tools.py +0 -0
  71. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/source.py +0 -0
  72. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/spec.json +0 -0
  73. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/transform.py +0 -0
  74. {airbyte_source_shopify-4.2.4 → airbyte_source_shopify-4.2.6}/source_shopify/utils.py +0 -0
@@ -1,19 +1,21 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-source-shopify
3
- Version: 4.2.4
3
+ Version: 4.2.6
4
4
  Summary: Source CDK implementation for Shopify.
5
5
  Home-page: https://airbyte.com
6
6
  License: ELv2
7
7
  Author: Airbyte
8
8
  Author-email: contact@airbyte.io
9
- Requires-Python: >=3.10,<3.12
9
+ Requires-Python: >=3.10,<3.14
10
10
  Classifier: License :: Other/Proprietary License
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
14
16
  Requires-Dist: airbyte-cdk (>=7,<8)
15
17
  Requires-Dist: graphql-query (>=1,<2)
16
- Requires-Dist: pendulum (>=2.1.2,<3.0.0)
18
+ Requires-Dist: pendulum (>=3.0.0,<4.0.0)
17
19
  Requires-Dist: sgqlc (==16.3)
18
20
  Project-URL: Documentation, https://docs.airbyte.com/integrations/sources/shopify
19
21
  Project-URL: Repository, https://github.com/airbytehq/airbyte
@@ -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 = "4.2.4"
6
+ version = "4.2.6"
7
7
  name = "airbyte-source-shopify"
8
8
  description = "Source CDK implementation for Shopify."
9
9
  authors = [ "Airbyte <contact@airbyte.io>",]
@@ -16,11 +16,11 @@ repository = "https://github.com/airbytehq/airbyte"
16
16
  include = "source_shopify"
17
17
 
18
18
  [tool.poetry.dependencies]
19
- python = "^3.10,<3.12"
19
+ python = "^3.10,<3.14"
20
20
  airbyte-cdk = "^7"
21
21
  sgqlc = "==16.3"
22
22
  graphql-query = "^1"
23
- pendulum = "^2.1.2"
23
+ pendulum = "^3.0.0"
24
24
 
25
25
  [tool.poetry.scripts]
26
26
  source-shopify = "source_shopify.run:run"
@@ -1943,6 +1943,7 @@ class Transaction(ShopifyBulkQuery):
1943
1943
  __typename
1944
1944
  id
1945
1945
  currency: currencyCode
1946
+ order_created_at: createdAt
1946
1947
  transactions {
1947
1948
  id
1948
1949
  errorCode
@@ -2085,6 +2086,7 @@ class Transaction(ShopifyBulkQuery):
2085
2086
  "__typename",
2086
2087
  "id",
2087
2088
  Field(name="currencyCode", alias="currency"),
2089
+ Field(name="createdAt", alias="order_created_at"),
2088
2090
  Field(name="transactions", fields=transaction_fields),
2089
2091
  ]
2090
2092
 
@@ -2172,6 +2174,7 @@ class Transaction(ShopifyBulkQuery):
2172
2174
  # populate parent record keys
2173
2175
  transaction["order_id"] = record.get("id")
2174
2176
  transaction["currency"] = record.get("currency")
2177
+ transaction["order_created_at"] = self.tools.from_iso8601_to_rfc3339(record, "order_created_at")
2175
2178
  yield self.process_transaction(transaction)
2176
2179
 
2177
2180
 
@@ -266,6 +266,9 @@ class IncrementalShopifyStream(ShopifyStream, ABC):
266
266
  def should_checkpoint(self, index: int) -> bool:
267
267
  return self.filter_by_state_checkpoint and index >= self.state_checkpoint_interval
268
268
 
269
+ def should_emit_record_older_than_state(self, record: Mapping[str, Any], state_value: Any) -> bool:
270
+ return False
271
+
269
272
  # Parse the `records` with respect to the `stream_state` for the `Incremental refresh`
270
273
  # cases where we slice the stream, the endpoints for those classes don't accept any other filtering,
271
274
  # but they provide us with the updated_at field in most cases, so we used that as incremental filtering during the order slicing.
@@ -283,7 +286,7 @@ class IncrementalShopifyStream(ShopifyStream, ABC):
283
286
  filter_record_value = record.get(self.filter_field) if self.filter_field else None
284
287
  self.track_checkpoint_cursor(record_value, filter_record_value)
285
288
  if record_value:
286
- if record_value >= state_value:
289
+ if record_value >= state_value or self.should_emit_record_older_than_state(record, state_value):
287
290
  yield record
288
291
  else:
289
292
  if self.should_checkpoint(index):
@@ -439,6 +439,17 @@ class TransactionsGraphql(IncrementalShopifyGraphQlBulkStream):
439
439
  # override default name. This stream is essentially the same as `Transactions` stream, but it's using GraphQL API, which does not include the user_id field
440
440
  return "transactions"
441
441
 
442
+ def should_emit_record_older_than_state(self, record: Mapping[str, Any], state_value: Any) -> bool:
443
+ # transactions of offsite payments can predate their order, so they are first exported with the newly created order
444
+ order_created_at = record.get("order_created_at")
445
+ return bool(order_created_at) and order_created_at >= state_value
446
+
447
+ def read_records(self, *args, **kwargs) -> Iterable[Mapping[str, Any]]:
448
+ for record in super().read_records(*args, **kwargs):
449
+ # `order_created_at` is only used for state comparison, it should not be part of the output
450
+ record.pop("order_created_at", None)
451
+ yield record
452
+
442
453
  def get_json_schema(self) -> Mapping[str, Any]:
443
454
  """
444
455
  This stream has the same schema as `Transactions` stream, except of: