@secondcloset/types 1.8.3 → 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.
Files changed (66) hide show
  1. package/package.json +2 -2
  2. package/src/_common/activityHistory.ts +22 -0
  3. package/src/_common/address.ts +2 -0
  4. package/src/_common/facility.ts +47 -16
  5. package/src/_common/index.ts +2 -0
  6. package/src/_common/organization.ts +36 -7
  7. package/src/_common/serviceArea.ts +9 -1
  8. package/src/_common/user.ts +1 -0
  9. package/src/fulfillment/appointment/appointment.ts +28 -3
  10. package/src/fulfillment/appointment/appointmentStatus.ts +1 -0
  11. package/src/fulfillment/appointment/appointmentType.ts +4 -0
  12. package/src/fulfillment/asn/asn.ts +1 -0
  13. package/src/fulfillment/asn/asnItem.ts +1 -0
  14. package/src/fulfillment/index.ts +1 -0
  15. package/src/fulfillment/order/order.ts +8 -3
  16. package/src/fulfillment/product/index.ts +2 -1
  17. package/src/fulfillment/product/product.ts +6 -0
  18. package/src/fulfillment/resourceError/index.ts +2 -0
  19. package/src/fulfillment/resourceError/resourceError.ts +20 -0
  20. package/src/fulfillment/resourceError/resourceErrorAssignee.ts +9 -0
  21. package/src/fulfillment/shipment/index.ts +1 -0
  22. package/src/fulfillment/shipment/package.ts +12 -1
  23. package/src/fulfillment/shipment/packageIssue.ts +11 -0
  24. package/src/fulfillment/shipment/shipment.ts +3 -1
  25. package/src/fulfillment/shipment/shipmentItem.ts +1 -0
  26. package/src/fulfillment/shipment/shippingMethod.ts +22 -1
  27. package/src/index.ts +1 -0
  28. package/src/integrations/index.ts +1 -0
  29. package/src/integrations/shopify.ts +7 -0
  30. package/src/logistics/availability.ts +13 -1
  31. package/src/logistics/index.ts +2 -1
  32. package/src/logistics/serviceArea.ts +14 -0
  33. package/src/logistics/shippingRate.ts +2 -0
  34. package/src/storage/appointment/appointment.ts +9 -3
  35. package/src/storage/appointment/appointmentType.ts +4 -0
  36. package/src/storage/availability.ts +3 -1
  37. package/src/warehouse/asnProcessLog.ts +15 -0
  38. package/src/warehouse/bin.ts +9 -0
  39. package/src/warehouse/carrierTransferPackage.ts +65 -0
  40. package/src/warehouse/carrierTransferPallet.ts +12 -0
  41. package/src/warehouse/containerRequestLog.ts +31 -0
  42. package/src/warehouse/index.ts +23 -4
  43. package/src/warehouse/location.ts +24 -26
  44. package/src/warehouse/locationActivityLog.ts +26 -0
  45. package/src/warehouse/locationItem.ts +33 -0
  46. package/src/warehouse/locationTemplate.ts +8 -0
  47. package/src/warehouse/manualItem.ts +21 -0
  48. package/src/warehouse/occupiedLocation.ts +5 -0
  49. package/src/warehouse/organization.ts +39 -0
  50. package/src/warehouse/packerActivityLog.ts +16 -0
  51. package/src/warehouse/pallet.ts +9 -15
  52. package/src/warehouse/picksheet.ts +98 -0
  53. package/src/warehouse/product.ts +17 -0
  54. package/src/warehouse/productQuantum.ts +79 -0
  55. package/src/warehouse/putawayActivityLog.ts +18 -0
  56. package/src/warehouse/return.ts +78 -0
  57. package/src/warehouse/shipmentProductsTracking.ts +18 -0
  58. package/src/warehouse/specialProject.ts +47 -0
  59. package/src/warehouse/stock.ts +7 -0
  60. package/src/warehouse/supply.ts +42 -0
  61. package/src/warehouse/supplyStock.ts +10 -0
  62. package/src/warehouse/supplyTransaction.ts +14 -0
  63. package/src/warehouse/issue.ts +0 -7
  64. package/src/warehouse/task.ts +0 -22
  65. package/src/warehouse/taskDefinition.ts +0 -13
  66. package/src/warehouse/warehouseItem.ts +0 -28
