@secondcloset/types 2.8.0-beta.1 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@secondcloset/types",
3
- "version": "2.8.0-beta.1",
3
+ "version": "2.8.0-beta.2",
4
4
  "description": "secondcloset type declaration and definitions",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
@@ -41,7 +41,7 @@ export interface FulfillmentOrderAddress extends BaseAddress {
41
41
  updated_at: string;
42
42
  }
43
43
 
44
- export type Order<V = Version> = V extends "V1"
44
+ export type Order<V extends Version = "V1"> = V extends "V1"
45
45
  ? {
46
46
  id: string;
47
47
  order_id: string;
@@ -67,8 +67,8 @@ export type Order<V = Version> = V extends "V1"
67
67
  user: BaseUser;
68
68
  status?: string;
69
69
  shipment_tags: ShipmentTag[];
70
- shipments: Shipment<"V1">[];
71
- items: OrderItem<"V1">[];
70
+ shipments: Shipment<V>[];
71
+ items: OrderItem<V>[];
72
72
  files: File[];
73
73
  stock_status:
74
74
  | "in_stock"
@@ -2,7 +2,7 @@ import { Version } from "../../_common";
2
2
  import { BaseProduct, Product } from "../product";
3
3
  import { ShipmentActionType } from "../shipment";
4
4
 
5
- export type OrderItem<V = Version> = V extends "V1"
5
+ export type OrderItem<V extends Version = "V1"> = V extends "V1"
6
6
  ? {
7
7
  id: string;
8
8
  product: Product;
@@ -39,7 +39,7 @@ export type ScServiceCode =
39
39
  | "second_closet_to_the_door_1_person"
40
40
  | ServiceCode;
41
41
 
42
- export type Shipment<V = Version> = V extends "V1"
42
+ export type Shipment<V extends Version = "V1"> = V extends "V1"
43
43
  ? {
44
44
  id: string;
45
45
  organization_id: string;
@@ -47,7 +47,7 @@ export type Shipment<V = Version> = V extends "V1"
47
47
  billed: boolean;
48
48
  user: BaseUser;
49
49
  notes: BaseNote[] | string;
50
- shipment_items: ShipmentItem<"V1">[];
50
+ shipment_items: ShipmentItem<V>[];
51
51
  shipment_number: string;
52
52
  packages: Package[];
53
53
  external_order_id: string | null;
@@ -1,7 +1,7 @@
1
1
  import { Version } from "../../_common";
2
2
  import { BaseProduct } from "../product";
3
3
  import { ShipmentActionType } from "./shipment";
4
- export type ShipmentItem<V = Version> = V extends "V1"
4
+ export type ShipmentItem<V extends Version = "V1"> = V extends "V1"
5
5
  ? {
6
6
  id: string;
7
7
  order_item_id: string;