@secondcloset/types 2.7.2 → 2.7.4-beta-OA.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@secondcloset/types",
3
- "version": "2.7.2",
3
+ "version": "2.7.4-beta-OA.1",
4
4
  "description": "secondcloset type declaration and definitions",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
@@ -1,15 +1,16 @@
1
1
  export type HistoryEvent = "asn" | "order" | "manual" | "system";
2
+ export type ActivityEvent = "manual" | "system";
2
3
  export interface ActivityHistory {
3
4
  id: string;
4
- user: {
5
+ user?: {
5
6
  id: string;
6
7
  name?: string;
7
8
  is_admin: boolean;
8
9
  };
9
10
  description: string[];
10
- organization_name: string;
11
+ organization_name?: string;
11
12
  created_at: string;
12
- event: HistoryEvent;
13
+ event: HistoryEvent | ActivityEvent;
13
14
  metadata?: {
14
15
  facility?: { id: string; name: string };
15
16
  asn?: { id: string; number: string };
@@ -7,3 +7,4 @@ export * from "./organization";
7
7
  export * from "./credential";
8
8
  export * from "./file";
9
9
  export * from "./note";
10
+ export * from "./activityHistory";
@@ -1,4 +1,4 @@
1
- import { AppointmentType } from "./appointmentType";
1
+ import { AppointmentType, AppointmentSubtype } from "./appointmentType";
2
2
  import { AppointmentStatus } from "./appointmentStatus";
3
3
  import { Shipment, ScServiceCode } from "../shipment";
4
4
  import { Order } from "../order";
@@ -26,6 +26,7 @@ export interface Appointment {
26
26
  incomplete_at: string | null;
27
27
  issue_images?: BaseImage[];
28
28
  job_type: AppointmentType;
29
+ job_subtype?: AppointmentSubtype;
29
30
  location: Location;
30
31
  movers: null;
31
32
  num_movers: null;
@@ -5,3 +5,5 @@ export type AppointmentType =
5
5
  | "cross_dock_delivery"
6
6
  | "return_to_sender"
7
7
  | "inventory_warehouse_receiving";
8
+
9
+ export type AppointmentSubtype = "mid_mile_pick_up" | "mid_mile_drop_off";
@@ -1,3 +1,3 @@
1
1
  export * from "./product";
2
2
  export * from "./stock";
3
- export * from "./activityHistory";
3
+ export * from "../../_common/activityHistory";
@@ -2,6 +2,7 @@ import { ShipmentItem } from "./shipmentItem";
2
2
  import {
3
3
  AppointmentStatus,
4
4
  AppointmentType,
5
+ AppointmentSubtype,
5
6
  } from "../../fulfillment/appointment";
6
7
  import { CustomerAddress, Customer, ShipmentTag } from "../order";
7
8
  import { BaseUser, BaseImage, BaseNote } from "../../_common";
@@ -44,6 +45,7 @@ export interface SecondClosetShippingMethod {
44
45
  issue_images?: BaseImage[];
45
46
  incomplete_at?: string;
46
47
  job_type?: AppointmentType;
48
+ job_subtype?: AppointmentSubtype;
47
49
  date?: string | null;
48
50
  timerange?: string | null;
49
51
  formatted_timeslot?: string | null;
@@ -1,5 +1,5 @@
1
1
  import { AppointmentItem } from "./appointmentItem";
2
- import { AppointmentType } from "./appointmentType";
2
+ import { AppointmentType, AppointmentSubtype } from "./appointmentType";
3
3
  import { AppointmentStatus } from "./appointmentStatus";
4
4
  import { Address } from "../address";
5
5
  import { BaseImage, BaseNote } from "../../_common";
@@ -26,6 +26,7 @@ export interface Appointment {
26
26
  incomplete_at?: string;
27
27
  issue_images?: BaseImage[];
28
28
  job_type: AppointmentType;
29
+ job_subtype?: AppointmentSubtype;
29
30
  location?: Location;
30
31
  movers?: any;
31
32
  notes?: string;
@@ -6,3 +6,5 @@ export type AppointmentType =
6
6
  | "return"
7
7
  | "immediate_retrieve"
8
8
  | "custom";
9
+
10
+ export type AppointmentSubtype = "mid_mile_pick_up" | "mid_mile_drop_off";
@@ -10,7 +10,8 @@ export * from "./shipmentProductsTracking";
10
10
  export * from "./supply";
11
11
  export * from "./supplyStock";
12
12
  export * from "./supplyTransaction";
13
- export * from "./transaction";
13
+ export * from "./locationActivityLog";
14
+ export * from "./packerActivityLog";
14
15
  export * from "./palletRequestLog";
15
16
  export * from "./manualItem";
16
17
  export * from "./return";
@@ -1,6 +1,6 @@
1
1
  import { Product } from "./product";
2
2
 
3
- export enum TransactionActionType {
3
+ export enum LocationActivityType {
4
4
  MOVE = "MOVE",
5
5
  RECEIVE = "RECEIVE",
6
6
  CREATE_PALLET = "CREATE_PALLET",
@@ -8,7 +8,7 @@ export enum TransactionActionType {
8
8
  AUDIT = "AUDIT",
9
9
  }
10
10
 
11
- export interface Transaction {
11
+ export interface LocationActivityLog {
12
12
  id: string;
13
13
  from_location_code: string;
14
14
  to_location_code: string;
@@ -20,6 +20,6 @@ export interface Transaction {
20
20
  lot_number: string;
21
21
  created_at: string;
22
22
  user_email: string;
23
- action: TransactionActionType;
23
+ action: LocationActivityType;
24
24
  product?: Product;
25
25
  }
@@ -0,0 +1,16 @@
1
+ export enum PackerActivityType {
2
+ COMPLETE = "COMPLETE",
3
+ ADD = "ADD",
4
+ REMOVE = "REMOVE",
5
+ }
6
+
7
+ export interface PackerActivityLog {
8
+ id: string;
9
+ user_email: string;
10
+ shipment_id: string;
11
+ shipment_number: string;
12
+ external_order_id: string;
13
+ external_order_number: string;
14
+ created_at: string;
15
+ action: PackerActivityType;
16
+ }
@@ -51,5 +51,5 @@ export type PicksheetRequest = {
51
51
  requested_by: string;
52
52
  created_at: string;
53
53
  updated_at: string;
54
- __picksheets__?: Picksheet[];
54
+ picksheets?: Picksheet[];
55
55
  };
@@ -1,6 +1,6 @@
1
1
  import { LocationItem } from "./locationItem";
2
2
  import { Organization } from "./organization";
3
- import { Transaction } from "./transaction";
3
+ import { LocationActivityLog } from "./locationActivityLog";
4
4
 
5
5
  export interface Product {
6
6
  id: string;
@@ -10,5 +10,5 @@ export interface Product {
10
10
  organization_id: string;
11
11
  organization?: Organization;
12
12
  location_item?: LocationItem;
13
- transaction?: Transaction;
13
+ location_activity_log?: LocationActivityLog;
14
14
  }