@floristcloud/api-lib 1.0.32 → 1.0.33
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/constant/error.js
CHANGED
|
@@ -338,6 +338,16 @@ exports.ERRORS = {
|
|
|
338
338
|
message: 'Order status is balance affecting, merge not allowed',
|
|
339
339
|
httpCode: 400,
|
|
340
340
|
},
|
|
341
|
+
ORDER_MERGE_DELIVERY_MERGE: {
|
|
342
|
+
code: 'O034',
|
|
343
|
+
message: 'Multiple orders have delivery. Comments will be merged, but final delivery cost will be as in the target order.',
|
|
344
|
+
httpCode: 400,
|
|
345
|
+
},
|
|
346
|
+
ORDER_MERGE_DELIVERY_TRANSFER: {
|
|
347
|
+
code: 'O035',
|
|
348
|
+
message: 'Delivery information will be transferred to the target order.',
|
|
349
|
+
httpCode: 400,
|
|
350
|
+
},
|
|
341
351
|
//ORDER DELIVERY
|
|
342
352
|
ORDER_DELIVERY_ALREADY_EXIST: { code: 'OD006', message: 'Delivery for the order already exists', httpCode: 409 },
|
|
343
353
|
ORDER_DELIVERY_NOT_CREATED: { code: 'OD007', message: 'Failed to create order delivery', httpCode: 500 },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateSettingsRequestSchema = exports.CreateSettingsSchema = exports.SettingsForAdminSchema = exports.SettingsSchema = exports.SettingsWorkingHoursSchema = void 0;
|
|
3
|
+
exports.UpdateSettingsRequestSchema = exports.CreateSettingsSchema = exports.SettingsForAdminSchema = exports.SettingsSchema = exports.ImportantMessageSchema = exports.SettingsWorkingHoursSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const enum_1 = require("../../enum");
|
|
6
6
|
const webshop_main_display_mode_enum_1 = require("../../enum/webshop-main-display-mode.enum");
|
|
@@ -15,6 +15,11 @@ exports.SettingsWorkingHoursSchema = zod_1.z.object({
|
|
|
15
15
|
createdAt: zod_1.z.coerce.date(),
|
|
16
16
|
updatedAt: zod_1.z.coerce.date(),
|
|
17
17
|
});
|
|
18
|
+
exports.ImportantMessageSchema = zod_1.z.object({
|
|
19
|
+
title: zod_1.z.string(),
|
|
20
|
+
description: zod_1.z.string(),
|
|
21
|
+
isActive: zod_1.z.boolean(),
|
|
22
|
+
});
|
|
18
23
|
exports.SettingsSchema = zod_1.z.object({
|
|
19
24
|
uuid: zod_1.z.string(),
|
|
20
25
|
language: zod_1.z.nativeEnum(enum_1.LanguageEnum),
|
|
@@ -71,6 +76,7 @@ exports.SettingsSchema = zod_1.z.object({
|
|
|
71
76
|
loginImageKeyList: zod_1.z.array(zod_1.z.string()),
|
|
72
77
|
chatHasManagerMode: zod_1.z.nativeEnum(enum_1.ChatHasManagerModeEnum),
|
|
73
78
|
chatNoManagerMode: zod_1.z.nativeEnum(enum_1.ChatNoManagerModeEnum),
|
|
79
|
+
importantMessage: exports.ImportantMessageSchema.nullable(),
|
|
74
80
|
});
|
|
75
81
|
exports.SettingsForAdminSchema = exports.SettingsSchema.extend({
|
|
76
82
|
// post terminal settings
|
|
@@ -143,6 +149,7 @@ exports.CreateSettingsSchema = zod_1.z.object({
|
|
|
143
149
|
loginImageKeyList: zod_1.z.array(zod_1.z.string()).optional(),
|
|
144
150
|
chatHasManagerMode: zod_1.z.nativeEnum(enum_1.ChatHasManagerModeEnum).default(enum_1.ChatHasManagerModeEnum.ALL_RW),
|
|
145
151
|
chatNoManagerMode: zod_1.z.nativeEnum(enum_1.ChatNoManagerModeEnum).default(enum_1.ChatNoManagerModeEnum.ANY_MANAGER),
|
|
152
|
+
importantMessage: exports.ImportantMessageSchema.nullable().optional(),
|
|
146
153
|
});
|
|
147
154
|
exports.UpdateSettingsRequestSchema = zod_1.z.object({
|
|
148
155
|
language: zod_1.z.nativeEnum(enum_1.LanguageEnum),
|
|
@@ -196,6 +203,7 @@ exports.UpdateSettingsRequestSchema = zod_1.z.object({
|
|
|
196
203
|
loginImageKeyList: zod_1.z.array(zod_1.z.string()).optional(),
|
|
197
204
|
chatHasManagerMode: zod_1.z.nativeEnum(enum_1.ChatHasManagerModeEnum).default(enum_1.ChatHasManagerModeEnum.ALL_RW).optional(),
|
|
198
205
|
chatNoManagerMode: zod_1.z.nativeEnum(enum_1.ChatNoManagerModeEnum).default(enum_1.ChatNoManagerModeEnum.ANY_MANAGER).optional(),
|
|
206
|
+
importantMessage: exports.ImportantMessageSchema.nullable().optional(),
|
|
199
207
|
// post terminal settings
|
|
200
208
|
vatTag: zod_1.z.string().nullable().optional(),
|
|
201
209
|
taxMode: zod_1.z.string().nullable().optional(),
|
package/constant/error.ts
CHANGED
|
@@ -352,6 +352,16 @@ export const ERRORS = {
|
|
|
352
352
|
message: 'Order status is balance affecting, merge not allowed',
|
|
353
353
|
httpCode: 400,
|
|
354
354
|
},
|
|
355
|
+
ORDER_MERGE_DELIVERY_MERGE: {
|
|
356
|
+
code: 'O034',
|
|
357
|
+
message: 'Multiple orders have delivery. Comments will be merged, but final delivery cost will be as in the target order.',
|
|
358
|
+
httpCode: 400,
|
|
359
|
+
},
|
|
360
|
+
ORDER_MERGE_DELIVERY_TRANSFER: {
|
|
361
|
+
code: 'O035',
|
|
362
|
+
message: 'Delivery information will be transferred to the target order.',
|
|
363
|
+
httpCode: 400,
|
|
364
|
+
},
|
|
355
365
|
|
|
356
366
|
//ORDER DELIVERY
|
|
357
367
|
ORDER_DELIVERY_ALREADY_EXIST: { code: 'OD006', message: 'Delivery for the order already exists', httpCode: 409 },
|
package/package.json
CHANGED
|
@@ -14,6 +14,12 @@ export const SettingsWorkingHoursSchema = z.object({
|
|
|
14
14
|
updatedAt: z.coerce.date(),
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
+
export const ImportantMessageSchema = z.object({
|
|
18
|
+
title: z.string(),
|
|
19
|
+
description: z.string(),
|
|
20
|
+
isActive: z.boolean(),
|
|
21
|
+
});
|
|
22
|
+
|
|
17
23
|
export const SettingsSchema = z.object({
|
|
18
24
|
uuid: z.string(),
|
|
19
25
|
language: z.nativeEnum(LanguageEnum),
|
|
@@ -70,6 +76,7 @@ export const SettingsSchema = z.object({
|
|
|
70
76
|
loginImageKeyList: z.array(z.string()),
|
|
71
77
|
chatHasManagerMode: z.nativeEnum(ChatHasManagerModeEnum),
|
|
72
78
|
chatNoManagerMode: z.nativeEnum(ChatNoManagerModeEnum),
|
|
79
|
+
importantMessage: ImportantMessageSchema.nullable(),
|
|
73
80
|
});
|
|
74
81
|
|
|
75
82
|
export const SettingsForAdminSchema = SettingsSchema.extend({
|
|
@@ -146,6 +153,7 @@ export const CreateSettingsSchema = z.object({
|
|
|
146
153
|
loginImageKeyList: z.array(z.string()).optional(),
|
|
147
154
|
chatHasManagerMode: z.nativeEnum(ChatHasManagerModeEnum).default(ChatHasManagerModeEnum.ALL_RW),
|
|
148
155
|
chatNoManagerMode: z.nativeEnum(ChatNoManagerModeEnum).default(ChatNoManagerModeEnum.ANY_MANAGER),
|
|
156
|
+
importantMessage: ImportantMessageSchema.nullable().optional(),
|
|
149
157
|
});
|
|
150
158
|
|
|
151
159
|
export const UpdateSettingsRequestSchema = z.object({
|
|
@@ -202,6 +210,7 @@ export const UpdateSettingsRequestSchema = z.object({
|
|
|
202
210
|
loginImageKeyList: z.array(z.string()).optional(),
|
|
203
211
|
chatHasManagerMode: z.nativeEnum(ChatHasManagerModeEnum).default(ChatHasManagerModeEnum.ALL_RW).optional(),
|
|
204
212
|
chatNoManagerMode: z.nativeEnum(ChatNoManagerModeEnum).default(ChatNoManagerModeEnum.ANY_MANAGER).optional(),
|
|
213
|
+
importantMessage: ImportantMessageSchema.nullable().optional(),
|
|
205
214
|
// post terminal settings
|
|
206
215
|
vatTag: z.string().nullable().optional(),
|
|
207
216
|
taxMode: z.string().nullable().optional(),
|