controlresell 0.0.45 → 0.0.46

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": "controlresell",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "main": "src/index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -1,9 +1,12 @@
1
1
  import { z } from "zod";
2
2
  export declare const CreateOrderLabelPayloadSchema: z.ZodObject<{
3
3
  fileId: z.ZodString;
4
+ originalFile: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4
5
  }, "strip", z.ZodTypeAny, {
5
6
  fileId: string;
7
+ originalFile?: string | null | undefined;
6
8
  }, {
7
9
  fileId: string;
10
+ originalFile?: string | null | undefined;
8
11
  }>;
9
12
  export type CreateOrderLabelPayload = z.infer<typeof CreateOrderLabelPayloadSchema>;
@@ -3,5 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateOrderLabelPayloadSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.CreateOrderLabelPayloadSchema = zod_1.z.object({
6
- fileId: zod_1.z.string().uuid()
6
+ fileId: zod_1.z.string().uuid(),
7
+ originalFile: zod_1.z.string().uuid().nullish()
7
8
  });
@@ -1,6 +1,7 @@
1
1
  import {z} from "zod"
2
2
 
3
3
  export const CreateOrderLabelPayloadSchema = z.object({
4
- fileId: z.string().uuid()
4
+ fileId: z.string().uuid(),
5
+ originalFile: z.string().uuid().nullish()
5
6
  })
6
7
  export type CreateOrderLabelPayload = z.infer<typeof CreateOrderLabelPayloadSchema>
