Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
8c02845
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
5c2c124
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
cce5bf6
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
ffa7a45
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
813698d
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
f54b1b4
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
b1ebd48
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
e7f932b
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
3c536a5
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
b0e3bae
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
5aed307
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
060f161
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
df3d066
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
4eaf32d
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
6d3782a
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
598a59b
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
8413b19
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
047a1d8
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
544f9d4
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
7e31fe8
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
888959c
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
1c37223
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
4739fb3
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
22b008d
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
dccf762
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
bf9b857
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
c3c565a
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
96bc6e1
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
09913d8
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
0abc7e3
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
f7daae2
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
eced5b9
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
5818e76
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
974fc75
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
9513a80
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
043b424
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
0178fef
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
02c0282
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
440c83d
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
02906a2
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
176fd18
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
41091a8
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
06cdb1b
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
cd1f4da
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
5d7809a
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
0ecaccb
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
f89970c
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
64d2b59
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
06703c5
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
e132f52
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
3f5e169
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
28ea0f0
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
91211c0
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
55b9027
chore: retrigger flaky CodeQL on TSM-08
Justintime50 Aug 11, 2026
42afcd1
TSM-11 convert models group A to TypeScript
Justintime50 Aug 10, 2026
3db5dfc
TSM-11 migrate model field types from declarations
Justintime50 Aug 10, 2026
01acbcd
TSM-11 make model fields nullable for first pass
Justintime50 Aug 10, 2026
496407e
TSM-11 make model fields optional and nullable for first pass
Justintime50 Aug 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions src/models/address.js

This file was deleted.

24 changes: 24 additions & 0 deletions src/models/address.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import EasyPostObject from './easypost_object';

/**
* An {@link https://docs.easypost.com/docs/addresses Address} represents people, places, and organizations in a number of contexts.
* @public
* @extends EasyPostObject
*/
export default class Address extends EasyPostObject {
declare street1?: string | null;
Comment thread
Justintime50 marked this conversation as resolved.
declare street2?: string | null;
declare city?: string | null;
declare state?: string | null;
declare zip?: string | null;
declare country?: string | null;
declare residential?: boolean | null;
declare carrier_facility?: string | null;
declare name?: string | null;
declare company?: string | null;
declare phone?: string | null;
declare email?: string | null;
declare federal_tax_id?: string | null;
declare state_tax_id?: string | null;
declare verifications?: Record<string, unknown> | null;
}
19 changes: 0 additions & 19 deletions src/models/customs_info.js

This file was deleted.

20 changes: 20 additions & 0 deletions src/models/customs_info.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import EasyPostObject from './easypost_object';

/**
* A {@link https://docs.easypost.com/docs/customs-infos CustomsInfo} represents a collection of {@link CustomsItem CustomsItems} and associated information for generating international shipping customs forms.
* @public
* @extends EasyPostObject
*/
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_signer?: string | null;
declare declaration?: string | null;
declare eel_pfc?: string | null;
declare non_delivery_option?: 'abandon' | 'return' | null;
declare restriction_comments?: string | null;
declare restriction_type?:
'none' | 'other' | 'quarantine' | 'sanitary_phytosanitary_inspection' | null;
}
17 changes: 0 additions & 17 deletions src/models/customs_item.js

This file was deleted.

17 changes: 17 additions & 0 deletions src/models/customs_item.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import EasyPostObject from './easypost_object';

/**
* A {@link https://docs.easypost.com/docs/customs-items CustomsItem} represents a single item being shipped internationally.
* @public
* @extends EasyPostObject
*/
export default class CustomsItem extends EasyPostObject {
declare code?: string | null;
declare currency?: string | null;
declare description?: string | null;
declare hs_tariff_number?: string | null;
declare origin_country?: string | null;
declare quantity?: number | null;
declare value?: number | null;
declare weight?: number | null;
}
10 changes: 5 additions & 5 deletions src/models/parcel.js → src/models/parcel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import EasyPostObject from './easypost_object';
* @extends EasyPostObject
*/
export default class Parcel extends EasyPostObject {
static height;
static length;
static predefined_package;
static weight;
static width;
declare height?: number | null;
declare length?: number | null;
declare predefined_package?: string | null;
declare weight?: number | null;
declare width?: number | null;
}
18 changes: 0 additions & 18 deletions src/models/postage_label.js

This file was deleted.

18 changes: 18 additions & 0 deletions src/models/postage_label.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import EasyPostObject from './easypost_object';

/**
* A {@link PostageLabel} represents a physical label to affix to a {@link Parcel parcel} when shipping.
* @public
* @extends EasyPostObject
*/
export default class PostageLabel extends EasyPostObject {
declare label_date?: string | null;
declare label_epl2_url?: string | null;
declare label_file_type?: string | null;
declare label_pdf_url?: string | null;
declare label_resolution?: number | null;
declare label_size?: string | null;
declare label_type?: string | null;
declare label_url?: string | null;
declare label_zpl_url?: string | null;
}
49 changes: 0 additions & 49 deletions src/models/shipment.js

This file was deleted.

54 changes: 54 additions & 0 deletions src/models/shipment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import Constants from '../constants';
import EasyPostObject from './easypost_object';

/**
* A {@link https://docs.easypost.com/docs/shipments Shipment} represents a physical {@link Parcel}, the origin and destination {@link Address Addresses}, and any associated {@link CustomsInfo}.
* @public
* @extends EasyPostObject
*/
export default class Shipment extends EasyPostObject {
declare batch_id?: string | null;
declare batch_message?: string | null;
declare batch_status?: string | null;
declare buyer_address?: Record<string, unknown> | null;
declare customs_info?: Record<string, unknown> | null;
declare fees?: Record<string, unknown>[] | null;
declare forms?: Record<string, unknown>[] | null;
declare from_address?: Record<string, unknown> | null;
declare insurance?: Record<string, unknown> | null;
declare is_return?: boolean | null;
declare messages?: Record<string, unknown>[] | null;
declare options?: Record<string, unknown> | null;
declare parcel?: Record<string, unknown> | null;
declare postage_label?: Record<string, unknown> | null;
declare rates?: Parameters<typeof Constants.Utils.getLowestRate>[0] | null;
declare reference?: string | null;
declare refund_status?: 'submitted' | 'refunded' | 'rejected' | null;
declare return_address?: Record<string, unknown> | null;
declare scan_form?: Record<string, unknown> | null;
declare selected_rate?: Parameters<typeof Constants.Utils.getLowestRate>[0][number] | null;
declare status?: string | null;
declare to_address?: Record<string, unknown> | null;
declare tracker?: Record<string, unknown> | null;
declare tracking_code?: string | null;
declare usps_zone?: string | null;

/**
* Get the lowest rate for this {@link Shipment}.
* @public
* @param {string[]} [carriers] - List of allowed carriers to filter by
* @param {string[]} [services] - List of allowed services to filter by
* @returns {Rate} - The lowest rate
* @throws {FilteringError} - If no applicable rates are found
*/
lowestRate(
carriers?: string[],
services?: string[],
): ReturnType<typeof Constants.Utils.getLowestRate> {
const rates = ((this as Shipment & { rates?: unknown[] }).rates || []) as Parameters<
typeof Constants.Utils.getLowestRate
>[0];

return Constants.Utils.getLowestRate(rates, carriers, services);
}
}