@secondcloset/types 1.8.4 → 1.38.1-beta-pq-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/_common/activityHistory.ts +22 -0
- package/src/_common/address.ts +2 -0
- package/src/_common/facility.ts +47 -16
- package/src/_common/index.ts +2 -0
- package/src/_common/organization.ts +36 -7
- package/src/_common/serviceArea.ts +9 -1
- package/src/_common/user.ts +1 -0
- package/src/fulfillment/appointment/appointment.ts +28 -3
- package/src/fulfillment/appointment/appointmentStatus.ts +1 -0
- package/src/fulfillment/appointment/appointmentType.ts +4 -0
- package/src/fulfillment/asn/asn.ts +1 -0
- package/src/fulfillment/asn/asnItem.ts +1 -0
- package/src/fulfillment/index.ts +1 -0
- package/src/fulfillment/order/order.ts +8 -3
- package/src/fulfillment/product/index.ts +2 -1
- package/src/fulfillment/product/product.ts +6 -0
- package/src/fulfillment/resourceError/index.ts +2 -0
- package/src/fulfillment/resourceError/resourceError.ts +20 -0
- package/src/fulfillment/resourceError/resourceErrorAssignee.ts +9 -0
- package/src/fulfillment/shipment/index.ts +1 -0
- package/src/fulfillment/shipment/package.ts +12 -1
- package/src/fulfillment/shipment/packageIssue.ts +11 -0
- package/src/fulfillment/shipment/shipment.ts +3 -9
- package/src/fulfillment/shipment/shipmentItem.ts +1 -0
- package/src/fulfillment/shipment/shippingMethod.ts +22 -1
- package/src/index.ts +1 -0
- package/src/integrations/index.ts +1 -0
- package/src/integrations/shopify.ts +7 -0
- package/src/logistics/availability.ts +13 -1
- package/src/logistics/index.ts +2 -1
- package/src/logistics/serviceArea.ts +14 -0
- package/src/logistics/shippingRate.ts +2 -0
- package/src/storage/appointment/appointment.ts +9 -3
- package/src/storage/appointment/appointmentType.ts +4 -0
- package/src/storage/availability.ts +3 -1
- package/src/warehouse/asnProcessLog.ts +15 -0
- package/src/warehouse/bin.ts +9 -0
- package/src/warehouse/carrierTransferPackage.ts +65 -0
- package/src/warehouse/carrierTransferPallet.ts +12 -0
- package/src/warehouse/containerRequestLog.ts +31 -0
- package/src/warehouse/index.ts +23 -4
- package/src/warehouse/location.ts +24 -26
- package/src/warehouse/locationActivityLog.ts +26 -0
- package/src/warehouse/locationItem.ts +33 -0
- package/src/warehouse/locationTemplate.ts +8 -0
- package/src/warehouse/manualItem.ts +21 -0
- package/src/warehouse/occupiedLocation.ts +5 -0
- package/src/warehouse/organization.ts +39 -0
- package/src/warehouse/packerActivityLog.ts +16 -0
- package/src/warehouse/pallet.ts +9 -15
- package/src/warehouse/picksheet.ts +98 -0
- package/src/warehouse/product.ts +17 -0
- package/src/warehouse/productQuantum.ts +79 -0
- package/src/warehouse/putawayActivityLog.ts +18 -0
- package/src/warehouse/return.ts +78 -0
- package/src/warehouse/shipmentProductsTracking.ts +18 -0
- package/src/warehouse/specialProject.ts +47 -0
- package/src/warehouse/stock.ts +7 -0
- package/src/warehouse/supply.ts +42 -0
- package/src/warehouse/supplyStock.ts +10 -0
- package/src/warehouse/supplyTransaction.ts +14 -0
- package/src/warehouse/issue.ts +0 -7
- package/src/warehouse/task.ts +0 -22
- package/src/warehouse/taskDefinition.ts +0 -13
- package/src/warehouse/warehouseItem.ts +0 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@secondcloset/types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.38.1-beta-pq-0",
|
|
4
4
|
"description": "secondcloset type declaration and definitions",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
},
|
|
20
20
|
"homepage": "https://github.com/SecondCloset/types#readme",
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"typescript": "^
|
|
22
|
+
"typescript": "^4.6.3"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type ActivityEvent = "all" | "asn" | "order" | "manual" | "system";
|
|
2
|
+
export interface ActivityHistory {
|
|
3
|
+
id: string;
|
|
4
|
+
user?: {
|
|
5
|
+
id: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
is_admin: boolean;
|
|
8
|
+
is_customer: boolean;
|
|
9
|
+
};
|
|
10
|
+
description: string[];
|
|
11
|
+
organization_name?: string;
|
|
12
|
+
created_at: string;
|
|
13
|
+
event: Partial<ActivityEvent>;
|
|
14
|
+
metadata?: {
|
|
15
|
+
facility?: { id: string; name: string };
|
|
16
|
+
asn?: { id: string; number: string };
|
|
17
|
+
order?: { id: string; number: string };
|
|
18
|
+
file?: { url: string; name: string };
|
|
19
|
+
shipment?: { id: string; number: string };
|
|
20
|
+
image_url?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
package/src/_common/address.ts
CHANGED
package/src/_common/facility.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Version } from ".";
|
|
2
|
+
import { Common } from "..";
|
|
1
3
|
import { ServiceArea } from "./serviceArea";
|
|
2
4
|
|
|
3
5
|
export type FacilityCode =
|
|
@@ -5,9 +7,16 @@ export type FacilityCode =
|
|
|
5
7
|
| "yyz2"
|
|
6
8
|
| "yyz3"
|
|
7
9
|
| "yyz4"
|
|
10
|
+
| "yyz5"
|
|
8
11
|
| "yvr1"
|
|
12
|
+
| "yvr2"
|
|
9
13
|
| "yow1"
|
|
10
14
|
| "yul1"
|
|
15
|
+
| "lax1"
|
|
16
|
+
| "lax2"
|
|
17
|
+
| "nyc1"
|
|
18
|
+
| "mia1"
|
|
19
|
+
| "hou1"
|
|
11
20
|
| "unknown";
|
|
12
21
|
|
|
13
22
|
export type DeprecatedFacilityCode = "yyz1" | "yyz2";
|
|
@@ -15,23 +24,45 @@ export type DeprecatedFacilityCode = "yyz1" | "yyz2";
|
|
|
15
24
|
export type FacilityCity =
|
|
16
25
|
| "Toronto"
|
|
17
26
|
| "Mississauga"
|
|
27
|
+
| "Markham"
|
|
18
28
|
| "Vancouver"
|
|
19
29
|
| "Ottawa"
|
|
20
|
-
| "Montreal"
|
|
30
|
+
| "Montreal"
|
|
31
|
+
| "Buena Park"
|
|
32
|
+
| "Santa Fe Springs"
|
|
33
|
+
| "Carlstadt"
|
|
34
|
+
| "Medley"
|
|
35
|
+
| "Houston";
|
|
21
36
|
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
export type Facility<V = Version> = V extends "V1"
|
|
38
|
+
? {
|
|
39
|
+
id: number;
|
|
40
|
+
name: FacilityCode;
|
|
41
|
+
phone: string;
|
|
42
|
+
email: string;
|
|
43
|
+
address: {
|
|
44
|
+
table: {
|
|
45
|
+
street: string;
|
|
46
|
+
city: FacilityCity;
|
|
47
|
+
province: string;
|
|
48
|
+
country: string;
|
|
49
|
+
postal_code: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
service_area: ServiceArea;
|
|
53
|
+
}
|
|
54
|
+
: {
|
|
55
|
+
id: string;
|
|
56
|
+
name: FacilityCode;
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
service_area: ServiceArea;
|
|
59
|
+
address: {
|
|
60
|
+
street: string;
|
|
61
|
+
city: string;
|
|
62
|
+
province: string;
|
|
63
|
+
country: string;
|
|
64
|
+
postal_code: string;
|
|
65
|
+
};
|
|
66
|
+
created_at: string;
|
|
67
|
+
updated_at: string;
|
|
34
68
|
};
|
|
35
|
-
};
|
|
36
|
-
service_area: ServiceArea;
|
|
37
|
-
}
|
package/src/_common/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type Version = "V1" | "V2";
|
|
1
2
|
export * from "./facility";
|
|
2
3
|
export * from "./serviceArea";
|
|
3
4
|
export * from "./user";
|
|
@@ -7,3 +8,4 @@ export * from "./organization";
|
|
|
7
8
|
export * from "./credential";
|
|
8
9
|
export * from "./file";
|
|
9
10
|
export * from "./note";
|
|
11
|
+
export * from "./activityHistory";
|
|
@@ -2,8 +2,13 @@ import { BaseImage } from "./image";
|
|
|
2
2
|
import { BaseAddress } from "./address";
|
|
3
3
|
import { BaseUser } from "./user";
|
|
4
4
|
import { Carrier } from "../fulfillment";
|
|
5
|
+
import { Facility } from "./facility";
|
|
5
6
|
|
|
6
|
-
export type OrganizationConfigKey =
|
|
7
|
+
export type OrganizationConfigKey =
|
|
8
|
+
| "default_fulfilled_from"
|
|
9
|
+
| "auto_fulfill_orders"
|
|
10
|
+
| "freightcom_api_username"
|
|
11
|
+
| "freightcom_api_password";
|
|
7
12
|
|
|
8
13
|
export interface OrganizationConfig {
|
|
9
14
|
key: OrganizationConfigKey;
|
|
@@ -25,7 +30,14 @@ export interface OrganizationAddress extends BaseAddress {
|
|
|
25
30
|
|
|
26
31
|
export interface GeofilterConstraint {
|
|
27
32
|
country: string;
|
|
28
|
-
provinces:
|
|
33
|
+
provinces: GeofilterConstraintProvince[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface GeofilterConstraintProvince {
|
|
37
|
+
id?: string;
|
|
38
|
+
country: string;
|
|
39
|
+
province: string;
|
|
40
|
+
_destroy?: boolean;
|
|
29
41
|
}
|
|
30
42
|
|
|
31
43
|
export interface SCServiceTier {
|
|
@@ -35,14 +47,17 @@ export interface SCServiceTier {
|
|
|
35
47
|
to_the_door?: boolean;
|
|
36
48
|
}
|
|
37
49
|
|
|
38
|
-
export interface
|
|
50
|
+
export interface BaseOrganization {
|
|
51
|
+
created_at: string;
|
|
52
|
+
email: string;
|
|
39
53
|
id: string;
|
|
40
54
|
name: string;
|
|
41
|
-
phone_number: string;
|
|
42
|
-
email: string;
|
|
43
|
-
created_at: string;
|
|
44
|
-
logo: BaseImage;
|
|
45
55
|
packing_notes: string;
|
|
56
|
+
phone_number: string;
|
|
57
|
+
logo?: BaseImage;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface Organization extends BaseOrganization {
|
|
46
61
|
addresses: OrganizationAddress[];
|
|
47
62
|
carriers: Carrier[];
|
|
48
63
|
users: BaseUser[];
|
|
@@ -55,4 +70,18 @@ export interface Organization {
|
|
|
55
70
|
configurations_attributes: OrganizationConfig[];
|
|
56
71
|
permissions: Permission[];
|
|
57
72
|
geofilter_constraints?: GeofilterConstraint[];
|
|
73
|
+
facility_service_areas?: FacilityServiceArea[];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface Region {
|
|
77
|
+
id?: string;
|
|
78
|
+
region_code: string;
|
|
79
|
+
region_name: string;
|
|
80
|
+
country_code: string;
|
|
81
|
+
country_name: string;
|
|
82
|
+
}
|
|
83
|
+
export interface FacilityServiceArea {
|
|
84
|
+
facility: Facility<"V2">;
|
|
85
|
+
default_regions: Region[];
|
|
86
|
+
organization_regions: Region[];
|
|
58
87
|
}
|
package/src/_common/user.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AppointmentType,
|
|
3
|
+
AppointmentSubtype,
|
|
4
|
+
DeliveryType,
|
|
5
|
+
} from "./appointmentType";
|
|
2
6
|
import { AppointmentStatus } from "./appointmentStatus";
|
|
3
7
|
import { Shipment, ScServiceCode } from "../shipment";
|
|
4
8
|
import { Order } from "../order";
|
|
5
9
|
import { AppointmentSlot } from "../../storage";
|
|
6
|
-
import { BaseImage, BaseNote } from "../../_common";
|
|
10
|
+
import { BaseImage, BaseNote, ServiceArea } from "../../_common";
|
|
7
11
|
|
|
8
12
|
export interface Appointment {
|
|
9
13
|
appointment_actions: string[];
|
|
@@ -18,6 +22,9 @@ export interface Appointment {
|
|
|
18
22
|
driver_id: string | null;
|
|
19
23
|
end_time: string | null;
|
|
20
24
|
estimated_time: number;
|
|
25
|
+
facility?: {
|
|
26
|
+
name: string;
|
|
27
|
+
};
|
|
21
28
|
failed_notes: string | null;
|
|
22
29
|
failed_reason: string | null;
|
|
23
30
|
field_ops_notes?: BaseNote[];
|
|
@@ -26,16 +33,24 @@ export interface Appointment {
|
|
|
26
33
|
incomplete_at: string | null;
|
|
27
34
|
issue_images?: BaseImage[];
|
|
28
35
|
job_type: AppointmentType;
|
|
36
|
+
job_subtype?: AppointmentSubtype;
|
|
29
37
|
location: Location;
|
|
30
38
|
movers: null;
|
|
31
39
|
num_movers: null;
|
|
32
40
|
number: string;
|
|
41
|
+
range_of_days_assigned_dates?: {
|
|
42
|
+
assigned_start_datetime: string;
|
|
43
|
+
assigned_end_datetime: string;
|
|
44
|
+
} | null;
|
|
45
|
+
range_of_days_start_date?: string | null;
|
|
46
|
+
range_of_days_end_date?: string | null;
|
|
33
47
|
rescheduled: boolean;
|
|
34
48
|
rescheduled_appointment_id: string | null;
|
|
35
49
|
shipment: Partial<Shipment>;
|
|
36
50
|
signature_image: any;
|
|
37
51
|
signature_url: string | null;
|
|
38
52
|
signed_at: string | null;
|
|
53
|
+
sms: boolean;
|
|
39
54
|
source: Partial<Order>;
|
|
40
55
|
start_time: string | null;
|
|
41
56
|
status: AppointmentStatus;
|
|
@@ -48,6 +63,8 @@ export interface Appointment {
|
|
|
48
63
|
user_id: string;
|
|
49
64
|
user_lastname: string;
|
|
50
65
|
verification_images?: BaseImage[];
|
|
66
|
+
delivery_type?: DeliveryType;
|
|
67
|
+
shipping_labels?: LastMileShippingLabel[];
|
|
51
68
|
}
|
|
52
69
|
|
|
53
70
|
export interface Location {
|
|
@@ -65,6 +82,14 @@ export interface Location {
|
|
|
65
82
|
phone_number: string;
|
|
66
83
|
postal_code: string;
|
|
67
84
|
province: string;
|
|
68
|
-
service_area:
|
|
85
|
+
service_area: ServiceArea | null;
|
|
69
86
|
updated_at: string;
|
|
70
87
|
}
|
|
88
|
+
|
|
89
|
+
interface LastMileShippingLabel {
|
|
90
|
+
id: string;
|
|
91
|
+
label_id?: string;
|
|
92
|
+
tracking_number?: string;
|
|
93
|
+
tracking_url?: string;
|
|
94
|
+
label_download?: string;
|
|
95
|
+
}
|
|
@@ -46,6 +46,7 @@ export interface ASN {
|
|
|
46
46
|
expected_arrival_date?: string;
|
|
47
47
|
actual_arrival_date?: string;
|
|
48
48
|
reference_number?: string;
|
|
49
|
+
po_number?: string;
|
|
49
50
|
container_size?: string;
|
|
50
51
|
box_packing_option?: ASNBoxPackingOption;
|
|
51
52
|
pallet_packing_option?: ASNPalletPackingOption;
|
package/src/fulfillment/index.ts
CHANGED
|
@@ -10,13 +10,16 @@ import {
|
|
|
10
10
|
import { OrderItem } from "./orderItem";
|
|
11
11
|
|
|
12
12
|
export type ShipmentTag =
|
|
13
|
+
| "ready_to_fulfill"
|
|
13
14
|
| "unfulfilled_items"
|
|
14
15
|
| "processing_items"
|
|
15
16
|
| "items_fulfilled"
|
|
16
17
|
| "processing_return_items"
|
|
17
18
|
| "items_returned"
|
|
18
19
|
| "items_removed"
|
|
19
|
-
| "pending_inventory_receiving"
|
|
20
|
+
| "pending_inventory_receiving"
|
|
21
|
+
| "items_partially_fulfilled"
|
|
22
|
+
| "customer_booking";
|
|
20
23
|
|
|
21
24
|
export type OrderPlatform =
|
|
22
25
|
| "manual"
|
|
@@ -27,7 +30,7 @@ export type OrderPlatform =
|
|
|
27
30
|
| "shipstaion"
|
|
28
31
|
| "external_api";
|
|
29
32
|
|
|
30
|
-
interface
|
|
33
|
+
export interface FulfillmentOrderAddress extends BaseAddress {
|
|
31
34
|
customer_id: string;
|
|
32
35
|
contact_name: string;
|
|
33
36
|
customer_phone_number: string | null;
|
|
@@ -52,8 +55,9 @@ export interface Order {
|
|
|
52
55
|
client_type: string | null;
|
|
53
56
|
insurance_value: number;
|
|
54
57
|
shipping_service: string | null;
|
|
58
|
+
signature_required?: boolean;
|
|
55
59
|
customer: Customer;
|
|
56
|
-
address:
|
|
60
|
+
address: FulfillmentOrderAddress;
|
|
57
61
|
created_at: string;
|
|
58
62
|
updated_at: string;
|
|
59
63
|
organization: Organization;
|
|
@@ -72,4 +76,5 @@ export interface Order {
|
|
|
72
76
|
on_hold: boolean;
|
|
73
77
|
on_hold_at: string;
|
|
74
78
|
selected_service_code?: ScServiceCode;
|
|
79
|
+
has_errors: boolean;
|
|
75
80
|
}
|
|
@@ -51,6 +51,11 @@ export interface BaseProduct {
|
|
|
51
51
|
}[];
|
|
52
52
|
required_parts?: { [productID: string]: number };
|
|
53
53
|
packaging_levels?: PackagingLevel[];
|
|
54
|
+
return_days?: number;
|
|
55
|
+
insurance_required: boolean;
|
|
56
|
+
insurance_value: number | null;
|
|
57
|
+
has_errors: boolean;
|
|
58
|
+
under_conversion: boolean;
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
export interface Product extends BaseProduct {
|
|
@@ -63,6 +68,7 @@ export interface PackagingLevel {
|
|
|
63
68
|
product: {
|
|
64
69
|
id: string;
|
|
65
70
|
sku: string;
|
|
71
|
+
upc: string;
|
|
66
72
|
scid: string;
|
|
67
73
|
name: string;
|
|
68
74
|
tracks_lot_numbers: boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ResourceErrorAssignee } from "./resourceErrorAssignee";
|
|
2
|
+
|
|
3
|
+
export type ResourceErrorType = "order" | "product";
|
|
4
|
+
|
|
5
|
+
export interface ResourceError {
|
|
6
|
+
id: string;
|
|
7
|
+
resource_id: string;
|
|
8
|
+
resource_type: ResourceErrorType;
|
|
9
|
+
normalized_resource_type: ResourceErrorType;
|
|
10
|
+
issue: string;
|
|
11
|
+
issue_reason: string;
|
|
12
|
+
issue_category: string;
|
|
13
|
+
origin: string;
|
|
14
|
+
created_at: string;
|
|
15
|
+
updated_at: string;
|
|
16
|
+
caused_by_id?: string;
|
|
17
|
+
caused_by_type?: string;
|
|
18
|
+
assignee?: ResourceErrorAssignee | null;
|
|
19
|
+
deleted_at?: string | null;
|
|
20
|
+
}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import { PackageIssue } from "./packageIssue";
|
|
2
|
+
|
|
3
|
+
export type PackageStatus =
|
|
4
|
+
| "unattempted"
|
|
5
|
+
| "failed"
|
|
6
|
+
| "completed"
|
|
7
|
+
| "cancelled"
|
|
8
|
+
| "not_delivered"
|
|
9
|
+
| "redelivered";
|
|
2
10
|
export type PackageType = "box" | "standard_pallet" | "double_pallet";
|
|
3
11
|
|
|
4
12
|
export interface Package {
|
|
5
13
|
id: string;
|
|
14
|
+
package_id: null | string;
|
|
6
15
|
logistics_shipment_id: string;
|
|
7
16
|
weight_value: string;
|
|
8
17
|
weight_unit: string;
|
|
@@ -13,10 +22,12 @@ export interface Package {
|
|
|
13
22
|
width_value: string;
|
|
14
23
|
width_unit: string;
|
|
15
24
|
logistics_external_carrier_shipping_label_id: string;
|
|
25
|
+
logistics_bolt_shipping_label_id?: string;
|
|
16
26
|
shipment_item_ids: string[];
|
|
17
27
|
status: PackageStatus;
|
|
18
28
|
tracking_number: null | string;
|
|
19
29
|
failed_reason: null | string;
|
|
20
30
|
failed_notes: null | string;
|
|
21
31
|
package_type?: PackageType;
|
|
32
|
+
package_issues?: PackageIssue[];
|
|
22
33
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseImage } from "../../_common";
|
|
2
|
+
|
|
3
|
+
export type PackageIssueFailedReason = 'damaged_package' | 'missing_package' | 'extra_package' | 'change_mind' | 'other'
|
|
4
|
+
export interface PackageIssue {
|
|
5
|
+
id: string;
|
|
6
|
+
logistics_shipment_id: string;
|
|
7
|
+
logistics_shipment_package_id: string;
|
|
8
|
+
failed_notes?: string | null;
|
|
9
|
+
failed_reason?: PackageIssueFailedReason | null;
|
|
10
|
+
images?: BaseImage[];
|
|
11
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ShipmentItem } from "./shipmentItem";
|
|
2
|
-
import { BaseUser, BaseNote } from "../../_common";
|
|
2
|
+
import { BaseUser, BaseNote, BaseOrganization, Facility } from "../../_common";
|
|
3
3
|
import { Package } from "./package";
|
|
4
4
|
import {
|
|
5
5
|
SecondClosetShippingMethod,
|
|
@@ -26,14 +26,7 @@ export type ScServiceCode =
|
|
|
26
26
|
export interface Shipment {
|
|
27
27
|
id: string;
|
|
28
28
|
organization_id: string;
|
|
29
|
-
organization
|
|
30
|
-
created_at: string;
|
|
31
|
-
email: string;
|
|
32
|
-
id: string;
|
|
33
|
-
name: string;
|
|
34
|
-
packing_notes: string;
|
|
35
|
-
phone_number: string;
|
|
36
|
-
};
|
|
29
|
+
organization?: BaseOrganization;
|
|
37
30
|
billed: boolean;
|
|
38
31
|
user: BaseUser;
|
|
39
32
|
notes: BaseNote[] | string;
|
|
@@ -60,4 +53,5 @@ export interface Shipment {
|
|
|
60
53
|
created_at: string;
|
|
61
54
|
updated_at: string;
|
|
62
55
|
};
|
|
56
|
+
facility?: Partial<Facility>;
|
|
63
57
|
}
|
|
@@ -2,9 +2,11 @@ import { ShipmentItem } from "./shipmentItem";
|
|
|
2
2
|
import {
|
|
3
3
|
AppointmentStatus,
|
|
4
4
|
AppointmentType,
|
|
5
|
+
AppointmentSubtype,
|
|
6
|
+
DeliveryType,
|
|
5
7
|
} from "../../fulfillment/appointment";
|
|
6
8
|
import { CustomerAddress, Customer, ShipmentTag } from "../order";
|
|
7
|
-
import { BaseUser, BaseImage, BaseNote } from "../../_common";
|
|
9
|
+
import { BaseUser, BaseImage, BaseNote, BaseAddress } from "../../_common";
|
|
8
10
|
import { Package } from "./package";
|
|
9
11
|
import { Carrier } from "./carrier";
|
|
10
12
|
import { ScServiceCode } from "../shipment";
|
|
@@ -44,6 +46,7 @@ export interface SecondClosetShippingMethod {
|
|
|
44
46
|
issue_images?: BaseImage[];
|
|
45
47
|
incomplete_at?: string;
|
|
46
48
|
job_type?: AppointmentType;
|
|
49
|
+
job_subtype?: AppointmentSubtype;
|
|
47
50
|
date?: string | null;
|
|
48
51
|
timerange?: string | null;
|
|
49
52
|
formatted_timeslot?: string | null;
|
|
@@ -53,6 +56,12 @@ export interface SecondClosetShippingMethod {
|
|
|
53
56
|
arrived_time?: string | null;
|
|
54
57
|
rescheduled?: boolean;
|
|
55
58
|
rescheduled_appointment_id?: string | null;
|
|
59
|
+
range_of_days_assigned_dates?: {
|
|
60
|
+
assigned_start_datetime: string;
|
|
61
|
+
assigned_end_datetime: string;
|
|
62
|
+
} | null;
|
|
63
|
+
range_of_days_start_date?: string | null;
|
|
64
|
+
range_of_days_end_date?: string | null;
|
|
56
65
|
created_at: string;
|
|
57
66
|
updated_at?: string;
|
|
58
67
|
num_movers?: number | null;
|
|
@@ -66,6 +75,8 @@ export interface SecondClosetShippingMethod {
|
|
|
66
75
|
delivery_service_level?: ScServiceCode;
|
|
67
76
|
field_ops_notes?: BaseNote[];
|
|
68
77
|
verification_images?: BaseImage[];
|
|
78
|
+
delivery_type?: DeliveryType;
|
|
79
|
+
shipping_labels?: LastMileShippingLabel[];
|
|
69
80
|
source?: {
|
|
70
81
|
id: string;
|
|
71
82
|
type: string;
|
|
@@ -100,6 +111,8 @@ interface CarrierShippingAddress {
|
|
|
100
111
|
contact_name: string;
|
|
101
112
|
phone_number: string;
|
|
102
113
|
address: string;
|
|
114
|
+
address_line_1?: string;
|
|
115
|
+
address_line_2?: string;
|
|
103
116
|
city: string;
|
|
104
117
|
country: string;
|
|
105
118
|
province: string;
|
|
@@ -116,6 +129,14 @@ export interface ExternalCarrierShippingLabel {
|
|
|
116
129
|
voided_at: string | null;
|
|
117
130
|
}
|
|
118
131
|
|
|
132
|
+
export interface LastMileShippingLabel {
|
|
133
|
+
id: string;
|
|
134
|
+
label_id?: string;
|
|
135
|
+
tracking_number?: string;
|
|
136
|
+
tracking_url?: string;
|
|
137
|
+
label_download?: string;
|
|
138
|
+
}
|
|
139
|
+
|
|
119
140
|
export interface ExternalCarrierShippingMethod {
|
|
120
141
|
id: string;
|
|
121
142
|
status: ExternalCarrierShipmentStatus;
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./shopify";
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
import { ServiceArea } from "../_common";
|
|
2
|
+
|
|
3
|
+
export type DeliveryServiceLevel =
|
|
4
|
+
| "white_glove"
|
|
5
|
+
| "non_white_glove"
|
|
6
|
+
| "all_service_levels"
|
|
7
|
+
| "parcel_regular";
|
|
8
|
+
|
|
1
9
|
export interface AvailabilityTimeSlot {
|
|
2
10
|
timeslot: string;
|
|
3
|
-
service_area:
|
|
11
|
+
service_area: ServiceArea;
|
|
4
12
|
customer_segment: string;
|
|
5
13
|
holiday: boolean;
|
|
6
14
|
total_milliseconds: number;
|
|
@@ -9,6 +17,10 @@ export interface AvailabilityTimeSlot {
|
|
|
9
17
|
vehicles_required: number;
|
|
10
18
|
duration_in_milliseconds: number;
|
|
11
19
|
available: boolean;
|
|
20
|
+
delivery_service_level: DeliveryServiceLevel;
|
|
21
|
+
booked_appointments_count: number;
|
|
22
|
+
remaining_appointments_count: number;
|
|
23
|
+
maximum_appointments_number: number;
|
|
12
24
|
[index: string]: any;
|
|
13
25
|
}
|
|
14
26
|
|
package/src/logistics/index.ts
CHANGED