@payloadcms/plugin-stripe 3.83.0-internal.06ac84e → 3.83.0-internal.86b7bfb

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.
@@ -1 +1 @@
1
- {"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/routes/webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAItE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAIrD,eAAO,MAAM,cAAc,SAAgB;IACzC,MAAM,EAAE,aAAa,CAAA;IACrB,YAAY,EAAE,kBAAkB,CAAA;IAChC,GAAG,EAAE,cAAc,CAAA;CACpB,KAAG,OAAO,CAAC,GAAG,CA2Ed,CAAA"}
1
+ {"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/routes/webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAKtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAIrD,eAAO,MAAM,cAAc,SAAgB;IACzC,MAAM,EAAE,aAAa,CAAA;IACrB,YAAY,EAAE,kBAAkB,CAAA;IAChC,GAAG,EAAE,cAAc,CAAA;CACpB,KAAG,OAAO,CAAC,GAAG,CAuGd,CAAA"}
@@ -1,3 +1,4 @@
1
+ import { dynamicImport } from 'payload';
1
2
  import Stripe from 'stripe';
2
3
  import { handleWebhooks } from '../webhooks/index.js';
3
4
  export const stripeWebhooks = async (args)=>{
@@ -25,17 +26,8 @@ export const stripeWebhooks = async (args)=>{
25
26
  returnStatus = 400;
26
27
  }
27
28
  if (event) {
28
- void handleWebhooks({
29
- config,
30
- event,
31
- payload: req.payload,
32
- pluginConfig,
33
- req,
34
- stripe
35
- });
36
- // Fire external webhook handlers if they exist
37
- if (typeof webhooks === 'function') {
38
- void webhooks({
29
+ const fireWebhooks = async ()=>{
30
+ await handleWebhooks({
39
31
  config,
40
32
  event,
41
33
  payload: req.payload,
@@ -43,11 +35,9 @@ export const stripeWebhooks = async (args)=>{
43
35
  req,
44
36
  stripe
45
37
  });
46
- }
47
- if (typeof webhooks === 'object') {
48
- const webhookEventHandler = webhooks[event.type];
49
- if (typeof webhookEventHandler === 'function') {
50
- void webhookEventHandler({
38
+ // Fire external webhook handlers if they exist
39
+ if (typeof webhooks === 'function') {
40
+ await webhooks({
51
41
  config,
52
42
  event,
53
43
  payload: req.payload,
@@ -56,7 +46,40 @@ export const stripeWebhooks = async (args)=>{
56
46
  stripe
57
47
  });
58
48
  }
59
- }
49
+ if (typeof webhooks === 'object') {
50
+ const webhookEventHandler = webhooks[event.type];
51
+ if (typeof webhookEventHandler === 'function') {
52
+ await webhookEventHandler({
53
+ config,
54
+ event,
55
+ payload: req.payload,
56
+ pluginConfig,
57
+ req,
58
+ stripe
59
+ });
60
+ }
61
+ }
62
+ };
63
+ /**
64
+ * Run webhook handlers asynchronously. This allows the request to immediately return a 2xx status code to Stripe without waiting for the webhook handlers to complete.
65
+ * This is because webhooks can be potentially slow if performing database queries or other slow API requests.
66
+ * This is important because Stripe will retry the webhook if it doesn't receive a 2xx status code within the 10-20 second timeout window.
67
+ * When a webhook fails, Stripe will retry it, causing duplicate events and potential data inconsistencies.
68
+ *
69
+ * To do this in Vercel environments, conditionally import the `waitUntil` function from `@vercel/functions`.
70
+ * If it exists, use it to wrap the `fireWebhooks` function to ensure it completes after the response is sent.
71
+ * Otherwise, run the `fireWebhooks` function directly and void the promise to prevent the response from waiting.
72
+ * {@link https://docs.stripe.com/webhooks#acknowledge-events-immediately}
73
+ */ void (async ()=>{
74
+ let waitUntil = (promise)=>promise;
75
+ try {
76
+ const { waitUntil: importedWaitUntil } = await dynamicImport('@vercel/functions');
77
+ waitUntil = importedWaitUntil;
78
+ } catch (_err) {
79
+ // silently fail - @vercel/functions is not installed
80
+ }
81
+ void waitUntil(fireWebhooks());
82
+ })();
60
83
  }
61
84
  }
62
85
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/routes/webhooks.ts"],"sourcesContent":["import type { Config as PayloadConfig, PayloadRequest } from 'payload'\n\nimport Stripe from 'stripe'\n\nimport type { StripePluginConfig } from '../types.js'\n\nimport { handleWebhooks } from '../webhooks/index.js'\n\nexport const stripeWebhooks = async (args: {\n config: PayloadConfig\n pluginConfig: StripePluginConfig\n req: PayloadRequest\n}): Promise<any> => {\n const { config, pluginConfig, req } = args\n let returnStatus = 200\n\n const { stripeSecretKey, stripeWebhooksEndpointSecret, webhooks } = pluginConfig\n\n if (stripeWebhooksEndpointSecret) {\n const stripe = new Stripe(stripeSecretKey, {\n // api version can only be the latest, stripe recommends ts ignoring it\n apiVersion: '2022-08-01',\n appInfo: {\n name: 'Stripe Payload Plugin',\n url: 'https://payloadcms.com',\n },\n })\n\n const body = await req.text!()\n const stripeSignature = req.headers.get('stripe-signature')\n\n if (stripeSignature) {\n let event: Stripe.Event | undefined\n\n try {\n event = stripe.webhooks.constructEvent(body, stripeSignature, stripeWebhooksEndpointSecret)\n } catch (err: unknown) {\n const msg: string = err instanceof Error ? err.message : JSON.stringify(err)\n req.payload.logger.error(`Error constructing Stripe event: ${msg}`)\n returnStatus = 400\n }\n\n if (event) {\n void handleWebhooks({\n config,\n event,\n payload: req.payload,\n pluginConfig,\n req,\n stripe,\n })\n\n // Fire external webhook handlers if they exist\n if (typeof webhooks === 'function') {\n void webhooks({\n config,\n event,\n payload: req.payload,\n pluginConfig,\n req,\n stripe,\n })\n }\n\n if (typeof webhooks === 'object') {\n const webhookEventHandler = webhooks[event.type]\n if (typeof webhookEventHandler === 'function') {\n void webhookEventHandler({\n config,\n event,\n payload: req.payload,\n pluginConfig,\n req,\n stripe,\n })\n }\n }\n }\n }\n }\n\n return Response.json(\n { received: true },\n {\n status: returnStatus,\n },\n )\n}\n"],"names":["Stripe","handleWebhooks","stripeWebhooks","args","config","pluginConfig","req","returnStatus","stripeSecretKey","stripeWebhooksEndpointSecret","webhooks","stripe","apiVersion","appInfo","name","url","body","text","stripeSignature","headers","get","event","constructEvent","err","msg","Error","message","JSON","stringify","payload","logger","error","webhookEventHandler","type","Response","json","received","status"],"mappings":"AAEA,OAAOA,YAAY,SAAQ;AAI3B,SAASC,cAAc,QAAQ,uBAAsB;AAErD,OAAO,MAAMC,iBAAiB,OAAOC;IAKnC,MAAM,EAAEC,MAAM,EAAEC,YAAY,EAAEC,GAAG,EAAE,GAAGH;IACtC,IAAII,eAAe;IAEnB,MAAM,EAAEC,eAAe,EAAEC,4BAA4B,EAAEC,QAAQ,EAAE,GAAGL;IAEpE,IAAII,8BAA8B;QAChC,MAAME,SAAS,IAAIX,OAAOQ,iBAAiB;YACzC,uEAAuE;YACvEI,YAAY;YACZC,SAAS;gBACPC,MAAM;gBACNC,KAAK;YACP;QACF;QAEA,MAAMC,OAAO,MAAMV,IAAIW,IAAI;QAC3B,MAAMC,kBAAkBZ,IAAIa,OAAO,CAACC,GAAG,CAAC;QAExC,IAAIF,iBAAiB;YACnB,IAAIG;YAEJ,IAAI;gBACFA,QAAQV,OAAOD,QAAQ,CAACY,cAAc,CAACN,MAAME,iBAAiBT;YAChE,EAAE,OAAOc,KAAc;gBACrB,MAAMC,MAAcD,eAAeE,QAAQF,IAAIG,OAAO,GAAGC,KAAKC,SAAS,CAACL;gBACxEjB,IAAIuB,OAAO,CAACC,MAAM,CAACC,KAAK,CAAC,CAAC,iCAAiC,EAAEP,KAAK;gBAClEjB,eAAe;YACjB;YAEA,IAAIc,OAAO;gBACT,KAAKpB,eAAe;oBAClBG;oBACAiB;oBACAQ,SAASvB,IAAIuB,OAAO;oBACpBxB;oBACAC;oBACAK;gBACF;gBAEA,+CAA+C;gBAC/C,IAAI,OAAOD,aAAa,YAAY;oBAClC,KAAKA,SAAS;wBACZN;wBACAiB;wBACAQ,SAASvB,IAAIuB,OAAO;wBACpBxB;wBACAC;wBACAK;oBACF;gBACF;gBAEA,IAAI,OAAOD,aAAa,UAAU;oBAChC,MAAMsB,sBAAsBtB,QAAQ,CAACW,MAAMY,IAAI,CAAC;oBAChD,IAAI,OAAOD,wBAAwB,YAAY;wBAC7C,KAAKA,oBAAoB;4BACvB5B;4BACAiB;4BACAQ,SAASvB,IAAIuB,OAAO;4BACpBxB;4BACAC;4BACAK;wBACF;oBACF;gBACF;YACF;QACF;IACF;IAEA,OAAOuB,SAASC,IAAI,CAClB;QAAEC,UAAU;IAAK,GACjB;QACEC,QAAQ9B;IACV;AAEJ,EAAC"}
1
+ {"version":3,"sources":["../../src/routes/webhooks.ts"],"sourcesContent":["import type { Config as PayloadConfig, PayloadRequest } from 'payload'\n\nimport { dynamicImport } from 'payload'\nimport Stripe from 'stripe'\n\nimport type { StripePluginConfig } from '../types.js'\n\nimport { handleWebhooks } from '../webhooks/index.js'\n\nexport const stripeWebhooks = async (args: {\n config: PayloadConfig\n pluginConfig: StripePluginConfig\n req: PayloadRequest\n}): Promise<any> => {\n const { config, pluginConfig, req } = args\n let returnStatus = 200\n\n const { stripeSecretKey, stripeWebhooksEndpointSecret, webhooks } = pluginConfig\n\n if (stripeWebhooksEndpointSecret) {\n const stripe = new Stripe(stripeSecretKey, {\n // api version can only be the latest, stripe recommends ts ignoring it\n apiVersion: '2022-08-01',\n appInfo: {\n name: 'Stripe Payload Plugin',\n url: 'https://payloadcms.com',\n },\n })\n\n const body = await req.text!()\n const stripeSignature = req.headers.get('stripe-signature')\n\n if (stripeSignature) {\n let event: Stripe.Event | undefined\n\n try {\n event = stripe.webhooks.constructEvent(body, stripeSignature, stripeWebhooksEndpointSecret)\n } catch (err: unknown) {\n const msg: string = err instanceof Error ? err.message : JSON.stringify(err)\n req.payload.logger.error(`Error constructing Stripe event: ${msg}`)\n returnStatus = 400\n }\n\n if (event) {\n const fireWebhooks = async () => {\n await handleWebhooks({\n config,\n event,\n payload: req.payload,\n pluginConfig,\n req,\n stripe,\n })\n\n // Fire external webhook handlers if they exist\n if (typeof webhooks === 'function') {\n await webhooks({\n config,\n event,\n payload: req.payload,\n pluginConfig,\n req,\n stripe,\n })\n }\n\n if (typeof webhooks === 'object') {\n const webhookEventHandler = webhooks[event.type]\n if (typeof webhookEventHandler === 'function') {\n await webhookEventHandler({\n config,\n event,\n payload: req.payload,\n pluginConfig,\n req,\n stripe,\n })\n }\n }\n }\n\n /**\n * Run webhook handlers asynchronously. This allows the request to immediately return a 2xx status code to Stripe without waiting for the webhook handlers to complete.\n * This is because webhooks can be potentially slow if performing database queries or other slow API requests.\n * This is important because Stripe will retry the webhook if it doesn't receive a 2xx status code within the 10-20 second timeout window.\n * When a webhook fails, Stripe will retry it, causing duplicate events and potential data inconsistencies.\n *\n * To do this in Vercel environments, conditionally import the `waitUntil` function from `@vercel/functions`.\n * If it exists, use it to wrap the `fireWebhooks` function to ensure it completes after the response is sent.\n * Otherwise, run the `fireWebhooks` function directly and void the promise to prevent the response from waiting.\n * {@link https://docs.stripe.com/webhooks#acknowledge-events-immediately}\n */\n void (async () => {\n let waitUntil: (promise: Promise<void>) => Promise<void> | void = (promise) => promise\n\n try {\n const { waitUntil: importedWaitUntil } = await dynamicImport<{\n waitUntil: (promise: Promise<void>) => void\n }>('@vercel/functions')\n waitUntil = importedWaitUntil\n } catch (_err) {\n // silently fail - @vercel/functions is not installed\n }\n\n void waitUntil(fireWebhooks())\n })()\n }\n }\n }\n\n return Response.json(\n { received: true },\n {\n status: returnStatus,\n },\n )\n}\n"],"names":["dynamicImport","Stripe","handleWebhooks","stripeWebhooks","args","config","pluginConfig","req","returnStatus","stripeSecretKey","stripeWebhooksEndpointSecret","webhooks","stripe","apiVersion","appInfo","name","url","body","text","stripeSignature","headers","get","event","constructEvent","err","msg","Error","message","JSON","stringify","payload","logger","error","fireWebhooks","webhookEventHandler","type","waitUntil","promise","importedWaitUntil","_err","Response","json","received","status"],"mappings":"AAEA,SAASA,aAAa,QAAQ,UAAS;AACvC,OAAOC,YAAY,SAAQ;AAI3B,SAASC,cAAc,QAAQ,uBAAsB;AAErD,OAAO,MAAMC,iBAAiB,OAAOC;IAKnC,MAAM,EAAEC,MAAM,EAAEC,YAAY,EAAEC,GAAG,EAAE,GAAGH;IACtC,IAAII,eAAe;IAEnB,MAAM,EAAEC,eAAe,EAAEC,4BAA4B,EAAEC,QAAQ,EAAE,GAAGL;IAEpE,IAAII,8BAA8B;QAChC,MAAME,SAAS,IAAIX,OAAOQ,iBAAiB;YACzC,uEAAuE;YACvEI,YAAY;YACZC,SAAS;gBACPC,MAAM;gBACNC,KAAK;YACP;QACF;QAEA,MAAMC,OAAO,MAAMV,IAAIW,IAAI;QAC3B,MAAMC,kBAAkBZ,IAAIa,OAAO,CAACC,GAAG,CAAC;QAExC,IAAIF,iBAAiB;YACnB,IAAIG;YAEJ,IAAI;gBACFA,QAAQV,OAAOD,QAAQ,CAACY,cAAc,CAACN,MAAME,iBAAiBT;YAChE,EAAE,OAAOc,KAAc;gBACrB,MAAMC,MAAcD,eAAeE,QAAQF,IAAIG,OAAO,GAAGC,KAAKC,SAAS,CAACL;gBACxEjB,IAAIuB,OAAO,CAACC,MAAM,CAACC,KAAK,CAAC,CAAC,iCAAiC,EAAEP,KAAK;gBAClEjB,eAAe;YACjB;YAEA,IAAIc,OAAO;gBACT,MAAMW,eAAe;oBACnB,MAAM/B,eAAe;wBACnBG;wBACAiB;wBACAQ,SAASvB,IAAIuB,OAAO;wBACpBxB;wBACAC;wBACAK;oBACF;oBAEA,+CAA+C;oBAC/C,IAAI,OAAOD,aAAa,YAAY;wBAClC,MAAMA,SAAS;4BACbN;4BACAiB;4BACAQ,SAASvB,IAAIuB,OAAO;4BACpBxB;4BACAC;4BACAK;wBACF;oBACF;oBAEA,IAAI,OAAOD,aAAa,UAAU;wBAChC,MAAMuB,sBAAsBvB,QAAQ,CAACW,MAAMa,IAAI,CAAC;wBAChD,IAAI,OAAOD,wBAAwB,YAAY;4BAC7C,MAAMA,oBAAoB;gCACxB7B;gCACAiB;gCACAQ,SAASvB,IAAIuB,OAAO;gCACpBxB;gCACAC;gCACAK;4BACF;wBACF;oBACF;gBACF;gBAEA;;;;;;;;;;SAUC,GACD,KAAK,AAAC,CAAA;oBACJ,IAAIwB,YAA8D,CAACC,UAAYA;oBAE/E,IAAI;wBACF,MAAM,EAAED,WAAWE,iBAAiB,EAAE,GAAG,MAAMtC,cAE5C;wBACHoC,YAAYE;oBACd,EAAE,OAAOC,MAAM;oBACb,qDAAqD;oBACvD;oBAEA,KAAKH,UAAUH;gBACjB,CAAA;YACF;QACF;IACF;IAEA,OAAOO,SAASC,IAAI,CAClB;QAAEC,UAAU;IAAK,GACjB;QACEC,QAAQnC;IACV;AAEJ,EAAC"}
@@ -1,6 +1,6 @@
1
1
  import { handleCreatedOrUpdated } from './handleCreatedOrUpdated.js';
2
2
  import { handleDeleted } from './handleDeleted.js';
3
- export const handleWebhooks = (args)=>{
3
+ export const handleWebhooks = async (args)=>{
4
4
  const { event, payload, pluginConfig } = args;
5
5
  if (pluginConfig?.logs) {
6
6
  payload.logger.info(`🪝 Received Stripe '${event.type}' webhook event with ID: '${event.id}'.`);
@@ -14,7 +14,7 @@ export const handleWebhooks = (args)=>{
14
14
  switch(method){
15
15
  case 'created':
16
16
  {
17
- void handleCreatedOrUpdated({
17
+ await handleCreatedOrUpdated({
18
18
  ...args,
19
19
  pluginConfig,
20
20
  resourceType,
@@ -24,7 +24,7 @@ export const handleWebhooks = (args)=>{
24
24
  }
25
25
  case 'deleted':
26
26
  {
27
- void handleDeleted({
27
+ await handleDeleted({
28
28
  ...args,
29
29
  pluginConfig,
30
30
  resourceType,
@@ -34,7 +34,7 @@ export const handleWebhooks = (args)=>{
34
34
  }
35
35
  case 'updated':
36
36
  {
37
- void handleCreatedOrUpdated({
37
+ await handleCreatedOrUpdated({
38
38
  ...args,
39
39
  pluginConfig,
40
40
  resourceType,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/webhooks/index.ts"],"sourcesContent":["import type { StripeWebhookHandler } from '../types.js'\n\nimport { handleCreatedOrUpdated } from './handleCreatedOrUpdated.js'\nimport { handleDeleted } from './handleDeleted.js'\n\nexport const handleWebhooks: StripeWebhookHandler = (args) => {\n const { event, payload, pluginConfig } = args\n\n if (pluginConfig?.logs) {\n payload.logger.info(`🪝 Received Stripe '${event.type}' webhook event with ID: '${event.id}'.`)\n }\n\n // could also traverse into event.data.object.object to get the type, but that seems unreliable\n // use cli: `stripe resources` to see all available resources\n const resourceType = event.type.split('.')[0]\n const method = event.type.split('.').pop()\n\n const syncConfig = pluginConfig?.sync?.find(\n (sync) => sync.stripeResourceTypeSingular === resourceType,\n )\n\n if (syncConfig) {\n switch (method) {\n case 'created': {\n void handleCreatedOrUpdated({\n ...args,\n pluginConfig,\n resourceType,\n syncConfig,\n })\n break\n }\n case 'deleted': {\n void handleDeleted({\n ...args,\n pluginConfig,\n resourceType,\n syncConfig,\n })\n break\n }\n case 'updated': {\n void handleCreatedOrUpdated({\n ...args,\n pluginConfig,\n resourceType,\n syncConfig,\n })\n break\n }\n default: {\n break\n }\n }\n }\n}\n"],"names":["handleCreatedOrUpdated","handleDeleted","handleWebhooks","args","event","payload","pluginConfig","logs","logger","info","type","id","resourceType","split","method","pop","syncConfig","sync","find","stripeResourceTypeSingular"],"mappings":"AAEA,SAASA,sBAAsB,QAAQ,8BAA6B;AACpE,SAASC,aAAa,QAAQ,qBAAoB;AAElD,OAAO,MAAMC,iBAAuC,CAACC;IACnD,MAAM,EAAEC,KAAK,EAAEC,OAAO,EAAEC,YAAY,EAAE,GAAGH;IAEzC,IAAIG,cAAcC,MAAM;QACtBF,QAAQG,MAAM,CAACC,IAAI,CAAC,CAAC,oBAAoB,EAAEL,MAAMM,IAAI,CAAC,0BAA0B,EAAEN,MAAMO,EAAE,CAAC,EAAE,CAAC;IAChG;IAEA,+FAA+F;IAC/F,6DAA6D;IAC7D,MAAMC,eAAeR,MAAMM,IAAI,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,MAAMC,SAASV,MAAMM,IAAI,CAACG,KAAK,CAAC,KAAKE,GAAG;IAExC,MAAMC,aAAaV,cAAcW,MAAMC,KACrC,CAACD,OAASA,KAAKE,0BAA0B,KAAKP;IAGhD,IAAII,YAAY;QACd,OAAQF;YACN,KAAK;gBAAW;oBACd,KAAKd,uBAAuB;wBAC1B,GAAGG,IAAI;wBACPG;wBACAM;wBACAI;oBACF;oBACA;gBACF;YACA,KAAK;gBAAW;oBACd,KAAKf,cAAc;wBACjB,GAAGE,IAAI;wBACPG;wBACAM;wBACAI;oBACF;oBACA;gBACF;YACA,KAAK;gBAAW;oBACd,KAAKhB,uBAAuB;wBAC1B,GAAGG,IAAI;wBACPG;wBACAM;wBACAI;oBACF;oBACA;gBACF;YACA;gBAAS;oBACP;gBACF;QACF;IACF;AACF,EAAC"}
1
+ {"version":3,"sources":["../../src/webhooks/index.ts"],"sourcesContent":["import type { StripeWebhookHandler } from '../types.js'\n\nimport { handleCreatedOrUpdated } from './handleCreatedOrUpdated.js'\nimport { handleDeleted } from './handleDeleted.js'\n\nexport const handleWebhooks: StripeWebhookHandler = async (args) => {\n const { event, payload, pluginConfig } = args\n\n if (pluginConfig?.logs) {\n payload.logger.info(`🪝 Received Stripe '${event.type}' webhook event with ID: '${event.id}'.`)\n }\n\n // could also traverse into event.data.object.object to get the type, but that seems unreliable\n // use cli: `stripe resources` to see all available resources\n const resourceType = event.type.split('.')[0]\n const method = event.type.split('.').pop()\n\n const syncConfig = pluginConfig?.sync?.find(\n (sync) => sync.stripeResourceTypeSingular === resourceType,\n )\n\n if (syncConfig) {\n switch (method) {\n case 'created': {\n await handleCreatedOrUpdated({\n ...args,\n pluginConfig,\n resourceType,\n syncConfig,\n })\n break\n }\n case 'deleted': {\n await handleDeleted({\n ...args,\n pluginConfig,\n resourceType,\n syncConfig,\n })\n break\n }\n case 'updated': {\n await handleCreatedOrUpdated({\n ...args,\n pluginConfig,\n resourceType,\n syncConfig,\n })\n break\n }\n default: {\n break\n }\n }\n }\n}\n"],"names":["handleCreatedOrUpdated","handleDeleted","handleWebhooks","args","event","payload","pluginConfig","logs","logger","info","type","id","resourceType","split","method","pop","syncConfig","sync","find","stripeResourceTypeSingular"],"mappings":"AAEA,SAASA,sBAAsB,QAAQ,8BAA6B;AACpE,SAASC,aAAa,QAAQ,qBAAoB;AAElD,OAAO,MAAMC,iBAAuC,OAAOC;IACzD,MAAM,EAAEC,KAAK,EAAEC,OAAO,EAAEC,YAAY,EAAE,GAAGH;IAEzC,IAAIG,cAAcC,MAAM;QACtBF,QAAQG,MAAM,CAACC,IAAI,CAAC,CAAC,oBAAoB,EAAEL,MAAMM,IAAI,CAAC,0BAA0B,EAAEN,MAAMO,EAAE,CAAC,EAAE,CAAC;IAChG;IAEA,+FAA+F;IAC/F,6DAA6D;IAC7D,MAAMC,eAAeR,MAAMM,IAAI,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,MAAMC,SAASV,MAAMM,IAAI,CAACG,KAAK,CAAC,KAAKE,GAAG;IAExC,MAAMC,aAAaV,cAAcW,MAAMC,KACrC,CAACD,OAASA,KAAKE,0BAA0B,KAAKP;IAGhD,IAAII,YAAY;QACd,OAAQF;YACN,KAAK;gBAAW;oBACd,MAAMd,uBAAuB;wBAC3B,GAAGG,IAAI;wBACPG;wBACAM;wBACAI;oBACF;oBACA;gBACF;YACA,KAAK;gBAAW;oBACd,MAAMf,cAAc;wBAClB,GAAGE,IAAI;wBACPG;wBACAM;wBACAI;oBACF;oBACA;gBACF;YACA,KAAK;gBAAW;oBACd,MAAMhB,uBAAuB;wBAC3B,GAAGG,IAAI;wBACPG;wBACAM;wBACAI;oBACF;oBACA;gBACF;YACA;gBAAS;oBACP;gBACF;QACF;IACF;AACF,EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/plugin-stripe",
3
- "version": "3.83.0-internal.06ac84e",
3
+ "version": "3.83.0-internal.86b7bfb",
4
4
  "description": "Stripe plugin for Payload",
5
5
  "keywords": [
6
6
  "payload",
@@ -54,21 +54,20 @@
54
54
  "dependencies": {
55
55
  "lodash.get": "^4.4.2",
56
56
  "stripe": "^10.2.0",
57
- "uuid": "10.0.0",
58
- "@payloadcms/ui": "3.83.0-internal.06ac84e",
59
- "@payloadcms/translations": "3.83.0-internal.06ac84e"
57
+ "uuid": "11.1.0",
58
+ "@payloadcms/translations": "3.83.0-internal.86b7bfb",
59
+ "@payloadcms/ui": "3.83.0-internal.86b7bfb"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/lodash.get": "^4.4.7",
63
63
  "@types/react": "19.2.9",
64
64
  "@types/react-dom": "19.2.3",
65
- "@types/uuid": "10.0.0",
66
65
  "@payloadcms/eslint-config": "3.28.0",
67
- "@payloadcms/next": "3.83.0-internal.06ac84e",
68
- "payload": "3.83.0-internal.06ac84e"
66
+ "payload": "3.83.0-internal.86b7bfb",
67
+ "@payloadcms/next": "3.83.0-internal.86b7bfb"
69
68
  },
70
69
  "peerDependencies": {
71
- "payload": "3.83.0-internal.06ac84e"
70
+ "payload": "3.83.0-internal.86b7bfb"
72
71
  },
73
72
  "publishConfig": {
74
73
  "registry": "https://registry.npmjs.org/"