@@ -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
+ }
@@ -0,0 +1,78 @@
1
+ import { Organization } from "./organization";
2
+
3
+ export enum ReturnItemCondition {
4
+ RESELLABLE = "resellable",
5
+ UNSELLABLE = "unsellable",
6
+ OTHER = "other",
7
+ }
8
+
9
+ export enum ReturnType {
10
+ RTS = "RTS",
11
+ REGULAR = "REGULAR",
12
+ }
13
+
14
+ export enum ReturnStatus {
15
+ READY_TO_PROCESS = "READY_TO_PROCESS",
16
+ NEEDS_REVIEW = "NEEDS_REVIEW",
17
+ ARRIVED = "ARRIVED",
18
+ PROCESSING = "PROCESSING",
19
+ REQUESTED = "REQUESTED",
20
+ ON_HOLD = "ON_HOLD",
21
+ COMPLETED = "COMPLETED",
22
+ CANCELLED = "CANCELLED",
23
+ TO_BE_RESHIPPED = "TO_BE_RESHIPPED",
24
+ }
25
+
26
+ export interface ReturnPhoto {
27
+ id: string;
28
+ return_id?: string;
29
+ photo_link: string;
30
+ }
31
+
32
+ export interface ReturnItem {
33
+ id: string;
34
+ name: string;
35
+ external_product_id: string;
36
+ sku?: string;
37
+ upc?: string;
38
+ condition?: string;
39
+ condition_notes?: string;
40
+ reason?: string;
41
+ reason_notes?: string;
42
+ }
43
+
44
+ export interface ReturnAddress {
45
+ name: string;
46
+ phone_number: string;
47
+ address_1: string;
48
+ address_2?: string;
49
+ city: string;
50
+ province: string;
51
+ postal_code: string;
52
+ country: string;
53
+ }
54
+
55
+ export interface Return {
56
+ id: string;
57
+ rma?: string;
58
+ tracking_number?: string;
59
+ tracking_url?: string;
60
+ label_url?: string;
61
+ carrier_logo_url?: string;
62
+ external_order_number: string;
63
+ reship_external_order_number?: string;
64
+ status: ReturnStatus;
65
+ type: ReturnType;
66
+ shipping_from?: ReturnAddress;
67
+ carrier?: string;
68
+ organization: Organization;
69
+ photos?: ReturnPhoto[];
70
+ return_items?: ReturnItem[];
71
+ reason?: string;
72
+ reason_notes?: string;
73
+ external_notes?: string;
74
+ internal_notes?: string;
75
+ order_date?: string;
76
+ created_at: string;
77
+ updated_at: string;
78
+ }
@@ -0,0 +1,18 @@
1
+ import { Organization } from "./organization";
2
+
3
+ export interface ShipmentProductsTracking {
4
+ id: string;
5
+ external_shipment_id: string;
6
+ external_order_id: string;
7
+ external_product_id: string;
8
+ lot_number: string;
9
+ serial_number: string;
10
+ product_name?: string;
11
+ product_sku?: string;
12
+ product_upc?: string;
13
+ quantity: number;
14
+ organization_id: string;
15
+ organization?: Organization;
16
+ created_at: string;
17
+ user_email: string;
18
+ }
@@ -0,0 +1,47 @@
1
+ import { Organization } from "./organization";
2
+ import { FacilityCode } from "../_common";
3
+ import { Supply } from ".";
4
+
5
+ export enum SpecialProjectType {
6
+ RECEIVING_SUPPORT = "RECEIVING_SUPPORT",
7
+ INSPECTIONS = "INSPECTIONS",
8
+ KITTING = "KITTING",
9
+ PRODUCT_ADJUSTMENT = "PRODUCT_ADJUSTMENT",
10
+ LABELLING = "LABELLING",
11
+ INVENTORY_COUNT = "INVENTORY_COUNT",
12
+ OTHER = "OTHER",
13
+ }
14
+
15
+ export interface SpecialProjectSupply {
16
+ id: string;
17
+ quantity: number;
18
+ created_at: string;
19
+ special_project_id: string;
20
+ supply_id: string;
21
+ supply: Supply;
22
+ }
23
+
24
+ export interface SpecialProject {
25
+ id: string;
26
+ organization_id: string;
27
+ organization?: Organization;
28
+ user_names: string;
29
+ start_time: string;
30
+ end_time: string;
31
+ type: SpecialProjectType;
32
+ facility: FacilityCode;
33
+ details?: string;
34
+ reference_number?: string;
35
+ created_at: string;
36
+ updated_at: string;
37
+ special_project_supplies?: SpecialProjectSupply[];
38
+ }
39
+
40
+ export interface SpecialProjectLog {
41
+ id: string;
42
+ user_email: string;
43
+ before?: string;
44
+ after: string;
45
+ special_project_id: string;
46
+ created_at: string;
47
+ }
@@ -0,0 +1,7 @@
1
+ import { Product } from "./product";
2
+ import { FacilityCode } from "../_common";
3
+ export interface Stock {
4
+ on_hand_quantity: number;
5
+ product: Product;
6
+ facility: FacilityCode;
7
+ }
@@ -0,0 +1,42 @@
1
+ import { Organization } from "./organization";
2
+ import { SupplyStock } from "./supplyStock";
3
+ import { SupplyTransaction } from "./supplyTransaction";
4
+
5
+ export enum DimensionUnitType {
6
+ in = "in",
7
+ ft = "ft",
8
+ cm = "cm",
9
+ m = "m",
10
+ }
11
+
12
+ export enum WeightUnitType {
13
+ lb = "lb",
14
+ oz = "oz",
15
+ kg = "kg",
16
+ g = "g",
17
+ }
18
+
19
+ export enum SupplyType {
20
+ BOX = "BOX",
21
+ PACKAGING = "PACKAGING",
22
+ }
23
+
24
+ export interface Supply {
25
+ id: string;
26
+ name: string;
27
+ length: number;
28
+ width: number;
29
+ height: number;
30
+ weight: number;
31
+ weight_unit?: WeightUnitType;
32
+ dimension_unit?: DimensionUnitType;
33
+ active: boolean;
34
+ type: SupplyType;
35
+ code: string;
36
+ created_at: string;
37
+ updated_at: string;
38
+ organization_id: string;
39
+ organization?: Organization;
40
+ supply_stock?: SupplyStock[];
41
+ supply_transactions?: SupplyTransaction[];
42
+ }
@@ -0,0 +1,10 @@
1
+ import { Supply } from "./supply";
2
+ import { FacilityCode } from "../_common/facility";
3
+
4
+ export interface SupplyStock {
5
+ id: string;
6
+ supply_id: string;
7
+ supply?: Supply;
8
+ quantity: number;
9
+ facility: FacilityCode;
10
+ }
@@ -0,0 +1,14 @@
1
+ import { FacilityCode } from "../_common/facility";
2
+ import { Supply } from "./supply";
3
+
4
+ export interface SupplyTransaction {
5
+ id: string;
6
+ supply_id: string;
7
+ delta: number;
8
+ facility: FacilityCode;
9
+ external_shipment_id: string;
10
+ external_order_id: string;
11
+ user_email: string;
12
+ created_at: string;
13
+ supply?: Supply;
14
+ }
@@ -1,7 +0,0 @@
1
- export interface Issue {
2
- id: string;
3
- item_id?: string;
4
- issue_type: string;
5
- created_at: string;
6
- updated_at: string;
7
- }
@@ -1,22 +0,0 @@
1
- import { TaskDefinition } from "./taskDefinition";
2
- import { User } from "../_common/user";
3
- import { WarehouseItem } from "./warehouseItem";
4
- import { Issue } from "./issue";
5
-
6
- export interface TaskItemAction {
7
- item: WarehouseItem;
8
- completed: boolean;
9
- }
10
-
11
- export interface Task {
12
- id: string;
13
- due_date?: string;
14
- facility: string;
15
- created_at: string;
16
- updated_at: string;
17
- task_definition: TaskDefinition;
18
- users: User[];
19
- issues?: Issue[];
20
- task_item_actions: TaskItemAction[];
21
- status: "claimable" | "in_progress" | "blocked" | "completed";
22
- }
@@ -1,13 +0,0 @@
1
- export interface TaskDefinition {
2
- id: string;
3
- tag: "outbound" | "inbound" | "outbound_manual";
4
- name:
5
- | "retrieve"
6
- | "depalletize"
7
- | "shipping"
8
- | "racking"
9
- | "palletization"
10
- | "inspection";
11
- created_at: string;
12
- updated_at: string;
13
- }
@@ -1,28 +0,0 @@
1
- import { LocationType } from "./location";
2
-
3
- export interface WarehouseItemLocation {
4
- id: string;
5
- code: string;
6
- type_of: LocationType;
7
- is_in_service: boolean;
8
- created_at: string;
9
- updated_at: string;
10
- }
11
-
12
- export interface WarehouseItem {
13
- user_id: string;
14
- description: string;
15
- external_item_id: string;
16
- external_item_type: string;
17
- id: string;
18
- item_code: string;
19
- locations: WarehouseItemLocation[];
20
- metadata: {
21
- user_id: string;
22
- inbound_appointment_id: string;
23
- outbound_appointment_id: string;
24
- };
25
- name: string;
26
- pallet_id?: string | null;
27
- size: string;
28
- }