@secondcloset/types 2.7.22-beta-locationItems-0 → 2.7.24-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@secondcloset/types",
3
- "version": "2.7.22-beta-locationItems-0",
3
+ "version": "2.7.24-beta.0",
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,26 @@ 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;
41
- };
42
- };
43
- service_area: ServiceArea;
44
- }
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
+ : Common.FacilityServiceArea["facility"];
@@ -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";
@@ -3,6 +3,7 @@ import { BaseAddress } from "./address";
3
3
  import { BaseUser } from "./user";
4
4
  import { Carrier } from "../fulfillment";
5
5
  import { ServiceArea } from "./serviceArea";
6
+ import { FacilityCode } from "./facility";
6
7
 
7
8
  export type OrganizationConfigKey =
8
9
  | "default_fulfilled_from"
@@ -75,7 +76,7 @@ export interface Organization extends BaseOrganization {
75
76
 
76
77
  interface Facility {
77
78
  id: string;
78
- name: string;
79
+ name: FacilityCode;
79
80
  enabled: boolean;
80
81
  service_area: ServiceArea;
81
82
  address: {
@@ -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";
@@ -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;
@@ -4,9 +4,9 @@ import { Pallet } from "./pallet";
4
4
  import { Bin } from "./bin";
5
5
  import { ManualItem } from "./manualItem";
6
6
 
7
- enum LocationItemStatus {
8
- NORMAL = "NORMAL",
7
+ export enum LocationItemStatus {
9
8
  DAMAGED = "DAMAGED",
9
+ NORMAL = "NORMAL",
10
10
  }
11
11
 
12
12
  export interface LocationItem {
@@ -23,7 +23,7 @@ export interface LocationItem {
23
23
  pallet?: Pallet;
24
24
  bin_id: string;
25
25
  bin: Bin;
26
- status: LocationItemStatus;
27
26
  created_at: string;
28
27
  updated_at: string;
28
+ status: LocationItemStatus;
29
29
  }