diff --git a/CHANGELOG.md b/CHANGELOG.md index 525359f..13a96cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,175 @@ +### v3.35.0 (2026-11-02) +* * * +### New Resources: +- `Citation` has been added. +- `CollectionsDispute` has been added. +- `CollectionsPaymentPromise` has been added. +- `CollectionsReminderSequence` has been added. +- `CustomData` has been added. +- `DraftEstimate` has been added. +- `DraftRequest` has been added. +- `EmailAttachment` has been added. +- `EmailConversation` has been added. +- `EmailMessage` has been added. +- `Execution` has been added. +- `GroupByAttribute` has been added. +- `GroupByRecommendation` has been added. +- `PreferenceVariant` has been added. +- `PriceRamp` has been added. +- `PrivateNote` has been added. +- `RampInterval` has been added. +- `RetrySegment` has been added. + + +### New Actions: +- `retrieve_a_business_entity` has been added to `BusinessEntity`. +- `update_business_entity` has been added to `BusinessEntity`. +- `list_business_entities` has been added to `BusinessEntity`. +- `create_a_business_entity` has been added to `BusinessEntity`. +- `remove_payment_schedule_scheme_from_an_invoice` has been added to `Invoice`. +- `update_overdraft_limit` has been added to `LedgerAccountBalance`. + + +### New Attributes: +- `email_conversation_id` has been added to `EmailLog`. +- `gateway` has been added to `GatewayPaymentMethodToken`. +- `retry_segment_id` has been added to `Invoice`. +- `price_ramp_id` has been added to `ItemPrice`. +- `group_by` has been added to `Meter`. +- `group_by` has been added to `MeteredFeature`. +- `origin` has been added to `OmnichannelSubscription`. +- `expiration_reason_at_source` has been added to `OmnichannelSubscriptionItem`. +- `cancellation_reason_at_source` has been added to `OmnichannelSubscriptionItem`. +- `gateway_metadata` has been added to `Transaction`. +- `attributes` has been added to `UsageSummary`. + + +### New Parameters: +- `limit` has been added as query parameter to `list_business_entities` in `BusinessEntity`. +- `offset` has been added as query parameter to `list_business_entities` in `BusinessEntity`. +- `include_deleted` has been added as query parameter to `list_business_entities` in `BusinessEntity`. +- `name` has been added as query parameter to `list_business_entities` in `BusinessEntity`. +- `group_by` has been added as query parameter to `retrieve_usage_summary_for_a_subscription` in `UsageSummary`. +- `name` has been added as request body parameter to `update_business_entity` in `BusinessEntity`. +- `status` has been added as request body parameter to `update_business_entity` in `BusinessEntity`. +- `name` has been added as request body parameter to `create_a_business_entity` in `BusinessEntity`. +- `status` has been added as request body parameter to `create_a_business_entity` in `BusinessEntity`. +- `customer_notes` has been added as request body parameter to `import_credit_note` in `CreditNote`. +- `line_items.tax_exempt_reason` has been added as request body parameter to `import_invoice` in `Invoice`. +- `comment` has been added as request body parameter to `remove_payment_schedule_scheme_from_an_invoice` in `Invoice`. +- `subscription_id` has been added as request body parameter to `update_overdraft_limit` in `LedgerAccountBalance`. +- `unit_id` has been added as request body parameter to `update_overdraft_limit` in `LedgerAccountBalance`. +- `is_unlimited` has been added as request body parameter to `update_overdraft_limit` in `LedgerAccountBalance`. +- `limit` has been added as request body parameter to `update_overdraft_limit` in `LedgerAccountBalance`. +- `change_reason` has been added as request body parameter to `update_overdraft_limit` in `LedgerAccountBalance`. +- `bank_account` has been added as request body parameter to `create_using_permanent_token` in `PaymentSource`. +- `purchase_items.trial_end` has been added as request body parameter to `create_a_purchase` in `Purchase`. +- `subscription_info.trial_end` has been added as request body parameter to `create_a_purchase` in `Purchase`. +- `subscription_info.start_date` has been added as request body parameter to `create_a_purchase` in `Purchase`. +- `purchase_items.trial_end` has been added as request body parameter to `estimates_for_purchase` in `Purchase`. +- `subscription_info.trial_end` has been added as request body parameter to `estimates_for_purchase` in `Purchase`. +- `subscription_info.start_date` has been added as request body parameter to `estimates_for_purchase` in `Purchase`. +- `items_to_add.description` has been added as request body parameter to `create_a_ramp` in `Ramp`. +- `items_to_update.description` has been added as request body parameter to `create_a_ramp` in `Ramp`. +- `items_to_add.description` has been added as request body parameter to `update_a_subscription_ramp` in `Ramp`. +- `items_to_update.description` has been added as request body parameter to `update_a_subscription_ramp` in `Ramp`. +- `group_by` has been added as request body parameter to `retrieve_usages_for_an_invoice_as_pdf` in `Usage`. + + +### New Events: +- `chargeback_lost` has been added. +- `price_ramp_updated` has been added. +- `refund_failed` has been added. +- `chargeback_initiated` has been added. +- `collections_payment_promise_fulfilled` has been added. +- `collections_dispute_resolved` has been added. +- `collections_dispute_updated` has been added. +- `collections_payment_promise_updated` has been added. +- `chargeback_won` has been added. +- `price_ramp_created` has been added. +- `collections_reminder_sequence_created` has been added. +- `email_message_received` has been added. +- `collections_payment_promise_broken` has been added. +- `price_ramp_deleted` has been added. +- `collections_payment_promise_created` has been added. +- `private_note_added` has been added. +- `collections_dispute_created` has been added. +- `collections_payment_promise_cancelled` has been added. +- `collections_dispute_withdrawn` has been added. +- `collections_reminder_sequence_paused` has been added. +- `collections_reminder_sequence_resumed` has been added. +- `payment_schedules_cancelled` has been added. +- `collections_reminder_sequence_completed` has been added. + + +### Deleted Resources: +- AppliedBusinessRule has been removed. + + +### Deleted Attributes: +- `handle` has been removed from `AppliedBusinessRule`. +- `entity_type` has been removed from `AppliedBusinessRule`. +- `entity_id` has been removed from `AppliedBusinessRule`. +- `entity_version` has been removed from `AppliedBusinessRule`. +- `rule_id` has been removed from `AppliedBusinessRule`. +- `version` has been removed from `AppliedBusinessRule`. +- `created_at` has been removed from `AppliedBusinessRule`. +- `modified_at` has been removed from `AppliedBusinessRule`. +- `gateway_name` has been removed from `GatewayPaymentMethodToken`. + + +### Deleted Events: +- `business_rules_applied` has been removed. + + +### New Enums: +- `task` has been added as a new value enum `EntityType`. +- `payment_schedules_cancelled`, `refund_failed`, `price_ramp_created`, `price_ramp_updated`, `price_ramp_deleted`, `chargeback_initiated`, `chargeback_won`, `chargeback_lost`, `collections_reminder_sequence_created`, `collections_reminder_sequence_paused`, `collections_reminder_sequence_resumed`, `collections_reminder_sequence_completed`, `collections_payment_promise_created`, `collections_payment_promise_updated`, `collections_payment_promise_fulfilled`, `collections_payment_promise_cancelled`, `collections_payment_promise_broken`, `collections_dispute_created`, `collections_dispute_updated`, `collections_dispute_resolved`, `collections_dispute_withdrawn`, `email_message_received`, and `private_note_added` have been added as new values enum `EventType`. +- `mcp`, `copilot`, and `agent` have been added as new values enum `Source`. +- `low`, `medium`, `high`, and `not_provided` have been added as new values to enum attribute `confidence_level` in `Citation`. +- `open`, `resolved`, and `withdrawn` have been added as new values to enum attribute `status` in `CollectionsDispute`. +- `active`, `fulfilled`, `broken`, and `cancelled` have been added as new values to enum attribute `status` in `CollectionsPaymentPromise`. +- `active`, `completed`, `paused`, and `failed` have been added as new values to enum attribute `status` in `CollectionsReminderSequence`. +- `success` and `failed` have been added as new values to enum attribute `status` in `DraftEstimate`. +- `open` and `executed` have been added as new values to enum attribute `status` in `DraftRequest`. +- `contact`, `site_user`, `agent`, and `other` have been added as new values to enum attribute `author_type` in `EmailMessage`. +- `pending`, `sent`, and `failed` have been added as new values to enum attribute `send_status` in `EmailMessage`. +- `success` and `failed` have been added as new values to enum attribute `status` in `Execution`. +- `valid` and `invalid` have been added as new values to enum attribute `status` in `GatewayPaymentMethodToken`. +- `low_coverage` and `high_cardinality` have been added as new values to enum attribute `warning_reasons` in `GroupByAttribute`. +- `roku` and `amazon_app_store` have been added as new values to enum attribute `source` in `OmnichannelOneTimeOrder`. +- `roku` and `amazon_app_store` have been added as new values to enum attribute `source` in `OmnichannelSubscription`. +- `other` has been added as a new value to enum attribute `cancellation_reason` in `OmnichannelSubscriptionItem`. +- `active`, `archived`, and `deleted` have been added as new values to enum attribute `status` in `PriceRamp`. +- `site_user`, `agent`, and `other` have been added as new values to enum attribute `author_type` in `PrivateNote`. +- `roku` and `amazon_app_store` have been added as new values to enum attribute `source` in `RecordedPurchase`. +- `and` and `or` have been added as new values to enum attribute `condition_logic` in `RetrySegment`. +- `true` and `false` have been added as new values to enum query parameter `name.is_present` in `list_business_entities` of `BusinessEntity`. +- `broken`, `fulfilled`, `active`, and `cancelled` have been added as new values to enum query parameter `status.is` in `list_collections_payment_promises` of `CollectionsPaymentPromise`. +- `not_provided`, `high`, `low`, and `medium` have been added as new values to enum request body parameter `citations.confidence_level` in `add_citations_to_a_draft_request` of `DraftRequest`. +- `not_provided`, `high`, `low`, and `medium` have been added as new values to enum request body parameter `citations.confidence_level` in `update_a_draft_request` of `DraftRequest`. +- `not_provided`, `high`, `low`, and `medium` have been added as new values to enum request body parameter `citations.confidence_level` in `create_a_draft_request` of `DraftRequest`. +- `roku` and `amazon_app_store` have been added as new values to enum query parameter `source.is` in `list_omnichannel_one_time_orders` of `OmnichannelOneTimeOrder`. +- `roku` and `amazon_app_store` have been added as new values to enum query parameter `source.is_not` in `list_omnichannel_one_time_orders` of `OmnichannelOneTimeOrder`. +- `roku` and `amazon_app_store` have been added as new values to enum query parameter `source.in` in `list_omnichannel_one_time_orders` of `OmnichannelOneTimeOrder`. +- `roku` and `amazon_app_store` have been added as new values to enum query parameter `source.not_in` in `list_omnichannel_one_time_orders` of `OmnichannelOneTimeOrder`. +- `roku` and `amazon_app_store` have been added as new values to enum query parameter `source.is` in `list_omnichannel_subscriptions` of `OmnichannelSubscription`. +- `roku` and `amazon_app_store` have been added as new values to enum query parameter `source.is_not` in `list_omnichannel_subscriptions` of `OmnichannelSubscription`. +- `roku` and `amazon_app_store` have been added as new values to enum query parameter `source.in` in `list_omnichannel_subscriptions` of `OmnichannelSubscription`. +- `roku` and `amazon_app_store` have been added as new values to enum query parameter `source.not_in` in `list_omnichannel_subscriptions` of `OmnichannelSubscription`. +- `bacs`, `pad`, `sepa_core`, `ach`, `autogiro`, `becs_nz`, and `becs` have been added as new values to enum request body parameter `bank_account.scheme` in `create_using_permanent_token` of `PaymentSource`. +- `archived` and `active` have been added as new values to enum query parameter `status.is` in `list_price_ramps` of `PriceRamp`. +- `archived` and `active` have been added as new values to enum query parameter `status.is_not` in `list_price_ramps` of `PriceRamp`. +- `archived` and `active` have been added as new values to enum query parameter `status.in` in `list_price_ramps` of `PriceRamp`. +- `archived` and `active` have been added as new values to enum query parameter `status.not_in` in `list_price_ramps` of `PriceRamp`. +- `true` and `false` have been added as new values to enum query parameter `business_entity_id.is_present` in `list_price_ramps` of `PriceRamp`. +- `true` and `false` have been added as new values to enum query parameter `include_site_level_resources.is` in `list_price_ramps` of `PriceRamp`. +- `updated_at`, `id`, and `status` have been added as new values to enum query parameter `sort_by.asc` in `list_price_ramps` of `PriceRamp`. +- `updated_at`, `id`, and `status` have been added as new values to enum query parameter `sort_by.desc` in `list_price_ramps` of `PriceRamp`. +- `active` and `archived` have been added as new values to enum request body parameter `status` in `update_a_price_ramp` of `PriceRamp`. + + + ### v3.34.0 (2026-09-24) * * * ### New Resources: diff --git a/VERSION b/VERSION index 5c0e053..b2f5d1d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.34.0 +3.35.0 diff --git a/package-lock.json b/package-lock.json index 17be07f..b6f3ae2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "chargebee", - "version": "3.34.0", + "version": "3.35.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "chargebee", - "version": "3.34.0", + "version": "3.35.0", "dependencies": { "zod": "^4.3.6" }, diff --git a/package.json b/package.json index d8204b0..759e1c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chargebee", - "version": "3.34.0", + "version": "3.35.0", "description": "A library for integrating with Chargebee.", "scripts": { "prepack": "npm ci && npm run build", diff --git a/src/environment.ts b/src/environment.ts index 4996f50..ff16a22 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.34.0', + clientVersion: 'v3.35.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 7b9565a..f9ca415 100644 --- a/src/resources/api_endpoints.ts +++ b/src/resources/api_endpoints.ts @@ -77,6 +77,8 @@ interface Endpoints { itemPrice: EndpointTuple[]; attachedItem: EndpointTuple[]; differentialPrice: EndpointTuple[]; + priceRamp: EndpointTuple[]; + rampInterval: EndpointTuple[]; configuration: EndpointTuple[]; feature: EndpointTuple[]; impactedSubscription: EndpointTuple[]; @@ -107,10 +109,14 @@ interface Endpoints { omnichannelOneTimeOrder: EndpointTuple[]; omnichannelOneTimeOrderItem: EndpointTuple[]; rule: EndpointTuple[]; + retrySegment: EndpointTuple[]; meter: EndpointTuple[]; + groupByAttribute: EndpointTuple[]; + groupByRecommendation: EndpointTuple[]; usageEvent: EndpointTuple[]; meteredFeature: EndpointTuple[]; customDataSchema: EndpointTuple[]; + customData: EndpointTuple[]; usageFile: EndpointTuple[]; einvoice: EndpointTuple[]; personalizedOffer: EndpointTuple[]; @@ -121,14 +127,24 @@ interface Endpoints { businessRule: EndpointTuple[]; applyRule: EndpointTuple[]; appliedRule: EndpointTuple[]; - appliedBusinessRule: EndpointTuple[]; businessRuleset: EndpointTuple[]; businessRulesetRule: EndpointTuple[]; + draftRequest: EndpointTuple[]; + citation: EndpointTuple[]; + execution: EndpointTuple[]; + draftEstimate: EndpointTuple[]; usageSummary: EndpointTuple[]; usageCharge: EndpointTuple[]; alert: EndpointTuple[]; filterCondition: EndpointTuple[]; alertStatus: EndpointTuple[]; + collectionsPaymentPromise: EndpointTuple[]; + collectionsDispute: EndpointTuple[]; + collectionsReminderSequence: EndpointTuple[]; + emailConversation: EndpointTuple[]; + emailMessage: EndpointTuple[]; + privateNote: EndpointTuple[]; + emailAttachment: EndpointTuple[]; ledgerAccountBalance: EndpointTuple[]; ledgerOperation: EndpointTuple[]; grantBlock: EndpointTuple[]; @@ -1847,6 +1863,19 @@ export const Endpoints: Endpoints = { isIdempotent: true, }, ], + [ + 'removePaymentScheduleScheme', + 'POST', + '/invoices', + '/remove_payment_schedule_scheme', + true, + null, + false, + {}, + { + isIdempotent: true, + }, + ], [ 'paymentSchedules', 'GET', @@ -3706,7 +3735,9 @@ export const Endpoints: Endpoints = { false, null, false, - {}, + { + attributes: 1, + }, { isIdempotent: true, }, @@ -4418,6 +4449,50 @@ export const Endpoints: Endpoints = { ], ['list', 'GET', '/differential_prices', null, false, null, false, {}, {}], ], + priceRamp: [ + [ + 'create', + 'POST', + '/price_ramps', + null, + false, + null, + false, + {}, + { + isIdempotent: true, + }, + ], + ['retrieve', 'GET', '/price_ramps', null, true, null, false, {}, {}], + [ + 'update', + 'POST', + '/price_ramps', + null, + true, + null, + false, + {}, + { + isIdempotent: true, + }, + ], + [ + 'delete', + 'POST', + '/price_ramps', + '/delete', + true, + null, + false, + {}, + { + isIdempotent: true, + }, + ], + ['list', 'GET', '/price_ramps', null, false, null, false, {}, {}], + ], + rampInterval: [], configuration: [ ['list', 'GET', '/configurations', null, false, null, false, {}, {}], ], @@ -4763,6 +4838,34 @@ export const Endpoints: Endpoints = { ], ], businessEntity: [ + [ + 'create', + 'POST', + '/business_entities', + null, + false, + null, + false, + {}, + { + isIdempotent: true, + }, + ], + ['list', 'GET', '/business_entities', null, false, null, false, {}, {}], + ['retrieve', 'GET', '/business_entities', null, true, null, false, {}, {}], + [ + 'update', + 'POST', + '/business_entities', + null, + true, + null, + false, + {}, + { + isIdempotent: true, + }, + ], [ 'createTransfers', 'POST', @@ -5144,7 +5247,12 @@ export const Endpoints: Endpoints = { ], omnichannelOneTimeOrderItem: [], rule: [['retrieve', 'GET', '/rules', null, true, null, false, {}, {}]], + retrySegment: [ + ['retrieve', 'GET', '/retry_segments', null, true, null, false, {}, {}], + ], meter: [['list', 'GET', '/meters', null, false, null, false, {}, {}]], + groupByAttribute: [], + groupByRecommendation: [], usageEvent: [ [ 'create', @@ -5228,6 +5336,7 @@ export const Endpoints: Endpoints = { ], ], customDataSchema: [], + customData: [], usageFile: [ [ 'uploadUrl', @@ -5485,7 +5594,6 @@ export const Endpoints: Endpoints = { ], applyRule: [], appliedRule: [], - appliedBusinessRule: [], businessRuleset: [ [ 'create', @@ -5601,6 +5709,10 @@ export const Endpoints: Endpoints = { ['retrieve', 'GET', '/business_rulesets', null, true, null, false, {}, {}], ], businessRulesetRule: [], + draftRequest: [], + citation: [], + execution: [], + draftEstimate: [], usageSummary: [ [ 'retrieveUsageSummaryForSubscription', @@ -5706,6 +5818,71 @@ export const Endpoints: Endpoints = { {}, ], ], + collectionsPaymentPromise: [ + [ + 'retrieve', + 'GET', + '/collections_payment_promises', + null, + true, + null, + false, + {}, + {}, + ], + [ + 'listCollectionsPaymentPromises', + 'GET', + '/collections_payment_promises', + null, + false, + null, + false, + {}, + {}, + ], + [ + 'createCollectionsPaymentPromise', + 'POST', + '/collections_payment_promises', + null, + false, + null, + false, + {}, + {}, + ], + [ + 'updateCollectionsPaymentPromise', + 'POST', + '/collections_payment_promises', + null, + true, + null, + false, + {}, + { + isIdempotent: true, + }, + ], + [ + 'cancel', + 'POST', + '/collections_payment_promises', + '/cancel', + true, + null, + false, + {}, + {}, + ], + ], + collectionsDispute: [], + collectionsReminderSequence: [], + emailConversation: [], + emailMessage: [], + privateNote: [], + emailAttachment: [], ledgerAccountBalance: [ [ 'listLedgerAccountBalances', @@ -5718,6 +5895,17 @@ export const Endpoints: Endpoints = { {}, {}, ], + [ + 'updateOverdraftLimit', + 'POST', + '/ledger_account_balances', + '/update_overdraft_limit', + false, + null, + false, + {}, + {}, + ], ], ledgerOperation: [ [ diff --git a/src/resources/webhook/content.ts b/src/resources/webhook/content.ts index c5d7848..202e561 100644 --- a/src/resources/webhook/content.ts +++ b/src/resources/webhook/content.ts @@ -80,10 +80,6 @@ export interface BusinessRuleUpdatedContent { BusinessRule: import('chargebee').BusinessRule; } -export interface BusinessRulesAppliedContent { - AppliedBusinessRule: import('chargebee').AppliedBusinessRule; -} - export interface BusinessRulesetActivatedContent { BusinessRuleset: import('chargebee').BusinessRuleset; } @@ -134,6 +130,88 @@ export interface CardUpdatedContent { Card: import('chargebee').Card; } +export interface ChargebackInitiatedContent { + Dispute: import('chargebee').Dispute; + + Transaction: import('chargebee').Transaction; + + Customer: import('chargebee').Customer; + + Subscription: import('chargebee').Subscription; +} + +export interface ChargebackLostContent { + Dispute: import('chargebee').Dispute; + + Transaction: import('chargebee').Transaction; + + Customer: import('chargebee').Customer; + + Subscription: import('chargebee').Subscription; +} + +export interface ChargebackWonContent { + Dispute: import('chargebee').Dispute; + + Transaction: import('chargebee').Transaction; + + Customer: import('chargebee').Customer; + + Subscription: import('chargebee').Subscription; +} + +export interface CollectionsDisputeCreatedContent { + CollectionsDispute: import('chargebee').CollectionsDispute; +} + +export interface CollectionsDisputeResolvedContent { + CollectionsDispute: import('chargebee').CollectionsDispute; +} + +export interface CollectionsDisputeUpdatedContent { + CollectionsDispute: import('chargebee').CollectionsDispute; +} + +export interface CollectionsDisputeWithdrawnContent { + CollectionsDispute: import('chargebee').CollectionsDispute; +} + +export interface CollectionsPaymentPromiseBrokenContent { + CollectionsPaymentPromise: import('chargebee').CollectionsPaymentPromise; +} + +export interface CollectionsPaymentPromiseCancelledContent { + CollectionsPaymentPromise: import('chargebee').CollectionsPaymentPromise; +} + +export interface CollectionsPaymentPromiseCreatedContent { + CollectionsPaymentPromise: import('chargebee').CollectionsPaymentPromise; +} + +export interface CollectionsPaymentPromiseFulfilledContent { + CollectionsPaymentPromise: import('chargebee').CollectionsPaymentPromise; +} + +export interface CollectionsPaymentPromiseUpdatedContent { + CollectionsPaymentPromise: import('chargebee').CollectionsPaymentPromise; +} + +export interface CollectionsReminderSequenceCompletedContent { + CollectionsReminderSequence: import('chargebee').CollectionsReminderSequence; +} + +export interface CollectionsReminderSequenceCreatedContent { + CollectionsReminderSequence: import('chargebee').CollectionsReminderSequence; +} + +export interface CollectionsReminderSequencePausedContent { + CollectionsReminderSequence: import('chargebee').CollectionsReminderSequence; +} + +export interface CollectionsReminderSequenceResumedContent { + CollectionsReminderSequence: import('chargebee').CollectionsReminderSequence; +} + export interface ContractTermCancelledContent { ContractTerm: import('chargebee').ContractTerm; } @@ -286,6 +364,10 @@ export interface EinvoiceUpdatedContent { Einvoice: import('chargebee').Einvoice; } +export interface EmailMessageReceivedContent { + EmailMessage: import('chargebee').EmailMessage; +} + export interface EntitlementOverridesAutoRemovedContent { Feature: import('chargebee').Feature; @@ -870,6 +952,10 @@ export interface PaymentScheduleSchemeDeletedContent { PaymentScheduleScheme: import('chargebee').PaymentScheduleScheme; } +export interface PaymentSchedulesCancelledContent { + PaymentSchedule: import('chargebee').PaymentSchedule; +} + export interface PaymentSchedulesCreatedContent { PaymentSchedule: import('chargebee').PaymentSchedule; } @@ -952,6 +1038,24 @@ export interface PlanUpdatedContent { Plan: import('chargebee').Plan; } +export interface PriceRampCreatedContent { + PriceRamp: import('chargebee').PriceRamp; + + RampInterval: import('chargebee').RampInterval; +} + +export interface PriceRampDeletedContent { + PriceRamp: import('chargebee').PriceRamp; + + RampInterval: import('chargebee').RampInterval; +} + +export interface PriceRampUpdatedContent { + PriceRamp: import('chargebee').PriceRamp; + + RampInterval: import('chargebee').RampInterval; +} + export interface PriceVariantCreatedContent { PriceVariant: import('chargebee').PriceVariant; @@ -970,6 +1074,10 @@ export interface PriceVariantUpdatedContent { Attribute: import('chargebee').Attribute; } +export interface PrivateNoteAddedContent { + PrivateNote: import('chargebee').PrivateNote; +} + export interface ProductCreatedContent {} export interface ProductDeletedContent {} @@ -1010,6 +1118,20 @@ export interface RecordPurchaseFailedContent { Customer: import('chargebee').Customer; } +export interface RefundFailedContent { + Transaction: import('chargebee').Transaction; + + Invoice: import('chargebee').Invoice; + + CreditNote: import('chargebee').CreditNote; + + Customer: import('chargebee').Customer; + + Subscription: import('chargebee').Subscription; + + Card: import('chargebee').Card; +} + export interface RefundInitiatedContent { Transaction: import('chargebee').Transaction; @@ -1601,8 +1723,6 @@ export type WebhookContentMap = { [WebhookEventType.BusinessRuleUpdated]: BusinessRuleUpdatedContent; - [WebhookEventType.BusinessRulesApplied]: BusinessRulesAppliedContent; - [WebhookEventType.BusinessRulesetActivated]: BusinessRulesetActivatedContent; [WebhookEventType.BusinessRulesetCreated]: BusinessRulesetCreatedContent; @@ -1623,6 +1743,38 @@ export type WebhookContentMap = { [WebhookEventType.CardUpdated]: CardUpdatedContent; + [WebhookEventType.ChargebackInitiated]: ChargebackInitiatedContent; + + [WebhookEventType.ChargebackLost]: ChargebackLostContent; + + [WebhookEventType.ChargebackWon]: ChargebackWonContent; + + [WebhookEventType.CollectionsDisputeCreated]: CollectionsDisputeCreatedContent; + + [WebhookEventType.CollectionsDisputeResolved]: CollectionsDisputeResolvedContent; + + [WebhookEventType.CollectionsDisputeUpdated]: CollectionsDisputeUpdatedContent; + + [WebhookEventType.CollectionsDisputeWithdrawn]: CollectionsDisputeWithdrawnContent; + + [WebhookEventType.CollectionsPaymentPromiseBroken]: CollectionsPaymentPromiseBrokenContent; + + [WebhookEventType.CollectionsPaymentPromiseCancelled]: CollectionsPaymentPromiseCancelledContent; + + [WebhookEventType.CollectionsPaymentPromiseCreated]: CollectionsPaymentPromiseCreatedContent; + + [WebhookEventType.CollectionsPaymentPromiseFulfilled]: CollectionsPaymentPromiseFulfilledContent; + + [WebhookEventType.CollectionsPaymentPromiseUpdated]: CollectionsPaymentPromiseUpdatedContent; + + [WebhookEventType.CollectionsReminderSequenceCompleted]: CollectionsReminderSequenceCompletedContent; + + [WebhookEventType.CollectionsReminderSequenceCreated]: CollectionsReminderSequenceCreatedContent; + + [WebhookEventType.CollectionsReminderSequencePaused]: CollectionsReminderSequencePausedContent; + + [WebhookEventType.CollectionsReminderSequenceResumed]: CollectionsReminderSequenceResumedContent; + [WebhookEventType.ContractTermCancelled]: ContractTermCancelledContent; [WebhookEventType.ContractTermCompleted]: ContractTermCompletedContent; @@ -1685,6 +1837,8 @@ export type WebhookContentMap = { [WebhookEventType.EinvoiceUpdated]: EinvoiceUpdatedContent; + [WebhookEventType.EmailMessageReceived]: EmailMessageReceivedContent; + [WebhookEventType.EntitlementOverridesAutoRemoved]: EntitlementOverridesAutoRemovedContent; [WebhookEventType.EntitlementOverridesRemoved]: EntitlementOverridesRemovedContent; @@ -1859,6 +2013,8 @@ export type WebhookContentMap = { [WebhookEventType.PaymentScheduleSchemeDeleted]: PaymentScheduleSchemeDeletedContent; + [WebhookEventType.PaymentSchedulesCancelled]: PaymentSchedulesCancelledContent; + [WebhookEventType.PaymentSchedulesCreated]: PaymentSchedulesCreatedContent; [WebhookEventType.PaymentSchedulesUpdated]: PaymentSchedulesUpdatedContent; @@ -1889,12 +2045,20 @@ export type WebhookContentMap = { [WebhookEventType.PlanUpdated]: PlanUpdatedContent; + [WebhookEventType.PriceRampCreated]: PriceRampCreatedContent; + + [WebhookEventType.PriceRampDeleted]: PriceRampDeletedContent; + + [WebhookEventType.PriceRampUpdated]: PriceRampUpdatedContent; + [WebhookEventType.PriceVariantCreated]: PriceVariantCreatedContent; [WebhookEventType.PriceVariantDeleted]: PriceVariantDeletedContent; [WebhookEventType.PriceVariantUpdated]: PriceVariantUpdatedContent; + [WebhookEventType.PrivateNoteAdded]: PrivateNoteAddedContent; + [WebhookEventType.ProductCreated]: ProductCreatedContent; [WebhookEventType.ProductDeleted]: ProductDeletedContent; @@ -1915,6 +2079,8 @@ export type WebhookContentMap = { [WebhookEventType.RecordPurchaseFailed]: RecordPurchaseFailedContent; + [WebhookEventType.RefundFailed]: RefundFailedContent; + [WebhookEventType.RefundInitiated]: RefundInitiatedContent; [WebhookEventType.RuleCreated]: RuleCreatedContent; diff --git a/src/resources/webhook/eventType.ts b/src/resources/webhook/eventType.ts index b29be6a..a4bca94 100644 --- a/src/resources/webhook/eventType.ts +++ b/src/resources/webhook/eventType.ts @@ -41,8 +41,6 @@ export enum WebhookEventType { BusinessRuleUpdated = 'business_rule_updated', - BusinessRulesApplied = 'business_rules_applied', - BusinessRulesetActivated = 'business_ruleset_activated', BusinessRulesetCreated = 'business_ruleset_created', @@ -63,6 +61,38 @@ export enum WebhookEventType { CardUpdated = 'card_updated', + ChargebackInitiated = 'chargeback_initiated', + + ChargebackLost = 'chargeback_lost', + + ChargebackWon = 'chargeback_won', + + CollectionsDisputeCreated = 'collections_dispute_created', + + CollectionsDisputeResolved = 'collections_dispute_resolved', + + CollectionsDisputeUpdated = 'collections_dispute_updated', + + CollectionsDisputeWithdrawn = 'collections_dispute_withdrawn', + + CollectionsPaymentPromiseBroken = 'collections_payment_promise_broken', + + CollectionsPaymentPromiseCancelled = 'collections_payment_promise_cancelled', + + CollectionsPaymentPromiseCreated = 'collections_payment_promise_created', + + CollectionsPaymentPromiseFulfilled = 'collections_payment_promise_fulfilled', + + CollectionsPaymentPromiseUpdated = 'collections_payment_promise_updated', + + CollectionsReminderSequenceCompleted = 'collections_reminder_sequence_completed', + + CollectionsReminderSequenceCreated = 'collections_reminder_sequence_created', + + CollectionsReminderSequencePaused = 'collections_reminder_sequence_paused', + + CollectionsReminderSequenceResumed = 'collections_reminder_sequence_resumed', + ContractTermCancelled = 'contract_term_cancelled', ContractTermCompleted = 'contract_term_completed', @@ -125,6 +155,8 @@ export enum WebhookEventType { EinvoiceUpdated = 'einvoice_updated', + EmailMessageReceived = 'email_message_received', + EntitlementOverridesAutoRemoved = 'entitlement_overrides_auto_removed', EntitlementOverridesRemoved = 'entitlement_overrides_removed', @@ -299,6 +331,8 @@ export enum WebhookEventType { PaymentScheduleSchemeDeleted = 'payment_schedule_scheme_deleted', + PaymentSchedulesCancelled = 'payment_schedules_cancelled', + PaymentSchedulesCreated = 'payment_schedules_created', PaymentSchedulesUpdated = 'payment_schedules_updated', @@ -329,12 +363,20 @@ export enum WebhookEventType { PlanUpdated = 'plan_updated', + PriceRampCreated = 'price_ramp_created', + + PriceRampDeleted = 'price_ramp_deleted', + + PriceRampUpdated = 'price_ramp_updated', + PriceVariantCreated = 'price_variant_created', PriceVariantDeleted = 'price_variant_deleted', PriceVariantUpdated = 'price_variant_updated', + PrivateNoteAdded = 'private_note_added', + ProductCreated = 'product_created', ProductDeleted = 'product_deleted', @@ -355,6 +397,8 @@ export enum WebhookEventType { RecordPurchaseFailed = 'record_purchase_failed', + RefundFailed = 'refund_failed', + RefundInitiated = 'refund_initiated', RuleCreated = 'rule_created', diff --git a/src/schema/business_entity.schema.ts b/src/schema/business_entity.schema.ts index ddc3d67..02e99b0 100644 --- a/src/schema/business_entity.schema.ts +++ b/src/schema/business_entity.schema.ts @@ -1,9 +1,50 @@ // Generated Zod schemas: BusinessEntity -// Actions: createTransfers, getTransfers +// Actions: create, list, update, createTransfers, getTransfers // Do not edit manually – regenerate via sdk-generator import { z } from 'zod'; +//BusinessEntity.create + +const CreateBusinessEntityBodySchema = z.looseObject({ + name: z.string().max(100), + status: z.enum(['active', 'inactive']), +}); +export { CreateBusinessEntityBodySchema }; +export type CreateBusinessEntityBody = z.infer< + typeof CreateBusinessEntityBodySchema +>; + +//BusinessEntity.list + +const ListBusinessEntityNameSchema = z.object({ + is: z.string().min(1).optional(), + is_not: z.string().min(1).optional(), + starts_with: z.string().min(1).optional(), + is_present: z.enum(['true', 'false']).optional(), +}); +const ListBusinessEntityBodySchema = z.looseObject({ + limit: z.number().int().min(1).max(100).optional(), + offset: z.string().max(1000).optional(), + include_deleted: z.boolean().default(false).optional(), + name: ListBusinessEntityNameSchema.optional(), +}); +export { ListBusinessEntityBodySchema }; +export type ListBusinessEntityBody = z.infer< + typeof ListBusinessEntityBodySchema +>; + +//BusinessEntity.update + +const UpdateBusinessEntityBodySchema = z.looseObject({ + name: z.string().max(100).optional(), + status: z.enum(['active', 'inactive']).optional(), +}); +export { UpdateBusinessEntityBodySchema }; +export type UpdateBusinessEntityBody = z.infer< + typeof UpdateBusinessEntityBodySchema +>; + //BusinessEntity.createTransfers const CreateTransfersBusinessEntityBodySchema = z.looseObject({ diff --git a/src/schema/collections_payment_promise.schema.ts b/src/schema/collections_payment_promise.schema.ts new file mode 100644 index 0000000..8f0559d --- /dev/null +++ b/src/schema/collections_payment_promise.schema.ts @@ -0,0 +1,68 @@ +// Generated Zod schemas: CollectionsPaymentPromise +// Actions: listCollectionsPaymentPromises, createCollectionsPaymentPromise, updateCollectionsPaymentPromise +// Do not edit manually – regenerate via sdk-generator + +import { z } from 'zod'; + +//CollectionsPaymentPromise.listCollectionsPaymentPromises + +const ListCollectionsPaymentPromisesCollectionsPaymentPromiseCustomerIdSchema = + z.object({ + is: z.string().min(1).optional(), + }); +const ListCollectionsPaymentPromisesCollectionsPaymentPromiseInvoiceIdSchema = + z.object({ + is: z.string().min(1).optional(), + }); +const ListCollectionsPaymentPromisesCollectionsPaymentPromiseStatusSchema = + z.object({ + is: z.enum(['active', 'fulfilled', 'broken', 'cancelled']).optional(), + }); +const ListCollectionsPaymentPromisesCollectionsPaymentPromiseBodySchema = + z.looseObject({ + limit: z.number().int().min(1).max(100).optional(), + offset: z.string().max(1000).optional(), + customer_id: + ListCollectionsPaymentPromisesCollectionsPaymentPromiseCustomerIdSchema.optional(), + invoice_id: + ListCollectionsPaymentPromisesCollectionsPaymentPromiseInvoiceIdSchema.optional(), + status: + ListCollectionsPaymentPromisesCollectionsPaymentPromiseStatusSchema.optional(), + }); +export { ListCollectionsPaymentPromisesCollectionsPaymentPromiseBodySchema }; +export type ListCollectionsPaymentPromisesCollectionsPaymentPromiseBody = + z.infer< + typeof ListCollectionsPaymentPromisesCollectionsPaymentPromiseBodySchema + >; + +//CollectionsPaymentPromise.createCollectionsPaymentPromise + +const CreateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema = + z.looseObject({ + customer_id: z.string().max(100), + invoice_id: z.string().max(100).optional(), + amount: z.number().int(), + currency_code: z.string().max(3).optional(), + promised_on: z.number().int(), + reason: z.string().max(500).optional(), + promised_by: z.string().max(254).optional(), + }); +export { CreateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema }; +export type CreateCollectionsPaymentPromiseCollectionsPaymentPromiseBody = + z.infer< + typeof CreateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema + >; + +//CollectionsPaymentPromise.updateCollectionsPaymentPromise + +const UpdateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema = + z.looseObject({ + promised_on: z.number().int().optional(), + reason: z.string().max(500).optional(), + promised_by: z.string().max(254).optional(), + }); +export { UpdateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema }; +export type UpdateCollectionsPaymentPromiseCollectionsPaymentPromiseBody = + z.infer< + typeof UpdateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema + >; diff --git a/src/schema/comment.schema.ts b/src/schema/comment.schema.ts index ff0d4ed..9e109b8 100644 --- a/src/schema/comment.schema.ts +++ b/src/schema/comment.schema.ts @@ -23,6 +23,7 @@ const CreateCommentBodySchema = z.looseObject({ 'item', 'item_price', 'price_variant', + 'task', ]), entity_id: z.string().max(100), notes: z.string().max(1000), @@ -63,6 +64,7 @@ const ListCommentBodySchema = z.looseObject({ 'item', 'item_price', 'price_variant', + 'task', ]) .optional(), entity_id: z.string().max(100).optional(), diff --git a/src/schema/coupon.schema.ts b/src/schema/coupon.schema.ts index 607c5ef..21f1506 100644 --- a/src/schema/coupon.schema.ts +++ b/src/schema/coupon.schema.ts @@ -282,8 +282,8 @@ const ListCouponCurrencyCodeSchema = z.object({ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), }); const ListCouponApplicableItemPriceIdsSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListCouponBodySchema = z.looseObject({ limit: z.number().int().min(1).max(100).optional(), diff --git a/src/schema/credit_note.schema.ts b/src/schema/credit_note.schema.ts index fea3a56..68fa025 100644 --- a/src/schema/credit_note.schema.ts +++ b/src/schema/credit_note.schema.ts @@ -563,6 +563,7 @@ const ImportCreditNoteCreditNoteBodySchema = z.looseObject({ currency_code: z.string().max(3).optional(), create_reason_code: z.string().max(100), date: z.number().int(), + customer_notes: z.string().max(2000).optional(), status: z.enum(['adjusted', 'refunded', 'refund_due', 'voided']).optional(), total: z.number().int().min(0).optional(), refunded_at: z.number().int().optional(), diff --git a/src/schema/credit_unit.schema.ts b/src/schema/credit_unit.schema.ts index c0dae98..b3fd74a 100644 --- a/src/schema/credit_unit.schema.ts +++ b/src/schema/credit_unit.schema.ts @@ -7,12 +7,12 @@ import { z } from 'zod'; //CreditUnit.list const ListCreditUnitStatusSchema = z.object({ - is: z.enum(['active', 'archived']).optional(), in: z.enum(['active', 'archived']).optional(), + is: z.enum(['active', 'archived']).optional(), }); const ListCreditUnitIdSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListCreditUnitBodySchema = z.looseObject({ limit: z.number().int().min(1).max(100).optional(), diff --git a/src/schema/einvoice.schema.ts b/src/schema/einvoice.schema.ts index 599c706..8575422 100644 --- a/src/schema/einvoice.schema.ts +++ b/src/schema/einvoice.schema.ts @@ -7,12 +7,12 @@ import { z } from 'zod'; //Einvoice.listEinvoices const ListEinvoicesEinvoiceIdSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListEinvoicesEinvoiceReferenceIdSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListEinvoicesEinvoiceUpdatedAtSchema = z.object({ after: z.string().regex(RegExp('^\\d{10}$')).optional(), diff --git a/src/schema/entitlement.schema.ts b/src/schema/entitlement.schema.ts index 88bcd00..f321142 100644 --- a/src/schema/entitlement.schema.ts +++ b/src/schema/entitlement.schema.ts @@ -7,20 +7,20 @@ import { z } from 'zod'; //Entitlement.list const ListEntitlementFeatureIdSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListEntitlementEntityTypeSchema = z.object({ - is: z + in: z .enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price']) .optional(), - in: z + is: z .enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price']) .optional(), }); const ListEntitlementEntityIdSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListEntitlementBodySchema = z.looseObject({ limit: z.number().int().min(1).max(100).optional(), diff --git a/src/schema/estimate.schema.ts b/src/schema/estimate.schema.ts index 2272605..9cb3801 100644 --- a/src/schema/estimate.schema.ts +++ b/src/schema/estimate.schema.ts @@ -293,7 +293,7 @@ const CreateSubItemEstimateEstimateSubscriptionItemsSchema = z.object({ billing_cycles: z.array(z.number().int().min(0).optional()).optional(), trial_end: z.array(z.number().int().optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -583,7 +583,7 @@ const CreateSubItemForCustomerEstimateEstimateSubscriptionItemsSchema = billing_cycles: z.array(z.number().int().min(0).optional()).optional(), trial_end: z.array(z.number().int().optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -892,7 +892,7 @@ const UpdateSubscriptionForItemsEstimateSubscriptionItemsSchema = z.object({ billing_cycles: z.array(z.number().int().min(0).optional()).optional(), trial_end: z.array(z.number().int().optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -1126,7 +1126,7 @@ const CancelSubscriptionForItemsEstimateSubscriptionItemsSchema = z.object({ unit_price: z.array(z.number().int().min(0).optional()).optional(), unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), }); const CancelSubscriptionForItemsEstimateBodySchema = z.looseObject({ diff --git a/src/schema/event.schema.ts b/src/schema/event.schema.ts index e87dd65..91a38ab 100644 --- a/src/schema/event.schema.ts +++ b/src/schema/event.schema.ts @@ -134,6 +134,7 @@ const ListEventEventTypeSchema = z.object({ 'payment_schedules_updated', 'payment_schedule_scheme_created', 'payment_schedule_scheme_deleted', + 'payment_schedules_cancelled', 'subscription_renewal_reminder', 'add_usages_reminder', 'payment_due_reminder', @@ -144,6 +145,7 @@ const ListEventEventTypeSchema = z.object({ 'payment_failed', 'dunning_updated', 'payment_refunded', + 'refund_failed', 'payment_initiated', 'refund_initiated', 'netd_payment_due_reminder', @@ -295,6 +297,9 @@ const ListEventEventTypeSchema = z.object({ 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', + 'price_ramp_created', + 'price_ramp_updated', + 'price_ramp_deleted', 'omnichannel_subscription_item_mrr_updated', 'ledger_account_balance_updated', 'grant_blocks_created', @@ -309,12 +314,29 @@ const ListEventEventTypeSchema = z.object({ 'vault_token_created', 'vault_token_updated', 'vault_token_deleted', - 'business_rules_applied', + 'chargeback_initiated', + 'chargeback_won', + 'chargeback_lost', 'business_ruleset_created', 'business_ruleset_updated', 'business_ruleset_activated', 'business_ruleset_deactivated', 'business_ruleset_deleted', + 'collections_reminder_sequence_created', + 'collections_reminder_sequence_paused', + 'collections_reminder_sequence_resumed', + 'collections_reminder_sequence_completed', + 'collections_payment_promise_created', + 'collections_payment_promise_updated', + 'collections_payment_promise_fulfilled', + 'collections_payment_promise_cancelled', + 'collections_payment_promise_broken', + 'collections_dispute_created', + 'collections_dispute_updated', + 'collections_dispute_resolved', + 'collections_dispute_withdrawn', + 'email_message_received', + 'private_note_added', ]) .optional(), is_not: z @@ -383,6 +405,7 @@ const ListEventEventTypeSchema = z.object({ 'payment_schedules_updated', 'payment_schedule_scheme_created', 'payment_schedule_scheme_deleted', + 'payment_schedules_cancelled', 'subscription_renewal_reminder', 'add_usages_reminder', 'payment_due_reminder', @@ -393,6 +416,7 @@ const ListEventEventTypeSchema = z.object({ 'payment_failed', 'dunning_updated', 'payment_refunded', + 'refund_failed', 'payment_initiated', 'refund_initiated', 'netd_payment_due_reminder', @@ -544,6 +568,9 @@ const ListEventEventTypeSchema = z.object({ 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', + 'price_ramp_created', + 'price_ramp_updated', + 'price_ramp_deleted', 'omnichannel_subscription_item_mrr_updated', 'ledger_account_balance_updated', 'grant_blocks_created', @@ -558,12 +585,29 @@ const ListEventEventTypeSchema = z.object({ 'vault_token_created', 'vault_token_updated', 'vault_token_deleted', - 'business_rules_applied', + 'chargeback_initiated', + 'chargeback_won', + 'chargeback_lost', 'business_ruleset_created', 'business_ruleset_updated', 'business_ruleset_activated', 'business_ruleset_deactivated', 'business_ruleset_deleted', + 'collections_reminder_sequence_created', + 'collections_reminder_sequence_paused', + 'collections_reminder_sequence_resumed', + 'collections_reminder_sequence_completed', + 'collections_payment_promise_created', + 'collections_payment_promise_updated', + 'collections_payment_promise_fulfilled', + 'collections_payment_promise_cancelled', + 'collections_payment_promise_broken', + 'collections_dispute_created', + 'collections_dispute_updated', + 'collections_dispute_resolved', + 'collections_dispute_withdrawn', + 'email_message_received', + 'private_note_added', ]) .optional(), in: z @@ -632,6 +676,7 @@ const ListEventEventTypeSchema = z.object({ 'payment_schedules_updated', 'payment_schedule_scheme_created', 'payment_schedule_scheme_deleted', + 'payment_schedules_cancelled', 'subscription_renewal_reminder', 'add_usages_reminder', 'payment_due_reminder', @@ -642,6 +687,7 @@ const ListEventEventTypeSchema = z.object({ 'payment_failed', 'dunning_updated', 'payment_refunded', + 'refund_failed', 'payment_initiated', 'refund_initiated', 'netd_payment_due_reminder', @@ -793,6 +839,9 @@ const ListEventEventTypeSchema = z.object({ 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', + 'price_ramp_created', + 'price_ramp_updated', + 'price_ramp_deleted', 'omnichannel_subscription_item_mrr_updated', 'ledger_account_balance_updated', 'grant_blocks_created', @@ -807,12 +856,29 @@ const ListEventEventTypeSchema = z.object({ 'vault_token_created', 'vault_token_updated', 'vault_token_deleted', - 'business_rules_applied', + 'chargeback_initiated', + 'chargeback_won', + 'chargeback_lost', 'business_ruleset_created', 'business_ruleset_updated', 'business_ruleset_activated', 'business_ruleset_deactivated', 'business_ruleset_deleted', + 'collections_reminder_sequence_created', + 'collections_reminder_sequence_paused', + 'collections_reminder_sequence_resumed', + 'collections_reminder_sequence_completed', + 'collections_payment_promise_created', + 'collections_payment_promise_updated', + 'collections_payment_promise_fulfilled', + 'collections_payment_promise_cancelled', + 'collections_payment_promise_broken', + 'collections_dispute_created', + 'collections_dispute_updated', + 'collections_dispute_resolved', + 'collections_dispute_withdrawn', + 'email_message_received', + 'private_note_added', ]) .optional(), not_in: z @@ -881,6 +947,7 @@ const ListEventEventTypeSchema = z.object({ 'payment_schedules_updated', 'payment_schedule_scheme_created', 'payment_schedule_scheme_deleted', + 'payment_schedules_cancelled', 'subscription_renewal_reminder', 'add_usages_reminder', 'payment_due_reminder', @@ -891,6 +958,7 @@ const ListEventEventTypeSchema = z.object({ 'payment_failed', 'dunning_updated', 'payment_refunded', + 'refund_failed', 'payment_initiated', 'refund_initiated', 'netd_payment_due_reminder', @@ -1042,6 +1110,9 @@ const ListEventEventTypeSchema = z.object({ 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', + 'price_ramp_created', + 'price_ramp_updated', + 'price_ramp_deleted', 'omnichannel_subscription_item_mrr_updated', 'ledger_account_balance_updated', 'grant_blocks_created', @@ -1056,12 +1127,29 @@ const ListEventEventTypeSchema = z.object({ 'vault_token_created', 'vault_token_updated', 'vault_token_deleted', - 'business_rules_applied', + 'chargeback_initiated', + 'chargeback_won', + 'chargeback_lost', 'business_ruleset_created', 'business_ruleset_updated', 'business_ruleset_activated', 'business_ruleset_deactivated', 'business_ruleset_deleted', + 'collections_reminder_sequence_created', + 'collections_reminder_sequence_paused', + 'collections_reminder_sequence_resumed', + 'collections_reminder_sequence_completed', + 'collections_payment_promise_created', + 'collections_payment_promise_updated', + 'collections_payment_promise_fulfilled', + 'collections_payment_promise_cancelled', + 'collections_payment_promise_broken', + 'collections_dispute_created', + 'collections_dispute_updated', + 'collections_dispute_resolved', + 'collections_dispute_withdrawn', + 'email_message_received', + 'private_note_added', ]) .optional(), }); @@ -1079,6 +1167,9 @@ const ListEventSourceSchema = z.object({ 'migration', 'bulk_operation', 'external_service', + 'mcp', + 'copilot', + 'agent', ]) .optional(), is_not: z @@ -1094,6 +1185,9 @@ const ListEventSourceSchema = z.object({ 'migration', 'bulk_operation', 'external_service', + 'mcp', + 'copilot', + 'agent', ]) .optional(), in: z @@ -1109,6 +1203,9 @@ const ListEventSourceSchema = z.object({ 'migration', 'bulk_operation', 'external_service', + 'mcp', + 'copilot', + 'agent', ]) .optional(), not_in: z @@ -1124,6 +1221,9 @@ const ListEventSourceSchema = z.object({ 'migration', 'bulk_operation', 'external_service', + 'mcp', + 'copilot', + 'agent', ]) .optional(), }); diff --git a/src/schema/export.schema.ts b/src/schema/export.schema.ts index 037cccf..e5df614 100644 --- a/src/schema/export.schema.ts +++ b/src/schema/export.schema.ts @@ -1128,8 +1128,8 @@ const CouponsExportCurrencyCodeSchema = z.object({ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), }); const CouponsExportApplicableItemPriceIdsSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const CouponsExportIdSchema = z.object({ is: z.string().min(1).optional(), @@ -3058,8 +3058,8 @@ export type OrdersExportBody = z.infer; //Export.itemFamilies const ItemFamiliesExportBusinessEntityIdSchema = z.object({ - is: z.string().min(1).optional(), is_present: z.enum(['true', 'false']).optional(), + is: z.string().min(1).optional(), }); const ItemFamiliesExportIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), @@ -3103,8 +3103,8 @@ export type ItemFamiliesExportBody = z.infer< //Export.items const ItemsExportBusinessEntityIdSchema = z.object({ - is: z.string().min(1).optional(), is_present: z.enum(['true', 'false']).optional(), + is: z.string().min(1).optional(), }); const ItemsExportIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), @@ -3223,8 +3223,8 @@ const ItemPricesExportCurrencyCodeSchema = z.object({ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), }); const ItemPricesExportBusinessEntityIdSchema = z.object({ - is: z.string().min(1).optional(), is_present: z.enum(['true', 'false']).optional(), + is: z.string().min(1).optional(), }); const ItemPricesExportIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), @@ -3498,8 +3498,8 @@ export type DifferentialPricesExportBody = z.infer< //Export.priceVariants const PriceVariantsExportBusinessEntityIdSchema = z.object({ - is: z.string().min(1).optional(), is_present: z.enum(['true', 'false']).optional(), + is: z.string().min(1).optional(), }); const PriceVariantsExportIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), @@ -3559,12 +3559,12 @@ export type PriceVariantsExportBody = z.infer< //Export.ramps const RampsExportStatusSchema = z.object({ - is: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(), in: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(), + is: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(), }); const RampsExportSubscriptionIdSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const RampsExportEffectiveFromSchema = z.object({ after: z.string().regex(RegExp('^\\d{10}$')).optional(), diff --git a/src/schema/hosted_page.schema.ts b/src/schema/hosted_page.schema.ts index a84ec42..27fe787 100644 --- a/src/schema/hosted_page.schema.ts +++ b/src/schema/hosted_page.schema.ts @@ -774,7 +774,7 @@ const CheckoutNewForItemsHostedPageSubscriptionItemsSchema = z.object({ billing_cycles: z.array(z.number().int().min(0).optional()).optional(), trial_end: z.array(z.number().int().optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -1167,7 +1167,7 @@ const CheckoutExistingForItemsHostedPageSubscriptionItemsSchema = z.object({ billing_cycles: z.array(z.number().int().min(0).optional()).optional(), trial_end: z.array(z.number().int().optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( diff --git a/src/schema/index.ts b/src/schema/index.ts index 723002c..f4729d6 100644 --- a/src/schema/index.ts +++ b/src/schema/index.ts @@ -8,6 +8,7 @@ export * from './business_entity.schema.js'; export * from './business_rule.schema.js'; export * from './business_ruleset.schema.js'; export * from './card.schema.js'; +export * from './collections_payment_promise.schema.js'; export * from './comment.schema.js'; export * from './coupon.schema.js'; export * from './coupon_code.schema.js'; @@ -55,6 +56,7 @@ export * from './payment_voucher.schema.js'; export * from './personalized_offer.schema.js'; export * from './plan.schema.js'; export * from './portal_session.schema.js'; +export * from './price_ramp.schema.js'; export * from './price_variant.schema.js'; export * from './pricing_page_session.schema.js'; export * from './promotional_credit.schema.js'; @@ -65,6 +67,7 @@ export * from './quote_entitlement.schema.js'; export * from './ramp.schema.js'; export * from './recorded_purchase.schema.js'; export * from './resource_migration.schema.js'; +export * from './retry_segment.schema.js'; export * from './site_migration_detail.schema.js'; export * from './subscription.schema.js'; export * from './subscription_entitlement.schema.js'; diff --git a/src/schema/invoice.schema.ts b/src/schema/invoice.schema.ts index 9e776d9..c3a1240 100644 --- a/src/schema/invoice.schema.ts +++ b/src/schema/invoice.schema.ts @@ -1,5 +1,5 @@ // Generated Zod schemas: Invoice -// Actions: create, createForChargeItemsAndCharges, charge, chargeAddon, createForChargeItem, stopDunning, pauseDunning, resumeDunning, importInvoice, applyPayments, deleteLineItems, applyCredits, list, invoicesForCustomer, invoicesForSubscription, retrieve, pdf, listPaymentReferenceNumbers, addCharge, addAddonCharge, addChargeItem, close, collectPayment, recordPayment, recordTaxWithheld, removeTaxWithheld, refund, recordRefund, removePayment, removeCreditNote, voidInvoice, writeOff, voidBeforeCapture, delete, updateDetails, applyPaymentScheduleScheme +// Actions: create, createForChargeItemsAndCharges, charge, chargeAddon, createForChargeItem, stopDunning, pauseDunning, resumeDunning, importInvoice, applyPayments, deleteLineItems, applyCredits, list, invoicesForCustomer, invoicesForSubscription, retrieve, pdf, listPaymentReferenceNumbers, addCharge, addAddonCharge, addChargeItem, close, collectPayment, recordPayment, recordTaxWithheld, removeTaxWithheld, refund, recordRefund, removePayment, removeCreditNote, voidInvoice, writeOff, voidBeforeCapture, delete, updateDetails, applyPaymentScheduleScheme, removePaymentScheduleScheme // Do not edit manually – regenerate via sdk-generator import { z } from 'zod'; @@ -1133,6 +1133,23 @@ const ImportInvoiceInvoiceLineItemsSchema = z.object({ tax10_amount: z.array(z.number().int().min(0).optional()).optional(), is_partial_tax_applied: z.array(z.boolean().optional()).optional(), taxable_amount: z.array(z.number().int().min(0).optional()).optional(), + tax_exempt_reason: z + .array( + z + .enum([ + 'region_non_taxable', + 'export', + 'customer_exempt', + 'product_exempt', + 'zero_rated', + 'reverse_charge', + 'high_value_physical_goods', + 'zero_value_item', + 'tax_not_configured_external_provider', + ]) + .optional(), + ) + .optional(), proration_mode: z .array( z @@ -1598,12 +1615,12 @@ export type PdfInvoiceBody = z.infer; //Invoice.listPaymentReferenceNumbers const ListPaymentReferenceNumbersInvoiceIdSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListPaymentReferenceNumbersInvoiceNumberSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListPaymentReferenceNumbersInvoicePaymentReferenceNumberItemSchema = z.object({ @@ -2017,3 +2034,13 @@ export { ApplyPaymentScheduleSchemeInvoiceBodySchema }; export type ApplyPaymentScheduleSchemeInvoiceBody = z.infer< typeof ApplyPaymentScheduleSchemeInvoiceBodySchema >; + +//Invoice.removePaymentScheduleScheme + +const RemovePaymentScheduleSchemeInvoiceBodySchema = z.looseObject({ + comment: z.string().max(300).optional(), +}); +export { RemovePaymentScheduleSchemeInvoiceBodySchema }; +export type RemovePaymentScheduleSchemeInvoiceBody = z.infer< + typeof RemovePaymentScheduleSchemeInvoiceBodySchema +>; diff --git a/src/schema/item.schema.ts b/src/schema/item.schema.ts index b2ed785..4db679a 100644 --- a/src/schema/item.schema.ts +++ b/src/schema/item.schema.ts @@ -164,8 +164,8 @@ const ListItemChannelSchema = z.object({ not_in: z.enum(['web', 'app_store', 'play_store']).optional(), }); const ListItemBusinessEntityIdSchema = z.object({ - is: z.string().min(1).optional(), is_present: z.enum(['true', 'false']).optional(), + is: z.string().min(1).optional(), }); const ListItemIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), diff --git a/src/schema/item_family.schema.ts b/src/schema/item_family.schema.ts index bec4cb2..7cc2c11 100644 --- a/src/schema/item_family.schema.ts +++ b/src/schema/item_family.schema.ts @@ -36,8 +36,8 @@ const ListItemFamilyUpdatedAtSchema = z.object({ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), }); const ListItemFamilyBusinessEntityIdSchema = z.object({ - is: z.string().min(1).optional(), is_present: z.enum(['true', 'false']).optional(), + is: z.string().min(1).optional(), }); const ListItemFamilyIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), diff --git a/src/schema/item_price.schema.ts b/src/schema/item_price.schema.ts index e96efaa..9356504 100644 --- a/src/schema/item_price.schema.ts +++ b/src/schema/item_price.schema.ts @@ -262,8 +262,8 @@ const ListItemPriceUpdatedAtSchema = z.object({ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), }); const ListItemPriceBusinessEntityIdSchema = z.object({ - is: z.string().min(1).optional(), is_present: z.enum(['true', 'false']).optional(), + is: z.string().min(1).optional(), }); const ListItemPriceIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), diff --git a/src/schema/ledger_account_balance.schema.ts b/src/schema/ledger_account_balance.schema.ts index 4e54e43..02aff3f 100644 --- a/src/schema/ledger_account_balance.schema.ts +++ b/src/schema/ledger_account_balance.schema.ts @@ -1,5 +1,5 @@ // Generated Zod schemas: LedgerAccountBalance -// Actions: listLedgerAccountBalances +// Actions: listLedgerAccountBalances, updateOverdraftLimit // Do not edit manually – regenerate via sdk-generator import { z } from 'zod'; @@ -24,3 +24,17 @@ export { ListLedgerAccountBalancesLedgerAccountBalanceBodySchema }; export type ListLedgerAccountBalancesLedgerAccountBalanceBody = z.infer< typeof ListLedgerAccountBalancesLedgerAccountBalanceBodySchema >; + +//LedgerAccountBalance.updateOverdraftLimit + +const UpdateOverdraftLimitLedgerAccountBalanceBodySchema = z.looseObject({ + subscription_id: z.string().max(50), + unit_id: z.string().max(50), + is_unlimited: z.boolean(), + limit: z.string().max(36).optional(), + change_reason: z.string().max(255).optional(), +}); +export { UpdateOverdraftLimitLedgerAccountBalanceBodySchema }; +export type UpdateOverdraftLimitLedgerAccountBalanceBody = z.infer< + typeof UpdateOverdraftLimitLedgerAccountBalanceBodySchema +>; diff --git a/src/schema/ledger_operation.schema.ts b/src/schema/ledger_operation.schema.ts index 6ead1da..64e02c0 100644 --- a/src/schema/ledger_operation.schema.ts +++ b/src/schema/ledger_operation.schema.ts @@ -19,7 +19,7 @@ const ListLedgerOperationsLedgerOperationCreatedAtSchema = z.object({ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), }); const ListLedgerOperationsLedgerOperationTypeSchema = z.object({ - is: z + in: z .enum([ 'allocation', 'capture', @@ -33,7 +33,7 @@ const ListLedgerOperationsLedgerOperationTypeSchema = z.object({ 'overdraft_settlement', ]) .optional(), - in: z + is: z .enum([ 'allocation', 'capture', diff --git a/src/schema/omnichannel_one_time_order.schema.ts b/src/schema/omnichannel_one_time_order.schema.ts index 77908da..2cee685 100644 --- a/src/schema/omnichannel_one_time_order.schema.ts +++ b/src/schema/omnichannel_one_time_order.schema.ts @@ -7,10 +7,18 @@ import { z } from 'zod'; //OmnichannelOneTimeOrder.list const ListOmnichannelOneTimeOrderSourceSchema = z.object({ - is: z.enum(['apple_app_store', 'google_play_store']).optional(), - is_not: z.enum(['apple_app_store', 'google_play_store']).optional(), - in: z.enum(['apple_app_store', 'google_play_store']).optional(), - not_in: z.enum(['apple_app_store', 'google_play_store']).optional(), + is: z + .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store']) + .optional(), + is_not: z + .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store']) + .optional(), + in: z + .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store']) + .optional(), + not_in: z + .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store']) + .optional(), }); const ListOmnichannelOneTimeOrderCustomerIdSchema = z.object({ is: z.string().min(1).optional(), diff --git a/src/schema/omnichannel_subscription.schema.ts b/src/schema/omnichannel_subscription.schema.ts index 0d66ba3..98b83fc 100644 --- a/src/schema/omnichannel_subscription.schema.ts +++ b/src/schema/omnichannel_subscription.schema.ts @@ -7,10 +7,18 @@ import { z } from 'zod'; //OmnichannelSubscription.list const ListOmnichannelSubscriptionSourceSchema = z.object({ - is: z.enum(['apple_app_store', 'google_play_store']).optional(), - is_not: z.enum(['apple_app_store', 'google_play_store']).optional(), - in: z.enum(['apple_app_store', 'google_play_store']).optional(), - not_in: z.enum(['apple_app_store', 'google_play_store']).optional(), + is: z + .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store']) + .optional(), + is_not: z + .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store']) + .optional(), + in: z + .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store']) + .optional(), + not_in: z + .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store']) + .optional(), }); const ListOmnichannelSubscriptionCustomerIdSchema = z.object({ is: z.string().min(1).optional(), @@ -34,16 +42,16 @@ const ListOmnichannelSubscriptionIdAtSourceSchema = z.object({ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), }); const ListOmnichannelSubscriptionUpdatedAtSchema = z.object({ - after: z.string().regex(RegExp('^\\d{10}$')).optional(), - on: z.string().regex(RegExp('^\\d{10}$')).optional(), - before: z.string().regex(RegExp('^\\d{10}$')).optional(), between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), + before: z.string().regex(RegExp('^\\d{10}$')).optional(), + on: z.string().regex(RegExp('^\\d{10}$')).optional(), + after: z.string().regex(RegExp('^\\d{10}$')).optional(), }); const ListOmnichannelSubscriptionPurchasedAtSchema = z.object({ - after: z.string().regex(RegExp('^\\d{10}$')).optional(), - on: z.string().regex(RegExp('^\\d{10}$')).optional(), - before: z.string().regex(RegExp('^\\d{10}$')).optional(), between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), + before: z.string().regex(RegExp('^\\d{10}$')).optional(), + on: z.string().regex(RegExp('^\\d{10}$')).optional(), + after: z.string().regex(RegExp('^\\d{10}$')).optional(), }); const ListOmnichannelSubscriptionSortBySchema = z.looseObject({ asc: z.enum(['created_at', 'updated_at']).optional(), diff --git a/src/schema/payment_source.schema.ts b/src/schema/payment_source.schema.ts index d67a2f1..3196be5 100644 --- a/src/schema/payment_source.schema.ts +++ b/src/schema/payment_source.schema.ts @@ -129,6 +129,20 @@ const CreateUsingPermanentTokenPaymentSourceCardSchema = z.object({ .optional(), funding_type: z.enum(['credit', 'debit', 'prepaid', 'not_known']).optional(), }); +const CreateUsingPermanentTokenPaymentSourceBankAccountSchema = z.object({ + account_type: z + .enum(['checking', 'savings', 'business_checking', 'current']) + .optional(), + account_holder_type: z.enum(['individual', 'company']).optional(), + first_name: z.string().max(150).optional(), + last_name: z.string().max(150).optional(), + company: z.string().max(250).optional(), + scheme: z + .enum(['ach', 'bacs', 'sepa_core', 'autogiro', 'becs', 'becs_nz', 'pad']) + .optional(), + last4: z.string().max(4).min(4).optional(), + echeck_type: z.enum(['web', 'ppd', 'ccd']).optional(), +}); const CreateUsingPermanentTokenPaymentSourceBillingAddressSchema = z.object({ first_name: z.string().max(150).optional(), last_name: z.string().max(150).optional(), @@ -226,6 +240,8 @@ const CreateUsingPermanentTokenPaymentSourceBodySchema = z.looseObject({ additional_information: CreateUsingPermanentTokenPaymentSourceAdditionalInformationSchema.optional(), card: CreateUsingPermanentTokenPaymentSourceCardSchema.optional(), + bank_account: + CreateUsingPermanentTokenPaymentSourceBankAccountSchema.optional(), billing_address: CreateUsingPermanentTokenPaymentSourceBillingAddressSchema.optional(), }); diff --git a/src/schema/price_ramp.schema.ts b/src/schema/price_ramp.schema.ts new file mode 100644 index 0000000..85e0b6e --- /dev/null +++ b/src/schema/price_ramp.schema.ts @@ -0,0 +1,96 @@ +// Generated Zod schemas: PriceRamp +// Actions: create, update, list +// Do not edit manually – regenerate via sdk-generator + +import { z } from 'zod'; + +//PriceRamp.create + +const CreatePriceRampRampIntervalsSchema = z.object({ + starting_billing_cycle: z.array(z.number().int().min(1).optional()), + ending_billing_cycle: z.array(z.number().int().min(1).optional()).optional(), + apply_catalog_price: z + .array(z.boolean().default(false).optional()) + .optional(), + price: z.array(z.number().int().min(0).optional()).optional(), + price_in_decimal: z.array(z.string().max(39).optional()).optional(), +}); +const CreatePriceRampBodySchema = z.looseObject({ + item_price_id: z.string().max(100), + business_entity_id: z.string().max(50).optional(), + ramp_intervals: CreatePriceRampRampIntervalsSchema.optional(), +}); +export { CreatePriceRampBodySchema }; +export type CreatePriceRampBody = z.infer; + +//PriceRamp.update + +const UpdatePriceRampRampIntervalsSchema = z.object({ + starting_billing_cycle: z.array(z.number().int().min(1).optional()), + ending_billing_cycle: z.array(z.number().int().min(1).optional()).optional(), + apply_catalog_price: z + .array(z.boolean().default(false).optional()) + .optional(), + price: z.array(z.number().int().min(0).optional()).optional(), + price_in_decimal: z.array(z.string().max(39).optional()).optional(), +}); +const UpdatePriceRampBodySchema = z.looseObject({ + status: z.enum(['active', 'archived']).optional(), + ramp_intervals: UpdatePriceRampRampIntervalsSchema.optional(), +}); +export { UpdatePriceRampBodySchema }; +export type UpdatePriceRampBody = z.infer; + +//PriceRamp.list + +const ListPriceRampIdSchema = z.object({ + is: z.string().min(1).optional(), + is_not: z.string().min(1).optional(), + starts_with: z.string().min(1).optional(), + in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), +}); +const ListPriceRampItemPriceIdSchema = z.object({ + is: z.string().min(1).optional(), + is_not: z.string().min(1).optional(), + starts_with: z.string().min(1).optional(), + in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), +}); +const ListPriceRampStatusSchema = z.object({ + is: z.enum(['active', 'archived']).optional(), + is_not: z.enum(['active', 'archived']).optional(), + in: z.enum(['active', 'archived']).optional(), + not_in: z.enum(['active', 'archived']).optional(), +}); +const ListPriceRampUpdatedAtSchema = z.object({ + after: z.string().regex(RegExp('^\\d{10}$')).optional(), + before: z.string().regex(RegExp('^\\d{10}$')).optional(), + on: z.string().regex(RegExp('^\\d{10}$')).optional(), + between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), +}); +const ListPriceRampBusinessEntityIdSchema = z.object({ + is_present: z.enum(['true', 'false']).optional(), + is: z.string().min(1).optional(), +}); +const ListPriceRampIncludeSiteLevelResourcesSchema = z.object({ + is: z.enum(['true', 'false']).optional(), +}); +const ListPriceRampSortBySchema = z.looseObject({ + asc: z.enum(['id', 'status', 'updated_at']).optional(), + desc: z.enum(['id', 'status', 'updated_at']).optional(), +}); +const ListPriceRampBodySchema = z.looseObject({ + limit: z.number().int().min(1).max(100).optional(), + offset: z.string().max(1000).optional(), + id: ListPriceRampIdSchema.optional(), + item_price_id: ListPriceRampItemPriceIdSchema.optional(), + status: ListPriceRampStatusSchema.optional(), + updated_at: ListPriceRampUpdatedAtSchema.optional(), + business_entity_id: ListPriceRampBusinessEntityIdSchema.optional(), + include_site_level_resources: + ListPriceRampIncludeSiteLevelResourcesSchema.optional(), + sort_by: ListPriceRampSortBySchema.optional(), +}); +export { ListPriceRampBodySchema }; +export type ListPriceRampBody = z.infer; diff --git a/src/schema/price_variant.schema.ts b/src/schema/price_variant.schema.ts index e3c490a..9194c2f 100644 --- a/src/schema/price_variant.schema.ts +++ b/src/schema/price_variant.schema.ts @@ -78,8 +78,8 @@ const ListPriceVariantCreatedAtSchema = z.object({ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), }); const ListPriceVariantBusinessEntityIdSchema = z.object({ - is: z.string().min(1).optional(), is_present: z.enum(['true', 'false']).optional(), + is: z.string().min(1).optional(), }); const ListPriceVariantIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), diff --git a/src/schema/purchase.schema.ts b/src/schema/purchase.schema.ts index 9bb5b16..c978a98 100644 --- a/src/schema/purchase.schema.ts +++ b/src/schema/purchase.schema.ts @@ -102,6 +102,7 @@ const CreatePurchasePurchaseItemsSchema = z.object({ unit_amount: z.array(z.number().int().min(0).optional()).optional(), unit_amount_in_decimal: z.array(z.string().max(39).optional()).optional(), quantity_in_decimal: z.array(z.string().max(33).optional()).optional(), + trial_end: z.array(z.number().int().optional()).optional(), }); const CreatePurchaseItemTiersSchema = z.object({ index: z.array(z.number().int().min(0).optional()), @@ -151,6 +152,8 @@ const CreatePurchaseSubscriptionInfoSchema = z.object({ contract_term_billing_cycle_on_renewal: z .array(z.number().int().min(1).max(100).optional()) .optional(), + trial_end: z.array(z.number().int().optional()).optional(), + start_date: z.array(z.number().int().optional()).optional(), meta_data: z.array(CreatePurchaseMetaDataItemSchema.optional()).optional(), }); const CreatePurchaseContractTermsSchema = z.object({ @@ -233,6 +236,7 @@ const EstimatePurchasePurchaseItemsSchema = z.object({ unit_amount: z.array(z.number().int().min(0).optional()).optional(), unit_amount_in_decimal: z.array(z.string().max(39).optional()).optional(), quantity_in_decimal: z.array(z.string().max(33).optional()).optional(), + trial_end: z.array(z.number().int().optional()).optional(), }); const EstimatePurchaseItemTiersSchema = z.object({ index: z.array(z.number().int().min(0).optional()), @@ -281,6 +285,8 @@ const EstimatePurchaseSubscriptionInfoSchema = z.object({ contract_term_billing_cycle_on_renewal: z .array(z.number().int().min(1).max(100).optional()) .optional(), + trial_end: z.array(z.number().int().optional()).optional(), + start_date: z.array(z.number().int().optional()).optional(), }); const EstimatePurchaseContractTermsSchema = z.object({ index: z.array(z.number().int().min(0).optional()), diff --git a/src/schema/quote.schema.ts b/src/schema/quote.schema.ts index 4030383..9f86b81 100644 --- a/src/schema/quote.schema.ts +++ b/src/schema/quote.schema.ts @@ -751,7 +751,7 @@ const CreateSubItemsForCustomerQuoteQuoteSubscriptionItemsSchema = z.object({ billing_cycles: z.array(z.number().int().min(0).optional()).optional(), trial_end: z.array(z.number().int().optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -947,7 +947,7 @@ const EditCreateSubCustomerQuoteForItemsQuoteSubscriptionItemsSchema = z.object( billing_cycles: z.array(z.number().int().min(0).optional()).optional(), trial_end: z.array(z.number().int().optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -1149,7 +1149,7 @@ const UpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsSchema = z.object({ billing_cycles: z.array(z.number().int().min(0).optional()).optional(), trial_end: z.array(z.number().int().optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -1360,7 +1360,7 @@ const EditUpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsSchema = billing_cycles: z.array(z.number().int().min(0).optional()).optional(), trial_end: z.array(z.number().int().optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -1527,7 +1527,7 @@ const CreateForChargeItemsAndChargesQuoteItemPricesSchema = z.object({ unit_price: z.array(z.number().int().min(0).optional()).optional(), unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), }); const CreateForChargeItemsAndChargesQuoteItemTiersSchema = z.object({ @@ -1639,7 +1639,7 @@ const EditForChargeItemsAndChargesQuoteItemPricesSchema = z.object({ unit_price: z.array(z.number().int().min(0).optional()).optional(), unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), }); const EditForChargeItemsAndChargesQuoteItemTiersSchema = z.object({ diff --git a/src/schema/ramp.schema.ts b/src/schema/ramp.schema.ts index 632f074..168f75b 100644 --- a/src/schema/ramp.schema.ts +++ b/src/schema/ramp.schema.ts @@ -24,7 +24,7 @@ const CreateForSubscriptionRampItemsToAddSchema = z.object({ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(), billing_cycles: z.array(z.number().int().min(0).optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -42,6 +42,7 @@ const CreateForSubscriptionRampItemsToAddSchema = z.object({ charge_on_option: z .array(z.enum(['immediately', 'on_event']).optional()) .optional(), + description: z.array(z.string().max(500).optional()).optional(), }); const CreateForSubscriptionRampItemsToUpdateSchema = z.object({ item_price_id: z.array(z.string().max(100).optional()), @@ -51,7 +52,7 @@ const CreateForSubscriptionRampItemsToUpdateSchema = z.object({ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(), billing_cycles: z.array(z.number().int().min(0).optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -69,6 +70,7 @@ const CreateForSubscriptionRampItemsToUpdateSchema = z.object({ charge_on_option: z .array(z.enum(['immediately', 'on_event']).optional()) .optional(), + description: z.array(z.string().max(500).optional()).optional(), }); const CreateForSubscriptionRampItemTiersSchema = z.object({ item_price_id: z.array(z.string().max(100).optional()).optional(), @@ -144,7 +146,7 @@ const UpdateRampItemsToAddSchema = z.object({ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(), billing_cycles: z.array(z.number().int().min(0).optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -162,6 +164,7 @@ const UpdateRampItemsToAddSchema = z.object({ charge_on_option: z .array(z.enum(['immediately', 'on_event']).optional()) .optional(), + description: z.array(z.string().max(500).optional()).optional(), }); const UpdateRampItemsToUpdateSchema = z.object({ item_price_id: z.array(z.string().max(100).optional()), @@ -171,7 +174,7 @@ const UpdateRampItemsToUpdateSchema = z.object({ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(), billing_cycles: z.array(z.number().int().min(0).optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -189,6 +192,7 @@ const UpdateRampItemsToUpdateSchema = z.object({ charge_on_option: z .array(z.enum(['immediately', 'on_event']).optional()) .optional(), + description: z.array(z.string().max(500).optional()).optional(), }); const UpdateRampItemTiersSchema = z.object({ item_price_id: z.array(z.string().max(100).optional()).optional(), @@ -244,12 +248,12 @@ export type UpdateRampBody = z.infer; //Ramp.list const ListRampStatusSchema = z.object({ - is: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(), in: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(), + is: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(), }); const ListRampSubscriptionIdSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListRampEffectiveFromSchema = z.object({ after: z.string().regex(RegExp('^\\d{10}$')).optional(), diff --git a/src/schema/retry_segment.schema.ts b/src/schema/retry_segment.schema.ts new file mode 100644 index 0000000..37a8249 --- /dev/null +++ b/src/schema/retry_segment.schema.ts @@ -0,0 +1,15 @@ +// Generated Zod schemas: RetrySegment +// Actions: retrieve +// Do not edit manually – regenerate via sdk-generator + +import { z } from 'zod'; + +//RetrySegment.retrieve + +const RetrieveRetrySegmentBodySchema = z.looseObject({ + invoice_id: z.string().max(50).optional(), +}); +export { RetrieveRetrySegmentBodySchema }; +export type RetrieveRetrySegmentBody = z.infer< + typeof RetrieveRetrySegmentBodySchema +>; diff --git a/src/schema/subscription.schema.ts b/src/schema/subscription.schema.ts index 30fbfe4..98c0430 100644 --- a/src/schema/subscription.schema.ts +++ b/src/schema/subscription.schema.ts @@ -913,7 +913,7 @@ const CreateWithItemsSubscriptionSubscriptionItemsSchema = z.object({ billing_cycles: z.array(z.number().int().min(0).optional()).optional(), trial_end: z.array(z.number().int().optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -2298,7 +2298,7 @@ const UpdateForItemsSubscriptionSubscriptionItemsSchema = z.object({ billing_cycles: z.array(z.number().int().min(0).optional()).optional(), trial_end: z.array(z.number().int().optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -3470,7 +3470,7 @@ const ImportForItemsSubscriptionSubscriptionItemsSchema = z.object({ billing_cycles: z.array(z.number().int().min(0).optional()).optional(), trial_end: z.array(z.number().int().optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), charge_on_event: z .array( @@ -3666,7 +3666,7 @@ const CancelForItemsSubscriptionSubscriptionItemsSchema = z.object({ unit_price: z.array(z.number().int().min(0).optional()).optional(), unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(), service_period_days: z - .array(z.number().int().min(1).max(730).optional()) + .array(z.number().int().min(1).max(4000).optional()) .optional(), }); const CancelForItemsSubscriptionBodySchema = z.looseObject({ diff --git a/src/schema/usage.schema.ts b/src/schema/usage.schema.ts index 956d13b..d0a2924 100644 --- a/src/schema/usage.schema.ts +++ b/src/schema/usage.schema.ts @@ -98,9 +98,14 @@ export type ListUsageBody = z.infer; const PdfUsageInvoiceSchema = z.object({ id: z.string().max(50), }); +const PdfUsageGroupBySchema = z.object({ + feature_id: z.array(z.string().max(100).optional()).optional(), + attributes: z.array(z.array(z.string().optional()).optional()).optional(), +}); const PdfUsageBodySchema = z.looseObject({ disposition_type: z.enum(['attachment', 'inline']).optional(), invoice: PdfUsageInvoiceSchema.optional(), + group_by: PdfUsageGroupBySchema.optional(), }); export { PdfUsageBodySchema }; export type PdfUsageBody = z.infer; diff --git a/src/schema/usage_summary.schema.ts b/src/schema/usage_summary.schema.ts index 5f6ac38..d11fb8a 100644 --- a/src/schema/usage_summary.schema.ts +++ b/src/schema/usage_summary.schema.ts @@ -14,6 +14,7 @@ const RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema = z.looseObject( window_size: z.enum(['month', 'week', 'day', 'hour', 'minute']).optional(), timeframe_start: z.number().int().optional(), timeframe_end: z.number().int().optional(), + group_by: z.array(z.string().max(100).optional()).optional(), }, ); export { RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema }; diff --git a/src/schema/webhook_endpoint.schema.ts b/src/schema/webhook_endpoint.schema.ts index 3a95a86..4464fbb 100644 --- a/src/schema/webhook_endpoint.schema.ts +++ b/src/schema/webhook_endpoint.schema.ts @@ -86,6 +86,7 @@ const CreateWebhookEndpointBodySchema = z.looseObject({ 'payment_schedules_updated', 'payment_schedule_scheme_created', 'payment_schedule_scheme_deleted', + 'payment_schedules_cancelled', 'subscription_renewal_reminder', 'add_usages_reminder', 'payment_due_reminder', @@ -96,6 +97,7 @@ const CreateWebhookEndpointBodySchema = z.looseObject({ 'payment_failed', 'dunning_updated', 'payment_refunded', + 'refund_failed', 'payment_initiated', 'refund_initiated', 'netd_payment_due_reminder', @@ -247,6 +249,9 @@ const CreateWebhookEndpointBodySchema = z.looseObject({ 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', + 'price_ramp_created', + 'price_ramp_updated', + 'price_ramp_deleted', 'omnichannel_subscription_item_mrr_updated', 'ledger_account_balance_updated', 'grant_blocks_created', @@ -261,12 +266,29 @@ const CreateWebhookEndpointBodySchema = z.looseObject({ 'vault_token_created', 'vault_token_updated', 'vault_token_deleted', - 'business_rules_applied', + 'chargeback_initiated', + 'chargeback_won', + 'chargeback_lost', 'business_ruleset_created', 'business_ruleset_updated', 'business_ruleset_activated', 'business_ruleset_deactivated', 'business_ruleset_deleted', + 'collections_reminder_sequence_created', + 'collections_reminder_sequence_paused', + 'collections_reminder_sequence_resumed', + 'collections_reminder_sequence_completed', + 'collections_payment_promise_created', + 'collections_payment_promise_updated', + 'collections_payment_promise_fulfilled', + 'collections_payment_promise_cancelled', + 'collections_payment_promise_broken', + 'collections_dispute_created', + 'collections_dispute_updated', + 'collections_dispute_resolved', + 'collections_dispute_withdrawn', + 'email_message_received', + 'private_note_added', 'plan_created', 'plan_updated', 'plan_deleted', @@ -362,6 +384,7 @@ const UpdateWebhookEndpointBodySchema = z.looseObject({ 'payment_schedules_updated', 'payment_schedule_scheme_created', 'payment_schedule_scheme_deleted', + 'payment_schedules_cancelled', 'subscription_renewal_reminder', 'add_usages_reminder', 'payment_due_reminder', @@ -372,6 +395,7 @@ const UpdateWebhookEndpointBodySchema = z.looseObject({ 'payment_failed', 'dunning_updated', 'payment_refunded', + 'refund_failed', 'payment_initiated', 'refund_initiated', 'netd_payment_due_reminder', @@ -523,6 +547,9 @@ const UpdateWebhookEndpointBodySchema = z.looseObject({ 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', + 'price_ramp_created', + 'price_ramp_updated', + 'price_ramp_deleted', 'omnichannel_subscription_item_mrr_updated', 'ledger_account_balance_updated', 'grant_blocks_created', @@ -537,12 +564,29 @@ const UpdateWebhookEndpointBodySchema = z.looseObject({ 'vault_token_created', 'vault_token_updated', 'vault_token_deleted', - 'business_rules_applied', + 'chargeback_initiated', + 'chargeback_won', + 'chargeback_lost', 'business_ruleset_created', 'business_ruleset_updated', 'business_ruleset_activated', 'business_ruleset_deactivated', 'business_ruleset_deleted', + 'collections_reminder_sequence_created', + 'collections_reminder_sequence_paused', + 'collections_reminder_sequence_resumed', + 'collections_reminder_sequence_completed', + 'collections_payment_promise_created', + 'collections_payment_promise_updated', + 'collections_payment_promise_fulfilled', + 'collections_payment_promise_cancelled', + 'collections_payment_promise_broken', + 'collections_dispute_created', + 'collections_dispute_updated', + 'collections_dispute_resolved', + 'collections_dispute_withdrawn', + 'email_message_received', + 'private_note_added', 'plan_created', 'plan_updated', 'plan_deleted', diff --git a/types/core.d.ts b/types/core.d.ts index c5c09c2..3da7ddb 100644 --- a/types/core.d.ts +++ b/types/core.d.ts @@ -132,12 +132,12 @@ declare module 'chargebee' { | 'plan_price' | 'addon_price' | 'charge_price' + | 'addon' | 'invoice' | 'quote' | 'credit_note' | 'transaction' | 'plan' - | 'addon' | 'order' | 'item_family' | 'item' @@ -165,7 +165,8 @@ declare module 'chargebee' { | 'business_ruleset' | 'alert_status' | 'omnichannel_subscription_item_metric' - | 'price_ramp'; + | 'price_ramp' + | 'task'; type EventNameEnum = 'cancellation_page_loaded'; type EventTypeEnum = | 'coupon_created' @@ -232,6 +233,7 @@ declare module 'chargebee' { | 'payment_schedules_updated' | 'payment_schedule_scheme_created' | 'payment_schedule_scheme_deleted' + | 'payment_schedules_cancelled' | 'subscription_renewal_reminder' | 'add_usages_reminder' | 'payment_due_reminder' @@ -242,6 +244,7 @@ declare module 'chargebee' { | 'payment_failed' | 'dunning_updated' | 'payment_refunded' + | 'refund_failed' | 'payment_initiated' | 'refund_initiated' | 'authorization_succeeded' @@ -384,6 +387,9 @@ declare module 'chargebee' { | 'alert_status_changed' | 'omnichannel_subscription_item_updated' | 'omnichannel_subscription_item_recovered' + | 'price_ramp_created' + | 'price_ramp_updated' + | 'price_ramp_deleted' | 'omnichannel_subscription_item_mrr_updated' | 'ledger_account_balance_updated' | 'grant_blocks_created' @@ -398,12 +404,29 @@ declare module 'chargebee' { | 'vault_token_created' | 'vault_token_updated' | 'vault_token_deleted' - | 'business_rules_applied' + | 'chargeback_initiated' + | 'chargeback_won' + | 'chargeback_lost' | 'business_ruleset_created' | 'business_ruleset_updated' | 'business_ruleset_activated' | 'business_ruleset_deactivated' | 'business_ruleset_deleted' + | 'collections_reminder_sequence_created' + | 'collections_reminder_sequence_paused' + | 'collections_reminder_sequence_resumed' + | 'collections_reminder_sequence_completed' + | 'collections_payment_promise_created' + | 'collections_payment_promise_updated' + | 'collections_payment_promise_fulfilled' + | 'collections_payment_promise_cancelled' + | 'collections_payment_promise_broken' + | 'collections_dispute_created' + | 'collections_dispute_updated' + | 'collections_dispute_resolved' + | 'collections_dispute_withdrawn' + | 'email_message_received' + | 'private_note_added' | 'plan_created' | 'plan_updated' | 'plan_deleted' @@ -477,69 +500,6 @@ declare module 'chargebee' { | 'payu' | 'gocardless' | 'not_applicable'; - type GatewayNameEnum = - | 'chargebee' - | 'chargebee_payments' - | 'adyen' - | 'stripe' - | 'wepay' - | 'braintree' - | 'authorize_net' - | 'paypal_pro' - | 'pin' - | 'eway' - | 'eway_rapid' - | 'worldpay' - | 'balanced_payments' - | 'beanstream' - | 'bluepay' - | 'elavon' - | 'first_data_global' - | 'hdfc' - | 'migs' - | 'nmi' - | 'ogone' - | 'paymill' - | 'paypal_payflow_pro' - | 'sage_pay' - | 'tco' - | 'wirecard' - | 'amazon_payments' - | 'paypal_express_checkout' - | 'gocardless' - | 'orbital' - | 'moneris_us' - | 'moneris' - | 'bluesnap' - | 'cybersource' - | 'vantiv' - | 'checkout_com' - | 'paypal' - | 'ingenico_direct' - | 'exact' - | 'mollie' - | 'quickbooks' - | 'razorpay' - | 'global_payments' - | 'bank_of_america' - | 'ecentric' - | 'metrics_global' - | 'windcave' - | 'pay_com' - | 'ebanx' - | 'dlocal' - | 'nuvei' - | 'solidgate' - | 'paystack' - | 'jp_morgan' - | 'deutsche_bank' - | 'ezidebit' - | 'twikey' - | 'tempus' - | 'moyasar' - | 'payway' - | 'payu' - | 'not_applicable'; type HierarchyOperationTypeEnum = | 'complete_hierarchy' | 'subordinates' @@ -764,7 +724,10 @@ declare module 'chargebee' { | 'none' | 'js_api' | 'migration' - | 'external_service'; + | 'external_service' + | 'mcp' + | 'copilot' + | 'agent'; type StatusEnum = | 'scheduled' | 'rescheduled' @@ -977,6 +940,7 @@ declare module 'chargebee' { | 'payment_schedules_updated' | 'payment_schedule_scheme_created' | 'payment_schedule_scheme_deleted' + | 'payment_schedules_cancelled' | 'subscription_renewal_reminder' | 'add_usages_reminder' | 'payment_due_reminder' @@ -987,6 +951,7 @@ declare module 'chargebee' { | 'payment_failed' | 'dunning_updated' | 'payment_refunded' + | 'refund_failed' | 'payment_initiated' | 'refund_initiated' | 'authorization_succeeded' @@ -1129,6 +1094,9 @@ declare module 'chargebee' { | 'alert_status_changed' | 'omnichannel_subscription_item_updated' | 'omnichannel_subscription_item_recovered' + | 'price_ramp_created' + | 'price_ramp_updated' + | 'price_ramp_deleted' | 'omnichannel_subscription_item_mrr_updated' | 'ledger_account_balance_updated' | 'grant_blocks_created' @@ -1143,12 +1111,29 @@ declare module 'chargebee' { | 'vault_token_created' | 'vault_token_updated' | 'vault_token_deleted' - | 'business_rules_applied' + | 'chargeback_initiated' + | 'chargeback_won' + | 'chargeback_lost' | 'business_ruleset_created' | 'business_ruleset_updated' | 'business_ruleset_activated' | 'business_ruleset_deactivated' | 'business_ruleset_deleted' + | 'collections_reminder_sequence_created' + | 'collections_reminder_sequence_paused' + | 'collections_reminder_sequence_resumed' + | 'collections_reminder_sequence_completed' + | 'collections_payment_promise_created' + | 'collections_payment_promise_updated' + | 'collections_payment_promise_fulfilled' + | 'collections_payment_promise_cancelled' + | 'collections_payment_promise_broken' + | 'collections_dispute_created' + | 'collections_dispute_updated' + | 'collections_dispute_resolved' + | 'collections_dispute_withdrawn' + | 'email_message_received' + | 'private_note_added' | 'plan_created' | 'plan_updated' | 'plan_deleted' diff --git a/types/index.d.ts b/types/index.d.ts index fee1576..8b4dabc 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -3,7 +3,6 @@ /// /// /// -/// /// /// /// @@ -18,6 +17,10 @@ /// /// /// +/// +/// +/// +/// /// /// /// @@ -31,6 +34,7 @@ /// /// /// +/// /// /// /// @@ -38,12 +42,18 @@ /// /// /// +/// +/// /// +/// +/// /// +/// /// /// /// /// +/// /// /// /// @@ -51,6 +61,8 @@ /// /// /// +/// +/// /// /// /// @@ -92,8 +104,11 @@ /// /// /// +/// +/// /// /// +/// /// /// /// @@ -105,8 +120,10 @@ /// /// /// +/// /// /// +/// /// /// /// @@ -296,6 +313,7 @@ declare module 'chargebee' { businessRule: BusinessRule.BusinessRuleResource; businessRuleset: BusinessRuleset.BusinessRulesetResource; card: Card.CardResource; + collectionsPaymentPromise: CollectionsPaymentPromise.CollectionsPaymentPromiseResource; comment: Comment.CommentResource; configuration: Configuration.ConfigurationResource; coupon: Coupon.CouponResource; @@ -308,6 +326,7 @@ declare module 'chargebee' { customerEntitlement: CustomerEntitlement.CustomerEntitlementResource; differentialPrice: DifferentialPrice.DifferentialPriceResource; dispute: Dispute.DisputeResource; + draftRequest: DraftRequest.DraftRequestResource; einvoice: Einvoice.EinvoiceResource; emailLog: EmailLog.EmailLogResource; entitlement: Entitlement.EntitlementResource; @@ -344,6 +363,7 @@ declare module 'chargebee' { personalizedOffer: PersonalizedOffer.PersonalizedOfferResource; plan: Plan.PlanResource; portalSession: PortalSession.PortalSessionResource; + priceRamp: PriceRamp.PriceRampResource; priceVariant: PriceVariant.PriceVariantResource; pricingPageSession: PricingPageSession.PricingPageSessionResource; promotionalCredit: PromotionalCredit.PromotionalCreditResource; @@ -354,6 +374,7 @@ declare module 'chargebee' { ramp: Ramp.RampResource; recordedPurchase: RecordedPurchase.RecordedPurchaseResource; resourceMigration: ResourceMigration.ResourceMigrationResource; + retrySegment: RetrySegment.RetrySegmentResource; rule: Rule.RuleResource; siteMigrationDetail: SiteMigrationDetail.SiteMigrationDetailResource; subscription: Subscription.SubscriptionResource; diff --git a/types/resources/AppliedBusinessRule.d.ts b/types/resources/AppliedBusinessRule.d.ts deleted file mode 100644 index 1ade4ad..0000000 --- a/types/resources/AppliedBusinessRule.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// -/// - -declare module 'chargebee' { - export interface AppliedBusinessRule { - handle: string; - entity_type: 'cpq_quote'; - entity_id: number; - entity_version?: number; - rule_id: string; - version: number; - created_at: number; - modified_at: number; - } -} diff --git a/types/resources/BusinessEntity.d.ts b/types/resources/BusinessEntity.d.ts index a837925..0d15118 100644 --- a/types/resources/BusinessEntity.d.ts +++ b/types/resources/BusinessEntity.d.ts @@ -14,6 +14,27 @@ declare module 'chargebee' { export namespace BusinessEntity { export class BusinessEntityResource { + create( + input: CreateInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + + list( + input?: ListInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + + retrieve( + business_entity_id: string, + headers?: ChargebeeRequestHeader, + ): Promise>; + + update( + business_entity_id: string, + input?: UpdateInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + createTransfers( input: CreateTransfersInputParam, headers?: ChargebeeRequestHeader, @@ -25,6 +46,23 @@ declare module 'chargebee' { ): Promise>; } + export interface CreateResponse { + business_entity: BusinessEntity; + } + + export interface ListResponse { + list: { business_entity: BusinessEntity }[]; + next_offset?: string; + } + + export interface RetrieveResponse { + business_entity: BusinessEntity; + } + + export interface UpdateResponse { + business_entity: BusinessEntity; + } + export interface CreateTransfersResponse { business_entity_transfer: BusinessEntityTransfer; } @@ -37,6 +75,20 @@ declare module 'chargebee' { // REQUEST PARAMS //--------------- + export interface CreateInputParam { + name: string; + status: 'active' | 'inactive'; + } + export interface ListInputParam { + limit?: number; + offset?: string; + include_deleted?: boolean; + name?: filter.String; + } + export interface UpdateInputParam { + name?: string; + status?: 'active' | 'inactive'; + } export interface CreateTransfersInputParam { active_resource_ids: string[]; destination_business_entity_ids: string[] /** diff --git a/types/resources/Citation.d.ts b/types/resources/Citation.d.ts new file mode 100644 index 0000000..95386ef --- /dev/null +++ b/types/resources/Citation.d.ts @@ -0,0 +1,13 @@ +/// +/// + +declare module 'chargebee' { + export interface Citation { + id: string; + param_name?: string; + author_name: string; + confidence_level?: 'low' | 'medium' | 'high' | 'not_provided'; + created_at: number; + content: any; + } +} diff --git a/types/resources/CollectionsDispute.d.ts b/types/resources/CollectionsDispute.d.ts new file mode 100644 index 0000000..538138d --- /dev/null +++ b/types/resources/CollectionsDispute.d.ts @@ -0,0 +1,24 @@ +/// +/// + +declare module 'chargebee' { + export interface CollectionsDispute { + id: string; + customer_id: string; + invoice_id: string; + line_item_id?: string; + currency_code: string; + billed_amount: number; + claimed_deduction: number; + status: 'open' | 'resolved' | 'withdrawn'; + dispute_reason_code: string; + resolved_reason_code?: string; + reason?: string; + opened_at: number; + resolved_at?: number; + created_at: number; + updated_at: number; + resource_version?: number; + undisputed_amount?: number; + } +} diff --git a/types/resources/CollectionsPaymentPromise.d.ts b/types/resources/CollectionsPaymentPromise.d.ts new file mode 100644 index 0000000..db20b18 --- /dev/null +++ b/types/resources/CollectionsPaymentPromise.d.ts @@ -0,0 +1,93 @@ +/// +/// +/// +declare module 'chargebee' { + export interface CollectionsPaymentPromise { + id: string; + customer_id: string; + invoice_id: string; + status: 'active' | 'fulfilled' | 'broken' | 'cancelled'; + reason?: string; + promised_by?: string; + promised_on: number; + created_at: number; + updated_at: number; + resource_version?: number; + } + + export namespace CollectionsPaymentPromise { + export class CollectionsPaymentPromiseResource { + retrieve( + collections_payment_promise_id: string, + headers?: ChargebeeRequestHeader, + ): Promise>; + + listCollectionsPaymentPromises( + input?: ListCollectionsPaymentPromisesInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + + createCollectionsPaymentPromise( + input: CreateCollectionsPaymentPromiseInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + + updateCollectionsPaymentPromise( + collections_payment_promise_id: string, + input?: UpdateCollectionsPaymentPromiseInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + + cancel( + collections_payment_promise_id: string, + headers?: ChargebeeRequestHeader, + ): Promise>; + } + + export interface RetrieveResponse { + collections_payment_promise: CollectionsPaymentPromise; + } + + export interface ListCollectionsPaymentPromisesResponse { + list: { collections_payment_promise: CollectionsPaymentPromise }[]; + next_offset?: string; + } + + export interface CreateCollectionsPaymentPromiseResponse { + collections_payment_promises: CollectionsPaymentPromise[]; + } + + export interface UpdateCollectionsPaymentPromiseResponse { + collections_payment_promise: CollectionsPaymentPromise; + } + + export interface CancelResponse { + collections_payment_promise: CollectionsPaymentPromise; + } + + // REQUEST PARAMS + //--------------- + + export interface ListCollectionsPaymentPromisesInputParam { + limit?: number; + offset?: string; + customer_id?: filter.String; + invoice_id?: filter.String; + status?: filter.Enum; + } + export interface CreateCollectionsPaymentPromiseInputParam { + customer_id: string; + invoice_id?: string; + amount: number; + currency_code?: string; + promised_on: number; + reason?: string; + promised_by?: string; + } + export interface UpdateCollectionsPaymentPromiseInputParam { + promised_on?: number; + reason?: string; + promised_by?: string; + } + } +} diff --git a/types/resources/CollectionsReminderSequence.d.ts b/types/resources/CollectionsReminderSequence.d.ts new file mode 100644 index 0000000..cdc74c4 --- /dev/null +++ b/types/resources/CollectionsReminderSequence.d.ts @@ -0,0 +1,35 @@ +/// +/// + +declare module 'chargebee' { + export interface CollectionsReminderSequence { + id: string; + invoice_id: string; + customer_id: string; + status: 'active' | 'completed' | 'paused' | 'failed'; + paused_until?: number; + pause_note?: string; + started_at?: number; + completed_at?: number; + created_at: number; + updated_at: number; + resource_version?: number; + action_logs?: CollectionsReminderSequence.ActionLog[]; + } + + export namespace CollectionsReminderSequence { + export interface ActionLog { + action_type: 'send_email'; + status: 'completed' | 'scheduled' | 'skipped'; + reason_code?: + | 'date_already_passed' + | 'before_invoice_date' + | 'trigger_event_not_received' + | 'sequence_paused'; + executed_at?: number; + scheduled_at?: number; + } + // REQUEST PARAMS + //--------------- + } +} diff --git a/types/resources/Comment.d.ts b/types/resources/Comment.d.ts index b631447..9570ada 100644 --- a/types/resources/Comment.d.ts +++ b/types/resources/Comment.d.ts @@ -80,7 +80,8 @@ declare module 'chargebee' { | 'item_family' | 'item' | 'item_price' - | 'price_variant'; + | 'price_variant' + | 'task'; entity_id?: string; created_at?: filter.Timestamp; 'sort_by[asc]'?: string; diff --git a/types/resources/Content.d.ts b/types/resources/Content.d.ts index d7469aa..aae63ca 100644 --- a/types/resources/Content.d.ts +++ b/types/resources/Content.d.ts @@ -8,7 +8,6 @@ declare module 'chargebee' { advance_invoice_schedule: AdvanceInvoiceSchedule; alert: Alert; alert_status: AlertStatus; - applied_business_rule: AppliedBusinessRule; applied_rule: AppliedRule; apply_rule: ApplyRule; async_response: AsyncResponse; @@ -23,6 +22,10 @@ declare module 'chargebee' { business_ruleset: BusinessRuleset; business_ruleset_rule: BusinessRulesetRule; card: Card; + citation: Citation; + collections_dispute: CollectionsDispute; + collections_payment_promise: CollectionsPaymentPromise; + collections_reminder_sequence: CollectionsReminderSequence; column_definition: ColumnDefinition; comment: Comment; configuration: Configuration; @@ -36,6 +39,7 @@ declare module 'chargebee' { credit_note_estimate: CreditNoteEstimate; credit_unit: CreditUnit; currency: Currency; + custom_data: CustomData; custom_data_schema: CustomDataSchema; customer: Customer; customer_entitlement: CustomerEntitlement; @@ -43,12 +47,18 @@ declare module 'chargebee' { discount: Discount; dispute: Dispute; download: Download; + draft_estimate: DraftEstimate; + draft_request: DraftRequest; einvoice: Einvoice; + email_attachment: EmailAttachment; + email_conversation: EmailConversation; email_log: EmailLog; + email_message: EmailMessage; entitlement: Entitlement; entitlement_override: EntitlementOverride; estimate: Estimate; event: Event; + execution: Execution; export: Export; feature: Feature; filter_condition: FilterCondition; @@ -56,6 +66,8 @@ declare module 'chargebee' { gateway_payment_method_token: GatewayPaymentMethodToken; gift: Gift; grant_block: GrantBlock; + group_by_attribute: GroupByAttribute; + group_by_recommendation: GroupByRecommendation; hierarchy: Hierarchy; hosted_page: HostedPage; impacted_customer: ImpactedCustomer; @@ -97,8 +109,11 @@ declare module 'chargebee' { personalized_offer: PersonalizedOffer; plan: Plan; portal_session: PortalSession; + preference_variant: PreferenceVariant; + price_ramp: PriceRamp; price_variant: PriceVariant; pricing_page_session: PricingPageSession; + private_note: PrivateNote; promotional_credit: PromotionalCredit; promotional_grant: PromotionalGrant; purchase: Purchase; @@ -110,8 +125,10 @@ declare module 'chargebee' { quoted_ramp: QuotedRamp; quoted_subscription: QuotedSubscription; ramp: Ramp; + ramp_interval: RampInterval; recorded_purchase: RecordedPurchase; resource_migration: ResourceMigration; + retry_segment: RetrySegment; rule: Rule; site_migration_detail: SiteMigrationDetail; subscription: Subscription; diff --git a/types/resources/CreditNote.d.ts b/types/resources/CreditNote.d.ts index d5ea1ee..928ca26 100644 --- a/types/resources/CreditNote.d.ts +++ b/types/resources/CreditNote.d.ts @@ -567,6 +567,7 @@ declare module 'chargebee' { currency_code?: string; create_reason_code: string; date: number; + customer_notes?: string; status?: 'adjusted' | 'refunded' | 'refund_due' | 'voided'; total?: number; refunded_at?: number; diff --git a/types/resources/CustomData.d.ts b/types/resources/CustomData.d.ts new file mode 100644 index 0000000..b84e865 --- /dev/null +++ b/types/resources/CustomData.d.ts @@ -0,0 +1,14 @@ +/// +/// + +declare module 'chargebee' { + export interface CustomData { + entity_type: EntityTypeEnum; + id: string; + schema_id: string; + schema_values: string; + created_at: number; + modified_at: number; + updated_at?: number; + } +} diff --git a/types/resources/DraftEstimate.d.ts b/types/resources/DraftEstimate.d.ts new file mode 100644 index 0000000..98c4ebb --- /dev/null +++ b/types/resources/DraftEstimate.d.ts @@ -0,0 +1,13 @@ +/// +/// + +declare module 'chargebee' { + export interface DraftEstimate { + status: 'success' | 'failed'; + http_status?: number; + created_at: number; + result?: any; + error_detail?: any; + revision_version?: number; + } +} diff --git a/types/resources/DraftRequest.d.ts b/types/resources/DraftRequest.d.ts new file mode 100644 index 0000000..3c8427f --- /dev/null +++ b/types/resources/DraftRequest.d.ts @@ -0,0 +1,45 @@ +/// +/// +/// +declare module 'chargebee' { + export interface DraftRequest { + id: string; + path_param?: string; + request_uri?: string; + operation_id: string; + status: 'open' | 'executed'; + executed_at?: number; + created_at: number; + resource_version?: number; + updated_at: number; + current_revision?: DraftRequest.DraftRevision; + validations?: DraftRequest.Validation[]; + has_comments?: boolean; + has_citations?: boolean; + executions?: DraftRequest.Execution[]; + } + + export namespace DraftRequest { + export interface DraftRevision { + version: number; + created_at: number; + payload?: object; + } + export interface Validation { + category?: string; + level?: string; + message?: string; + param_name?: string; + type?: string; + } + export interface Execution { + status: 'success' | 'failed'; + created_at: number; + result?: object; + error_detail?: object; + revision_version?: number; + } + // REQUEST PARAMS + //--------------- + } +} diff --git a/types/resources/EmailAttachment.d.ts b/types/resources/EmailAttachment.d.ts new file mode 100644 index 0000000..ce737d5 --- /dev/null +++ b/types/resources/EmailAttachment.d.ts @@ -0,0 +1,16 @@ +/// +/// + +declare module 'chargebee' { + export interface EmailAttachment { + id: string; + email_message_id?: string; + file_name?: string; + content_type?: string; + size_bytes?: number; + content_disposition?: string; + created_at: number; + updated_at: number; + resource_version?: number; + } +} diff --git a/types/resources/EmailConversation.d.ts b/types/resources/EmailConversation.d.ts new file mode 100644 index 0000000..24f0838 --- /dev/null +++ b/types/resources/EmailConversation.d.ts @@ -0,0 +1,18 @@ +/// +/// + +declare module 'chargebee' { + export interface EmailConversation { + id: string; + customer_id?: string; + mailbox_id?: string; + subject?: string; + last_message_preview?: string; + message_count: number; + status?: string; + last_message_at?: number; + created_at: number; + updated_at: number; + resource_version?: number; + } +} diff --git a/types/resources/EmailLog.d.ts b/types/resources/EmailLog.d.ts index 6004e38..00a4165 100644 --- a/types/resources/EmailLog.d.ts +++ b/types/resources/EmailLog.d.ts @@ -11,6 +11,7 @@ declare module 'chargebee' { status: StatusEnum; sent_on?: number; customer_id?: string; + email_conversation_id?: string; site_id?: string; business_entity_id?: string; brand_id?: string; diff --git a/types/resources/EmailMessage.d.ts b/types/resources/EmailMessage.d.ts new file mode 100644 index 0000000..0c98bd5 --- /dev/null +++ b/types/resources/EmailMessage.d.ts @@ -0,0 +1,40 @@ +/// +/// + +declare module 'chargebee' { + export interface EmailMessage { + id: string; + email_conversation_id?: string; + message_type?: string; + author_type?: 'contact' | 'site_user' | 'agent' | 'other'; + send_status?: 'pending' | 'sent' | 'failed'; + content_html?: string; + content_text?: string; + created_at: number; + updated_at: number; + resource_version?: number; + mailbox_id?: string; + author_id?: string; + author_name?: string; + from_email?: string; + to_emails?: string[]; + cc_emails?: string[]; + attachments?: EmailMessage.Attachment[]; + } + + export namespace EmailMessage { + export interface Attachment { + id: string; + email_message_id?: string; + file_name?: string; + content_type?: string; + size_bytes?: number; + content_disposition?: string; + created_at: number; + updated_at: number; + resource_version?: number; + } + // REQUEST PARAMS + //--------------- + } +} diff --git a/types/resources/Event.d.ts b/types/resources/Event.d.ts index d86bb94..c7712cb 100644 --- a/types/resources/Event.d.ts +++ b/types/resources/Event.d.ts @@ -30,6 +30,8 @@ declare module 'chargebee' { UnbilledChargesDeletedContent & CouponUpdatedContent & GrantBlocksCreatedContent & + ChargebackLostContent & + PriceRampUpdatedContent & OmnichannelSubscriptionItemReactivatedContent & OmnichannelSubscriptionItemRenewedContent & UnbilledChargesCreatedContent & @@ -48,7 +50,6 @@ declare module 'chargebee' { SubscriptionShippingAddressUpdatedContent & VoucherCreateFailedContent & GiftClaimedContent & - BusinessRulesAppliedContent & CustomerDeletedContent & RefundInitiatedContent & InvoiceGeneratedWithBackdatingContent & @@ -74,6 +75,7 @@ declare module 'chargebee' { ContractTermTerminatedContent & ItemFamilyUpdatedContent & OrderCreatedContent & + RefundFailedContent & PriceVariantDeletedContent & AlertStatusChangedContent & SubscriptionMovementFailedContent & @@ -82,6 +84,7 @@ declare module 'chargebee' { SubscriptionAdvanceInvoiceScheduleUpdatedContent & ItemDeletedContent & SubscriptionRampDraftedContent & + ChargebackInitiatedContent & BusinessRuleCreatedContent & VaultTokenUpdatedContent & DunningUpdatedContent & @@ -94,10 +97,12 @@ declare module 'chargebee' { SubscriptionCancellationScheduledContent & SubscriptionRenewedContent & FeatureUpdatedContent & + CollectionsPaymentPromiseFulfilledContent & FeatureDeletedContent & ItemFamilyCreatedContent & OmnichannelSubscriptionItemScheduledChangeRemovedContent & OmnichannelSubscriptionItemResumedContent & + CollectionsDisputeResolvedContent & PurchaseCreatedContent & EntitlementOverridesUpdatedContent & ItemFamilyDeletedContent & @@ -109,6 +114,7 @@ declare module 'chargebee' { OmnichannelSubscriptionItemDowngradedContent & BusinessRulesetDeactivatedContent & PriceVariantUpdatedContent & + CollectionsDisputeUpdatedContent & PromotionalCreditsDeductedContent & SubscriptionRampAppliedContent & BusinessRulesetDeletedContent & @@ -122,8 +128,10 @@ declare module 'chargebee' { ItemCreatedContent & BusinessRulesetCreatedContent & TransactionUpdatedContent & + CollectionsPaymentPromiseUpdatedContent & MrrUpdatedContent & UnbilledChargesInvoicedContent & + ChargebackWonContent & ItemPriceUpdatedContent & CouponCodesUpdatedContent & VirtualBankAccountUpdatedContent & @@ -136,6 +144,8 @@ declare module 'chargebee' { PaymentSchedulesUpdatedContent & OmnichannelSubscriptionItemExpiredContent & CardUpdatedContent & + PriceRampCreatedContent & + CollectionsReminderSequenceCreatedContent & CustomerCreatedContent & SubscriptionRenewalReminderContent & OmnichannelSubscriptionItemMrrUpdatedContent & @@ -144,20 +154,25 @@ declare module 'chargebee' { OmnichannelSubscriptionItemCancellationScheduledContent & OmnichannelSubscriptionItemGracePeriodExpiredContent & CouponCodesAddedContent & + EmailMessageReceivedContent & GiftCancelledContent & OrderCancelledContent & CouponDeletedContent & SubscriptionScheduledChangesRemovedContent & PendingInvoiceCreatedContent & + CollectionsPaymentPromiseBrokenContent & EntitlementOverridesAutoRemovedContent & + PriceRampDeletedContent & BusinessRulesetActivatedContent & OmnichannelSubscriptionItemUpgradedContent & SubscriptionBusinessEntityChangedContent & OmnichannelOneTimeOrderCreatedContent & + CollectionsPaymentPromiseCreatedContent & PaymentSourceDeletedContent & OmnichannelSubscriptionItemCancelledContent & QuoteDeletedContent & InvoiceUpdatedContent & + PrivateNoteAddedContent & SubscriptionAdvanceInvoiceScheduleRemovedContent & CardDeletedContent & OrderReadyToShipContent & @@ -173,6 +188,7 @@ declare module 'chargebee' { CardAddedContent & CouponCreatedContent & RuleDeletedContent & + CollectionsDisputeCreatedContent & ItemPriceEntitlementsUpdatedContent & ItemPriceDeletedContent & VirtualBankAccountDeletedContent & @@ -184,6 +200,7 @@ declare module 'chargebee' { PaymentSourceAddedContent & SubscriptionMovedInContent & LedgerUpdatedContent & + CollectionsPaymentPromiseCancelledContent & ItemPriceCreatedContent & SubscriptionScheduledCancellationRemovedContent & PaymentRefundedContent & @@ -204,6 +221,7 @@ declare module 'chargebee' { PaymentSourceExpiringContent & SubscriptionReactivatedContent & OrderUpdatedContent & + CollectionsDisputeWithdrawnContent & SubscriptionScheduledPauseRemovedContent & SubscriptionCancellationReminderContent & SubscriptionCreatedWithBackdatingContent & @@ -215,6 +233,7 @@ declare module 'chargebee' { OmnichannelSubscriptionItemGracePeriodStartedContent & CardExpiryReminderContent & TokenCreatedContent & + CollectionsReminderSequencePausedContent & PaymentSourceBusinessEntityChangedContent & PromotionalCreditsAddedContent & SubscriptionRampUpdatedContent & @@ -232,6 +251,7 @@ declare module 'chargebee' { AttachedItemDeletedContent & OmnichannelSubscriptionItemScheduledCancellationRemovedContent & ItemUpdatedContent & + CollectionsReminderSequenceResumedContent & CouponSetCreatedContent & PaymentIntentUpdatedContent & OrderResentContent & @@ -241,6 +261,7 @@ declare module 'chargebee' { DifferentialPriceDeletedContent & BusinessRuleActivatedContent & SubscriptionItemsRenewedContent & + PaymentSchedulesCancelledContent & RuleCreatedContent & ContractTermCancelledContent & ContractTermRenewedContent & @@ -257,6 +278,7 @@ declare module 'chargebee' { BusinessEntityDeletedContent & GrantBlocksUpdatedContent & AuthorizationVoidedContent & + CollectionsReminderSequenceCompletedContent & SubscriptionRampDeletedContent & PlanDeletedContent & AddonDeletedContent & diff --git a/types/resources/Execution.d.ts b/types/resources/Execution.d.ts new file mode 100644 index 0000000..6334edd --- /dev/null +++ b/types/resources/Execution.d.ts @@ -0,0 +1,12 @@ +/// +/// + +declare module 'chargebee' { + export interface Execution { + status: 'success' | 'failed'; + created_at: number; + result?: any; + error_detail?: any; + revision_version?: number; + } +} diff --git a/types/resources/GatewayPaymentMethodToken.d.ts b/types/resources/GatewayPaymentMethodToken.d.ts index ffb52f6..ed47b69 100644 --- a/types/resources/GatewayPaymentMethodToken.d.ts +++ b/types/resources/GatewayPaymentMethodToken.d.ts @@ -5,10 +5,10 @@ declare module 'chargebee' { export interface GatewayPaymentMethodToken { id: string; gateway_account_id: string; - gateway_name: GatewayNameEnum; + gateway: GatewayEnum; gateway_customer_id?: string; gateway_token: string; - status: 'active' | 'inactive' | 'pending_verification'; + status: 'valid' | 'invalid' | 'pending_verification'; created_at: number; updated_at?: number; } diff --git a/types/resources/GroupByAttribute.d.ts b/types/resources/GroupByAttribute.d.ts new file mode 100644 index 0000000..1ceaa49 --- /dev/null +++ b/types/resources/GroupByAttribute.d.ts @@ -0,0 +1,15 @@ +/// +/// + +declare module 'chargebee' { + export interface GroupByAttribute { + attribute_name: string; + rank: number; + coverage_percent: number; + cardinality: number; + remaining_value_count: number; + warning: boolean; + sample_values?: string[]; + warning_reasons?: WarningReasonEnum[]; + } +} diff --git a/types/resources/GroupByRecommendation.d.ts b/types/resources/GroupByRecommendation.d.ts new file mode 100644 index 0000000..ce60a26 --- /dev/null +++ b/types/resources/GroupByRecommendation.d.ts @@ -0,0 +1,10 @@ +/// +/// + +declare module 'chargebee' { + export interface GroupByRecommendation { + attribute_name: string; + rank: number; + reason: string; + } +} diff --git a/types/resources/Invoice.d.ts b/types/resources/Invoice.d.ts index 63d1979..51f7206 100644 --- a/types/resources/Invoice.d.ts +++ b/types/resources/Invoice.d.ts @@ -64,6 +64,7 @@ declare module 'chargebee' { tax_origin?: Invoice.TaxOrigin; linked_payments?: Invoice.LinkedPayment[]; reference_transactions?: Invoice.ReferenceTransaction[]; + retry_segment_id?: string; dunning_attempts?: Invoice.DunningAttempt[]; applied_credits?: Invoice.AppliedCredit[]; adjustment_credit_notes?: Invoice.AdjustmentCreditNote[]; @@ -321,6 +322,12 @@ declare module 'chargebee' { headers?: ChargebeeRequestHeader, ): Promise>; + removePaymentScheduleScheme( + invoice_id: string, + input?: RemovePaymentScheduleSchemeInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + paymentSchedules( invoice_id: string, headers?: ChargebeeRequestHeader, @@ -509,6 +516,10 @@ declare module 'chargebee' { invoice: Invoice; } + export interface RemovePaymentScheduleSchemeResponse { + invoice: Invoice; + } + export interface PaymentSchedulesResponse { payment_schedules: PaymentSchedule[]; } @@ -1237,6 +1248,9 @@ declare module 'chargebee' { scheme_id: string; amount?: number; } + export interface RemovePaymentScheduleSchemeInputParam { + comment?: string; + } export interface StatementDescriptorCreateInputParam { descriptor?: string; } @@ -1828,6 +1842,7 @@ declare module 'chargebee' { tax10_amount?: number; is_partial_tax_applied?: boolean; taxable_amount?: number; + tax_exempt_reason?: TaxExemptReasonEnum; proration_mode?: | 'reset' | 'delta' diff --git a/types/resources/ItemPrice.d.ts b/types/resources/ItemPrice.d.ts index 6bbc93c..942b2d4 100644 --- a/types/resources/ItemPrice.d.ts +++ b/types/resources/ItemPrice.d.ts @@ -12,6 +12,7 @@ declare module 'chargebee' { status?: 'active' | 'archived' | 'deleted'; external_name?: string; price_variant_id?: string; + price_ramp_id?: string; proration_type?: 'site_default' | 'partial_term' | 'full_term'; pricing_model: PricingModelEnum; price?: number; diff --git a/types/resources/LedgerAccountBalance.d.ts b/types/resources/LedgerAccountBalance.d.ts index 0ecac57..c847039 100644 --- a/types/resources/LedgerAccountBalance.d.ts +++ b/types/resources/LedgerAccountBalance.d.ts @@ -19,6 +19,11 @@ declare module 'chargebee' { input: ListLedgerAccountBalancesInputParam, headers?: ChargebeeRequestHeader, ): Promise>; + + updateOverdraftLimit( + input: UpdateOverdraftLimitInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; } export interface ListLedgerAccountBalancesResponse { @@ -26,6 +31,13 @@ declare module 'chargebee' { next_offset?: string; } + export interface UpdateOverdraftLimitResponse { + subscription_id: string; + unit_id: string; + change_reason?: string; + overdraft_balance: object; + } + export interface ProvisionedBalance { total_balance: string; usable_balance: string; @@ -48,5 +60,12 @@ declare module 'chargebee' { subscription_id: filter.String; unit_id?: filter.String; } + export interface UpdateOverdraftLimitInputParam { + subscription_id: string; + unit_id: string; + is_unlimited: boolean; + limit?: string; + change_reason?: string; + } } } diff --git a/types/resources/Meter.d.ts b/types/resources/Meter.d.ts index ba7f2ec..1bc3afa 100644 --- a/types/resources/Meter.d.ts +++ b/types/resources/Meter.d.ts @@ -13,6 +13,7 @@ declare module 'chargebee' { updated_at?: number; column_definitions?: ColumnDefinition[]; features?: Feature[]; + group_by?: string[]; } export namespace Meter { diff --git a/types/resources/MeteredFeature.d.ts b/types/resources/MeteredFeature.d.ts index f1f9ced..3266a26 100644 --- a/types/resources/MeteredFeature.d.ts +++ b/types/resources/MeteredFeature.d.ts @@ -10,6 +10,7 @@ declare module 'chargebee' { status?: StatusEnum; query?: string; column_definitions?: ColumnDefinition[]; + group_by?: string[]; features?: Feature[]; } diff --git a/types/resources/OmnichannelOneTimeOrder.d.ts b/types/resources/OmnichannelOneTimeOrder.d.ts index 8a456f3..e7f3ace 100644 --- a/types/resources/OmnichannelOneTimeOrder.d.ts +++ b/types/resources/OmnichannelOneTimeOrder.d.ts @@ -8,7 +8,11 @@ declare module 'chargebee' { customer_id?: string; id_at_source: string; origin?: string; - source: 'apple_app_store' | 'google_play_store'; + source: + | 'apple_app_store' + | 'google_play_store' + | 'roku' + | 'amazon_app_store'; created_at: number; resource_version?: number; omnichannel_one_time_order_items: OmnichannelOneTimeOrderItem[]; diff --git a/types/resources/OmnichannelSubscription.d.ts b/types/resources/OmnichannelSubscription.d.ts index 69505a7..99e6d2d 100644 --- a/types/resources/OmnichannelSubscription.d.ts +++ b/types/resources/OmnichannelSubscription.d.ts @@ -6,8 +6,13 @@ declare module 'chargebee' { id: string; id_at_source: string; app_id: string; - source: 'apple_app_store' | 'google_play_store'; + source: + | 'apple_app_store' + | 'google_play_store' + | 'roku' + | 'amazon_app_store'; customer_id?: string; + origin?: string; created_at: number; purchased_at?: number; updated_at: number; diff --git a/types/resources/OmnichannelSubscriptionItem.d.ts b/types/resources/OmnichannelSubscriptionItem.d.ts index 3049758..6a496ef 100644 --- a/types/resources/OmnichannelSubscriptionItem.d.ts +++ b/types/resources/OmnichannelSubscriptionItem.d.ts @@ -22,13 +22,16 @@ declare module 'chargebee' { | 'product_not_available' | 'other' | 'subscription_not_found_in_source'; + expiration_reason_at_source?: string; cancelled_at?: number; cancellation_reason?: | 'customer_cancelled' | 'customer_did_not_consent_to_price_increase' | 'refunded_due_to_app_issue' | 'refunded_for_other_reason' - | 'merchant_revoked'; + | 'merchant_revoked' + | 'other'; + cancellation_reason_at_source?: string; grace_period_expires_at?: number; resumes_at?: number; has_scheduled_changes: boolean; diff --git a/types/resources/PaymentSchedule.d.ts b/types/resources/PaymentSchedule.d.ts index 95a232e..f5d5032 100644 --- a/types/resources/PaymentSchedule.d.ts +++ b/types/resources/PaymentSchedule.d.ts @@ -34,7 +34,7 @@ declare module 'chargebee' { date: number; amount: number; scheduled_amount: number; - status: 'posted' | 'payment_due' | 'paid'; + status: 'posted' | 'payment_due' | 'paid' | 'voided'; } export interface ReferenceTransaction { schedule_entry_id: string; diff --git a/types/resources/PaymentScheduleEstimate.d.ts b/types/resources/PaymentScheduleEstimate.d.ts index 410c762..5eb75cb 100644 --- a/types/resources/PaymentScheduleEstimate.d.ts +++ b/types/resources/PaymentScheduleEstimate.d.ts @@ -18,7 +18,7 @@ declare module 'chargebee' { date: number; amount: number; scheduled_amount: number; - status: 'posted' | 'payment_due' | 'paid'; + status: 'posted' | 'payment_due' | 'paid' | 'voided'; } // REQUEST PARAMS //--------------- diff --git a/types/resources/PaymentSource.d.ts b/types/resources/PaymentSource.d.ts index 16257df..8740309 100644 --- a/types/resources/PaymentSource.d.ts +++ b/types/resources/PaymentSource.d.ts @@ -318,6 +318,7 @@ declare module 'chargebee' { } export interface NetworkTransactionReference { original_network_transaction_id?: string; + transaction_link_id?: string; } // REQUEST PARAMS //--------------- @@ -347,6 +348,7 @@ declare module 'chargebee' { skip_retrieval?: boolean; additional_information?: any; card?: CardCreateUsingPermanentTokenInputParam; + bank_account?: BankAccountCreateUsingPermanentTokenInputParam; billing_address?: BillingAddressCreateUsingPermanentTokenInputParam; } export interface CreateUsingTokenInputParam { @@ -429,6 +431,23 @@ declare module 'chargebee' { zip?: string; country?: string; } + export interface BankAccountCreateUsingPermanentTokenInputParam { + account_type?: AccountTypeEnum; + account_holder_type?: AccountHolderTypeEnum; + first_name?: string; + last_name?: string; + company?: string; + scheme?: + | 'ach' + | 'bacs' + | 'sepa_core' + | 'autogiro' + | 'becs' + | 'becs_nz' + | 'pad'; + last4?: string; + echeck_type?: EcheckTypeEnum; + } export interface CardCreateUsingPermanentTokenInputParam { last4?: string; iin?: string; diff --git a/types/resources/PreferenceVariant.d.ts b/types/resources/PreferenceVariant.d.ts new file mode 100644 index 0000000..cd24be8 --- /dev/null +++ b/types/resources/PreferenceVariant.d.ts @@ -0,0 +1,10 @@ +/// +/// + +declare module 'chargebee' { + export interface PreferenceVariant { + value: string; + allow_override_in_interface?: boolean; + allow_override_in_api?: boolean; + } +} diff --git a/types/resources/PriceRamp.d.ts b/types/resources/PriceRamp.d.ts new file mode 100644 index 0000000..a4c5ed0 --- /dev/null +++ b/types/resources/PriceRamp.d.ts @@ -0,0 +1,113 @@ +/// +/// +/// +declare module 'chargebee' { + export interface PriceRamp { + id: string; + item_price_id: string; + status: 'active' | 'archived' | 'deleted'; + created_at: number; + resource_version?: number; + updated_at?: number; + archived_at?: number; + ramp_intervals?: PriceRamp.RampInterval[]; + business_entity_id?: string; + } + + export namespace PriceRamp { + export class PriceRampResource { + create( + input: CreateInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + + retrieve( + price_ramp_id: string, + headers?: ChargebeeRequestHeader, + ): Promise>; + + update( + price_ramp_id: string, + input: UpdateInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + + delete( + price_ramp_id: string, + headers?: ChargebeeRequestHeader, + ): Promise>; + + list( + input?: ListInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + } + + export interface CreateResponse { + price_ramp: PriceRamp; + } + + export interface RetrieveResponse { + price_ramp: PriceRamp; + } + + export interface UpdateResponse { + price_ramp: PriceRamp; + } + + export interface DeleteResponse { + price_ramp: PriceRamp; + } + + export interface ListResponse { + list: { price_ramp: PriceRamp }[]; + next_offset?: string; + } + + export interface RampInterval { + starting_billing_cycle: number; + ending_billing_cycle?: number; + apply_catalog_price?: boolean; + price?: number; + price_in_decimal?: string; + } + // REQUEST PARAMS + //--------------- + + export interface CreateInputParam { + item_price_id: string; + business_entity_id?: string; + ramp_intervals?: RampIntervalsCreateInputParam[]; + } + export interface UpdateInputParam { + status?: 'active' | 'archived'; + ramp_intervals?: RampIntervalsUpdateInputParam[]; + } + export interface ListInputParam { + limit?: number; + offset?: string; + id?: filter.String; + item_price_id?: filter.String; + status?: filter.Enum; + updated_at?: filter.Timestamp; + business_entity_id?: filter.String; + include_site_level_resources?: filter.Boolean; + 'sort_by[asc]'?: string; + 'sort_by[desc]'?: string; + } + export interface RampIntervalsCreateInputParam { + starting_billing_cycle: number; + ending_billing_cycle?: number; + apply_catalog_price?: boolean; + price?: number; + price_in_decimal?: string; + } + export interface RampIntervalsUpdateInputParam { + starting_billing_cycle: number; + ending_billing_cycle?: number; + apply_catalog_price?: boolean; + price?: number; + price_in_decimal?: string; + } + } +} diff --git a/types/resources/PrivateNote.d.ts b/types/resources/PrivateNote.d.ts new file mode 100644 index 0000000..bb3102f --- /dev/null +++ b/types/resources/PrivateNote.d.ts @@ -0,0 +1,18 @@ +/// +/// + +declare module 'chargebee' { + export interface PrivateNote { + id: string; + email_conversation_id: string; + author_type?: 'site_user' | 'agent' | 'other'; + author_id?: string; + author_name?: string; + content_html: string; + content_text?: string; + meta_data?: string; + created_at: number; + resource_version?: number; + updated_at: number; + } +} diff --git a/types/resources/Purchase.d.ts b/types/resources/Purchase.d.ts index 0b0f2e8..70b3161 100644 --- a/types/resources/Purchase.d.ts +++ b/types/resources/Purchase.d.ts @@ -156,6 +156,8 @@ declare module 'chargebee' { subscription_id?: string; billing_cycles?: number; contract_term_billing_cycle_on_renewal?: number; + trial_end?: number; + start_date?: number; meta_data?: any; } export interface PurchaseItemsCreateInputParam { @@ -165,6 +167,7 @@ declare module 'chargebee' { unit_amount?: number; unit_amount_in_decimal?: string; quantity_in_decimal?: string; + trial_end?: number; } export interface DiscountsCreateInputParam { index?: number; @@ -231,6 +234,8 @@ declare module 'chargebee' { subscription_id?: string; billing_cycles?: number; contract_term_billing_cycle_on_renewal?: number; + trial_end?: number; + start_date?: number; } export interface PurchaseItemsEstimateInputParam { index: number; @@ -239,6 +244,7 @@ declare module 'chargebee' { unit_amount?: number; unit_amount_in_decimal?: string; quantity_in_decimal?: string; + trial_end?: number; } export interface DiscountsEstimateInputParam { index?: number; diff --git a/types/resources/Ramp.d.ts b/types/resources/Ramp.d.ts index 5ce2921..676b0f2 100644 --- a/types/resources/Ramp.d.ts +++ b/types/resources/Ramp.d.ts @@ -92,6 +92,7 @@ declare module 'chargebee' { metered_quantity?: string; charge_once?: boolean; charge_on_option?: 'immediately' | 'on_event'; + description?: string; charge_on_event?: | 'subscription_trial_start' | 'plan_activation' @@ -114,6 +115,7 @@ declare module 'chargebee' { metered_quantity?: string; charge_once?: boolean; charge_on_option?: 'immediately' | 'on_event'; + description?: string; charge_on_event?: | 'subscription_trial_start' | 'plan_activation' @@ -225,6 +227,7 @@ declare module 'chargebee' { charge_on_event?: ChargeOnEventEnum; charge_once?: boolean; charge_on_option?: ChargeOnOptionEnum; + description?: string; } export interface CouponsToAddCreateForSubscriptionInputParam { coupon_id?: string; @@ -252,6 +255,7 @@ declare module 'chargebee' { charge_on_event?: ChargeOnEventEnum; charge_once?: boolean; charge_on_option?: ChargeOnOptionEnum; + description?: string; } export interface DiscountsToAddCreateForSubscriptionInputParam { apply_on: ApplyOnEnum; @@ -284,6 +288,7 @@ declare module 'chargebee' { charge_on_event?: ChargeOnEventEnum; charge_once?: boolean; charge_on_option?: ChargeOnOptionEnum; + description?: string; } export interface CouponsToAddUpdateInputParam { coupon_id?: string; @@ -311,6 +316,7 @@ declare module 'chargebee' { charge_on_event?: ChargeOnEventEnum; charge_once?: boolean; charge_on_option?: ChargeOnOptionEnum; + description?: string; } export interface DiscountsToAddUpdateInputParam { apply_on: ApplyOnEnum; diff --git a/types/resources/RampInterval.d.ts b/types/resources/RampInterval.d.ts new file mode 100644 index 0000000..b803ba6 --- /dev/null +++ b/types/resources/RampInterval.d.ts @@ -0,0 +1,12 @@ +/// +/// + +declare module 'chargebee' { + export interface RampInterval { + starting_billing_cycle: number; + ending_billing_cycle?: number; + apply_catalog_price?: boolean; + price?: number; + price_in_decimal?: string; + } +} diff --git a/types/resources/RecordedPurchase.d.ts b/types/resources/RecordedPurchase.d.ts index 271d48a..6305603 100644 --- a/types/resources/RecordedPurchase.d.ts +++ b/types/resources/RecordedPurchase.d.ts @@ -6,7 +6,11 @@ declare module 'chargebee' { id: string; customer_id: string; app_id: string; - source: 'apple_app_store' | 'google_play_store'; + source: + | 'apple_app_store' + | 'google_play_store' + | 'roku' + | 'amazon_app_store'; status: 'in_process' | 'completed' | 'failed' | 'ignored'; omnichannel_transaction_id?: string; created_at: number; diff --git a/types/resources/RetrySegment.d.ts b/types/resources/RetrySegment.d.ts new file mode 100644 index 0000000..fba12ea --- /dev/null +++ b/types/resources/RetrySegment.d.ts @@ -0,0 +1,36 @@ +/// +/// + +declare module 'chargebee' { + export interface RetrySegment { + id: string; + name?: string; + invoice_id?: string; + enabled: boolean; + priority?: number; + condition_logic?: 'and' | 'or'; + criteria?: any; + retry_settings?: any; + } + + export namespace RetrySegment { + export class RetrySegmentResource { + retrieve( + retry_segment_id: string, + input?: RetrieveInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + } + + export interface RetrieveResponse { + retry_segment: RetrySegment; + } + + // REQUEST PARAMS + //--------------- + + export interface RetrieveInputParam { + invoice_id?: string; + } + } +} diff --git a/types/resources/Transaction.d.ts b/types/resources/Transaction.d.ts index 48865bc..bf0f605 100644 --- a/types/resources/Transaction.d.ts +++ b/types/resources/Transaction.d.ts @@ -57,6 +57,7 @@ declare module 'chargebee' { merchant_reference_id?: string; business_entity_id?: string; payment_method_details?: string; + gateway_metadata?: Transaction.GatewayMetadata; error_detail?: Transaction.GatewayErrorDetail; custom_payment_method_name?: string; network_transaction_details?: Transaction.NetworkTransactionDetail; @@ -246,6 +247,9 @@ declare module 'chargebee' { amount?: number; date?: number; } + export interface GatewayMetadata { + acquirer_reference_id?: string; + } export interface GatewayErrorDetail { request_id?: string; error_category?: string; diff --git a/types/resources/Usage.d.ts b/types/resources/Usage.d.ts index e006f46..40d4b9c 100644 --- a/types/resources/Usage.d.ts +++ b/types/resources/Usage.d.ts @@ -105,9 +105,15 @@ declare module 'chargebee' { export interface PdfInputParam { disposition_type?: DispositionTypeEnum; invoice?: InvoicePdfInputParam; + group_by?: GroupByPdfInputParam[]; } export interface InvoicePdfInputParam { id: string; } + + export interface GroupByPdfInputParam { + feature_id?: string; + attributes?: any; + } } } diff --git a/types/resources/UsageSummary.d.ts b/types/resources/UsageSummary.d.ts index e08fb70..ebae5b4 100644 --- a/types/resources/UsageSummary.d.ts +++ b/types/resources/UsageSummary.d.ts @@ -8,6 +8,7 @@ declare module 'chargebee' { aggregated_value: string; aggregated_from: number; aggregated_to: number; + attributes?: any; } export namespace UsageSummary { @@ -36,6 +37,7 @@ declare module 'chargebee' { window_size?: 'month' | 'week' | 'day' | 'hour' | 'minute'; timeframe_start?: number; timeframe_end?: number; + group_by?: string[]; } } } diff --git a/types/resources/WebhookEvent.d.ts b/types/resources/WebhookEvent.d.ts index d42cb3e..4408c6a 100644 --- a/types/resources/WebhookEvent.d.ts +++ b/types/resources/WebhookEvent.d.ts @@ -12,6 +12,8 @@ declare module 'chargebee' { UnbilledChargesDeleted = 'unbilled_charges_deleted', CouponUpdated = 'coupon_updated', GrantBlocksCreated = 'grant_blocks_created', + ChargebackLost = 'chargeback_lost', + PriceRampUpdated = 'price_ramp_updated', OmnichannelSubscriptionItemReactivated = 'omnichannel_subscription_item_reactivated', OmnichannelSubscriptionItemRenewed = 'omnichannel_subscription_item_renewed', UnbilledChargesCreated = 'unbilled_charges_created', @@ -30,7 +32,6 @@ declare module 'chargebee' { SubscriptionShippingAddressUpdated = 'subscription_shipping_address_updated', VoucherCreateFailed = 'voucher_create_failed', GiftClaimed = 'gift_claimed', - BusinessRulesApplied = 'business_rules_applied', CustomerDeleted = 'customer_deleted', RefundInitiated = 'refund_initiated', InvoiceGeneratedWithBackdating = 'invoice_generated_with_backdating', @@ -56,6 +57,7 @@ declare module 'chargebee' { ContractTermTerminated = 'contract_term_terminated', ItemFamilyUpdated = 'item_family_updated', OrderCreated = 'order_created', + RefundFailed = 'refund_failed', PriceVariantDeleted = 'price_variant_deleted', AlertStatusChanged = 'alert_status_changed', SubscriptionMovementFailed = 'subscription_movement_failed', @@ -64,6 +66,7 @@ declare module 'chargebee' { SubscriptionAdvanceInvoiceScheduleUpdated = 'subscription_advance_invoice_schedule_updated', ItemDeleted = 'item_deleted', SubscriptionRampDrafted = 'subscription_ramp_drafted', + ChargebackInitiated = 'chargeback_initiated', BusinessRuleCreated = 'business_rule_created', VaultTokenUpdated = 'vault_token_updated', DunningUpdated = 'dunning_updated', @@ -76,10 +79,12 @@ declare module 'chargebee' { SubscriptionCancellationScheduled = 'subscription_cancellation_scheduled', SubscriptionRenewed = 'subscription_renewed', FeatureUpdated = 'feature_updated', + CollectionsPaymentPromiseFulfilled = 'collections_payment_promise_fulfilled', FeatureDeleted = 'feature_deleted', ItemFamilyCreated = 'item_family_created', OmnichannelSubscriptionItemScheduledChangeRemoved = 'omnichannel_subscription_item_scheduled_change_removed', OmnichannelSubscriptionItemResumed = 'omnichannel_subscription_item_resumed', + CollectionsDisputeResolved = 'collections_dispute_resolved', PurchaseCreated = 'purchase_created', EntitlementOverridesUpdated = 'entitlement_overrides_updated', ItemFamilyDeleted = 'item_family_deleted', @@ -91,6 +96,7 @@ declare module 'chargebee' { OmnichannelSubscriptionItemDowngraded = 'omnichannel_subscription_item_downgraded', BusinessRulesetDeactivated = 'business_ruleset_deactivated', PriceVariantUpdated = 'price_variant_updated', + CollectionsDisputeUpdated = 'collections_dispute_updated', PromotionalCreditsDeducted = 'promotional_credits_deducted', SubscriptionRampApplied = 'subscription_ramp_applied', BusinessRulesetDeleted = 'business_ruleset_deleted', @@ -104,8 +110,10 @@ declare module 'chargebee' { ItemCreated = 'item_created', BusinessRulesetCreated = 'business_ruleset_created', TransactionUpdated = 'transaction_updated', + CollectionsPaymentPromiseUpdated = 'collections_payment_promise_updated', MrrUpdated = 'mrr_updated', UnbilledChargesInvoiced = 'unbilled_charges_invoiced', + ChargebackWon = 'chargeback_won', ItemPriceUpdated = 'item_price_updated', CouponCodesUpdated = 'coupon_codes_updated', VirtualBankAccountUpdated = 'virtual_bank_account_updated', @@ -118,6 +126,8 @@ declare module 'chargebee' { PaymentSchedulesUpdated = 'payment_schedules_updated', OmnichannelSubscriptionItemExpired = 'omnichannel_subscription_item_expired', CardUpdated = 'card_updated', + PriceRampCreated = 'price_ramp_created', + CollectionsReminderSequenceCreated = 'collections_reminder_sequence_created', CustomerCreated = 'customer_created', SubscriptionRenewalReminder = 'subscription_renewal_reminder', OmnichannelSubscriptionItemMrrUpdated = 'omnichannel_subscription_item_mrr_updated', @@ -126,20 +136,25 @@ declare module 'chargebee' { OmnichannelSubscriptionItemCancellationScheduled = 'omnichannel_subscription_item_cancellation_scheduled', OmnichannelSubscriptionItemGracePeriodExpired = 'omnichannel_subscription_item_grace_period_expired', CouponCodesAdded = 'coupon_codes_added', + EmailMessageReceived = 'email_message_received', GiftCancelled = 'gift_cancelled', OrderCancelled = 'order_cancelled', CouponDeleted = 'coupon_deleted', SubscriptionScheduledChangesRemoved = 'subscription_scheduled_changes_removed', PendingInvoiceCreated = 'pending_invoice_created', + CollectionsPaymentPromiseBroken = 'collections_payment_promise_broken', EntitlementOverridesAutoRemoved = 'entitlement_overrides_auto_removed', + PriceRampDeleted = 'price_ramp_deleted', BusinessRulesetActivated = 'business_ruleset_activated', OmnichannelSubscriptionItemUpgraded = 'omnichannel_subscription_item_upgraded', SubscriptionBusinessEntityChanged = 'subscription_business_entity_changed', OmnichannelOneTimeOrderCreated = 'omnichannel_one_time_order_created', + CollectionsPaymentPromiseCreated = 'collections_payment_promise_created', PaymentSourceDeleted = 'payment_source_deleted', OmnichannelSubscriptionItemCancelled = 'omnichannel_subscription_item_cancelled', QuoteDeleted = 'quote_deleted', InvoiceUpdated = 'invoice_updated', + PrivateNoteAdded = 'private_note_added', SubscriptionAdvanceInvoiceScheduleRemoved = 'subscription_advance_invoice_schedule_removed', CardDeleted = 'card_deleted', OrderReadyToShip = 'order_ready_to_ship', @@ -155,6 +170,7 @@ declare module 'chargebee' { CardAdded = 'card_added', CouponCreated = 'coupon_created', RuleDeleted = 'rule_deleted', + CollectionsDisputeCreated = 'collections_dispute_created', ItemPriceEntitlementsUpdated = 'item_price_entitlements_updated', ItemPriceDeleted = 'item_price_deleted', VirtualBankAccountDeleted = 'virtual_bank_account_deleted', @@ -166,6 +182,7 @@ declare module 'chargebee' { PaymentSourceAdded = 'payment_source_added', SubscriptionMovedIn = 'subscription_moved_in', LedgerUpdated = 'ledger_updated', + CollectionsPaymentPromiseCancelled = 'collections_payment_promise_cancelled', ItemPriceCreated = 'item_price_created', SubscriptionScheduledCancellationRemoved = 'subscription_scheduled_cancellation_removed', PaymentRefunded = 'payment_refunded', @@ -186,6 +203,7 @@ declare module 'chargebee' { PaymentSourceExpiring = 'payment_source_expiring', SubscriptionReactivated = 'subscription_reactivated', OrderUpdated = 'order_updated', + CollectionsDisputeWithdrawn = 'collections_dispute_withdrawn', SubscriptionScheduledPauseRemoved = 'subscription_scheduled_pause_removed', SubscriptionCancellationReminder = 'subscription_cancellation_reminder', SubscriptionCreatedWithBackdating = 'subscription_created_with_backdating', @@ -197,6 +215,7 @@ declare module 'chargebee' { OmnichannelSubscriptionItemGracePeriodStarted = 'omnichannel_subscription_item_grace_period_started', CardExpiryReminder = 'card_expiry_reminder', TokenCreated = 'token_created', + CollectionsReminderSequencePaused = 'collections_reminder_sequence_paused', PaymentSourceBusinessEntityChanged = 'payment_source_business_entity_changed', PromotionalCreditsAdded = 'promotional_credits_added', SubscriptionRampUpdated = 'subscription_ramp_updated', @@ -214,6 +233,7 @@ declare module 'chargebee' { AttachedItemDeleted = 'attached_item_deleted', OmnichannelSubscriptionItemScheduledCancellationRemoved = 'omnichannel_subscription_item_scheduled_cancellation_removed', ItemUpdated = 'item_updated', + CollectionsReminderSequenceResumed = 'collections_reminder_sequence_resumed', CouponSetCreated = 'coupon_set_created', PaymentIntentUpdated = 'payment_intent_updated', OrderResent = 'order_resent', @@ -223,6 +243,7 @@ declare module 'chargebee' { DifferentialPriceDeleted = 'differential_price_deleted', BusinessRuleActivated = 'business_rule_activated', SubscriptionItemsRenewed = 'subscription_items_renewed', + PaymentSchedulesCancelled = 'payment_schedules_cancelled', RuleCreated = 'rule_created', ContractTermCancelled = 'contract_term_cancelled', ContractTermRenewed = 'contract_term_renewed', @@ -239,6 +260,7 @@ declare module 'chargebee' { BusinessEntityDeleted = 'business_entity_deleted', GrantBlocksUpdated = 'grant_blocks_updated', AuthorizationVoided = 'authorization_voided', + CollectionsReminderSequenceCompleted = 'collections_reminder_sequence_completed', SubscriptionRampDeleted = 'subscription_ramp_deleted', PlanDeleted = 'plan_deleted', AddonDeleted = 'addon_deleted', @@ -262,6 +284,8 @@ declare module 'chargebee' { [WebhookEventType.UnbilledChargesDeleted]: UnbilledChargesDeletedContent; [WebhookEventType.CouponUpdated]: CouponUpdatedContent; [WebhookEventType.GrantBlocksCreated]: GrantBlocksCreatedContent; + [WebhookEventType.ChargebackLost]: ChargebackLostContent; + [WebhookEventType.PriceRampUpdated]: PriceRampUpdatedContent; [WebhookEventType.OmnichannelSubscriptionItemReactivated]: OmnichannelSubscriptionItemReactivatedContent; [WebhookEventType.OmnichannelSubscriptionItemRenewed]: OmnichannelSubscriptionItemRenewedContent; [WebhookEventType.UnbilledChargesCreated]: UnbilledChargesCreatedContent; @@ -280,7 +304,6 @@ declare module 'chargebee' { [WebhookEventType.SubscriptionShippingAddressUpdated]: SubscriptionShippingAddressUpdatedContent; [WebhookEventType.VoucherCreateFailed]: VoucherCreateFailedContent; [WebhookEventType.GiftClaimed]: GiftClaimedContent; - [WebhookEventType.BusinessRulesApplied]: BusinessRulesAppliedContent; [WebhookEventType.CustomerDeleted]: CustomerDeletedContent; [WebhookEventType.RefundInitiated]: RefundInitiatedContent; [WebhookEventType.InvoiceGeneratedWithBackdating]: InvoiceGeneratedWithBackdatingContent; @@ -306,6 +329,7 @@ declare module 'chargebee' { [WebhookEventType.ContractTermTerminated]: ContractTermTerminatedContent; [WebhookEventType.ItemFamilyUpdated]: ItemFamilyUpdatedContent; [WebhookEventType.OrderCreated]: OrderCreatedContent; + [WebhookEventType.RefundFailed]: RefundFailedContent; [WebhookEventType.PriceVariantDeleted]: PriceVariantDeletedContent; [WebhookEventType.AlertStatusChanged]: AlertStatusChangedContent; [WebhookEventType.SubscriptionMovementFailed]: SubscriptionMovementFailedContent; @@ -314,6 +338,7 @@ declare module 'chargebee' { [WebhookEventType.SubscriptionAdvanceInvoiceScheduleUpdated]: SubscriptionAdvanceInvoiceScheduleUpdatedContent; [WebhookEventType.ItemDeleted]: ItemDeletedContent; [WebhookEventType.SubscriptionRampDrafted]: SubscriptionRampDraftedContent; + [WebhookEventType.ChargebackInitiated]: ChargebackInitiatedContent; [WebhookEventType.BusinessRuleCreated]: BusinessRuleCreatedContent; [WebhookEventType.VaultTokenUpdated]: VaultTokenUpdatedContent; [WebhookEventType.DunningUpdated]: DunningUpdatedContent; @@ -326,10 +351,12 @@ declare module 'chargebee' { [WebhookEventType.SubscriptionCancellationScheduled]: SubscriptionCancellationScheduledContent; [WebhookEventType.SubscriptionRenewed]: SubscriptionRenewedContent; [WebhookEventType.FeatureUpdated]: FeatureUpdatedContent; + [WebhookEventType.CollectionsPaymentPromiseFulfilled]: CollectionsPaymentPromiseFulfilledContent; [WebhookEventType.FeatureDeleted]: FeatureDeletedContent; [WebhookEventType.ItemFamilyCreated]: ItemFamilyCreatedContent; [WebhookEventType.OmnichannelSubscriptionItemScheduledChangeRemoved]: OmnichannelSubscriptionItemScheduledChangeRemovedContent; [WebhookEventType.OmnichannelSubscriptionItemResumed]: OmnichannelSubscriptionItemResumedContent; + [WebhookEventType.CollectionsDisputeResolved]: CollectionsDisputeResolvedContent; [WebhookEventType.PurchaseCreated]: PurchaseCreatedContent; [WebhookEventType.EntitlementOverridesUpdated]: EntitlementOverridesUpdatedContent; [WebhookEventType.ItemFamilyDeleted]: ItemFamilyDeletedContent; @@ -341,6 +368,7 @@ declare module 'chargebee' { [WebhookEventType.OmnichannelSubscriptionItemDowngraded]: OmnichannelSubscriptionItemDowngradedContent; [WebhookEventType.BusinessRulesetDeactivated]: BusinessRulesetDeactivatedContent; [WebhookEventType.PriceVariantUpdated]: PriceVariantUpdatedContent; + [WebhookEventType.CollectionsDisputeUpdated]: CollectionsDisputeUpdatedContent; [WebhookEventType.PromotionalCreditsDeducted]: PromotionalCreditsDeductedContent; [WebhookEventType.SubscriptionRampApplied]: SubscriptionRampAppliedContent; [WebhookEventType.BusinessRulesetDeleted]: BusinessRulesetDeletedContent; @@ -354,8 +382,10 @@ declare module 'chargebee' { [WebhookEventType.ItemCreated]: ItemCreatedContent; [WebhookEventType.BusinessRulesetCreated]: BusinessRulesetCreatedContent; [WebhookEventType.TransactionUpdated]: TransactionUpdatedContent; + [WebhookEventType.CollectionsPaymentPromiseUpdated]: CollectionsPaymentPromiseUpdatedContent; [WebhookEventType.MrrUpdated]: MrrUpdatedContent; [WebhookEventType.UnbilledChargesInvoiced]: UnbilledChargesInvoicedContent; + [WebhookEventType.ChargebackWon]: ChargebackWonContent; [WebhookEventType.ItemPriceUpdated]: ItemPriceUpdatedContent; [WebhookEventType.CouponCodesUpdated]: CouponCodesUpdatedContent; [WebhookEventType.VirtualBankAccountUpdated]: VirtualBankAccountUpdatedContent; @@ -368,6 +398,8 @@ declare module 'chargebee' { [WebhookEventType.PaymentSchedulesUpdated]: PaymentSchedulesUpdatedContent; [WebhookEventType.OmnichannelSubscriptionItemExpired]: OmnichannelSubscriptionItemExpiredContent; [WebhookEventType.CardUpdated]: CardUpdatedContent; + [WebhookEventType.PriceRampCreated]: PriceRampCreatedContent; + [WebhookEventType.CollectionsReminderSequenceCreated]: CollectionsReminderSequenceCreatedContent; [WebhookEventType.CustomerCreated]: CustomerCreatedContent; [WebhookEventType.SubscriptionRenewalReminder]: SubscriptionRenewalReminderContent; [WebhookEventType.OmnichannelSubscriptionItemMrrUpdated]: OmnichannelSubscriptionItemMrrUpdatedContent; @@ -376,20 +408,25 @@ declare module 'chargebee' { [WebhookEventType.OmnichannelSubscriptionItemCancellationScheduled]: OmnichannelSubscriptionItemCancellationScheduledContent; [WebhookEventType.OmnichannelSubscriptionItemGracePeriodExpired]: OmnichannelSubscriptionItemGracePeriodExpiredContent; [WebhookEventType.CouponCodesAdded]: CouponCodesAddedContent; + [WebhookEventType.EmailMessageReceived]: EmailMessageReceivedContent; [WebhookEventType.GiftCancelled]: GiftCancelledContent; [WebhookEventType.OrderCancelled]: OrderCancelledContent; [WebhookEventType.CouponDeleted]: CouponDeletedContent; [WebhookEventType.SubscriptionScheduledChangesRemoved]: SubscriptionScheduledChangesRemovedContent; [WebhookEventType.PendingInvoiceCreated]: PendingInvoiceCreatedContent; + [WebhookEventType.CollectionsPaymentPromiseBroken]: CollectionsPaymentPromiseBrokenContent; [WebhookEventType.EntitlementOverridesAutoRemoved]: EntitlementOverridesAutoRemovedContent; + [WebhookEventType.PriceRampDeleted]: PriceRampDeletedContent; [WebhookEventType.BusinessRulesetActivated]: BusinessRulesetActivatedContent; [WebhookEventType.OmnichannelSubscriptionItemUpgraded]: OmnichannelSubscriptionItemUpgradedContent; [WebhookEventType.SubscriptionBusinessEntityChanged]: SubscriptionBusinessEntityChangedContent; [WebhookEventType.OmnichannelOneTimeOrderCreated]: OmnichannelOneTimeOrderCreatedContent; + [WebhookEventType.CollectionsPaymentPromiseCreated]: CollectionsPaymentPromiseCreatedContent; [WebhookEventType.PaymentSourceDeleted]: PaymentSourceDeletedContent; [WebhookEventType.OmnichannelSubscriptionItemCancelled]: OmnichannelSubscriptionItemCancelledContent; [WebhookEventType.QuoteDeleted]: QuoteDeletedContent; [WebhookEventType.InvoiceUpdated]: InvoiceUpdatedContent; + [WebhookEventType.PrivateNoteAdded]: PrivateNoteAddedContent; [WebhookEventType.SubscriptionAdvanceInvoiceScheduleRemoved]: SubscriptionAdvanceInvoiceScheduleRemovedContent; [WebhookEventType.CardDeleted]: CardDeletedContent; [WebhookEventType.OrderReadyToShip]: OrderReadyToShipContent; @@ -405,6 +442,7 @@ declare module 'chargebee' { [WebhookEventType.CardAdded]: CardAddedContent; [WebhookEventType.CouponCreated]: CouponCreatedContent; [WebhookEventType.RuleDeleted]: RuleDeletedContent; + [WebhookEventType.CollectionsDisputeCreated]: CollectionsDisputeCreatedContent; [WebhookEventType.ItemPriceEntitlementsUpdated]: ItemPriceEntitlementsUpdatedContent; [WebhookEventType.ItemPriceDeleted]: ItemPriceDeletedContent; [WebhookEventType.VirtualBankAccountDeleted]: VirtualBankAccountDeletedContent; @@ -416,6 +454,7 @@ declare module 'chargebee' { [WebhookEventType.PaymentSourceAdded]: PaymentSourceAddedContent; [WebhookEventType.SubscriptionMovedIn]: SubscriptionMovedInContent; [WebhookEventType.LedgerUpdated]: LedgerUpdatedContent; + [WebhookEventType.CollectionsPaymentPromiseCancelled]: CollectionsPaymentPromiseCancelledContent; [WebhookEventType.ItemPriceCreated]: ItemPriceCreatedContent; [WebhookEventType.SubscriptionScheduledCancellationRemoved]: SubscriptionScheduledCancellationRemovedContent; [WebhookEventType.PaymentRefunded]: PaymentRefundedContent; @@ -436,6 +475,7 @@ declare module 'chargebee' { [WebhookEventType.PaymentSourceExpiring]: PaymentSourceExpiringContent; [WebhookEventType.SubscriptionReactivated]: SubscriptionReactivatedContent; [WebhookEventType.OrderUpdated]: OrderUpdatedContent; + [WebhookEventType.CollectionsDisputeWithdrawn]: CollectionsDisputeWithdrawnContent; [WebhookEventType.SubscriptionScheduledPauseRemoved]: SubscriptionScheduledPauseRemovedContent; [WebhookEventType.SubscriptionCancellationReminder]: SubscriptionCancellationReminderContent; [WebhookEventType.SubscriptionCreatedWithBackdating]: SubscriptionCreatedWithBackdatingContent; @@ -447,6 +487,7 @@ declare module 'chargebee' { [WebhookEventType.OmnichannelSubscriptionItemGracePeriodStarted]: OmnichannelSubscriptionItemGracePeriodStartedContent; [WebhookEventType.CardExpiryReminder]: CardExpiryReminderContent; [WebhookEventType.TokenCreated]: TokenCreatedContent; + [WebhookEventType.CollectionsReminderSequencePaused]: CollectionsReminderSequencePausedContent; [WebhookEventType.PaymentSourceBusinessEntityChanged]: PaymentSourceBusinessEntityChangedContent; [WebhookEventType.PromotionalCreditsAdded]: PromotionalCreditsAddedContent; [WebhookEventType.SubscriptionRampUpdated]: SubscriptionRampUpdatedContent; @@ -464,6 +505,7 @@ declare module 'chargebee' { [WebhookEventType.AttachedItemDeleted]: AttachedItemDeletedContent; [WebhookEventType.OmnichannelSubscriptionItemScheduledCancellationRemoved]: OmnichannelSubscriptionItemScheduledCancellationRemovedContent; [WebhookEventType.ItemUpdated]: ItemUpdatedContent; + [WebhookEventType.CollectionsReminderSequenceResumed]: CollectionsReminderSequenceResumedContent; [WebhookEventType.CouponSetCreated]: CouponSetCreatedContent; [WebhookEventType.PaymentIntentUpdated]: PaymentIntentUpdatedContent; [WebhookEventType.OrderResent]: OrderResentContent; @@ -473,6 +515,7 @@ declare module 'chargebee' { [WebhookEventType.DifferentialPriceDeleted]: DifferentialPriceDeletedContent; [WebhookEventType.BusinessRuleActivated]: BusinessRuleActivatedContent; [WebhookEventType.SubscriptionItemsRenewed]: SubscriptionItemsRenewedContent; + [WebhookEventType.PaymentSchedulesCancelled]: PaymentSchedulesCancelledContent; [WebhookEventType.RuleCreated]: RuleCreatedContent; [WebhookEventType.ContractTermCancelled]: ContractTermCancelledContent; [WebhookEventType.ContractTermRenewed]: ContractTermRenewedContent; @@ -489,6 +532,7 @@ declare module 'chargebee' { [WebhookEventType.BusinessEntityDeleted]: BusinessEntityDeletedContent; [WebhookEventType.GrantBlocksUpdated]: GrantBlocksUpdatedContent; [WebhookEventType.AuthorizationVoided]: AuthorizationVoidedContent; + [WebhookEventType.CollectionsReminderSequenceCompleted]: CollectionsReminderSequenceCompletedContent; [WebhookEventType.SubscriptionRampDeleted]: SubscriptionRampDeletedContent; [WebhookEventType.PlanDeleted]: PlanDeletedContent; [WebhookEventType.AddonDeleted]: AddonDeletedContent; @@ -561,6 +605,20 @@ declare module 'chargebee' { export type GrantBlocksCreatedContent = { grant_block: GrantBlock[]; }; + export type ChargebackLostContent = { + dispute: Dispute; + + transaction: Transaction; + + customer: Customer; + + subscription: Subscription; + }; + export type PriceRampUpdatedContent = { + price_ramp: PriceRamp; + + ramp_interval: RampInterval; + }; export type OmnichannelSubscriptionItemReactivatedContent = { omnichannel_subscription: OmnichannelSubscription; @@ -683,9 +741,6 @@ declare module 'chargebee' { export type GiftClaimedContent = { gift: Gift; }; - export type BusinessRulesAppliedContent = { - applied_business_rule: AppliedBusinessRule; - }; export type CustomerDeletedContent = { customer: Customer; @@ -817,6 +872,19 @@ declare module 'chargebee' { export type OrderCreatedContent = { order: Order; }; + export type RefundFailedContent = { + transaction: Transaction; + + invoice: Invoice; + + credit_note: CreditNote; + + customer: Customer; + + subscription: Subscription; + + card: Card; + }; export type PriceVariantDeletedContent = { price_variant: PriceVariant; @@ -851,6 +919,15 @@ declare module 'chargebee' { export type SubscriptionRampDraftedContent = { ramp: Ramp; }; + export type ChargebackInitiatedContent = { + dispute: Dispute; + + transaction: Transaction; + + customer: Customer; + + subscription: Subscription; + }; export type BusinessRuleCreatedContent = { business_rule: BusinessRule; }; @@ -915,6 +992,9 @@ declare module 'chargebee' { metadata: Metadata; }; + export type CollectionsPaymentPromiseFulfilledContent = { + collections_payment_promise: CollectionsPaymentPromise; + }; export type FeatureDeletedContent = { feature: Feature; @@ -941,6 +1021,9 @@ declare module 'chargebee' { customer: Customer; }; + export type CollectionsDisputeResolvedContent = { + collections_dispute: CollectionsDispute; + }; export type PurchaseCreatedContent = { purchase: Purchase; }; @@ -998,6 +1081,9 @@ declare module 'chargebee' { attribute: Attribute; }; + export type CollectionsDisputeUpdatedContent = { + collections_dispute: CollectionsDispute; + }; export type PromotionalCreditsDeductedContent = { customer: Customer; @@ -1065,6 +1151,9 @@ declare module 'chargebee' { export type TransactionUpdatedContent = { transaction: Transaction; }; + export type CollectionsPaymentPromiseUpdatedContent = { + collections_payment_promise: CollectionsPaymentPromise; + }; export type MrrUpdatedContent = { subscription: Subscription; }; @@ -1073,6 +1162,15 @@ declare module 'chargebee' { invoice: Invoice; }; + export type ChargebackWonContent = { + dispute: Dispute; + + transaction: Transaction; + + customer: Customer; + + subscription: Subscription; + }; export type ItemPriceUpdatedContent = { item_price: ItemPrice; }; @@ -1141,6 +1239,14 @@ declare module 'chargebee' { card: Card; }; + export type PriceRampCreatedContent = { + price_ramp: PriceRamp; + + ramp_interval: RampInterval; + }; + export type CollectionsReminderSequenceCreatedContent = { + collections_reminder_sequence: CollectionsReminderSequence; + }; export type CustomerCreatedContent = { customer: Customer; @@ -1189,6 +1295,9 @@ declare module 'chargebee' { coupon_set: CouponSet; }; + export type EmailMessageReceivedContent = { + email_message: EmailMessage; + }; export type GiftCancelledContent = { gift: Gift; }; @@ -1210,6 +1319,9 @@ declare module 'chargebee' { export type PendingInvoiceCreatedContent = { invoice: Invoice; }; + export type CollectionsPaymentPromiseBrokenContent = { + collections_payment_promise: CollectionsPaymentPromise; + }; export type EntitlementOverridesAutoRemovedContent = { feature: Feature; @@ -1219,6 +1331,11 @@ declare module 'chargebee' { impacted_subscription: ImpactedSubscription; }; + export type PriceRampDeletedContent = { + price_ramp: PriceRamp; + + ramp_interval: RampInterval; + }; export type BusinessRulesetActivatedContent = { business_ruleset: BusinessRuleset; }; @@ -1247,6 +1364,9 @@ declare module 'chargebee' { customer: Customer; }; + export type CollectionsPaymentPromiseCreatedContent = { + collections_payment_promise: CollectionsPaymentPromise; + }; export type PaymentSourceDeletedContent = { customer: Customer; @@ -1265,6 +1385,9 @@ declare module 'chargebee' { export type InvoiceUpdatedContent = { invoice: Invoice; }; + export type PrivateNoteAddedContent = { + private_note: PrivateNote; + }; export type SubscriptionAdvanceInvoiceScheduleRemovedContent = { subscription: Subscription; @@ -1350,6 +1473,9 @@ declare module 'chargebee' { export type RuleDeletedContent = { rule: Rule; }; + export type CollectionsDisputeCreatedContent = { + collections_dispute: CollectionsDispute; + }; export type ItemPriceEntitlementsUpdatedContent = { feature: Feature; @@ -1413,6 +1539,9 @@ declare module 'chargebee' { ledger_entry: LedgerEntry[]; }; + export type CollectionsPaymentPromiseCancelledContent = { + collections_payment_promise: CollectionsPaymentPromise; + }; export type ItemPriceCreatedContent = { item_price: ItemPrice; }; @@ -1533,6 +1662,9 @@ declare module 'chargebee' { export type OrderUpdatedContent = { order: Order; }; + export type CollectionsDisputeWithdrawnContent = { + collections_dispute: CollectionsDispute; + }; export type SubscriptionScheduledPauseRemovedContent = { subscription: Subscription; @@ -1602,6 +1734,9 @@ declare module 'chargebee' { export type TokenCreatedContent = { token: Token; }; + export type CollectionsReminderSequencePausedContent = { + collections_reminder_sequence: CollectionsReminderSequence; + }; export type PaymentSourceBusinessEntityChangedContent = { business_entity_transfer: BusinessEntityTransfer; @@ -1669,6 +1804,9 @@ declare module 'chargebee' { export type ItemUpdatedContent = { item: Item; }; + export type CollectionsReminderSequenceResumedContent = { + collections_reminder_sequence: CollectionsReminderSequence; + }; export type CouponSetCreatedContent = { coupon: Coupon; @@ -1720,6 +1858,9 @@ declare module 'chargebee' { unbilled_charge: UnbilledCharge[]; }; + export type PaymentSchedulesCancelledContent = { + payment_schedule: PaymentSchedule; + }; export type RuleCreatedContent = { rule: Rule; }; @@ -1782,6 +1923,9 @@ declare module 'chargebee' { export type AuthorizationVoidedContent = { transaction: Transaction; }; + export type CollectionsReminderSequenceCompletedContent = { + collections_reminder_sequence: CollectionsReminderSequence; + }; export type SubscriptionRampDeletedContent = { ramp: Ramp; };