@pipedream/shopify_developer_app 0.4.1 → 0.5.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/package.json
CHANGED
package/sources/{new-shipment/new-shipment.mjs → new-fulfillment-event/new-fulfillment-event.mjs}
RENAMED
|
@@ -3,22 +3,22 @@ import common from "../common/webhook-metafields.mjs";
|
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
...common,
|
|
6
|
-
key: "shopify_developer_app-new-
|
|
7
|
-
name: "New
|
|
6
|
+
key: "shopify_developer_app-new-fulfillment-event",
|
|
7
|
+
name: "New Fulfillment Event (Instant)",
|
|
8
8
|
type: "source",
|
|
9
9
|
description: "Emit new event for each new fulfillment event for a store.",
|
|
10
|
-
version: "0.0.
|
|
10
|
+
version: "0.0.1",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
methods: {
|
|
13
13
|
...common.methods,
|
|
14
14
|
getTopic() {
|
|
15
|
-
return constants.EVENT_TOPIC.
|
|
15
|
+
return constants.EVENT_TOPIC.FULFILLMENT_EVENTS_CREATE;
|
|
16
16
|
},
|
|
17
17
|
generateMeta(resource) {
|
|
18
18
|
const ts = Date.parse(resource.updated_at);
|
|
19
19
|
return {
|
|
20
20
|
id: ts,
|
|
21
|
-
summary: `New
|
|
21
|
+
summary: `New Fulfillment Event ${resource.id}.`,
|
|
22
22
|
ts,
|
|
23
23
|
};
|
|
24
24
|
},
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import constants from "../common/constants.mjs";
|
|
2
|
+
import common from "../common/webhook-metafields.mjs";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
...common,
|
|
6
|
+
key: "shopify_developer_app-new-order-fulfilled",
|
|
7
|
+
name: "New Order Fulfilled (Instant)",
|
|
8
|
+
type: "source",
|
|
9
|
+
description: "Emit new event whenever an order is fulfilled.",
|
|
10
|
+
version: "0.0.1",
|
|
11
|
+
dedupe: "unique",
|
|
12
|
+
methods: {
|
|
13
|
+
...common.methods,
|
|
14
|
+
getTopic() {
|
|
15
|
+
return constants.EVENT_TOPIC.ORDERS_FULFILLED;
|
|
16
|
+
},
|
|
17
|
+
generateMeta(resource) {
|
|
18
|
+
const ts = Date.parse(resource.updated_at);
|
|
19
|
+
return {
|
|
20
|
+
id: ts,
|
|
21
|
+
summary: `New Fulfilled Order ${resource.id}.`,
|
|
22
|
+
ts,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|