@secondcloset/types 2.8.0-beta-locationItemStatus-0 → 2.8.0-beta.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/facility.ts +40 -16
- package/src/_common/index.ts +2 -1
- package/src/_common/organization.ts +8 -18
- package/src/_common/serviceArea.ts +9 -1
- package/src/_common/user.ts +1 -0
- package/src/fulfillment/appointment/appointment.ts +4 -0
- package/src/fulfillment/appointment/appointmentType.ts +2 -0
- package/src/fulfillment/asn/asn.ts +1 -0
- package/src/fulfillment/index.ts +1 -0
- package/src/fulfillment/order/order.ts +42 -39
- package/src/fulfillment/order/orderItem.ts +30 -14
- package/src/fulfillment/product/product.ts +10 -13
- package/src/fulfillment/returns/configs.ts +32 -0
- package/src/fulfillment/returns/index.ts +1 -0
- package/src/fulfillment/shipment/shipment.ts +54 -34
- package/src/fulfillment/shipment/shipmentItem.ts +46 -39
- package/src/fulfillment/shipment/shippingMethod.ts +4 -0
- package/src/logistics/availability.ts +5 -1
- package/src/logistics/index.ts +2 -1
- package/src/logistics/serviceArea.ts +14 -0
- package/src/storage/appointment/appointment.ts +4 -0
- package/src/storage/appointment/appointmentType.ts +2 -0
- package/src/warehouse/asnContainer.ts +8 -0
- package/src/warehouse/carrierTransferPackage.ts +2 -2
- package/src/warehouse/index.ts +14 -10
- package/src/warehouse/location.ts +10 -0
- package/src/warehouse/locationActivityLog.ts +1 -0
- package/src/warehouse/locationItem.ts +4 -0
- package/src/warehouse/occupiedLocation.ts +5 -0
- package/src/warehouse/organization.ts +2 -0
- package/src/warehouse/packerActivityLog.ts +7 -4
- package/src/warehouse/picksheet.ts +44 -1
- package/src/warehouse/product.ts +3 -0
- package/src/warehouse/productQuantum.ts +74 -0
- package/src/warehouse/putawayActivityLog.ts +18 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@secondcloset/types",
|
|
3
|
-
"version": "2.8.0-beta
|
|
3
|
+
"version": "2.8.0-beta.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
|
}
|
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 =
|
|
@@ -12,6 +14,9 @@ export type FacilityCode =
|
|
|
12
14
|
| "yul1"
|
|
13
15
|
| "lax1"
|
|
14
16
|
| "lax2"
|
|
17
|
+
| "nyc1"
|
|
18
|
+
| "mia1"
|
|
19
|
+
| "hou1"
|
|
15
20
|
| "unknown";
|
|
16
21
|
|
|
17
22
|
export type DeprecatedFacilityCode = "yyz1" | "yyz2";
|
|
@@ -24,21 +29,40 @@ export type FacilityCity =
|
|
|
24
29
|
| "Ottawa"
|
|
25
30
|
| "Montreal"
|
|
26
31
|
| "Buena Park"
|
|
27
|
-
| "Santa Fe Springs"
|
|
32
|
+
| "Santa Fe Springs"
|
|
33
|
+
| "Carlstadt"
|
|
34
|
+
| "Medley"
|
|
35
|
+
| "Houston";
|
|
28
36
|
|
|
29
|
-
export
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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;
|
|
41
68
|
};
|
|
42
|
-
};
|
|
43
|
-
service_area: ServiceArea;
|
|
44
|
-
}
|
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,4 +8,4 @@ export * from "./organization";
|
|
|
7
8
|
export * from "./credential";
|
|
8
9
|
export * from "./file";
|
|
9
10
|
export * from "./note";
|
|
10
|
-
export * from "./activityHistory";
|
|
11
|
+
export * from "./activityHistory";
|
|
@@ -2,13 +2,14 @@ import { BaseImage } from "./image";
|
|
|
2
2
|
import { BaseAddress } from "./address";
|
|
3
3
|
import { BaseUser } from "./user";
|
|
4
4
|
import { Carrier } from "../fulfillment";
|
|
5
|
-
import {
|
|
5
|
+
import { Facility } from "./facility";
|
|
6
6
|
|
|
7
7
|
export type OrganizationConfigKey =
|
|
8
8
|
| "default_fulfilled_from"
|
|
9
9
|
| "auto_fulfill_orders"
|
|
10
10
|
| "freightcom_api_username"
|
|
11
|
-
| "freightcom_api_password"
|
|
11
|
+
| "freightcom_api_password"
|
|
12
|
+
| "preferred_return_facility";
|
|
12
13
|
|
|
13
14
|
export interface OrganizationConfig {
|
|
14
15
|
key: OrganizationConfigKey;
|
|
@@ -71,23 +72,12 @@ export interface Organization extends BaseOrganization {
|
|
|
71
72
|
permissions: Permission[];
|
|
72
73
|
geofilter_constraints?: GeofilterConstraint[];
|
|
73
74
|
facility_service_areas?: FacilityServiceArea[];
|
|
75
|
+
default_fulfilled_from?: {
|
|
76
|
+
facility: Facility<"V2">;
|
|
77
|
+
organization_regions: Region;
|
|
78
|
+
}[];
|
|
74
79
|
}
|
|
75
80
|
|
|
76
|
-
interface Facility {
|
|
77
|
-
id: string;
|
|
78
|
-
name: string;
|
|
79
|
-
enabled: boolean;
|
|
80
|
-
service_area: ServiceArea;
|
|
81
|
-
address: {
|
|
82
|
-
street: string;
|
|
83
|
-
city: string;
|
|
84
|
-
province: string;
|
|
85
|
-
country: string;
|
|
86
|
-
postal_code: string;
|
|
87
|
-
};
|
|
88
|
-
created_at: string;
|
|
89
|
-
updated_at: string;
|
|
90
|
-
}
|
|
91
81
|
export interface Region {
|
|
92
82
|
id?: string;
|
|
93
83
|
region_code: string;
|
|
@@ -96,7 +86,7 @@ export interface Region {
|
|
|
96
86
|
country_name: string;
|
|
97
87
|
}
|
|
98
88
|
export interface FacilityServiceArea {
|
|
99
|
-
facility: Facility
|
|
89
|
+
facility: Facility<"V2">;
|
|
100
90
|
default_regions: Region[];
|
|
101
91
|
organization_regions: Region[];
|
|
102
92
|
}
|
package/src/_common/user.ts
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
AppointmentType,
|
|
3
3
|
AppointmentSubtype,
|
|
4
4
|
DeliveryType,
|
|
5
|
+
ParcelServiceLevel,
|
|
5
6
|
} from "./appointmentType";
|
|
6
7
|
import { AppointmentStatus } from "./appointmentStatus";
|
|
7
8
|
import { Shipment, ScServiceCode } from "../shipment";
|
|
@@ -10,6 +11,7 @@ import { AppointmentSlot } from "../../storage";
|
|
|
10
11
|
import { BaseImage, BaseNote, ServiceArea } from "../../_common";
|
|
11
12
|
|
|
12
13
|
export interface Appointment {
|
|
14
|
+
air_skip?: boolean;
|
|
13
15
|
appointment_actions: string[];
|
|
14
16
|
arrived_time: string | null;
|
|
15
17
|
cancelled_at: string | null;
|
|
@@ -38,6 +40,7 @@ export interface Appointment {
|
|
|
38
40
|
movers: null;
|
|
39
41
|
num_movers: null;
|
|
40
42
|
number: string;
|
|
43
|
+
parcel_service_level?: ParcelServiceLevel;
|
|
41
44
|
range_of_days_assigned_dates?: {
|
|
42
45
|
assigned_start_datetime: string;
|
|
43
46
|
assigned_end_datetime: string;
|
|
@@ -65,6 +68,7 @@ export interface Appointment {
|
|
|
65
68
|
verification_images?: BaseImage[];
|
|
66
69
|
delivery_type?: DeliveryType;
|
|
67
70
|
shipping_labels?: LastMileShippingLabel[];
|
|
71
|
+
signature_required?: boolean;
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
export interface Location {
|
package/src/fulfillment/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
BaseUser,
|
|
7
7
|
Organization,
|
|
8
8
|
File,
|
|
9
|
+
Version,
|
|
9
10
|
} from "../../_common";
|
|
10
11
|
import { OrderItem } from "./orderItem";
|
|
11
12
|
|
|
@@ -30,7 +31,7 @@ export type OrderPlatform =
|
|
|
30
31
|
| "shipstaion"
|
|
31
32
|
| "external_api";
|
|
32
33
|
|
|
33
|
-
interface
|
|
34
|
+
export interface FulfillmentOrderAddress extends BaseAddress {
|
|
34
35
|
customer_id: string;
|
|
35
36
|
contact_name: string;
|
|
36
37
|
customer_phone_number: string | null;
|
|
@@ -40,41 +41,43 @@ interface Address extends BaseAddress {
|
|
|
40
41
|
updated_at: string;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
export
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
44
|
+
export type Order<V = Version> = V extends "V1"
|
|
45
|
+
? {
|
|
46
|
+
id: string;
|
|
47
|
+
order_id: string;
|
|
48
|
+
external_order_number: string;
|
|
49
|
+
external_order_id: string | null;
|
|
50
|
+
notes: string;
|
|
51
|
+
internal_notes?: string;
|
|
52
|
+
platform: OrderPlatform;
|
|
53
|
+
external_platform_version: number | null;
|
|
54
|
+
parcel_type: string;
|
|
55
|
+
cancelled: boolean;
|
|
56
|
+
fulfilled_from: FacilityCode;
|
|
57
|
+
client_type: string | null;
|
|
58
|
+
insurance_value: number;
|
|
59
|
+
shipping_service: string | null;
|
|
60
|
+
signature_required?: boolean;
|
|
61
|
+
customer: Customer;
|
|
62
|
+
address: FulfillmentOrderAddress;
|
|
63
|
+
created_at: string;
|
|
64
|
+
updated_at: string;
|
|
65
|
+
organization: Organization;
|
|
66
|
+
overdue: boolean;
|
|
67
|
+
user: BaseUser;
|
|
68
|
+
status?: string;
|
|
69
|
+
shipment_tags: ShipmentTag[];
|
|
70
|
+
shipments: Shipment[];
|
|
71
|
+
items: OrderItem[];
|
|
72
|
+
files: File[];
|
|
73
|
+
stock_status:
|
|
74
|
+
| "in_stock"
|
|
75
|
+
| "partially_in_stock"
|
|
76
|
+
| "out_of_stock"
|
|
77
|
+
| "unknown_stock";
|
|
78
|
+
on_hold: boolean;
|
|
79
|
+
on_hold_at: string;
|
|
80
|
+
selected_service_code?: ScServiceCode;
|
|
81
|
+
has_errors: boolean;
|
|
82
|
+
}
|
|
83
|
+
: Omit<Order<"V1">, "items" | "shipments">;
|
|
@@ -1,16 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Version } from "../../_common";
|
|
2
|
+
import { BaseProduct, Product } from "../product";
|
|
2
3
|
import { ShipmentActionType } from "../shipment";
|
|
3
4
|
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
export type OrderItem<V = Version> = V extends "V1"
|
|
6
|
+
? {
|
|
7
|
+
id: string;
|
|
8
|
+
product: Product;
|
|
9
|
+
quantity: number;
|
|
10
|
+
attributes: string[];
|
|
11
|
+
return_reasons: string[];
|
|
12
|
+
available_actions: ShipmentActionType[];
|
|
13
|
+
actions_history: ShipmentActionType[];
|
|
14
|
+
virtual_kit_id: null | string;
|
|
15
|
+
available_quantity: number;
|
|
16
|
+
removed: boolean;
|
|
17
|
+
removed_reason: string;
|
|
18
|
+
}
|
|
19
|
+
: {
|
|
20
|
+
product: BaseProduct & {
|
|
21
|
+
available_quantity: OrderItem<"V1">["available_quantity"];
|
|
22
|
+
};
|
|
23
|
+
available_actions: {
|
|
24
|
+
inventory_pick_up_item_ids: OrderItem<"V1">["id"][];
|
|
25
|
+
inventory_warehouse_receiving_item_ids: OrderItem<"V1">["id"][];
|
|
26
|
+
delivery_item_ids: OrderItem<"V1">["id"][];
|
|
27
|
+
};
|
|
28
|
+
removed_items: {
|
|
29
|
+
removed_reason: string;
|
|
30
|
+
quantity: number;
|
|
31
|
+
}[];
|
|
32
|
+
};
|
|
@@ -3,11 +3,15 @@ import { BaseImage } from "../../_common";
|
|
|
3
3
|
|
|
4
4
|
export interface BaseProduct {
|
|
5
5
|
id: string;
|
|
6
|
-
|
|
7
|
-
scid: string;
|
|
6
|
+
name: string;
|
|
8
7
|
sku: string;
|
|
8
|
+
scid: string;
|
|
9
|
+
type: "base" | "kit";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface Product extends Omit<BaseProduct, "type"> {
|
|
13
|
+
organization_id: string;
|
|
9
14
|
upc: string;
|
|
10
|
-
name: string;
|
|
11
15
|
description: string;
|
|
12
16
|
platform: string;
|
|
13
17
|
active: boolean;
|
|
@@ -32,7 +36,7 @@ export interface BaseProduct {
|
|
|
32
36
|
customs_description: string | null;
|
|
33
37
|
images: BaseImage[];
|
|
34
38
|
packaging_criteria: string;
|
|
35
|
-
product_type: "
|
|
39
|
+
product_type: BaseProduct["type"];
|
|
36
40
|
stocks?: Stock[];
|
|
37
41
|
deleted_at: string;
|
|
38
42
|
created_at: string;
|
|
@@ -56,21 +60,14 @@ export interface BaseProduct {
|
|
|
56
60
|
insurance_value: number | null;
|
|
57
61
|
has_errors: boolean;
|
|
58
62
|
under_conversion: boolean;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
export interface Product extends BaseProduct {
|
|
62
|
-
base_products?: BaseProduct[];
|
|
63
|
+
base_products?: Product[];
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
export interface PackagingLevel {
|
|
66
67
|
id?: string;
|
|
67
68
|
product_id?: string;
|
|
68
|
-
product: {
|
|
69
|
-
id: string;
|
|
70
|
-
sku: string;
|
|
69
|
+
product: BaseProduct & {
|
|
71
70
|
upc: string;
|
|
72
|
-
scid: string;
|
|
73
|
-
name: string;
|
|
74
71
|
tracks_lot_numbers: boolean;
|
|
75
72
|
};
|
|
76
73
|
level: "single_item" | "inner_pack" | "master_pack" | "pallet";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Common } from "../..";
|
|
2
|
+
|
|
3
|
+
export type ReturnsConfigurationCondition =
|
|
4
|
+
| "item_good_package_open"
|
|
5
|
+
| "item_good_package_damaged"
|
|
6
|
+
| "item_damaged"
|
|
7
|
+
| "email_customer";
|
|
8
|
+
|
|
9
|
+
export type ReturnsConfigurationInstruction =
|
|
10
|
+
| "allow"
|
|
11
|
+
| "dispose"
|
|
12
|
+
| "restock"
|
|
13
|
+
| "return_to_merchant"
|
|
14
|
+
| "donate";
|
|
15
|
+
|
|
16
|
+
interface ReturnAddress extends Common.BaseAddress {
|
|
17
|
+
full_name?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ReturnsConfiguration {
|
|
21
|
+
organization_id: string;
|
|
22
|
+
condition: ReturnsConfigurationCondition;
|
|
23
|
+
instruction: ReturnsConfigurationInstruction | null;
|
|
24
|
+
comment: string;
|
|
25
|
+
address?: Partial<ReturnAddress>;
|
|
26
|
+
preferred_return_facility?: Common.FacilityCode;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ReturnsFacilities {
|
|
30
|
+
key: string;
|
|
31
|
+
value: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./configs";
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { ShipmentItem } from "./shipmentItem";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
BaseUser,
|
|
4
|
+
BaseNote,
|
|
5
|
+
BaseOrganization,
|
|
6
|
+
Facility,
|
|
7
|
+
Version,
|
|
8
|
+
} from "../../_common";
|
|
3
9
|
import { Package } from "./package";
|
|
4
10
|
import {
|
|
5
11
|
SecondClosetShippingMethod,
|
|
@@ -14,6 +20,15 @@ export type ShipmentActionType =
|
|
|
14
20
|
| StorageAppointmentType
|
|
15
21
|
| FulfillmentAppointmentType;
|
|
16
22
|
|
|
23
|
+
export type ServiceCode =
|
|
24
|
+
| "standard"
|
|
25
|
+
| "white_glove"
|
|
26
|
+
| "to_the_door"
|
|
27
|
+
| "room_of_choice"
|
|
28
|
+
| "standard_1_person"
|
|
29
|
+
| "room_of_choice_1_person"
|
|
30
|
+
| "to_the_door_1_person";
|
|
31
|
+
|
|
17
32
|
export type ScServiceCode =
|
|
18
33
|
| "second_closet_standard"
|
|
19
34
|
| "second_closet_white_glove"
|
|
@@ -21,37 +36,42 @@ export type ScServiceCode =
|
|
|
21
36
|
| "second_closet_room_of_choice"
|
|
22
37
|
| "second_closet_standard_1_person"
|
|
23
38
|
| "second_closet_room_of_choice_1_person"
|
|
24
|
-
| "second_closet_to_the_door_1_person"
|
|
39
|
+
| "second_closet_to_the_door_1_person"
|
|
40
|
+
| ServiceCode;
|
|
25
41
|
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
42
|
+
export type Shipment<V = Version> = V extends "V1"
|
|
43
|
+
? {
|
|
44
|
+
id: string;
|
|
45
|
+
organization_id: string;
|
|
46
|
+
organization?: BaseOrganization;
|
|
47
|
+
billed: boolean;
|
|
48
|
+
user: BaseUser;
|
|
49
|
+
notes: BaseNote[] | string;
|
|
50
|
+
shipment_items: ShipmentItem[];
|
|
51
|
+
shipment_number: string;
|
|
52
|
+
packages: Package[];
|
|
53
|
+
external_order_id: string | null;
|
|
54
|
+
external_order_type: string;
|
|
55
|
+
external_shipment_id: string | null;
|
|
56
|
+
carrier: Carrier | null;
|
|
57
|
+
created_at: string;
|
|
58
|
+
updated_at: string;
|
|
59
|
+
action_summary: ShipmentActionType[];
|
|
60
|
+
freight: boolean;
|
|
61
|
+
shipping_method:
|
|
62
|
+
| SecondClosetShippingMethod
|
|
63
|
+
| ExternalCarrierShippingMethod;
|
|
64
|
+
shipping_method_type:
|
|
65
|
+
| "external_carrier_shipment"
|
|
66
|
+
| "appointment"
|
|
67
|
+
| "untracked_shipment";
|
|
68
|
+
external_order?: {
|
|
69
|
+
id: string;
|
|
70
|
+
external_order_number: string;
|
|
71
|
+
external_order_id: string | null;
|
|
72
|
+
created_at: string;
|
|
73
|
+
updated_at: string;
|
|
74
|
+
};
|
|
75
|
+
facility?: Partial<Facility>;
|
|
76
|
+
}
|
|
77
|
+
: Omit<Shipment<"V1">, "shipment_items">;
|
|
@@ -1,42 +1,49 @@
|
|
|
1
|
+
import { Version } from "../../_common";
|
|
2
|
+
import { BaseProduct } from "../product";
|
|
1
3
|
import { ShipmentActionType } from "./shipment";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
4
|
+
export type ShipmentItem<V = Version> = V extends "V1"
|
|
5
|
+
? {
|
|
6
|
+
id: string;
|
|
7
|
+
order_item_id: string;
|
|
8
|
+
description: string;
|
|
9
|
+
item_identifier: string;
|
|
10
|
+
item_identifier_type: string;
|
|
11
|
+
item_identifier_value: string;
|
|
12
|
+
product_id?: string;
|
|
13
|
+
weight_value: string;
|
|
14
|
+
weight_unit: string;
|
|
15
|
+
length_value: string;
|
|
16
|
+
length_unit: string;
|
|
17
|
+
height_value: string;
|
|
18
|
+
height_unit: string;
|
|
19
|
+
width_value: string;
|
|
20
|
+
width_unit: string;
|
|
21
|
+
shipment_actions: ShipmentActionType[];
|
|
22
|
+
shipment_actions_completion: Partial<
|
|
23
|
+
{
|
|
24
|
+
[key in ShipmentActionType]: boolean;
|
|
25
|
+
}
|
|
26
|
+
>;
|
|
27
|
+
shipment_actions_status?: {
|
|
28
|
+
[key in ShipmentActionType]: {
|
|
29
|
+
completed: boolean;
|
|
30
|
+
failed: boolean;
|
|
31
|
+
failed_reason: string | null;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
shipment_item_group: {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
description: string;
|
|
38
|
+
external_group_id: string;
|
|
39
|
+
group_identifier_type: string;
|
|
40
|
+
group_identifier_value: string;
|
|
41
|
+
created_at: string;
|
|
42
|
+
updated_at: string;
|
|
43
|
+
group_identifier: string;
|
|
44
|
+
} | null;
|
|
22
45
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
completed: boolean;
|
|
27
|
-
failed: boolean;
|
|
28
|
-
failed_reason: string | null;
|
|
46
|
+
: {
|
|
47
|
+
product: BaseProduct;
|
|
48
|
+
shipment_item_ids: ShipmentItem<"V1">["id"][];
|
|
29
49
|
};
|
|
30
|
-
};
|
|
31
|
-
shipment_item_group: {
|
|
32
|
-
id: string;
|
|
33
|
-
name: string;
|
|
34
|
-
description: string;
|
|
35
|
-
external_group_id: string;
|
|
36
|
-
group_identifier_type: string;
|
|
37
|
-
group_identifier_value: string;
|
|
38
|
-
created_at: string;
|
|
39
|
-
updated_at: string;
|
|
40
|
-
group_identifier: string;
|
|
41
|
-
} | null;
|
|
42
|
-
}
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
AppointmentType,
|
|
5
5
|
AppointmentSubtype,
|
|
6
6
|
DeliveryType,
|
|
7
|
+
ParcelServiceLevel,
|
|
7
8
|
} from "../../fulfillment/appointment";
|
|
8
9
|
import { CustomerAddress, Customer, ShipmentTag } from "../order";
|
|
9
10
|
import { BaseUser, BaseImage, BaseNote, BaseAddress } from "../../_common";
|
|
@@ -31,6 +32,7 @@ export type ShippingMethodType =
|
|
|
31
32
|
| "external_carrier_shipment";
|
|
32
33
|
|
|
33
34
|
export interface SecondClosetShippingMethod {
|
|
35
|
+
air_skip?: boolean;
|
|
34
36
|
id: string;
|
|
35
37
|
user_id?: string;
|
|
36
38
|
user_code?: string;
|
|
@@ -62,6 +64,7 @@ export interface SecondClosetShippingMethod {
|
|
|
62
64
|
} | null;
|
|
63
65
|
range_of_days_start_date?: string | null;
|
|
64
66
|
range_of_days_end_date?: string | null;
|
|
67
|
+
parcel_service_level?: ParcelServiceLevel;
|
|
65
68
|
created_at: string;
|
|
66
69
|
updated_at?: string;
|
|
67
70
|
num_movers?: number | null;
|
|
@@ -77,6 +80,7 @@ export interface SecondClosetShippingMethod {
|
|
|
77
80
|
verification_images?: BaseImage[];
|
|
78
81
|
delivery_type?: DeliveryType;
|
|
79
82
|
shipping_labels?: LastMileShippingLabel[];
|
|
83
|
+
signature_required?: boolean;
|
|
80
84
|
source?: {
|
|
81
85
|
id: string;
|
|
82
86
|
type: string;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { ServiceArea } from "../_common";
|
|
2
2
|
|
|
3
|
-
export type DeliveryServiceLevel =
|
|
3
|
+
export type DeliveryServiceLevel =
|
|
4
|
+
| "white_glove"
|
|
5
|
+
| "non_white_glove"
|
|
6
|
+
| "all_service_levels"
|
|
7
|
+
| "parcel_regular";
|
|
4
8
|
|
|
5
9
|
export interface AvailabilityTimeSlot {
|
|
6
10
|
timeslot: string;
|
package/src/logistics/index.ts
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FacilityCode, ServiceArea as ServiceAreaCode } from "../_common";
|
|
2
|
+
|
|
3
|
+
export interface ServiceArea {
|
|
4
|
+
id: number;
|
|
5
|
+
facilities: FacilityCode[];
|
|
6
|
+
name: ServiceAreaCode;
|
|
7
|
+
humanized_name: string;
|
|
8
|
+
timezone: string;
|
|
9
|
+
address: { country: string; province: string };
|
|
10
|
+
standard_boundary: { latitude: number; longitude: number }[];
|
|
11
|
+
extended_boundary: { latitude: number; longitude: number }[];
|
|
12
|
+
created_at: string;
|
|
13
|
+
updated_at: string;
|
|
14
|
+
}
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
AppointmentType,
|
|
4
4
|
AppointmentSubtype,
|
|
5
5
|
DeliveryType,
|
|
6
|
+
ParcelServiceLevel,
|
|
6
7
|
} from "./appointmentType";
|
|
7
8
|
import { AppointmentStatus } from "./appointmentStatus";
|
|
8
9
|
import { Address } from "../address";
|
|
@@ -10,6 +11,7 @@ import { BaseImage, BaseNote, ServiceArea } from "../../_common";
|
|
|
10
11
|
import { ScServiceCode } from "../../fulfillment";
|
|
11
12
|
|
|
12
13
|
export interface Appointment {
|
|
14
|
+
air_skip?: boolean;
|
|
13
15
|
address: Address;
|
|
14
16
|
arrived_time?: string;
|
|
15
17
|
bulky_order_only: boolean;
|
|
@@ -37,6 +39,7 @@ export interface Appointment {
|
|
|
37
39
|
num_movers?: number;
|
|
38
40
|
number: string;
|
|
39
41
|
order_id: string;
|
|
42
|
+
parcel_service_level?: ParcelServiceLevel;
|
|
40
43
|
rescheduled: boolean;
|
|
41
44
|
rescheduled_appointment_id?: string | null;
|
|
42
45
|
signature_image?: string;
|
|
@@ -57,6 +60,7 @@ export interface Appointment {
|
|
|
57
60
|
items: AppointmentItem[];
|
|
58
61
|
verification_images?: BaseImage[];
|
|
59
62
|
delivery_type?: DeliveryType;
|
|
63
|
+
signature_required?: boolean;
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
export type AppointmentSlot =
|
|
@@ -43,7 +43,7 @@ interface ShippingLabel extends Partial<ExternalCarrierShippingLabel> {
|
|
|
43
43
|
created_at: string;
|
|
44
44
|
updated_at: string;
|
|
45
45
|
}
|
|
46
|
-
interface PackageShipment extends Partial<Shipment
|
|
46
|
+
interface PackageShipment extends Partial<Shipment<"V1">> {
|
|
47
47
|
user_id: string;
|
|
48
48
|
shipping_method_id?: string;
|
|
49
49
|
customer_scheduling_token?: string;
|
|
@@ -62,4 +62,4 @@ export interface PackageDetailsInfo extends PackageInfo {
|
|
|
62
62
|
organization: Organization;
|
|
63
63
|
carrier?: PackageCarrier;
|
|
64
64
|
shipping_label?: ShippingLabel;
|
|
65
|
-
}
|
|
65
|
+
}
|
package/src/warehouse/index.ts
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
|
+
export * from "./asnContainer";
|
|
1
2
|
export * from "./asnProcessLog";
|
|
2
3
|
export * from "./bin";
|
|
4
|
+
export * from "./carrierTransferPackage";
|
|
5
|
+
export * from "./carrierTransferPallet";
|
|
6
|
+
export * from "./containerRequestLog";
|
|
3
7
|
export * from "./location";
|
|
8
|
+
export * from "./locationActivityLog";
|
|
4
9
|
export * from "./locationItem";
|
|
5
10
|
export * from "./locationTemplate";
|
|
11
|
+
export * from "./manualItem";
|
|
12
|
+
export * from "./occupiedLocation";
|
|
6
13
|
export * from "./organization";
|
|
14
|
+
export * from "./packerActivityLog";
|
|
7
15
|
export * from "./pallet";
|
|
16
|
+
export * from "./picksheet";
|
|
8
17
|
export * from "./product";
|
|
18
|
+
export * from "./productQuantum";
|
|
19
|
+
export * from "./putawayActivityLog";
|
|
20
|
+
export * from "./return";
|
|
9
21
|
export * from "./shipmentProductsTracking";
|
|
22
|
+
export * from "./specialProject";
|
|
23
|
+
export * from "./stock";
|
|
10
24
|
export * from "./supply";
|
|
11
25
|
export * from "./supplyStock";
|
|
12
26
|
export * from "./supplyTransaction";
|
|
13
|
-
export * from "./locationActivityLog";
|
|
14
|
-
export * from "./packerActivityLog";
|
|
15
|
-
export * from "./containerRequestLog";
|
|
16
|
-
export * from "./manualItem";
|
|
17
|
-
export * from "./return";
|
|
18
|
-
export * from "./stock";
|
|
19
|
-
export * from "./specialProject";
|
|
20
|
-
export * from "./carrierTransferPallet";
|
|
21
|
-
export * from "./carrierTransferPackage";
|
|
22
|
-
export * from "./picksheet";
|
|
@@ -10,6 +10,11 @@ export enum LocationType {
|
|
|
10
10
|
PALLET_ZONE = "PALLET_ZONE",
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
export enum LocationStatus {
|
|
14
|
+
EMPTY = "EMPTY",
|
|
15
|
+
OCCUPIED = "OCCUPIED",
|
|
16
|
+
}
|
|
17
|
+
|
|
13
18
|
export interface Location {
|
|
14
19
|
code: string;
|
|
15
20
|
facility: FacilityCode;
|
|
@@ -17,4 +22,9 @@ export interface Location {
|
|
|
17
22
|
location_template_id: string;
|
|
18
23
|
location_template?: LocationTemplate;
|
|
19
24
|
location_items?: LocationItem[];
|
|
25
|
+
status: LocationStatus;
|
|
26
|
+
physical_previous_location?: string;
|
|
27
|
+
physical_next_location?: string;
|
|
28
|
+
logical_previous_location?: string;
|
|
29
|
+
logical_next_location?: string;
|
|
20
30
|
}
|
|
@@ -20,6 +20,7 @@ export enum OrganizationConfigKey {
|
|
|
20
20
|
GOOD_CONDITION_DAMAGED_PACKAGING_INSTRUCTION = "GOOD_CONDITION_DAMAGED_PACKAGING_INSTRUCTION",
|
|
21
21
|
RTS_INSTRUCTION = "RTS_INSTRUCTION",
|
|
22
22
|
ENABLE_SEND_EMAIL_TO_CUSTOMERS = "ENABLE_SEND_EMAIL_TO_CUSTOMERS",
|
|
23
|
+
DEFAULT_RATE_FETCHING_V1 = "DEFAULT_RATE_FETCHING_V1",
|
|
23
24
|
}
|
|
24
25
|
export interface OrganizationConfig {
|
|
25
26
|
id: string;
|
|
@@ -29,6 +30,7 @@ export interface OrganizationConfig {
|
|
|
29
30
|
organization?: Organization;
|
|
30
31
|
created_at: string;
|
|
31
32
|
updated_at: string;
|
|
33
|
+
metadata?: Record<string, any>;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
export interface FacilityOrganization {
|
|
@@ -7,10 +7,13 @@ export enum PackerActivityType {
|
|
|
7
7
|
export interface PackerActivityLog {
|
|
8
8
|
id: string;
|
|
9
9
|
user_email: string;
|
|
10
|
-
shipment_id
|
|
11
|
-
shipment_number
|
|
12
|
-
external_order_id
|
|
13
|
-
external_order_number
|
|
10
|
+
shipment_id?: string;
|
|
11
|
+
shipment_number?: string;
|
|
12
|
+
external_order_id?: string;
|
|
13
|
+
external_order_number?: string;
|
|
14
|
+
start_by_scanning?: string;
|
|
15
|
+
core_error_msg?: string;
|
|
14
16
|
created_at: string;
|
|
15
17
|
action: PackerActivityType;
|
|
18
|
+
provider_scope?: string;
|
|
16
19
|
}
|
|
@@ -29,6 +29,16 @@ export enum InflationStatus {
|
|
|
29
29
|
FAILED = "FAILED",
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
export enum PicksheetRequestType {
|
|
33
|
+
DISCRETE = "DISCRETE",
|
|
34
|
+
WAVE = "WAVE",
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export enum PicksheetType {
|
|
38
|
+
PARCEL = "PARCEL",
|
|
39
|
+
LAST_MILE = "LAST_MILE",
|
|
40
|
+
}
|
|
41
|
+
|
|
32
42
|
export type Picksheet = {
|
|
33
43
|
id: string;
|
|
34
44
|
request_id: string;
|
|
@@ -39,6 +49,25 @@ export type Picksheet = {
|
|
|
39
49
|
shipment_id?: string;
|
|
40
50
|
shipment_number?: string;
|
|
41
51
|
failed_reason?: string;
|
|
52
|
+
created_at: string;
|
|
53
|
+
updated_at: string;
|
|
54
|
+
wavesheet_id?: string;
|
|
55
|
+
request?: PicksheetRequest;
|
|
56
|
+
picksheet_items?: PicksheetItem[];
|
|
57
|
+
type: PicksheetType;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export type PicksheetItem = {
|
|
61
|
+
id: string;
|
|
62
|
+
picksheet_id: string;
|
|
63
|
+
picksheet: Picksheet;
|
|
64
|
+
sku: string;
|
|
65
|
+
upc: string;
|
|
66
|
+
name: string;
|
|
67
|
+
quantity: number;
|
|
68
|
+
picked_quantity: number;
|
|
69
|
+
manual_item_code?: string;
|
|
70
|
+
manual_item_customer_name?: string;
|
|
42
71
|
};
|
|
43
72
|
|
|
44
73
|
export type PicksheetRequest = {
|
|
@@ -47,9 +76,23 @@ export type PicksheetRequest = {
|
|
|
47
76
|
organization?: Organization;
|
|
48
77
|
facility: FacilityCode;
|
|
49
78
|
status: PicksheetStatus;
|
|
50
|
-
|
|
79
|
+
number_of_picksheets: number;
|
|
51
80
|
requested_by: string;
|
|
52
81
|
created_at: string;
|
|
53
82
|
updated_at: string;
|
|
83
|
+
type: PicksheetRequestType;
|
|
54
84
|
picksheets?: Picksheet[];
|
|
55
85
|
};
|
|
86
|
+
|
|
87
|
+
export type PicksheetLookupData = {
|
|
88
|
+
facility?: string;
|
|
89
|
+
picksheet_id?: string;
|
|
90
|
+
shipment_number?: string;
|
|
91
|
+
number_of_items?: number;
|
|
92
|
+
order_id?: string;
|
|
93
|
+
organization?: string;
|
|
94
|
+
created_at?: string;
|
|
95
|
+
shipment_id?: string;
|
|
96
|
+
external_order_number?: string;
|
|
97
|
+
external_order_id?: string;
|
|
98
|
+
};
|
package/src/warehouse/product.ts
CHANGED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Product } from "./product";
|
|
2
|
+
|
|
3
|
+
enum ProductQuantumTypeEnum {
|
|
4
|
+
EACH = "EACH",
|
|
5
|
+
CASE = "CASE",
|
|
6
|
+
INNER_PACK = "INNER_PACK",
|
|
7
|
+
MASTER_PACK = "MASTER_PACK",
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
enum ContainsTypeEnum {
|
|
11
|
+
EACH = "EACH",
|
|
12
|
+
INNER_PACK = "INNER_PACK",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
enum WeightUnitEnum {
|
|
16
|
+
LB = "LB",
|
|
17
|
+
OZ = "OZ",
|
|
18
|
+
G = "G",
|
|
19
|
+
KG = "KG",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
enum DimensionsUnitEnum {
|
|
23
|
+
IN = "IN",
|
|
24
|
+
FT = "FT",
|
|
25
|
+
CM = "CM",
|
|
26
|
+
M = "M",
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ProductQuantum {
|
|
30
|
+
id: string;
|
|
31
|
+
type: ProductQuantumTypeEnum;
|
|
32
|
+
quantity: number;
|
|
33
|
+
sku: string;
|
|
34
|
+
upc?: string;
|
|
35
|
+
contains_type: ContainsTypeEnum | null;
|
|
36
|
+
weight: number;
|
|
37
|
+
height: number;
|
|
38
|
+
length: number;
|
|
39
|
+
width: number;
|
|
40
|
+
weight_unit: WeightUnitEnum;
|
|
41
|
+
dimensions_unit: DimensionsUnitEnum;
|
|
42
|
+
product_id: string;
|
|
43
|
+
product: Product;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface ProductQuantumUpdateBody {
|
|
47
|
+
type: ProductQuantumTypeEnum;
|
|
48
|
+
contains_type: ContainsTypeEnum;
|
|
49
|
+
quantity: number;
|
|
50
|
+
sku: string;
|
|
51
|
+
upc: string;
|
|
52
|
+
length: number;
|
|
53
|
+
height: number;
|
|
54
|
+
weight: number;
|
|
55
|
+
width: number;
|
|
56
|
+
dimensions_unit: DimensionsUnitEnum;
|
|
57
|
+
weight_unit: WeightUnitEnum;
|
|
58
|
+
product_id: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface CreateProductQuantumBody {
|
|
62
|
+
type: ProductQuantumTypeEnum;
|
|
63
|
+
upc: string;
|
|
64
|
+
sku: string;
|
|
65
|
+
product_id: string;
|
|
66
|
+
contains_type: ProductQuantumTypeEnum;
|
|
67
|
+
quantity: number;
|
|
68
|
+
weight: number;
|
|
69
|
+
weight_unit: WeightUnitEnum;
|
|
70
|
+
height: number;
|
|
71
|
+
width: number;
|
|
72
|
+
length: number;
|
|
73
|
+
dimensions_unit: DimensionsUnitEnum;
|
|
74
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Product } from "./product";
|
|
2
|
+
|
|
3
|
+
export enum PutawayActivityLogType {
|
|
4
|
+
START = "START",
|
|
5
|
+
PUTAWAY = "PUTAWAY",
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface PutawayActivityLog {
|
|
9
|
+
id: string;
|
|
10
|
+
action: PutawayActivityLogType;
|
|
11
|
+
from_container_id?: string;
|
|
12
|
+
to_container_id?: string;
|
|
13
|
+
user_email: string;
|
|
14
|
+
location_code?: string;
|
|
15
|
+
reference_number?: string;
|
|
16
|
+
product?: string;
|
|
17
|
+
created_at?: string;
|
|
18
|
+
}
|