controlresell 0.0.44 → 0.0.45

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.44",
3
+ "version": "0.0.45",
4
4
  "main": "src/index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -7,6 +7,62 @@ export declare const OrderSchema: z.ZodObject<{
7
7
  conversationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
8
  price: z.ZodNumber;
9
9
  date: z.ZodDate;
10
+ items: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
11
+ itemOnPlatformId: z.ZodString;
12
+ orderId: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ orderId: string;
15
+ itemOnPlatformId: string;
16
+ }, {
17
+ orderId: string;
18
+ itemOnPlatformId: string;
19
+ }>, "many">>>;
20
+ labels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
21
+ id: z.ZodString;
22
+ orderId: z.ZodString;
23
+ fileId: z.ZodString;
24
+ file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
25
+ id: z.ZodString;
26
+ userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
27
+ path: z.ZodString;
28
+ signedUrl: z.ZodString;
29
+ createdAt: z.ZodDate;
30
+ }, "strip", z.ZodTypeAny, {
31
+ path: string;
32
+ id: string;
33
+ userId: string | number;
34
+ createdAt: Date;
35
+ signedUrl: string;
36
+ }, {
37
+ path: string;
38
+ id: string;
39
+ userId: string | number;
40
+ createdAt: Date;
41
+ signedUrl: string;
42
+ }>>>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ id: string;
45
+ orderId: string;
46
+ fileId: string;
47
+ file?: {
48
+ path: string;
49
+ id: string;
50
+ userId: string | number;
51
+ createdAt: Date;
52
+ signedUrl: string;
53
+ } | null | undefined;
54
+ }, {
55
+ id: string;
56
+ orderId: string;
57
+ fileId: string;
58
+ file?: {
59
+ path: string;
60
+ id: string;
61
+ userId: string | number;
62
+ createdAt: Date;
63
+ signedUrl: string;
64
+ } | null | undefined;
65
+ }>, "many">>>;
10
66
  }, "strip", z.ZodTypeAny, {
11
67
  status: "PAYMENT_VALIDATED" | "SHIPPING_LABEL_SENT_TO_SELLER";
12
68
  id: string;
@@ -15,6 +71,22 @@ export declare const OrderSchema: z.ZodObject<{
15
71
  price: number;
16
72
  platformOrderId: string;
17
73
  conversationId?: string | null | undefined;
74
+ items?: {
75
+ orderId: string;
76
+ itemOnPlatformId: string;
77
+ }[] | null | undefined;
78
+ labels?: {
79
+ id: string;
80
+ orderId: string;
81
+ fileId: string;
82
+ file?: {
83
+ path: string;
84
+ id: string;
85
+ userId: string | number;
86
+ createdAt: Date;
87
+ signedUrl: string;
88
+ } | null | undefined;
89
+ }[] | null | undefined;
18
90
  }, {
19
91
  status: "PAYMENT_VALIDATED" | "SHIPPING_LABEL_SENT_TO_SELLER";
20
92
  id: string;
@@ -23,5 +95,21 @@ export declare const OrderSchema: z.ZodObject<{
23
95
  price: number;
24
96
  platformOrderId: string;
25
97
  conversationId?: string | null | undefined;
98
+ items?: {
99
+ orderId: string;
100
+ itemOnPlatformId: string;
101
+ }[] | null | undefined;
102
+ labels?: {
103
+ id: string;
104
+ orderId: string;
105
+ fileId: string;
106
+ file?: {
107
+ path: string;
108
+ id: string;
109
+ userId: string | number;
110
+ createdAt: Date;
111
+ signedUrl: string;
112
+ } | null | undefined;
113
+ }[] | null | undefined;
26
114
  }>;
27
115
  export type Order = z.infer<typeof OrderSchema>;
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OrderSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const controlresell_connector_1 = require("controlresell-connector");
6
+ const ItemInOrder_1 = require("./items/ItemInOrder");
7
+ const OrderLabel_1 = require("../labels/OrderLabel");
6
8
  exports.OrderSchema = zod_1.z.object({
7
9
  id: zod_1.z.string().uuid(),
8
10
  accountId: zod_1.z.string().uuid(),
@@ -10,5 +12,7 @@ exports.OrderSchema = zod_1.z.object({
10
12
  status: controlresell_connector_1.JobOrderStatusSchema,
11
13
  conversationId: zod_1.z.string().uuid().nullish(),
12
14
  price: zod_1.z.number(),
13
- date: zod_1.z.coerce.date()
15
+ date: zod_1.z.coerce.date(),
16
+ items: zod_1.z.array(ItemInOrder_1.ItemInOrderSchema).nullish(),
17
+ labels: zod_1.z.array(OrderLabel_1.OrderLabelSchema).nullish()
14
18
  });
@@ -1,5 +1,7 @@
1
1
  import {z} from "zod"
2
2
  import {JobOrderStatusSchema} from "controlresell-connector"
3
+ import {ItemInOrderSchema} from "./items/ItemInOrder"
4
+ import {OrderLabelSchema} from "../labels/OrderLabel"
3
5
 
4
6
  export const OrderSchema = z.object({
5
7
  id: z.string().uuid(),
@@ -8,6 +10,8 @@ export const OrderSchema = z.object({
8
10
  status: JobOrderStatusSchema,
9
11
  conversationId: z.string().uuid().nullish(),
10
12
  price: z.number(),
11
- date: z.coerce.date()
13
+ date: z.coerce.date(),
14
+ items: z.array(ItemInOrderSchema).nullish(),
15
+ labels: z.array(OrderLabelSchema).nullish()
12
16
  })
13
17
  export type Order = z.infer<typeof OrderSchema>
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+ export declare const CreateItemInOrderPayloadSchema: z.ZodObject<{
3
+ itemOnPlatformId: z.ZodString;
4
+ }, "strip", z.ZodTypeAny, {
5
+ itemOnPlatformId: string;
6
+ }, {
7
+ itemOnPlatformId: string;
8
+ }>;
9
+ export type CreateItemInOrderPayload = z.infer<typeof CreateItemInOrderPayloadSchema>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateItemInOrderPayloadSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.CreateItemInOrderPayloadSchema = zod_1.z.object({
6
+ itemOnPlatformId: zod_1.z.string().uuid()
7
+ });
@@ -0,0 +1,6 @@
1
+ import {z} from "zod"
2
+
3
+ export const CreateItemInOrderPayloadSchema = z.object({
4
+ itemOnPlatformId: z.string().uuid()
5
+ })
6
+ export type CreateItemInOrderPayload = z.infer<typeof CreateItemInOrderPayloadSchema>
@@ -0,0 +1,12 @@
1
+ import { z } from "zod";
2
+ export declare const ItemInOrderSchema: z.ZodObject<{
3
+ itemOnPlatformId: z.ZodString;
4
+ orderId: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ orderId: string;
7
+ itemOnPlatformId: string;
8
+ }, {
9
+ orderId: string;
10
+ itemOnPlatformId: string;
11
+ }>;
12
+ export type ItemInOrder = z.infer<typeof ItemInOrderSchema>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ItemInOrderSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.ItemInOrderSchema = zod_1.z.object({
6
+ itemOnPlatformId: zod_1.z.string().uuid(),
7
+ orderId: zod_1.z.string().uuid()
8
+ });
@@ -0,0 +1,7 @@
1
+ import {z} from "zod"
2
+
3
+ export const ItemInOrderSchema = z.object({
4
+ itemOnPlatformId: z.string().uuid(),
5
+ orderId: z.string().uuid()
6
+ })
7
+ export type ItemInOrder = z.infer<typeof ItemInOrderSchema>
package/src/index.d.ts CHANGED
@@ -60,6 +60,8 @@ export * from "./com/controlresell/models/platforms/labels/OrderLabel";
60
60
  export * from "./com/controlresell/models/platforms/orders/CreateOrderPayload";
61
61
  export * from "./com/controlresell/models/platforms/orders/Order";
62
62
  export * from "./com/controlresell/models/platforms/orders/UpdateOrderPayload";
63
+ export * from "./com/controlresell/models/platforms/orders/items/CreateItemInOrderPayload";
64
+ export * from "./com/controlresell/models/platforms/orders/items/ItemInOrder";
63
65
  export * from "./com/controlresell/models/users/GettingStartedSteps";
64
66
  export * from "./com/controlresell/models/users/UpdateUserPayload";
65
67
  export * from "./com/controlresell/models/users/User";
package/src/index.js CHANGED
@@ -76,6 +76,8 @@ __exportStar(require("./com/controlresell/models/platforms/labels/OrderLabel"),
76
76
  __exportStar(require("./com/controlresell/models/platforms/orders/CreateOrderPayload"), exports);
77
77
  __exportStar(require("./com/controlresell/models/platforms/orders/Order"), exports);
78
78
  __exportStar(require("./com/controlresell/models/platforms/orders/UpdateOrderPayload"), exports);
79
+ __exportStar(require("./com/controlresell/models/platforms/orders/items/CreateItemInOrderPayload"), exports);
80
+ __exportStar(require("./com/controlresell/models/platforms/orders/items/ItemInOrder"), exports);
79
81
  __exportStar(require("./com/controlresell/models/users/GettingStartedSteps"), exports);
80
82
  __exportStar(require("./com/controlresell/models/users/UpdateUserPayload"), exports);
81
83
  __exportStar(require("./com/controlresell/models/users/User"), exports);
package/src/index.ts CHANGED
@@ -60,6 +60,8 @@ export * from "./com/controlresell/models/platforms/labels/OrderLabel"
60
60
  export * from "./com/controlresell/models/platforms/orders/CreateOrderPayload"
61
61
  export * from "./com/controlresell/models/platforms/orders/Order"
62
62
  export * from "./com/controlresell/models/platforms/orders/UpdateOrderPayload"
63
+ export * from "./com/controlresell/models/platforms/orders/items/CreateItemInOrderPayload"
64
+ export * from "./com/controlresell/models/platforms/orders/items/ItemInOrder"
63
65
  export * from "./com/controlresell/models/users/GettingStartedSteps"
64
66
  export * from "./com/controlresell/models/users/UpdateUserPayload"
65
67
  export * from "./com/controlresell/models/users/User"