airbyte-source-shopify 2.5.15__tar.gz → 2.5.17__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 (72) hide show
  1. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/PKG-INFO +1 -1
  2. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/pyproject.toml +1 -1
  3. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/customer_journey_summary.json +76 -0
  4. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/shopify_graphql/bulk/query.py +58 -4
  5. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/README.md +0 -0
  6. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/__init__.py +0 -0
  7. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/auth.py +0 -0
  8. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/config_migrations.py +0 -0
  9. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/http_request.py +0 -0
  10. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/run.py +0 -0
  11. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/abandoned_checkouts.json +0 -0
  12. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/articles.json +0 -0
  13. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/balance_transactions.json +0 -0
  14. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/blogs.json +0 -0
  15. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/collections.json +0 -0
  16. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/collects.json +0 -0
  17. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/countries.json +0 -0
  18. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/custom_collections.json +0 -0
  19. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/customer_address.json +0 -0
  20. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/customer_saved_search.json +0 -0
  21. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/customers.json +0 -0
  22. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/discount_codes.json +0 -0
  23. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/disputes.json +0 -0
  24. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/draft_orders.json +0 -0
  25. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/fulfillment_orders.json +0 -0
  26. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/fulfillments.json +0 -0
  27. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/inventory_items.json +0 -0
  28. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/inventory_levels.json +0 -0
  29. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/locations.json +0 -0
  30. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/metafield_articles.json +0 -0
  31. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/metafield_blogs.json +0 -0
  32. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/metafield_collections.json +0 -0
  33. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/metafield_customers.json +0 -0
  34. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/metafield_draft_orders.json +0 -0
  35. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/metafield_locations.json +0 -0
  36. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/metafield_orders.json +0 -0
  37. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/metafield_pages.json +0 -0
  38. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/metafield_product_images.json +0 -0
  39. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/metafield_product_variants.json +0 -0
  40. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/metafield_products.json +0 -0
  41. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/metafield_shops.json +0 -0
  42. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/metafield_smart_collections.json +0 -0
  43. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/order_agreements.json +0 -0
  44. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/order_refunds.json +0 -0
  45. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/order_risks.json +0 -0
  46. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/orders.json +0 -0
  47. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/pages.json +0 -0
  48. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/price_rules.json +0 -0
  49. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/product_images.json +0 -0
  50. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/product_variants.json +0 -0
  51. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/products.json +0 -0
  52. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/products_graph_ql.json +0 -0
  53. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/shop.json +0 -0
  54. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/smart_collections.json +0 -0
  55. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/tender_transactions.json +0 -0
  56. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/schemas/transactions.json +0 -0
  57. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/scopes.py +0 -0
  58. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/shopify_graphql/bulk/__init__.py +0 -0
  59. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/shopify_graphql/bulk/exceptions.py +0 -0
  60. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/shopify_graphql/bulk/job.py +0 -0
  61. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/shopify_graphql/bulk/record.py +0 -0
  62. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/shopify_graphql/bulk/retry.py +0 -0
  63. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/shopify_graphql/bulk/status.py +0 -0
  64. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/shopify_graphql/bulk/tools.py +0 -0
  65. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/shopify_graphql/graphql.py +0 -0
  66. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/shopify_graphql/schema.py +0 -0
  67. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/source.py +0 -0
  68. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/spec.json +0 -0
  69. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/streams/base_streams.py +0 -0
  70. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/streams/streams.py +0 -0
  71. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/transform.py +0 -0
  72. {airbyte_source_shopify-2.5.15 → airbyte_source_shopify-2.5.17}/source_shopify/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-source-shopify
3
- Version: 2.5.15
3
+ Version: 2.5.17
4
4
  Summary: Source CDK implementation for Shopify.
5
5
  Home-page: https://airbyte.com
6
6
  License: ELv2
@@ -5,7 +5,7 @@ requires = [
5
5
  build-backend = "poetry.core.masonry.api"
6
6
 
7
7
  [tool.poetry]
8
- version = "2.5.15"
8
+ version = "2.5.17"
9
9
  name = "airbyte-source-shopify"
10
10
  description = "Source CDK implementation for Shopify."
11
11
  authors = [
@@ -191,6 +191,82 @@
191
191
  "type": ["null", "string"]
192
192
  }
193
193
  }
