From f0cd79fc86ce134d87b0231585935c0e7dcf383b Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Tue, 3 Feb 2026 13:51:21 -0700 Subject: [PATCH 1/3] fix: typescript type exports --- CHANGELOG.md | 1 + types/Address/Address.d.ts | 4 +++- types/ApiKey/ApiKey.d.ts | 4 +++- types/Batch/Batch.d.ts | 4 +++- types/Billing/Billing.d.ts | 4 +++- types/Brand/Brand.d.ts | 4 +++- types/Carrier/CarrierAccount/CarrierAccount.d.ts | 4 +++- types/Carrier/CarrierMetadata/CarrierMetadata.d.ts | 4 +++- types/Carrier/CarrierType/CarrierType.d.ts | 4 +++- types/Claim/Claim.d.ts | 4 +++- types/CustomerPortal/CustomerPortalAccountLink.d.ts | 4 +++- types/Customs/CustomsInfo/CustomsInfo.d.ts | 4 +++- types/Customs/CustomsItem/CustomsItem.d.ts | 4 +++- types/Embeddable/EmbeddablesSession.d.ts | 4 +++- types/EndShipper/EndShipper.d.ts | 4 +++- types/Event/Event.d.ts | 4 +++- types/Event/Payload/Payload.d.ts | 4 +++- types/Fee/Fee.d.ts | 4 +++- types/Insurance/Insurance.d.ts | 4 +++- types/Luma/Luma.d.ts | 4 +++- types/Order/Order.d.ts | 4 +++- types/Parcel/Parcel.d.ts | 4 +++- types/PaymentMethod/PaymentMethod.d.ts | 4 +++- types/Pickup/Pickup.d.ts | 4 +++- types/Rate/Rate.d.ts | 4 +++- types/Referral/Referral.d.ts | 4 +++- types/Refund/Refund.d.ts | 4 +++- types/Report/Report.d.ts | 4 +++- types/ScanForm/ScanForm.d.ts | 4 +++- types/Shipment/Shipment.d.ts | 4 +++- types/SmartRate/SmartRate.d.ts | 4 +++- types/Tracker/Tracker.d.ts | 4 +++- types/User/User.d.ts | 4 +++- types/Utility/Utils.d.ts | 4 +++- types/Webhook/Webhook.d.ts | 5 ++++- 35 files changed, 104 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a3d1129f..18b67d95c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - `ApiKey.disable` - Adds a `Tracker.delete` function - Fixes various Typescript definitions (adding missing items, correcting invalid items, consolidating duplicates, etc) + - Fixes TypeScript exports for model classes to be type-only exports. This prevents runtime errors when attempting to use these classes with `instanceof` or as constructors, since they are not actually exported as JavaScript values from the package. Users can still use these types for type annotations. (closes #456) ## v8.4.0 (2025-11-24) diff --git a/types/Address/Address.d.ts b/types/Address/Address.d.ts index fba5f0cdf..07c7e183f 100644 --- a/types/Address/Address.d.ts +++ b/types/Address/Address.d.ts @@ -89,7 +89,7 @@ export declare interface IAddress extends IObjectWithId<'Address'> { verifications: IVerifications; } -export declare class Address implements IAddress { +declare class Address implements IAddress { public constructor(input: DeepPartial); id: string; @@ -190,3 +190,5 @@ export declare class Address implements IAddress { pageSize?: number, ): Promise<{ addresses: Address[]; has_more: boolean }>; } + +export type { Address }; diff --git a/types/ApiKey/ApiKey.d.ts b/types/ApiKey/ApiKey.d.ts index fbb1bb2ce..67aeea2c0 100644 --- a/types/ApiKey/ApiKey.d.ts +++ b/types/ApiKey/ApiKey.d.ts @@ -17,7 +17,7 @@ export declare interface IApiKey extends IObjectWithId<'ApiKey'> { active: boolean; } -export declare class ApiKey implements IApiKey { +declare class ApiKey implements IApiKey { id: string; mode: 'test' | 'production'; object: 'ApiKey'; @@ -86,3 +86,5 @@ export declare class ApiKey implements IApiKey { */ static disable(id: string): Promise; } + +export type { ApiKey }; diff --git a/types/Batch/Batch.d.ts b/types/Batch/Batch.d.ts index 5a8b437a4..ec4e72963 100644 --- a/types/Batch/Batch.d.ts +++ b/types/Batch/Batch.d.ts @@ -57,7 +57,7 @@ export declare interface IBatch extends IObjectWithId<'Batch'>, IDatedObject { pickup: IPickup; } -export declare class Batch implements IBatch { +declare class Batch implements IBatch { public constructor(input: IBatchCreateParameters); id: string; @@ -177,3 +177,5 @@ export declare class Batch implements IBatch { */ static all(params?: IBatchListParameters): Promise<{ batches: Batch[]; has_more: boolean }>; } + +export type { Batch }; diff --git a/types/Billing/Billing.d.ts b/types/Billing/Billing.d.ts index d624c5be6..02c214912 100644 --- a/types/Billing/Billing.d.ts +++ b/types/Billing/Billing.d.ts @@ -4,7 +4,7 @@ * * @see https://docs.easypost.com/docs/users/billing */ -export declare class Billing { +declare class Billing { /** * Fund your EasyPost wallet by charging your primary or secondary payment method on file. * @@ -33,3 +33,5 @@ export declare class Billing { */ static retrievePaymentMethods(): object; } + +export type { Billing }; diff --git a/types/Brand/Brand.d.ts b/types/Brand/Brand.d.ts index fb06857d9..201879887 100644 --- a/types/Brand/Brand.d.ts +++ b/types/Brand/Brand.d.ts @@ -47,7 +47,7 @@ export declare interface IBrand extends IObjectWithId<'Brand'> { theme: 'theme1' | 'theme2'; } -export declare class Brand implements IBrand { +declare class Brand implements IBrand { id: string; mode: 'test' | 'production'; object: 'Brand'; @@ -71,3 +71,5 @@ export declare class Brand implements IBrand { */ static updateBrand(params: object): Promise; } + +export type { Brand }; diff --git a/types/Carrier/CarrierAccount/CarrierAccount.d.ts b/types/Carrier/CarrierAccount/CarrierAccount.d.ts index 0f8cf95be..18dc7fe01 100644 --- a/types/Carrier/CarrierAccount/CarrierAccount.d.ts +++ b/types/Carrier/CarrierAccount/CarrierAccount.d.ts @@ -62,7 +62,7 @@ export declare interface ICarrierAccount extends IObjectWithId<'CarrierAccount'> billing_type: string | null; } -export declare class CarrierAccount implements ICarrierAccount { +declare class CarrierAccount implements ICarrierAccount { public constructor(input: DeepPartial); id: string; @@ -137,3 +137,5 @@ export declare class CarrierAccount implements ICarrierAccount { */ static delete(carrierAccountId: string): void; } + +export type { CarrierAccount }; diff --git a/types/Carrier/CarrierMetadata/CarrierMetadata.d.ts b/types/Carrier/CarrierMetadata/CarrierMetadata.d.ts index 7f41b6247..c92e3b416 100644 --- a/types/Carrier/CarrierMetadata/CarrierMetadata.d.ts +++ b/types/Carrier/CarrierMetadata/CarrierMetadata.d.ts @@ -38,7 +38,7 @@ export declare interface ICarrierMetadata { shipment_options?: Array | null; } -export declare class CarrierMetadata implements ICarrierMetadata { +declare class CarrierMetadata implements ICarrierMetadata { carrier: string; human_readable?: string | null; service_levels?: Array | null; @@ -59,3 +59,5 @@ export declare class CarrierMetadata implements ICarrierMetadata { */ static retrieve(carriers: Array, types: Array): Promise; } + +export type { CarrierMetadata }; diff --git a/types/Carrier/CarrierType/CarrierType.d.ts b/types/Carrier/CarrierType/CarrierType.d.ts index aa20acd6e..d00c32e2b 100644 --- a/types/Carrier/CarrierType/CarrierType.d.ts +++ b/types/Carrier/CarrierType/CarrierType.d.ts @@ -28,7 +28,7 @@ export declare interface ICarrierType extends IBaseObject<'CarrierType'> { fields: ICarrierTypeFields; } -export declare class CarrierType implements ICarrierType { +declare class CarrierType implements ICarrierType { type: string; fields: ICarrierTypeFields; object: 'CarrierType'; @@ -43,3 +43,5 @@ export declare class CarrierType implements ICarrierType { */ static all(): Promise; } + +export type { CarrierType }; diff --git a/types/Claim/Claim.d.ts b/types/Claim/Claim.d.ts index 7e659b2b5..ea8f550c3 100644 --- a/types/Claim/Claim.d.ts +++ b/types/Claim/Claim.d.ts @@ -68,7 +68,7 @@ export declare interface IClaim extends IObjectWithId<'Claim'>, IDatedObject { type: TClaimType; } -export declare class Claim implements IClaim { +declare class Claim implements IClaim { public constructor(input: IClaimCreateParameters); id: string; @@ -153,3 +153,5 @@ export declare class Claim implements IClaim { */ static cancel(claimId: string): Promise; } + +export type { Claim }; diff --git a/types/CustomerPortal/CustomerPortalAccountLink.d.ts b/types/CustomerPortal/CustomerPortalAccountLink.d.ts index fd05a3d7e..991007826 100644 --- a/types/CustomerPortal/CustomerPortalAccountLink.d.ts +++ b/types/CustomerPortal/CustomerPortalAccountLink.d.ts @@ -18,7 +18,7 @@ export declare interface ICustomerPortalAccountLink { expires_at: string; } -export declare class CustomerPortalAccountLink implements ICustomerPortalAccountLink { +declare class CustomerPortalAccountLink implements ICustomerPortalAccountLink { public constructor(input: ICustomerPortalAccountLinkCreateParameters); object: 'CustomerPortalAccountLink'; @@ -36,3 +36,5 @@ export declare class CustomerPortalAccountLink implements ICustomerPortalAccount */ static createAccountLink(params: Object): Promise; } + +export type { CustomerPortalAccountLink }; diff --git a/types/Customs/CustomsInfo/CustomsInfo.d.ts b/types/Customs/CustomsInfo/CustomsInfo.d.ts index 6edd1de9b..0c724e564 100644 --- a/types/Customs/CustomsInfo/CustomsInfo.d.ts +++ b/types/Customs/CustomsInfo/CustomsInfo.d.ts @@ -65,7 +65,7 @@ export declare interface ICustomsInfo extends IObjectWithId<'CustomsInfo'>, IDat declaration?: string | null; } -export declare class CustomsInfo implements ICustomsInfo { +declare class CustomsInfo implements ICustomsInfo { public constructor(input: DeepPartial); id: string; @@ -105,3 +105,5 @@ export declare class CustomsInfo implements ICustomsInfo { */ static retrieve(CustomsInfoId: string): Promise; } + +export type { CustomsInfo }; diff --git a/types/Customs/CustomsItem/CustomsItem.d.ts b/types/Customs/CustomsItem/CustomsItem.d.ts index 9deaf4ea5..3aa912134 100644 --- a/types/Customs/CustomsItem/CustomsItem.d.ts +++ b/types/Customs/CustomsItem/CustomsItem.d.ts @@ -54,7 +54,7 @@ export declare interface ICustomsItem extends IObjectWithId<'CustomsItem'>, IDat currency?: string | null; } -export declare class CustomsItem implements ICustomsItem { +declare class CustomsItem implements ICustomsItem { public constructor(input: DeepPartial); id: string; @@ -92,3 +92,5 @@ export declare class CustomsItem implements ICustomsItem { */ static retrieve(CustomsItemId: string): Promise; } + +export type { CustomsItem }; diff --git a/types/Embeddable/EmbeddablesSession.d.ts b/types/Embeddable/EmbeddablesSession.d.ts index 440765bfc..abfdfbff5 100644 --- a/types/Embeddable/EmbeddablesSession.d.ts +++ b/types/Embeddable/EmbeddablesSession.d.ts @@ -18,7 +18,7 @@ export declare interface IEmbeddablesSession { expires_at: string; } -export declare class EmbeddablesSession implements IEmbeddablesSession { +declare class EmbeddablesSession implements IEmbeddablesSession { public constructor(input: IEmbeddablesSessionCreateParameters); object: 'EmbeddablesSession'; @@ -36,3 +36,5 @@ export declare class EmbeddablesSession implements IEmbeddablesSession { */ static createSession(params: Object): Promise; } + +export type { EmbeddablesSession }; diff --git a/types/EndShipper/EndShipper.d.ts b/types/EndShipper/EndShipper.d.ts index 6ba20d004..290c1af1b 100644 --- a/types/EndShipper/EndShipper.d.ts +++ b/types/EndShipper/EndShipper.d.ts @@ -64,7 +64,7 @@ export declare interface IEndshipper extends IObjectWithId<'EndShipper'> { email?: string | null; } -export declare class EndShipper implements IEndshipper { +declare class EndShipper implements IEndshipper { public constructor(input: DeepPartial); id: string; mode: 'test' | 'production'; @@ -128,3 +128,5 @@ export declare class EndShipper implements IEndshipper { params: IEndShipperListParameters, ): Promise<{ endshippers: EndShipper[]; has_more: boolean }>; } + +export type { EndShipper }; diff --git a/types/Event/Event.d.ts b/types/Event/Event.d.ts index 5fcb5fbc2..bd274122e 100644 --- a/types/Event/Event.d.ts +++ b/types/Event/Event.d.ts @@ -45,7 +45,7 @@ export declare interface IEvent extends IObjectWithId<'Event'>, IDatedObject { completed_urls: string[]; } -export declare class Event implements IEvent { +declare class Event implements IEvent { id: string; mode: 'test' | 'production'; object: 'Event'; @@ -90,3 +90,5 @@ export declare class Event implements IEvent { pageSize?: number, ): Promise<{ events: Event[]; has_more: boolean }>; } + +export type { Event }; diff --git a/types/Event/Payload/Payload.d.ts b/types/Event/Payload/Payload.d.ts index 325f40103..49130e93b 100644 --- a/types/Event/Payload/Payload.d.ts +++ b/types/Event/Payload/Payload.d.ts @@ -14,7 +14,7 @@ export declare interface IPayload extends IObjectWithId<'Payload'>, IDatedObject response_body: string | null; } -export declare class Payload implements IPayload { +declare class Payload implements IPayload { id: string; mode: 'test' | 'production'; object: 'Payload'; @@ -43,3 +43,5 @@ export declare class Payload implements IPayload { */ static all(params: IPayloadListParameters): Promise<{ payloads: Payload[] }>; } + +export type { Payload }; diff --git a/types/Fee/Fee.d.ts b/types/Fee/Fee.d.ts index df0f589e2..7dee8fd93 100644 --- a/types/Fee/Fee.d.ts +++ b/types/Fee/Fee.d.ts @@ -34,10 +34,12 @@ export declare interface IFee extends IBaseObject<'Fee'> { refunded: boolean; } -export declare class Fee implements IFee { +declare class Fee implements IFee { object: 'Fee'; type: TFeeType; amount: string; charged: boolean; refunded: boolean; } + +export type { Fee }; diff --git a/types/Insurance/Insurance.d.ts b/types/Insurance/Insurance.d.ts index c39c997ec..4b55ced06 100644 --- a/types/Insurance/Insurance.d.ts +++ b/types/Insurance/Insurance.d.ts @@ -85,7 +85,7 @@ export declare interface IInsurance extends IObjectWithId<'Insurance'>, IDatedOb messages: string[]; } -export declare class Insurance implements IInsurance { +declare class Insurance implements IInsurance { public constructor(input: IInsuranceCreateParameters); id: string; @@ -172,3 +172,5 @@ export declare class Insurance implements IInsurance { */ static refund(insuranceId: string): Promise; } + +export type { Insurance }; diff --git a/types/Luma/Luma.d.ts b/types/Luma/Luma.d.ts index b79a70f64..d870df72e 100644 --- a/types/Luma/Luma.d.ts +++ b/types/Luma/Luma.d.ts @@ -34,7 +34,7 @@ export declare interface ILumaPromise { * * @see https://docs.easypost.com/docs/luma */ -export declare class Luma { +declare class Luma { /** * Get service recommendations from Luma that meet the criteria of your ruleset. * @@ -45,3 +45,5 @@ export declare class Luma { */ static getPromise(params: object): Promise; } + +export type { Luma }; diff --git a/types/Order/Order.d.ts b/types/Order/Order.d.ts index d2a8a2261..529c3611d 100644 --- a/types/Order/Order.d.ts +++ b/types/Order/Order.d.ts @@ -61,7 +61,7 @@ export declare interface IOrder extends IObjectWithId<'Order'>, IDatedObject { is_return?: boolean | null; } -export declare class Order implements IOrder { +declare class Order implements IOrder { public constructor(input: IOrderCreateParameters); id: string; @@ -133,3 +133,5 @@ export declare class Order implements IOrder { */ lowestRate(carriers?: string[], services?: string[]): IRate; } + +export type { Order }; diff --git a/types/Parcel/Parcel.d.ts b/types/Parcel/Parcel.d.ts index 119b37609..cd1dd5af0 100644 --- a/types/Parcel/Parcel.d.ts +++ b/types/Parcel/Parcel.d.ts @@ -43,7 +43,7 @@ export declare interface IParcel extends IObjectWithId<'Parcel'>, IDatedObject { predefined_package?: string | null; } -export declare class Parcel implements IParcel { +declare class Parcel implements IParcel { public constructor(input: DeepPartial); id: string; @@ -80,3 +80,5 @@ export declare class Parcel implements IParcel { */ static retrieve(parcelId: string): Promise; } + +export type { Parcel }; diff --git a/types/PaymentMethod/PaymentMethod.d.ts b/types/PaymentMethod/PaymentMethod.d.ts index 0055b5e66..82c76d12b 100644 --- a/types/PaymentMethod/PaymentMethod.d.ts +++ b/types/PaymentMethod/PaymentMethod.d.ts @@ -50,7 +50,7 @@ export declare interface IPaymentMethod extends IObjectWithId<'PaymentMethod'> { verified: boolean; } -export declare class PaymentMethod implements IPaymentMethod { +declare class PaymentMethod implements IPaymentMethod { id: string; mode: 'test' | 'production'; object: 'PaymentMethod'; @@ -64,3 +64,5 @@ export declare class PaymentMethod implements IPaymentMethod { name: string; verified: boolean; } + +export type { PaymentMethod }; diff --git a/types/Pickup/Pickup.d.ts b/types/Pickup/Pickup.d.ts index 74f410dac..401424042 100644 --- a/types/Pickup/Pickup.d.ts +++ b/types/Pickup/Pickup.d.ts @@ -90,7 +90,7 @@ export declare interface IPickup extends IObjectWithId<'Pickup'>, IDatedObject { pickup_rates: IPickupRate[]; } -export declare class Pickup implements IPickup { +declare class Pickup implements IPickup { public constructor(input: IPickupCreateParameters); id: string; @@ -197,3 +197,5 @@ export declare class Pickup implements IPickup { */ lowestRate(carriers?: string[], services?: string[]): IRate; } + +export type { Pickup }; diff --git a/types/Rate/Rate.d.ts b/types/Rate/Rate.d.ts index 1d6417b23..a0cc8389d 100644 --- a/types/Rate/Rate.d.ts +++ b/types/Rate/Rate.d.ts @@ -69,7 +69,7 @@ export declare interface IRate extends IObjectWithId<'Rate'>, IDatedObject { billing_type: string; } -export declare class Rate implements IRate { +declare class Rate implements IRate { billing_type: string; carrier: string; carrier_account_id: string; @@ -91,3 +91,5 @@ export declare class Rate implements IRate { shipment_id: string; updated_at: string; } + +export type { Rate }; diff --git a/types/Referral/Referral.d.ts b/types/Referral/Referral.d.ts index 5a20efa34..c4bba244f 100644 --- a/types/Referral/Referral.d.ts +++ b/types/Referral/Referral.d.ts @@ -17,7 +17,7 @@ export declare interface IReferral extends IUser { api_keys?: IApiKey[]; } -export declare class Referral implements IReferral { +declare class Referral implements IReferral { public constructor(input: IReferralCreateParameters); id: string; @@ -122,3 +122,5 @@ export declare class Referral implements IReferral { pageSize?: number, ): Promise<{ referral_customers: Referral[]; has_more: boolean }>; } + +export type { Referral }; diff --git a/types/Refund/Refund.d.ts b/types/Refund/Refund.d.ts index 0889c6276..c8ff8fdc0 100644 --- a/types/Refund/Refund.d.ts +++ b/types/Refund/Refund.d.ts @@ -36,7 +36,7 @@ export declare interface IRefund extends IObjectWithId<'Refund'>, IDatedObject { shipment_id: string; } -export declare class Refund implements IRefund { +declare class Refund implements IRefund { public constructor(input: IRefundCreateParameters); id: string; @@ -98,3 +98,5 @@ export declare class Refund implements IRefund { pageSize?: number, ): Promise<{ refunds: Refund[]; has_more: boolean }>; } + +export type { Refund }; diff --git a/types/Report/Report.d.ts b/types/Report/Report.d.ts index 7c406e220..4495848ef 100644 --- a/types/Report/Report.d.ts +++ b/types/Report/Report.d.ts @@ -59,7 +59,7 @@ export declare interface IReport extends IObjectWithId, IDate send_email?: boolean | null; } -export declare class Report implements IReport { +declare class Report implements IReport { public constructor(input: IReportCreateParameters); id: string; @@ -131,3 +131,5 @@ export declare class Report implements IReport { pageSize?: number, ): Promise<{ reports: Report[]; has_more: boolean }>; } + +export type { Report }; diff --git a/types/ScanForm/ScanForm.d.ts b/types/ScanForm/ScanForm.d.ts index e488522ba..4b5b9a9ac 100644 --- a/types/ScanForm/ScanForm.d.ts +++ b/types/ScanForm/ScanForm.d.ts @@ -54,7 +54,7 @@ export declare interface IScanForm extends IObjectWithId<'ScanForm'>, IDatedObje batch_id: string; } -export declare class ScanForm implements IScanForm { +declare class ScanForm implements IScanForm { public constructor(input: IScanFormCreateParameters); address: IAddress; @@ -124,3 +124,5 @@ export declare class ScanForm implements IScanForm { pageSize?: number, ): Promise<{ scan_forms: ScanForm[]; has_more: boolean }>; } + +export type { ScanForm }; diff --git a/types/Shipment/Shipment.d.ts b/types/Shipment/Shipment.d.ts index 15eadf6bf..6e618640a 100644 --- a/types/Shipment/Shipment.d.ts +++ b/types/Shipment/Shipment.d.ts @@ -156,7 +156,7 @@ export declare interface IShipment extends IObjectWithId<'Shipment'>, IDatedObje batch_message: string; } -export declare class Shipment implements IShipment { +declare class Shipment implements IShipment { public constructor(input: IShipmentCreateParameters); id: string; @@ -364,3 +364,5 @@ export declare class Shipment implements IShipment { pageSize?: number, ): Promise<{ shipments: Shipment[]; has_more: boolean }>; } + +export type { Shipment }; diff --git a/types/SmartRate/SmartRate.d.ts b/types/SmartRate/SmartRate.d.ts index 68f970c9d..12e1fb5d8 100644 --- a/types/SmartRate/SmartRate.d.ts +++ b/types/SmartRate/SmartRate.d.ts @@ -3,7 +3,7 @@ * * @see https://docs.easypost.com/docs/smartrate */ -export declare class SmartRate { +declare class SmartRate { /** * Retrieve the estimated delivery date of each carrier-service level combination via the Smart Deliver By API, based on a specific ship date and origin-destination postal code pair. * @param params - The parameters to estimate the delivery date with. @@ -18,3 +18,5 @@ export declare class SmartRate { */ static recommendShipDate(params: object): object; } + +export type { SmartRate }; diff --git a/types/Tracker/Tracker.d.ts b/types/Tracker/Tracker.d.ts index e6ebef418..18e650b8a 100644 --- a/types/Tracker/Tracker.d.ts +++ b/types/Tracker/Tracker.d.ts @@ -102,7 +102,7 @@ export declare interface ITracker extends IObjectWithId<'Tracker'>, IDatedObject is_return: boolean; } -export declare class Tracker implements ITracker { +declare class Tracker implements ITracker { public constructor(input: ITrackerCreateParameters); id: string; @@ -198,3 +198,5 @@ export declare class Tracker implements ITracker { */ static delete(id: string): Promise; } + +export type { Tracker }; diff --git a/types/User/User.d.ts b/types/User/User.d.ts index de2c8ad5e..6afb17d31 100644 --- a/types/User/User.d.ts +++ b/types/User/User.d.ts @@ -81,7 +81,7 @@ export declare interface IUser extends IObjectWithId<'User'> { children: IUser[]; } -export declare class User implements IUser { +declare class User implements IUser { public constructor(input: IUserCreateParameters); id: string; @@ -193,3 +193,5 @@ export declare class User implements IUser { pageSize?: number, ): Promise<{ children: User[]; has_more: boolean }>; } + +export type { User }; diff --git a/types/Utility/Utils.d.ts b/types/Utility/Utils.d.ts index 12912e396..0d1a18a51 100644 --- a/types/Utility/Utils.d.ts +++ b/types/Utility/Utils.d.ts @@ -3,7 +3,7 @@ import { Rate } from '../Rate'; /** * The Utils class represents a number of helper methods for the client library. */ -export declare class Utils { +declare class Utils { /** * Get the lowest SmartRate from a provided list of SmartRates. * @public @@ -45,3 +45,5 @@ export declare class Utils { */ static validateWebhook(eventBody: Buffer, headers: object, webhookSecret: string): object; } + +export type { Utils }; diff --git a/types/Webhook/Webhook.d.ts b/types/Webhook/Webhook.d.ts index cc886e299..085dc9257 100644 --- a/types/Webhook/Webhook.d.ts +++ b/types/Webhook/Webhook.d.ts @@ -36,7 +36,7 @@ export declare interface IWebhook extends IObjectWithId<'Webhook'> { custom_headers: Array<{ key: string; value: string }>; } -export declare class Webhook implements IWebhook { +declare class Webhook implements IWebhook { public constructor(input: IWebhookCreateParameters); url: string; @@ -44,6 +44,7 @@ export declare class Webhook implements IWebhook { id: string; mode: 'test' | 'production'; object: 'Webhook'; + custom_headers: { key: string; value: string; }[]; /** * To create a Webhook, you simply need to provide a url parameter that you wish to receive notifications to. @@ -96,3 +97,5 @@ export declare class Webhook implements IWebhook { */ static delete(webhookId: string): void; } + +export type { Webhook }; From 0c7f6bdf1e38e9ca36ba2ce4e8d4b9e7c9212559 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Tue, 3 Feb 2026 13:55:23 -0700 Subject: [PATCH 2/3] fix: lint --- types/Webhook/Webhook.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/Webhook/Webhook.d.ts b/types/Webhook/Webhook.d.ts index 085dc9257..f03f511ae 100644 --- a/types/Webhook/Webhook.d.ts +++ b/types/Webhook/Webhook.d.ts @@ -44,7 +44,7 @@ declare class Webhook implements IWebhook { id: string; mode: 'test' | 'production'; object: 'Webhook'; - custom_headers: { key: string; value: string; }[]; + custom_headers: { key: string; value: string }[]; /** * To create a Webhook, you simply need to provide a url parameter that you wish to receive notifications to. From 111311e73017da87f331e28cb21d70123b74969f Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Tue, 3 Feb 2026 14:02:59 -0700 Subject: [PATCH 3/3] feat: add line_items to shipment create params --- types/Shipment/ShipmentCreateParameters.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/Shipment/ShipmentCreateParameters.d.ts b/types/Shipment/ShipmentCreateParameters.d.ts index e73b6e2c6..3aae0378e 100644 --- a/types/Shipment/ShipmentCreateParameters.d.ts +++ b/types/Shipment/ShipmentCreateParameters.d.ts @@ -19,4 +19,8 @@ export declare interface IShipmentCreateParameters { customs_info?: DeepPartial | null; tax_identifiers?: ITaxIdentifier[] | null; options?: DeepPartial | null; + line_items?: Array<{ + total_line_value: string; + item_description: string; + }>; }