@mivis/petmart-api 1.1.1 → 1.1.3

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 (2) hide show
  1. package/package.json +11 -11
  2. package/type.d.ts +18 -13
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
- {
2
- "name": "@mivis/petmart-api",
3
- "version": "1.1.1",
4
- "main": "index.js",
5
- "types": "type.d.ts",
6
- "license": "ISC",
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/MarkusRaven/devPetmart"
10
- }
11
- }
1
+ {
2
+ "name": "@mivis/petmart-api",
3
+ "version": "1.1.3",
4
+ "main": "index.js",
5
+ "types": "type.d.ts",
6
+ "license": "ISC",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/MarkusRaven/devPetmart"
10
+ }
11
+ }
package/type.d.ts CHANGED
@@ -82,6 +82,11 @@ declare namespace Components {
82
82
  address: string;
83
83
  }
84
84
 
85
+ export interface ICompound {
86
+ name: string;
87
+ value: string;
88
+ }
89
+
85
90
  export interface IProduct {
86
91
  _id: string;
87
92
  owner: string;
@@ -91,7 +96,7 @@ declare namespace Components {
91
96
  name: string;
92
97
  rate: number;
93
98
  desc: string;
94
- compound: object[];
99
+ compound: ICompound[];
95
100
  category: string;
96
101
  price: number[];
97
102
  }
@@ -105,7 +110,7 @@ declare namespace Components {
105
110
  name: string;
106
111
  rate: number;
107
112
  desc: string;
108
- compound: object[];
113
+ compound: ICompound[];
109
114
  category: {
110
115
  _id: string;
111
116
  name: string;
@@ -120,7 +125,7 @@ declare namespace Components {
120
125
  weight: number[];
121
126
  name: string;
122
127
  desc: string;
123
- compound: object[];
128
+ compound: ICompound[];
124
129
  category: string;
125
130
  price: number[];
126
131
  }
@@ -130,7 +135,7 @@ declare namespace Components {
130
135
  }
131
136
 
132
137
  export interface ICreateCart {
133
- product: IProduct;
138
+ product: string;
134
139
  variation: IVariation;
135
140
  count: number;
136
141
  }
@@ -141,18 +146,14 @@ declare namespace Components {
141
146
  }
142
147
  export interface ICart {
143
148
  _id: string;
144
- owner: string;
149
+ owner?: string;
145
150
  product: {
146
151
  _id: string;
147
152
  name: string;
148
153
  photo: string[];
149
154
  };
150
155
  count: number;
151
- variation: IVariation[];
152
- status: string;
153
- date: Date;
154
- deliveryDate: Date;
155
- orderNumber: string;
156
+ variation: IVariation;
156
157
  }
157
158
 
158
159
  export interface ICategory {
@@ -170,12 +171,16 @@ declare namespace Components {
170
171
  id: string;
171
172
  }
172
173
 
173
- export type OrderItems = Pick<ICart, 'product' | 'count'>;
174
+ export interface IOrderItem {
175
+ product: string;
176
+ count: number;
177
+ weight: number;
178
+ }
174
179
 
175
180
  export type OrderAddress = Omit<IAddress, 'owner'>;
176
181
 
177
182
  export interface ICreateOrder {
178
- orderItems: OrderItems;
183
+ orderItems: IOrderItem[];
179
184
  price: number;
180
185
  address: OrderAddress;
181
186
  name: string;
@@ -185,7 +190,7 @@ declare namespace Components {
185
190
 
186
191
  export interface IOrder {
187
192
  user: string;
188
- orderItems: OrderItems[];
193
+ orderItems: IOrderItem[];
189
194
  date: Date;
190
195
  price: number;
191
196
  owner: string;