Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import constants from "../common/constants.mjs";
import common from "../common/webhook-metafields.mjs";

export default {
...common,
key: "shopify_developer_app-new-fulfillment-event-created",
name: "New Fulfillment Event Created (Instant)",
type: "source",
description: "Emit new event when a fulfillment event is created.",
version: "0.0.1",
dedupe: "unique",
methods: {
...common.methods,
getTopic() {
return constants.EVENT_TOPIC.FULFILLMENT_EVENTS_CREATE;
},
generateMeta(resource) {
const ts = Date.parse(resource.created_at);
return {
id: resource.id,
summary: `New Fulfillment Event ${resource.id}`,
ts,
};
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import common from "../common/webhook-metafields.mjs";

export default {
...common,
key: "shopify_developer_app-new-shipment",
name: "New Shipment (Instant)",
key: "shopify_developer_app-new-order-fulfilled",
name: "New Order Fulfilled (Instant)",
type: "source",
description: "Emit new event for each new fulfillment event for a store.",
version: "0.0.4",
description: "Emit new event whenever an order is fulfilled.",
version: "0.0.1",
dedupe: "unique",
methods: {
...common.methods,
Expand All @@ -18,7 +18,7 @@ export default {
const ts = Date.parse(resource.updated_at);
return {
id: ts,
summary: `New Shipped Order ${resource.id}.`,
summary: `Order ${resource.id} fulfilled`,
ts,
};
},
Expand Down