@secondcloset/types 2.8.0-beta-locationItemStatus-0 → 2.8.0-beta.2

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.
Files changed (36) hide show
  1. package/package.json +2 -2
  2. package/src/_common/facility.ts +40 -16
  3. package/src/_common/index.ts +2 -1
  4. package/src/_common/organization.ts +8 -18
  5. package/src/_common/serviceArea.ts +9 -1
  6. package/src/_common/user.ts +1 -0
  7. package/src/fulfillment/appointment/appointment.ts +4 -0
  8. package/src/fulfillment/appointment/appointmentType.ts +2 -0
  9. package/src/fulfillment/asn/asn.ts +1 -0
  10. package/src/fulfillment/index.ts +1 -0
  11. package/src/fulfillment/order/order.ts +42 -39
  12. package/src/fulfillment/order/orderItem.ts +30 -14
  13. package/src/fulfillment/product/product.ts +10 -13
  14. package/src/fulfillment/returns/configs.ts +32 -0
  15. package/src/fulfillment/returns/index.ts +1 -0
  16. package/src/fulfillment/shipment/shipment.ts +54 -34
  17. package/src/fulfillment/shipment/shipmentItem.ts +46 -39
  18. package/src/fulfillment/shipment/shippingMethod.ts +4 -0
  19. package/src/logistics/availability.ts +5 -1
  20. package/src/logistics/index.ts +2 -1
  21. package/src/logistics/serviceArea.ts +14 -0
  22. package/src/storage/appointment/appointment.ts +4 -0
  23. package/src/storage/appointment/appointmentType.ts +2 -0
  24. package/src/warehouse/asnContainer.ts +8 -0
  25. package/src/warehouse/carrierTransferPackage.ts +2 -2
  26. package/src/warehouse/index.ts +14 -10
  27. package/src/warehouse/location.ts +10 -0
  28. package/src/warehouse/locationActivityLog.ts +1 -0
  29. package/src/warehouse/locationItem.ts +4 -0
  30. package/src/warehouse/occupiedLocation.ts +5 -0
  31. package/src/warehouse/organization.ts +2 -0
  32. package/src/warehouse/packerActivityLog.ts +7 -4
  33. package/src/warehouse/picksheet.ts +44 -1
  34. package/src/warehouse/product.ts +3 -0
  35. package/src/warehouse/productQuantum.ts +74 -0
  36. 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-locationItemStatus-0",
3
+ "version": "2.8.0-beta.2",
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": "^3.9.5"
22
+ "typescript": "^4.6.3"
23
23
  }
24
24
  }
