chargebee 3.25.0-beta.1 → 3.25.0
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 +66 -4
- package/README.md +0 -39
- package/cjs/RequestWrapper.js +1 -28
- package/cjs/chargebee.cjs.js +0 -3
- package/cjs/chargebee.cjs.worker.js +0 -2
- package/cjs/createChargebee.js +0 -5
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +1 -2
- package/cjs/resources/webhook/eventType.js +2 -0
- package/esm/RequestWrapper.js +1 -28
- package/esm/chargebee.esm.js +0 -2
- package/esm/chargebee.esm.worker.js +0 -1
- package/esm/createChargebee.js +0 -5
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +1 -2
- package/esm/resources/webhook/eventType.js +2 -0
- package/package.json +1 -4
- package/types/core.d.ts +23 -6
- package/types/index.d.ts +0 -17
- package/types/resources/Content.d.ts +0 -1
- package/types/resources/Customer.d.ts +14 -4
- package/types/resources/Estimate.d.ts +14 -4
- package/types/resources/Event.d.ts +2 -0
- package/types/resources/Gift.d.ts +23 -6
- package/types/resources/HostedPage.d.ts +1 -0
- package/types/resources/Invoice.d.ts +14 -5
- package/types/resources/OmnichannelSubscription.d.ts +6 -0
- package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -0
- package/types/resources/PaymentIntent.d.ts +35 -10
- package/types/resources/PaymentSource.d.ts +7 -2
- package/types/resources/Purchase.d.ts +7 -2
- package/types/resources/Subscription.d.ts +49 -14
- package/types/resources/WebhookEvent.d.ts +22 -4
- package/cjs/chargebeeZodValidationError.js +0 -18
- package/cjs/schema/addon.schema.js +0 -153
- package/cjs/schema/address.schema.js +0 -35
- package/cjs/schema/alert.schema.js +0 -38
- package/cjs/schema/attached_item.schema.js +0 -58
- package/cjs/schema/business_entity.schema.js +0 -46
- package/cjs/schema/card.schema.js +0 -165
- package/cjs/schema/comment.schema.js +0 -69
- package/cjs/schema/coupon.schema.js +0 -209
- package/cjs/schema/coupon_code.schema.js +0 -14
- package/cjs/schema/coupon_set.schema.js +0 -28
- package/cjs/schema/credit_note.schema.js +0 -288
- package/cjs/schema/currency.schema.js +0 -32
- package/cjs/schema/customer.schema.js +0 -986
- package/cjs/schema/customer_entitlement.schema.js +0 -14
- package/cjs/schema/differential_price.schema.js +0 -68
- package/cjs/schema/entitlement.schema.js +0 -27
- package/cjs/schema/entitlement_override.schema.js +0 -33
- package/cjs/schema/estimate.schema.js +0 -1525
- package/cjs/schema/export.schema.js +0 -1545
- package/cjs/schema/feature.schema.js +0 -37
- package/cjs/schema/gift.schema.js +0 -277
- package/cjs/schema/hosted_page.schema.js +0 -1649
- package/cjs/schema/in_app_subscription.schema.js +0 -68
- package/cjs/schema/index.js +0 -80
- package/cjs/schema/invoice.schema.js +0 -1467
- package/cjs/schema/item.schema.js +0 -91
- package/cjs/schema/item_entitlement.schema.js +0 -45
- package/cjs/schema/item_family.schema.js +0 -21
- package/cjs/schema/item_price.schema.js +0 -190
- package/cjs/schema/non_subscription.schema.js +0 -28
- package/cjs/schema/offer_event.schema.js +0 -13
- package/cjs/schema/offer_fulfillment.schema.js +0 -20
- package/cjs/schema/omnichannel_one_time_order.schema.js +0 -26
- package/cjs/schema/omnichannel_subscription.schema.js +0 -89
- package/cjs/schema/omnichannel_subscription_item.schema.js +0 -13
- package/cjs/schema/order.schema.js +0 -273
- package/cjs/schema/payment_intent.schema.js +0 -117
- package/cjs/schema/payment_schedule_scheme.schema.js +0 -20
- package/cjs/schema/payment_source.schema.js +0 -358
- package/cjs/schema/payment_voucher.schema.js +0 -57
- package/cjs/schema/personalized_offer.schema.js +0 -28
- package/cjs/schema/plan.schema.js +0 -225
- package/cjs/schema/portal_session.schema.js +0 -22
- package/cjs/schema/price_variant.schema.js +0 -36
- package/cjs/schema/pricing_page_session.schema.js +0 -135
- package/cjs/schema/promotional_credit.schema.js +0 -78
- package/cjs/schema/purchase.schema.js +0 -272
- package/cjs/schema/quote.schema.js +0 -1557
- package/cjs/schema/ramp.schema.js +0 -209
- package/cjs/schema/recorded_purchase.schema.js +0 -32
- package/cjs/schema/resource_migration.schema.js +0 -14
- package/cjs/schema/site_migration_detail.schema.js +0 -81
- package/cjs/schema/subscription.schema.js +0 -2993
- package/cjs/schema/subscription_entitlement.schema.js +0 -25
- package/cjs/schema/time_machine.schema.js +0 -17
- package/cjs/schema/transaction.schema.js +0 -70
- package/cjs/schema/unbilled_charge.schema.js +0 -113
- package/cjs/schema/usage.schema.js +0 -93
- package/cjs/schema/usage_charge.schema.js +0 -17
- package/cjs/schema/usage_event.schema.js +0 -28
- package/cjs/schema/usage_file.schema.js +0 -13
- package/cjs/schema/usage_summary.schema.js +0 -17
- package/cjs/schema/virtual_bank_account.schema.js +0 -43
- package/cjs/schema/webhook_endpoint.schema.js +0 -504
- package/cjs/validationLoader.js +0 -59
- package/esm/chargebeeZodValidationError.js +0 -14
- package/esm/schema/addon.schema.js +0 -150
- package/esm/schema/address.schema.js +0 -32
- package/esm/schema/alert.schema.js +0 -35
- package/esm/schema/attached_item.schema.js +0 -55
- package/esm/schema/business_entity.schema.js +0 -43
- package/esm/schema/card.schema.js +0 -162
- package/esm/schema/comment.schema.js +0 -66
- package/esm/schema/coupon.schema.js +0 -206
- package/esm/schema/coupon_code.schema.js +0 -11
- package/esm/schema/coupon_set.schema.js +0 -25
- package/esm/schema/credit_note.schema.js +0 -285
- package/esm/schema/currency.schema.js +0 -29
- package/esm/schema/customer.schema.js +0 -983
- package/esm/schema/customer_entitlement.schema.js +0 -11
- package/esm/schema/differential_price.schema.js +0 -65
- package/esm/schema/entitlement.schema.js +0 -24
- package/esm/schema/entitlement_override.schema.js +0 -30
- package/esm/schema/estimate.schema.js +0 -1522
- package/esm/schema/export.schema.js +0 -1542
- package/esm/schema/feature.schema.js +0 -34
- package/esm/schema/gift.schema.js +0 -274
- package/esm/schema/hosted_page.schema.js +0 -1646
- package/esm/schema/in_app_subscription.schema.js +0 -65
- package/esm/schema/index.js +0 -64
- package/esm/schema/invoice.schema.js +0 -1464
- package/esm/schema/item.schema.js +0 -88
- package/esm/schema/item_entitlement.schema.js +0 -42
- package/esm/schema/item_family.schema.js +0 -18
- package/esm/schema/item_price.schema.js +0 -187
- package/esm/schema/non_subscription.schema.js +0 -25
- package/esm/schema/offer_event.schema.js +0 -10
- package/esm/schema/offer_fulfillment.schema.js +0 -17
- package/esm/schema/omnichannel_one_time_order.schema.js +0 -23
- package/esm/schema/omnichannel_subscription.schema.js +0 -86
- package/esm/schema/omnichannel_subscription_item.schema.js +0 -10
- package/esm/schema/order.schema.js +0 -270
- package/esm/schema/payment_intent.schema.js +0 -114
- package/esm/schema/payment_schedule_scheme.schema.js +0 -17
- package/esm/schema/payment_source.schema.js +0 -355
- package/esm/schema/payment_voucher.schema.js +0 -54
- package/esm/schema/personalized_offer.schema.js +0 -25
- package/esm/schema/plan.schema.js +0 -222
- package/esm/schema/portal_session.schema.js +0 -19
- package/esm/schema/price_variant.schema.js +0 -33
- package/esm/schema/pricing_page_session.schema.js +0 -132
- package/esm/schema/promotional_credit.schema.js +0 -75
- package/esm/schema/purchase.schema.js +0 -269
- package/esm/schema/quote.schema.js +0 -1554
- package/esm/schema/ramp.schema.js +0 -206
- package/esm/schema/recorded_purchase.schema.js +0 -29
- package/esm/schema/resource_migration.schema.js +0 -11
- package/esm/schema/site_migration_detail.schema.js +0 -78
- package/esm/schema/subscription.schema.js +0 -2990
- package/esm/schema/subscription_entitlement.schema.js +0 -22
- package/esm/schema/time_machine.schema.js +0 -14
- package/esm/schema/transaction.schema.js +0 -67
- package/esm/schema/unbilled_charge.schema.js +0 -110
- package/esm/schema/usage.schema.js +0 -90
- package/esm/schema/usage_charge.schema.js +0 -14
- package/esm/schema/usage_event.schema.js +0 -25
- package/esm/schema/usage_file.schema.js +0 -10
- package/esm/schema/usage_summary.schema.js +0 -14
- package/esm/schema/virtual_bank_account.schema.js +0 -40
- package/esm/schema/webhook_endpoint.schema.js +0 -501
- package/esm/validationLoader.js +0 -56
- package/types/resources/QuoteEntitlement.d.ts +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,71 @@
|
|
|
1
|
-
### v3.25.0
|
|
1
|
+
### v3.25.0 (2026-06-08)
|
|
2
2
|
* * *
|
|
3
|
+
### New Attributes:
|
|
4
|
+
- [`purchased_at`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/omnichannel-subscription-object#purchased_at) has been added to [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).
|
|
5
|
+
- [`updated_at`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/omnichannel-subscription-object#updated_at) has been added to [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).
|
|
6
|
+
- [`updated_at`](https://apidocs.chargebee.com/docs/api/omnichannel_subscription_items/omnichannel-subscription-item-object#updated_at) has been added to [`OmnichannelSubscriptionItem`](https://apidocs.chargebee.com/docs/api/omnichannel_subscription_items).
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### New Parameters:
|
|
10
|
+
- [`customer_id.in`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#customer_id_in) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).
|
|
11
|
+
- [`customer_id.not_in`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#customer_id_not_in) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).
|
|
12
|
+
- [`id`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#id) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).
|
|
13
|
+
- [`id_at_source`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#id_at_source) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).
|
|
14
|
+
- [`updated_at`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#updated_at) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).
|
|
15
|
+
- [`purchased_at`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#purchased_at) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).
|
|
16
|
+
- [`gift_receiver`](https://apidocs.chargebee.com/docs/api/gifts/update-a-gift#gift_receiver) has been added as request body parameter to [`update_a_gift`](https://apidocs.chargebee.com/docs/api/gifts/update-a-gift) in [`Gift`](https://apidocs.chargebee.com/docs/api/gifts).
|
|
17
|
+
- [`layout`](https://apidocs.chargebee.com/docs/api/hosted_pages/checkout-gift-subscription-for-items#layout) has been added as request body parameter to [`checkout_gift_subscription_for_items`](https://apidocs.chargebee.com/docs/api/hosted_pages/checkout-gift-subscription-for-items) in [`HostedPage`](https://apidocs.chargebee.com/docs/api/hosted_pages).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Parameter Updates:
|
|
21
|
+
- [`scheduled_at`](https://apidocs.chargebee.com/docs/api/gifts/update-a-gift#scheduled_at) has been changed from required to optional in [`update_a_gift`](https://apidocs.chargebee.com/docs/api/gifts/update-a-gift) of [`Gift`](https://apidocs.chargebee.com/docs/api/gifts).
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### New Events:
|
|
25
|
+
- [`omnichannel_subscription_item_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/omnichannel_subscription_item_updated) has been added.
|
|
26
|
+
- [`omnichannel_subscription_item_recovered`](https://apidocs.chargebee.com/docs/api/events/webhook/omnichannel_subscription_item_recovered) has been added.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Deleted Resources:
|
|
30
|
+
- QuoteEntitlement has been removed.
|
|
31
|
+
|
|
3
32
|
|
|
4
|
-
###
|
|
5
|
-
-
|
|
6
|
-
-
|
|
33
|
+
### Deleted Attributes:
|
|
34
|
+
- `entity_id` has been removed from `QuoteEntitlement`.
|
|
35
|
+
- `entity_type` has been removed from `QuoteEntitlement`.
|
|
36
|
+
- `feature_id` has been removed from `QuoteEntitlement`.
|
|
37
|
+
- `value` has been removed from `QuoteEntitlement`.
|
|
38
|
+
- `is_enabled` has been removed from `QuoteEntitlement`.
|
|
39
|
+
- `start_date` has been removed from `QuoteEntitlement`.
|
|
40
|
+
- `end_date` has been removed from `QuoteEntitlement`.
|
|
41
|
+
- `created_at` has been removed from `QuoteEntitlement`.
|
|
42
|
+
- `modified_at` has been removed from `QuoteEntitlement`.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Deleted Parameters:
|
|
46
|
+
- `exclude` has been removed as query parameter from [`list_invoices`](https://apidocs.chargebee.com/docs/api/invoices/list-invoices) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### New Enums:
|
|
50
|
+
- `omnichannel_subscription_item_updated` and `omnichannel_subscription_item_recovered` have been added as new values enum `EventType`.
|
|
51
|
+
- `klarna`, `alipay_hk`, `paypay`, `gcash`, and `south_korean_cards` have been added as new values enum `PaymentMethod`.
|
|
52
|
+
- `klarna`, `alipay_hk`, `paypay`, `gcash`, and `south_korean_cards` have been added as new values enum `PaymentMethodType`.
|
|
53
|
+
- `klarna`, `alipay_hk`, `paypay`, `gcash`, and `south_korean_cards` have been added as new values enum `Type`.
|
|
54
|
+
- `klarna`, `alipay_hk`, `paypay`, `gcash`, and `south_korean_cards` have been added as new values to enum attribute [`payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_method_type) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
|
|
55
|
+
- `klarna`, `alipay_hk`, `paypay`, `gcash`, and `south_korean_cards` have been added as new values to enum attribute [`active_payment_attempt.payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#active_payment_attempt_payment_method_type) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
|
|
56
|
+
- `klarna`, `alipay_hk`, `paypay`, `gcash`, and `south_korean_cards` have been added as new values to enum request body parameter `payment_method_type` in [`update_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/update-a-payment-intent) of [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
|
|
57
|
+
- `klarna`, `alipay_hk`, `paypay`, `gcash`, and `south_korean_cards` have been added as new values to enum request body parameter `payment_method_type` in [`create_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/create-a-payment-intent) of [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### v3.24.1 (2026-06-03)
|
|
62
|
+
* * *
|
|
63
|
+
### Bug Fixes:
|
|
64
|
+
- Fixed `Content-Length` header being computed from the JavaScript string length (UTF-16 code units) instead of the UTF-8 byte length. Requests with non-ASCII payloads (e.g. accented characters, CJK, emoji) under-declared `Content-Length` and were rejected by Node's `fetch`/undici (≥ 7.26.0) with `Request body length does not match content-length header`. The header is now computed via `Buffer.byteLength(data, 'utf8')`. Resolves https://github.com/chargebee/chargebee-node/issues/119.
|
|
65
|
+
|
|
66
|
+
### Tests:
|
|
67
|
+
- ASCII form-urlencoded body — `Content-Length` matches the UTF-8 byte length of the serialized body.
|
|
68
|
+
- Multi-byte JSON body — `Content-Length` matches the UTF-8 byte length and is greater than the JS character count, ensuring the regression cannot return.
|
|
7
69
|
|
|
8
70
|
|
|
9
71
|
### v3.24.0 (2026-05-04)
|
package/README.md
CHANGED
|
@@ -124,45 +124,6 @@ try {
|
|
|
124
124
|
}
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
### Request parameter validation (Zod)
|
|
128
|
-
|
|
129
|
-
When `enableValidation` is set to `true`, the SDK validates parameters for **every** API request against Zod schemas **before** the HTTP call is made. If you omit the params object on a call, it is validated as `{}`. This is **off by default**. Schemas are included for API actions that support them; actions without a bundled schema behave as usual.
|
|
130
|
-
|
|
131
|
-
```typescript
|
|
132
|
-
import Chargebee, { ChargebeeZodValidationError } from 'chargebee';
|
|
133
|
-
|
|
134
|
-
const chargebee = new Chargebee({
|
|
135
|
-
site: '{{site}}',
|
|
136
|
-
apiKey: '{{api-key}}',
|
|
137
|
-
enableValidation: true,
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
try {
|
|
141
|
-
await chargebee.customer.create({
|
|
142
|
-
id: 'a'.repeat(100),
|
|
143
|
-
auto_collection: 'invalid',
|
|
144
|
-
});
|
|
145
|
-
} catch (err) {
|
|
146
|
-
if (err instanceof ChargebeeZodValidationError) {
|
|
147
|
-
console.error(err.message);
|
|
148
|
-
console.error(err.actionName);
|
|
149
|
-
console.error(err.zodError.issues);
|
|
150
|
-
} else {
|
|
151
|
-
throw err;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
Invalid parameters produce a `ChargebeeZodValidationError`. The error message lists every problem (field path and message). You can also inspect `actionName` (the API action, for example `create`) and `zodError` (Zod’s `ZodError`, including `issues`) for structured handling.
|
|
157
|
-
|
|
158
|
-
**Example message:**
|
|
159
|
-
|
|
160
|
-
```text
|
|
161
|
-
ChargebeeZodValidationError: [Chargebee] Validation failed for 'create': id: Too big: expected string to have <=50 characters; auto_collection: Invalid option: expected one of "on"|"off"
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
The same `ChargebeeZodValidationError` shape applies to any action with a schema when parameters are invalid (for example bad filters or limits on `list`).
|
|
165
|
-
|
|
166
127
|
### Using filters in the List API
|
|
167
128
|
|
|
168
129
|
For pagination, `offset` is the parameter that is being used. The value used for this parameter must be the value returned for `next_offset` parameter in the previous API call.
|
package/cjs/RequestWrapper.js
CHANGED
|
@@ -4,8 +4,6 @@ exports.RequestWrapper = void 0;
|
|
|
4
4
|
const util_js_1 = require("./util.js");
|
|
5
5
|
const coreCommon_js_1 = require("./coreCommon.js");
|
|
6
6
|
const node_buffer_1 = require("node:buffer");
|
|
7
|
-
const chargebeeZodValidationError_js_1 = require("./chargebeeZodValidationError.js");
|
|
8
|
-
const validationLoader_js_1 = require("./validationLoader.js");
|
|
9
7
|
class RequestWrapper {
|
|
10
8
|
constructor(args, apiCall, envArg) {
|
|
11
9
|
this.getRequest = () => {
|
|
@@ -25,17 +23,6 @@ class RequestWrapper {
|
|
|
25
23
|
}
|
|
26
24
|
return idParam;
|
|
27
25
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Validate parameters against the action's Zod schema when enableValidation is true.
|
|
30
|
-
* Query params are validated as `params ?? {}`; body params are validated when `params` is non-null.
|
|
31
|
-
* Throws a descriptive error listing every validation violation.
|
|
32
|
-
*/
|
|
33
|
-
static _validateParams(params, schema, actionName) {
|
|
34
|
-
const result = schema.safeParse(params);
|
|
35
|
-
if (!result.success) {
|
|
36
|
-
throw new chargebeeZodValidationError_js_1.ChargebeeZodValidationError(actionName, result.error);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
26
|
static parseRetryAfter(retryAfter) {
|
|
40
27
|
if (!retryAfter)
|
|
41
28
|
return null;
|
|
@@ -55,20 +42,6 @@ class RequestWrapper {
|
|
|
55
42
|
? this.args[1]
|
|
56
43
|
: this.args[0];
|
|
57
44
|
let headers = this.apiCall.hasIdInUrl ? this.args[2] : this.args[1];
|
|
58
|
-
// Lazy-load Zod schema when enableValidation is true
|
|
59
|
-
if (env.enableValidation &&
|
|
60
|
-
this.apiCall.resourceKey &&
|
|
61
|
-
this.apiCall.actionName) {
|
|
62
|
-
const schema = await (0, validationLoader_js_1.getSchema)(this.apiCall.resourceKey, this.apiCall.actionName);
|
|
63
|
-
if (schema) {
|
|
64
|
-
if (this.apiCall.httpMethod === 'GET') {
|
|
65
|
-
RequestWrapper._validateParams(params !== null && params !== void 0 ? params : {}, schema, this.apiCall.methodName);
|
|
66
|
-
}
|
|
67
|
-
else if (params != null) {
|
|
68
|
-
RequestWrapper._validateParams(params, schema, this.apiCall.methodName);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
45
|
Object.assign(this.httpHeaders, headers);
|
|
73
46
|
if (this.apiCall.httpMethod === 'POST' &&
|
|
74
47
|
!this.httpHeaders['chargebee-idempotency-key'] &&
|
|
@@ -100,7 +73,7 @@ class RequestWrapper {
|
|
|
100
73
|
const requestHeaders = Object.assign({}, this.httpHeaders);
|
|
101
74
|
if (data && data.length) {
|
|
102
75
|
(0, util_js_1.extend)(true, requestHeaders, {
|
|
103
|
-
'Content-Length': data
|
|
76
|
+
'Content-Length': node_buffer_1.Buffer.byteLength(data, 'utf8'),
|
|
104
77
|
});
|
|
105
78
|
}
|
|
106
79
|
const contentType = this.apiCall.isJsonRequest
|
package/cjs/chargebee.cjs.js
CHANGED
|
@@ -4,7 +4,6 @@ const createChargebee_js_1 = require("./createChargebee.js");
|
|
|
4
4
|
const FetchClient_js_1 = require("./net/FetchClient.js");
|
|
5
5
|
const handler_js_1 = require("./resources/webhook/handler.js");
|
|
6
6
|
const auth_js_1 = require("./resources/webhook/auth.js");
|
|
7
|
-
const chargebeeZodValidationError_js_1 = require("./chargebeeZodValidationError.js");
|
|
8
7
|
const httpClient = new FetchClient_js_1.FetchHttpClient();
|
|
9
8
|
const Chargebee = (0, createChargebee_js_1.CreateChargebee)(httpClient);
|
|
10
9
|
module.exports = Chargebee;
|
|
@@ -19,5 +18,3 @@ module.exports.WebhookError = handler_js_1.WebhookError;
|
|
|
19
18
|
module.exports.WebhookAuthenticationError = handler_js_1.WebhookAuthenticationError;
|
|
20
19
|
module.exports.WebhookPayloadValidationError = handler_js_1.WebhookPayloadValidationError;
|
|
21
20
|
module.exports.WebhookPayloadParseError = handler_js_1.WebhookPayloadParseError;
|
|
22
|
-
// Export validation error class
|
|
23
|
-
module.exports.ChargebeeZodValidationError = chargebeeZodValidationError_js_1.ChargebeeZodValidationError;
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.WebhookPayloadParseError = exports.WebhookPayloadValidationError = exports.WebhookAuthenticationError = exports.WebhookError = exports.basicAuthValidator = exports.WebhookContentType = exports.WebhookEventType = void 0;
|
|
4
4
|
const createChargebee_js_1 = require("./createChargebee.js");
|
|
5
5
|
const FetchClient_js_1 = require("./net/FetchClient.js");
|
|
6
|
-
const chargebeeZodValidationError_js_1 = require("./chargebeeZodValidationError.js");
|
|
7
6
|
const httpClient = new FetchClient_js_1.FetchHttpClient();
|
|
8
7
|
const Chargebee = (0, createChargebee_js_1.CreateChargebee)(httpClient);
|
|
9
8
|
module.exports = Chargebee;
|
|
@@ -20,4 +19,3 @@ Object.defineProperty(exports, "WebhookError", { enumerable: true, get: function
|
|
|
20
19
|
Object.defineProperty(exports, "WebhookAuthenticationError", { enumerable: true, get: function () { return handler_js_2.WebhookAuthenticationError; } });
|
|
21
20
|
Object.defineProperty(exports, "WebhookPayloadValidationError", { enumerable: true, get: function () { return handler_js_2.WebhookPayloadValidationError; } });
|
|
22
21
|
Object.defineProperty(exports, "WebhookPayloadParseError", { enumerable: true, get: function () { return handler_js_2.WebhookPayloadParseError; } });
|
|
23
|
-
module.exports.ChargebeeZodValidationError = chargebeeZodValidationError_js_1.ChargebeeZodValidationError;
|
package/cjs/createChargebee.js
CHANGED
|
@@ -96,11 +96,6 @@ const CreateChargebee = (httpClient) => {
|
|
|
96
96
|
jsonKeys: metaArr[7],
|
|
97
97
|
options: metaArr[8],
|
|
98
98
|
};
|
|
99
|
-
if (this._env.enableValidation) {
|
|
100
|
-
// Store resource and action for lazy schema loading in RequestWrapper
|
|
101
|
-
apiCall.resourceKey = res;
|
|
102
|
-
apiCall.actionName = metaArr[0];
|
|
103
|
-
}
|
|
104
99
|
this[res][apiCall.methodName] = this._createApiFunc(apiCall, this._env);
|
|
105
100
|
}
|
|
106
101
|
}
|
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.25.0
|
|
14
|
+
clientVersion: 'v3.25.0',
|
|
15
15
|
port: DEFAULT_PORT,
|
|
16
16
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
17
17
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -3032,7 +3032,6 @@ exports.Endpoints = {
|
|
|
3032
3032
|
quotedDeltaRamp: [],
|
|
3033
3033
|
billingConfiguration: [],
|
|
3034
3034
|
quoteLineGroup: [],
|
|
3035
|
-
quoteEntitlement: [],
|
|
3036
3035
|
cpqQuoteSignature: [],
|
|
3037
3036
|
plan: [
|
|
3038
3037
|
[
|
|
@@ -4696,6 +4695,7 @@ exports.Endpoints = {
|
|
|
4696
4695
|
},
|
|
4697
4696
|
],
|
|
4698
4697
|
],
|
|
4698
|
+
omnichannelSubscriptionItemScheduledChange: [],
|
|
4699
4699
|
omnichannelSubscription: [
|
|
4700
4700
|
[
|
|
4701
4701
|
'retrieve',
|
|
@@ -4828,7 +4828,6 @@ exports.Endpoints = {
|
|
|
4828
4828
|
{},
|
|
4829
4829
|
],
|
|
4830
4830
|
],
|
|
4831
|
-
omnichannelSubscriptionItemScheduledChange: [],
|
|
4832
4831
|
usageFile: [
|
|
4833
4832
|
[
|
|
4834
4833
|
'uploadUrl',
|
|
@@ -108,12 +108,14 @@ var WebhookEventType;
|
|
|
108
108
|
WebhookEventType["OmnichannelSubscriptionItemPauseScheduled"] = "omnichannel_subscription_item_pause_scheduled";
|
|
109
109
|
WebhookEventType["OmnichannelSubscriptionItemPaused"] = "omnichannel_subscription_item_paused";
|
|
110
110
|
WebhookEventType["OmnichannelSubscriptionItemReactivated"] = "omnichannel_subscription_item_reactivated";
|
|
111
|
+
WebhookEventType["OmnichannelSubscriptionItemRecovered"] = "omnichannel_subscription_item_recovered";
|
|
111
112
|
WebhookEventType["OmnichannelSubscriptionItemRenewed"] = "omnichannel_subscription_item_renewed";
|
|
112
113
|
WebhookEventType["OmnichannelSubscriptionItemResubscribed"] = "omnichannel_subscription_item_resubscribed";
|
|
113
114
|
WebhookEventType["OmnichannelSubscriptionItemResumed"] = "omnichannel_subscription_item_resumed";
|
|
114
115
|
WebhookEventType["OmnichannelSubscriptionItemScheduledCancellationRemoved"] = "omnichannel_subscription_item_scheduled_cancellation_removed";
|
|
115
116
|
WebhookEventType["OmnichannelSubscriptionItemScheduledChangeRemoved"] = "omnichannel_subscription_item_scheduled_change_removed";
|
|
116
117
|
WebhookEventType["OmnichannelSubscriptionItemScheduledDowngradeRemoved"] = "omnichannel_subscription_item_scheduled_downgrade_removed";
|
|
118
|
+
WebhookEventType["OmnichannelSubscriptionItemUpdated"] = "omnichannel_subscription_item_updated";
|
|
117
119
|
WebhookEventType["OmnichannelSubscriptionItemUpgraded"] = "omnichannel_subscription_item_upgraded";
|
|
118
120
|
WebhookEventType["OmnichannelSubscriptionMovedIn"] = "omnichannel_subscription_moved_in";
|
|
119
121
|
WebhookEventType["OmnichannelTransactionCreated"] = "omnichannel_transaction_created";
|
package/esm/RequestWrapper.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { extend, callbackifyPromise, getApiURL, encodeListParams, encodeParams, serialize, getHost, log, generateUUIDv4 as uuidv4, } from './util.js';
|
|
2
2
|
import { handleResponse } from './coreCommon.js';
|
|
3
3
|
import { Buffer } from 'node:buffer';
|
|
4
|
-
import { ChargebeeZodValidationError } from './chargebeeZodValidationError.js';
|
|
5
|
-
import { getSchema } from './validationLoader.js';
|
|
6
4
|
export class RequestWrapper {
|
|
7
5
|
constructor(args, apiCall, envArg) {
|
|
8
6
|
this.getRequest = () => {
|
|
@@ -22,17 +20,6 @@ export class RequestWrapper {
|
|
|
22
20
|
}
|
|
23
21
|
return idParam;
|
|
24
22
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Validate parameters against the action's Zod schema when enableValidation is true.
|
|
27
|
-
* Query params are validated as `params ?? {}`; body params are validated when `params` is non-null.
|
|
28
|
-
* Throws a descriptive error listing every validation violation.
|
|
29
|
-
*/
|
|
30
|
-
static _validateParams(params, schema, actionName) {
|
|
31
|
-
const result = schema.safeParse(params);
|
|
32
|
-
if (!result.success) {
|
|
33
|
-
throw new ChargebeeZodValidationError(actionName, result.error);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
23
|
static parseRetryAfter(retryAfter) {
|
|
37
24
|
if (!retryAfter)
|
|
38
25
|
return null;
|
|
@@ -52,20 +39,6 @@ export class RequestWrapper {
|
|
|
52
39
|
? this.args[1]
|
|
53
40
|
: this.args[0];
|
|
54
41
|
let headers = this.apiCall.hasIdInUrl ? this.args[2] : this.args[1];
|
|
55
|
-
// Lazy-load Zod schema when enableValidation is true
|
|
56
|
-
if (env.enableValidation &&
|
|
57
|
-
this.apiCall.resourceKey &&
|
|
58
|
-
this.apiCall.actionName) {
|
|
59
|
-
const schema = await getSchema(this.apiCall.resourceKey, this.apiCall.actionName);
|
|
60
|
-
if (schema) {
|
|
61
|
-
if (this.apiCall.httpMethod === 'GET') {
|
|
62
|
-
RequestWrapper._validateParams(params !== null && params !== void 0 ? params : {}, schema, this.apiCall.methodName);
|
|
63
|
-
}
|
|
64
|
-
else if (params != null) {
|
|
65
|
-
RequestWrapper._validateParams(params, schema, this.apiCall.methodName);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
42
|
Object.assign(this.httpHeaders, headers);
|
|
70
43
|
if (this.apiCall.httpMethod === 'POST' &&
|
|
71
44
|
!this.httpHeaders['chargebee-idempotency-key'] &&
|
|
@@ -97,7 +70,7 @@ export class RequestWrapper {
|
|
|
97
70
|
const requestHeaders = Object.assign({}, this.httpHeaders);
|
|
98
71
|
if (data && data.length) {
|
|
99
72
|
extend(true, requestHeaders, {
|
|
100
|
-
'Content-Length': data
|
|
73
|
+
'Content-Length': Buffer.byteLength(data, 'utf8'),
|
|
101
74
|
});
|
|
102
75
|
}
|
|
103
76
|
const contentType = this.apiCall.isJsonRequest
|
package/esm/chargebee.esm.js
CHANGED
|
@@ -7,5 +7,3 @@ export default Chargebee;
|
|
|
7
7
|
export { WebhookEventType, WebhookContentType, } from './resources/webhook/handler.js';
|
|
8
8
|
export { basicAuthValidator } from './resources/webhook/auth.js';
|
|
9
9
|
export { WebhookError, WebhookAuthenticationError, WebhookPayloadValidationError, WebhookPayloadParseError, } from './resources/webhook/handler.js';
|
|
10
|
-
// Export validation error class
|
|
11
|
-
export { ChargebeeZodValidationError } from './chargebeeZodValidationError.js';
|
|
@@ -7,4 +7,3 @@ export default Chargebee;
|
|
|
7
7
|
export { WebhookEventType, WebhookContentType, } from './resources/webhook/handler.js';
|
|
8
8
|
export { basicAuthValidator } from './resources/webhook/auth.js';
|
|
9
9
|
export { WebhookError, WebhookAuthenticationError, WebhookPayloadValidationError, WebhookPayloadParseError, } from './resources/webhook/handler.js';
|
|
10
|
-
export { ChargebeeZodValidationError } from './chargebeeZodValidationError.js';
|
package/esm/createChargebee.js
CHANGED
|
@@ -93,11 +93,6 @@ export const CreateChargebee = (httpClient) => {
|
|
|
93
93
|
jsonKeys: metaArr[7],
|
|
94
94
|
options: metaArr[8],
|
|
95
95
|
};
|
|
96
|
-
if (this._env.enableValidation) {
|
|
97
|
-
// Store resource and action for lazy schema loading in RequestWrapper
|
|
98
|
-
apiCall.resourceKey = res;
|
|
99
|
-
apiCall.actionName = metaArr[0];
|
|
100
|
-
}
|
|
101
96
|
this[res][apiCall.methodName] = this._createApiFunc(apiCall, this._env);
|
|
102
97
|
}
|
|
103
98
|
}
|
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.25.0
|
|
11
|
+
clientVersion: 'v3.25.0',
|
|
12
12
|
port: DEFAULT_PORT,
|
|
13
13
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
14
14
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -3029,7 +3029,6 @@ export const Endpoints = {
|
|
|
3029
3029
|
quotedDeltaRamp: [],
|
|
3030
3030
|
billingConfiguration: [],
|
|
3031
3031
|
quoteLineGroup: [],
|
|
3032
|
-
quoteEntitlement: [],
|
|
3033
3032
|
cpqQuoteSignature: [],
|
|
3034
3033
|
plan: [
|
|
3035
3034
|
[
|
|
@@ -4693,6 +4692,7 @@ export const Endpoints = {
|
|
|
4693
4692
|
},
|
|
4694
4693
|
],
|
|
4695
4694
|
],
|
|
4695
|
+
omnichannelSubscriptionItemScheduledChange: [],
|
|
4696
4696
|
omnichannelSubscription: [
|
|
4697
4697
|
[
|
|
4698
4698
|
'retrieve',
|
|
@@ -4825,7 +4825,6 @@ export const Endpoints = {
|
|
|
4825
4825
|
{},
|
|
4826
4826
|
],
|
|
4827
4827
|
],
|
|
4828
|
-
omnichannelSubscriptionItemScheduledChange: [],
|
|
4829
4828
|
usageFile: [
|
|
4830
4829
|
[
|
|
4831
4830
|
'uploadUrl',
|
|
@@ -105,12 +105,14 @@ export var WebhookEventType;
|
|
|
105
105
|
WebhookEventType["OmnichannelSubscriptionItemPauseScheduled"] = "omnichannel_subscription_item_pause_scheduled";
|
|
106
106
|
WebhookEventType["OmnichannelSubscriptionItemPaused"] = "omnichannel_subscription_item_paused";
|
|
107
107
|
WebhookEventType["OmnichannelSubscriptionItemReactivated"] = "omnichannel_subscription_item_reactivated";
|
|
108
|
+
WebhookEventType["OmnichannelSubscriptionItemRecovered"] = "omnichannel_subscription_item_recovered";
|
|
108
109
|
WebhookEventType["OmnichannelSubscriptionItemRenewed"] = "omnichannel_subscription_item_renewed";
|
|
109
110
|
WebhookEventType["OmnichannelSubscriptionItemResubscribed"] = "omnichannel_subscription_item_resubscribed";
|
|
110
111
|
WebhookEventType["OmnichannelSubscriptionItemResumed"] = "omnichannel_subscription_item_resumed";
|
|
111
112
|
WebhookEventType["OmnichannelSubscriptionItemScheduledCancellationRemoved"] = "omnichannel_subscription_item_scheduled_cancellation_removed";
|
|
112
113
|
WebhookEventType["OmnichannelSubscriptionItemScheduledChangeRemoved"] = "omnichannel_subscription_item_scheduled_change_removed";
|
|
113
114
|
WebhookEventType["OmnichannelSubscriptionItemScheduledDowngradeRemoved"] = "omnichannel_subscription_item_scheduled_downgrade_removed";
|
|
115
|
+
WebhookEventType["OmnichannelSubscriptionItemUpdated"] = "omnichannel_subscription_item_updated";
|
|
114
116
|
WebhookEventType["OmnichannelSubscriptionItemUpgraded"] = "omnichannel_subscription_item_upgraded";
|
|
115
117
|
WebhookEventType["OmnichannelSubscriptionMovedIn"] = "omnichannel_subscription_moved_in";
|
|
116
118
|
WebhookEventType["OmnichannelTransactionCreated"] = "omnichannel_transaction_created";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chargebee",
|
|
3
|
-
"version": "3.25.0
|
|
3
|
+
"version": "3.25.0",
|
|
4
4
|
"description": "A library for integrating with Chargebee.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepack": "npm install && npm run build",
|
|
@@ -75,8 +75,5 @@
|
|
|
75
75
|
"semi": true,
|
|
76
76
|
"singleQuote": true,
|
|
77
77
|
"parser": "typescript"
|
|
78
|
-
},
|
|
79
|
-
"dependencies": {
|
|
80
|
-
"zod": "^4.3.6"
|
|
81
78
|
}
|
|
82
79
|
}
|
package/types/core.d.ts
CHANGED
|
@@ -5,8 +5,6 @@ declare module 'chargebee' {
|
|
|
5
5
|
timeout?: number;
|
|
6
6
|
timemachineWaitInMillis?: number;
|
|
7
7
|
exportWaitInMillis?: number;
|
|
8
|
-
/** When true, request parameters are validated against Zod schemas before each HTTP call (where a schema exists). */
|
|
9
|
-
enableValidation?: boolean;
|
|
10
8
|
}
|
|
11
9
|
export type ChargebeeResponse<T> = T & {
|
|
12
10
|
headers: { [key: string]: string };
|
|
@@ -370,6 +368,8 @@ declare module 'chargebee' {
|
|
|
370
368
|
| 'omnichannel_subscription_moved_in'
|
|
371
369
|
| 'omnichannel_transaction_created'
|
|
372
370
|
| 'alert_status_changed'
|
|
371
|
+
| 'omnichannel_subscription_item_updated'
|
|
372
|
+
| 'omnichannel_subscription_item_recovered'
|
|
373
373
|
| 'plan_created'
|
|
374
374
|
| 'plan_updated'
|
|
375
375
|
| 'plan_deleted'
|
|
@@ -532,7 +532,12 @@ declare module 'chargebee' {
|
|
|
532
532
|
| 'pay_co'
|
|
533
533
|
| 'after_pay'
|
|
534
534
|
| 'swish'
|
|
535
|
-
| 'payme'
|
|
535
|
+
| 'payme'
|
|
536
|
+
| 'klarna'
|
|
537
|
+
| 'alipay_hk'
|
|
538
|
+
| 'paypay'
|
|
539
|
+
| 'gcash'
|
|
540
|
+
| 'south_korean_cards';
|
|
536
541
|
type PaymentMethodSavePolicyEnum = 'always' | 'ask' | 'never';
|
|
537
542
|
type PaymentMethodTypeEnum =
|
|
538
543
|
| 'card'
|
|
@@ -569,14 +574,19 @@ declare module 'chargebee' {
|
|
|
569
574
|
| 'naver_pay'
|
|
570
575
|
| 'revolut_pay'
|
|
571
576
|
| 'cash_app_pay'
|
|
572
|
-
| 'pix'
|
|
573
577
|
| 'twint'
|
|
574
578
|
| 'go_pay'
|
|
575
579
|
| 'grab_pay'
|
|
576
580
|
| 'pay_co'
|
|
577
581
|
| 'after_pay'
|
|
578
582
|
| 'swish'
|
|
579
|
-
| 'payme'
|
|
583
|
+
| 'payme'
|
|
584
|
+
| 'pix'
|
|
585
|
+
| 'klarna'
|
|
586
|
+
| 'alipay_hk'
|
|
587
|
+
| 'paypay'
|
|
588
|
+
| 'gcash'
|
|
589
|
+
| 'south_korean_cards';
|
|
580
590
|
type PaymentVoucherTypeEnum = 'boleto';
|
|
581
591
|
type PeriodUnitEnum = 'day' | 'week' | 'month' | 'year';
|
|
582
592
|
type PriceTypeEnum = 'tax_exclusive' | 'tax_inclusive';
|
|
@@ -679,7 +689,6 @@ declare module 'chargebee' {
|
|
|
679
689
|
| 'naver_pay'
|
|
680
690
|
| 'revolut_pay'
|
|
681
691
|
| 'cash_app_pay'
|
|
682
|
-
| 'pix'
|
|
683
692
|
| 'twint'
|
|
684
693
|
| 'go_pay'
|
|
685
694
|
| 'grab_pay'
|
|
@@ -687,6 +696,12 @@ declare module 'chargebee' {
|
|
|
687
696
|
| 'after_pay'
|
|
688
697
|
| 'swish'
|
|
689
698
|
| 'payme'
|
|
699
|
+
| 'pix'
|
|
700
|
+
| 'klarna'
|
|
701
|
+
| 'alipay_hk'
|
|
702
|
+
| 'paypay'
|
|
703
|
+
| 'gcash'
|
|
704
|
+
| 'south_korean_cards'
|
|
690
705
|
| 'free_trial'
|
|
691
706
|
| 'pay_up_front'
|
|
692
707
|
| 'pay_as_you_go'
|
|
@@ -917,6 +932,8 @@ declare module 'chargebee' {
|
|
|
917
932
|
| 'omnichannel_subscription_moved_in'
|
|
918
933
|
| 'omnichannel_transaction_created'
|
|
919
934
|
| 'alert_status_changed'
|
|
935
|
+
| 'omnichannel_subscription_item_updated'
|
|
936
|
+
| 'omnichannel_subscription_item_recovered'
|
|
920
937
|
| 'plan_created'
|
|
921
938
|
| 'plan_updated'
|
|
922
939
|
| 'plan_deleted'
|
package/types/index.d.ts
CHANGED
|
@@ -76,7 +76,6 @@
|
|
|
76
76
|
///<reference path='./resources/PromotionalCredit.d.ts' />
|
|
77
77
|
///<reference path='./resources/Purchase.d.ts' />
|
|
78
78
|
///<reference path='./resources/Quote.d.ts' />
|
|
79
|
-
///<reference path='./resources/QuoteEntitlement.d.ts' />
|
|
80
79
|
///<reference path='./resources/QuoteLineGroup.d.ts' />
|
|
81
80
|
///<reference path='./resources/QuotedCharge.d.ts' />
|
|
82
81
|
///<reference path='./resources/QuotedDeltaRamp.d.ts' />
|
|
@@ -165,11 +164,6 @@ declare module 'chargebee' {
|
|
|
165
164
|
* @httpClient optional http client implementation, default http client will be used if not provided
|
|
166
165
|
*/
|
|
167
166
|
httpClient?: HttpClientInterface;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* @enableValidation When true, every request's parameters are validated against each endpoint's generated Zod schema before the HTTP request is sent. Violations throw `ChargebeeZodValidationError` with structured Zod issues. Calls with no params argument are validated as `{}`. Required resource ids in the URL path are still checked separately.
|
|
171
|
-
*/
|
|
172
|
-
enableValidation?: boolean;
|
|
173
167
|
};
|
|
174
168
|
|
|
175
169
|
export interface HttpClientInterface {
|
|
@@ -449,15 +443,4 @@ declare module 'chargebee' {
|
|
|
449
443
|
name: string;
|
|
450
444
|
readonly rawBody?: string;
|
|
451
445
|
}
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* Thrown when `enableValidation` is on and request parameters fail the action's Zod schema.
|
|
455
|
-
* Carries `actionName` and the original `ZodError` (issues, `flatten()`, etc.) for programmatic handling.
|
|
456
|
-
*/
|
|
457
|
-
export class ChargebeeZodValidationError extends Error {
|
|
458
|
-
constructor(actionName: string, zodError: import('zod').ZodError);
|
|
459
|
-
name: string;
|
|
460
|
-
readonly actionName: string;
|
|
461
|
-
readonly zodError: import('zod').ZodError;
|
|
462
|
-
}
|
|
463
446
|
}
|
|
@@ -762,14 +762,19 @@ declare module 'chargebee' {
|
|
|
762
762
|
| 'cash_app_pay'
|
|
763
763
|
| 'wechat_pay'
|
|
764
764
|
| 'alipay'
|
|
765
|
-
| 'pix'
|
|
766
765
|
| 'twint'
|
|
767
766
|
| 'go_pay'
|
|
768
767
|
| 'grab_pay'
|
|
769
768
|
| 'pay_co'
|
|
770
769
|
| 'after_pay'
|
|
771
770
|
| 'swish'
|
|
772
|
-
| 'payme'
|
|
771
|
+
| 'payme'
|
|
772
|
+
| 'pix'
|
|
773
|
+
| 'klarna'
|
|
774
|
+
| 'alipay_hk'
|
|
775
|
+
| 'paypay'
|
|
776
|
+
| 'gcash'
|
|
777
|
+
| 'south_korean_cards';
|
|
773
778
|
reference_id?: string;
|
|
774
779
|
/**
|
|
775
780
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -954,14 +959,19 @@ declare module 'chargebee' {
|
|
|
954
959
|
| 'cash_app_pay'
|
|
955
960
|
| 'wechat_pay'
|
|
956
961
|
| 'alipay'
|
|
957
|
-
| 'pix'
|
|
958
962
|
| 'twint'
|
|
959
963
|
| 'go_pay'
|
|
960
964
|
| 'grab_pay'
|
|
961
965
|
| 'pay_co'
|
|
962
966
|
| 'after_pay'
|
|
963
967
|
| 'swish'
|
|
964
|
-
| 'payme'
|
|
968
|
+
| 'payme'
|
|
969
|
+
| 'pix'
|
|
970
|
+
| 'klarna'
|
|
971
|
+
| 'alipay_hk'
|
|
972
|
+
| 'paypay'
|
|
973
|
+
| 'gcash'
|
|
974
|
+
| 'south_korean_cards';
|
|
965
975
|
/**
|
|
966
976
|
* @deprecated Please refer API docs to use other attributes
|
|
967
977
|
*/
|
|
@@ -1058,14 +1058,19 @@ declare module 'chargebee' {
|
|
|
1058
1058
|
| 'cash_app_pay'
|
|
1059
1059
|
| 'wechat_pay'
|
|
1060
1060
|
| 'alipay'
|
|
1061
|
-
| 'pix'
|
|
1062
1061
|
| 'twint'
|
|
1063
1062
|
| 'go_pay'
|
|
1064
1063
|
| 'grab_pay'
|
|
1065
1064
|
| 'pay_co'
|
|
1066
1065
|
| 'after_pay'
|
|
1067
1066
|
| 'swish'
|
|
1068
|
-
| 'payme'
|
|
1067
|
+
| 'payme'
|
|
1068
|
+
| 'pix'
|
|
1069
|
+
| 'klarna'
|
|
1070
|
+
| 'alipay_hk'
|
|
1071
|
+
| 'paypay'
|
|
1072
|
+
| 'gcash'
|
|
1073
|
+
| 'south_korean_cards';
|
|
1069
1074
|
reference_id?: string;
|
|
1070
1075
|
/**
|
|
1071
1076
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -1155,14 +1160,19 @@ declare module 'chargebee' {
|
|
|
1155
1160
|
| 'cash_app_pay'
|
|
1156
1161
|
| 'wechat_pay'
|
|
1157
1162
|
| 'alipay'
|
|
1158
|
-
| 'pix'
|
|
1159
1163
|
| 'twint'
|
|
1160
1164
|
| 'go_pay'
|
|
1161
1165
|
| 'grab_pay'
|
|
1162
1166
|
| 'pay_co'
|
|
1163
1167
|
| 'after_pay'
|
|
1164
1168
|
| 'swish'
|
|
1165
|
-
| 'payme'
|
|
1169
|
+
| 'payme'
|
|
1170
|
+
| 'pix'
|
|
1171
|
+
| 'klarna'
|
|
1172
|
+
| 'alipay_hk'
|
|
1173
|
+
| 'paypay'
|
|
1174
|
+
| 'gcash'
|
|
1175
|
+
| 'south_korean_cards';
|
|
1166
1176
|
reference_id?: string;
|
|
1167
1177
|
/**
|
|
1168
1178
|
* @deprecated Please refer API docs to use other attributes
|