194
+ },
195
+ "moments": {
196
+ "description": "The events preceding a customer's order, such as shop sessions.",
197
+ "type": ["null", "array"],
198
+ "items": {
199
+ "type": ["null", "object"],
200
+ "properties": {
201
+ "id": {
202
+ "description": "A globally-unique ID.",
203
+ "type": ["null", "integer"]
204
+ },
205
+ "landing_page": {
206
+ "description": "URL of the first page the customer landed on for the session.",
207
+ "type": ["null", "string"]
208
+ },
209
+ "landing_page_html": {
210
+ "description": "Landing page information with URL linked in HTML. For example, the first page the customer visited was",
211
+ "type": ["null", "string"]
212
+ },
213
+ "occurred_at": {
214
+ "description": "The date and time when the customer's session occurred.",
215
+ "type": ["null", "string"],
216
+ "format": "date-time"
217
+ },
218
+ "referral_code": {
219
+ "description": "Marketing referral code from the link that the customer clicked to visit the store.",
220
+ "type": ["null", "string"]
221
+ },
222
+ "referrer_url": {
223
+ "description": "Webpage where the customer clicked a link that sent them to the online store.",
224
+ "type": ["null", "string"]
225
+ },
226
+ "source": {
227
+ "description": "Source from which the customer visited the store, such as a platform (Facebook, Google), email, direct, a website domain, QR code, or unknown.",
228
+ "type": ["null", "string"]
229
+ },
230
+ "source_type": {
231
+ "description": "Type of marketing tactic.",
232
+ "type": ["null", "string"]
233
+ },
234
+ "source_description": {
235
+ "description": "Describes the source explicitly for first or last session.",
236
+ "type": ["null", "string"]
237
+ },
238
+ "utm_parameters": {
239
+ "description": "A set of UTM parameters gathered from the URL parameters of the referrer.",
240
+ "type": ["null", "object"],
241
+ "properties": {
242
+ "campaign": {
243
+ "description": "The name of a marketing campaign.",
244
+ "type": ["null", "string"]
245
+ },
246
+ "content": {
247
+ "description": "Identifies specific content in a marketing campaign. Used to differentiate between similar content or links in a marketing campaign to determine which is the most effective.",
248
+ "type": ["null", "string"]
249
+ },
250
+ "medium": {
251
+ "description": "The medium of a marketing campaign, such as a banner or email newsletter.",
252
+ "type": ["null", "string"]
253
+ },
254
+ "source": {
255
+ "description": "The source of traffic to the merchant's store, such as Google or an email newsletter.",
256
+ "type": ["null", "string"]
257
+ },
258
+ "term": {
259
+ "description": "Paid search terms used by a marketing campaign.",
260
+ "type": ["null", "string"]
261
+ }
262
+ }
263
+ },
264
+ "admin_graphql_api_id": {
265
+ "description": "Unique identifier for the customer in the Admin GraphQL API.",
266
+ "type": ["null", "string"]
267
+ }
268
+ }
269
+ }
194
270
  }
195
271
  }
196
272
  },
@@ -1105,6 +1105,29 @@ class CustomerJourney(ShopifyBulkQuery):
1105
1105
  term
1106
1106
  }
1107
1107
  }
1108
+ customerJourney {
1109
+ moments {
1110
+ ... on CustomerVisit {
1111
+ id
1112
+ landingPage
1113
+ landingPageHtml
1114
+ occurredAt
1115
+ referralCode
1116
+ referralInfoHtml
1117
+ referrerUrl
1118
+ source
1119
+ sourceDescription
1120
+ sourceType
1121
+ utmParameters {
1122
+ campaign
1123
+ content
1124
+ medium
1125
+ source
1126
+ term
1127
+ }
1128
+ }
1129
+ }
1130
+ }
1108
1131
  }
1109
1132
  }
1110
1133
  }
@@ -1127,6 +1150,16 @@ class CustomerJourney(ShopifyBulkQuery):
1127
1150
  "sourceDescription",