@@ -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 interface Facility {
30
- id: number;
31
- name: FacilityCode;
32
- phone: string;
33
- email: string;
34
- address: {
35
- table: {
36
- street: string;
37
- city: FacilityCity;
38
- province: string;
39
- country: string;
40
- postal_code: string;
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
- }
@@ -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 { ServiceArea } from "./serviceArea";
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
  }
@@ -1 +1,9 @@
1
- export type ServiceArea = "yyz" | "yvr" | "yow" | "yul" | "lax";
1
+ export type ServiceArea =
2
+ | "yyz"
3
+ | "yvr"
4
+ | "yow"
5
+ | "yul"
6
+ | "lax"
7
+ | "nyc"
8
+ | "mia"
9
+ | "hou";
@@ -19,6 +19,7 @@ export interface User extends BaseUser {
19
19
  orders: number;
20
20
  organization_id: string;
21
21
  organization_role: string;
22
+ organization_role_id: string;
22
23
  payment_issue: boolean | null;
23
24
  stripe_customer_id: string;
24
25
  subrole: string;
@@ -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 {
@@ -9,3 +9,5 @@ export type AppointmentType =
9
9
  export type AppointmentSubtype = "mid_mile_pick_up" | "mid_mile_drop_off";
10
10
 
11
11
  export type DeliveryType = "heavy" | "parcel";
12
+
13
+ export type ParcelServiceLevel = "same_day" | "next_day" | null;
@@ -65,4 +65,5 @@ export interface ASN {
65
65
  deleted_at?: string;
66
66
  items_attributes: ASNItem[];
67
67
  timeline?: TimelineEvent[];
68
+ organization_id?: string;
68
69
  }
@@ -5,3 +5,4 @@ export * from "./appointment";
5
5
  export * from "./warehouseReceivingOrder";
6
6
  export * from "./asn";
7
7
  export * from "./resourceError";
8
+ export * from "./returns";
@@ -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 Address extends BaseAddress {
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 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: Address;
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
- }
44
+ export type Order<V extends Version = "V1"> = 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<V>[];
71
+ items: OrderItem<V>[];
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 { Product } from "../product";
1
+ import { Version } from "../../_common";
2
+ import { BaseProduct, Product } from "../product";
2
3
  import { ShipmentActionType } from "../shipment";
3
4
 
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
- }
5
+ export type OrderItem<V extends Version = "V1"> = 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
- organization_id: string;
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: "base" | "kit";
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 { BaseUser, BaseNote, BaseOrganization, Facility } from "../../_common";
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 interface Shipment {
27
- id: string;
28
- organization_id: string;
29
- organization?: BaseOrganization;
30
- billed: boolean;
31
- user: BaseUser;
32
- notes: BaseNote[] | string;
33
- shipment_items: ShipmentItem[];
34
- shipment_number: string;
35
- packages: Package[];
36
- external_order_id: string | null;
37
- external_order_type: string;
38
- external_shipment_id: string | null;
39
- carrier: Carrier | null;
40
- created_at: string;
41
- updated_at: string;
42
- action_summary: ShipmentActionType[];
43
- freight: boolean;
44
- shipping_method: SecondClosetShippingMethod | ExternalCarrierShippingMethod;
45
- shipping_method_type:
46
- | "external_carrier_shipment"
47
- | "appointment"
48
- | "untracked_shipment";
49
- external_order?: {
50
- id: string;
51
- external_order_number: string;
52
- external_order_id: string | null;
53
- created_at: string;
54
- updated_at: string;
55
- };
56
- facility?: Partial<Facility>;
57
- }
42
+ export type Shipment<V extends Version = "V1"> = 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<V>[];
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 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;
4
+ export type ShipmentItem<V extends Version = "V1"> = 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
- shipment_actions_status?: {
25
- [key in ShipmentActionType]: {
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 = "white_glove" | "non_white_glove" | "all_service_levels";
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;
@@ -1,2 +1,3 @@
1
1
  export * from "./shippingRate";
2
- export * from "./availability"
2
+ export * from "./availability";
3
+ export * from "./serviceArea";
@@ -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 =
@@ -10,3 +10,5 @@ export type AppointmentType =
10
10
  export type AppointmentSubtype = "mid_mile_pick_up" | "mid_mile_drop_off";
11
11
 
12
12
  export type DeliveryType = "heavy" | "parcel";
13
+
14
+ export type ParcelServiceLevel = "same_day" | "next_day" | null;
@@ -0,0 +1,8 @@
1
+ export type ASNContainer = {
2
+ id: string;
3
+ asn_number: string;
4
+ container_id: string;
5
+ quantity: number;
6
+ product_id: string;
7
+ created_at: string;
8
+ };
@@ -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
+ }
@@ -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
  }
@@ -22,4 +22,5 @@ export interface LocationActivityLog {
22
22
  user_email: string;
23
23
  action: LocationActivityType;
24
24
  product?: Product;
25
+ reference_number?: string;
25
26
  }
@@ -27,3 +27,7 @@ export interface LocationItem {
27
27
  updated_at: string;
28
28
  status: LocationItemStatus;
29
29
  }
30
+
31
+ export interface ItemMoveLocationValidation {
32
+ multiple_bins: boolean;
33
+ }
@@ -0,0 +1,5 @@
1
+ export interface OccupiedLocation {
2
+ id: string;
3
+ location_item_id: string;
4
+ location_code: string;
5
+ }
@@ -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: string;
11
- shipment_number: string;
12
- external_order_id: string;
13
- external_order_number: string;
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
- number_of_orders: number;
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
+ };
@@ -11,4 +11,7 @@ export interface Product {
11
11
  organization?: Organization;
12
12
  location_item?: LocationItem;
13
13
  location_activity_log?: LocationActivityLog;
14
+ profiled: boolean;
15
+ created_at: string;
16
+ updated_at: string;
14
17
  }
@@ -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
+ }