controlresell 0.0.6 → 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/models/items/customField.d.ts +39 -0
- package/dist/models/items/customField.js +15 -1
- 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/users/user.d.ts +28 -9
- package/dist/models/users/user.js +13 -4
- package/package.json +1 -1
|
@@ -10,3 +10,42 @@ export declare const CustomFieldIdSchema: z.ZodUnion<[z.ZodNumber, z.ZodString,
|
|
|
10
10
|
defaultValue: string | number;
|
|
11
11
|
}>]>;
|
|
12
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>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CustomFieldIdSchema = void 0;
|
|
3
|
+
exports.SpotDefaultValueSchema = exports.SpotValueSchema = exports.SpotConfigSchema = exports.CustomFieldIdSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.CustomFieldIdSchema = zod_1.z.union([
|
|
6
6
|
zod_1.z.number(), zod_1.z.string(), zod_1.z.object({
|
|
@@ -8,3 +8,17 @@ exports.CustomFieldIdSchema = zod_1.z.union([
|
|
|
8
8
|
defaultValue: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]),
|
|
9
9
|
}),
|
|
10
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(),
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const UserMembershipSchema: z.ZodEnum<["free", "monthly", "yearly", "apprentice_monthly", "apprentice_yearly", "confirmed_monthly", "confirmed_yearly"]>;
|
|
2
3
|
export declare const UserSchema: z.ZodObject<{
|
|
3
4
|
id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
4
|
-
email: z.ZodString
|
|
5
|
+
email: z.ZodOptional<z.ZodString>;
|
|
5
6
|
username: z.ZodString;
|
|
6
|
-
firstName: z.ZodString
|
|
7
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
7
8
|
password: z.ZodOptional<z.ZodString>;
|
|
8
9
|
anonymous: z.ZodBoolean;
|
|
9
10
|
membership: z.ZodString;
|
|
10
11
|
affiliate: z.ZodString;
|
|
11
|
-
notificationToken: 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>;
|
|
12
17
|
wallet: z.ZodObject<{
|
|
13
18
|
profit: z.ZodNumber;
|
|
14
19
|
revenue: z.ZodNumber;
|
|
@@ -77,15 +82,15 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
77
82
|
name: string;
|
|
78
83
|
defaultValue: string | number;
|
|
79
84
|
}>]>, "many">>;
|
|
85
|
+
createdAt: z.ZodDate;
|
|
86
|
+
updatedAt: z.ZodDate;
|
|
80
87
|
}, "strip", z.ZodTypeAny, {
|
|
81
88
|
id: string | number;
|
|
82
|
-
|
|
83
|
-
email: string;
|
|
89
|
+
createdAt: Date;
|
|
84
90
|
username: string;
|
|
85
91
|
anonymous: boolean;
|
|
86
92
|
membership: string;
|
|
87
93
|
affiliate: string;
|
|
88
|
-
notificationToken: string;
|
|
89
94
|
wallet: {
|
|
90
95
|
profit: number;
|
|
91
96
|
revenue: number;
|
|
@@ -93,7 +98,15 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
93
98
|
};
|
|
94
99
|
isPro: boolean;
|
|
95
100
|
isShop: boolean;
|
|
101
|
+
updatedAt: Date;
|
|
102
|
+
firstName?: string | undefined;
|
|
103
|
+
email?: string | undefined;
|
|
96
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;
|
|
97
110
|
customers?: {
|
|
98
111
|
id: string | number;
|
|
99
112
|
userId: string | number;
|
|
@@ -115,13 +128,11 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
115
128
|
})[] | undefined;
|
|
116
129
|
}, {
|
|
117
130
|
id: string | number;
|
|
118
|
-
|
|
119
|
-
email: string;
|
|
131
|
+
createdAt: Date;
|
|
120
132
|
username: string;
|
|
121
133
|
anonymous: boolean;
|
|
122
134
|
membership: string;
|
|
123
135
|
affiliate: string;
|
|
124
|
-
notificationToken: string;
|
|
125
136
|
wallet: {
|
|
126
137
|
profit: number;
|
|
127
138
|
revenue: number;
|
|
@@ -129,7 +140,15 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
129
140
|
};
|
|
130
141
|
isPro: boolean;
|
|
131
142
|
isShop: boolean;
|
|
143
|
+
updatedAt: Date;
|
|
144
|
+
firstName?: string | undefined;
|
|
145
|
+
email?: string | undefined;
|
|
132
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;
|
|
133
152
|
customers?: {
|
|
134
153
|
id: string | number;
|
|
135
154
|
userId: string | number;
|
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserSchema = void 0;
|
|
3
|
+
exports.UserSchema = exports.UserMembershipSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const legacy_1 = require("../../helpers/legacy");
|
|
6
6
|
const wallet_1 = require("./wallet");
|
|
7
7
|
const customer_1 = require("../customers/customer");
|
|
8
8
|
const primitives_1 = require("../primitives");
|
|
9
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
|
+
]);
|
|
10
13
|
exports.UserSchema = (0, legacy_1.legacy)(zod_1.z.object({
|
|
11
14
|
id: primitives_1.IdSchema,
|
|
12
|
-
email: zod_1.z.string(),
|
|
15
|
+
email: zod_1.z.string().optional(),
|
|
13
16
|
username: zod_1.z.string(),
|
|
14
|
-
firstName: zod_1.z.string(),
|
|
17
|
+
firstName: zod_1.z.string().optional(),
|
|
15
18
|
password: zod_1.z.string().optional(),
|
|
16
19
|
anonymous: zod_1.z.boolean(),
|
|
17
20
|
membership: zod_1.z.string(),
|
|
18
21
|
affiliate: zod_1.z.string(),
|
|
19
|
-
notificationToken: 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(),
|
|
20
27
|
wallet: wallet_1.WalletSchema,
|
|
21
28
|
isPro: zod_1.z.boolean(),
|
|
22
29
|
isShop: zod_1.z.boolean(),
|
|
23
30
|
customers: zod_1.z.array(customer_1.CustomerSchema).optional(),
|
|
24
31
|
fields: zod_1.z.array(customField_1.CustomFieldIdSchema).optional(),
|
|
32
|
+
createdAt: zod_1.z.coerce.date(),
|
|
33
|
+
updatedAt: zod_1.z.coerce.date(),
|
|
25
34
|
}));
|