Setup dev printful/webflow webhooks
This commit is contained in:
@@ -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);
|
||||
Reference in New Issue
Block a user