@@ -3,6 +3,7 @@ export declare const OrderLabelSchema: z.ZodObject<{
3
3
  id: z.ZodString;
4
4
  orderId: z.ZodString;
5
5
  fileId: z.ZodString;
6
+ originalFileId: z.ZodString;
6
7
  file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
7
8
  id: z.ZodString;
8
9
  userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
@@ -22,10 +23,30 @@ export declare const OrderLabelSchema: z.ZodObject<{
22
23
  createdAt: Date;
23
24
  signedUrl: string;
24
25
  }>>>;
26
+ originalFile: z.ZodOptional<z.ZodNullable<z.ZodObject<{
27
+ id: z.ZodString;
28
+ userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
29
+ path: z.ZodString;
30
+ signedUrl: z.ZodString;
31
+ createdAt: z.ZodDate;
32
+ }, "strip", z.ZodTypeAny, {
33
+ path: string;
34
+ id: string;
35
+ userId: string | number;
36
+ createdAt: Date;
37
+ signedUrl: string;
38
+ }, {
39
+ path: string;
40
+ id: string;
41
+ userId: string | number;
42
+ createdAt: Date;
43
+ signedUrl: string;
44
+ }>>>;
25
45
  }, "strip", z.ZodTypeAny, {
26
46
  id: string;
27
47
  orderId: string;
28
48
  fileId: string;
49
+ originalFileId: string;
29
50
  file?: {
30
51
  path: string;
31
52
  id: string;
@@ -33,10 +54,18 @@ export declare const OrderLabelSchema: z.ZodObject<{
33
54
  createdAt: Date;
34
55
  signedUrl: string;
35
56
  } | null | undefined;
57
+ originalFile?: {
58
+ path: string;
59
+ id: string;
60
+ userId: string | number;
61
+ createdAt: Date;
62
+ signedUrl: string;
63
+ } | null | undefined;
36
64
  }, {
37
65
  id: string;
38
66
  orderId: string;
39
67
  fileId: string;
68
+ originalFileId: string;
40
69
  file?: {
41
70
  path: string;
42
71
  id: string;
@@ -44,5 +73,12 @@ export declare const OrderLabelSchema: z.ZodObject<{
44
73
  createdAt: Date;
45
74
  signedUrl: string;
46
75
  } | null | undefined;
76
+ originalFile?: {
77
+ path: string;
78
+ id: string;
79
+ userId: string | number;
80
+ createdAt: Date;
81
+ signedUrl: string;
82
+ } | null | undefined;
47
83
  }>;
48
84
  export type OrderLabel = z.infer<typeof OrderLabelSchema>;
@@ -7,5 +7,7 @@ exports.OrderLabelSchema = zod_1.z.object({
7
7
  id: zod_1.z.string().uuid(),
8
8
  orderId: zod_1.z.string().uuid(),
9
9
  fileId: zod_1.z.string().uuid(),
10
- file: File_1.FileSchema.nullish()
10
+ originalFileId: zod_1.z.string().uuid(),
11
+ file: File_1.FileSchema.nullish(),
12
+ originalFile: File_1.FileSchema.nullish()
11
13
  });
@@ -5,6 +5,8 @@ export const OrderLabelSchema = z.object({
5
5
  id: z.string().uuid(),
6
6
  orderId: z.string().uuid(),
7
7
  fileId: z.string().uuid(),
8
- file: FileSchema.nullish()
8
+ originalFileId: z.string().uuid(),
9
+ file: FileSchema.nullish(),
10
+ originalFile: FileSchema.nullish()
9
11
  })
10
12
  export type OrderLabel = z.infer<typeof OrderLabelSchema>
@@ -10,17 +10,101 @@ export declare const OrderSchema: z.ZodObject<{
10
10
  items: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
11
11
  itemOnPlatformId: z.ZodString;
12
12
  orderId: z.ZodString;
13
+ itemOnPlatform: z.ZodOptional<z.ZodNullable<z.ZodObject<{
14
+ id: z.ZodString;
15
+ itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
16
+ accountId: z.ZodString;
17
+ platformId: z.ZodString;
18
+ platformUrl: z.ZodString;
19
+ platformPrice: z.ZodNumber;
20
+ status: z.ZodEnum<["ONLINE", "DRAFT", "DELETED", "SOLD", "HIDDEN", "PENDING", "ERROR", "DISPUTE"]>;
21
+ account: z.ZodOptional<z.ZodNullable<z.ZodObject<{
22
+ userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
23
+ accountId: z.ZodString;
24
+ platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
25
+ name: z.ZodString;
26
+ }, "strip", z.ZodTypeAny, {
27
+ platform: "VINTED" | "SHOPIFY";
28
+ accountId: string;
29
+ userId: string | number;
30
+ name: string;
31
+ }, {
32
+ platform: "VINTED" | "SHOPIFY";
33
+ accountId: string;
34
+ userId: string | number;
35
+ name: string;
36
+ }>>>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
39
+ id: string;
40
+ accountId: string;
41
+ itemId: string | number;
42
+ platformId: string;
43
+ platformUrl: string;
44
+ platformPrice: number;
45
+ account?: {
46
+ platform: "VINTED" | "SHOPIFY";
47
+ accountId: string;
48
+ userId: string | number;
49
+ name: string;
50
+ } | null | undefined;
51
+ }, {
52
+ status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
53
+ id: string;
54
+ accountId: string;
55
+ itemId: string | number;
56
+ platformId: string;
57
+ platformUrl: string;
58
+ platformPrice: number;
59
+ account?: {
60
+ platform: "VINTED" | "SHOPIFY";
61
+ accountId: string;
62
+ userId: string | number;
63
+ name: string;
64
+ } | null | undefined;
65
+ }>>>;
13
66
  }, "strip", z.ZodTypeAny, {
14
67
  orderId: string;
15
68
  itemOnPlatformId: string;
69
+ itemOnPlatform?: {
70
+ status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
71
+ id: string;
72
+ accountId: string;
73
+ itemId: string | number;
74
+ platformId: string;
75
+ platformUrl: string;
76
+ platformPrice: number;
77
+ account?: {
78
+ platform: "VINTED" | "SHOPIFY";
79
+ accountId: string;
80
+ userId: string | number;
81
+ name: string;
82
+ } | null | undefined;
83
+ } | null | undefined;
16
84
  }, {
17
85
  orderId: string;
18
86
  itemOnPlatformId: string;
87
+ itemOnPlatform?: {
88
+ status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
89
+ id: string;
90
+ accountId: string;
91
+ itemId: string | number;
92
+ platformId: string;
93
+ platformUrl: string;
94
+ platformPrice: number;
95
+ account?: {
96
+ platform: "VINTED" | "SHOPIFY";
97
+ accountId: string;
98
+ userId: string | number;
99
+ name: string;
100
+ } | null | undefined;
101
+ } | null | undefined;
19
102
  }>, "many">>>;
20
103
  labels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
21
104
  id: z.ZodString;
22
105
  orderId: z.ZodString;
23
106
  fileId: z.ZodString;
107
+ originalFileId: z.ZodString;
24
108
  file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
25
109
  id: z.ZodString;
26
110
  userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
@@ -40,10 +124,30 @@ export declare const OrderSchema: z.ZodObject<{
40
124
  createdAt: Date;
41
125
  signedUrl: string;
42
126
  }>>>;
127
+ originalFile: z.ZodOptional<z.ZodNullable<z.ZodObject<{
128
+ id: z.ZodString;
129
+ userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
130
+ path: z.ZodString;
131
+ signedUrl: z.ZodString;
132
+ createdAt: z.ZodDate;
133
+ }, "strip", z.ZodTypeAny, {
134
+ path: string;
135
+ id: string;
136
+ userId: string | number;
137
+ createdAt: Date;
138
+ signedUrl: string;
139
+ }, {
140
+ path: string;
141
+ id: string;
142
+ userId: string | number;
143
+ createdAt: Date;
144
+ signedUrl: string;
145
+ }>>>;
43
146
  }, "strip", z.ZodTypeAny, {
44
147
  id: string;
45
148
  orderId: string;
46
149
  fileId: string;
150
+ originalFileId: string;
47
151
  file?: {
48
152
  path: string;
49
153
  id: string;
@@ -51,10 +155,18 @@ export declare const OrderSchema: z.ZodObject<{
51
155
  createdAt: Date;
52
156
  signedUrl: string;
53
157
  } | null | undefined;
158
+ originalFile?: {
159
+ path: string;
160
+ id: string;
161
+ userId: string | number;
162
+ createdAt: Date;
163
+ signedUrl: string;
164
+ } | null | undefined;
54
165
  }, {
55
166
  id: string;
56
167
  orderId: string;
57
168
  fileId: string;
169
+ originalFileId: string;
58
170
  file?: {
59
171
  path: string;
60
172
  id: string;
@@ -62,6 +174,13 @@ export declare const OrderSchema: z.ZodObject<{
62
174
  createdAt: Date;
63
175
  signedUrl: string;
64
176
  } | null | undefined;
177
+ originalFile?: {
178
+ path: string;
179
+ id: string;
180
+ userId: string | number;
181
+ createdAt: Date;
182
+ signedUrl: string;
183
+ } | null | undefined;
65
184
  }>, "many">>>;
66
185
  }, "strip", z.ZodTypeAny, {
67
186
  status: "PAYMENT_VALIDATED" | "SHIPPING_LABEL_SENT_TO_SELLER";
@@ -74,11 +193,27 @@ export declare const OrderSchema: z.ZodObject<{
74
193
  items?: {
75
194
  orderId: string;
76
195
  itemOnPlatformId: string;
196
+ itemOnPlatform?: {
197
+ status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
198
+ id: string;
199
+ accountId: string;
200
+ itemId: string | number;
201
+ platformId: string;
202
+ platformUrl: string;
203
+ platformPrice: number;
204
+ account?: {
205
+ platform: "VINTED" | "SHOPIFY";
206
+ accountId: string;
207
+ userId: string | number;
208
+ name: string;
209
+ } | null | undefined;
210
+ } | null | undefined;
77
211
  }[] | null | undefined;
78
212
  labels?: {
79
213
  id: string;
80
214
  orderId: string;
81
215
  fileId: string;
216
+ originalFileId: string;
82
217
  file?: {
83
218
  path: string;
84
219
  id: string;
@@ -86,6 +221,13 @@ export declare const OrderSchema: z.ZodObject<{
86
221
  createdAt: Date;
87
222
  signedUrl: string;
88
223
  } | null | undefined;
224
+ originalFile?: {
225
+ path: string;
226
+ id: string;
227
+ userId: string | number;
228
+ createdAt: Date;
229
+ signedUrl: string;
230
+ } | null | undefined;
89
231
  }[] | null | undefined;
90
232
  }, {
91
233
  status: "PAYMENT_VALIDATED" | "SHIPPING_LABEL_SENT_TO_SELLER";
@@ -98,11 +240,27 @@ export declare const OrderSchema: z.ZodObject<{
98
240
  items?: {
99
241
  orderId: string;
100
242
  itemOnPlatformId: string;
243
+ itemOnPlatform?: {
244
+ status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
245
+ id: string;
246
+ accountId: string;
247
+ itemId: string | number;
248
+ platformId: string;
249
+ platformUrl: string;
250
+ platformPrice: number;
251
+ account?: {
252
+ platform: "VINTED" | "SHOPIFY";
253
+ accountId: string;
254
+ userId: string | number;
255
+ name: string;
256
+ } | null | undefined;
257
+ } | null | undefined;
101
258
  }[] | null | undefined;
102
259
  labels?: {
103
260
  id: string;
104
261
  orderId: string;
105
262
  fileId: string;
263
+ originalFileId: string;
106
264
  file?: {
107
265
  path: string;
108
266
  id: string;
@@ -110,6 +268,13 @@ export declare const OrderSchema: z.ZodObject<{
110
268
  createdAt: Date;
111
269
  signedUrl: string;
112
270
  } | null | undefined;
271
+ originalFile?: {
272
+ path: string;
273
+ id: string;
274
+ userId: string | number;
275
+ createdAt: Date;
276
+ signedUrl: string;
277
+ } | null | undefined;
113
278
  }[] | null | undefined;
114
279
  }>;
115
280
  export type Order = z.infer<typeof OrderSchema>;
@@ -2,11 +2,94 @@ import { z } from "zod";
2
2
  export declare const ItemInOrderSchema: z.ZodObject<{
3
3
  itemOnPlatformId: z.ZodString;
4
4
  orderId: z.ZodString;
5
+ itemOnPlatform: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6
+ id: z.ZodString;
7
+ itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
8
+ accountId: z.ZodString;
9
+ platformId: z.ZodString;
10
+ platformUrl: z.ZodString;
11
+ platformPrice: z.ZodNumber;
12
+ status: z.ZodEnum<["ONLINE", "DRAFT", "DELETED", "SOLD", "HIDDEN", "PENDING", "ERROR", "DISPUTE"]>;
13
+ account: z.ZodOptional<z.ZodNullable<z.ZodObject<{
14
+ userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
15
+ accountId: z.ZodString;
16
+ platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
17
+ name: z.ZodString;
18
+ }, "strip", z.ZodTypeAny, {
19
+ platform: "VINTED" | "SHOPIFY";
20
+ accountId: string;
21
+ userId: string | number;
22
+ name: string;
23
+ }, {
24
+ platform: "VINTED" | "SHOPIFY";
25
+ accountId: string;
26
+ userId: string | number;
27
+ name: string;
28
+ }>>>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
31
+ id: string;
32
+ accountId: string;
33
+ itemId: string | number;
34
+ platformId: string;
35
+ platformUrl: string;
36
+ platformPrice: number;
37
+ account?: {
38
+ platform: "VINTED" | "SHOPIFY";
39
+ accountId: string;
40
+ userId: string | number;
41
+ name: string;
42
+ } | null | undefined;
43
+ }, {
44
+ status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
45
+ id: string;
46
+ accountId: string;
47
+ itemId: string | number;
48
+ platformId: string;
49
+ platformUrl: string;
50
+ platformPrice: number;
51
+ account?: {
52
+ platform: "VINTED" | "SHOPIFY";
53
+ accountId: string;
54
+ userId: string | number;
55
+ name: string;
56
+ } | null | undefined;
57
+ }>>>;
5
58
  }, "strip", z.ZodTypeAny, {
6
59
  orderId: string;
7
60
  itemOnPlatformId: string;
61
+ itemOnPlatform?: {
62
+ status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
63
+ id: string;
64
+ accountId: string;
65
+ itemId: string | number;
66
+ platformId: string;
67
+ platformUrl: string;
68
+ platformPrice: number;
69
+ account?: {
70
+ platform: "VINTED" | "SHOPIFY";
71
+ accountId: string;
72
+ userId: string | number;
73
+ name: string;
74
+ } | null | undefined;
75
+ } | null | undefined;
8
76
  }, {
9
77
  orderId: string;
10
78
  itemOnPlatformId: string;
79
+ itemOnPlatform?: {
80
+ status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
81
+ id: string;
82
+ accountId: string;
83
+ itemId: string | number;
84
+ platformId: string;
85
+ platformUrl: string;
86
+ platformPrice: number;
87
+ account?: {
88
+ platform: "VINTED" | "SHOPIFY";
89
+ accountId: string;
90
+ userId: string | number;
91
+ name: string;
92
+ } | null | undefined;
93
+ } | null | undefined;
11
94
  }>;
12
95
  export type ItemInOrder = z.infer<typeof ItemInOrderSchema>;
@@ -2,7 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ItemInOrderSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const ItemOnPlatform_1 = require("../../../items/platforms/ItemOnPlatform");
5
6
  exports.ItemInOrderSchema = zod_1.z.object({
6
7
  itemOnPlatformId: zod_1.z.string().uuid(),
7
- orderId: zod_1.z.string().uuid()
8
+ orderId: zod_1.z.string().uuid(),
9
+ itemOnPlatform: ItemOnPlatform_1.ItemOnPlatformSchema.nullish()
8
10
  });
@@ -1,7 +1,9 @@
1
1
  import {z} from "zod"
2
+ import {ItemOnPlatformSchema} from "../../../items/platforms/ItemOnPlatform"
2
3
 
3
4
  export const ItemInOrderSchema = z.object({
4
5
  itemOnPlatformId: z.string().uuid(),
5
- orderId: z.string().uuid()
6
+ orderId: z.string().uuid(),
7
+ itemOnPlatform: ItemOnPlatformSchema.nullish()
6
8
  })
7
9
  export type ItemInOrder = z.infer<typeof ItemInOrderSchema>