@floristcloud/api-lib 1.2.44 → 1.2.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/build/commands/product/get-product-list-filters-values.query.js +2 -0
- package/build/commands/product/get-product-list.query.js +1 -0
- package/build/commands/product/webshop/get-client-product-list-filters-values.query.js +2 -0
- package/build/commands/product/webshop/get-product-list-for-client.query.js +1 -0
- package/build/constant/error.js +2 -0
- package/commands/product/get-product-list-filters-values.query.ts +2 -0
- package/commands/product/get-product-list.query.ts +1 -0
- package/commands/product/webshop/get-client-product-list-filters-values.query.ts +2 -0
- package/commands/product/webshop/get-product-list-for-client.query.ts +1 -0
- package/constant/error.ts +2 -0
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ const GetProductListFiltersValuesRequestSchema = zod_1.z.object({
|
|
|
10
10
|
sizes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
11
11
|
colors: zod_1.z.array(zod_1.z.string()).optional(),
|
|
12
12
|
growers: zod_1.z.array(zod_1.z.string()).optional(),
|
|
13
|
+
countries: zod_1.z.array(zod_1.z.string()).optional(),
|
|
13
14
|
stock: zod_1.z.coerce.boolean().optional(),
|
|
14
15
|
onlyAvailable: zod_1.z.coerce.boolean().optional(),
|
|
15
16
|
});
|
|
@@ -28,6 +29,7 @@ const GetProductListFiltersValuesResponseSchema = zod_1.z.object({
|
|
|
28
29
|
sizes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
29
30
|
colors: zod_1.z.array(zod_1.z.string()).optional(),
|
|
30
31
|
growers: zod_1.z.array(zod_1.z.string()).optional(),
|
|
32
|
+
countries: zod_1.z.array(zod_1.z.string()).optional(),
|
|
31
33
|
stock: zod_1.z.array(zod_1.z.coerce.boolean()).optional(),
|
|
32
34
|
}),
|
|
33
35
|
});
|
|
@@ -12,6 +12,7 @@ const GetProductListRequestSchema = zod_1.z.object({
|
|
|
12
12
|
onlyAvailable: zod_1.z.coerce.boolean().optional(),
|
|
13
13
|
categoryUUID: zod_1.z.string().optional(),
|
|
14
14
|
grower: zod_1.z.string().optional(),
|
|
15
|
+
country: zod_1.z.string().optional(),
|
|
15
16
|
size: zod_1.z.string().optional(),
|
|
16
17
|
deliveryDates: zod_1.z.array(zod_1.z.coerce.date()).optional(),
|
|
17
18
|
});
|
|
@@ -9,6 +9,7 @@ const GetClientProductListFiltersValuesRequestSchema = zod_1.z.object({
|
|
|
9
9
|
sizes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
10
10
|
colors: zod_1.z.array(zod_1.z.string()).optional(),
|
|
11
11
|
growers: zod_1.z.array(zod_1.z.string()).optional(),
|
|
12
|
+
countries: zod_1.z.array(zod_1.z.string()).optional(),
|
|
12
13
|
stock: zod_1.z
|
|
13
14
|
.string()
|
|
14
15
|
.transform(val => (val === 'true' ? true : val === 'false' ? false : undefined))
|
|
@@ -21,6 +22,7 @@ const GetClientProductListFiltersValuesResponseSchema = zod_1.z.object({
|
|
|
21
22
|
sizes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
22
23
|
colors: zod_1.z.array(zod_1.z.string()).optional(),
|
|
23
24
|
growers: zod_1.z.array(zod_1.z.string()).optional(),
|
|
25
|
+
countries: zod_1.z.array(zod_1.z.string()).optional(),
|
|
24
26
|
stock: zod_1.z.array(zod_1.z.coerce.boolean()).optional(),
|
|
25
27
|
}),
|
|
26
28
|
});
|
|
@@ -14,6 +14,7 @@ const GetProductListForClientRequestSchema = zod_1.z.object({
|
|
|
14
14
|
sizes: zod_1.z.string().array().optional(),
|
|
15
15
|
colors: zod_1.z.string().array().optional(),
|
|
16
16
|
growers: zod_1.z.string().array().optional(),
|
|
17
|
+
countries: zod_1.z.string().array().optional(),
|
|
17
18
|
categoryUUID: zod_1.z.string().optional(),
|
|
18
19
|
typeUUID: zod_1.z.string().optional(),
|
|
19
20
|
searchQuery: zod_1.z.string().optional(),
|
package/build/constant/error.js
CHANGED
|
@@ -94,6 +94,8 @@ exports.ERRORS = {
|
|
|
94
94
|
USER_MISSING_EMAIL_OR_PHONE: { code: 'U012', message: 'Не указан email или телефон ', httpCode: 400 },
|
|
95
95
|
USER_ROLE_MISMATCH_CLIENT: { code: 'U013', message: 'User does not have BUYER role required for client login', httpCode: 403 },
|
|
96
96
|
USER_ROLE_MISMATCH_EMPLOYEE: { code: 'U014', message: 'User does not have employee role required for employee login', httpCode: 403 },
|
|
97
|
+
USER_CANNOT_DEACTIVATE_SELF: { code: 'U015', message: 'You cannot deactivate your own account', httpCode: 400 },
|
|
98
|
+
USER_CANNOT_REMOVE_OWN_ADMIN_ROLE: { code: 'U016', message: 'You cannot remove the ADMIN role from your own account', httpCode: 400 },
|
|
97
99
|
//AUTH
|
|
98
100
|
FAILED_TO_UPDATE: { code: 'A010', message: 'User update failed', httpCode: 500 },
|
|
99
101
|
RESTORE_TOKEN_ERROR: { code: 'A012', message: 'Invalid recovery token', httpCode: 500 },
|
|
@@ -8,6 +8,7 @@ const GetProductListFiltersValuesRequestSchema = z.object({
|
|
|
8
8
|
sizes: z.array(z.string()).optional(),
|
|
9
9
|
colors: z.array(z.string()).optional(),
|
|
10
10
|
growers: z.array(z.string()).optional(),
|
|
11
|
+
countries: z.array(z.string()).optional(),
|
|
11
12
|
stock: z.coerce.boolean().optional(),
|
|
12
13
|
onlyAvailable: z.coerce.boolean().optional(),
|
|
13
14
|
});
|
|
@@ -29,6 +30,7 @@ const GetProductListFiltersValuesResponseSchema = z.object({
|
|
|
29
30
|
sizes: z.array(z.string()).optional(),
|
|
30
31
|
colors: z.array(z.string()).optional(),
|
|
31
32
|
growers: z.array(z.string()).optional(),
|
|
33
|
+
countries: z.array(z.string()).optional(),
|
|
32
34
|
stock: z.array(z.coerce.boolean()).optional(),
|
|
33
35
|
}),
|
|
34
36
|
});
|
|
@@ -10,6 +10,7 @@ const GetProductListRequestSchema = z.object({
|
|
|
10
10
|
onlyAvailable: z.coerce.boolean().optional(),
|
|
11
11
|
categoryUUID: z.string().optional(),
|
|
12
12
|
grower: z.string().optional(),
|
|
13
|
+
country: z.string().optional(),
|
|
13
14
|
size: z.string().optional(),
|
|
14
15
|
deliveryDates: z.array(z.coerce.date()).optional(),
|
|
15
16
|
});
|
|
@@ -7,6 +7,7 @@ const GetClientProductListFiltersValuesRequestSchema = z.object({
|
|
|
7
7
|
sizes: z.array(z.string()).optional(),
|
|
8
8
|
colors: z.array(z.string()).optional(),
|
|
9
9
|
growers: z.array(z.string()).optional(),
|
|
10
|
+
countries: z.array(z.string()).optional(),
|
|
10
11
|
stock: z
|
|
11
12
|
.string()
|
|
12
13
|
.transform(val => (val === 'true' ? true : val === 'false' ? false : undefined))
|
|
@@ -20,6 +21,7 @@ const GetClientProductListFiltersValuesResponseSchema = z.object({
|
|
|
20
21
|
sizes: z.array(z.string()).optional(),
|
|
21
22
|
colors: z.array(z.string()).optional(),
|
|
22
23
|
growers: z.array(z.string()).optional(),
|
|
24
|
+
countries: z.array(z.string()).optional(),
|
|
23
25
|
stock: z.array(z.coerce.boolean()).optional(),
|
|
24
26
|
}),
|
|
25
27
|
});
|
|
@@ -12,6 +12,7 @@ const GetProductListForClientRequestSchema = z.object({
|
|
|
12
12
|
sizes: z.string().array().optional(),
|
|
13
13
|
colors: z.string().array().optional(),
|
|
14
14
|
growers: z.string().array().optional(),
|
|
15
|
+
countries: z.string().array().optional(),
|
|
15
16
|
categoryUUID: z.string().optional(),
|
|
16
17
|
typeUUID: z.string().optional(),
|
|
17
18
|
searchQuery: z.string().optional(),
|
package/constant/error.ts
CHANGED
|
@@ -97,6 +97,8 @@ export const ERRORS = {
|
|
|
97
97
|
USER_MISSING_EMAIL_OR_PHONE: { code: 'U012', message: 'Не указан email или телефон ', httpCode: 400 },
|
|
98
98
|
USER_ROLE_MISMATCH_CLIENT: { code: 'U013', message: 'User does not have BUYER role required for client login', httpCode: 403 },
|
|
99
99
|
USER_ROLE_MISMATCH_EMPLOYEE: { code: 'U014', message: 'User does not have employee role required for employee login', httpCode: 403 },
|
|
100
|
+
USER_CANNOT_DEACTIVATE_SELF: { code: 'U015', message: 'You cannot deactivate your own account', httpCode: 400 },
|
|
101
|
+
USER_CANNOT_REMOVE_OWN_ADMIN_ROLE: { code: 'U016', message: 'You cannot remove the ADMIN role from your own account', httpCode: 400 },
|
|
100
102
|
|
|
101
103
|
//AUTH
|
|
102
104
|
FAILED_TO_UPDATE: { code: 'A010', message: 'User update failed', httpCode: 500 },
|