Release v3.26.0#122
Open
cb-alish wants to merge 1 commit into
Open
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.