1
1
import { Webhook , WebhookVerificationError as _WebhookVerificationError } from "standardwebhooks"
2
+
2
3
import {
3
4
WebhookBenefitCreatedPayload$inboundSchema
4
- } from '../models/components/webhookbenefitcreatedpayload.js'
5
- import { WebhookBenefitGrantCreatedPayload$inboundSchema } from "../models/components/webhookbenefitgrantcreatedpayload.js" ;
6
- import { WebhookBenefitGrantRevokedPayload$inboundSchema } from "../models/components/webhookbenefitgrantrevokedpayload.js" ;
7
- import { WebhookBenefitGrantUpdatedPayload$inboundSchema } from "../models/components/webhookbenefitgrantupdatedpayload.js" ;
8
- import { WebhookBenefitUpdatedPayload$inboundSchema } from "../models/components/webhookbenefitupdatedpayload.js" ;
9
- import { WebhookCheckoutCreatedPayload$inboundSchema } from "../models/components/webhookcheckoutcreatedpayload.js" ;
10
- import { WebhookCheckoutUpdatedPayload$inboundSchema } from "../models/components/webhookcheckoutupdatedpayload.js" ;
11
- import { WebhookOrderCreatedPayload$inboundSchema } from "../models/components/webhookordercreatedpayload.js" ;
12
- import { WebhookOrganizationUpdatedPayload$inboundSchema } from "../models/components/webhookorganizationupdatedpayload.js" ;
13
- import { WebhookPledgeCreatedPayload$inboundSchema } from "../models/components/webhookpledgecreatedpayload.js" ;
14
- import { WebhookPledgeUpdatedPayload$inboundSchema } from "../models/components/webhookpledgeupdatedpayload.js" ;
15
- import { WebhookProductCreatedPayload$inboundSchema } from "../models/components/webhookproductcreatedpayload.js" ;
16
- import { WebhookProductUpdatedPayload$inboundSchema } from "../models/components/webhookproductupdatedpayload.js" ;
17
- import { WebhookSubscriptionActivePayload$inboundSchema } from "../models/components/webhooksubscriptionactivepayload.js" ;
18
- import { WebhookSubscriptionCanceledPayload$inboundSchema } from "../models/components/webhooksubscriptioncanceledpayload.js" ;
19
- import { WebhookSubscriptionCreatedPayload$inboundSchema } from "../models/components/webhooksubscriptioncreatedpayload.js" ;
20
- import { WebhookSubscriptionRevokedPayload$inboundSchema } from "../models/components/webhooksubscriptionrevokedpayload.js" ;
21
- import { WebhookSubscriptionUpdatedPayload$inboundSchema } from "../models/components/webhooksubscriptionupdatedpayload.js" ;
22
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js" ;
5
+ } from './models/components/webhookbenefitcreatedpayload.js'
6
+ import { WebhookBenefitGrantCreatedPayload$inboundSchema } from "./models/components/webhookbenefitgrantcreatedpayload.js" ;
7
+ import { WebhookBenefitGrantRevokedPayload$inboundSchema } from "./models/components/webhookbenefitgrantrevokedpayload.js" ;
8
+ import { WebhookBenefitGrantUpdatedPayload$inboundSchema } from "./models/components/webhookbenefitgrantupdatedpayload.js" ;
9
+ import { WebhookBenefitUpdatedPayload$inboundSchema } from "./models/components/webhookbenefitupdatedpayload.js" ;
10
+ import { WebhookCheckoutCreatedPayload$inboundSchema } from "./models/components/webhookcheckoutcreatedpayload.js" ;
11
+ import { WebhookCheckoutUpdatedPayload$inboundSchema } from "./models/components/webhookcheckoutupdatedpayload.js" ;
12
+ import { WebhookOrderCreatedPayload$inboundSchema } from "./models/components/webhookordercreatedpayload.js" ;
13
+ import { WebhookOrderRefundedPayload$inboundSchema } from "./models/components/webhookorderrefundedpayload.js" ;
14
+ import { WebhookOrganizationUpdatedPayload$inboundSchema } from "./models/components/webhookorganizationupdatedpayload.js" ;
15
+ import { WebhookPledgeCreatedPayload$inboundSchema } from "./models/components/webhookpledgecreatedpayload.js" ;
16
+ import { WebhookPledgeUpdatedPayload$inboundSchema } from "./models/components/webhookpledgeupdatedpayload.js" ;
17
+ import { WebhookProductCreatedPayload$inboundSchema } from "./models/components/webhookproductcreatedpayload.js" ;
18
+ import { WebhookProductUpdatedPayload$inboundSchema } from "./models/components/webhookproductupdatedpayload.js" ;
19
+ import { WebhookRefundCreatedPayload$inboundSchema } from "./models/components/webhookrefundcreatedpayload.js" ;
20
+ import { WebhookRefundUpdatedPayload$inboundSchema } from "./models/components/webhookrefundupdatedpayload.js" ;
21
+ import { WebhookSubscriptionActivePayload$inboundSchema } from "./models/components/webhooksubscriptionactivepayload.js" ;
22
+ import { WebhookSubscriptionCanceledPayload$inboundSchema } from "./models/components/webhooksubscriptioncanceledpayload.js" ;
23
+ import { WebhookSubscriptionCreatedPayload$inboundSchema } from "./models/components/webhooksubscriptioncreatedpayload.js" ;
24
+ import { WebhookSubscriptionRevokedPayload$inboundSchema } from "./models/components/webhooksubscriptionrevokedpayload.js" ;
25
+ import { WebhookSubscriptionUncanceledPayload$inboundSchema } from "./models/components/webhooksubscriptionuncanceledpayload.js" ;
26
+ import { WebhookSubscriptionUpdatedPayload$inboundSchema } from "./models/components/webhooksubscriptionupdatedpayload.js" ;
27
+ import { SDKValidationError } from "./models/errors/sdkvalidationerror.js" ;
23
28
24
29
25
30
class WebhookVerificationError extends Error {
@@ -48,6 +53,8 @@ const parseEvent = (parsed: any) => {
48
53
return WebhookCheckoutUpdatedPayload$inboundSchema . parse ( parsed ) ;
49
54
case 'order.created' :
50
55
return WebhookOrderCreatedPayload$inboundSchema . parse ( parsed ) ;
56
+ case 'order.refunded' :
57
+ return WebhookOrderRefundedPayload$inboundSchema . parse ( parsed ) ;
51
58
case 'organization.updated' :
52
59
return WebhookOrganizationUpdatedPayload$inboundSchema . parse ( parsed ) ;
53
60
case 'pledge.created' :
@@ -58,6 +65,10 @@ const parseEvent = (parsed: any) => {
58
65
return WebhookProductCreatedPayload$inboundSchema . parse ( parsed ) ;
59
66
case 'product.updated' :
60
67
return WebhookProductUpdatedPayload$inboundSchema . parse ( parsed ) ;
68
+ case 'refund.created' :
69
+ return WebhookRefundCreatedPayload$inboundSchema . parse ( parsed ) ;
70
+ case 'refund.updated' :
71
+ return WebhookRefundUpdatedPayload$inboundSchema . parse ( parsed ) ;
61
72
case 'subscription.active' :
62
73
return WebhookSubscriptionActivePayload$inboundSchema . parse ( parsed ) ;
63
74
case 'subscription.canceled' :
@@ -66,6 +77,8 @@ const parseEvent = (parsed: any) => {
66
77
return WebhookSubscriptionCreatedPayload$inboundSchema . parse ( parsed ) ;
67
78
case 'subscription.revoked' :
68
79
return WebhookSubscriptionRevokedPayload$inboundSchema . parse ( parsed ) ;
80
+ case 'subscription.uncanceled' :
81
+ return WebhookSubscriptionUncanceledPayload$inboundSchema . parse ( parsed ) ;
69
82
case 'subscription.updated' :
70
83
return WebhookSubscriptionUpdatedPayload$inboundSchema . parse ( parsed ) ;
71
84
default :
0 commit comments