@secondcloset/types 2.8.0-beta.2 → 2.8.0-beta.5
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 +3 -1
- package/src/fulfillment/order/orderItem.ts +2 -0
- package/src/fulfillment/product/product.ts +3 -3
- package/src/fulfillment/shipment/shipment.ts +6 -2
- package/src/fulfillment/shipment/shippingMethod.ts +10 -0
- package/src/warehouse/index.ts +1 -0
- package/src/warehouse/locationItem.ts +3 -2
- package/src/warehouse/organization.ts +1 -0
- package/src/warehouse/return.ts +3 -0
- package/src/warehouse/rmaContainer.ts +9 -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
|
? {
|
|
@@ -20,7 +20,9 @@ export type ShipmentTag =
|
|
|
20
20
|
| "items_removed"
|
|
21
21
|
| "pending_inventory_receiving"
|
|
22
22
|
| "items_partially_fulfilled"
|
|
23
|
-
| "customer_booking"
|
|
23
|
+
| "customer_booking"
|
|
24
|
+
| "pending_customer_pickup"
|
|
25
|
+
| "items_picked_up_by_customer";
|
|
24
26
|
|
|
25
27
|
export type OrderPlatform =
|
|
26
28
|
| "manual"
|
|
@@ -19,6 +19,8 @@ export type OrderItem<V extends Version = "V1"> = V extends "V1"
|
|
|
19
19
|
: {
|
|
20
20
|
product: BaseProduct & {
|
|
21
21
|
available_quantity: OrderItem<"V1">["available_quantity"];
|
|
22
|
+
base_products?: OrderItem<"V2">["product"][];
|
|
23
|
+
required_parts?: Record<string, number>;
|
|
22
24
|
};
|
|
23
25
|
available_actions: {
|
|
24
26
|
inventory_pick_up_item_ids: OrderItem<"V1">["id"][];
|
|
@@ -3,18 +3,18 @@ import { BaseImage } from "../../_common";
|
|
|
3
3
|
|
|
4
4
|
export interface BaseProduct {
|
|
5
5
|
id: string;
|
|
6
|
+
scid: string;
|
|
6
7
|
name: string;
|
|
7
8
|
sku: string;
|
|
8
|
-
|
|
9
|
+
upc: string;
|
|
9
10
|
type: "base" | "kit";
|
|
11
|
+
active: boolean;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export interface Product extends Omit<BaseProduct, "type"> {
|
|
13
15
|
organization_id: string;
|
|
14
|
-
upc: string;
|
|
15
16
|
description: string;
|
|
16
17
|
platform: string;
|
|
17
|
-
active: boolean;
|
|
18
18
|
fragile: boolean;
|
|
19
19
|
dangerous: boolean;
|
|
20
20
|
liquid: boolean;
|
|
@@ -10,6 +10,7 @@ import { Package } from "./package";
|
|
|
10
10
|
import {
|
|
11
11
|
SecondClosetShippingMethod,
|
|
12
12
|
ExternalCarrierShippingMethod,
|
|
13
|
+
CustomerPickupShippingMethod,
|
|
13
14
|
} from "./shippingMethod";
|
|
14
15
|
import { Carrier } from "./carrier";
|
|
15
16
|
import { AppointmentType as FulfillmentAppointmentType } from "../appointment/appointmentType";
|
|
@@ -17,6 +18,7 @@ import { AppointmentType as StorageAppointmentType } from "../../storage/appoint
|
|
|
17
18
|
|
|
18
19
|
export type ShipmentActionType =
|
|
19
20
|
| "setup"
|
|
21
|
+
| "customer_pickup"
|
|
20
22
|
| StorageAppointmentType
|
|
21
23
|
| FulfillmentAppointmentType;
|
|
22
24
|
|
|
@@ -60,11 +62,13 @@ export type Shipment<V extends Version = "V1"> = V extends "V1"
|
|
|
60
62
|
freight: boolean;
|
|
61
63
|
shipping_method:
|
|
62
64
|
| SecondClosetShippingMethod
|
|
63
|
-
| ExternalCarrierShippingMethod
|
|
65
|
+
| ExternalCarrierShippingMethod
|
|
66
|
+
| CustomerPickupShippingMethod;
|
|
64
67
|
shipping_method_type:
|
|
65
68
|
| "external_carrier_shipment"
|
|
66
69
|
| "appointment"
|
|
67
|
-
| "untracked_shipment"
|
|
70
|
+
| "untracked_shipment"
|
|
71
|
+
| "customer_pickup_shipment";
|
|
68
72
|
external_order?: {
|
|
69
73
|
id: string;
|
|
70
74
|
external_order_number: string;
|
|
@@ -153,3 +153,13 @@ export interface ExternalCarrierShippingMethod {
|
|
|
153
153
|
ship_to_address: CarrierShippingAddress;
|
|
154
154
|
shipping_labels: ExternalCarrierShippingLabel[];
|
|
155
155
|
}
|
|
156
|
+
|
|
157
|
+
export interface CustomerPickupShippingMethod {
|
|
158
|
+
id: string;
|
|
159
|
+
status: "awaiting" | "failed" | "cancelled" | "completed";
|
|
160
|
+
created_at: string;
|
|
161
|
+
completed_at?: string;
|
|
162
|
+
failed_at?: string;
|
|
163
|
+
failed_reason?: string;
|
|
164
|
+
estimated_pickup_date?: string;
|
|
165
|
+
}
|
package/src/warehouse/index.ts
CHANGED
|
@@ -5,8 +5,9 @@ import { Bin } from "./bin";
|
|
|
5
5
|
import { ManualItem } from "./manualItem";
|
|
6
6
|
|
|
7
7
|
export enum LocationItemStatus {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
AVAILABLE = "available",
|
|
9
|
+
DAMAGED = "damaged",
|
|
10
|
+
HOLD = "hold",
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
export interface LocationItem {
|
|
@@ -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;
|
package/src/warehouse/return.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Organization } from "./organization";
|
|
2
|
+
import { RmaContainer } from "./rmaContainer";
|
|
2
3
|
|
|
3
4
|
export enum ReturnItemCondition {
|
|
4
5
|
RESELLABLE = "resellable",
|
|
@@ -39,6 +40,8 @@ export interface ReturnItem {
|
|
|
39
40
|
condition_notes?: string;
|
|
40
41
|
reason?: string;
|
|
41
42
|
reason_notes?: string;
|
|
43
|
+
rma_container_id?: string;
|
|
44
|
+
rma_container?: RmaContainer;
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
export interface ReturnAddress {
|