@pipedream/shopify_developer_app 0.8.1 → 0.10.0
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.
- package/actions/add-product-to-custom-collection/add-product-to-custom-collection.mjs +1 -1
- package/actions/add-tags/add-tags.mjs +1 -1
- package/actions/create-article/create-article.mjs +1 -1
- package/actions/create-blog/create-blog.mjs +1 -1
- package/actions/create-custom-collection/create-custom-collection.mjs +1 -1
- package/actions/create-customer/create-customer.mjs +6 -1
- package/actions/create-fulfillment/create-fulfillment.mjs +82 -0
- package/actions/create-metafield/create-metafield.mjs +1 -1
- package/actions/create-metaobject/create-metaobject.mjs +1 -1
- package/actions/create-order/create-order.mjs +7 -2
- package/actions/create-page/create-page.mjs +1 -1
- package/actions/create-product/create-product.mjs +1 -1
- package/actions/create-product-variant/create-product-variant.mjs +1 -1
- package/actions/create-smart-collection/create-smart-collection.mjs +1 -1
- package/actions/delete-article/delete-article.mjs +1 -1
- package/actions/delete-blog/delete-blog.mjs +1 -1
- package/actions/delete-metafield/delete-metafield.mjs +1 -1
- package/actions/delete-page/delete-page.mjs +1 -1
- package/actions/get-articles/get-articles.mjs +1 -1
- package/actions/get-metafields/get-metafields.mjs +1 -1
- package/actions/get-metaobjects/get-metaobjects.mjs +1 -1
- package/actions/get-order/get-order.mjs +7 -2
- package/actions/get-pages/get-pages.mjs +1 -1
- package/actions/refund-order/refund-order.mjs +105 -0
- package/actions/search-custom-collection-by-name/search-custom-collection-by-name.mjs +1 -1
- package/actions/search-customers/search-customers.mjs +6 -1
- package/actions/search-fulfillment-orders/search-fulfillment-orders.mjs +45 -0
- package/actions/search-orders/search-orders.mjs +6 -1
- package/actions/search-product-variant/search-product-variant.mjs +1 -1
- package/actions/search-products/search-products.mjs +1 -1
- package/actions/update-article/update-article.mjs +1 -1
- package/actions/update-customer/update-customer.mjs +6 -1
- package/actions/update-fulfillment-tracking-info/update-fulfillment-tracking-info.mjs +73 -0
- package/actions/update-inventory-level/update-inventory-level.mjs +1 -1
- package/actions/update-metafield/update-metafield.mjs +1 -1
- package/actions/update-metaobject/update-metaobject.mjs +1 -1
- package/actions/update-page/update-page.mjs +1 -1
- package/actions/update-product/update-product.mjs +6 -1
- package/actions/update-product-variant/update-product-variant.mjs +1 -1
- package/common/mutations.mjs +88 -0
- package/common/queries.mjs +47 -0
- package/package.json +2 -2
- package/shopify_developer_app.app.mjs +72 -1
- package/sources/cart-updated/cart-updated.mjs +25 -0
- package/sources/draft-order-updated/draft-order-updated.mjs +26 -0
- package/sources/draft-order-updated/test-event.mjs +147 -0
- package/sources/inventory-level-updated/inventory-level-updated.mjs +25 -0
- package/sources/new-abandoned-cart/new-abandoned-cart.mjs +1 -1
- package/sources/new-article/new-article.mjs +1 -1
- package/sources/new-cancelled-order/new-cancelled-order.mjs +1 -1
- package/sources/new-cart-created/new-cart-created.mjs +25 -0
- package/sources/new-customer-created/new-customer-created.mjs +1 -1
- package/sources/new-draft-order/new-draft-order.mjs +1 -1
- package/sources/new-event-emitted/new-event-emitted.mjs +1 -1
- package/sources/new-fulfillment-event/new-fulfillment-event.mjs +1 -1
- package/sources/new-order-created/new-order-created.mjs +1 -1
- package/sources/new-order-fulfilled/new-order-fulfilled.mjs +1 -1
- package/sources/new-page/new-page.mjs +1 -1
- package/sources/new-paid-order/new-paid-order.mjs +1 -1
- package/sources/new-product-created/new-product-created.mjs +1 -1
- package/sources/new-product-updated/new-product-updated.mjs +1 -1
- package/sources/new-refund-created/new-refund-created.mjs +1 -1
- package/sources/new-updated-customer/new-updated-customer.mjs +1 -1
- package/sources/new-updated-order/new-updated-order.mjs +1 -1
- package/sources/product-added-to-custom-collection/product-added-to-custom-collection.mjs +1 -1
- package/sources/shop-update/shop-update.mjs +25 -0
|
@@ -6,7 +6,12 @@ export default {
|
|
|
6
6
|
key: "shopify_developer_app-update-product",
|
|
7
7
|
name: "Update Product",
|
|
8
8
|
description: "Update an existing product. [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productupdate)",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.11",
|
|
10
|
+
annotations: {
|
|
11
|
+
destructiveHint: true,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
readOnlyHint: false,
|
|
14
|
+
},
|
|
10
15
|
type: "action",
|
|
11
16
|
props: {
|
|
12
17
|
shopify,
|
package/common/mutations.mjs
CHANGED
|
@@ -116,9 +116,97 @@ const UPDATE_PRODUCT = `
|
|
|
116
116
|
}
|
|
117
117
|
`;
|
|
118
118
|
|
|
119
|
+
const REFUND_ORDER = `
|
|
120
|
+
mutation RefundLineItem($input: RefundInput!) {
|
|
121
|
+
refundCreate(input: $input) {
|
|
122
|
+
refund {
|
|
123
|
+
id
|
|
124
|
+
totalRefundedSet {
|
|
125
|
+
presentmentMoney {
|
|
126
|
+
amount
|
|
127
|
+
currencyCode
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
order {
|
|
131
|
+
id
|
|
132
|
+
totalPriceSet {
|
|
133
|
+
presentmentMoney {
|
|
134
|
+
amount
|
|
135
|
+
currencyCode
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
refundLineItems(first: 10) {
|
|
140
|
+
nodes {
|
|
141
|
+
id
|
|
142
|
+
lineItem {
|
|
143
|
+
id
|
|
144
|
+
title
|
|
145
|
+
quantity
|
|
146
|
+
product {
|
|
147
|
+
id
|
|
148
|
+
title
|
|
149
|
+
}
|
|
150
|
+
variant {
|
|
151
|
+
id
|
|
152
|
+
title
|
|
153
|
+
price
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
userErrors {
|
|
160
|
+
field
|
|
161
|
+
message
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
`;
|
|
166
|
+
|
|
167
|
+
const UPDATE_FULFILLMENT_TRACKING_INFO = `
|
|
168
|
+
mutation FulfillmentTrackingInfoUpdate($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {
|
|
169
|
+
fulfillmentTrackingInfoUpdate(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) {
|
|
170
|
+
fulfillment {
|
|
171
|
+
id
|
|
172
|
+
status
|
|
173
|
+
trackingInfo {
|
|
174
|
+
company
|
|
175
|
+
number
|
|
176
|
+
url
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
userErrors {
|
|
180
|
+
field
|
|
181
|
+
message
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
`;
|
|
186
|
+
|
|
187
|
+
const CREATE_FULFILLMENT = `
|
|
188
|
+
mutation fulfillmentCreate($fulfillment: FulfillmentInput!, $message: String) {
|
|
189
|
+
fulfillmentCreate(fulfillment: $fulfillment, message: $message) {
|
|
190
|
+
fulfillment {
|
|
191
|
+
id
|
|
192
|
+
name
|
|
193
|
+
status
|
|
194
|
+
createdAt
|
|
195
|
+
}
|
|
196
|
+
userErrors {
|
|
197
|
+
field
|
|
198
|
+
message
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
`;
|
|
203
|
+
|
|
119
204
|
export default {
|
|
120
205
|
CREATE_ORDER,
|
|
121
206
|
CREATE_CUSTOMER,
|
|
122
207
|
UPDATE_CUSTOMER,
|
|
123
208
|
UPDATE_PRODUCT,
|
|
209
|
+
REFUND_ORDER,
|
|
210
|
+
UPDATE_FULFILLMENT_TRACKING_INFO,
|
|
211
|
+
CREATE_FULFILLMENT,
|
|
124
212
|
};
|
package/common/queries.mjs
CHANGED
|
@@ -543,6 +543,18 @@ const GET_DRAFT_ORDER = `
|
|
|
543
543
|
}
|
|
544
544
|
`;
|
|
545
545
|
|
|
546
|
+
const GET_FULFILLMENT_ORDER = `
|
|
547
|
+
query LocationsForMoveList($fulfillmentOrderId: ID!, $first: Int) {
|
|
548
|
+
fulfillmentOrder(id: $fulfillmentOrderId) {
|
|
549
|
+
lineItems (first: $first) {
|
|
550
|
+
nodes {
|
|
551
|
+
id
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
`;
|
|
557
|
+
|
|
546
558
|
const LIST_ORDERS = `
|
|
547
559
|
query ($first: Int, $after: String, $reverse: Boolean, $query: String){
|
|
548
560
|
orders(first: $first, after: $after, reverse: $reverse, query: $query) {
|
|
@@ -759,11 +771,46 @@ const LIST_CUSTOMERS = `
|
|
|
759
771
|
}
|
|
760
772
|
`;
|
|
761
773
|
|
|
774
|
+
const LIST_FULFILLMENT_ORDERS = `
|
|
775
|
+
query ($first: Int, $after: String, $query: String) {
|
|
776
|
+
fulfillmentOrders(first: $first, after: $after, query: $query) {
|
|
777
|
+
nodes {
|
|
778
|
+
id
|
|
779
|
+
status
|
|
780
|
+
createdAt
|
|
781
|
+
updatedAt
|
|
782
|
+
fulfillAt
|
|
783
|
+
orderId
|
|
784
|
+
orderName
|
|
785
|
+
fulfillments (first: $first) {
|
|
786
|
+
nodes {
|
|
787
|
+
id
|
|
788
|
+
name
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
lineItems (first: $first) {
|
|
792
|
+
nodes {
|
|
793
|
+
id
|
|
794
|
+
productTitle
|
|
795
|
+
totalQuantity
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
pageInfo {
|
|
800
|
+
endCursor
|
|
801
|
+
hasNextPage
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
`;
|
|
806
|
+
|
|
762
807
|
export default {
|
|
763
808
|
GET_ORDER,
|
|
764
809
|
GET_CUSTOMER,
|
|
765
810
|
GET_DRAFT_ORDER,
|
|
811
|
+
GET_FULFILLMENT_ORDER,
|
|
766
812
|
LIST_ORDERS,
|
|
767
813
|
LIST_DRAFT_ORDERS,
|
|
768
814
|
LIST_CUSTOMERS,
|
|
815
|
+
LIST_FULFILLMENT_ORDERS,
|
|
769
816
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/shopify_developer_app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Pipedream Shopify (Developer App) Components",
|
|
5
5
|
"main": "shopify_developer_app.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@pipedream/platform": "^3.0
|
|
16
|
+
"@pipedream/platform": "^3.1.0",
|
|
17
17
|
"@pipedream/shopify": "^0.7.0",
|
|
18
18
|
"shopify-api-node": "^3.14.2"
|
|
19
19
|
}
|
|
@@ -2,7 +2,9 @@ import commonApp from "@pipedream/shopify";
|
|
|
2
2
|
import Shopify from "shopify-api-node";
|
|
3
3
|
import queries from "./common/queries.mjs";
|
|
4
4
|
import mutations from "./common/mutations.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
API_VERSION, MAX_LIMIT,
|
|
7
|
+
} from "@pipedream/shopify/common/constants.mjs";
|
|
6
8
|
|
|
7
9
|
export default {
|
|
8
10
|
...commonApp,
|
|
@@ -40,6 +42,60 @@ export default {
|
|
|
40
42
|
});
|
|
41
43
|
},
|
|
42
44
|
},
|
|
45
|
+
lineItemIds: {
|
|
46
|
+
type: "string[]",
|
|
47
|
+
label: "Line Item IDs",
|
|
48
|
+
description: "An array of line item IDs",
|
|
49
|
+
async options({ orderId }) {
|
|
50
|
+
const order = await this.getOrder({
|
|
51
|
+
id: orderId,
|
|
52
|
+
first: MAX_LIMIT,
|
|
53
|
+
});
|
|
54
|
+
return order.order.lineItems.edges.map(({ node }) => ({
|
|
55
|
+
label: node.title,
|
|
56
|
+
value: node.id,
|
|
57
|
+
}));
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
fulfillmentId: {
|
|
61
|
+
type: "string",
|
|
62
|
+
label: "Fulfillment ID",
|
|
63
|
+
description: "The identifier of a fulfillment",
|
|
64
|
+
async options({ orderId }) {
|
|
65
|
+
const order = await this.getOrder({
|
|
66
|
+
id: orderId,
|
|
67
|
+
first: MAX_LIMIT,
|
|
68
|
+
});
|
|
69
|
+
return order.order.fulfillments?.map(({ id }) => id) ?? [];
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
fulfillmentOrderId: {
|
|
73
|
+
type: "string",
|
|
74
|
+
label: "Fulfillment Order ID",
|
|
75
|
+
description: "The identifier of a fulfillment order",
|
|
76
|
+
async options({ prevContext }) {
|
|
77
|
+
return this.getPropOptions({
|
|
78
|
+
resourceFn: this.listFulfillmentOrders,
|
|
79
|
+
resourceKeys: [
|
|
80
|
+
"fulfillmentOrders",
|
|
81
|
+
],
|
|
82
|
+
labelKey: "id",
|
|
83
|
+
prevContext,
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
fulfillmentOrderLineItemIds: {
|
|
88
|
+
type: "string[]",
|
|
89
|
+
label: "Fulfillment Order Line Item IDs",
|
|
90
|
+
description: "An array of fulfillment order line item IDs",
|
|
91
|
+
async options({ fulfillmentOrderId }) {
|
|
92
|
+
const fulfillmentOrder = await this.getFulfillmentOrder({
|
|
93
|
+
fulfillmentOrderId,
|
|
94
|
+
first: MAX_LIMIT,
|
|
95
|
+
});
|
|
96
|
+
return fulfillmentOrder.fulfillmentOrder.lineItems.nodes.map(({ id }) => id);
|
|
97
|
+
},
|
|
98
|
+
},
|
|
43
99
|
firstName: {
|
|
44
100
|
type: "string",
|
|
45
101
|
label: "First Name",
|
|
@@ -122,6 +178,9 @@ export default {
|
|
|
122
178
|
getDraftOrder(variables) {
|
|
123
179
|
return this._makeGraphQlRequest(queries.GET_DRAFT_ORDER, variables);
|
|
124
180
|
},
|
|
181
|
+
getFulfillmentOrder(variables) {
|
|
182
|
+
return this._makeGraphQlRequest(queries.GET_FULFILLMENT_ORDER, variables);
|
|
183
|
+
},
|
|
125
184
|
getCustomer(variables) {
|
|
126
185
|
return this._makeGraphQlRequest(queries.GET_CUSTOMER, variables);
|
|
127
186
|
},
|
|
@@ -134,14 +193,26 @@ export default {
|
|
|
134
193
|
listCustomers(variables) {
|
|
135
194
|
return this._makeGraphQlRequest(queries.LIST_CUSTOMERS, variables);
|
|
136
195
|
},
|
|
196
|
+
listFulfillmentOrders(variables) {
|
|
197
|
+
return this._makeGraphQlRequest(queries.LIST_FULFILLMENT_ORDERS, variables);
|
|
198
|
+
},
|
|
137
199
|
createOrder(variables) {
|
|
138
200
|
return this._makeGraphQlRequest(mutations.CREATE_ORDER, variables);
|
|
139
201
|
},
|
|
140
202
|
createCustomer(variables) {
|
|
141
203
|
return this._makeGraphQlRequest(mutations.CREATE_CUSTOMER, variables);
|
|
142
204
|
},
|
|
205
|
+
createFulfillment(variables) {
|
|
206
|
+
return this._makeGraphQlRequest(mutations.CREATE_FULFILLMENT, variables);
|
|
207
|
+
},
|
|
143
208
|
updateCustomer(variables) {
|
|
144
209
|
return this._makeGraphQlRequest(mutations.UPDATE_CUSTOMER, variables);
|
|
145
210
|
},
|
|
211
|
+
refundOrder(variables) {
|
|
212
|
+
return this._makeGraphQlRequest(mutations.REFUND_ORDER, variables);
|
|
213
|
+
},
|
|
214
|
+
updateFulfillmentTrackingInfo(variables) {
|
|
215
|
+
return this._makeGraphQlRequest(mutations.UPDATE_FULFILLMENT_TRACKING_INFO, variables);
|
|
216
|
+
},
|
|
146
217
|
},
|
|
147
218
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import common from "../common/webhook.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "shopify_developer_app-cart-updated",
|
|
6
|
+
name: "Cart Updated (Instant)",
|
|
7
|
+
description: "Emit new event when a cart is updated.",
|
|
8
|
+
version: "0.0.2",
|
|
9
|
+
type: "source",
|
|
10
|
+
dedupe: "unique",
|
|
11
|
+
methods: {
|
|
12
|
+
...common.methods,
|
|
13
|
+
getTopic() {
|
|
14
|
+
return "CARTS_UPDATE";
|
|
15
|
+
},
|
|
16
|
+
generateMeta(resource) {
|
|
17
|
+
const ts = Date.parse(resource.updated_at);
|
|
18
|
+
return {
|
|
19
|
+
id: `${resource.id}-${ts}`,
|
|
20
|
+
summary: `Cart Updated ${resource.id}`,
|
|
21
|
+
ts,
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import common from "../common/webhook.mjs";
|
|
2
|
+
import sampleEmit from "./test-event.mjs";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
...common,
|
|
6
|
+
key: "shopify_developer_app-draft-order-updated",
|
|
7
|
+
name: "Draft Order Updated (Instant)",
|
|
8
|
+
type: "source",
|
|
9
|
+
description: "Emit new event for each draft order updated in a store.",
|
|
10
|
+
version: "0.0.1",
|
|
11
|
+
dedupe: "unique",
|
|
12
|
+
methods: {
|
|
13
|
+
...common.methods,
|
|
14
|
+
getTopic() {
|
|
15
|
+
return "DRAFT_ORDERS_UPDATE";
|
|
16
|
+
},
|
|
17
|
+
generateMeta(resource) {
|
|
18
|
+
return {
|
|
19
|
+
id: resource.id,
|
|
20
|
+
summary: `Draft order updated ${resource.id}`,
|
|
21
|
+
ts: Date.parse(resource.created_at),
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
sampleEmit,
|
|
26
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"id": 1234567890,
|
|
3
|
+
"note": null,
|
|
4
|
+
"email": "email@email.com",
|
|
5
|
+
"taxes_included": false,
|
|
6
|
+
"currency": "Currency",
|
|
7
|
+
"invoice_sent_at": null,
|
|
8
|
+
"created_at": "2024-08-21T01:22:42-04:00",
|
|
9
|
+
"updated_at": "2025-10-01T10:22:26-04:00",
|
|
10
|
+
"tax_exempt": false,
|
|
11
|
+
"completed_at": "2025-10-01T10:22:26-04:00",
|
|
12
|
+
"name": "#11",
|
|
13
|
+
"allow_discount_codes_in_checkout?": false,
|
|
14
|
+
"b2b?": false,
|
|
15
|
+
"status": "completed",
|
|
16
|
+
"line_items": [
|
|
17
|
+
{
|
|
18
|
+
"id": 1234567890,
|
|
19
|
+
"variant_id": 1234567890,
|
|
20
|
+
"product_id": 1234567890,
|
|
21
|
+
"title": "Product Title",
|
|
22
|
+
"variant_title": "Variant Title",
|
|
23
|
+
"sku": "1012",
|
|
24
|
+
"vendor": "Vendor Name",
|
|
25
|
+
"quantity": 1,
|
|
26
|
+
"requires_shipping": true,
|
|
27
|
+
"taxable": true,
|
|
28
|
+
"gift_card": false,
|
|
29
|
+
"fulfillment_service": "manual",
|
|
30
|
+
"grams": 5000,
|
|
31
|
+
"tax_lines": [
|
|
32
|
+
{
|
|
33
|
+
"rate": 0.1,
|
|
34
|
+
"title": "VAT",
|
|
35
|
+
"price": "101"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"applied_discount": null,
|
|
39
|
+
"name": "Product Title - Variant Title",
|
|
40
|
+
"properties": [],
|
|
41
|
+
"custom": false,
|
|
42
|
+
"price": "1011",
|
|
43
|
+
"admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/1234567890"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"api_client_id": 1354745,
|
|
47
|
+
"shipping_address": {
|
|
48
|
+
"first_name": "First Name",
|
|
49
|
+
"address1": "123 Address",
|
|
50
|
+
"phone": null,
|
|
51
|
+
"city": "City",
|
|
52
|
+
"zip": null,
|
|
53
|
+
"province": null,
|
|
54
|
+
"country": "Country",
|
|
55
|
+
"last_name": "Last Name",
|
|
56
|
+
"address2": null,
|
|
57
|
+
"company": null,
|
|
58
|
+
"latitude": 14.058324,
|
|
59
|
+
"longitude": 108.277199,
|
|
60
|
+
"name": "First Name Last Name",
|
|
61
|
+
"country_code": "Country",
|
|
62
|
+
"province_code": null
|
|
63
|
+
},
|
|
64
|
+
"billing_address": {
|
|
65
|
+
"first_name": "First Name",
|
|
66
|
+
"address1": "123 Address",
|
|
67
|
+
"phone": null,
|
|
68
|
+
"city": "City",
|
|
69
|
+
"zip": null,
|
|
70
|
+
"province": null,
|
|
71
|
+
"country": "Country",
|
|
72
|
+
"last_name": "Last Name",
|
|
73
|
+
"address2": null,
|
|
74
|
+
"company": null,
|
|
75
|
+
"latitude": 14.058324,
|
|
76
|
+
"longitude": 108.277199,
|
|
77
|
+
"name": "First Name Last Name",
|
|
78
|
+
"country_code": "Country",
|
|
79
|
+
"province_code": null
|
|
80
|
+
},
|
|
81
|
+
"invoice_url": "https://vendor-name.myshopify.com/1234567890/invoices/1234567890",
|
|
82
|
+
"created_on_api_version_handle": null,
|
|
83
|
+
"applied_discount": null,
|
|
84
|
+
"order_id": 1234567890,
|
|
85
|
+
"shipping_line": null,
|
|
86
|
+
"tax_lines": [
|
|
87
|
+
{
|
|
88
|
+
"rate": 0.1,
|
|
89
|
+
"title": "VAT",
|
|
90
|
+
"price": "101"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"tags": "",
|
|
94
|
+
"note_attributes": [],
|
|
95
|
+
"total_price": "1112",
|
|
96
|
+
"subtotal_price": "1011",
|
|
97
|
+
"total_tax": "101",
|
|
98
|
+
"payment_terms": null,
|
|
99
|
+
"admin_graphql_api_id": "gid://shopify/DraftOrder/1160212185373",
|
|
100
|
+
"customer": {
|
|
101
|
+
"id": 1234567890,
|
|
102
|
+
"created_at": "2023-11-12T22:15:55-05:00",
|
|
103
|
+
"updated_at": "2025-10-01T10:22:26-04:00",
|
|
104
|
+
"first_name": "First Name",
|
|
105
|
+
"last_name": "Last Name",
|
|
106
|
+
"orders_count": 8,
|
|
107
|
+
"state": "disabled",
|
|
108
|
+
"total_spent": "12345.00",
|
|
109
|
+
"last_order_id": 1234567890,
|
|
110
|
+
"note": null,
|
|
111
|
+
"verified_email": true,
|
|
112
|
+
"multipass_identifier": null,
|
|
113
|
+
"tax_exempt": false,
|
|
114
|
+
"tags": "",
|
|
115
|
+
"last_order_name": "#11",
|
|
116
|
+
"email": "email@email.com",
|
|
117
|
+
"phone": null,
|
|
118
|
+
"currency": "Currency",
|
|
119
|
+
"tax_exemptions": [],
|
|
120
|
+
"email_marketing_consent": {
|
|
121
|
+
"state": "not_subscribed",
|
|
122
|
+
"opt_in_level": "single_opt_in",
|
|
123
|
+
"consent_updated_at": null
|
|
124
|
+
},
|
|
125
|
+
"sms_marketing_consent": null,
|
|
126
|
+
"admin_graphql_api_id": "gid://shopify/Customer/1234567890",
|
|
127
|
+
"default_address": {
|
|
128
|
+
"id": 1234567890,
|
|
129
|
+
"customer_id": 1234567890,
|
|
130
|
+
"first_name": "First Name",
|
|
131
|
+
"last_name": "Last Name",
|
|
132
|
+
"company": null,
|
|
133
|
+
"address1": "123 Address",
|
|
134
|
+
"address2": null,
|
|
135
|
+
"city": "City",
|
|
136
|
+
"province": null,
|
|
137
|
+
"country": "Country",
|
|
138
|
+
"zip": null,
|
|
139
|
+
"phone": null,
|
|
140
|
+
"name": "First Name Last Name",
|
|
141
|
+
"province_code": null,
|
|
142
|
+
"country_code": "Country",
|
|
143
|
+
"country_name": "Country",
|
|
144
|
+
"default": true
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import common from "../common/webhook.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "shopify_developer_app-inventory-level-updated",
|
|
6
|
+
name: "Inventory Level Updated (Instant)",
|
|
7
|
+
description: "Emit new event when an inventory level is updated.",
|
|
8
|
+
version: "0.0.2",
|
|
9
|
+
type: "source",
|
|
10
|
+
dedupe: "unique",
|
|
11
|
+
methods: {
|
|
12
|
+
...common.methods,
|
|
13
|
+
getTopic() {
|
|
14
|
+
return "INVENTORY_LEVELS_UPDATE";
|
|
15
|
+
},
|
|
16
|
+
generateMeta(resource) {
|
|
17
|
+
const ts = Date.parse(resource.updated_at);
|
|
18
|
+
return {
|
|
19
|
+
id: `${resource.inventory_item_id}-${ts}`,
|
|
20
|
+
summary: `Inventory Level Updated ${resource.inventory_item_id}`,
|
|
21
|
+
ts,
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import common from "../common/webhook.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "shopify_developer_app-new-cart-created",
|
|
6
|
+
name: "New Cart Created (Instant)",
|
|
7
|
+
description: "Emit new event when a new cart is created.",
|
|
8
|
+
version: "0.0.2",
|
|
9
|
+
type: "source",
|
|
10
|
+
dedupe: "unique",
|
|
11
|
+
methods: {
|
|
12
|
+
...common.methods,
|
|
13
|
+
getTopic() {
|
|
14
|
+
return "CARTS_CREATE";
|
|
15
|
+
},
|
|
16
|
+
generateMeta(resource) {
|
|
17
|
+
const ts = Date.parse(resource.created_at);
|
|
18
|
+
return {
|
|
19
|
+
id: `${resource.id}-${ts}`,
|
|
20
|
+
summary: `Cart Created ${resource.id}`,
|
|
21
|
+
ts,
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|