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
4 changes: 2 additions & 2 deletions src/models/api_key.js → src/models/api_key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ import EasyPostObject from './easypost_object';
* @extends EasyPostObject
*/
export default class ApiKey extends EasyPostObject {
static active;
static key;
declare active?: boolean | null;
declare key?: string | null;
}
17 changes: 8 additions & 9 deletions src/models/brand.js → src/models/brand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ import EasyPostObject from './easypost_object';
* @extends EasyPostObject
*/
export default class Brand extends EasyPostObject {
static ad_href;
static ad;
static background_color;
static color;
static logo_href;
static logo;
static name;
static theme;
static user_id;
declare ad_href?: string | null;
declare ad?: string | null;
declare background_color?: string | null;
declare color?: string | null;
declare logo_href?: string | null;
declare logo?: string | null;
declare theme?: 'theme1' | 'theme2' | null;
declare user_id?: string | null;
}
20 changes: 10 additions & 10 deletions src/models/end_shipper.js → src/models/end_shipper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import EasyPostObject from './easypost_object';
* @extends EasyPostObject
*/
export default class EndShipper extends EasyPostObject {
static street1;
static street2;
static city;
static state;
static zip;
static country;
static name;
static company;
static phone;
static email;
declare street1?: string | null;
declare street2?: string | null;
declare city?: string | null;
declare state?: string | null;
declare zip?: string | null;
declare country?: string | null;
declare name?: string | null;
declare company?: string | null;
declare phone?: string | null;
declare email?: string | null;
}
15 changes: 12 additions & 3 deletions src/models/form.js → src/models/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ import EasyPostObject from './easypost_object';
* @extends EasyPostObject
*/
export default class Form extends EasyPostObject {
static form_type;
static form_url;
static submitted_electronically;
declare form_type?:
| 'cn22'
| 'cod_return_label'
| 'commercial_invoice'
| 'high_value_report'
| 'label_qr_code'
| 'nafta_certificate_of_origin'
| 'order_summary'
| 'return_packing_slip'
| 'rma_qr_code';
declare form_url?: string | null;
declare submitted_electronically?: boolean | null;
}
14 changes: 7 additions & 7 deletions src/models/report.js → src/models/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import EasyPostObject from './easypost_object';
* @extends EasyPostObject
*/
export default class Report extends EasyPostObject {
static end_date;
static include_children;
static send_email;
static start_date;
static status;
static url_expires_at;
static url;
declare end_date?: string | null;
declare include_children?: boolean | null;
declare send_email?: boolean | null;
declare start_date?: string | null;
declare status?: 'new' | 'available' | 'failed' | null;
declare url_expires_at?: string | null;
declare url?: string | null;
}
22 changes: 0 additions & 22 deletions src/models/user.js

This file was deleted.

23 changes: 23 additions & 0 deletions src/models/user.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/users ApiKey} represents an EasyPost account or child account.
* @public
* @extends EasyPostObject
*/
export default class User extends EasyPostObject {
declare api_keys?: Record<string, unknown>[] | null;
declare balance?: string | null;
declare cc_fee_rate?: string | null;
declare children?: Record<string, unknown>[] | null;
declare email?: string | null;
declare insurance_fee_minimum?: string | null;
declare insurance_fee_rate?: string | null;
declare name?: string | null;
declare parent_id?: string | null;
declare phone_number?: string | null;
declare price_per_shipment?: string | null;
declare recharge_amount?: string | null;
declare recharge_threshold?: string | null;
declare secondary_recharge_amount?: string | null;
}