chargebee 3.16.0 → 3.16.2
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.
- package/CHANGELOG.md +13 -0
- package/README.md +25 -5
- package/cjs/chargebee.cjs.js +4 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/webhook/eventType.js +238 -0
- package/esm/chargebee.esm.js +2 -0
- package/esm/environment.js +1 -1
- package/esm/resources/webhook/eventType.js +235 -0
- package/package.json +1 -1
- package/types/resources/WebhookEvent.d.ts +226 -223
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
### v3.16.2 (2025-12-17)
|
|
2
|
+
* * *
|
|
3
|
+
|
|
4
|
+
### Improvements:
|
|
5
|
+
* `WebhookContentType` is now deprecated but still available for backward compatibility.
|
|
6
|
+
|
|
7
|
+
### v3.16.1 (2025-12-17)
|
|
8
|
+
* * *
|
|
9
|
+
|
|
10
|
+
### Improvements:
|
|
11
|
+
* Renamed `WebhookContentType` to `WebhookEventType` for better clarity. `WebhookContentType` is now deprecated but still available for backward compatibility.
|
|
12
|
+
* Added runtime export of `WebhookEventType` enum.
|
|
13
|
+
|
|
1
14
|
### v3.16.0 (2025-12-01)
|
|
2
15
|
* * *
|
|
3
16
|
|
package/README.md
CHANGED
|
@@ -224,18 +224,38 @@ To improve type safety and gain better autocompletion when working with webhooks
|
|
|
224
224
|
#### Example
|
|
225
225
|
|
|
226
226
|
```ts
|
|
227
|
-
import Chargebee, {
|
|
227
|
+
import Chargebee, { WebhookEventType, WebhookEvent } from "chargebee";
|
|
228
228
|
|
|
229
229
|
const result = await chargebeeInstance.event.retrieve("{event-id}");
|
|
230
|
-
const
|
|
231
|
-
const subscription =
|
|
230
|
+
const subscriptionActivatedEvent: WebhookEvent<typeof WebhookEventType.SubscriptionActivated> = result.event;
|
|
231
|
+
const subscription = subscriptionActivatedEvent.content.subscription;
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
You can also use `WebhookEventType` in switch statements for runtime event handling:
|
|
235
|
+
|
|
236
|
+
```ts
|
|
237
|
+
import { WebhookEventType, WebhookEvent } from "chargebee";
|
|
238
|
+
|
|
239
|
+
function handleWebhook(event: WebhookEvent) {
|
|
240
|
+
switch (event.event_type) {
|
|
241
|
+
case WebhookEventType.SubscriptionCreated:
|
|
242
|
+
console.log("Subscription created:", event.content.subscription?.id);
|
|
243
|
+
break;
|
|
244
|
+
case WebhookEventType.PaymentSucceeded:
|
|
245
|
+
console.log("Payment succeeded:", event.content.transaction?.id);
|
|
246
|
+
break;
|
|
247
|
+
default:
|
|
248
|
+
console.log("Unhandled event:", event.event_type);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
232
251
|
```
|
|
233
252
|
|
|
234
253
|
#### Notes
|
|
235
254
|
|
|
236
255
|
* `WebhookEvent<T>` provides type hinting for the event payload, making it easier to work with specific event structures.
|
|
237
|
-
* Use
|
|
238
|
-
*
|
|
256
|
+
* Use `WebhookEventType` to specify the exact event type (e.g., `SubscriptionCreated`, `InvoiceGenerated`, etc.).
|
|
257
|
+
* `WebhookEventType` is available at runtime, so you can use it in switch statements and comparisons.
|
|
258
|
+
* `WebhookContentType` is deprecated but still available for backward compatibility.
|
|
239
259
|
|
|
240
260
|
### Custom HTTP Client
|
|
241
261
|
|
package/cjs/chargebee.cjs.js
CHANGED
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const createChargebee_js_1 = require("./createChargebee.js");
|
|
4
4
|
const FetchClient_js_1 = require("./net/FetchClient.js");
|
|
5
|
+
const eventType_js_1 = require("./resources/webhook/eventType.js");
|
|
5
6
|
const httpClient = new FetchClient_js_1.FetchHttpClient();
|
|
6
7
|
const Chargebee = (0, createChargebee_js_1.CreateChargebee)(httpClient);
|
|
7
8
|
module.exports = Chargebee;
|
|
8
9
|
module.exports.Chargebee = Chargebee;
|
|
9
10
|
module.exports.default = Chargebee;
|
|
11
|
+
// Export webhook event types
|
|
12
|
+
module.exports.WebhookEventType = eventType_js_1.WebhookEventType;
|
|
13
|
+
module.exports.WebhookContentType = eventType_js_1.WebhookContentType;
|
package/cjs/environment.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.Environment = {
|
|
|
11
11
|
hostSuffix: '.chargebee.com',
|
|
12
12
|
apiPath: '/api/v2',
|
|
13
13
|
timeout: DEFAULT_TIME_OUT,
|
|
14
|
-
clientVersion: 'v3.16.
|
|
14
|
+
clientVersion: 'v3.16.2',
|
|
15
15
|
port: DEFAULT_PORT,
|
|
16
16
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
17
17
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebhookContentType = exports.WebhookEventType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Enum representing all possible webhook event types from Chargebee.
|
|
6
|
+
* This enum provides both compile-time type safety and runtime values.
|
|
7
|
+
*/
|
|
8
|
+
var WebhookEventType;
|
|
9
|
+
(function (WebhookEventType) {
|
|
10
|
+
WebhookEventType["AddUsagesReminder"] = "add_usages_reminder";
|
|
11
|
+
WebhookEventType["AddonCreated"] = "addon_created";
|
|
12
|
+
WebhookEventType["AddonDeleted"] = "addon_deleted";
|
|
13
|
+
WebhookEventType["AddonUpdated"] = "addon_updated";
|
|
14
|
+
WebhookEventType["AttachedItemCreated"] = "attached_item_created";
|
|
15
|
+
WebhookEventType["AttachedItemDeleted"] = "attached_item_deleted";
|
|
16
|
+
WebhookEventType["AttachedItemUpdated"] = "attached_item_updated";
|
|
17
|
+
WebhookEventType["AuthorizationSucceeded"] = "authorization_succeeded";
|
|
18
|
+
WebhookEventType["AuthorizationVoided"] = "authorization_voided";
|
|
19
|
+
WebhookEventType["BusinessEntityCreated"] = "business_entity_created";
|
|
20
|
+
WebhookEventType["BusinessEntityDeleted"] = "business_entity_deleted";
|
|
21
|
+
WebhookEventType["BusinessEntityUpdated"] = "business_entity_updated";
|
|
22
|
+
WebhookEventType["CardAdded"] = "card_added";
|
|
23
|
+
WebhookEventType["CardDeleted"] = "card_deleted";
|
|
24
|
+
WebhookEventType["CardExpired"] = "card_expired";
|
|
25
|
+
WebhookEventType["CardExpiryReminder"] = "card_expiry_reminder";
|
|
26
|
+
WebhookEventType["CardUpdated"] = "card_updated";
|
|
27
|
+
WebhookEventType["ContractTermCancelled"] = "contract_term_cancelled";
|
|
28
|
+
WebhookEventType["ContractTermCompleted"] = "contract_term_completed";
|
|
29
|
+
WebhookEventType["ContractTermCreated"] = "contract_term_created";
|
|
30
|
+
WebhookEventType["ContractTermRenewed"] = "contract_term_renewed";
|
|
31
|
+
WebhookEventType["ContractTermTerminated"] = "contract_term_terminated";
|
|
32
|
+
WebhookEventType["CouponCodesAdded"] = "coupon_codes_added";
|
|
33
|
+
WebhookEventType["CouponCodesDeleted"] = "coupon_codes_deleted";
|
|
34
|
+
WebhookEventType["CouponCodesUpdated"] = "coupon_codes_updated";
|
|
35
|
+
WebhookEventType["CouponCreated"] = "coupon_created";
|
|
36
|
+
WebhookEventType["CouponDeleted"] = "coupon_deleted";
|
|
37
|
+
WebhookEventType["CouponSetCreated"] = "coupon_set_created";
|
|
38
|
+
WebhookEventType["CouponSetDeleted"] = "coupon_set_deleted";
|
|
39
|
+
WebhookEventType["CouponSetUpdated"] = "coupon_set_updated";
|
|
40
|
+
WebhookEventType["CouponUpdated"] = "coupon_updated";
|
|
41
|
+
WebhookEventType["CreditNoteCreated"] = "credit_note_created";
|
|
42
|
+
WebhookEventType["CreditNoteCreatedWithBackdating"] = "credit_note_created_with_backdating";
|
|
43
|
+
WebhookEventType["CreditNoteDeleted"] = "credit_note_deleted";
|
|
44
|
+
WebhookEventType["CreditNoteUpdated"] = "credit_note_updated";
|
|
45
|
+
WebhookEventType["CustomerBusinessEntityChanged"] = "customer_business_entity_changed";
|
|
46
|
+
WebhookEventType["CustomerChanged"] = "customer_changed";
|
|
47
|
+
WebhookEventType["CustomerCreated"] = "customer_created";
|
|
48
|
+
WebhookEventType["CustomerDeleted"] = "customer_deleted";
|
|
49
|
+
WebhookEventType["CustomerEntitlementsUpdated"] = "customer_entitlements_updated";
|
|
50
|
+
WebhookEventType["CustomerMovedIn"] = "customer_moved_in";
|
|
51
|
+
WebhookEventType["CustomerMovedOut"] = "customer_moved_out";
|
|
52
|
+
WebhookEventType["DifferentialPriceCreated"] = "differential_price_created";
|
|
53
|
+
WebhookEventType["DifferentialPriceDeleted"] = "differential_price_deleted";
|
|
54
|
+
WebhookEventType["DifferentialPriceUpdated"] = "differential_price_updated";
|
|
55
|
+
WebhookEventType["DunningUpdated"] = "dunning_updated";
|
|
56
|
+
WebhookEventType["EntitlementOverridesAutoRemoved"] = "entitlement_overrides_auto_removed";
|
|
57
|
+
WebhookEventType["EntitlementOverridesRemoved"] = "entitlement_overrides_removed";
|
|
58
|
+
WebhookEventType["EntitlementOverridesUpdated"] = "entitlement_overrides_updated";
|
|
59
|
+
WebhookEventType["FeatureActivated"] = "feature_activated";
|
|
60
|
+
WebhookEventType["FeatureArchived"] = "feature_archived";
|
|
61
|
+
WebhookEventType["FeatureCreated"] = "feature_created";
|
|
62
|
+
WebhookEventType["FeatureDeleted"] = "feature_deleted";
|
|
63
|
+
WebhookEventType["FeatureReactivated"] = "feature_reactivated";
|
|
64
|
+
WebhookEventType["FeatureUpdated"] = "feature_updated";
|
|
65
|
+
WebhookEventType["GiftCancelled"] = "gift_cancelled";
|
|
66
|
+
WebhookEventType["GiftClaimed"] = "gift_claimed";
|
|
67
|
+
WebhookEventType["GiftExpired"] = "gift_expired";
|
|
68
|
+
WebhookEventType["GiftScheduled"] = "gift_scheduled";
|
|
69
|
+
WebhookEventType["GiftUnclaimed"] = "gift_unclaimed";
|
|
70
|
+
WebhookEventType["GiftUpdated"] = "gift_updated";
|
|
71
|
+
WebhookEventType["HierarchyCreated"] = "hierarchy_created";
|
|
72
|
+
WebhookEventType["HierarchyDeleted"] = "hierarchy_deleted";
|
|
73
|
+
WebhookEventType["InvoiceDeleted"] = "invoice_deleted";
|
|
74
|
+
WebhookEventType["InvoiceGenerated"] = "invoice_generated";
|
|
75
|
+
WebhookEventType["InvoiceGeneratedWithBackdating"] = "invoice_generated_with_backdating";
|
|
76
|
+
WebhookEventType["InvoiceUpdated"] = "invoice_updated";
|
|
77
|
+
WebhookEventType["ItemCreated"] = "item_created";
|
|
78
|
+
WebhookEventType["ItemDeleted"] = "item_deleted";
|
|
79
|
+
WebhookEventType["ItemEntitlementsRemoved"] = "item_entitlements_removed";
|
|
80
|
+
WebhookEventType["ItemEntitlementsUpdated"] = "item_entitlements_updated";
|
|
81
|
+
WebhookEventType["ItemFamilyCreated"] = "item_family_created";
|
|
82
|
+
WebhookEventType["ItemFamilyDeleted"] = "item_family_deleted";
|
|
83
|
+
WebhookEventType["ItemFamilyUpdated"] = "item_family_updated";
|
|
84
|
+
WebhookEventType["ItemPriceCreated"] = "item_price_created";
|
|
85
|
+
WebhookEventType["ItemPriceDeleted"] = "item_price_deleted";
|
|
86
|
+
WebhookEventType["ItemPriceEntitlementsRemoved"] = "item_price_entitlements_removed";
|
|
87
|
+
WebhookEventType["ItemPriceEntitlementsUpdated"] = "item_price_entitlements_updated";
|
|
88
|
+
WebhookEventType["ItemPriceUpdated"] = "item_price_updated";
|
|
89
|
+
WebhookEventType["ItemUpdated"] = "item_updated";
|
|
90
|
+
WebhookEventType["MrrUpdated"] = "mrr_updated";
|
|
91
|
+
WebhookEventType["NetdPaymentDueReminder"] = "netd_payment_due_reminder";
|
|
92
|
+
WebhookEventType["OmnichannelOneTimeOrderCreated"] = "omnichannel_one_time_order_created";
|
|
93
|
+
WebhookEventType["OmnichannelOneTimeOrderItemCancelled"] = "omnichannel_one_time_order_item_cancelled";
|
|
94
|
+
WebhookEventType["OmnichannelSubscriptionCreated"] = "omnichannel_subscription_created";
|
|
95
|
+
WebhookEventType["OmnichannelSubscriptionImported"] = "omnichannel_subscription_imported";
|
|
96
|
+
WebhookEventType["OmnichannelSubscriptionItemCancellationScheduled"] = "omnichannel_subscription_item_cancellation_scheduled";
|
|
97
|
+
WebhookEventType["OmnichannelSubscriptionItemCancelled"] = "omnichannel_subscription_item_cancelled";
|
|
98
|
+
WebhookEventType["OmnichannelSubscriptionItemChangeScheduled"] = "omnichannel_subscription_item_change_scheduled";
|
|
99
|
+
WebhookEventType["OmnichannelSubscriptionItemChanged"] = "omnichannel_subscription_item_changed";
|
|
100
|
+
WebhookEventType["OmnichannelSubscriptionItemDowngradeScheduled"] = "omnichannel_subscription_item_downgrade_scheduled";
|
|
101
|
+
WebhookEventType["OmnichannelSubscriptionItemDowngraded"] = "omnichannel_subscription_item_downgraded";
|
|
102
|
+
WebhookEventType["OmnichannelSubscriptionItemDunningExpired"] = "omnichannel_subscription_item_dunning_expired";
|
|
103
|
+
WebhookEventType["OmnichannelSubscriptionItemDunningStarted"] = "omnichannel_subscription_item_dunning_started";
|
|
104
|
+
WebhookEventType["OmnichannelSubscriptionItemExpired"] = "omnichannel_subscription_item_expired";
|
|
105
|
+
WebhookEventType["OmnichannelSubscriptionItemGracePeriodExpired"] = "omnichannel_subscription_item_grace_period_expired";
|
|
106
|
+
WebhookEventType["OmnichannelSubscriptionItemGracePeriodStarted"] = "omnichannel_subscription_item_grace_period_started";
|
|
107
|
+
WebhookEventType["OmnichannelSubscriptionItemPauseScheduled"] = "omnichannel_subscription_item_pause_scheduled";
|
|
108
|
+
WebhookEventType["OmnichannelSubscriptionItemPaused"] = "omnichannel_subscription_item_paused";
|
|
109
|
+
WebhookEventType["OmnichannelSubscriptionItemReactivated"] = "omnichannel_subscription_item_reactivated";
|
|
110
|
+
WebhookEventType["OmnichannelSubscriptionItemRenewed"] = "omnichannel_subscription_item_renewed";
|
|
111
|
+
WebhookEventType["OmnichannelSubscriptionItemResubscribed"] = "omnichannel_subscription_item_resubscribed";
|
|
112
|
+
WebhookEventType["OmnichannelSubscriptionItemResumed"] = "omnichannel_subscription_item_resumed";
|
|
113
|
+
WebhookEventType["OmnichannelSubscriptionItemScheduledCancellationRemoved"] = "omnichannel_subscription_item_scheduled_cancellation_removed";
|
|
114
|
+
WebhookEventType["OmnichannelSubscriptionItemScheduledChangeRemoved"] = "omnichannel_subscription_item_scheduled_change_removed";
|
|
115
|
+
WebhookEventType["OmnichannelSubscriptionItemScheduledDowngradeRemoved"] = "omnichannel_subscription_item_scheduled_downgrade_removed";
|
|
116
|
+
WebhookEventType["OmnichannelSubscriptionItemUpgraded"] = "omnichannel_subscription_item_upgraded";
|
|
117
|
+
WebhookEventType["OmnichannelSubscriptionMovedIn"] = "omnichannel_subscription_moved_in";
|
|
118
|
+
WebhookEventType["OmnichannelTransactionCreated"] = "omnichannel_transaction_created";
|
|
119
|
+
WebhookEventType["OrderCancelled"] = "order_cancelled";
|
|
120
|
+
WebhookEventType["OrderCreated"] = "order_created";
|
|
121
|
+
WebhookEventType["OrderDeleted"] = "order_deleted";
|
|
122
|
+
WebhookEventType["OrderDelivered"] = "order_delivered";
|
|
123
|
+
WebhookEventType["OrderReadyToProcess"] = "order_ready_to_process";
|
|
124
|
+
WebhookEventType["OrderReadyToShip"] = "order_ready_to_ship";
|
|
125
|
+
WebhookEventType["OrderResent"] = "order_resent";
|
|
126
|
+
WebhookEventType["OrderReturned"] = "order_returned";
|
|
127
|
+
WebhookEventType["OrderUpdated"] = "order_updated";
|
|
128
|
+
WebhookEventType["PaymentFailed"] = "payment_failed";
|
|
129
|
+
WebhookEventType["PaymentInitiated"] = "payment_initiated";
|
|
130
|
+
WebhookEventType["PaymentIntentCreated"] = "payment_intent_created";
|
|
131
|
+
WebhookEventType["PaymentIntentUpdated"] = "payment_intent_updated";
|
|
132
|
+
WebhookEventType["PaymentRefunded"] = "payment_refunded";
|
|
133
|
+
WebhookEventType["PaymentScheduleSchemeCreated"] = "payment_schedule_scheme_created";
|
|
134
|
+
WebhookEventType["PaymentScheduleSchemeDeleted"] = "payment_schedule_scheme_deleted";
|
|
135
|
+
WebhookEventType["PaymentSchedulesCreated"] = "payment_schedules_created";
|
|
136
|
+
WebhookEventType["PaymentSchedulesUpdated"] = "payment_schedules_updated";
|
|
137
|
+
WebhookEventType["PaymentSourceAdded"] = "payment_source_added";
|
|
138
|
+
WebhookEventType["PaymentSourceDeleted"] = "payment_source_deleted";
|
|
139
|
+
WebhookEventType["PaymentSourceExpired"] = "payment_source_expired";
|
|
140
|
+
WebhookEventType["PaymentSourceExpiring"] = "payment_source_expiring";
|
|
141
|
+
WebhookEventType["PaymentSourceLocallyDeleted"] = "payment_source_locally_deleted";
|
|
142
|
+
WebhookEventType["PaymentSourceUpdated"] = "payment_source_updated";
|
|
143
|
+
WebhookEventType["PaymentSucceeded"] = "payment_succeeded";
|
|
144
|
+
WebhookEventType["PendingInvoiceCreated"] = "pending_invoice_created";
|
|
145
|
+
WebhookEventType["PendingInvoiceUpdated"] = "pending_invoice_updated";
|
|
146
|
+
WebhookEventType["PlanCreated"] = "plan_created";
|
|
147
|
+
WebhookEventType["PlanDeleted"] = "plan_deleted";
|
|
148
|
+
WebhookEventType["PlanUpdated"] = "plan_updated";
|
|
149
|
+
WebhookEventType["PriceVariantCreated"] = "price_variant_created";
|
|
150
|
+
WebhookEventType["PriceVariantDeleted"] = "price_variant_deleted";
|
|
151
|
+
WebhookEventType["PriceVariantUpdated"] = "price_variant_updated";
|
|
152
|
+
WebhookEventType["ProductCreated"] = "product_created";
|
|
153
|
+
WebhookEventType["ProductDeleted"] = "product_deleted";
|
|
154
|
+
WebhookEventType["ProductUpdated"] = "product_updated";
|
|
155
|
+
WebhookEventType["PromotionalCreditsAdded"] = "promotional_credits_added";
|
|
156
|
+
WebhookEventType["PromotionalCreditsDeducted"] = "promotional_credits_deducted";
|
|
157
|
+
WebhookEventType["PurchaseCreated"] = "purchase_created";
|
|
158
|
+
WebhookEventType["QuoteCreated"] = "quote_created";
|
|
159
|
+
WebhookEventType["QuoteDeleted"] = "quote_deleted";
|
|
160
|
+
WebhookEventType["QuoteUpdated"] = "quote_updated";
|
|
161
|
+
WebhookEventType["RecordPurchaseFailed"] = "record_purchase_failed";
|
|
162
|
+
WebhookEventType["RefundInitiated"] = "refund_initiated";
|
|
163
|
+
WebhookEventType["RuleCreated"] = "rule_created";
|
|
164
|
+
WebhookEventType["RuleDeleted"] = "rule_deleted";
|
|
165
|
+
WebhookEventType["RuleUpdated"] = "rule_updated";
|
|
166
|
+
WebhookEventType["SalesOrderCreated"] = "sales_order_created";
|
|
167
|
+
WebhookEventType["SalesOrderUpdated"] = "sales_order_updated";
|
|
168
|
+
WebhookEventType["SubscriptionActivated"] = "subscription_activated";
|
|
169
|
+
WebhookEventType["SubscriptionActivatedWithBackdating"] = "subscription_activated_with_backdating";
|
|
170
|
+
WebhookEventType["SubscriptionAdvanceInvoiceScheduleAdded"] = "subscription_advance_invoice_schedule_added";
|
|
171
|
+
WebhookEventType["SubscriptionAdvanceInvoiceScheduleRemoved"] = "subscription_advance_invoice_schedule_removed";
|
|
172
|
+
WebhookEventType["SubscriptionAdvanceInvoiceScheduleUpdated"] = "subscription_advance_invoice_schedule_updated";
|
|
173
|
+
WebhookEventType["SubscriptionBusinessEntityChanged"] = "subscription_business_entity_changed";
|
|
174
|
+
WebhookEventType["SubscriptionCanceledWithBackdating"] = "subscription_canceled_with_backdating";
|
|
175
|
+
WebhookEventType["SubscriptionCancellationReminder"] = "subscription_cancellation_reminder";
|
|
176
|
+
WebhookEventType["SubscriptionCancellationScheduled"] = "subscription_cancellation_scheduled";
|
|
177
|
+
WebhookEventType["SubscriptionCancelled"] = "subscription_cancelled";
|
|
178
|
+
WebhookEventType["SubscriptionChanged"] = "subscription_changed";
|
|
179
|
+
WebhookEventType["SubscriptionChangedWithBackdating"] = "subscription_changed_with_backdating";
|
|
180
|
+
WebhookEventType["SubscriptionChangesScheduled"] = "subscription_changes_scheduled";
|
|
181
|
+
WebhookEventType["SubscriptionCreated"] = "subscription_created";
|
|
182
|
+
WebhookEventType["SubscriptionCreatedWithBackdating"] = "subscription_created_with_backdating";
|
|
183
|
+
WebhookEventType["SubscriptionDeleted"] = "subscription_deleted";
|
|
184
|
+
WebhookEventType["SubscriptionEntitlementsCreated"] = "subscription_entitlements_created";
|
|
185
|
+
WebhookEventType["SubscriptionEntitlementsUpdated"] = "subscription_entitlements_updated";
|
|
186
|
+
WebhookEventType["SubscriptionItemsRenewed"] = "subscription_items_renewed";
|
|
187
|
+
WebhookEventType["SubscriptionMovedIn"] = "subscription_moved_in";
|
|
188
|
+
WebhookEventType["SubscriptionMovedOut"] = "subscription_moved_out";
|
|
189
|
+
WebhookEventType["SubscriptionMovementFailed"] = "subscription_movement_failed";
|
|
190
|
+
WebhookEventType["SubscriptionPauseScheduled"] = "subscription_pause_scheduled";
|
|
191
|
+
WebhookEventType["SubscriptionPaused"] = "subscription_paused";
|
|
192
|
+
WebhookEventType["SubscriptionRampApplied"] = "subscription_ramp_applied";
|
|
193
|
+
WebhookEventType["SubscriptionRampCreated"] = "subscription_ramp_created";
|
|
194
|
+
WebhookEventType["SubscriptionRampDeleted"] = "subscription_ramp_deleted";
|
|
195
|
+
WebhookEventType["SubscriptionRampDrafted"] = "subscription_ramp_drafted";
|
|
196
|
+
WebhookEventType["SubscriptionRampUpdated"] = "subscription_ramp_updated";
|
|
197
|
+
WebhookEventType["SubscriptionReactivated"] = "subscription_reactivated";
|
|
198
|
+
WebhookEventType["SubscriptionReactivatedWithBackdating"] = "subscription_reactivated_with_backdating";
|
|
199
|
+
WebhookEventType["SubscriptionRenewalReminder"] = "subscription_renewal_reminder";
|
|
200
|
+
WebhookEventType["SubscriptionRenewed"] = "subscription_renewed";
|
|
201
|
+
WebhookEventType["SubscriptionResumed"] = "subscription_resumed";
|
|
202
|
+
WebhookEventType["SubscriptionResumptionScheduled"] = "subscription_resumption_scheduled";
|
|
203
|
+
WebhookEventType["SubscriptionScheduledCancellationRemoved"] = "subscription_scheduled_cancellation_removed";
|
|
204
|
+
WebhookEventType["SubscriptionScheduledChangesRemoved"] = "subscription_scheduled_changes_removed";
|
|
205
|
+
WebhookEventType["SubscriptionScheduledPauseRemoved"] = "subscription_scheduled_pause_removed";
|
|
206
|
+
WebhookEventType["SubscriptionScheduledResumptionRemoved"] = "subscription_scheduled_resumption_removed";
|
|
207
|
+
WebhookEventType["SubscriptionShippingAddressUpdated"] = "subscription_shipping_address_updated";
|
|
208
|
+
WebhookEventType["SubscriptionStarted"] = "subscription_started";
|
|
209
|
+
WebhookEventType["SubscriptionTrialEndReminder"] = "subscription_trial_end_reminder";
|
|
210
|
+
WebhookEventType["SubscriptionTrialExtended"] = "subscription_trial_extended";
|
|
211
|
+
WebhookEventType["TaxWithheldDeleted"] = "tax_withheld_deleted";
|
|
212
|
+
WebhookEventType["TaxWithheldRecorded"] = "tax_withheld_recorded";
|
|
213
|
+
WebhookEventType["TaxWithheldRefunded"] = "tax_withheld_refunded";
|
|
214
|
+
WebhookEventType["TokenConsumed"] = "token_consumed";
|
|
215
|
+
WebhookEventType["TokenCreated"] = "token_created";
|
|
216
|
+
WebhookEventType["TokenExpired"] = "token_expired";
|
|
217
|
+
WebhookEventType["TransactionCreated"] = "transaction_created";
|
|
218
|
+
WebhookEventType["TransactionDeleted"] = "transaction_deleted";
|
|
219
|
+
WebhookEventType["TransactionUpdated"] = "transaction_updated";
|
|
220
|
+
WebhookEventType["UnbilledChargesCreated"] = "unbilled_charges_created";
|
|
221
|
+
WebhookEventType["UnbilledChargesDeleted"] = "unbilled_charges_deleted";
|
|
222
|
+
WebhookEventType["UnbilledChargesInvoiced"] = "unbilled_charges_invoiced";
|
|
223
|
+
WebhookEventType["UnbilledChargesVoided"] = "unbilled_charges_voided";
|
|
224
|
+
WebhookEventType["UsageFileIngested"] = "usage_file_ingested";
|
|
225
|
+
WebhookEventType["VariantCreated"] = "variant_created";
|
|
226
|
+
WebhookEventType["VariantDeleted"] = "variant_deleted";
|
|
227
|
+
WebhookEventType["VariantUpdated"] = "variant_updated";
|
|
228
|
+
WebhookEventType["VirtualBankAccountAdded"] = "virtual_bank_account_added";
|
|
229
|
+
WebhookEventType["VirtualBankAccountDeleted"] = "virtual_bank_account_deleted";
|
|
230
|
+
WebhookEventType["VirtualBankAccountUpdated"] = "virtual_bank_account_updated";
|
|
231
|
+
WebhookEventType["VoucherCreateFailed"] = "voucher_create_failed";
|
|
232
|
+
WebhookEventType["VoucherCreated"] = "voucher_created";
|
|
233
|
+
WebhookEventType["VoucherExpired"] = "voucher_expired";
|
|
234
|
+
})(WebhookEventType || (exports.WebhookEventType = WebhookEventType = {}));
|
|
235
|
+
/**
|
|
236
|
+
* @deprecated Use WebhookEventType instead.
|
|
237
|
+
*/
|
|
238
|
+
exports.WebhookContentType = WebhookEventType;
|
package/esm/chargebee.esm.js
CHANGED
|
@@ -3,3 +3,5 @@ import { FetchHttpClient } from './net/FetchClient.js';
|
|
|
3
3
|
const httpClient = new FetchHttpClient();
|
|
4
4
|
const Chargebee = CreateChargebee(httpClient);
|
|
5
5
|
export default Chargebee;
|
|
6
|
+
// Export webhook event types
|
|
7
|
+
export { WebhookEventType, WebhookContentType, } from './resources/webhook/eventType.js';
|
package/esm/environment.js
CHANGED
|
@@ -8,7 +8,7 @@ export const Environment = {
|
|
|
8
8
|
hostSuffix: '.chargebee.com',
|
|
9
9
|
apiPath: '/api/v2',
|
|
10
10
|
timeout: DEFAULT_TIME_OUT,
|
|
11
|
-
clientVersion: 'v3.16.
|
|
11
|
+
clientVersion: 'v3.16.2',
|
|
12
12
|
port: DEFAULT_PORT,
|
|
13
13
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
14
14
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum representing all possible webhook event types from Chargebee.
|
|
3
|
+
* This enum provides both compile-time type safety and runtime values.
|
|
4
|
+
*/
|
|
5
|
+
export var WebhookEventType;
|
|
6
|
+
(function (WebhookEventType) {
|
|
7
|
+
WebhookEventType["AddUsagesReminder"] = "add_usages_reminder";
|
|
8
|
+
WebhookEventType["AddonCreated"] = "addon_created";
|
|
9
|
+
WebhookEventType["AddonDeleted"] = "addon_deleted";
|
|
10
|
+
WebhookEventType["AddonUpdated"] = "addon_updated";
|
|
11
|
+
WebhookEventType["AttachedItemCreated"] = "attached_item_created";
|
|
12
|
+
WebhookEventType["AttachedItemDeleted"] = "attached_item_deleted";
|
|
13
|
+
WebhookEventType["AttachedItemUpdated"] = "attached_item_updated";
|
|
14
|
+
WebhookEventType["AuthorizationSucceeded"] = "authorization_succeeded";
|
|
15
|
+
WebhookEventType["AuthorizationVoided"] = "authorization_voided";
|
|
16
|
+
WebhookEventType["BusinessEntityCreated"] = "business_entity_created";
|
|
17
|
+
WebhookEventType["BusinessEntityDeleted"] = "business_entity_deleted";
|
|
18
|
+
WebhookEventType["BusinessEntityUpdated"] = "business_entity_updated";
|
|
19
|
+
WebhookEventType["CardAdded"] = "card_added";
|
|
20
|
+
WebhookEventType["CardDeleted"] = "card_deleted";
|
|
21
|
+
WebhookEventType["CardExpired"] = "card_expired";
|
|
22
|
+
WebhookEventType["CardExpiryReminder"] = "card_expiry_reminder";
|
|
23
|
+
WebhookEventType["CardUpdated"] = "card_updated";
|
|
24
|
+
WebhookEventType["ContractTermCancelled"] = "contract_term_cancelled";
|
|
25
|
+
WebhookEventType["ContractTermCompleted"] = "contract_term_completed";
|
|
26
|
+
WebhookEventType["ContractTermCreated"] = "contract_term_created";
|
|
27
|
+
WebhookEventType["ContractTermRenewed"] = "contract_term_renewed";
|
|
28
|
+
WebhookEventType["ContractTermTerminated"] = "contract_term_terminated";
|
|
29
|
+
WebhookEventType["CouponCodesAdded"] = "coupon_codes_added";
|
|
30
|
+
WebhookEventType["CouponCodesDeleted"] = "coupon_codes_deleted";
|
|
31
|
+
WebhookEventType["CouponCodesUpdated"] = "coupon_codes_updated";
|
|
32
|
+
WebhookEventType["CouponCreated"] = "coupon_created";
|
|
33
|
+
WebhookEventType["CouponDeleted"] = "coupon_deleted";
|
|
34
|
+
WebhookEventType["CouponSetCreated"] = "coupon_set_created";
|
|
35
|
+
WebhookEventType["CouponSetDeleted"] = "coupon_set_deleted";
|
|
36
|
+
WebhookEventType["CouponSetUpdated"] = "coupon_set_updated";
|
|
37
|
+
WebhookEventType["CouponUpdated"] = "coupon_updated";
|
|
38
|
+
WebhookEventType["CreditNoteCreated"] = "credit_note_created";
|
|
39
|
+
WebhookEventType["CreditNoteCreatedWithBackdating"] = "credit_note_created_with_backdating";
|
|
40
|
+
WebhookEventType["CreditNoteDeleted"] = "credit_note_deleted";
|
|
41
|
+
WebhookEventType["CreditNoteUpdated"] = "credit_note_updated";
|
|
42
|
+
WebhookEventType["CustomerBusinessEntityChanged"] = "customer_business_entity_changed";
|
|
43
|
+
WebhookEventType["CustomerChanged"] = "customer_changed";
|
|
44
|
+
WebhookEventType["CustomerCreated"] = "customer_created";
|
|
45
|
+
WebhookEventType["CustomerDeleted"] = "customer_deleted";
|
|
46
|
+
WebhookEventType["CustomerEntitlementsUpdated"] = "customer_entitlements_updated";
|
|
47
|
+
WebhookEventType["CustomerMovedIn"] = "customer_moved_in";
|
|
48
|
+
WebhookEventType["CustomerMovedOut"] = "customer_moved_out";
|
|
49
|
+
WebhookEventType["DifferentialPriceCreated"] = "differential_price_created";
|
|
50
|
+
WebhookEventType["DifferentialPriceDeleted"] = "differential_price_deleted";
|
|
51
|
+
WebhookEventType["DifferentialPriceUpdated"] = "differential_price_updated";
|
|
52
|
+
WebhookEventType["DunningUpdated"] = "dunning_updated";
|
|
53
|
+
WebhookEventType["EntitlementOverridesAutoRemoved"] = "entitlement_overrides_auto_removed";
|
|
54
|
+
WebhookEventType["EntitlementOverridesRemoved"] = "entitlement_overrides_removed";
|
|
55
|
+
WebhookEventType["EntitlementOverridesUpdated"] = "entitlement_overrides_updated";
|
|
56
|
+
WebhookEventType["FeatureActivated"] = "feature_activated";
|
|
57
|
+
WebhookEventType["FeatureArchived"] = "feature_archived";
|
|
58
|
+
WebhookEventType["FeatureCreated"] = "feature_created";
|
|
59
|
+
WebhookEventType["FeatureDeleted"] = "feature_deleted";
|
|
60
|
+
WebhookEventType["FeatureReactivated"] = "feature_reactivated";
|
|
61
|
+
WebhookEventType["FeatureUpdated"] = "feature_updated";
|
|
62
|
+
WebhookEventType["GiftCancelled"] = "gift_cancelled";
|
|
63
|
+
WebhookEventType["GiftClaimed"] = "gift_claimed";
|
|
64
|
+
WebhookEventType["GiftExpired"] = "gift_expired";
|
|
65
|
+
WebhookEventType["GiftScheduled"] = "gift_scheduled";
|
|
66
|
+
WebhookEventType["GiftUnclaimed"] = "gift_unclaimed";
|
|
67
|
+
WebhookEventType["GiftUpdated"] = "gift_updated";
|
|
68
|
+
WebhookEventType["HierarchyCreated"] = "hierarchy_created";
|
|
69
|
+
WebhookEventType["HierarchyDeleted"] = "hierarchy_deleted";
|
|
70
|
+
WebhookEventType["InvoiceDeleted"] = "invoice_deleted";
|
|
71
|
+
WebhookEventType["InvoiceGenerated"] = "invoice_generated";
|
|
72
|
+
WebhookEventType["InvoiceGeneratedWithBackdating"] = "invoice_generated_with_backdating";
|
|
73
|
+
WebhookEventType["InvoiceUpdated"] = "invoice_updated";
|
|
74
|
+
WebhookEventType["ItemCreated"] = "item_created";
|
|
75
|
+
WebhookEventType["ItemDeleted"] = "item_deleted";
|
|
76
|
+
WebhookEventType["ItemEntitlementsRemoved"] = "item_entitlements_removed";
|
|
77
|
+
WebhookEventType["ItemEntitlementsUpdated"] = "item_entitlements_updated";
|
|
78
|
+
WebhookEventType["ItemFamilyCreated"] = "item_family_created";
|
|
79
|
+
WebhookEventType["ItemFamilyDeleted"] = "item_family_deleted";
|
|
80
|
+
WebhookEventType["ItemFamilyUpdated"] = "item_family_updated";
|
|
81
|
+
WebhookEventType["ItemPriceCreated"] = "item_price_created";
|
|
82
|
+
WebhookEventType["ItemPriceDeleted"] = "item_price_deleted";
|
|
83
|
+
WebhookEventType["ItemPriceEntitlementsRemoved"] = "item_price_entitlements_removed";
|
|
84
|
+
WebhookEventType["ItemPriceEntitlementsUpdated"] = "item_price_entitlements_updated";
|
|
85
|
+
WebhookEventType["ItemPriceUpdated"] = "item_price_updated";
|
|
86
|
+
WebhookEventType["ItemUpdated"] = "item_updated";
|
|
87
|
+
WebhookEventType["MrrUpdated"] = "mrr_updated";
|
|
88
|
+
WebhookEventType["NetdPaymentDueReminder"] = "netd_payment_due_reminder";
|
|
89
|
+
WebhookEventType["OmnichannelOneTimeOrderCreated"] = "omnichannel_one_time_order_created";
|
|
90
|
+
WebhookEventType["OmnichannelOneTimeOrderItemCancelled"] = "omnichannel_one_time_order_item_cancelled";
|
|
91
|
+
WebhookEventType["OmnichannelSubscriptionCreated"] = "omnichannel_subscription_created";
|
|
92
|
+
WebhookEventType["OmnichannelSubscriptionImported"] = "omnichannel_subscription_imported";
|
|
93
|
+
WebhookEventType["OmnichannelSubscriptionItemCancellationScheduled"] = "omnichannel_subscription_item_cancellation_scheduled";
|
|
94
|
+
WebhookEventType["OmnichannelSubscriptionItemCancelled"] = "omnichannel_subscription_item_cancelled";
|
|
95
|
+
WebhookEventType["OmnichannelSubscriptionItemChangeScheduled"] = "omnichannel_subscription_item_change_scheduled";
|
|
96
|
+
WebhookEventType["OmnichannelSubscriptionItemChanged"] = "omnichannel_subscription_item_changed";
|
|
97
|
+
WebhookEventType["OmnichannelSubscriptionItemDowngradeScheduled"] = "omnichannel_subscription_item_downgrade_scheduled";
|
|
98
|
+
WebhookEventType["OmnichannelSubscriptionItemDowngraded"] = "omnichannel_subscription_item_downgraded";
|
|
99
|
+
WebhookEventType["OmnichannelSubscriptionItemDunningExpired"] = "omnichannel_subscription_item_dunning_expired";
|
|
100
|
+
WebhookEventType["OmnichannelSubscriptionItemDunningStarted"] = "omnichannel_subscription_item_dunning_started";
|
|
101
|
+
WebhookEventType["OmnichannelSubscriptionItemExpired"] = "omnichannel_subscription_item_expired";
|
|
102
|
+
WebhookEventType["OmnichannelSubscriptionItemGracePeriodExpired"] = "omnichannel_subscription_item_grace_period_expired";
|
|
103
|
+
WebhookEventType["OmnichannelSubscriptionItemGracePeriodStarted"] = "omnichannel_subscription_item_grace_period_started";
|
|
104
|
+
WebhookEventType["OmnichannelSubscriptionItemPauseScheduled"] = "omnichannel_subscription_item_pause_scheduled";
|
|
105
|
+
WebhookEventType["OmnichannelSubscriptionItemPaused"] = "omnichannel_subscription_item_paused";
|
|
106
|
+
WebhookEventType["OmnichannelSubscriptionItemReactivated"] = "omnichannel_subscription_item_reactivated";
|
|
107
|
+
WebhookEventType["OmnichannelSubscriptionItemRenewed"] = "omnichannel_subscription_item_renewed";
|
|
108
|
+
WebhookEventType["OmnichannelSubscriptionItemResubscribed"] = "omnichannel_subscription_item_resubscribed";
|
|
109
|
+
WebhookEventType["OmnichannelSubscriptionItemResumed"] = "omnichannel_subscription_item_resumed";
|
|
110
|
+
WebhookEventType["OmnichannelSubscriptionItemScheduledCancellationRemoved"] = "omnichannel_subscription_item_scheduled_cancellation_removed";
|
|
111
|
+
WebhookEventType["OmnichannelSubscriptionItemScheduledChangeRemoved"] = "omnichannel_subscription_item_scheduled_change_removed";
|
|
112
|
+
WebhookEventType["OmnichannelSubscriptionItemScheduledDowngradeRemoved"] = "omnichannel_subscription_item_scheduled_downgrade_removed";
|
|
113
|
+
WebhookEventType["OmnichannelSubscriptionItemUpgraded"] = "omnichannel_subscription_item_upgraded";
|
|
114
|
+
WebhookEventType["OmnichannelSubscriptionMovedIn"] = "omnichannel_subscription_moved_in";
|
|
115
|
+
WebhookEventType["OmnichannelTransactionCreated"] = "omnichannel_transaction_created";
|
|
116
|
+
WebhookEventType["OrderCancelled"] = "order_cancelled";
|
|
117
|
+
WebhookEventType["OrderCreated"] = "order_created";
|
|
118
|
+
WebhookEventType["OrderDeleted"] = "order_deleted";
|
|
119
|
+
WebhookEventType["OrderDelivered"] = "order_delivered";
|
|
120
|
+
WebhookEventType["OrderReadyToProcess"] = "order_ready_to_process";
|
|
121
|
+
WebhookEventType["OrderReadyToShip"] = "order_ready_to_ship";
|
|
122
|
+
WebhookEventType["OrderResent"] = "order_resent";
|
|
123
|
+
WebhookEventType["OrderReturned"] = "order_returned";
|
|
124
|
+
WebhookEventType["OrderUpdated"] = "order_updated";
|
|
125
|
+
WebhookEventType["PaymentFailed"] = "payment_failed";
|
|
126
|
+
WebhookEventType["PaymentInitiated"] = "payment_initiated";
|
|
127
|
+
WebhookEventType["PaymentIntentCreated"] = "payment_intent_created";
|
|
128
|
+
WebhookEventType["PaymentIntentUpdated"] = "payment_intent_updated";
|
|
129
|
+
WebhookEventType["PaymentRefunded"] = "payment_refunded";
|
|
130
|
+
WebhookEventType["PaymentScheduleSchemeCreated"] = "payment_schedule_scheme_created";
|
|
131
|
+
WebhookEventType["PaymentScheduleSchemeDeleted"] = "payment_schedule_scheme_deleted";
|
|
132
|
+
WebhookEventType["PaymentSchedulesCreated"] = "payment_schedules_created";
|
|
133
|
+
WebhookEventType["PaymentSchedulesUpdated"] = "payment_schedules_updated";
|
|
134
|
+
WebhookEventType["PaymentSourceAdded"] = "payment_source_added";
|
|
135
|
+
WebhookEventType["PaymentSourceDeleted"] = "payment_source_deleted";
|
|
136
|
+
WebhookEventType["PaymentSourceExpired"] = "payment_source_expired";
|
|
137
|
+
WebhookEventType["PaymentSourceExpiring"] = "payment_source_expiring";
|
|
138
|
+
WebhookEventType["PaymentSourceLocallyDeleted"] = "payment_source_locally_deleted";
|
|
139
|
+
WebhookEventType["PaymentSourceUpdated"] = "payment_source_updated";
|
|
140
|
+
WebhookEventType["PaymentSucceeded"] = "payment_succeeded";
|
|
141
|
+
WebhookEventType["PendingInvoiceCreated"] = "pending_invoice_created";
|
|
142
|
+
WebhookEventType["PendingInvoiceUpdated"] = "pending_invoice_updated";
|
|
143
|
+
WebhookEventType["PlanCreated"] = "plan_created";
|
|
144
|
+
WebhookEventType["PlanDeleted"] = "plan_deleted";
|
|
145
|
+
WebhookEventType["PlanUpdated"] = "plan_updated";
|
|
146
|
+
WebhookEventType["PriceVariantCreated"] = "price_variant_created";
|
|
147
|
+
WebhookEventType["PriceVariantDeleted"] = "price_variant_deleted";
|
|
148
|
+
WebhookEventType["PriceVariantUpdated"] = "price_variant_updated";
|
|
149
|
+
WebhookEventType["ProductCreated"] = "product_created";
|
|
150
|
+
WebhookEventType["ProductDeleted"] = "product_deleted";
|
|
151
|
+
WebhookEventType["ProductUpdated"] = "product_updated";
|
|
152
|
+
WebhookEventType["PromotionalCreditsAdded"] = "promotional_credits_added";
|
|
153
|
+
WebhookEventType["PromotionalCreditsDeducted"] = "promotional_credits_deducted";
|
|
154
|
+
WebhookEventType["PurchaseCreated"] = "purchase_created";
|
|
155
|
+
WebhookEventType["QuoteCreated"] = "quote_created";
|
|
156
|
+
WebhookEventType["QuoteDeleted"] = "quote_deleted";
|
|
157
|
+
WebhookEventType["QuoteUpdated"] = "quote_updated";
|
|
158
|
+
WebhookEventType["RecordPurchaseFailed"] = "record_purchase_failed";
|
|
159
|
+
WebhookEventType["RefundInitiated"] = "refund_initiated";
|
|
160
|
+
WebhookEventType["RuleCreated"] = "rule_created";
|
|
161
|
+
WebhookEventType["RuleDeleted"] = "rule_deleted";
|
|
162
|
+
WebhookEventType["RuleUpdated"] = "rule_updated";
|
|
163
|
+
WebhookEventType["SalesOrderCreated"] = "sales_order_created";
|
|
164
|
+
WebhookEventType["SalesOrderUpdated"] = "sales_order_updated";
|
|
165
|
+
WebhookEventType["SubscriptionActivated"] = "subscription_activated";
|
|
166
|
+
WebhookEventType["SubscriptionActivatedWithBackdating"] = "subscription_activated_with_backdating";
|
|
167
|
+
WebhookEventType["SubscriptionAdvanceInvoiceScheduleAdded"] = "subscription_advance_invoice_schedule_added";
|
|
168
|
+
WebhookEventType["SubscriptionAdvanceInvoiceScheduleRemoved"] = "subscription_advance_invoice_schedule_removed";
|
|
169
|
+
WebhookEventType["SubscriptionAdvanceInvoiceScheduleUpdated"] = "subscription_advance_invoice_schedule_updated";
|
|
170
|
+
WebhookEventType["SubscriptionBusinessEntityChanged"] = "subscription_business_entity_changed";
|
|
171
|
+
WebhookEventType["SubscriptionCanceledWithBackdating"] = "subscription_canceled_with_backdating";
|
|
172
|
+
WebhookEventType["SubscriptionCancellationReminder"] = "subscription_cancellation_reminder";
|
|
173
|
+
WebhookEventType["SubscriptionCancellationScheduled"] = "subscription_cancellation_scheduled";
|
|
174
|
+
WebhookEventType["SubscriptionCancelled"] = "subscription_cancelled";
|
|
175
|
+
WebhookEventType["SubscriptionChanged"] = "subscription_changed";
|
|
176
|
+
WebhookEventType["SubscriptionChangedWithBackdating"] = "subscription_changed_with_backdating";
|
|
177
|
+
WebhookEventType["SubscriptionChangesScheduled"] = "subscription_changes_scheduled";
|
|
178
|
+
WebhookEventType["SubscriptionCreated"] = "subscription_created";
|
|
179
|
+
WebhookEventType["SubscriptionCreatedWithBackdating"] = "subscription_created_with_backdating";
|
|
180
|
+
WebhookEventType["SubscriptionDeleted"] = "subscription_deleted";
|
|
181
|
+
WebhookEventType["SubscriptionEntitlementsCreated"] = "subscription_entitlements_created";
|
|
182
|
+
WebhookEventType["SubscriptionEntitlementsUpdated"] = "subscription_entitlements_updated";
|
|
183
|
+
WebhookEventType["SubscriptionItemsRenewed"] = "subscription_items_renewed";
|
|
184
|
+
WebhookEventType["SubscriptionMovedIn"] = "subscription_moved_in";
|
|
185
|
+
WebhookEventType["SubscriptionMovedOut"] = "subscription_moved_out";
|
|
186
|
+
WebhookEventType["SubscriptionMovementFailed"] = "subscription_movement_failed";
|
|
187
|
+
WebhookEventType["SubscriptionPauseScheduled"] = "subscription_pause_scheduled";
|
|
188
|
+
WebhookEventType["SubscriptionPaused"] = "subscription_paused";
|
|
189
|
+
WebhookEventType["SubscriptionRampApplied"] = "subscription_ramp_applied";
|
|
190
|
+
WebhookEventType["SubscriptionRampCreated"] = "subscription_ramp_created";
|
|
191
|
+
WebhookEventType["SubscriptionRampDeleted"] = "subscription_ramp_deleted";
|
|
192
|
+
WebhookEventType["SubscriptionRampDrafted"] = "subscription_ramp_drafted";
|
|
193
|
+
WebhookEventType["SubscriptionRampUpdated"] = "subscription_ramp_updated";
|
|
194
|
+
WebhookEventType["SubscriptionReactivated"] = "subscription_reactivated";
|
|
195
|
+
WebhookEventType["SubscriptionReactivatedWithBackdating"] = "subscription_reactivated_with_backdating";
|
|
196
|
+
WebhookEventType["SubscriptionRenewalReminder"] = "subscription_renewal_reminder";
|
|
197
|
+
WebhookEventType["SubscriptionRenewed"] = "subscription_renewed";
|
|
198
|
+
WebhookEventType["SubscriptionResumed"] = "subscription_resumed";
|
|
199
|
+
WebhookEventType["SubscriptionResumptionScheduled"] = "subscription_resumption_scheduled";
|
|
200
|
+
WebhookEventType["SubscriptionScheduledCancellationRemoved"] = "subscription_scheduled_cancellation_removed";
|
|
201
|
+
WebhookEventType["SubscriptionScheduledChangesRemoved"] = "subscription_scheduled_changes_removed";
|
|
202
|
+
WebhookEventType["SubscriptionScheduledPauseRemoved"] = "subscription_scheduled_pause_removed";
|
|
203
|
+
WebhookEventType["SubscriptionScheduledResumptionRemoved"] = "subscription_scheduled_resumption_removed";
|
|
204
|
+
WebhookEventType["SubscriptionShippingAddressUpdated"] = "subscription_shipping_address_updated";
|
|
205
|
+
WebhookEventType["SubscriptionStarted"] = "subscription_started";
|
|
206
|
+
WebhookEventType["SubscriptionTrialEndReminder"] = "subscription_trial_end_reminder";
|
|
207
|
+
WebhookEventType["SubscriptionTrialExtended"] = "subscription_trial_extended";
|
|
208
|
+
WebhookEventType["TaxWithheldDeleted"] = "tax_withheld_deleted";
|
|
209
|
+
WebhookEventType["TaxWithheldRecorded"] = "tax_withheld_recorded";
|
|
210
|
+
WebhookEventType["TaxWithheldRefunded"] = "tax_withheld_refunded";
|
|
211
|
+
WebhookEventType["TokenConsumed"] = "token_consumed";
|
|
212
|
+
WebhookEventType["TokenCreated"] = "token_created";
|
|
213
|
+
WebhookEventType["TokenExpired"] = "token_expired";
|
|
214
|
+
WebhookEventType["TransactionCreated"] = "transaction_created";
|
|
215
|
+
WebhookEventType["TransactionDeleted"] = "transaction_deleted";
|
|
216
|
+
WebhookEventType["TransactionUpdated"] = "transaction_updated";
|
|
217
|
+
WebhookEventType["UnbilledChargesCreated"] = "unbilled_charges_created";
|
|
218
|
+
WebhookEventType["UnbilledChargesDeleted"] = "unbilled_charges_deleted";
|
|
219
|
+
WebhookEventType["UnbilledChargesInvoiced"] = "unbilled_charges_invoiced";
|
|
220
|
+
WebhookEventType["UnbilledChargesVoided"] = "unbilled_charges_voided";
|
|
221
|
+
WebhookEventType["UsageFileIngested"] = "usage_file_ingested";
|
|
222
|
+
WebhookEventType["VariantCreated"] = "variant_created";
|
|
223
|
+
WebhookEventType["VariantDeleted"] = "variant_deleted";
|
|
224
|
+
WebhookEventType["VariantUpdated"] = "variant_updated";
|
|
225
|
+
WebhookEventType["VirtualBankAccountAdded"] = "virtual_bank_account_added";
|
|
226
|
+
WebhookEventType["VirtualBankAccountDeleted"] = "virtual_bank_account_deleted";
|
|
227
|
+
WebhookEventType["VirtualBankAccountUpdated"] = "virtual_bank_account_updated";
|
|
228
|
+
WebhookEventType["VoucherCreateFailed"] = "voucher_create_failed";
|
|
229
|
+
WebhookEventType["VoucherCreated"] = "voucher_created";
|
|
230
|
+
WebhookEventType["VoucherExpired"] = "voucher_expired";
|
|
231
|
+
})(WebhookEventType || (WebhookEventType = {}));
|
|
232
|
+
/**
|
|
233
|
+
* @deprecated Use WebhookEventType instead.
|
|
234
|
+
*/
|
|
235
|
+
export const WebhookContentType = WebhookEventType;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
///<reference path='./filter.d.ts'/>
|
|
4
4
|
|
|
5
5
|
declare module 'chargebee' {
|
|
6
|
-
export enum
|
|
6
|
+
export enum WebhookEventType {
|
|
7
7
|
SubscriptionPauseScheduled = 'subscription_pause_scheduled',
|
|
8
8
|
CustomerBusinessEntityChanged = 'customer_business_entity_changed',
|
|
9
9
|
SubscriptionAdvanceInvoiceScheduleAdded = 'subscription_advance_invoice_schedule_added',
|
|
@@ -221,229 +221,232 @@ declare module 'chargebee' {
|
|
|
221
221
|
PlanUpdated = 'plan_updated',
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
+
/**
|
|
225
|
+
* @deprecated Use WebhookEventType instead.
|
|
226
|
+
*/
|
|
227
|
+
export import WebhookContentType = WebhookEventType;
|
|
228
|
+
|
|
224
229
|
export type WebhookContentMap = {
|
|
225
|
-
[
|
|
226
|
-
[
|
|
227
|
-
[
|
|
228
|
-
[
|
|
229
|
-
[
|
|
230
|
-
[
|
|
231
|
-
[
|
|
232
|
-
[
|
|
233
|
-
[
|
|
234
|
-
[
|
|
235
|
-
[
|
|
236
|
-
[
|
|
237
|
-
[
|
|
238
|
-
[
|
|
239
|
-
[
|
|
240
|
-
[
|
|
241
|
-
[
|
|
242
|
-
[
|
|
243
|
-
[
|
|
244
|
-
[
|
|
245
|
-
[
|
|
246
|
-
[
|
|
247
|
-
[
|
|
248
|
-
[
|
|
249
|
-
[
|
|
250
|
-
[
|
|
251
|
-
[
|
|
252
|
-
[
|
|
253
|
-
[
|
|
254
|
-
[
|
|
255
|
-
[
|
|
256
|
-
[
|
|
257
|
-
[
|
|
258
|
-
[
|
|
259
|
-
[
|
|
260
|
-
[
|
|
261
|
-
[
|
|
262
|
-
[
|
|
263
|
-
[
|
|
264
|
-
[
|
|
265
|
-
[
|
|
266
|
-
[
|
|
267
|
-
[
|
|
268
|
-
[
|
|
269
|
-
[
|
|
270
|
-
[
|
|
271
|
-
[
|
|
272
|
-
[
|
|
273
|
-
[
|
|
274
|
-
[
|
|
275
|
-
[
|
|
276
|
-
[
|
|
277
|
-
[
|
|
278
|
-
[
|
|
279
|
-
[
|
|
280
|
-
[
|
|
281
|
-
[
|
|
282
|
-
[
|
|
283
|
-
[
|
|
284
|
-
[
|
|
285
|
-
[
|
|
286
|
-
[
|
|
287
|
-
[
|
|
288
|
-
[
|
|
289
|
-
[
|
|
290
|
-
[
|
|
291
|
-
[
|
|
292
|
-
[
|
|
293
|
-
[
|
|
294
|
-
[
|
|
295
|
-
[
|
|
296
|
-
[
|
|
297
|
-
[
|
|
298
|
-
[
|
|
299
|
-
[
|
|
300
|
-
[
|
|
301
|
-
[
|
|
302
|
-
[
|
|
303
|
-
[
|
|
304
|
-
[
|
|
305
|
-
[
|
|
306
|
-
[
|
|
307
|
-
[
|
|
308
|
-
[
|
|
309
|
-
[
|
|
310
|
-
[
|
|
311
|
-
[
|
|
312
|
-
[
|
|
313
|
-
[
|
|
314
|
-
[
|
|
315
|
-
[
|
|
316
|
-
[
|
|
317
|
-
[
|
|
318
|
-
[
|
|
319
|
-
[
|
|
320
|
-
[
|
|
321
|
-
[
|
|
322
|
-
[
|
|
323
|
-
[
|
|
324
|
-
[
|
|
325
|
-
[
|
|
326
|
-
[
|
|
327
|
-
[
|
|
328
|
-
[
|
|
329
|
-
[
|
|
330
|
-
[
|
|
331
|
-
[
|
|
332
|
-
[
|
|
333
|
-
[
|
|
334
|
-
[
|
|
335
|
-
[
|
|
336
|
-
[
|
|
337
|
-
[
|
|
338
|
-
[
|
|
339
|
-
[
|
|
340
|
-
[
|
|
341
|
-
[
|
|
342
|
-
[
|
|
343
|
-
[
|
|
344
|
-
[
|
|
345
|
-
[
|
|
346
|
-
[
|
|
347
|
-
[
|
|
348
|
-
[
|
|
349
|
-
[
|
|
350
|
-
[
|
|
351
|
-
[
|
|
352
|
-
[
|
|
353
|
-
[
|
|
354
|
-
[
|
|
355
|
-
[
|
|
356
|
-
[
|
|
357
|
-
[
|
|
358
|
-
[
|
|
359
|
-
[
|
|
360
|
-
[
|
|
361
|
-
[
|
|
362
|
-
[
|
|
363
|
-
[
|
|
364
|
-
[
|
|
365
|
-
[
|
|
366
|
-
[
|
|
367
|
-
[
|
|
368
|
-
[
|
|
369
|
-
[
|
|
370
|
-
[
|
|
371
|
-
[
|
|
372
|
-
[
|
|
373
|
-
[
|
|
374
|
-
[
|
|
375
|
-
[
|
|
376
|
-
[
|
|
377
|
-
[
|
|
378
|
-
[
|
|
379
|
-
[
|
|
380
|
-
[
|
|
381
|
-
[
|
|
382
|
-
[
|
|
383
|
-
[
|
|
384
|
-
[
|
|
385
|
-
[
|
|
386
|
-
[
|
|
387
|
-
[
|
|
388
|
-
[
|
|
389
|
-
[
|
|
390
|
-
[
|
|
391
|
-
[
|
|
392
|
-
[
|
|
393
|
-
[
|
|
394
|
-
[
|
|
395
|
-
[
|
|
396
|
-
[
|
|
397
|
-
[
|
|
398
|
-
[
|
|
399
|
-
[
|
|
400
|
-
[
|
|
401
|
-
[
|
|
402
|
-
[
|
|
403
|
-
[
|
|
404
|
-
[
|
|
405
|
-
[
|
|
406
|
-
[
|
|
407
|
-
[
|
|
408
|
-
[
|
|
409
|
-
[
|
|
410
|
-
[
|
|
411
|
-
[
|
|
412
|
-
[
|
|
413
|
-
[
|
|
414
|
-
[
|
|
415
|
-
[
|
|
416
|
-
[
|
|
417
|
-
[
|
|
418
|
-
[
|
|
419
|
-
[
|
|
420
|
-
[
|
|
421
|
-
[
|
|
422
|
-
[
|
|
423
|
-
[
|
|
424
|
-
[
|
|
425
|
-
[
|
|
426
|
-
[
|
|
427
|
-
[
|
|
428
|
-
[
|
|
429
|
-
[
|
|
430
|
-
[
|
|
431
|
-
[
|
|
432
|
-
[
|
|
433
|
-
[
|
|
434
|
-
[
|
|
435
|
-
[
|
|
436
|
-
[
|
|
437
|
-
[
|
|
438
|
-
[
|
|
439
|
-
[
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
export type ContentFor<T extends
|
|
443
|
-
|
|
444
|
-
export interface WebhookEvent<
|
|
445
|
-
T extends WebhookContentType = WebhookContentType,
|
|
446
|
-
> {
|
|
230
|
+
[WebhookEventType.SubscriptionPauseScheduled]: SubscriptionPauseScheduledContent;
|
|
231
|
+
[WebhookEventType.CustomerBusinessEntityChanged]: CustomerBusinessEntityChangedContent;
|
|
232
|
+
[WebhookEventType.SubscriptionAdvanceInvoiceScheduleAdded]: SubscriptionAdvanceInvoiceScheduleAddedContent;
|
|
233
|
+
[WebhookEventType.GiftExpired]: GiftExpiredContent;
|
|
234
|
+
[WebhookEventType.TaxWithheldDeleted]: TaxWithheldDeletedContent;
|
|
235
|
+
[WebhookEventType.UnbilledChargesDeleted]: UnbilledChargesDeletedContent;
|
|
236
|
+
[WebhookEventType.CouponUpdated]: CouponUpdatedContent;
|
|
237
|
+
[WebhookEventType.OmnichannelSubscriptionItemReactivated]: OmnichannelSubscriptionItemReactivatedContent;
|
|
238
|
+
[WebhookEventType.OmnichannelSubscriptionItemRenewed]: OmnichannelSubscriptionItemRenewedContent;
|
|
239
|
+
[WebhookEventType.UnbilledChargesCreated]: UnbilledChargesCreatedContent;
|
|
240
|
+
[WebhookEventType.SubscriptionResumed]: SubscriptionResumedContent;
|
|
241
|
+
[WebhookEventType.OmnichannelOneTimeOrderItemCancelled]: OmnichannelOneTimeOrderItemCancelledContent;
|
|
242
|
+
[WebhookEventType.SubscriptionCancelled]: SubscriptionCancelledContent;
|
|
243
|
+
[WebhookEventType.ItemEntitlementsRemoved]: ItemEntitlementsRemovedContent;
|
|
244
|
+
[WebhookEventType.BusinessEntityCreated]: BusinessEntityCreatedContent;
|
|
245
|
+
[WebhookEventType.CouponSetUpdated]: CouponSetUpdatedContent;
|
|
246
|
+
[WebhookEventType.DifferentialPriceUpdated]: DifferentialPriceUpdatedContent;
|
|
247
|
+
[WebhookEventType.OmnichannelSubscriptionItemPaused]: OmnichannelSubscriptionItemPausedContent;
|
|
248
|
+
[WebhookEventType.EntitlementOverridesRemoved]: EntitlementOverridesRemovedContent;
|
|
249
|
+
[WebhookEventType.SubscriptionActivatedWithBackdating]: SubscriptionActivatedWithBackdatingContent;
|
|
250
|
+
[WebhookEventType.SubscriptionTrialEndReminder]: SubscriptionTrialEndReminderContent;
|
|
251
|
+
[WebhookEventType.SubscriptionShippingAddressUpdated]: SubscriptionShippingAddressUpdatedContent;
|
|
252
|
+
[WebhookEventType.VoucherCreateFailed]: VoucherCreateFailedContent;
|
|
253
|
+
[WebhookEventType.GiftClaimed]: GiftClaimedContent;
|
|
254
|
+
[WebhookEventType.CustomerDeleted]: CustomerDeletedContent;
|
|
255
|
+
[WebhookEventType.RefundInitiated]: RefundInitiatedContent;
|
|
256
|
+
[WebhookEventType.InvoiceGeneratedWithBackdating]: InvoiceGeneratedWithBackdatingContent;
|
|
257
|
+
[WebhookEventType.OmnichannelTransactionCreated]: OmnichannelTransactionCreatedContent;
|
|
258
|
+
[WebhookEventType.AddUsagesReminder]: AddUsagesReminderContent;
|
|
259
|
+
[WebhookEventType.VoucherCreated]: VoucherCreatedContent;
|
|
260
|
+
[WebhookEventType.RuleUpdated]: RuleUpdatedContent;
|
|
261
|
+
[WebhookEventType.PaymentSchedulesCreated]: PaymentSchedulesCreatedContent;
|
|
262
|
+
[WebhookEventType.FeatureActivated]: FeatureActivatedContent;
|
|
263
|
+
[WebhookEventType.PaymentSourceLocallyDeleted]: PaymentSourceLocallyDeletedContent;
|
|
264
|
+
[WebhookEventType.InvoiceGenerated]: InvoiceGeneratedContent;
|
|
265
|
+
[WebhookEventType.VoucherExpired]: VoucherExpiredContent;
|
|
266
|
+
[WebhookEventType.AuthorizationSucceeded]: AuthorizationSucceededContent;
|
|
267
|
+
[WebhookEventType.GiftScheduled]: GiftScheduledContent;
|
|
268
|
+
[WebhookEventType.SubscriptionChangesScheduled]: SubscriptionChangesScheduledContent;
|
|
269
|
+
[WebhookEventType.SubscriptionChangedWithBackdating]: SubscriptionChangedWithBackdatingContent;
|
|
270
|
+
[WebhookEventType.OmnichannelSubscriptionItemChanged]: OmnichannelSubscriptionItemChangedContent;
|
|
271
|
+
[WebhookEventType.GiftUnclaimed]: GiftUnclaimedContent;
|
|
272
|
+
[WebhookEventType.VirtualBankAccountAdded]: VirtualBankAccountAddedContent;
|
|
273
|
+
[WebhookEventType.PaymentIntentCreated]: PaymentIntentCreatedContent;
|
|
274
|
+
[WebhookEventType.CreditNoteCreatedWithBackdating]: CreditNoteCreatedWithBackdatingContent;
|
|
275
|
+
[WebhookEventType.ContractTermTerminated]: ContractTermTerminatedContent;
|
|
276
|
+
[WebhookEventType.ItemFamilyUpdated]: ItemFamilyUpdatedContent;
|
|
277
|
+
[WebhookEventType.OrderCreated]: OrderCreatedContent;
|
|
278
|
+
[WebhookEventType.PriceVariantDeleted]: PriceVariantDeletedContent;
|
|
279
|
+
[WebhookEventType.SubscriptionMovementFailed]: SubscriptionMovementFailedContent;
|
|
280
|
+
[WebhookEventType.CustomerMovedIn]: CustomerMovedInContent;
|
|
281
|
+
[WebhookEventType.SubscriptionAdvanceInvoiceScheduleUpdated]: SubscriptionAdvanceInvoiceScheduleUpdatedContent;
|
|
282
|
+
[WebhookEventType.ItemDeleted]: ItemDeletedContent;
|
|
283
|
+
[WebhookEventType.SubscriptionRampDrafted]: SubscriptionRampDraftedContent;
|
|
284
|
+
[WebhookEventType.DunningUpdated]: DunningUpdatedContent;
|
|
285
|
+
[WebhookEventType.ItemEntitlementsUpdated]: ItemEntitlementsUpdatedContent;
|
|
286
|
+
[WebhookEventType.TokenConsumed]: TokenConsumedContent;
|
|
287
|
+
[WebhookEventType.HierarchyDeleted]: HierarchyDeletedContent;
|
|
288
|
+
[WebhookEventType.SubscriptionCancellationScheduled]: SubscriptionCancellationScheduledContent;
|
|
289
|
+
[WebhookEventType.SubscriptionRenewed]: SubscriptionRenewedContent;
|
|
290
|
+
[WebhookEventType.FeatureUpdated]: FeatureUpdatedContent;
|
|
291
|
+
[WebhookEventType.FeatureDeleted]: FeatureDeletedContent;
|
|
292
|
+
[WebhookEventType.ItemFamilyCreated]: ItemFamilyCreatedContent;
|
|
293
|
+
[WebhookEventType.OmnichannelSubscriptionItemScheduledChangeRemoved]: OmnichannelSubscriptionItemScheduledChangeRemovedContent;
|
|
294
|
+
[WebhookEventType.OmnichannelSubscriptionItemResumed]: OmnichannelSubscriptionItemResumedContent;
|
|
295
|
+
[WebhookEventType.PurchaseCreated]: PurchaseCreatedContent;
|
|
296
|
+
[WebhookEventType.EntitlementOverridesUpdated]: EntitlementOverridesUpdatedContent;
|
|
297
|
+
[WebhookEventType.ItemFamilyDeleted]: ItemFamilyDeletedContent;
|
|
298
|
+
[WebhookEventType.SubscriptionResumptionScheduled]: SubscriptionResumptionScheduledContent;
|
|
299
|
+
[WebhookEventType.FeatureReactivated]: FeatureReactivatedContent;
|
|
300
|
+
[WebhookEventType.CouponCodesDeleted]: CouponCodesDeletedContent;
|
|
301
|
+
[WebhookEventType.CardExpired]: CardExpiredContent;
|
|
302
|
+
[WebhookEventType.CreditNoteUpdated]: CreditNoteUpdatedContent;
|
|
303
|
+
[WebhookEventType.OmnichannelSubscriptionItemDowngraded]: OmnichannelSubscriptionItemDowngradedContent;
|
|
304
|
+
[WebhookEventType.PriceVariantUpdated]: PriceVariantUpdatedContent;
|
|
305
|
+
[WebhookEventType.PromotionalCreditsDeducted]: PromotionalCreditsDeductedContent;
|
|
306
|
+
[WebhookEventType.SubscriptionRampApplied]: SubscriptionRampAppliedContent;
|
|
307
|
+
[WebhookEventType.SubscriptionPaused]: SubscriptionPausedContent;
|
|
308
|
+
[WebhookEventType.OrderReadyToProcess]: OrderReadyToProcessContent;
|
|
309
|
+
[WebhookEventType.FeatureCreated]: FeatureCreatedContent;
|
|
310
|
+
[WebhookEventType.TransactionDeleted]: TransactionDeletedContent;
|
|
311
|
+
[WebhookEventType.CreditNoteCreated]: CreditNoteCreatedContent;
|
|
312
|
+
[WebhookEventType.OmnichannelSubscriptionItemResubscribed]: OmnichannelSubscriptionItemResubscribedContent;
|
|
313
|
+
[WebhookEventType.RecordPurchaseFailed]: RecordPurchaseFailedContent;
|
|
314
|
+
[WebhookEventType.ItemCreated]: ItemCreatedContent;
|
|
315
|
+
[WebhookEventType.TransactionUpdated]: TransactionUpdatedContent;
|
|
316
|
+
[WebhookEventType.MrrUpdated]: MrrUpdatedContent;
|
|
317
|
+
[WebhookEventType.UnbilledChargesInvoiced]: UnbilledChargesInvoicedContent;
|
|
318
|
+
[WebhookEventType.ItemPriceUpdated]: ItemPriceUpdatedContent;
|
|
319
|
+
[WebhookEventType.CouponCodesUpdated]: CouponCodesUpdatedContent;
|
|
320
|
+
[WebhookEventType.VirtualBankAccountUpdated]: VirtualBankAccountUpdatedContent;
|
|
321
|
+
[WebhookEventType.ContractTermCreated]: ContractTermCreatedContent;
|
|
322
|
+
[WebhookEventType.SubscriptionChanged]: SubscriptionChangedContent;
|
|
323
|
+
[WebhookEventType.PaymentFailed]: PaymentFailedContent;
|
|
324
|
+
[WebhookEventType.CreditNoteDeleted]: CreditNoteDeletedContent;
|
|
325
|
+
[WebhookEventType.TaxWithheldRefunded]: TaxWithheldRefundedContent;
|
|
326
|
+
[WebhookEventType.ContractTermCompleted]: ContractTermCompletedContent;
|
|
327
|
+
[WebhookEventType.PaymentSchedulesUpdated]: PaymentSchedulesUpdatedContent;
|
|
328
|
+
[WebhookEventType.OmnichannelSubscriptionItemExpired]: OmnichannelSubscriptionItemExpiredContent;
|
|
329
|
+
[WebhookEventType.CardUpdated]: CardUpdatedContent;
|
|
330
|
+
[WebhookEventType.CustomerCreated]: CustomerCreatedContent;
|
|
331
|
+
[WebhookEventType.SubscriptionRenewalReminder]: SubscriptionRenewalReminderContent;
|
|
332
|
+
[WebhookEventType.OrderDelivered]: OrderDeliveredContent;
|
|
333
|
+
[WebhookEventType.OmnichannelSubscriptionItemCancellationScheduled]: OmnichannelSubscriptionItemCancellationScheduledContent;
|
|
334
|
+
[WebhookEventType.OmnichannelSubscriptionItemGracePeriodExpired]: OmnichannelSubscriptionItemGracePeriodExpiredContent;
|
|
335
|
+
[WebhookEventType.CouponCodesAdded]: CouponCodesAddedContent;
|
|
336
|
+
[WebhookEventType.GiftCancelled]: GiftCancelledContent;
|
|
337
|
+
[WebhookEventType.OrderCancelled]: OrderCancelledContent;
|
|
338
|
+
[WebhookEventType.CouponDeleted]: CouponDeletedContent;
|
|
339
|
+
[WebhookEventType.SubscriptionScheduledChangesRemoved]: SubscriptionScheduledChangesRemovedContent;
|
|
340
|
+
[WebhookEventType.PendingInvoiceCreated]: PendingInvoiceCreatedContent;
|
|
341
|
+
[WebhookEventType.EntitlementOverridesAutoRemoved]: EntitlementOverridesAutoRemovedContent;
|
|
342
|
+
[WebhookEventType.OmnichannelSubscriptionItemUpgraded]: OmnichannelSubscriptionItemUpgradedContent;
|
|
343
|
+
[WebhookEventType.SubscriptionBusinessEntityChanged]: SubscriptionBusinessEntityChangedContent;
|
|
344
|
+
[WebhookEventType.OmnichannelOneTimeOrderCreated]: OmnichannelOneTimeOrderCreatedContent;
|
|
345
|
+
[WebhookEventType.PaymentSourceDeleted]: PaymentSourceDeletedContent;
|
|
346
|
+
[WebhookEventType.OmnichannelSubscriptionItemCancelled]: OmnichannelSubscriptionItemCancelledContent;
|
|
347
|
+
[WebhookEventType.QuoteDeleted]: QuoteDeletedContent;
|
|
348
|
+
[WebhookEventType.InvoiceUpdated]: InvoiceUpdatedContent;
|
|
349
|
+
[WebhookEventType.SubscriptionAdvanceInvoiceScheduleRemoved]: SubscriptionAdvanceInvoiceScheduleRemovedContent;
|
|
350
|
+
[WebhookEventType.CardDeleted]: CardDeletedContent;
|
|
351
|
+
[WebhookEventType.OrderReadyToShip]: OrderReadyToShipContent;
|
|
352
|
+
[WebhookEventType.SubscriptionMovedOut]: SubscriptionMovedOutContent;
|
|
353
|
+
[WebhookEventType.PaymentScheduleSchemeCreated]: PaymentScheduleSchemeCreatedContent;
|
|
354
|
+
[WebhookEventType.BusinessEntityUpdated]: BusinessEntityUpdatedContent;
|
|
355
|
+
[WebhookEventType.SubscriptionScheduledResumptionRemoved]: SubscriptionScheduledResumptionRemovedContent;
|
|
356
|
+
[WebhookEventType.PaymentInitiated]: PaymentInitiatedContent;
|
|
357
|
+
[WebhookEventType.FeatureArchived]: FeatureArchivedContent;
|
|
358
|
+
[WebhookEventType.SubscriptionReactivatedWithBackdating]: SubscriptionReactivatedWithBackdatingContent;
|
|
359
|
+
[WebhookEventType.OmnichannelSubscriptionImported]: OmnichannelSubscriptionImportedContent;
|
|
360
|
+
[WebhookEventType.TokenExpired]: TokenExpiredContent;
|
|
361
|
+
[WebhookEventType.CardAdded]: CardAddedContent;
|
|
362
|
+
[WebhookEventType.CouponCreated]: CouponCreatedContent;
|
|
363
|
+
[WebhookEventType.RuleDeleted]: RuleDeletedContent;
|
|
364
|
+
[WebhookEventType.ItemPriceEntitlementsUpdated]: ItemPriceEntitlementsUpdatedContent;
|
|
365
|
+
[WebhookEventType.ItemPriceDeleted]: ItemPriceDeletedContent;
|
|
366
|
+
[WebhookEventType.VirtualBankAccountDeleted]: VirtualBankAccountDeletedContent;
|
|
367
|
+
[WebhookEventType.PaymentScheduleSchemeDeleted]: PaymentScheduleSchemeDeletedContent;
|
|
368
|
+
[WebhookEventType.SubscriptionCreated]: SubscriptionCreatedContent;
|
|
369
|
+
[WebhookEventType.SubscriptionEntitlementsCreated]: SubscriptionEntitlementsCreatedContent;
|
|
370
|
+
[WebhookEventType.OrderReturned]: OrderReturnedContent;
|
|
371
|
+
[WebhookEventType.SubscriptionDeleted]: SubscriptionDeletedContent;
|
|
372
|
+
[WebhookEventType.PaymentSourceAdded]: PaymentSourceAddedContent;
|
|
373
|
+
[WebhookEventType.SubscriptionMovedIn]: SubscriptionMovedInContent;
|
|
374
|
+
[WebhookEventType.ItemPriceCreated]: ItemPriceCreatedContent;
|
|
375
|
+
[WebhookEventType.SubscriptionScheduledCancellationRemoved]: SubscriptionScheduledCancellationRemovedContent;
|
|
376
|
+
[WebhookEventType.PaymentRefunded]: PaymentRefundedContent;
|
|
377
|
+
[WebhookEventType.UsageFileIngested]: UsageFileIngestedContent;
|
|
378
|
+
[WebhookEventType.OmnichannelSubscriptionMovedIn]: OmnichannelSubscriptionMovedInContent;
|
|
379
|
+
[WebhookEventType.DifferentialPriceCreated]: DifferentialPriceCreatedContent;
|
|
380
|
+
[WebhookEventType.TransactionCreated]: TransactionCreatedContent;
|
|
381
|
+
[WebhookEventType.PaymentSucceeded]: PaymentSucceededContent;
|
|
382
|
+
[WebhookEventType.SubscriptionCanceledWithBackdating]: SubscriptionCanceledWithBackdatingContent;
|
|
383
|
+
[WebhookEventType.UnbilledChargesVoided]: UnbilledChargesVoidedContent;
|
|
384
|
+
[WebhookEventType.QuoteCreated]: QuoteCreatedContent;
|
|
385
|
+
[WebhookEventType.CouponSetDeleted]: CouponSetDeletedContent;
|
|
386
|
+
[WebhookEventType.AttachedItemCreated]: AttachedItemCreatedContent;
|
|
387
|
+
[WebhookEventType.SalesOrderCreated]: SalesOrderCreatedContent;
|
|
388
|
+
[WebhookEventType.CustomerChanged]: CustomerChangedContent;
|
|
389
|
+
[WebhookEventType.SubscriptionStarted]: SubscriptionStartedContent;
|
|
390
|
+
[WebhookEventType.SubscriptionActivated]: SubscriptionActivatedContent;
|
|
391
|
+
[WebhookEventType.PaymentSourceExpiring]: PaymentSourceExpiringContent;
|
|
392
|
+
[WebhookEventType.SubscriptionReactivated]: SubscriptionReactivatedContent;
|
|
393
|
+
[WebhookEventType.OrderUpdated]: OrderUpdatedContent;
|
|
394
|
+
[WebhookEventType.SubscriptionScheduledPauseRemoved]: SubscriptionScheduledPauseRemovedContent;
|
|
395
|
+
[WebhookEventType.SubscriptionCancellationReminder]: SubscriptionCancellationReminderContent;
|
|
396
|
+
[WebhookEventType.SubscriptionCreatedWithBackdating]: SubscriptionCreatedWithBackdatingContent;
|
|
397
|
+
[WebhookEventType.SubscriptionRampCreated]: SubscriptionRampCreatedContent;
|
|
398
|
+
[WebhookEventType.OrderDeleted]: OrderDeletedContent;
|
|
399
|
+
[WebhookEventType.OmnichannelSubscriptionItemPauseScheduled]: OmnichannelSubscriptionItemPauseScheduledContent;
|
|
400
|
+
[WebhookEventType.GiftUpdated]: GiftUpdatedContent;
|
|
401
|
+
[WebhookEventType.SubscriptionTrialExtended]: SubscriptionTrialExtendedContent;
|
|
402
|
+
[WebhookEventType.OmnichannelSubscriptionItemGracePeriodStarted]: OmnichannelSubscriptionItemGracePeriodStartedContent;
|
|
403
|
+
[WebhookEventType.CardExpiryReminder]: CardExpiryReminderContent;
|
|
404
|
+
[WebhookEventType.TokenCreated]: TokenCreatedContent;
|
|
405
|
+
[WebhookEventType.PromotionalCreditsAdded]: PromotionalCreditsAddedContent;
|
|
406
|
+
[WebhookEventType.SubscriptionRampUpdated]: SubscriptionRampUpdatedContent;
|
|
407
|
+
[WebhookEventType.CustomerEntitlementsUpdated]: CustomerEntitlementsUpdatedContent;
|
|
408
|
+
[WebhookEventType.PaymentSourceExpired]: PaymentSourceExpiredContent;
|
|
409
|
+
[WebhookEventType.CustomerMovedOut]: CustomerMovedOutContent;
|
|
410
|
+
[WebhookEventType.SubscriptionEntitlementsUpdated]: SubscriptionEntitlementsUpdatedContent;
|
|
411
|
+
[WebhookEventType.OmnichannelSubscriptionItemDunningExpired]: OmnichannelSubscriptionItemDunningExpiredContent;
|
|
412
|
+
[WebhookEventType.HierarchyCreated]: HierarchyCreatedContent;
|
|
413
|
+
[WebhookEventType.AttachedItemDeleted]: AttachedItemDeletedContent;
|
|
414
|
+
[WebhookEventType.OmnichannelSubscriptionItemScheduledCancellationRemoved]: OmnichannelSubscriptionItemScheduledCancellationRemovedContent;
|
|
415
|
+
[WebhookEventType.ItemUpdated]: ItemUpdatedContent;
|
|
416
|
+
[WebhookEventType.CouponSetCreated]: CouponSetCreatedContent;
|
|
417
|
+
[WebhookEventType.PaymentIntentUpdated]: PaymentIntentUpdatedContent;
|
|
418
|
+
[WebhookEventType.OrderResent]: OrderResentContent;
|
|
419
|
+
[WebhookEventType.OmnichannelSubscriptionCreated]: OmnichannelSubscriptionCreatedContent;
|
|
420
|
+
[WebhookEventType.TaxWithheldRecorded]: TaxWithheldRecordedContent;
|
|
421
|
+
[WebhookEventType.PriceVariantCreated]: PriceVariantCreatedContent;
|
|
422
|
+
[WebhookEventType.DifferentialPriceDeleted]: DifferentialPriceDeletedContent;
|
|
423
|
+
[WebhookEventType.SubscriptionItemsRenewed]: SubscriptionItemsRenewedContent;
|
|
424
|
+
[WebhookEventType.RuleCreated]: RuleCreatedContent;
|
|
425
|
+
[WebhookEventType.ContractTermCancelled]: ContractTermCancelledContent;
|
|
426
|
+
[WebhookEventType.ContractTermRenewed]: ContractTermRenewedContent;
|
|
427
|
+
[WebhookEventType.InvoiceDeleted]: InvoiceDeletedContent;
|
|
428
|
+
[WebhookEventType.ItemPriceEntitlementsRemoved]: ItemPriceEntitlementsRemovedContent;
|
|
429
|
+
[WebhookEventType.SalesOrderUpdated]: SalesOrderUpdatedContent;
|
|
430
|
+
[WebhookEventType.OmnichannelSubscriptionItemDunningStarted]: OmnichannelSubscriptionItemDunningStartedContent;
|
|
431
|
+
[WebhookEventType.OmnichannelSubscriptionItemChangeScheduled]: OmnichannelSubscriptionItemChangeScheduledContent;
|
|
432
|
+
[WebhookEventType.PendingInvoiceUpdated]: PendingInvoiceUpdatedContent;
|
|
433
|
+
[WebhookEventType.QuoteUpdated]: QuoteUpdatedContent;
|
|
434
|
+
[WebhookEventType.AttachedItemUpdated]: AttachedItemUpdatedContent;
|
|
435
|
+
[WebhookEventType.PaymentSourceUpdated]: PaymentSourceUpdatedContent;
|
|
436
|
+
[WebhookEventType.BusinessEntityDeleted]: BusinessEntityDeletedContent;
|
|
437
|
+
[WebhookEventType.AuthorizationVoided]: AuthorizationVoidedContent;
|
|
438
|
+
[WebhookEventType.SubscriptionRampDeleted]: SubscriptionRampDeletedContent;
|
|
439
|
+
[WebhookEventType.PlanDeleted]: PlanDeletedContent;
|
|
440
|
+
[WebhookEventType.AddonDeleted]: AddonDeletedContent;
|
|
441
|
+
[WebhookEventType.AddonUpdated]: AddonUpdatedContent;
|
|
442
|
+
[WebhookEventType.AddonCreated]: AddonCreatedContent;
|
|
443
|
+
[WebhookEventType.PlanCreated]: PlanCreatedContent;
|
|
444
|
+
[WebhookEventType.PlanUpdated]: PlanUpdatedContent;
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
export type ContentFor<T extends WebhookEventType> = WebhookContentMap[T];
|
|
448
|
+
|
|
449
|
+
export interface WebhookEvent<T extends WebhookEventType = WebhookEventType> {
|
|
447
450
|
content: ContentFor<T>;
|
|
448
451
|
id: string;
|
|
449
452
|
occurred_at: number;
|