Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 0 additions & 30 deletions src/models/claim.js

This file was deleted.

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

/**
* An {@link https://docs.easypost.com/docs/insurance/claims Claim} object represents claim for a {@link Shipment shipment}.
* @public
* @extends EasyPostObject
*/
export default class Claim extends EasyPostObject {
declare approved_amount?: string | null;
declare attachments?: string[] | null;
declare check_delivery_address?: string | null;
declare contact_email?: string | null;
declare description?: string | null;
declare history?: Record<string, unknown>[] | null;
declare insurance_amount?: string | null;
declare insurance_id?: string | null;
declare payment_method?: string | null;
declare recipient_name?: unknown | null;
declare reference?: string | null;
declare requested_amount?: string | null;
declare salvage_value?: unknown | null;
declare shipment_id?: string | null;
declare status_detail?: string | null;
declare status_timestamp?: string | null;
declare status?: string | null;
declare tracking_code?: string | null;
declare type?: string | null;
}
12 changes: 6 additions & 6 deletions src/models/event.js → src/models/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import EasyPostObject from './easypost_object';
* @extends EasyPostObject
*/
export default class Event extends EasyPostObject {
static completed_urls;
static description;
static pending_urls;
static previous_attributes;
static result;
static status;
declare completed_urls?: string[] | null;
declare description?: string | null;
declare pending_urls?: string[] | null;
declare previous_attributes?: Record<string, unknown> | null;
declare result?: Record<string, unknown> | null;
declare status?: 'completed' | 'failed' | 'in_queue' | 'retrying' | 'pending' | null;
}
21 changes: 0 additions & 21 deletions src/models/insurance.js

This file was deleted.

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

/**
* An {@link https://docs.easypost.com/docs/api-keys Insurance} object represents insurance for a {@link Shipment shipment}.
* @public
* @extends EasyPostObject
*/
export default class Insurance extends EasyPostObject {
declare amount?: string | null;
declare fee?: Record<string, unknown> | null;
declare from_address?: Record<string, unknown> | null;
declare messages?: string[] | null;
declare provider_id?: string | null;
declare provider?: string | null;
declare reference?: string | null;
declare shipment_id?: string | null;
declare status?: 'new' | 'pending' | 'purchased' | 'failed' | 'cancelled' | null;
declare to_address?: Record<string, unknown> | null;
declare tracking_code?: string | null;
declare tracker?: Record<string, unknown> | null;
}
2 changes: 1 addition & 1 deletion src/models/payload.js → src/models/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import EasyPostObject from './easypost_object';
* @extends EasyPostObject
*/
export default class Payload extends EasyPostObject {
static response_body;
declare response_body?: string | null;
}
23 changes: 0 additions & 23 deletions src/models/tracker.js

This file was deleted.

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

/**
* A {@link https://docs.easypost.com/docs/trackers Tracker} represents the available tracking information for a package.
* @public
* @extends EasyPostObject
*/
export default class Tracker extends EasyPostObject {
declare carrier_detail?: Record<string, unknown> | null;
declare carrier?: string | null;
declare est_delivery_date?: string | null;
declare fees?: Record<string, unknown>[] | null;
declare finalized?: boolean | null;
declare is_return?: boolean | null;
declare public_url?: string | null;
declare shipment_id?: string | null;
declare signed_by?: string | null;
declare status_detail?: string | null;
declare status?: string | null;
declare tracking_code?: string | null;
declare tracking_details?: Record<string, unknown>[] | null;
declare weight?: number | null;
}
5 changes: 3 additions & 2 deletions src/models/webhook.js → src/models/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import EasyPostObject from './easypost_object';
* @extends EasyPostObject
*/
export default class Webhook extends EasyPostObject {
static disabled_at;
static url;
declare custom_headers?: { key: string; value: string }[] | null;
declare disabled_at?: string | null;
declare url?: string | null;
}