Release v3.26.0#122
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
PR Complexity Score: 4.1 - Moderate
View Breakdown
- Lines Changed: 479
- Files Changed: 16
- Complexity Added: 9
- Raw Score: 71.08
Overview
This PR releases version 3.26.0 of the Chargebee Node client, introducing support for new ledger and grant-related APIs and several new attributes and enums across existing resources. It wires up new API endpoints and TypeScript typings for GrantBlock, LedgerAccountBalance, LedgerOperation, and PromotionalGrant, along with enhanced querying/sorting capabilities. It also adds minor enhancements to CreditNote and HostedPage resources and updates the client version metadata.
Key Changes
- Bumps library version from 3.25.0 to 3.26.0 in metadata (VERSION, package manifests, and
Environment.clientVersion). - Adds new resources and endpoints:
GrantBlock: listing grant blocks with filtering/sorting, including newStatusEnumand related enums for grant source, account type, and unit type.LedgerAccountBalance: listing balances per subscription/unit including provisioned and overdraft balances.LedgerOperation: retrieval, listing, and mutation endpoints (capture,authorize,captureAuthorization,releaseAuthorization) with detailed type enums and balance deltas.PromotionalGrant: endpoint to create promotional grants that return associatedledger_operationsandgrant_blocks.
- Expands existing resources:
CreditNotenow supports anotes?: string[]attribute.HostedPagenow supports alayout?: LayoutEnumattribute, and theupdatePaymentMethodmethod is marked as deprecated in the typings.OmnichannelSubscription.listOmnichannelSubscriptionsinput now supportssort_by[asc]andsort_by[desc]query parameters.
- Adds a general
StatusEnum(available,exhausted,scheduled,in_grace_period) to the core typings and wires new resource types intoContentand the mainchargebeeresource map, enabling typed access to the new APIs.
Risks & Considerations
- Removal of
'update_payment_method'from theHostedPage.typeunion may cause TypeScript compilation issues for consumers still relying on that enum value. - New methods and endpoints (
ledgerOperation.capture/authorize/...,promotionalGrant.promotionalGrants,grantBlock.listGrantBlocks,ledgerAccountBalance.listLedgerAccountBalances) should be verified against the backend API for URL correctness and expected request/response shapes. - New enums and filters (especially
typeandsort_byparameters on ledger/grant/omnichannel endpoints) should be checked to confirm they align exactly with backend validation rules to avoid runtime API errors. - The new
notesarray onCreditNoteandlayoutonHostedPageare optional, but downstream code may need updates to leverage them or to avoid assumptions about their absence.
File-level change summary
| File | Change summary |
|---|---|
| CHANGELOG.md | Adds v3.26.0 release notes describing new resources, attributes, parameters, and enum values. |
| VERSION | Bumps library version from 3.25.0 to 3.26.0. |
| package-lock.json | Updates package version metadata to 3.26.0 in the lockfile. |
| package.json | Updates NPM package version from 3.25.0 to 3.26.0. |
| src/environment.ts | Updates Environment.clientVersion from v3.25.0 to v3.26.0. |
| src/resources/api_endpoints.ts | Registers new API endpoints for ledger account balances, ledger operations (including capture/authorize flows), grant blocks, and promotional grants. |
| types/core.d.ts | Introduces a new StatusEnum union type for grant block status values. |
| types/index.d.ts | Adds references and exported resource handles for GrantBlock, LedgerAccountBalance, LedgerOperation, and PromotionalGrant. |
| types/resources/Content.d.ts | Extends the content map to include grant_block, ledger_account_balance, ledger_operation, and promotional_grant resource types. |
| types/resources/CreditNote.d.ts | Adds an optional notes?: string[] field to the CreditNote interface. |
| types/resources/GrantBlock.d.ts | Introduces the GrantBlock interface and GrantBlockResource with a typed listGrantBlocks method and input/response contracts. |
| types/resources/HostedPage.d.ts | Removes update_payment_method from the type union, adds optional layout attribute, and marks updatePaymentMethod as deprecated via JSDoc. |
| types/resources/LedgerAccountBalance.d.ts | Adds LedgerAccountBalance interfaces and LedgerAccountBalanceResource with a typed listLedgerAccountBalances method. |
| types/resources/LedgerOperation.d.ts | Adds LedgerOperation interfaces and LedgerOperationResource with retrieval, listing, and capture/authorize-related methods and their input/response types. |
| types/resources/OmnichannelSubscription.d.ts | Extends list input params to support sort_by[asc] and sort_by[desc] for omnichannel subscriptions. |
| types/resources/PromotionalGrant.d.ts | Adds PromotionalGrant interfaces and PromotionalGrantResource with a promotionalGrants method and corresponding input/response types. |
There was a problem hiding this comment.
PR Complexity Score: 1.3 - Trivial
View Breakdown
- Lines Changed: 125
- Files Changed: 1
- Complexity Added: 0
- Raw Score: 5.5
Overview
This PR extends the API endpoint configuration to support new ledger-related and promotional grant resources, and adjusts an existing endpoint flag.
It primarily modifies src/resources/api_endpoints.ts by adding endpoint definitions for ledger account balances, ledger operations, grant blocks, and promotional grants, and by tweaking the configuration of an existing endpoint in the grow group.
Key Changes
- Added
ledgerAccountBalanceendpoint group with alistLedgerAccountBalancesGET endpoint for retrieving ledger account balance data. - Added
ledgerOperationendpoint group, including retrieval, listing, and multiple POST operations (capture,authorize,captureAuthorization,releaseAuthorization) with metadata support for managing ledger operations. - Added
grantBlockendpoint group with alistGrantBlocksGET endpoint to fetch grant block records. - Added
promotionalGrantendpoint group with apromotionalGrantsPOST endpoint that accepts metadata and is marked as idempotent. - Changed an existing
grow-scoped endpoint configuration flag fromtruetofalse, altering its behavior (e.g., around pagination, authentication, or feature gating, depending on how this flag is interpreted in the codebase).
Risks & Considerations
- New endpoints must align with backend API contracts (paths, HTTP methods, and expected metadata fields) to avoid runtime errors.
- The toggled
growendpoint flag may change behavior such as feature availability, request handling, or validation, and should be regression-tested against existing consumers. - Idempotency configuration for
promotionalGrantsshould be verified to ensure repeat submissions are safely handled by the backend. - Metadata-enabled endpoints (
capture,authorize,captureAuthorization,releaseAuthorization,promotionalGrants) should be validated to ensure correct serialization and schema compatibility.
File-level change summary
| File | Change summary |
|---|---|
| src/resources/api_endpoints.ts | Added new endpoint groups for ledger account balances, ledger operations, grant blocks, and promotional grants, and changed a configuration flag from true to false on an existing grow-scoped endpoint. |
v3.26.0 (2026-06-12)
New Resources:
GrantBlockhas been added.LedgerAccountBalancehas been added.LedgerOperationhas been added.PromotionalGranthas been added.New Attributes:
noteshas been added toCreditNote.layouthas been added toHostedPage.New Parameters:
sort_byhas been added as query parameter tolist_omnichannel_subscriptionsinOmnichannelSubscription.New Enums:
available,exhausted,scheduled, andin_grace_periodhave been added as new values enumStatus.subscription_created,subscription_changed,top_up,promotional_grants, androlloverhave been added as new values to enum attributegrant_sourceinGrantBlock.provisionedandoverdrafthave been added as new values to enum attributeaccount_typeinGrantBlock.credit_unithas been added as a new value to enum attributeunit_typeinGrantBlock.credit_unithas been added as a new value to enum attributeunit_typeinLedgerAccountBalance.allocation,capture,authorize,release_authorization,capture_authorization,expiry,void,rollover, andadjustmenthave been added as new values to enum attributetypeinLedgerOperation.credit_unithas been added as a new value to enum attributeunit_typeinLedgerOperation.expires_at,created_at, andeffective_fromhave been added as new values to enum query parametersort_by.ascinlist_grant_blocksofGrantBlock.expires_at,created_at, andeffective_fromhave been added as new values to enum query parametersort_by.descinlist_grant_blocksofGrantBlock.allocation,release_authorization,void,capture,rollover,adjustment,expiry,authorize, andcapture_authorizationhave been added as new values to enum query parametertype.isinlist_ledger_operationsofLedgerOperation.allocation,release_authorization,void,capture,rollover,adjustment,expiry,authorize, andcapture_authorizationhave been added as new values to enum query parametertype.ininlist_ledger_operationsofLedgerOperation.created_athas been added as a new value to enum query parametersort_by.ascinlist_ledger_operationsofLedgerOperation.created_athas been added as a new value to enum query parametersort_by.descinlist_ledger_operationsofLedgerOperation.updated_atandcreated_athave been added as new values to enum query parametersort_by.ascinlist_omnichannel_subscriptionsofOmnichannelSubscription.updated_atandcreated_athave been added as new values to enum query parametersort_by.descinlist_omnichannel_subscriptionsofOmnichannelSubscription.