@secondcloset/types 2.8.0-beta.0 → 2.8.0-beta.1-yyc-atl
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 +1 -1
- package/src/_common/facility.ts +7 -1
- package/src/_common/serviceArea.ts +3 -1
- package/src/fulfillment/order/order.ts +38 -41
- package/src/fulfillment/order/orderItem.ts +14 -30
- package/src/fulfillment/product/product.ts +13 -10
- package/src/fulfillment/shipment/shipment.ts +33 -43
- package/src/fulfillment/shipment/shipmentItem.ts +39 -46
- package/src/warehouse/carrierTransferPackage.ts +2 -2
- package/src/warehouse/organization.ts +1 -0
package/package.json
CHANGED
package/src/_common/facility.ts
CHANGED
|
@@ -17,6 +17,9 @@ export type FacilityCode =
|
|
|
17
17
|
| "nyc1"
|
|
18
18
|
| "mia1"
|
|
19
19
|
| "hou1"
|
|
20
|
+
| "yyc1"
|
|
21
|
+
| "atl1"
|
|
22
|
+
| "atl2"
|
|
20
23
|
| "unknown";
|
|
21
24
|
|
|
22
25
|
export type DeprecatedFacilityCode = "yyz1" | "yyz2";
|
|
@@ -32,7 +35,10 @@ export type FacilityCity =
|
|
|
32
35
|
| "Santa Fe Springs"
|
|
33
36
|
| "Carlstadt"
|
|
34
37
|
| "Medley"
|
|
35
|
-
| "Houston"
|
|
38
|
+
| "Houston"
|
|
39
|
+
| "Tucker"
|
|
40
|
+
| "Newnan"
|
|
41
|
+
| "Calgary";
|
|
36
42
|
|
|
37
43
|
export type Facility<V = Version> = V extends "V1"
|
|
38
44
|
? {
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
BaseUser,
|
|
7
7
|
Organization,
|
|
8
8
|
File,
|
|
9
|
-
Version,
|
|
10
9
|
} from "../../_common";
|
|
11
10
|
import { OrderItem } from "./orderItem";
|
|
12
11
|
|
|
@@ -41,43 +40,41 @@ export interface FulfillmentOrderAddress extends BaseAddress {
|
|
|
41
40
|
updated_at: string;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
export
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
: Omit<Order<"V1">, "items" | "shipments">;
|
|
43
|
+
export interface Order {
|
|
44
|
+
id: string;
|
|
45
|
+
order_id: string;
|
|
46
|
+
external_order_number: string;
|
|
47
|
+
external_order_id: string | null;
|
|
48
|
+
notes: string;
|
|
49
|
+
internal_notes?: string;
|
|
50
|
+
platform: OrderPlatform;
|
|
51
|
+
external_platform_version: number | null;
|
|
52
|
+
parcel_type: string;
|
|
53
|
+
cancelled: boolean;
|
|
54
|
+
fulfilled_from: FacilityCode;
|
|
55
|
+
client_type: string | null;
|
|
56
|
+
insurance_value: number;
|
|
57
|
+
shipping_service: string | null;
|
|
58
|
+
signature_required?: boolean;
|
|
59
|
+
customer: Customer;
|
|
60
|
+
address: FulfillmentOrderAddress;
|
|
61
|
+
created_at: string;
|
|
62
|
+
updated_at: string;
|
|
63
|
+
organization: Organization;
|
|
64
|
+
overdue: boolean;
|
|
65
|
+
user: BaseUser;
|
|
66
|
+
status?: string;
|
|
67
|
+
shipment_tags: ShipmentTag[];
|
|
68
|
+
shipments: Shipment[];
|
|
69
|
+
items: OrderItem[];
|
|
70
|
+
files: File[];
|
|
71
|
+
stock_status:
|
|
72
|
+
| "in_stock"
|
|
73
|
+
| "partially_in_stock"
|
|
74
|
+
| "out_of_stock"
|
|
75
|
+
| "unknown_stock";
|
|
76
|
+
on_hold: boolean;
|
|
77
|
+
on_hold_at: string;
|
|
78
|
+
selected_service_code?: ScServiceCode;
|
|
79
|
+
has_errors: boolean;
|
|
80
|
+
}
|
|
@@ -1,32 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BaseProduct, Product } from "../product";
|
|
1
|
+
import { Product } from "../product";
|
|
3
2
|
import { ShipmentActionType } from "../shipment";
|
|
4
3
|
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
};
|
|
4
|
+
export interface OrderItem {
|
|
5
|
+
id: string;
|
|
6
|
+
product: Product;
|
|
7
|
+
quantity: number;
|
|
8
|
+
attributes: string[];
|
|
9
|
+
return_reasons: string[];
|
|
10
|
+
available_actions: ShipmentActionType[];
|
|
11
|
+
actions_history: ShipmentActionType[];
|
|
12
|
+
virtual_kit_id: null | string;
|
|
13
|
+
available_quantity: number;
|
|
14
|
+
removed: boolean;
|
|
15
|
+
removed_reason: string;
|
|
16
|
+
}
|
|
@@ -3,15 +3,11 @@ import { BaseImage } from "../../_common";
|
|
|
3
3
|
|
|
4
4
|
export interface BaseProduct {
|
|
5
5
|
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
sku: string;
|
|
8
|
-
scid: string;
|
|
9
|
-
type: "base" | "kit";
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface Product extends Omit<BaseProduct, "type"> {
|
|
13
6
|
organization_id: string;
|
|
7
|
+
scid: string;
|
|
8
|
+
sku: string;
|
|
14
9
|
upc: string;
|
|
10
|
+
name: string;
|
|
15
11
|
description: string;
|
|
16
12
|
platform: string;
|
|
17
13
|
active: boolean;
|
|
@@ -36,7 +32,7 @@ export interface Product extends Omit<BaseProduct, "type"> {
|
|
|
36
32
|
customs_description: string | null;
|
|
37
33
|
images: BaseImage[];
|
|
38
34
|
packaging_criteria: string;
|
|
39
|
-
product_type:
|
|
35
|
+
product_type: "base" | "kit";
|
|
40
36
|
stocks?: Stock[];
|
|
41
37
|
deleted_at: string;
|
|
42
38
|
created_at: string;
|
|
@@ -60,14 +56,21 @@ export interface Product extends Omit<BaseProduct, "type"> {
|
|
|
60
56
|
insurance_value: number | null;
|
|
61
57
|
has_errors: boolean;
|
|
62
58
|
under_conversion: boolean;
|
|
63
|
-
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface Product extends BaseProduct {
|
|
62
|
+
base_products?: BaseProduct[];
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
export interface PackagingLevel {
|
|
67
66
|
id?: string;
|
|
68
67
|
product_id?: string;
|
|
69
|
-
product:
|
|
68
|
+
product: {
|
|
69
|
+
id: string;
|
|
70
|
+
sku: string;
|
|
70
71
|
upc: string;
|
|
72
|
+
scid: string;
|
|
73
|
+
name: string;
|
|
71
74
|
tracks_lot_numbers: boolean;
|
|
72
75
|
};
|
|
73
76
|
level: "single_item" | "inner_pack" | "master_pack" | "pallet";
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { ShipmentItem } from "./shipmentItem";
|
|
2
|
-
import {
|
|
3
|
-
BaseUser,
|
|
4
|
-
BaseNote,
|
|
5
|
-
BaseOrganization,
|
|
6
|
-
Facility,
|
|
7
|
-
Version,
|
|
8
|
-
} from "../../_common";
|
|
2
|
+
import { BaseUser, BaseNote, BaseOrganization, Facility } from "../../_common";
|
|
9
3
|
import { Package } from "./package";
|
|
10
4
|
import {
|
|
11
5
|
SecondClosetShippingMethod,
|
|
@@ -39,39 +33,35 @@ export type ScServiceCode =
|
|
|
39
33
|
| "second_closet_to_the_door_1_person"
|
|
40
34
|
| ServiceCode;
|
|
41
35
|
|
|
42
|
-
export
|
|
43
|
-
|
|
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
|
-
facility?: Partial<Facility>;
|
|
76
|
-
}
|
|
77
|
-
: Omit<Shipment<"V1">, "shipment_items">;
|
|
36
|
+
export interface Shipment {
|
|
37
|
+
id: string;
|
|
38
|
+
organization_id: string;
|
|
39
|
+
organization?: BaseOrganization;
|
|
40
|
+
billed: boolean;
|
|
41
|
+
user: BaseUser;
|
|
42
|
+
notes: BaseNote[] | string;
|
|
43
|
+
shipment_items: ShipmentItem[];
|
|
44
|
+
shipment_number: string;
|
|
45
|
+
packages: Package[];
|
|
46
|
+
external_order_id: string | null;
|
|
47
|
+
external_order_type: string;
|
|
48
|
+
external_shipment_id: string | null;
|
|
49
|
+
carrier: Carrier | null;
|
|
50
|
+
created_at: string;
|
|
51
|
+
updated_at: string;
|
|
52
|
+
action_summary: ShipmentActionType[];
|
|
53
|
+
freight: boolean;
|
|
54
|
+
shipping_method: SecondClosetShippingMethod | ExternalCarrierShippingMethod;
|
|
55
|
+
shipping_method_type:
|
|
56
|
+
| "external_carrier_shipment"
|
|
57
|
+
| "appointment"
|
|
58
|
+
| "untracked_shipment";
|
|
59
|
+
external_order?: {
|
|
60
|
+
id: string;
|
|
61
|
+
external_order_number: string;
|
|
62
|
+
external_order_id: string | null;
|
|
63
|
+
created_at: string;
|
|
64
|
+
updated_at: string;
|
|
65
|
+
};
|
|
66
|
+
facility?: Partial<Facility>;
|
|
67
|
+
}
|
|
@@ -1,49 +1,42 @@
|
|
|
1
|
-
import { Version } from "../../_common";
|
|
2
|
-
import { BaseProduct } from "../product";
|
|
3
1
|
import { ShipmentActionType } from "./shipment";
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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;
|
|
2
|
+
export interface ShipmentItem {
|
|
3
|
+
id: string;
|
|
4
|
+
order_item_id: string;
|
|
5
|
+
description: string;
|
|
6
|
+
item_identifier: string;
|
|
7
|
+
item_identifier_type: string;
|
|
8
|
+
item_identifier_value: string;
|
|
9
|
+
product_id?: string;
|
|
10
|
+
weight_value: string;
|
|
11
|
+
weight_unit: string;
|
|
12
|
+
length_value: string;
|
|
13
|
+
length_unit: string;
|
|
14
|
+
height_value: string;
|
|
15
|
+
height_unit: string;
|
|
16
|
+
width_value: string;
|
|
17
|
+
width_unit: string;
|
|
18
|
+
shipment_actions: ShipmentActionType[];
|
|
19
|
+
shipment_actions_completion: Partial<
|
|
20
|
+
{
|
|
21
|
+
[key in ShipmentActionType]: boolean;
|
|
45
22
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
23
|
+
>;
|
|
24
|
+
shipment_actions_status?: {
|
|
25
|
+
[key in ShipmentActionType]: {
|
|
26
|
+
completed: boolean;
|
|
27
|
+
failed: boolean;
|
|
28
|
+
failed_reason: string | null;
|
|
49
29
|
};
|
|
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
|
+
}
|
|
@@ -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> {
|
|
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
|
+
}
|
|
@@ -21,6 +21,7 @@ export enum OrganizationConfigKey {
|
|
|
21
21
|
RTS_INSTRUCTION = "RTS_INSTRUCTION",
|
|
22
22
|
ENABLE_SEND_EMAIL_TO_CUSTOMERS = "ENABLE_SEND_EMAIL_TO_CUSTOMERS",
|
|
23
23
|
DEFAULT_RATE_FETCHING_V1 = "DEFAULT_RATE_FETCHING_V1",
|
|
24
|
+
DEFAULT_REQUIRE_SIGNATURE = "DEFAULT_REQUIRE_SIGNATURE",
|
|
24
25
|
}
|
|
25
26
|
export interface OrganizationConfig {
|
|
26
27
|
id: string;
|