Setup dev printful/webflow webhooks

This commit is contained in:
Dominic Ferrando
2026-06-26 13:44:19 -04:00
parent a689417aed
commit 62b651c476
5 changed files with 58 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
import { Printful, PrintfulClient } from "@blade-and-brawn/commerce";
import { env } from "../env";
const printful = new PrintfulClient({
token: env.PRINTFUL_AUTH,
storeId: env.PRINTFUL_STORE_ID,
});
await printful.Webhooks.register("https://dev.bladeandbrawn.com/webhook/printful", [
Printful.Webhook.Event.ProductUpdated,
Printful.Webhook.Event.ProductDeleted,
Printful.Webhook.Event.PackageShipped,
]);
const config = await printful.Webhooks.getConfig();
console.log(config);