1128
1151
  Field(name="utmParameters", fields=["campaign", "content", "medium", "source", "term"]),
1129
1152
  ]
1153
+
1154
+ customer_visit_fragment: List[InlineFragment] = [
1155
+ InlineFragment(type="CustomerVisit", fields=visit_fields),
1156
+ ]
1157
+
1158
+ # # use this in the next version
1159
+ # moments_fields: List[Field] = [
1160
+ # Field(name="edges", fields=[Field(name="node", fields=customer_visit_fragment)]),
1161
+ # ]
1162
+
1130
1163
  customer_journey_summary_fields: List[Field] = [
1131
1164
  "ready",
1132
1165
  Field(name="momentsCount", fields=["count", "precision"]),
@@ -1134,6 +1167,8 @@ class CustomerJourney(ShopifyBulkQuery):
1134
1167
  "daysToConversion",
1135
1168
  Field(name="firstVisit", fields=visit_fields),
1136
1169
  Field(name="lastVisit", fields=visit_fields),
1170
+ # # use this in the next version
1171
+ # Field(name="moments", fields=moments_fields),
1137
1172
  ]
1138
1173
 
1139
1174
  query_nodes: List[Field] = [
@@ -1142,6 +1177,12 @@ class CustomerJourney(ShopifyBulkQuery):
1142
1177
  "createdAt",
1143
1178
  "updatedAt",
1144
1179
  Field(name="customerJourneySummary", fields=customer_journey_summary_fields),
1180
+ Field(
1181
+ name="customerJourney",
1182
+ fields=[
1183
+ Field(name="moments", fields=customer_visit_fragment),
1184
+ ],
1185
+ ),
1145
1186
  ]
1146
1187
 
1147
1188
  record_composition = {
@@ -1152,6 +1193,9 @@ class CustomerJourney(ShopifyBulkQuery):
1152
1193
  self,
1153
1194
  visit_data: Mapping[str, Any],
1154
1195
  ) -> MutableMapping[str, Any]:
1196
+ if not visit_data:
1197
+ return {}
1198
+
1155
1199
  # save the id before it's resolved
1156
1200
  visit_data["admin_graphql_api_id"] = visit_data.get("id")
1157
1201
  # resolve the order_id to str
@@ -1162,14 +1206,24 @@ class CustomerJourney(ShopifyBulkQuery):
1162
1206
  visit_data = self.tools.fields_names_to_snake_case(visit_data)
1163
1207
  return visit_data
1164
1208
 
1209
+ def process_moments(self, entity: List[Mapping[str, Any]]) -> List[MutableMapping[str, Any]]:
1210
+ moments = []
1211
+ for item in entity:
1212
+ moments.append(self.process_visit(item))
1213
+ return moments
1214
+
1165
1215
  def process_customer_journey(self, record: MutableMapping[str, Any]) -> MutableMapping[str, Any]:
1166
1216
  customer_journey_summary = record.get("customerJourneySummary", {})
1167
1217
  if customer_journey_summary:
1168
1218
  # process first, last visit data
1169
- first_visit = customer_journey_summary.get("firstVisit", {})
1170
- last_visit = customer_journey_summary.get("lastVisit", {})
1171
- customer_journey_summary["firstVisit"] = self.process_visit(first_visit) if first_visit else {}
1172
- customer_journey_summary["lastVisit"] = self.process_visit(last_visit) if last_visit else {}
1219
+ customer_journey_summary["firstVisit"] = self.process_visit(customer_journey_summary.get("firstVisit"))
1220
+ customer_journey_summary["lastVisit"] = self.process_visit(customer_journey_summary.get("lastVisit"))
1221
+
1222
+ # # this will be a part of summary in the next api version
1223
+ if customer_journey := record.get("customerJourney", {}):
1224
+ moments = customer_journey.get("moments", [])
1225
+ customer_journey_summary["moments"] = self.process_moments(moments)
1226
+
1173
1227
  # cast field names to snake_case
1174
1228
  customer_journey_summary = self.tools.fields_names_to_snake_case(customer_journey_summary)
1175
1229
  return customer_journey_summary