@secondcloset/types 2.7.5-beta-st.0 → 2.7.6-beta-specialProjectFixes-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@secondcloset/types",
3
- "version": "2.7.5-beta-st.0",
3
+ "version": "2.7.6-beta-specialProjectFixes-2",
4
4
  "description": "secondcloset type declaration and definitions",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
@@ -9,8 +9,6 @@ export interface BaseAddress {
9
9
  id: string;
10
10
  apartment_number: string | null;
11
11
  address: string;
12
- address_line_1?: string;
13
- address_line_2?: string;
14
12
  city: string;
15
13
  province: string;
16
14
  country: string;
@@ -7,4 +7,3 @@ export * from "./organization";
7
7
  export * from "./credential";
8
8
  export * from "./file";
9
9
  export * from "./note";
10
- export * from "./activityHistory";
@@ -0,0 +1,18 @@
1
+ export type HistoryEvent = "asn" | "order" | "manual" | "system";
2
+ export interface ActivityHistory {
3
+ id: string;
4
+ user: {
5
+ id: string;
6
+ name?: string;
7
+ is_admin: boolean;
8
+ };
9
+ description: string[];
10
+ organization_name: string;
11
+ created_at: string;
12
+ event: HistoryEvent;
13
+ metadata?: {
14
+ facility?: { id: string; name: string };
15
+ asn?: { id: string; number: string };
16
+ order?: { id: string; number: string };
17
+ };
18
+ }
@@ -1,3 +1,3 @@
1
1
  export * from "./product";
2
2
  export * from "./stock";
3
- export * from "../../_common/activityHistory";
3
+ export * from "./activityHistory";
@@ -5,7 +5,7 @@ import {
5
5
  AppointmentSubtype,
6
6
  } from "../../fulfillment/appointment";
7
7
  import { CustomerAddress, Customer, ShipmentTag } from "../order";
8
- import { BaseUser, BaseImage, BaseNote, BaseAddress } from "../../_common";
8
+ import { BaseUser, BaseImage, BaseNote } from "../../_common";
9
9
  import { Package } from "./package";
10
10
  import { Carrier } from "./carrier";
11
11
  import { ScServiceCode } from "../shipment";
@@ -108,8 +108,6 @@ interface CarrierShippingAddress {
108
108
  contact_name: string;
109
109
  phone_number: string;
110
110
  address: string;
111
- address_line_1?: string;
112
- address_line_2?: string;
113
111
  city: string;
114
112
  country: string;
115
113
  province: string;
@@ -1,5 +1,25 @@
1
1
  import { Organization } from "./organization";
2
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
+ }
3
23
 
4
24
  export interface SpecialProject {
5
25
  id: string;
@@ -8,10 +28,11 @@ export interface SpecialProject {
8
28
  user_names: string;
9
29
  start_time: string;
10
30
  end_time: string;
11
- rate: number;
31
+ type: SpecialProjectType;
12
32
  facility: FacilityCode;
13
33
  details?: string;
14
34
  reference_number?: string;
15
35
  created_at: string;
16
36
  updated_at: string;
37
+ special_project_supplies?: SpecialProjectSupply[];
17
38
  }
@@ -32,6 +32,7 @@ export interface Supply {
32
32
  dimension_unit?: DimensionUnitType;
33
33
  active: boolean;
34
34
  type: SupplyType;
35
+ code: string;
35
36
  created_at: string;
36
37
  updated_at: string;
37
38
  organization_id: string;
@@ -1,22 +0,0 @@
1
- export type HistoryEvent = "all" | "asn" | "order" | "manual" | "system";
2
- export type ActivityEvent = "all" | "manual" | "system";
3
- export interface ActivityHistory {
4
- id: string;
5
- user?: {
6
- id: string;
7
- name?: string;
8
- is_admin: boolean;
9
- };
10
- description: string[];
11
- organization_name?: string;
12
- created_at: string;
13
- event: HistoryEvent | ActivityEvent;
14
- metadata?: {
15
- facility?: { id: string; name: string };
16
- asn?: { id: string; number: string };
17
- order?: { id: string; number: string };
18
- file?: { url: string; name: string };
19
- shipment?: { id: string; number: string };
20
- image_url?:string
21
- };
22
- }