Skip to content

Commit fa43741

Browse files
authored
🎉 Source Shopify: migrate Order Risks to GraphQL BULK (#38352)
1 parent 95e701b commit fa43741

File tree

17 files changed

+538
-57
lines changed

17 files changed

+538
-57
lines changed

airbyte-integrations/connectors/source-shopify/integration_tests/abnormal_state.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,7 @@
128128
"type": "STREAM",
129129
"stream": {
130130
"stream_state": {
131-
"orders": {
132-
"updated_at": "2027-07-11T13:07:45-07:00",
133-
"deleted": {
134-
"deleted_at": "2027-07-11T13:07:45-07:00"
135-
}
136-
},
137-
"id": 99999999999999
131+
"updated_at": "2027-07-11T13:07:45-07:00"
138132
},
139133
"stream_descriptor": {
140134
"name": "order_risks"

airbyte-integrations/connectors/source-shopify/integration_tests/configured_catalog.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@
318318
"json_schema": {},
319319
"supported_sync_modes": ["incremental", "full_refresh"],
320320
"source_defined_cursor": true,
321-
"default_cursor_field": ["id"]
321+
"default_cursor_field": ["updated_at"]
322322
},
323323
"sync_mode": "incremental",
324-
"cursor_field": ["id"],
324+
"cursor_field": ["updated_at"],
325325
"destination_sync_mode": "append"
326326
},
327327
{

airbyte-integrations/connectors/source-shopify/integration_tests/expected_records.jsonl

+1-1
Large diffs are not rendered by default.

airbyte-integrations/connectors/source-shopify/integration_tests/expected_records_transactions_with_user_id.jsonl

+1-1
Large diffs are not rendered by default.

airbyte-integrations/connectors/source-shopify/integration_tests/state.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,7 @@
4545
"created_at": "2022-10-10T06:21:53-07:00"
4646
},
4747
"order_risks": {
48-
"orders": {
49-
"updated_at": "2023-04-24T07:03:06-07:00",
50-
"deleted": {
51-
"deleted_at": ""
52-
}
53-
},
54-
"id": 6446736474301
48+
"updated_at": "2023-04-24T18:00:10+00:00"
5549
},
5650
"transactions": {
5751
"orders": {

airbyte-integrations/connectors/source-shopify/metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ data:
1111
connectorSubtype: api
1212
connectorType: source
1313
definitionId: 9da77001-af33-4bcd-be46-6252bf9342b9
14-
dockerImageTag: 2.1.1
14+
dockerImageTag: 2.1.2
1515
dockerRepository: airbyte/source-shopify
1616
documentationUrl: https://docs.airbyte.com/integrations/sources/shopify
1717
githubIssueLabel: source-shopify

airbyte-integrations/connectors/source-shopify/poetry.lock

+21-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

airbyte-integrations/connectors/source-shopify/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
33
build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
6-
version = "2.1.1"
6+
version = "2.1.2"
77
name = "source-shopify"
88
description = "Source CDK implementation for Shopify."
99
authors = [ "Airbyte <[email protected]>",]

airbyte-integrations/connectors/source-shopify/source_shopify/schemas/order_risks.json

+212
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,218 @@
4242
"description": "Message shown to the merchant regarding the risk.",
4343
"type": ["null", "string"]
4444
},
45+
"admin_graphql_api_id": {
46+
"description": "The original id reference for the shopify api",
47+
"type": ["null", "string"]
48+
},
49+
"updated_at": {
50+
"description": "The date and time when the order and the risk was last updated",
51+
"type": ["null", "string"],
52+
"format": "date-time"
53+
},
54+
"assessments": {
55+
"description": "The risk assessments for an order.",
56+
"type": ["null", "array"],
57+
"items": {
58+
"type": ["null", "object"],
59+
"additionalProperties": true,
60+
"properties": {
61+
"risk_level": {
62+
"description": "The likelihood that the order is fraudulent, based on this risk assessment",
63+
"type": ["null", "string"]
64+
},
65+
"facts": {
66+
"description": "Optional facts used to describe the risk assessment",
67+
"type": ["null", "array"],
68+
"items": {
69+
"type": ["null", "object"],
70+
"additionalProperties": true,
71+
"properties": {
72+
"description": {
73+
"description": "A description of the risk fact",
74+
"type": ["null", "string"]
75+
},
76+
"sentiment": {
77+
"description": "Indicates whether the fact is a negative, neutral or positive contributor with regards to risk",
78+
"type": ["null", "string"]
79+
}
80+
}
81+
}
82+
},
83+
"provider": {
84+
"description": "The app that provided the assessment, null if the assessment was provided by Shopify",
85+
"type": ["null", "object"],
86+
"additionalProperties": true,
87+
"properties": {
88+
"features": {
89+
"description": "A list of app features that are shown in the Shopify App Store listing.",
90+
"type": ["null", "array"],
91+
"items": {
92+
"type": ["null", "string"]
93+
}
94+
},
95+
"description": {
96+
"description": "Description of the app",
97+
"type": ["null", "string"]
98+
},
99+
"handle": {
100+
"description": "Handle of the app",
101+
"type": ["null", "string"]
102+
},
103+
"embedded": {
104+
"description": "Whether the app uses the Embedded App SDK",
105+
"type": ["null", "boolean"]
106+
},
107+
"title": {
108+
"description": "Name of the app",
109+
"type": ["null", "string"]
110+
},
111+
"published": {
112+
"description": "Whether the app is published to the Shopify App Store",
113+
"type": ["null", "boolean"]
114+
},
115+
"developer_name": {
116+
"description": "The name of the app developer",
117+
"type": ["null", "string"]
118+
},
119+
"developer_type": {
120+
"description": "The type of app developer",
121+
"type": ["null", "string"]
122+
},
123+
"app_store_app_url": {
124+
"description": "App store page URL of the app",
125+
"type": ["null", "string"]
126+
},
127+
"install_url": {
128+
"description": "Webpage where you can install the app",
129+
"type": ["null", "string"]
130+
},
131+
"app_store_developer_url": {
132+
"description": "App store page URL of the developer who created the app",
133+
"type": ["null", "string"]
134+
},
135+
"is_post_purchase_app_in_use": {
136+
"description": "Whether the app is the post purchase app in use",
137+
"type": ["null", "boolean"]
138+
},
139+
"previously_installed": {
140+
"description": "Whether the app was previously installed on the current shop",
141+
"type": ["null", "boolean"]
142+
},
143+
"pricing_details_summary": {
144+
"description": "Summary of the app pricing details",
145+
"type": ["null", "string"]
146+
},
147+
"pricing_details": {
148+
"description": "Detailed information about the app pricing",
149+
"type": ["null", "string"]
150+
},
151+
"privacy_policy_url": {
152+
"description": "Link to app privacy policy",
153+
"type": ["null", "string"]
154+
},
155+
"public_category": {
156+
"description": "The public category for the app",
157+
"type": ["null", "string"]
158+
},
159+
"uninstall_message": {
160+
"description": "Message that appears when the app is uninstalled",
161+
"type": ["null", "string"]
162+
},
163+
"webhook_api_version": {
164+
"description": "The webhook API version for the app",
165+
"type": ["null", "string"]
166+
},
167+
"shopify_developed": {
168+
"description": "Whether the app was developed by Shopify",
169+
"type": ["null", "boolean"]
170+
},
171+
"provider_id": {
172+
"description": "A globally-unique provider ID, represented as integer",
173+
"type": ["null", "integer"]
174+
},
175+
"failed_requirements": {
176+
"description": "Requirements that must be met before the app can be installed",
177+
"type": ["null", "array"],
178+
"items": {
179+
"type": ["null", "object"],
180+
"additionalProperties": true,
181+
"properties": {
182+
"action": {
183+
"description": "Action to be taken to resolve a failed requirement, including URL link",
184+
"type": ["null", "object"],
185+
"additionalProperties": true,
186+
"properties": {
187+
"action_id": {
188+
"description": "The unique identifier of the navigation item",
189+
"type": ["null", "string"]
190+
},
191+
"title": {
192+
"description": "The name of the navigation item",
193+
"type": ["null", "string"]
194+
},
195+
"url": {
196+
"description": "The URL of the page that the navigation item links to",
197+
"type": ["null", "string"]
198+
}
199+
}
200+
},
201+
"message": {
202+
"description": "A concise set of copy strings to be displayed to merchants, to guide them in resolving problems your app encounters when trying to make use of their Shop and its resources",
203+
"type": ["null", "string"]
204+
}
205+
}
206+
}
207+
},
208+
"feedback": {
209+
"description": "Feedback from this app about the store",
210+
"type": ["null", "object"],
211+
"additionalProperties": true,
212+
"properties": {
213+
"link": {
214+
"description": "A link to where merchants can resolve errors",
215+
"type": ["null", "object"],
216+
"additionalProperties": true,
217+
"properties": {
218+
"label": {
219+
"description": "A context-sensitive label for the link",
220+
"type": ["null", "string"]
221+
},
222+
"url": {
223+
"description": "The URL that the link visits",
224+
"type": ["null", "string"]
225+
}
226+
}
227+
},
228+
"messages": {
229+
"description": "The feedback message presented to the merchant",
230+
"type": ["null", "array"],
231+
"items": {
232+
"type": ["null", "object"],
233+
"additionalProperties": true,
234+
"properties": {
235+
"field": {
236+
"description": "The path to the input field that caused the error",
237+
"type": ["null", "string"]
238+
},
239+
"message": {
240+
"description": "The error message",
241+
"type": ["null", "string"]
242+
}
243+
}
244+
}
245+
}
246+
}
247+
},
248+
"admin_graphql_api_id": {
249+
"description": "A globally-unique provider ID",
250+
"type": ["null", "string"]
251+
}
252+
}
253+
}
254+
}
255+
}
256+
},
45257
"shop_url": {
46258
"description": "URL of the shop where the order was placed.",
47259
"type": ["null", "string"]

0 commit comments

Comments
 (0)