From f0d30f50a09c9845c748c348b455e3b5f7a63afe Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 29 Oct 2026 12:49:11 -0600 Subject: [PATCH 1/6] feat: add EU regulatory product IDs to CustomsItem model --- CHANGELOG.md | 4 ++++ package-lock.json | 4 ++-- package.json | 2 +- src/models/customs_item.ts | 2 ++ src/services/shipment_service.ts | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d333979a5..4fceab6a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## v9.1.0 (2026-10-29) + +- Adds `manufacturer_product_id` and `standardized_product_id` to the `CustomsItem` model + ## v9.0.0 (2026-10-27) See our [Upgrade Guide](UPGRADE_GUIDE.md#upgrading-from-8x-to-90) for more details. diff --git a/package-lock.json b/package-lock.json index 6bc2f6296..339461b15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@easypost/api", - "version": "9.0.0", + "version": "9.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@easypost/api", - "version": "9.0.0", + "version": "9.1.0", "license": "MIT", "dependencies": { "uuid": "^11.1.0" diff --git a/package.json b/package.json index 086b84894..4c2c5b8ef 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@easypost/api", "description": "EasyPost Node Client Library", - "version": "9.0.0", + "version": "9.1.0", "author": "Easypost Engineering ", "homepage": "https://easypost.com", "exports": { diff --git a/src/models/customs_item.ts b/src/models/customs_item.ts index e2aac7b6c..8480ecabd 100644 --- a/src/models/customs_item.ts +++ b/src/models/customs_item.ts @@ -10,8 +10,10 @@ export default class CustomsItem extends EasyPostObject { declare currency?: string | null; declare description?: string | null; declare hs_tariff_number?: string | null; + declare manufacturer_product_id?: string | null; declare origin_country?: string | null; declare quantity?: number | null; + declare standardized_product_id?: string | null; declare value?: number | null; declare weight?: number | null; } diff --git a/src/services/shipment_service.ts b/src/services/shipment_service.ts index b34c92171..72b3721d2 100644 --- a/src/services/shipment_service.ts +++ b/src/services/shipment_service.ts @@ -48,7 +48,7 @@ export default (easypostClient: EasyPostClient) => */ class ShipmentService extends baseService(easypostClient) { /** - static async createAndBuyLuma(params: ShipmentCreateParameters): Promise { + * Create a {@link Shipment shipment}. * See {@link https://docs.easypost.com/docs/shipments#create-a-shipment EasyPost API Documentation} for more information. * @param {Object} params - The parameters to create a shipment with. * @returns {Shipment} - The created shipment. From f9c3e7e385eb704c0253bb04c4fd7da376d08ecb Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 29 Oct 2026 14:42:49 -0600 Subject: [PATCH 2/6] feat: add tax identifier address and related types --- CHANGELOG.md | 3 ++- src/models/shipment.ts | 2 ++ src/models/tax_identifier.ts | 13 +++++++++++++ src/services/customs_item_service.ts | 2 ++ src/services/shipment_service.ts | 1 + 5 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/models/tax_identifier.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fceab6a7..6a4e5c496 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ## v9.1.0 (2026-10-29) -- Adds `manufacturer_product_id` and `standardized_product_id` to the `CustomsItem` model +- Adds `manufacturer_product_id` and `standardized_product_id` to the `CustomsItem` model and create parameters +- Adds `TaxIdentifier` model with `address`, `tax_identifiers` to the `Shipment` model, and `address` to the shipment tax identifier create parameters ## v9.0.0 (2026-10-27) diff --git a/src/models/shipment.ts b/src/models/shipment.ts index a6678381d..35f98eb2e 100644 --- a/src/models/shipment.ts +++ b/src/models/shipment.ts @@ -8,6 +8,7 @@ import Parcel from './parcel'; import PostageLabel from './postage_label'; import Rate from './rate'; import ScanForm from './scan_form'; +import TaxIdentifier from './tax_identifier'; import Tracker from './tracker'; /** @@ -37,6 +38,7 @@ export default class Shipment extends EasyPostObject { declare scan_form?: ScanForm | null; declare selected_rate?: Rate | null; declare status?: string | null; + declare tax_identifiers?: TaxIdentifier[] | null; declare to_address?: Address | null; declare tracker?: Tracker | null; declare tracking_code?: string | null; diff --git a/src/models/tax_identifier.ts b/src/models/tax_identifier.ts new file mode 100644 index 000000000..771bd6261 --- /dev/null +++ b/src/models/tax_identifier.ts @@ -0,0 +1,13 @@ +import Address from './address'; + +/** + * A TaxIdentifier represents tax information used by carriers for a {@link Shipment}. + * @public + */ +export default class TaxIdentifier { + declare entity?: string | null; + declare tax_id?: string | null; + declare tax_id_type?: string | null; + declare issuing_country?: string | null; + declare address?: Address | null; +} diff --git a/src/services/customs_item_service.ts b/src/services/customs_item_service.ts index b0337e40a..904945b2d 100644 --- a/src/services/customs_item_service.ts +++ b/src/services/customs_item_service.ts @@ -11,6 +11,8 @@ type CustomsItemCreateParameters = Record & { code?: string | null; origin_country?: string | null; currency?: string | null; + manufacturer_product_id?: string | null; + standardized_product_id?: string | null; }; export default (easypostClient: EasyPostClient) => diff --git a/src/services/shipment_service.ts b/src/services/shipment_service.ts index 72b3721d2..b2818149a 100644 --- a/src/services/shipment_service.ts +++ b/src/services/shipment_service.ts @@ -14,6 +14,7 @@ type ShipmentTaxIdentifier = Record & { tax_id?: string | null; tax_id_type?: string | null; issuing_country?: string | null; + address?: AddressCreateParameters | Address | string | null; }; type ShipmentLineItem = Record & { From b99460e3c2ef238d23d05c8349262bfd559532d1 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 29 Oct 2026 14:46:38 -0600 Subject: [PATCH 3/6] feat: type nested customs items in customs info params --- CHANGELOG.md | 2 +- src/services/customs_info_service.ts | 4 +++- src/services/customs_item_service.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a4e5c496..d1aa8a731 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## v9.1.0 (2026-10-29) -- Adds `manufacturer_product_id` and `standardized_product_id` to the `CustomsItem` model and create parameters +- Adds `manufacturer_product_id` and `standardized_product_id` to the `CustomsItem` model and create parameters, including customs items nested in `CustomsInfo` create parameters - Adds `TaxIdentifier` model with `address`, `tax_identifiers` to the `Shipment` model, and `address` to the shipment tax identifier create parameters ## v9.0.0 (2026-10-27) diff --git a/src/services/customs_info_service.ts b/src/services/customs_info_service.ts index 694233dd2..0e4e5f4d0 100644 --- a/src/services/customs_info_service.ts +++ b/src/services/customs_info_service.ts @@ -1,8 +1,10 @@ import type EasyPostClient from '../easypost'; import CustomsInfo from '../models/customs_info'; +import CustomsItem from '../models/customs_item'; import baseService from './base_service'; +import type { CustomsItemCreateParameters } from './customs_item_service'; -export type CustomsItemInput = Record; +export type CustomsItemInput = CustomsItemCreateParameters | CustomsItem; export type CustomsInfoCreateParameters = Record & { eel_pfc?: string | null; diff --git a/src/services/customs_item_service.ts b/src/services/customs_item_service.ts index 904945b2d..ffb12688c 100644 --- a/src/services/customs_item_service.ts +++ b/src/services/customs_item_service.ts @@ -2,7 +2,7 @@ import baseService from './base_service'; import CustomsItem from '../models/customs_item'; import type EasyPostClient from '../easypost'; -type CustomsItemCreateParameters = Record & { +export type CustomsItemCreateParameters = Record & { description?: string | null; quantity?: number | null; value?: number | null; From 50a4bb093ca8b01f1a9e55a4f77081a40ff8a795 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 29 Oct 2026 14:59:19 -0600 Subject: [PATCH 4/6] fix: widen customs item param types and type customs info items --- CHANGELOG.md | 3 ++- src/models/customs_info.ts | 3 ++- src/models/tax_identifier.ts | 4 ++-- src/services/customs_item_service.ts | 8 ++++---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1aa8a731..05eeb8581 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ ## v9.1.0 (2026-10-29) - Adds `manufacturer_product_id` and `standardized_product_id` to the `CustomsItem` model and create parameters, including customs items nested in `CustomsInfo` create parameters -- Adds `TaxIdentifier` model with `address`, `tax_identifiers` to the `Shipment` model, and `address` to the shipment tax identifier create parameters +- Adds `TaxIdentifier` model (with `address`) and `tax_identifiers` to the `Shipment` model +- Adds `address` to the shipment tax identifier create parameters ## v9.0.0 (2026-10-27) diff --git a/src/models/customs_info.ts b/src/models/customs_info.ts index 3ea4237bc..0065e8486 100644 --- a/src/models/customs_info.ts +++ b/src/models/customs_info.ts @@ -1,3 +1,4 @@ +import CustomsItem from './customs_item'; import EasyPostObject from './easypost_object'; /** @@ -9,7 +10,7 @@ export default class CustomsInfo extends EasyPostObject { declare content_explanation?: string | null; declare contents_type?: string | null; declare customs_certify?: boolean | null; - declare customs_items?: unknown[] | null; + declare customs_items?: CustomsItem[] | null; declare customs_signer?: string | null; declare declaration?: string | null; declare eel_pfc?: string | null; diff --git a/src/models/tax_identifier.ts b/src/models/tax_identifier.ts index 771bd6261..6880dd9d1 100644 --- a/src/models/tax_identifier.ts +++ b/src/models/tax_identifier.ts @@ -5,9 +5,9 @@ import Address from './address'; * @public */ export default class TaxIdentifier { + declare address?: Address | null; declare entity?: string | null; + declare issuing_country?: string | null; declare tax_id?: string | null; declare tax_id_type?: string | null; - declare issuing_country?: string | null; - declare address?: Address | null; } diff --git a/src/services/customs_item_service.ts b/src/services/customs_item_service.ts index ffb12688c..9cb7fbdd2 100644 --- a/src/services/customs_item_service.ts +++ b/src/services/customs_item_service.ts @@ -4,10 +4,10 @@ import type EasyPostClient from '../easypost'; export type CustomsItemCreateParameters = Record & { description?: string | null; - quantity?: number | null; - value?: number | null; - weight?: number | null; - hs_tariff_number?: string | null; + quantity?: number | string | null; + value?: number | string | null; + weight?: number | string | null; + hs_tariff_number?: string | number | null; code?: string | null; origin_country?: string | null; currency?: string | null; From 21ab838901a15e0a71204e98e842b929feeafdf3 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 29 Oct 2026 15:09:45 -0600 Subject: [PATCH 5/6] fix: drop bare string from tax identifier address type --- src/services/shipment_service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/shipment_service.ts b/src/services/shipment_service.ts index b2818149a..e6298cc75 100644 --- a/src/services/shipment_service.ts +++ b/src/services/shipment_service.ts @@ -14,7 +14,7 @@ type ShipmentTaxIdentifier = Record & { tax_id?: string | null; tax_id_type?: string | null; issuing_country?: string | null; - address?: AddressCreateParameters | Address | string | null; + address?: AddressCreateParameters | Address | null; }; type ShipmentLineItem = Record & { From d05019040fb8747a98e01463f7e4f5d2ff07f342 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 29 Oct 2026 15:12:45 -0600 Subject: [PATCH 6/6] fix: restore original customs item param types --- src/services/customs_item_service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/services/customs_item_service.ts b/src/services/customs_item_service.ts index 9cb7fbdd2..ffb12688c 100644 --- a/src/services/customs_item_service.ts +++ b/src/services/customs_item_service.ts @@ -4,10 +4,10 @@ import type EasyPostClient from '../easypost'; export type CustomsItemCreateParameters = Record & { description?: string | null; - quantity?: number | string | null; - value?: number | string | null; - weight?: number | string | null; - hs_tariff_number?: string | number | null; + quantity?: number | null; + value?: number | null; + weight?: number | null; + hs_tariff_number?: string | null; code?: string | null; origin_country?: string | null; currency?: string | null;