@pipedream/shopify_developer_app 0.7.0 → 0.8.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 +4 -1
- 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 +4 -1
- 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 +1 -1
- package/actions/get-pages/get-pages.mjs +1 -1
- package/actions/search-custom-collection-by-name/search-custom-collection-by-name.mjs +1 -1
- package/actions/search-customers/search-customers.mjs +1 -1
- package/actions/search-orders/search-orders.mjs +40 -0
- 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 +4 -1
- 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 +28 -36
- package/actions/update-product-variant/update-product-variant.mjs +1 -1
- package/common/queries.mjs +68 -5
- package/package.json +1 -1
- 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 +2 -2
- package/sources/new-customer-created/new-customer-created.mjs +2 -2
- package/sources/new-draft-order/new-draft-order.mjs +2 -2
- package/sources/new-event-emitted/new-event-emitted.mjs +1 -1
- package/sources/new-fulfillment-event/new-fulfillment-event.mjs +2 -2
- package/sources/new-order-created/new-order-created.mjs +2 -14
- package/sources/new-order-fulfilled/new-order-fulfilled.mjs +2 -2
- package/sources/new-page/new-page.mjs +1 -1
- package/sources/new-paid-order/new-paid-order.mjs +2 -2
- package/sources/new-product-created/new-product-created.mjs +2 -2
- package/sources/new-product-updated/new-product-updated.mjs +2 -2
- package/sources/new-refund-created/new-refund-created.mjs +2 -2
- package/sources/new-updated-customer/new-updated-customer.mjs +2 -2
- package/sources/new-updated-order/new-updated-order.mjs +2 -2
- package/sources/product-added-to-custom-collection/product-added-to-custom-collection.mjs +2 -2
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "shopify_developer_app-create-customer",
|
|
5
5
|
name: "Create Customer",
|
|
6
6
|
description: "Create a new customer. [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customercreate)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
shopify,
|
|
@@ -88,6 +88,9 @@ export default {
|
|
|
88
88
|
],
|
|
89
89
|
},
|
|
90
90
|
});
|
|
91
|
+
if (response.customerCreate.userErrors.length > 0) {
|
|
92
|
+
throw new Error(response.customerCreate.userErrors[0].message);
|
|
93
|
+
}
|
|
91
94
|
$.export("$summary", `Created new customer with ID \`${response.customerCreate.customer.id}\``);
|
|
92
95
|
return response;
|
|
93
96
|
},
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "shopify_developer_app-create-order",
|
|
6
6
|
name: "Create Order",
|
|
7
7
|
description: "Creates a new order. For full order object details [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/ordercreate)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.7",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
shopify,
|
|
@@ -154,6 +154,9 @@ export default {
|
|
|
154
154
|
shippingLines: utils.parseJson(this.shippingLines),
|
|
155
155
|
},
|
|
156
156
|
});
|
|
157
|
+
if (response.orderCreate.userErrors.length > 0) {
|
|
158
|
+
throw new Error(response.orderCreate.userErrors[0].message);
|
|
159
|
+
}
|
|
157
160
|
$.export("$summary", `Created new order with ID \`${response.orderCreate.order.id}\``);
|
|
158
161
|
return response;
|
|
159
162
|
},
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "shopify_developer_app-get-order",
|
|
6
6
|
name: "Get Order",
|
|
7
7
|
description: "Retrieve an order by specifying the order ID. [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/queries/order)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.5",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
shopify,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "shopify_developer_app-search-customers",
|
|
5
5
|
name: "Search for Customers",
|
|
6
6
|
description: "Search for a customer or a list of customers. [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/queries/customers)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
shopify,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import shopify from "../../shopify_developer_app.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "shopify_developer_app-search-orders",
|
|
5
|
+
name: "Search for Orders",
|
|
6
|
+
description: "Search for an order or a list of orders. [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/queries/orders)",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
props: {
|
|
10
|
+
shopify,
|
|
11
|
+
query: {
|
|
12
|
+
type: "string",
|
|
13
|
+
label: "Query",
|
|
14
|
+
description: "The search query",
|
|
15
|
+
optional: true,
|
|
16
|
+
},
|
|
17
|
+
max: {
|
|
18
|
+
type: "integer",
|
|
19
|
+
label: "Max Records",
|
|
20
|
+
description: "Optionally limit the maximum number of records to return. Leave blank to retrieve all records.",
|
|
21
|
+
optional: true,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
async run({ $ }) {
|
|
25
|
+
const orders = await this.shopify.getPaginated({
|
|
26
|
+
resourceFn: this.shopify.listOrders,
|
|
27
|
+
resourceKeys: [
|
|
28
|
+
"orders",
|
|
29
|
+
],
|
|
30
|
+
variables: {
|
|
31
|
+
query: this.query,
|
|
32
|
+
},
|
|
33
|
+
max: this.max,
|
|
34
|
+
});
|
|
35
|
+
$.export("$summary", `Found ${orders.length} order${orders.length === 1
|
|
36
|
+
? ""
|
|
37
|
+
: "s"}`);
|
|
38
|
+
return orders;
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "shopify_developer_app-update-customer",
|
|
7
7
|
name: "Update Customer",
|
|
8
8
|
description: "Update a existing customer. [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerupdate)",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.8",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
shopify,
|
|
@@ -107,6 +107,9 @@ export default {
|
|
|
107
107
|
metafields,
|
|
108
108
|
},
|
|
109
109
|
});
|
|
110
|
+
if (response.customerUpdate.userErrors.length > 0) {
|
|
111
|
+
throw new Error(response.customerUpdate.userErrors[0].message);
|
|
112
|
+
}
|
|
110
113
|
$.export("$summary", `Updated customer \`${response.customerUpdate.customer.email || response.customerUpdate.customer.firstName}\` with ID \`${response.customerUpdate.customer.id}\``);
|
|
111
114
|
return response;
|
|
112
115
|
},
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import shopify from "../../shopify_developer_app.app.mjs";
|
|
2
2
|
import common from "../common/metafield-actions.mjs";
|
|
3
|
-
import utils from "@pipedream/shopify/common/utils.mjs";
|
|
4
3
|
|
|
5
4
|
export default {
|
|
6
5
|
...common,
|
|
7
6
|
key: "shopify_developer_app-update-product",
|
|
8
7
|
name: "Update Product",
|
|
9
8
|
description: "Update an existing product. [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productupdate)",
|
|
10
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.8",
|
|
11
10
|
type: "action",
|
|
12
11
|
props: {
|
|
13
12
|
shopify,
|
|
@@ -58,18 +57,6 @@ export default {
|
|
|
58
57
|
description: "A list of URLs of images to associate with the new product",
|
|
59
58
|
optional: true,
|
|
60
59
|
},
|
|
61
|
-
options: {
|
|
62
|
-
type: "string[]",
|
|
63
|
-
label: "Options",
|
|
64
|
-
description: "The custom product properties. For example, Size, Color, and Material. Each product can have up to 3 options and each option value can be up to 255 characters. Product variants are made of up combinations of option values. Options cannot be created without values. To create new options, a variant with an associated option value also needs to be created. Example: `[{\"name\":\"Color\",\"values\":[{\"name\": \"Blue\"},{\"name\": \"Black\"}]},{\"name\":\"Size\",\"values\":[{\"name\": \"155\"},{\"name\": \"159\"}]}]`",
|
|
65
|
-
optional: true,
|
|
66
|
-
},
|
|
67
|
-
variants: {
|
|
68
|
-
type: "string[]",
|
|
69
|
-
label: "Product Variants",
|
|
70
|
-
description: "An array of product variants, each representing a different version of the product. The position property is read-only. The position of variants is indicated by the order in which they are listed. Example: `[{\"option1\":\"First\",\"price\":\"10.00\",\"sku\":\"123\"},{\"option1\":\"Second\",\"price\":\"20.00\",\"sku\":\"123\"}]`",
|
|
71
|
-
optional: true,
|
|
72
|
-
},
|
|
73
60
|
tags: {
|
|
74
61
|
propDefinition: [
|
|
75
62
|
shopify,
|
|
@@ -105,39 +92,44 @@ export default {
|
|
|
105
92
|
async run({ $ }) {
|
|
106
93
|
const metafields = await this.createMetafieldsArray(this.metafields, this.productId, "product");
|
|
107
94
|
|
|
108
|
-
const
|
|
109
|
-
const variantsArray = this.shopify.parseArrayOfJSONStrings(this.variants);
|
|
110
|
-
for (const variant of variantsArray) {
|
|
111
|
-
if (variant.metafields) {
|
|
112
|
-
const variantMetafields = await this.createMetafieldsArray(variant.metafields, variant.id, "variants");
|
|
113
|
-
variants.push({
|
|
114
|
-
...variant,
|
|
115
|
-
metafields: variantMetafields,
|
|
116
|
-
});
|
|
117
|
-
continue;
|
|
118
|
-
}
|
|
119
|
-
variants.push(variant);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
const response = await this.shopify.updateProduct({
|
|
95
|
+
const args = {
|
|
123
96
|
input: {
|
|
97
|
+
id: this.productId,
|
|
124
98
|
title: this.title,
|
|
125
99
|
descriptionHtml: this.productDescription,
|
|
126
100
|
vendor: this.vendor,
|
|
127
101
|
productType: this.productType,
|
|
128
102
|
status: this.status,
|
|
129
|
-
images: utils.parseJson(this.images),
|
|
130
|
-
options: utils.parseJson(this.options),
|
|
131
|
-
variants,
|
|
132
103
|
tags: this.tags,
|
|
133
104
|
metafields,
|
|
134
|
-
metafields_global_title_tag: this.seoTitle,
|
|
135
|
-
metafields_global_description_tag: this.seoDescription,
|
|
136
105
|
handle: this.handle,
|
|
137
106
|
},
|
|
138
|
-
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
if (this.seoTitle) {
|
|
110
|
+
args.input.seo = {
|
|
111
|
+
title: this.seoTitle,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
if (this.seoDescription) {
|
|
115
|
+
args.input.seo = {
|
|
116
|
+
...args.input?.seo,
|
|
117
|
+
description: this.seoDescription,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
139
120
|
|
|
140
|
-
|
|
121
|
+
if (this.images?.length) {
|
|
122
|
+
args.media = this.images.map((originalSource) => ({
|
|
123
|
+
originalSource,
|
|
124
|
+
mediaContentType: "IMAGE",
|
|
125
|
+
}));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const response = await this.shopify.updateProduct(args);
|
|
129
|
+
if (response.productUpdate.userErrors.length > 0) {
|
|
130
|
+
throw new Error(response.productUpdate.userErrors[0].message);
|
|
131
|
+
}
|
|
132
|
+
$.export("$summary", `Updated product \`${response.productUpdate.product.title}\` with id \`${response.productUpdate.product.id}\``);
|
|
141
133
|
return response;
|
|
142
134
|
},
|
|
143
135
|
};
|
package/common/queries.mjs
CHANGED
|
@@ -14,6 +14,30 @@ const GET_ORDER = `
|
|
|
14
14
|
endCursor
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
+
customer {
|
|
18
|
+
id
|
|
19
|
+
displayName
|
|
20
|
+
email
|
|
21
|
+
phone
|
|
22
|
+
addresses (first: $first) {
|
|
23
|
+
address1
|
|
24
|
+
address2
|
|
25
|
+
city
|
|
26
|
+
zip
|
|
27
|
+
country
|
|
28
|
+
company
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
totalPriceSet {
|
|
32
|
+
shopMoney {
|
|
33
|
+
amount
|
|
34
|
+
currencyCode
|
|
35
|
+
}
|
|
36
|
+
presentmentMoney {
|
|
37
|
+
amount
|
|
38
|
+
currencyCode
|
|
39
|
+
}
|
|
40
|
+
}
|
|
17
41
|
suggestedRefund(refundLineItems: $refundLineItems) {
|
|
18
42
|
subtotalSet {
|
|
19
43
|
shopMoney {
|
|
@@ -104,12 +128,36 @@ const GET_DRAFT_ORDER = `
|
|
|
104
128
|
`;
|
|
105
129
|
|
|
106
130
|
const LIST_ORDERS = `
|
|
107
|
-
query ($first: Int, $after: String, $reverse: Boolean){
|
|
108
|
-
orders(first: $first, after: $after, reverse: $reverse) {
|
|
131
|
+
query ($first: Int, $after: String, $reverse: Boolean, $query: String){
|
|
132
|
+
orders(first: $first, after: $after, reverse: $reverse, query: $query) {
|
|
109
133
|
nodes {
|
|
110
134
|
id
|
|
111
135
|
updatedAt
|
|
112
|
-
|
|
136
|
+
customer {
|
|
137
|
+
id
|
|
138
|
+
displayName
|
|
139
|
+
email
|
|
140
|
+
phone
|
|
141
|
+
addresses (first: $first) {
|
|
142
|
+
address1
|
|
143
|
+
address2
|
|
144
|
+
city
|
|
145
|
+
zip
|
|
146
|
+
country
|
|
147
|
+
company
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
totalPriceSet {
|
|
151
|
+
shopMoney {
|
|
152
|
+
amount
|
|
153
|
+
currencyCode
|
|
154
|
+
}
|
|
155
|
+
presentmentMoney {
|
|
156
|
+
amount
|
|
157
|
+
currencyCode
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
metafields (first: $first) {
|
|
113
161
|
nodes {
|
|
114
162
|
id
|
|
115
163
|
key
|
|
@@ -131,7 +179,7 @@ const LIST_DRAFT_ORDERS = `
|
|
|
131
179
|
draftOrders(first: $first, after: $after) {
|
|
132
180
|
nodes {
|
|
133
181
|
id
|
|
134
|
-
metafields (first: $first
|
|
182
|
+
metafields (first: $first) {
|
|
135
183
|
nodes {
|
|
136
184
|
id
|
|
137
185
|
key
|
|
@@ -154,7 +202,22 @@ const LIST_CUSTOMERS = `
|
|
|
154
202
|
nodes {
|
|
155
203
|
id
|
|
156
204
|
displayName
|
|
157
|
-
|
|
205
|
+
email
|
|
206
|
+
phone
|
|
207
|
+
addresses (first: $first) {
|
|
208
|
+
address1
|
|
209
|
+
address2
|
|
210
|
+
city
|
|
211
|
+
country
|
|
212
|
+
company
|
|
213
|
+
}
|
|
214
|
+
orders (first: $first) {
|
|
215
|
+
nodes {
|
|
216
|
+
id
|
|
217
|
+
createdAt
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
metafields (first: $first) {
|
|
158
221
|
nodes {
|
|
159
222
|
id
|
|
160
223
|
key
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "New Cancelled Order (Instant)",
|
|
7
7
|
type: "source",
|
|
8
8
|
description: "Emit new event each time a new order is cancelled.",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.11",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
methods: {
|
|
12
12
|
...common.methods,
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
return "ORDERS_CANCELLED";
|
|
15
15
|
},
|
|
16
16
|
generateMeta(resource) {
|
|
17
|
-
const ts = Date.parse(resource.
|
|
17
|
+
const ts = Date.parse(resource.updated_at);
|
|
18
18
|
return {
|
|
19
19
|
id: ts,
|
|
20
20
|
summary: `Order Cancelled ${resource.id}`,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "New Customer Created (Instant)",
|
|
7
7
|
type: "source",
|
|
8
8
|
description: "Emit new event for each new customer added to a store.",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.11",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
methods: {
|
|
12
12
|
...common.methods,
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
return "CUSTOMERS_CREATE";
|
|
15
15
|
},
|
|
16
16
|
generateMeta(resource) {
|
|
17
|
-
const ts = Date.parse(resource.
|
|
17
|
+
const ts = Date.parse(resource.created_at);
|
|
18
18
|
return {
|
|
19
19
|
id: resource.id,
|
|
20
20
|
summary: `New Customer ${resource.id}`,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "New Draft Order (Instant)",
|
|
7
7
|
type: "source",
|
|
8
8
|
description: "Emit new event for each new draft order submitted to a store.",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.11",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
methods: {
|
|
12
12
|
...common.methods,
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
return "DRAFT_ORDERS_CREATE";
|
|
15
15
|
},
|
|
16
16
|
generateMeta(resource) {
|
|
17
|
-
const ts = Date.parse(resource.
|
|
17
|
+
const ts = Date.parse(resource.created_at);
|
|
18
18
|
return {
|
|
19
19
|
id: resource.id,
|
|
20
20
|
summary: `New Draft Order ${resource.id}`,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "New Fulfillment Event (Instant)",
|
|
7
7
|
type: "source",
|
|
8
8
|
description: "Emit new event for each new fulfillment event for a store.",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.9",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
methods: {
|
|
12
12
|
...common.methods,
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
return "FULFILLMENT_EVENTS_CREATE";
|
|
15
15
|
},
|
|
16
16
|
generateMeta(resource) {
|
|
17
|
-
const ts = Date.parse(resource.
|
|
17
|
+
const ts = Date.parse(resource.updated_at);
|
|
18
18
|
return {
|
|
19
19
|
id: ts,
|
|
20
20
|
summary: `New Fulfillment Event ${resource.id}`,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "New Order Created (Instant)",
|
|
7
7
|
type: "source",
|
|
8
8
|
description: "Emit new event for each new order submitted to a store.",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.11",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
methods: {
|
|
12
12
|
...common.methods,
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
return "ORDERS_CREATE";
|
|
15
15
|
},
|
|
16
16
|
generateMeta(resource) {
|
|
17
|
-
const ts = Date.parse(resource.
|
|
17
|
+
const ts = Date.parse(resource.created_at);
|
|
18
18
|
return {
|
|
19
19
|
id: resource.id,
|
|
20
20
|
summary: `New Order ${resource.id}`,
|
|
@@ -22,16 +22,4 @@ export default {
|
|
|
22
22
|
};
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
|
-
hooks: {
|
|
26
|
-
...common.hooks,
|
|
27
|
-
async deploy() {
|
|
28
|
-
const { orders: { nodes: results } } = await this.app.listOrders({
|
|
29
|
-
first: 5,
|
|
30
|
-
reverse: true,
|
|
31
|
-
});
|
|
32
|
-
for (const order of results) {
|
|
33
|
-
this.$emit(order, this.generateMeta(order));
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
25
|
};
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "New Order Fulfilled (Instant)",
|
|
7
7
|
type: "source",
|
|
8
8
|
description: "Emit new event whenever an order is fulfilled.",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.8",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
methods: {
|
|
12
12
|
...common.methods,
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
return "ORDERS_FULFILLED";
|
|
15
15
|
},
|
|
16
16
|
generateMeta(resource) {
|
|
17
|
-
const ts = Date.parse(resource.
|
|
17
|
+
const ts = Date.parse(resource.updated_at);
|
|
18
18
|
return {
|
|
19
19
|
id: ts,
|
|
20
20
|
summary: `New Fulfilled Order ${resource.id}`,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "New Paid Order (Instant)",
|
|
7
7
|
type: "source",
|
|
8
8
|
description: "Emit new event each time a new order is paid.",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.11",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
methods: {
|
|
12
12
|
...common.methods,
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
return "ORDERS_PAID";
|
|
15
15
|
},
|
|
16
16
|
generateMeta(resource) {
|
|
17
|
-
const ts = Date.parse(resource.
|
|
17
|
+
const ts = Date.parse(resource.updated_at);
|
|
18
18
|
return {
|
|
19
19
|
id: ts,
|
|
20
20
|
summary: `Order Paid ${resource.id}`,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "New Product Created (Instant)",
|
|
7
7
|
type: "source",
|
|
8
8
|
description: "Emit new event for each product added to a store.",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.11",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
methods: {
|
|
12
12
|
...common.methods,
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
return "PRODUCTS_CREATE";
|
|
15
15
|
},
|
|
16
16
|
generateMeta(resource) {
|
|
17
|
-
const ts = Date.parse(resource.
|
|
17
|
+
const ts = Date.parse(resource.created_at);
|
|
18
18
|
return {
|
|
19
19
|
id: resource.id,
|
|
20
20
|
summary: `New Product ${resource.id}`,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "shopify_developer_app-new-product-updated",
|
|
6
6
|
name: "New Product Updated (Instant)",
|
|
7
7
|
description: "Emit new event for each product updated in a store.",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.9",
|
|
9
9
|
type: "source",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
props: {
|
|
@@ -43,7 +43,7 @@ export default {
|
|
|
43
43
|
return relevant;
|
|
44
44
|
},
|
|
45
45
|
generateMeta(resource) {
|
|
46
|
-
const ts = Date.parse(resource.
|
|
46
|
+
const ts = Date.parse(resource.updated_at);
|
|
47
47
|
return {
|
|
48
48
|
id: `${resource.id}-${ts}`,
|
|
49
49
|
summary: `Product Updated ${resource.id}`,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "shopify_developer_app-new-refund-created",
|
|
6
6
|
name: "New Refund Created (Instant)",
|
|
7
7
|
description: "Emit new event when a new refund is created.",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.8",
|
|
9
9
|
type: "source",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
methods: {
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
return "REFUNDS_CREATE";
|
|
15
15
|
},
|
|
16
16
|
generateMeta(resource) {
|
|
17
|
-
const ts = Date.parse(resource.
|
|
17
|
+
const ts = Date.parse(resource.created_at);
|
|
18
18
|
return {
|
|
19
19
|
id: `${resource.id}-${ts}`,
|
|
20
20
|
summary: `Refund Created ${resource.id}`,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "New Updated Customer (Instant)",
|
|
7
7
|
type: "source",
|
|
8
8
|
description: "Emit new event each time a customer's information is updated.",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.11",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
methods: {
|
|
12
12
|
...common.methods,
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
return "CUSTOMERS_UPDATE";
|
|
15
15
|
},
|
|
16
16
|
generateMeta(resource) {
|
|
17
|
-
const ts = Date.parse(resource.
|
|
17
|
+
const ts = Date.parse(resource.updated_at);
|
|
18
18
|
return {
|
|
19
19
|
id: ts,
|
|
20
20
|
summary: `Customer Updated ${resource.id}`,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "New Updated Order (Instant)",
|
|
7
7
|
type: "source",
|
|
8
8
|
description: "Emit new event each time an order is updated.",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.11",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
methods: {
|
|
12
12
|
...common.methods,
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
return "ORDERS_UPDATED";
|
|
15
15
|
},
|
|
16
16
|
generateMeta(resource) {
|
|
17
|
-
const ts = Date.parse(resource.
|
|
17
|
+
const ts = Date.parse(resource.updated_at);
|
|
18
18
|
return {
|
|
19
19
|
id: ts,
|
|
20
20
|
summary: `Order Updated ${resource.id}`,
|
|
@@ -11,12 +11,12 @@ const props = adjustPropDefinitions(others.props, shopify);
|
|
|
11
11
|
export default {
|
|
12
12
|
...others,
|
|
13
13
|
key: "shopify_developer_app-product-added-to-custom-collection",
|
|
14
|
-
version: "0.0.
|
|
14
|
+
version: "0.0.7",
|
|
15
15
|
name,
|
|
16
16
|
description,
|
|
17
17
|
type,
|
|
18
18
|
props: {
|
|
19
|
-
shopify,
|
|
19
|
+
app: shopify,
|
|
20
20
|
...props,
|
|
21
21
|
},
|
|
22
22
|
};
|