controlresell 0.0.5 → 0.0.7
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/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/models/customers/customer.d.ts +45 -0
- package/dist/models/customers/customer.js +21 -0
- package/dist/models/items/customField.d.ts +51 -0
- package/dist/models/items/customField.js +24 -0
- package/dist/models/items/itemField.d.ts +39 -30
- package/dist/models/items/itemField.js +19 -12
- package/dist/models/items/itemFieldValue.d.ts +17 -0
- package/dist/models/items/itemFieldValue.js +7 -1
- package/dist/models/items/itemHistory.d.ts +37 -0
- package/dist/models/items/itemHistory.js +18 -0
- package/dist/models/items/itemOnPlatform.d.ts +51 -0
- package/dist/models/items/itemOnPlatform.js +25 -0
- package/dist/models/users/user.d.ts +172 -1
- package/dist/models/users/user.js +32 -0
- package/dist/models/users/userOnPlatform.d.ts +29 -0
- package/dist/models/users/userOnPlatform.js +16 -0
- package/dist/models/users/wallet.d.ts +15 -0
- package/dist/models/users/wallet.js +9 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,13 @@ export * from "./models/connector/account";
|
|
|
8
8
|
export * from "./models/connector/job";
|
|
9
9
|
export * from "./models/connector/rabbitmq";
|
|
10
10
|
export * from "./models/connector/jobs/post";
|
|
11
|
+
export * from "./models/customers/customer";
|
|
12
|
+
export * from "./models/items/customField";
|
|
11
13
|
export * from "./models/items/item";
|
|
12
14
|
export * from "./models/items/itemField";
|
|
13
15
|
export * from "./models/items/itemFieldValue";
|
|
16
|
+
export * from "./models/items/itemHistory";
|
|
17
|
+
export * from "./models/items/itemOnPlatform";
|
|
14
18
|
export * from "./models/users/user";
|
|
19
|
+
export * from "./models/users/userOnPlatform";
|
|
20
|
+
export * from "./models/users/wallet";
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,13 @@ __exportStar(require("./models/connector/account"), exports);
|
|
|
24
24
|
__exportStar(require("./models/connector/job"), exports);
|
|
25
25
|
__exportStar(require("./models/connector/rabbitmq"), exports);
|
|
26
26
|
__exportStar(require("./models/connector/jobs/post"), exports);
|
|
27
|
+
__exportStar(require("./models/customers/customer"), exports);
|
|
28
|
+
__exportStar(require("./models/items/customField"), exports);
|
|
27
29
|
__exportStar(require("./models/items/item"), exports);
|
|
28
30
|
__exportStar(require("./models/items/itemField"), exports);
|
|
29
31
|
__exportStar(require("./models/items/itemFieldValue"), exports);
|
|
32
|
+
__exportStar(require("./models/items/itemHistory"), exports);
|
|
33
|
+
__exportStar(require("./models/items/itemOnPlatform"), exports);
|
|
30
34
|
__exportStar(require("./models/users/user"), exports);
|
|
35
|
+
__exportStar(require("./models/users/userOnPlatform"), exports);
|
|
36
|
+
__exportStar(require("./models/users/wallet"), exports);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CustomerSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
4
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
5
|
+
firstName: z.ZodString;
|
|
6
|
+
lastName: z.ZodString;
|
|
7
|
+
birthDate: z.ZodDate;
|
|
8
|
+
idNumber: z.ZodString;
|
|
9
|
+
email: z.ZodString;
|
|
10
|
+
phone: z.ZodString;
|
|
11
|
+
iban: z.ZodString;
|
|
12
|
+
bic: z.ZodString;
|
|
13
|
+
phoneVerified: z.ZodBoolean;
|
|
14
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
15
|
+
items: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
id: string | number;
|
|
18
|
+
userId: string | number;
|
|
19
|
+
firstName: string;
|
|
20
|
+
lastName: string;
|
|
21
|
+
birthDate: Date;
|
|
22
|
+
idNumber: string;
|
|
23
|
+
email: string;
|
|
24
|
+
phone: string;
|
|
25
|
+
iban: string;
|
|
26
|
+
bic: string;
|
|
27
|
+
phoneVerified: boolean;
|
|
28
|
+
items?: any[] | undefined;
|
|
29
|
+
createdAt?: Date | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
id: string | number;
|
|
32
|
+
userId: string | number;
|
|
33
|
+
firstName: string;
|
|
34
|
+
lastName: string;
|
|
35
|
+
birthDate: Date;
|
|
36
|
+
idNumber: string;
|
|
37
|
+
email: string;
|
|
38
|
+
phone: string;
|
|
39
|
+
iban: string;
|
|
40
|
+
bic: string;
|
|
41
|
+
phoneVerified: boolean;
|
|
42
|
+
items?: any[] | undefined;
|
|
43
|
+
createdAt?: Date | undefined;
|
|
44
|
+
}>;
|
|
45
|
+
export type Customer = z.infer<typeof CustomerSchema>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomerSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const legacy_1 = require("../../helpers/legacy");
|
|
6
|
+
const primitives_1 = require("../primitives");
|
|
7
|
+
exports.CustomerSchema = (0, legacy_1.legacy)(zod_1.z.object({
|
|
8
|
+
id: primitives_1.IdSchema,
|
|
9
|
+
userId: primitives_1.IdSchema,
|
|
10
|
+
firstName: zod_1.z.string(),
|
|
11
|
+
lastName: zod_1.z.string(),
|
|
12
|
+
birthDate: zod_1.z.coerce.date(),
|
|
13
|
+
idNumber: zod_1.z.string(),
|
|
14
|
+
email: zod_1.z.string().email(),
|
|
15
|
+
phone: zod_1.z.string(),
|
|
16
|
+
iban: zod_1.z.string(),
|
|
17
|
+
bic: zod_1.z.string(),
|
|
18
|
+
phoneVerified: zod_1.z.boolean(),
|
|
19
|
+
createdAt: zod_1.z.coerce.date().optional(),
|
|
20
|
+
items: zod_1.z.array(zod_1.z.any()).optional(),
|
|
21
|
+
}));
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CustomFieldIdSchema: z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
defaultValue: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
name: string;
|
|
7
|
+
defaultValue: string | number;
|
|
8
|
+
}, {
|
|
9
|
+
name: string;
|
|
10
|
+
defaultValue: string | number;
|
|
11
|
+
}>]>;
|
|
12
|
+
export type CustomFieldId = z.infer<typeof CustomFieldIdSchema>;
|
|
13
|
+
export declare const SpotConfigSchema: z.ZodArray<z.ZodObject<{
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
start: z.ZodNumber;
|
|
16
|
+
end: z.ZodNumber;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
name: string;
|
|
19
|
+
start: number;
|
|
20
|
+
end: number;
|
|
21
|
+
}, {
|
|
22
|
+
name: string;
|
|
23
|
+
start: number;
|
|
24
|
+
end: number;
|
|
25
|
+
}>, "many">;
|
|
26
|
+
export type SpotConfig = z.infer<typeof SpotConfigSchema>;
|
|
27
|
+
export declare const SpotValueSchema: z.ZodObject<{
|
|
28
|
+
name: z.ZodOptional<z.ZodString>;
|
|
29
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
name?: string | undefined;
|
|
32
|
+
index?: number | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
name?: string | undefined;
|
|
35
|
+
index?: number | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
export type SpotValue = z.infer<typeof SpotValueSchema>;
|
|
38
|
+
export declare const SpotDefaultValueSchema: z.ZodObject<{
|
|
39
|
+
name: z.ZodOptional<z.ZodString>;
|
|
40
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
fill: z.ZodDefault<z.ZodBoolean>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
fill: boolean;
|
|
44
|
+
name?: string | undefined;
|
|
45
|
+
index?: number | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
fill?: boolean | undefined;
|
|
48
|
+
name?: string | undefined;
|
|
49
|
+
index?: number | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
export type SpotDefaultValue = z.infer<typeof SpotDefaultValueSchema>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpotDefaultValueSchema = exports.SpotValueSchema = exports.SpotConfigSchema = exports.CustomFieldIdSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.CustomFieldIdSchema = zod_1.z.union([
|
|
6
|
+
zod_1.z.number(), zod_1.z.string(), zod_1.z.object({
|
|
7
|
+
name: zod_1.z.string(),
|
|
8
|
+
defaultValue: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]),
|
|
9
|
+
}),
|
|
10
|
+
]);
|
|
11
|
+
exports.SpotConfigSchema = zod_1.z.array(zod_1.z.object({
|
|
12
|
+
name: zod_1.z.string(),
|
|
13
|
+
start: zod_1.z.number(),
|
|
14
|
+
end: zod_1.z.number(),
|
|
15
|
+
}));
|
|
16
|
+
exports.SpotValueSchema = zod_1.z.object({
|
|
17
|
+
name: zod_1.z.string().optional(),
|
|
18
|
+
index: zod_1.z.number().optional(),
|
|
19
|
+
});
|
|
20
|
+
exports.SpotDefaultValueSchema = zod_1.z.object({
|
|
21
|
+
name: zod_1.z.string().optional(),
|
|
22
|
+
index: zod_1.z.number().optional(),
|
|
23
|
+
fill: zod_1.z.boolean().default(false),
|
|
24
|
+
});
|
|
@@ -1,40 +1,49 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const ItemFieldTypeSchema: z.ZodEnum<["text", "spot"]>;
|
|
3
|
+
export type ItemFieldType = z.infer<typeof ItemFieldTypeSchema>;
|
|
4
|
+
export declare const ItemFieldSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
6
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
3
7
|
name: z.ZodString;
|
|
4
|
-
|
|
5
|
-
|
|
8
|
+
type: z.ZodEnum<["text", "spot"]>;
|
|
9
|
+
config: z.ZodOptional<z.ZodString>;
|
|
10
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
11
|
+
section: z.ZodString;
|
|
6
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
type: "text" | "spot";
|
|
14
|
+
id: string | number;
|
|
15
|
+
userId: string | number;
|
|
7
16
|
name: string;
|
|
8
|
-
|
|
9
|
-
|
|
17
|
+
section: string;
|
|
18
|
+
defaultValue?: string | undefined;
|
|
19
|
+
config?: string | undefined;
|
|
10
20
|
}, {
|
|
21
|
+
type: "text" | "spot";
|
|
22
|
+
id: string | number;
|
|
23
|
+
userId: string | number;
|
|
11
24
|
name: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export type SpotConfig = z.infer<typeof SpotConfigSchema>;
|
|
16
|
-
export declare const SpotValueSchema: z.ZodObject<{
|
|
17
|
-
name: z.ZodOptional<z.ZodString>;
|
|
18
|
-
index: z.ZodOptional<z.ZodNumber>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
name?: string | undefined;
|
|
21
|
-
index?: number | undefined;
|
|
22
|
-
}, {
|
|
23
|
-
name?: string | undefined;
|
|
24
|
-
index?: number | undefined;
|
|
25
|
+
section: string;
|
|
26
|
+
defaultValue?: string | undefined;
|
|
27
|
+
config?: string | undefined;
|
|
25
28
|
}>;
|
|
26
|
-
export type
|
|
27
|
-
export declare const
|
|
28
|
-
name: z.
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
export type ItemField = z.infer<typeof ItemFieldSchema>;
|
|
30
|
+
export declare const ItemFieldPayloadSchema: z.ZodObject<{
|
|
31
|
+
name: z.ZodString;
|
|
32
|
+
type: z.ZodEnum<["text", "spot"]>;
|
|
33
|
+
config: z.ZodOptional<z.ZodString>;
|
|
34
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
35
|
+
section: z.ZodString;
|
|
31
36
|
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
|
|
33
|
-
name
|
|
34
|
-
|
|
37
|
+
type: "text" | "spot";
|
|
38
|
+
name: string;
|
|
39
|
+
section: string;
|
|
40
|
+
defaultValue?: string | undefined;
|
|
41
|
+
config?: string | undefined;
|
|
35
42
|
}, {
|
|
36
|
-
|
|
37
|
-
name
|
|
38
|
-
|
|
43
|
+
type: "text" | "spot";
|
|
44
|
+
name: string;
|
|
45
|
+
section: string;
|
|
46
|
+
defaultValue?: string | undefined;
|
|
47
|
+
config?: string | undefined;
|
|
39
48
|
}>;
|
|
40
|
-
export type
|
|
49
|
+
export type ItemFieldPayload = z.infer<typeof ItemFieldPayloadSchema>;
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ItemFieldPayloadSchema = exports.ItemFieldSchema = exports.ItemFieldTypeSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
|
|
5
|
+
const primitives_1 = require("../primitives");
|
|
6
|
+
const legacy_1 = require("../../helpers/legacy");
|
|
7
|
+
exports.ItemFieldTypeSchema = zod_1.z.enum([
|
|
8
|
+
"text", "spot",
|
|
9
|
+
]);
|
|
10
|
+
exports.ItemFieldSchema = (0, legacy_1.legacy)(zod_1.z.object({
|
|
11
|
+
id: primitives_1.IdSchema,
|
|
12
|
+
userId: primitives_1.IdSchema,
|
|
6
13
|
name: zod_1.z.string(),
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
type: exports.ItemFieldTypeSchema,
|
|
15
|
+
config: zod_1.z.string().optional(),
|
|
16
|
+
defaultValue: zod_1.z.string().optional(),
|
|
17
|
+
section: zod_1.z.string(),
|
|
9
18
|
}));
|
|
10
|
-
exports.
|
|
11
|
-
name: zod_1.z.string()
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
index: zod_1.z.number().optional(),
|
|
17
|
-
fill: zod_1.z.boolean().default(false),
|
|
19
|
+
exports.ItemFieldPayloadSchema = zod_1.z.object({
|
|
20
|
+
name: zod_1.z.string(),
|
|
21
|
+
type: exports.ItemFieldTypeSchema,
|
|
22
|
+
config: zod_1.z.string().optional(),
|
|
23
|
+
defaultValue: zod_1.z.string().optional(),
|
|
24
|
+
section: zod_1.z.string(),
|
|
18
25
|
});
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const ItemFieldValueSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
4
|
+
itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
5
|
+
fieldId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
6
|
+
value: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
value: string;
|
|
9
|
+
id: string | number;
|
|
10
|
+
itemId: string | number;
|
|
11
|
+
fieldId: string | number;
|
|
12
|
+
}, {
|
|
13
|
+
value: string;
|
|
14
|
+
id: string | number;
|
|
15
|
+
itemId: string | number;
|
|
16
|
+
fieldId: string | number;
|
|
17
|
+
}>;
|
|
18
|
+
export type ItemFieldValue = z.infer<typeof ItemFieldValueSchema>;
|
|
2
19
|
export declare const ItemFieldValuePayloadSchema: z.ZodObject<{
|
|
3
20
|
fieldId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
4
21
|
value: z.ZodString;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ItemFieldValuePayloadSchema = void 0;
|
|
3
|
+
exports.ItemFieldValuePayloadSchema = exports.ItemFieldValueSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const legacy_1 = require("../../helpers/legacy");
|
|
6
6
|
const primitives_1 = require("../primitives");
|
|
7
|
+
exports.ItemFieldValueSchema = (0, legacy_1.legacy)(zod_1.z.object({
|
|
8
|
+
id: primitives_1.IdSchema,
|
|
9
|
+
itemId: primitives_1.IdSchema,
|
|
10
|
+
fieldId: primitives_1.IdSchema,
|
|
11
|
+
value: zod_1.z.string(),
|
|
12
|
+
}));
|
|
7
13
|
exports.ItemFieldValuePayloadSchema = (0, legacy_1.legacy)(zod_1.z.object({
|
|
8
14
|
fieldId: primitives_1.IdSchema,
|
|
9
15
|
value: zod_1.z.string(),
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ItemHistoryTypeSchema: z.ZodEnum<["create", "update", "delete"]>;
|
|
3
|
+
export type ItemHistoryType = z.infer<typeof ItemHistoryTypeSchema>;
|
|
4
|
+
export declare const ItemHistorySchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
7
|
+
type: z.ZodEnum<["create", "update", "delete"]>;
|
|
8
|
+
data: z.ZodString;
|
|
9
|
+
createdAt: z.ZodDate;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
type: "create" | "update" | "delete";
|
|
12
|
+
id: string;
|
|
13
|
+
data: string;
|
|
14
|
+
itemId: string | number;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
}, {
|
|
17
|
+
type: "create" | "update" | "delete";
|
|
18
|
+
id: string;
|
|
19
|
+
data: string;
|
|
20
|
+
itemId: string | number;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
}>;
|
|
23
|
+
export type ItemHistory = z.infer<typeof ItemHistorySchema>;
|
|
24
|
+
export declare const CreateItemHistoryPayloadSchema: z.ZodObject<{
|
|
25
|
+
itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
26
|
+
type: z.ZodEnum<["create", "update", "delete"]>;
|
|
27
|
+
data: z.ZodString;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
type: "create" | "update" | "delete";
|
|
30
|
+
data: string;
|
|
31
|
+
itemId: string | number;
|
|
32
|
+
}, {
|
|
33
|
+
type: "create" | "update" | "delete";
|
|
34
|
+
data: string;
|
|
35
|
+
itemId: string | number;
|
|
36
|
+
}>;
|
|
37
|
+
export type CreateItemHistoryPayload = z.infer<typeof CreateItemHistoryPayloadSchema>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateItemHistoryPayloadSchema = exports.ItemHistorySchema = exports.ItemHistoryTypeSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const primitives_1 = require("../primitives");
|
|
6
|
+
exports.ItemHistoryTypeSchema = zod_1.z.enum(["create", "update", "delete"]);
|
|
7
|
+
exports.ItemHistorySchema = zod_1.z.object({
|
|
8
|
+
id: zod_1.z.string().uuid(),
|
|
9
|
+
itemId: primitives_1.IdSchema,
|
|
10
|
+
type: exports.ItemHistoryTypeSchema,
|
|
11
|
+
data: zod_1.z.string(),
|
|
12
|
+
createdAt: zod_1.z.coerce.date(),
|
|
13
|
+
});
|
|
14
|
+
exports.CreateItemHistoryPayloadSchema = zod_1.z.object({
|
|
15
|
+
itemId: primitives_1.IdSchema,
|
|
16
|
+
type: exports.ItemHistoryTypeSchema,
|
|
17
|
+
data: zod_1.z.string(),
|
|
18
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ItemOnPlatformStatusSchema: z.ZodEnum<["online", "draft", "deleted", "sold", "hidden", "pending", "error", "dispute"]>;
|
|
3
|
+
export type ItemOnPlatformStatus = z.infer<typeof ItemOnPlatformStatusSchema>;
|
|
4
|
+
export declare const ItemOnPlatformSchema: z.ZodObject<{
|
|
5
|
+
itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
6
|
+
accountId: z.ZodString;
|
|
7
|
+
platformId: z.ZodString;
|
|
8
|
+
platformUrl: z.ZodString;
|
|
9
|
+
status: z.ZodEnum<["online", "draft", "deleted", "sold", "hidden", "pending", "error", "dispute"]>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
status: "online" | "draft" | "deleted" | "sold" | "hidden" | "pending" | "error" | "dispute";
|
|
12
|
+
accountId: string;
|
|
13
|
+
itemId: string | number;
|
|
14
|
+
platformId: string;
|
|
15
|
+
platformUrl: string;
|
|
16
|
+
}, {
|
|
17
|
+
status: "online" | "draft" | "deleted" | "sold" | "hidden" | "pending" | "error" | "dispute";
|
|
18
|
+
accountId: string;
|
|
19
|
+
itemId: string | number;
|
|
20
|
+
platformId: string;
|
|
21
|
+
platformUrl: string;
|
|
22
|
+
}>;
|
|
23
|
+
export type ItemOnPlatform = z.infer<typeof ItemOnPlatformSchema>;
|
|
24
|
+
export declare const CreateItemOnPlatformPayloadSchema: z.ZodObject<{
|
|
25
|
+
itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
26
|
+
accountId: z.ZodString;
|
|
27
|
+
platformId: z.ZodString;
|
|
28
|
+
platformUrl: z.ZodString;
|
|
29
|
+
status: z.ZodEnum<["online", "draft", "deleted", "sold", "hidden", "pending", "error", "dispute"]>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
status: "online" | "draft" | "deleted" | "sold" | "hidden" | "pending" | "error" | "dispute";
|
|
32
|
+
accountId: string;
|
|
33
|
+
itemId: string | number;
|
|
34
|
+
platformId: string;
|
|
35
|
+
platformUrl: string;
|
|
36
|
+
}, {
|
|
37
|
+
status: "online" | "draft" | "deleted" | "sold" | "hidden" | "pending" | "error" | "dispute";
|
|
38
|
+
accountId: string;
|
|
39
|
+
itemId: string | number;
|
|
40
|
+
platformId: string;
|
|
41
|
+
platformUrl: string;
|
|
42
|
+
}>;
|
|
43
|
+
export type CreateItemOnPlatformPayload = z.infer<typeof CreateItemOnPlatformPayloadSchema>;
|
|
44
|
+
export declare const UpdateItemOnPlatformPayloadSchema: z.ZodObject<{
|
|
45
|
+
status: z.ZodOptional<z.ZodEnum<["online", "draft", "deleted", "sold", "hidden", "pending", "error", "dispute"]>>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
status?: "online" | "draft" | "deleted" | "sold" | "hidden" | "pending" | "error" | "dispute" | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
status?: "online" | "draft" | "deleted" | "sold" | "hidden" | "pending" | "error" | "dispute" | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
export type UpdateItemOnPlatformPayload = z.infer<typeof UpdateItemOnPlatformPayloadSchema>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateItemOnPlatformPayloadSchema = exports.CreateItemOnPlatformPayloadSchema = exports.ItemOnPlatformSchema = exports.ItemOnPlatformStatusSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const primitives_1 = require("../primitives");
|
|
6
|
+
exports.ItemOnPlatformStatusSchema = zod_1.z.enum([
|
|
7
|
+
"online", "draft", "deleted", "sold", "hidden", "pending", "error", "dispute",
|
|
8
|
+
]);
|
|
9
|
+
exports.ItemOnPlatformSchema = zod_1.z.object({
|
|
10
|
+
itemId: primitives_1.IdSchema,
|
|
11
|
+
accountId: zod_1.z.string().uuid(),
|
|
12
|
+
platformId: zod_1.z.string(),
|
|
13
|
+
platformUrl: zod_1.z.string().url(),
|
|
14
|
+
status: exports.ItemOnPlatformStatusSchema,
|
|
15
|
+
});
|
|
16
|
+
exports.CreateItemOnPlatformPayloadSchema = zod_1.z.object({
|
|
17
|
+
itemId: primitives_1.IdSchema,
|
|
18
|
+
accountId: zod_1.z.string().uuid(),
|
|
19
|
+
platformId: zod_1.z.string(),
|
|
20
|
+
platformUrl: zod_1.z.string().url(),
|
|
21
|
+
status: exports.ItemOnPlatformStatusSchema,
|
|
22
|
+
});
|
|
23
|
+
exports.UpdateItemOnPlatformPayloadSchema = zod_1.z.object({
|
|
24
|
+
status: exports.ItemOnPlatformStatusSchema.optional(),
|
|
25
|
+
});
|
|
@@ -1 +1,172 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const UserMembershipSchema: z.ZodEnum<["free", "monthly", "yearly", "apprentice_monthly", "apprentice_yearly", "confirmed_monthly", "confirmed_yearly"]>;
|
|
3
|
+
export declare const UserSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
5
|
+
email: z.ZodOptional<z.ZodString>;
|
|
6
|
+
username: z.ZodString;
|
|
7
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
8
|
+
password: z.ZodOptional<z.ZodString>;
|
|
9
|
+
anonymous: z.ZodBoolean;
|
|
10
|
+
membership: z.ZodString;
|
|
11
|
+
affiliate: z.ZodString;
|
|
12
|
+
notificationToken: z.ZodOptional<z.ZodString>;
|
|
13
|
+
token: z.ZodOptional<z.ZodString>;
|
|
14
|
+
prevId: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
15
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
16
|
+
countryDialCode: z.ZodOptional<z.ZodString>;
|
|
17
|
+
wallet: z.ZodObject<{
|
|
18
|
+
profit: z.ZodNumber;
|
|
19
|
+
revenue: z.ZodNumber;
|
|
20
|
+
currentMonthProfit: z.ZodNumber;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
profit: number;
|
|
23
|
+
revenue: number;
|
|
24
|
+
currentMonthProfit: number;
|
|
25
|
+
}, {
|
|
26
|
+
profit: number;
|
|
27
|
+
revenue: number;
|
|
28
|
+
currentMonthProfit: number;
|
|
29
|
+
}>;
|
|
30
|
+
isPro: z.ZodBoolean;
|
|
31
|
+
isShop: z.ZodBoolean;
|
|
32
|
+
customers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
33
|
+
id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
34
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
35
|
+
firstName: z.ZodString;
|
|
36
|
+
lastName: z.ZodString;
|
|
37
|
+
birthDate: z.ZodDate;
|
|
38
|
+
idNumber: z.ZodString;
|
|
39
|
+
email: z.ZodString;
|
|
40
|
+
phone: z.ZodString;
|
|
41
|
+
iban: z.ZodString;
|
|
42
|
+
bic: z.ZodString;
|
|
43
|
+
phoneVerified: z.ZodBoolean;
|
|
44
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
45
|
+
items: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
id: string | number;
|
|
48
|
+
userId: string | number;
|
|
49
|
+
firstName: string;
|
|
50
|
+
lastName: string;
|
|
51
|
+
birthDate: Date;
|
|
52
|
+
idNumber: string;
|
|
53
|
+
email: string;
|
|
54
|
+
phone: string;
|
|
55
|
+
iban: string;
|
|
56
|
+
bic: string;
|
|
57
|
+
phoneVerified: boolean;
|
|
58
|
+
items?: any[] | undefined;
|
|
59
|
+
createdAt?: Date | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
id: string | number;
|
|
62
|
+
userId: string | number;
|
|
63
|
+
firstName: string;
|
|
64
|
+
lastName: string;
|
|
65
|
+
birthDate: Date;
|
|
66
|
+
idNumber: string;
|
|
67
|
+
email: string;
|
|
68
|
+
phone: string;
|
|
69
|
+
iban: string;
|
|
70
|
+
bic: string;
|
|
71
|
+
phoneVerified: boolean;
|
|
72
|
+
items?: any[] | undefined;
|
|
73
|
+
createdAt?: Date | undefined;
|
|
74
|
+
}>, "many">>;
|
|
75
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodObject<{
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
defaultValue: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
name: string;
|
|
80
|
+
defaultValue: string | number;
|
|
81
|
+
}, {
|
|
82
|
+
name: string;
|
|
83
|
+
defaultValue: string | number;
|
|
84
|
+
}>]>, "many">>;
|
|
85
|
+
createdAt: z.ZodDate;
|
|
86
|
+
updatedAt: z.ZodDate;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
id: string | number;
|
|
89
|
+
createdAt: Date;
|
|
90
|
+
username: string;
|
|
91
|
+
anonymous: boolean;
|
|
92
|
+
membership: string;
|
|
93
|
+
affiliate: string;
|
|
94
|
+
wallet: {
|
|
95
|
+
profit: number;
|
|
96
|
+
revenue: number;
|
|
97
|
+
currentMonthProfit: number;
|
|
98
|
+
};
|
|
99
|
+
isPro: boolean;
|
|
100
|
+
isShop: boolean;
|
|
101
|
+
updatedAt: Date;
|
|
102
|
+
firstName?: string | undefined;
|
|
103
|
+
email?: string | undefined;
|
|
104
|
+
password?: string | undefined;
|
|
105
|
+
notificationToken?: string | undefined;
|
|
106
|
+
token?: string | undefined;
|
|
107
|
+
prevId?: string | number | undefined;
|
|
108
|
+
phoneNumber?: string | undefined;
|
|
109
|
+
countryDialCode?: string | undefined;
|
|
110
|
+
customers?: {
|
|
111
|
+
id: string | number;
|
|
112
|
+
userId: string | number;
|
|
113
|
+
firstName: string;
|
|
114
|
+
lastName: string;
|
|
115
|
+
birthDate: Date;
|
|
116
|
+
idNumber: string;
|
|
117
|
+
email: string;
|
|
118
|
+
phone: string;
|
|
119
|
+
iban: string;
|
|
120
|
+
bic: string;
|
|
121
|
+
phoneVerified: boolean;
|
|
122
|
+
items?: any[] | undefined;
|
|
123
|
+
createdAt?: Date | undefined;
|
|
124
|
+
}[] | undefined;
|
|
125
|
+
fields?: (string | number | {
|
|
126
|
+
name: string;
|
|
127
|
+
defaultValue: string | number;
|
|
128
|
+
})[] | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
id: string | number;
|
|
131
|
+
createdAt: Date;
|
|
132
|
+
username: string;
|
|
133
|
+
anonymous: boolean;
|
|
134
|
+
membership: string;
|
|
135
|
+
affiliate: string;
|
|
136
|
+
wallet: {
|
|
137
|
+
profit: number;
|
|
138
|
+
revenue: number;
|
|
139
|
+
currentMonthProfit: number;
|
|
140
|
+
};
|
|
141
|
+
isPro: boolean;
|
|
142
|
+
isShop: boolean;
|
|
143
|
+
updatedAt: Date;
|
|
144
|
+
firstName?: string | undefined;
|
|
145
|
+
email?: string | undefined;
|
|
146
|
+
password?: string | undefined;
|
|
147
|
+
notificationToken?: string | undefined;
|
|
148
|
+
token?: string | undefined;
|
|
149
|
+
prevId?: string | number | undefined;
|
|
150
|
+
phoneNumber?: string | undefined;
|
|
151
|
+
countryDialCode?: string | undefined;
|
|
152
|
+
customers?: {
|
|
153
|
+
id: string | number;
|
|
154
|
+
userId: string | number;
|
|
155
|
+
firstName: string;
|
|
156
|
+
lastName: string;
|
|
157
|
+
birthDate: Date;
|
|
158
|
+
idNumber: string;
|
|
159
|
+
email: string;
|
|
160
|
+
phone: string;
|
|
161
|
+
iban: string;
|
|
162
|
+
bic: string;
|
|
163
|
+
phoneVerified: boolean;
|
|
164
|
+
items?: any[] | undefined;
|
|
165
|
+
createdAt?: Date | undefined;
|
|
166
|
+
}[] | undefined;
|
|
167
|
+
fields?: (string | number | {
|
|
168
|
+
name: string;
|
|
169
|
+
defaultValue: string | number;
|
|
170
|
+
})[] | undefined;
|
|
171
|
+
}>;
|
|
172
|
+
export type User = z.infer<typeof UserSchema>;
|
|
@@ -1,2 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserSchema = exports.UserMembershipSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const legacy_1 = require("../../helpers/legacy");
|
|
6
|
+
const wallet_1 = require("./wallet");
|
|
7
|
+
const customer_1 = require("../customers/customer");
|
|
8
|
+
const primitives_1 = require("../primitives");
|
|
9
|
+
const customField_1 = require("../items/customField");
|
|
10
|
+
exports.UserMembershipSchema = zod_1.z.enum([
|
|
11
|
+
"free", "monthly", "yearly", "apprentice_monthly", "apprentice_yearly", "confirmed_monthly", "confirmed_yearly",
|
|
12
|
+
]);
|
|
13
|
+
exports.UserSchema = (0, legacy_1.legacy)(zod_1.z.object({
|
|
14
|
+
id: primitives_1.IdSchema,
|
|
15
|
+
email: zod_1.z.string().optional(),
|
|
16
|
+
username: zod_1.z.string(),
|
|
17
|
+
firstName: zod_1.z.string().optional(),
|
|
18
|
+
password: zod_1.z.string().optional(),
|
|
19
|
+
anonymous: zod_1.z.boolean(),
|
|
20
|
+
membership: zod_1.z.string(),
|
|
21
|
+
affiliate: zod_1.z.string(),
|
|
22
|
+
notificationToken: zod_1.z.string().optional(),
|
|
23
|
+
token: zod_1.z.string().optional(),
|
|
24
|
+
prevId: primitives_1.IdSchema.optional(),
|
|
25
|
+
phoneNumber: zod_1.z.string().optional(),
|
|
26
|
+
countryDialCode: zod_1.z.string().optional(),
|
|
27
|
+
wallet: wallet_1.WalletSchema,
|
|
28
|
+
isPro: zod_1.z.boolean(),
|
|
29
|
+
isShop: zod_1.z.boolean(),
|
|
30
|
+
customers: zod_1.z.array(customer_1.CustomerSchema).optional(),
|
|
31
|
+
fields: zod_1.z.array(customField_1.CustomFieldIdSchema).optional(),
|
|
32
|
+
createdAt: zod_1.z.coerce.date(),
|
|
33
|
+
updatedAt: zod_1.z.coerce.date(),
|
|
34
|
+
}));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const UserOnPlatformSchema: z.ZodObject<{
|
|
3
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
4
|
+
accountId: z.ZodString;
|
|
5
|
+
platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
platform: "VINTED" | "SHOPIFY";
|
|
8
|
+
accountId: string;
|
|
9
|
+
userId: string | number;
|
|
10
|
+
}, {
|
|
11
|
+
platform: "VINTED" | "SHOPIFY";
|
|
12
|
+
accountId: string;
|
|
13
|
+
userId: string | number;
|
|
14
|
+
}>;
|
|
15
|
+
export type UserOnPlatform = z.infer<typeof UserOnPlatformSchema>;
|
|
16
|
+
export declare const CreateUserOnPlatformPayloadSchema: z.ZodObject<{
|
|
17
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
18
|
+
accountId: z.ZodString;
|
|
19
|
+
platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
platform: "VINTED" | "SHOPIFY";
|
|
22
|
+
accountId: string;
|
|
23
|
+
userId: string | number;
|
|
24
|
+
}, {
|
|
25
|
+
platform: "VINTED" | "SHOPIFY";
|
|
26
|
+
accountId: string;
|
|
27
|
+
userId: string | number;
|
|
28
|
+
}>;
|
|
29
|
+
export type CreateUserOnPlatformPayload = z.infer<typeof CreateUserOnPlatformPayloadSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateUserOnPlatformPayloadSchema = exports.UserOnPlatformSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const primitives_1 = require("../primitives");
|
|
6
|
+
const account_1 = require("../connector/account");
|
|
7
|
+
exports.UserOnPlatformSchema = zod_1.z.object({
|
|
8
|
+
userId: primitives_1.IdSchema,
|
|
9
|
+
accountId: zod_1.z.string().uuid(),
|
|
10
|
+
platform: account_1.ConnectorAccountPlatformSchema,
|
|
11
|
+
});
|
|
12
|
+
exports.CreateUserOnPlatformPayloadSchema = zod_1.z.object({
|
|
13
|
+
userId: primitives_1.IdSchema,
|
|
14
|
+
accountId: zod_1.z.string().uuid(),
|
|
15
|
+
platform: account_1.ConnectorAccountPlatformSchema,
|
|
16
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const WalletSchema: z.ZodObject<{
|
|
3
|
+
profit: z.ZodNumber;
|
|
4
|
+
revenue: z.ZodNumber;
|
|
5
|
+
currentMonthProfit: z.ZodNumber;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
profit: number;
|
|
8
|
+
revenue: number;
|
|
9
|
+
currentMonthProfit: number;
|
|
10
|
+
}, {
|
|
11
|
+
profit: number;
|
|
12
|
+
revenue: number;
|
|
13
|
+
currentMonthProfit: number;
|
|
14
|
+
}>;
|
|
15
|
+
export type Wallet = z.infer<typeof WalletSchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WalletSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.WalletSchema = zod_1.z.object({
|
|
6
|
+
profit: zod_1.z.number(),
|
|
7
|
+
revenue: zod_1.z.number(),
|
|
8
|
+
currentMonthProfit: zod_1.z.number(),
|
|
9
|
+
});
|