diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b31e3d..80d73ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,92 @@ +### v3.24.0 (2026-05-04) +* * * +### New Resources: +- [`QuoteEntitlement`](https://apidocs.chargebee.com/docs/api/quote_entitlements) has been added. + + +### New Actions: +- [`list_applicable_alerts_for_a_subscription`](https://apidocs.chargebee.com/docs/api/alerts/list-applicable-alerts-for-a-subscription) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`retrieve_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/retrieve-an-alert) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`update_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/update-an-alert) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`delete_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/delete-an-alert) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`list_alerts`](https://apidocs.chargebee.com/docs/api/alerts/list-alerts) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`list_alert_statuses_for_a_subscription`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-a-subscription) has been added to [`AlertStatus`](https://apidocs.chargebee.com/docs/api/alert_statuses). +- [`list_alert_statuses_for_an_alert`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-an-alert) has been added to [`AlertStatus`](https://apidocs.chargebee.com/docs/api/alert_statuses). + + +### New Attributes: +- [`alarm_status`](https://apidocs.chargebee.com/docs/api/alert_statuses/alert-status-object#alarm_status) has been added to [`AlertStatus`](https://apidocs.chargebee.com/docs/api/alert_statuses). + + +### New Parameters: +- [`limit`](https://apidocs.chargebee.com/docs/api/alerts/list-applicable-alerts-for-a-subscription#limit) has been added as query parameter to [`list_applicable_alerts_for_a_subscription`](https://apidocs.chargebee.com/docs/api/alerts/list-applicable-alerts-for-a-subscription) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`offset`](https://apidocs.chargebee.com/docs/api/alerts/list-applicable-alerts-for-a-subscription#offset) has been added as query parameter to [`list_applicable_alerts_for_a_subscription`](https://apidocs.chargebee.com/docs/api/alerts/list-applicable-alerts-for-a-subscription) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`status`](https://apidocs.chargebee.com/docs/api/alerts/list-applicable-alerts-for-a-subscription#status) has been added as query parameter to [`list_applicable_alerts_for_a_subscription`](https://apidocs.chargebee.com/docs/api/alerts/list-applicable-alerts-for-a-subscription) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`type`](https://apidocs.chargebee.com/docs/api/alerts/list-applicable-alerts-for-a-subscription#type) has been added as query parameter to [`list_applicable_alerts_for_a_subscription`](https://apidocs.chargebee.com/docs/api/alerts/list-applicable-alerts-for-a-subscription) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`limit`](https://apidocs.chargebee.com/docs/api/alerts/list-alerts#limit) has been added as query parameter to [`list_alerts`](https://apidocs.chargebee.com/docs/api/alerts/list-alerts) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`offset`](https://apidocs.chargebee.com/docs/api/alerts/list-alerts#offset) has been added as query parameter to [`list_alerts`](https://apidocs.chargebee.com/docs/api/alerts/list-alerts) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`id`](https://apidocs.chargebee.com/docs/api/alerts/list-alerts#id) has been added as query parameter to [`list_alerts`](https://apidocs.chargebee.com/docs/api/alerts/list-alerts) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`type`](https://apidocs.chargebee.com/docs/api/alerts/list-alerts#type) has been added as query parameter to [`list_alerts`](https://apidocs.chargebee.com/docs/api/alerts/list-alerts) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`subscription_id`](https://apidocs.chargebee.com/docs/api/alerts/list-alerts#subscription_id) has been added as query parameter to [`list_alerts`](https://apidocs.chargebee.com/docs/api/alerts/list-alerts) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`status`](https://apidocs.chargebee.com/docs/api/alerts/list-alerts#status) has been added as query parameter to [`list_alerts`](https://apidocs.chargebee.com/docs/api/alerts/list-alerts) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`limit`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-a-subscription#limit) has been added as query parameter to [`list_alert_statuses_for_a_subscription`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-a-subscription) in [`AlertStatus`](https://apidocs.chargebee.com/docs/api/alert_statuses). +- [`offset`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-a-subscription#offset) has been added as query parameter to [`list_alert_statuses_for_a_subscription`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-a-subscription) in [`AlertStatus`](https://apidocs.chargebee.com/docs/api/alert_statuses). +- [`alarm_status`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-a-subscription#alarm_status) has been added as query parameter to [`list_alert_statuses_for_a_subscription`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-a-subscription) in [`AlertStatus`](https://apidocs.chargebee.com/docs/api/alert_statuses). +- [`alert_id`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-a-subscription#alert_id) has been added as query parameter to [`list_alert_statuses_for_a_subscription`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-a-subscription) in [`AlertStatus`](https://apidocs.chargebee.com/docs/api/alert_statuses). +- [`limit`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-an-alert#limit) has been added as query parameter to [`list_alert_statuses_for_an_alert`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-an-alert) in [`AlertStatus`](https://apidocs.chargebee.com/docs/api/alert_statuses). +- [`offset`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-an-alert#offset) has been added as query parameter to [`list_alert_statuses_for_an_alert`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-an-alert) in [`AlertStatus`](https://apidocs.chargebee.com/docs/api/alert_statuses). +- [`alarm_status`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-an-alert#alarm_status) has been added as query parameter to [`list_alert_statuses_for_an_alert`](https://apidocs.chargebee.com/docs/api/alert_statuses/list-alert-statuses-for-an-alert) in [`AlertStatus`](https://apidocs.chargebee.com/docs/api/alert_statuses). +- [`exclude`](https://apidocs.chargebee.com/docs/api/invoices/list-invoices#exclude) has been added as query parameter to [`list_invoices`](https://apidocs.chargebee.com/docs/api/invoices/list-invoices) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices). +- [`threshold`](https://apidocs.chargebee.com/docs/api/alerts/update-an-alert#threshold) has been added as request body parameter to [`update_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/update-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`status`](https://apidocs.chargebee.com/docs/api/alerts/update-an-alert#status) has been added as request body parameter to [`update_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/update-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`threshold`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#threshold) has been added as request body parameter to [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`filter_conditions`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#filter_conditions) has been added as request body parameter to [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`type`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#type) has been added as request body parameter to [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`name`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#name) has been added as request body parameter to [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`description`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#description) has been added as request body parameter to [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`metered_feature_id`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#metered_feature_id) has been added as request body parameter to [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`subscription_id`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#subscription_id) has been added as request body parameter to [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`meta`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#meta) has been added as request body parameter to [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`defer_payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/create-a-payment-intent#defer_payment_method_type) has been added as request body parameter to [`create_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/create-a-payment-intent) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents). +- [`net_term_days`](https://apidocs.chargebee.com/docs/api/quotes/edit-quote-for-charge-items-and-charges#net_term_days) has been added as request body parameter to [`edit_quote_for_charge_items_and_charges`](https://apidocs.chargebee.com/docs/api/quotes/edit-quote-for-charge-items-and-charges) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes). +- [`net_term_days`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-charge-and-charge-items#net_term_days) has been added as request body parameter to [`create_a_quote_for_charge_and_charge_items`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-charge-and-charge-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes). + + +### Deleted Attributes: +- `alarm_triggered_at` has been removed from [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- `scope` has been removed from [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- `alert_status` has been removed from [`AlertStatus`](https://apidocs.chargebee.com/docs/api/alert_statuses). + + +### New Enums: +- `within_limit` and `in_alarm` have been added as new values enum `AlarmStatus`. +- `moyasar` and `payway` have been added as new values enum `Gateway`. +- `absolute` and `percentage` have been added as new values enum `Mode`. +- `twint`, `go_pay`, `grab_pay`, `pay_co`, `after_pay`, `swish`, and `payme` have been added as new values enum `PaymentMethod`. +- `twint`, `go_pay`, `grab_pay`, `pay_co`, `after_pay`, `swish`, and `payme` have been added as new values enum `PaymentMethodType`. +- `twint`, `go_pay`, `grab_pay`, `pay_co`, `after_pay`, `swish`, and `payme` have been added as new values enum `Type`. +- `mada` has been added as a new value to enum attribute [`card_type`](https://apidocs.chargebee.com/docs/api/cards/card-object#card_type) in [`Card`](https://apidocs.chargebee.com/docs/api/cards). +- `rate_limited` has been added as a new value to enum attribute [`webhook_status`](https://apidocs.chargebee.com/docs/api/events/event-object#webhook_status) in [`Event`](https://apidocs.chargebee.com/docs/api/events). +- `twint`, `go_pay`, `grab_pay`, `pay_co`, `after_pay`, `swish`, and `payme` 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). +- `twint`, `go_pay`, `grab_pay`, `pay_co`, `after_pay`, `swish`, and `payme` 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). +- `mada` has been added as a new value to enum attribute [`card.brand`](https://apidocs.chargebee.com/docs/api/payment_sources/payment-source-object#card_brand) in [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources). +- `plan_price`, `addon_price`, `charge_price`, and `charge` have been added as new values to enum attribute [`entity_type`](https://apidocs.chargebee.com/docs/api/quote_entitlements/quote-entitlement-object#entity_type) in [`QuoteEntitlement`](https://apidocs.chargebee.com/docs/api/quote_entitlements). +- `disabled` and `enabled` have been added as new values to enum query parameter `status.is` in [`list_applicable_alerts_for_a_subscription`](https://apidocs.chargebee.com/docs/api/alerts/list-applicable-alerts-for-a-subscription) of [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- `enabled` and `disabled` have been added as new values to enum request body parameter `status` in [`update_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/update-an-alert) of [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- `disabled` and `enabled` have been added as new values to enum query parameter `status.is` in [`list_alerts`](https://apidocs.chargebee.com/docs/api/alerts/list-alerts) of [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- `plan_price_id` has been added as a new value to enum request body parameter `filter_conditions.field` in [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) of [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- `not_equals` and `equals` have been added as new values to enum request body parameter `filter_conditions.operator` in [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) of [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- `rate_limited` has been added as a new value to enum query parameter `webhook_status.is` in [`list_events`](https://apidocs.chargebee.com/docs/api/events/list-events) of [`Event`](https://apidocs.chargebee.com/docs/api/events). +- `rate_limited` has been added as a new value to enum query parameter `webhook_status.is_not` in [`list_events`](https://apidocs.chargebee.com/docs/api/events/list-events) of [`Event`](https://apidocs.chargebee.com/docs/api/events). +- `rate_limited` has been added as a new value to enum query parameter `webhook_status.in` in [`list_events`](https://apidocs.chargebee.com/docs/api/events/list-events) of [`Event`](https://apidocs.chargebee.com/docs/api/events). +- `rate_limited` has been added as a new value to enum query parameter `webhook_status.not_in` in [`list_events`](https://apidocs.chargebee.com/docs/api/events/list-events) of [`Event`](https://apidocs.chargebee.com/docs/api/events). +- `twint`, `go_pay`, `grab_pay`, `pay_co`, `after_pay`, `swish`, and `payme` 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). +- `twint`, `go_pay`, `grab_pay`, `pay_co`, `after_pay`, `swish`, and `payme` 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). +- `mada` has been added as a new value to enum request body parameter `card.brand` in [`create_using_permanent_token`](https://apidocs.chargebee.com/docs/api/payment_sources/create-using-permanent-token) of [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources). + + + ### v3.23.1 (2026-04-22) * * * diff --git a/VERSION b/VERSION index 9b2f2a1..954e228 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.23.1 +3.24.0 diff --git a/package-lock.json b/package-lock.json index e0a65f3..203c313 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "chargebee", - "version": "3.23.1", + "version": "3.24.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "chargebee", - "version": "3.23.1", + "version": "3.24.0", "devDependencies": { "@types/chai": "^4.3.5", "@types/mocha": "^10.0.10", diff --git a/package.json b/package.json index 27666cd..7a2889e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chargebee", - "version": "3.23.1", + "version": "3.24.0", "description": "A library for integrating with Chargebee.", "scripts": { "prepack": "npm install && npm run build", diff --git a/src/environment.ts b/src/environment.ts index e447b57..09dc710 100644 --- a/src/environment.ts +++ b/src/environment.ts @@ -9,7 +9,7 @@ export const Environment = { hostSuffix: '.chargebee.com', apiPath: '/api/v2', timeout: DEFAULT_TIME_OUT, - clientVersion: 'v3.23.1', + clientVersion: 'v3.24.0', port: DEFAULT_PORT, timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT, exportWaitInMillis: DEFAULT_EXPORT_WAIT, diff --git a/src/resources/api_endpoints.ts b/src/resources/api_endpoints.ts index 806c35d..314afca 100644 --- a/src/resources/api_endpoints.ts +++ b/src/resources/api_endpoints.ts @@ -46,6 +46,7 @@ interface Endpoints { quotedDeltaRamp: EndpointTuple[]; billingConfiguration: EndpointTuple[]; quoteLineGroup: EndpointTuple[]; + quoteEntitlement: EndpointTuple[]; cpqQuoteSignature: EndpointTuple[]; plan: EndpointTuple[]; addon: EndpointTuple[]; @@ -109,6 +110,7 @@ interface Endpoints { usageSummary: EndpointTuple[]; usageCharge: EndpointTuple[]; alert: EndpointTuple[]; + filterCondition: EndpointTuple[]; alertStatus: EndpointTuple[]; impactedCustomer: EndpointTuple[]; subscriptionEntitlementsUpdatedDetail: EndpointTuple[]; @@ -3145,6 +3147,7 @@ export const Endpoints: Endpoints = { quotedDeltaRamp: [], billingConfiguration: [], quoteLineGroup: [], + quoteEntitlement: [], cpqQuoteSignature: [], plan: [ [ @@ -5088,8 +5091,85 @@ export const Endpoints: Endpoints = { {}, ], ], - alert: [], - alertStatus: [], + alert: [ + [ + 'create', + 'POST', + '/alerts', + null, + false, + null, + false, + {}, + { + isIdempotent: true, + }, + ], + ['retrieve', 'GET', '/alerts', null, true, null, false, {}, {}], + ['list', 'GET', '/alerts', null, false, null, false, {}, {}], + [ + 'update', + 'POST', + '/alerts', + null, + true, + null, + false, + {}, + { + isIdempotent: true, + }, + ], + [ + 'delete', + 'POST', + '/alerts', + '/delete', + true, + null, + false, + {}, + { + isIdempotent: true, + }, + ], + [ + 'application_alertsForSubscription', + 'GET', + '/subscriptions', + '/applicable_alerts', + true, + null, + false, + {}, + {}, + ], + ], + filterCondition: [], + alertStatus: [ + [ + 'alert_statusesForSubscription', + 'GET', + '/subscriptions', + '/alert_statuses', + true, + null, + false, + {}, + {}, + ], + [ + 'alert_statusesForAlert', + 'GET', + '/alerts', + '/alert_statuses', + true, + null, + false, + {}, + {}, + ], + ], impactedCustomer: [], subscriptionEntitlementsUpdatedDetail: [], subscriptionEntitlementsCreatedDetail: [], diff --git a/types/core.d.ts b/types/core.d.ts index cab4ad8..0a8eca1 100644 --- a/types/core.d.ts +++ b/types/core.d.ts @@ -31,6 +31,7 @@ declare module 'chargebee' { | 'business_checking' | 'current'; type ActionEnum = 'upsert' | 'remove'; + type AlarmStatusEnum = 'within_limit' | 'in_alarm'; type ApiVersionEnum = 'v1' | 'v2'; type ApplyOnEnum = 'invoice_amount' | 'specific_item_price'; type AutoCollectionEnum = 'on' | 'off'; @@ -118,6 +119,10 @@ declare module 'chargebee' { | 'plan_item_price' | 'addon_item_price' | 'charge_item_price' + | 'plan_price' + | 'addon_price' + | 'charge_price' + | 'charge' | 'invoice' | 'quote' | 'credit_note' @@ -131,9 +136,6 @@ declare module 'chargebee' { | 'plan_item' | 'addon_item' | 'charge_item' - | 'plan_price' - | 'addon_price' - | 'charge_price' | 'differential_price' | 'attached_item' | 'feature' @@ -152,8 +154,7 @@ declare module 'chargebee' { | 'usage_file' | 'business_rule' | 'ruleset' - | 'alert_status' - | 'charge'; + | 'alert_status'; type EventNameEnum = 'cancellation_page_loaded'; type EventTypeEnum = | 'coupon_created' @@ -435,6 +436,8 @@ declare module 'chargebee' { | 'ezidebit' | 'twikey' | 'tempus' + | 'moyasar' + | 'payway' | 'gocardless' | 'not_applicable'; type HierarchyOperationTypeEnum = @@ -444,6 +447,7 @@ declare module 'chargebee' { type InvoiceDunningHandlingEnum = 'continue' | 'stop'; type ItemTypeEnum = 'plan' | 'addon' | 'charge'; type LayoutEnum = 'in_app' | 'full_page'; + type ModeEnum = 'absolute' | 'percentage'; type NotifyReferralSystemEnum = | 'none' | 'first_paid_conversion' @@ -519,7 +523,14 @@ declare module 'chargebee' { | 'naver_pay' | 'revolut_pay' | 'cash_app_pay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; type PaymentMethodSavePolicyEnum = 'always' | 'ask' | 'never'; type PaymentMethodTypeEnum = | 'card' @@ -556,7 +567,14 @@ declare module 'chargebee' { | 'naver_pay' | 'revolut_pay' | 'cash_app_pay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; type PaymentVoucherTypeEnum = 'boleto'; type PeriodUnitEnum = 'day' | 'week' | 'month' | 'year'; type PriceTypeEnum = 'tax_exclusive' | 'tax_inclusive'; @@ -660,6 +678,13 @@ declare module 'chargebee' { | 'revolut_pay' | 'cash_app_pay' | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme' | 'free_trial' | 'pay_up_front' | 'pay_as_you_go' @@ -678,7 +703,6 @@ declare module 'chargebee' { type VoucherTypeEnum = 'boleto'; type WindowSizeEnum = 'month' | 'week' | 'day' | 'hour' | 'minute'; type ChargeOnEnum = 'immediately' | 'on_event'; - type AlertStatusEnum = AlertStatusEnum; type EnabledEventsEnum = | 'coupon_created' | 'coupon_updated' diff --git a/types/index.d.ts b/types/index.d.ts index 110a860..08b1cde 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -33,6 +33,7 @@ /// /// /// +/// /// /// /// @@ -75,6 +76,7 @@ /// /// /// +/// /// /// /// @@ -186,6 +188,8 @@ declare module 'chargebee' { constructor(config: Config); addon: Addon.AddonResource; address: Address.AddressResource; + alert: Alert.AlertResource; + alertStatu: AlertStatus.AlertStatusResource; attachedItem: AttachedItem.AttachedItemResource; businessEntity: BusinessEntity.BusinessEntityResource; card: Card.CardResource; diff --git a/types/resources/Alert.d.ts b/types/resources/Alert.d.ts index afd2086..f927fbe 100644 --- a/types/resources/Alert.d.ts +++ b/types/resources/Alert.d.ts @@ -1,19 +1,125 @@ /// /// - +/// declare module 'chargebee' { export interface Alert { id: string; - type?: TypeEnum; + type: TypeEnum; name: string; description?: string; metered_feature_id: string; subscription_id?: string; status?: 'enabled' | 'disabled'; - alarm_triggered_at?: number; - scope?: 'global' | 'subscription'; meta?: string; created_at: number; updated_at: number; } + + export namespace Alert { + export class AlertResource { + create( + input: CreateInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + + retrieve( + alert_id: string, + headers?: ChargebeeRequestHeader, + ): Promise>; + + list( + input?: ListInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + + update( + alert_id: string, + input?: UpdateInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + + delete( + alert_id: string, + headers?: ChargebeeRequestHeader, + ): Promise>; + + applicationAlertsForSubscription( + subscription_id: string, + input?: ApplicationAlertsForSubscriptionInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + } + + export interface CreateResponse { + alert: Alert; + } + + export interface RetrieveResponse { + alert: Alert; + } + + export interface ListResponse { + list: { alert: Alert }[]; + next_offset?: string; + } + + export interface UpdateResponse { + alert: Alert; + } + + export interface DeleteResponse { + alert: Alert; + } + + export interface ApplicationAlertsForSubscriptionResponse { + list: { alert: Alert }[]; + next_offset?: string; + } + + // REQUEST PARAMS + //--------------- + + export interface CreateInputParam { + type: TypeEnum; + name: string; + description?: string; + metered_feature_id: string; + subscription_id?: string; + meta?: string; + threshold?: ThresholdCreateInputParam; + filter_conditions?: FilterConditionsCreateInputParam[]; + } + export interface ListInputParam { + limit?: number; + offset?: string; + id?: filter.String; + type?: filter.Enum; + subscription_id?: filter.String; + status?: filter.Enum; + } + export interface UpdateInputParam { + status?: 'enabled' | 'disabled'; + threshold?: ThresholdUpdateInputParam; + } + export interface ApplicationAlertsForSubscriptionInputParam { + limit?: number; + offset?: string; + status?: filter.Enum; + type?: filter.Enum; + } + export interface ThresholdCreateInputParam { + mode: ModeEnum; + value: number; + } + + export interface FilterConditionsCreateInputParam { + field?: 'plan_price_id'; + operator?: 'equals' | 'not_equals'; + value?: string; + } + export interface ThresholdUpdateInputParam { + mode?: ModeEnum; + value?: number; + } + } } diff --git a/types/resources/AlertStatus.d.ts b/types/resources/AlertStatus.d.ts index f616033..8d71a7c 100644 --- a/types/resources/AlertStatus.d.ts +++ b/types/resources/AlertStatus.d.ts @@ -1,11 +1,52 @@ /// /// - +/// declare module 'chargebee' { export interface AlertStatus { alert_id: string; subscription_id: string; - alert_status: AlertStatusEnum; + alarm_status: AlarmStatusEnum; alarm_triggered_at?: number; } + + export namespace AlertStatus { + export class AlertStatusResource { + alertStatusesForSubscription( + subscription_id: string, + input?: AlertStatusesForSubscriptionInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + + alertStatusesForAlert( + alert_id: string, + input?: AlertStatusesForAlertInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + } + + export interface AlertStatusesForSubscriptionResponse { + list: { alert_status: AlertStatus }[]; + next_offset?: string; + } + + export interface AlertStatusesForAlertResponse { + list: { alert_status: AlertStatus }[]; + next_offset?: string; + } + + // REQUEST PARAMS + //--------------- + + export interface AlertStatusesForSubscriptionInputParam { + limit?: number; + offset?: string; + alarm_status?: filter.Enum; + alert_id?: filter.String; + } + export interface AlertStatusesForAlertInputParam { + limit?: number; + offset?: string; + alarm_status?: filter.Enum; + } + } } diff --git a/types/resources/Card.d.ts b/types/resources/Card.d.ts index 326e511..cfe76cb 100644 --- a/types/resources/Card.d.ts +++ b/types/resources/Card.d.ts @@ -33,6 +33,7 @@ declare module 'chargebee' { | 'maestro' | 'dankort' | 'cartes_bancaires' + | 'mada' | 'other' | 'not_applicable'; funding_type: diff --git a/types/resources/Content.d.ts b/types/resources/Content.d.ts index 2c1c57e..adfd480 100644 --- a/types/resources/Content.d.ts +++ b/types/resources/Content.d.ts @@ -38,6 +38,7 @@ declare module 'chargebee' { event: Event; export: Export; feature: Feature; + filter_condition: FilterCondition; gateway_error_detail: GatewayErrorDetail; gift: Gift; hierarchy: Hierarchy; @@ -80,6 +81,7 @@ declare module 'chargebee' { promotional_credit: PromotionalCredit; purchase: Purchase; quote: Quote; + quote_entitlement: QuoteEntitlement; quote_line_group: QuoteLineGroup; quoted_charge: QuotedCharge; quoted_delta_ramp: QuotedDeltaRamp; diff --git a/types/resources/Customer.d.ts b/types/resources/Customer.d.ts index 43a7d1a..3bf3e83 100644 --- a/types/resources/Customer.d.ts +++ b/types/resources/Customer.d.ts @@ -762,7 +762,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -947,7 +954,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; /** * @deprecated Please refer API docs to use other attributes */ diff --git a/types/resources/Estimate.d.ts b/types/resources/Estimate.d.ts index a649a4b..8006d16 100644 --- a/types/resources/Estimate.d.ts +++ b/types/resources/Estimate.d.ts @@ -1058,7 +1058,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -1148,7 +1155,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes diff --git a/types/resources/Event.d.ts b/types/resources/Event.d.ts index ba9aaf5..4096771 100644 --- a/types/resources/Event.d.ts +++ b/types/resources/Event.d.ts @@ -15,7 +15,8 @@ declare module 'chargebee' { | 'failed' | 'skipped' | 'not_applicable' - | 'disabled'; + | 'disabled' + | 'rate_limited'; webhook_failure_reason?: string; webhooks?: Event.Webhook[]; event_type?: EventTypeEnum; @@ -272,7 +273,8 @@ declare module 'chargebee' { | 'failed' | 'skipped' | 'not_applicable' - | 'disabled'; + | 'disabled' + | 'rate_limited'; } // REQUEST PARAMS //--------------- diff --git a/types/resources/FilterCondition.d.ts b/types/resources/FilterCondition.d.ts new file mode 100644 index 0000000..44d14c3 --- /dev/null +++ b/types/resources/FilterCondition.d.ts @@ -0,0 +1,10 @@ +/// +/// + +declare module 'chargebee' { + export interface FilterCondition { + field: 'plan_price_id'; + operator: 'equals' | 'not_equals'; + value: string; + } +} diff --git a/types/resources/Gift.d.ts b/types/resources/Gift.d.ts index 1fdb2b9..ebcc1ae 100644 --- a/types/resources/Gift.d.ts +++ b/types/resources/Gift.d.ts @@ -215,7 +215,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -299,7 +306,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes diff --git a/types/resources/Invoice.d.ts b/types/resources/Invoice.d.ts index be2c7bf..ab37ab0 100644 --- a/types/resources/Invoice.d.ts +++ b/types/resources/Invoice.d.ts @@ -1074,6 +1074,7 @@ declare module 'chargebee' { channel?: filter.Enum; voided_at?: filter.Timestamp; void_reason_code?: filter.String; + exclude?: filter.String; 'sort_by[asc]'?: string; 'sort_by[desc]'?: string; } @@ -1282,7 +1283,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -1441,7 +1449,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes diff --git a/types/resources/PaymentIntent.d.ts b/types/resources/PaymentIntent.d.ts index 28ddafe..4857351 100644 --- a/types/resources/PaymentIntent.d.ts +++ b/types/resources/PaymentIntent.d.ts @@ -7,7 +7,7 @@ declare module 'chargebee' { status: 'inited' | 'in_progress' | 'authorized' | 'consumed' | 'expired'; currency_code?: string; amount: number; - gateway_account_id: string; + gateway_account_id?: string; expires_at: number; reference_id?: string; payment_method_type?: @@ -43,7 +43,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; success_url?: string; failure_url?: string; created_at: number; @@ -131,7 +138,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; id_at_gateway?: string; error_code?: string; error_text?: string; @@ -183,7 +197,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; id_at_gateway?: string; error_code?: string; error_text?: string; @@ -202,6 +223,7 @@ declare module 'chargebee' { currency_code: string; gateway_account_id?: string; reference_id?: string; + defer_payment_method_type?: boolean; payment_method_type?: | 'card' | 'ideal' @@ -235,7 +257,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; success_url?: string; failure_url?: string; } @@ -276,7 +305,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; success_url?: string; failure_url?: string; } diff --git a/types/resources/PaymentSource.d.ts b/types/resources/PaymentSource.d.ts index 20ed1c4..dc2f7a9 100644 --- a/types/resources/PaymentSource.d.ts +++ b/types/resources/PaymentSource.d.ts @@ -226,6 +226,7 @@ declare module 'chargebee' { | 'maestro' | 'dankort' | 'cartes_bancaires' + | 'mada' | 'not_applicable'; funding_type: | 'credit' @@ -424,7 +425,8 @@ declare module 'chargebee' { | 'rupay' | 'maestro' | 'dankort' - | 'cartes_bancaires'; + | 'cartes_bancaires' + | 'mada'; funding_type?: 'credit' | 'debit' | 'prepaid' | 'not_known'; } @@ -465,7 +467,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes diff --git a/types/resources/Purchase.d.ts b/types/resources/Purchase.d.ts index 53f027a..91efb0b 100644 --- a/types/resources/Purchase.d.ts +++ b/types/resources/Purchase.d.ts @@ -110,7 +110,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes diff --git a/types/resources/Quote.d.ts b/types/resources/Quote.d.ts index 6ba89b3..21b94b6 100644 --- a/types/resources/Quote.d.ts +++ b/types/resources/Quote.d.ts @@ -743,6 +743,7 @@ declare module 'chargebee' { currency_code?: string; coupon?: string; coupon_ids?: string[]; + net_term_days?: number; billing_address?: BillingAddressCreateForChargeItemsAndChargesInputParam; shipping_address?: ShippingAddressCreateForChargeItemsAndChargesInputParam; item_prices?: ItemPricesCreateForChargeItemsAndChargesInputParam[]; @@ -758,6 +759,7 @@ declare module 'chargebee' { currency_code?: string; coupon?: string; coupon_ids?: string[]; + net_term_days?: number; billing_address?: BillingAddressEditForChargeItemsAndChargesInputParam; shipping_address?: ShippingAddressEditForChargeItemsAndChargesInputParam; item_prices?: ItemPricesEditForChargeItemsAndChargesInputParam[]; diff --git a/types/resources/QuoteEntitlement.d.ts b/types/resources/QuoteEntitlement.d.ts new file mode 100644 index 0000000..2bf4db6 --- /dev/null +++ b/types/resources/QuoteEntitlement.d.ts @@ -0,0 +1,16 @@ +/// +/// + +declare module 'chargebee' { + export interface QuoteEntitlement { + entity_id: string; + entity_type: 'plan_price' | 'addon_price' | 'charge_price' | 'charge'; + feature_id: string; + value: string; + is_enabled: boolean; + start_date?: number; + end_date?: number; + created_at: number; + modified_at: number; + } +} diff --git a/types/resources/Subscription.d.ts b/types/resources/Subscription.d.ts index 695f9f9..83f303f 100644 --- a/types/resources/Subscription.d.ts +++ b/types/resources/Subscription.d.ts @@ -1419,7 +1419,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -1559,7 +1566,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -1666,7 +1680,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -1828,7 +1849,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -2004,7 +2032,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -2136,7 +2171,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -2574,7 +2616,14 @@ declare module 'chargebee' { | 'cash_app_pay' | 'wechat_pay' | 'alipay' - | 'pix'; + | 'pix' + | 'twint' + | 'go_pay' + | 'grab_pay' + | 'pay_co' + | 'after_pay' + | 'swish' + | 'payme'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes diff --git a/types/resources/VirtualBankAccount.d.ts b/types/resources/VirtualBankAccount.d.ts index c44f6d8..6bfe559 100644 --- a/types/resources/VirtualBankAccount.d.ts +++ b/types/resources/VirtualBankAccount.d.ts @@ -93,6 +93,7 @@ declare module 'chargebee' { export interface CreateUsingPermanentTokenInputParam { customer_id: string; reference_id: string; + gateway_account_id?: string; scheme?: | 'ach_credit' | 'sepa_credit' @@ -105,6 +106,7 @@ declare module 'chargebee' { export interface CreateInputParam { customer_id: string; email?: string; + gateway_account_id?: string; scheme?: | 'ach_credit' | 'sepa_credit'