@floristcloud/api-lib 1.0.20 → 1.0.22
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/auth/login-user.command.js +3 -3
- package/build/commands/auth/register-user.command.js +1 -1
- package/build/commands/auth/reset-password-by-security-code.command.js +1 -1
- package/build/commands/auth/reset-password-by-token.command.js +1 -1
- package/build/commands/auth/restore-password-by-security-code.command.js +1 -1
- package/build/commands/branch/delete-branch.command.js +1 -1
- package/build/commands/category/delete-category.command.js +1 -1
- package/build/commands/category/get-category-by-uuid.query.js +1 -1
- package/build/commands/category/get-category-list.query.js +1 -1
- package/build/commands/category/update-category-command.js +1 -1
- package/build/commands/category-alias/delete-category-alias.command.js +1 -1
- package/build/commands/category-alias/get-category-alias-by-uuid.query.js +1 -1
- package/build/commands/category-alias/update-category-alias.command.js +1 -1
- package/build/commands/client/create-client.command.js +1 -1
- package/build/commands/client/delete-client.command.js +1 -1
- package/build/commands/client/marking/get-client-marking-by-client-list.command.js +2 -2
- package/build/commands/client/profile/get-client-individual-profile.query.js +1 -1
- package/build/commands/client/update-client.command.js +2 -2
- package/build/commands/client/webshop/register-client-webshop.command.js +1 -1
- package/build/commands/client/webshop/update-client-for-client.command.js +1 -1
- package/build/commands/company/deleteCompany.command.js +1 -1
- package/build/commands/company/getCompany.query.js +1 -1
- package/build/commands/consignment/delete-consignment.command.js +1 -1
- package/build/commands/delivery-route/attach-order-list-to-delivery-route.command.js +1 -1
- package/build/commands/delivery-route/detach-order-list-to-delivery-route.command.js +1 -1
- package/build/commands/discount-rules/get-discount-rules-all.query.js +2 -2
- package/build/commands/message/get-context-unread-count.query.js +2 -2
- package/build/commands/message/get-contexts-with-unread.query.js +1 -1
- package/build/commands/message/list-context-messages.query.js +4 -4
- package/build/commands/message/mark-context-read.command.js +2 -2
- package/build/commands/message/send-context-message.command.js +2 -2
- package/build/commands/order/create-order.command.js +2 -2
- package/build/commands/order/update-order.command.js +2 -2
- package/build/commands/order/webshop/update-cart.command.js +1 -1
- package/build/commands/order-product/create-order-product.command.js +1 -1
- package/build/commands/order-product/group/update-group-order-product-order.command.js +1 -1
- package/build/commands/order-product/update-order-product.command.js +2 -2
- package/build/commands/order-product/webshop/create-order-product-for-client.command.js +1 -1
- package/build/commands/order-product/webshop/update-order-product-for-client.command.js +1 -1
- package/build/commands/package/reorder-packages.command.js +1 -1
- package/build/commands/pre-order/create-order-from-pre-order.command.js +1 -1
- package/build/commands/pre-order/group/analyze-copy-pre-orders.command.js +2 -2
- package/build/commands/pre-order/group/analyze-create-orders-from-pre-orders.command.js +2 -2
- package/build/commands/pre-order/group/analyze-create-pre-orders-from-standing-orders.command.js +2 -2
- package/build/commands/pre-order/group/group-copy-pre-orders-to-collection.command.js +2 -2
- package/build/commands/pre-order/group/group-create-orders-from-pre-orders.command.js +4 -4
- package/build/commands/pre-order/group/group-create-pre-orders-from-standing-orders.command.js +4 -4
- package/build/commands/pre-order-collection/match-images-for-collection.command.js +1 -1
- package/build/commands/pre-order-collection-item/multiplicity-option/reorder-pre-order-collection-item-multiplicity-options.command.js +1 -1
- package/build/commands/product/get-product-quantity-calculate.query.js +1 -1
- package/build/commands/product/group/update-group-product-update-batch.command.js +1 -1
- package/build/commands/product/multiplicity-option/reorder-product-multiplicity-options.command.js +1 -1
- package/build/commands/report/export-client-statement.query.js +1 -1
- package/build/commands/report/export-inventory-movement.query.js +1 -1
- package/build/commands/report/export-inventory-stock.query.js +1 -1
- package/build/commands/report/export-inventory-turnover.query.js +1 -1
- package/build/commands/report/get-report-group-by-position.query.js +1 -1
- package/build/commands/transaction/apply-prepayment-transaction.command.js +1 -1
- package/build/commands/type/delete-type.command.js +1 -1
- package/build/commands/type/get-type-by-uuid.query.js +1 -1
- package/build/commands/user/createUserByClientId.command.js +2 -2
- package/build/commands/user/update-user.command.js +1 -1
- package/build/enum/index.js +2 -0
- package/build/schemas/bank-payment/bank-payment.schema.js +4 -4
- package/build/schemas/branch/branch.schema.js +2 -2
- package/build/schemas/category/category.schema.js +1 -1
- package/build/schemas/category-alias/category-alias.schema.js +4 -4
- package/build/schemas/category-template/category-template.schema.js +1 -1
- package/build/schemas/client/client-debt.schema.js +1 -1
- package/build/schemas/client/client-individual-profile.schema.js +1 -1
- package/build/schemas/client/client-legal-profile.schema.js +1 -1
- package/build/schemas/client/client-marking.schema.js +1 -1
- package/build/schemas/client/client.schema.js +3 -3
- package/build/schemas/company/company.schema.js +1 -1
- package/build/schemas/consignment/consignment.schema.js +1 -1
- package/build/schemas/consignment-import-schema/consignment-import-schema.scheme.js +2 -2
- package/build/schemas/consignment-import-schema-relation/consignment-import-schema-relation.schema.js +2 -2
- package/build/schemas/delivery-route/delivery-route.schema.js +3 -3
- package/build/schemas/discount-rules/discount-rules.schema.js +4 -4
- package/build/schemas/domain/domain.schema.js +1 -1
- package/build/schemas/message/client-inbox-item.schema.js +1 -1
- package/build/schemas/message/context-inbox.schema.js +3 -3
- package/build/schemas/message/context-message.schema.js +5 -5
- package/build/schemas/money-account/money-account.schema.js +1 -1
- package/build/schemas/order/order.schema.js +5 -5
- package/build/schemas/order-delivery/order-delivery.schema.js +1 -1
- package/build/schemas/order-product/order-product-multiplicity-optiom.schema.js +1 -1
- package/build/schemas/order-product/order-product.schema.js +5 -5
- package/build/schemas/pre-order-product/pre-order-product.schema.js +3 -3
- package/build/schemas/product/product-multiplicity-option.schema.js +1 -1
- package/build/schemas/product/product.schema.js +4 -4
- package/build/schemas/product-configuration/product-configuration.schema.js +2 -2
- package/build/schemas/transaction/transaction.schema.js +2 -2
- package/build/schemas/type/type.schema.js +2 -2
- package/build/schemas/type/typeList.schema.js +1 -1
- package/build/schemas/user/user.schema.js +1 -1
- package/build/schemas/write-off/write-off-image.schema.js +2 -2
- package/build/schemas/write-off/write-off.schema.js +1 -1
- package/commands/auth/login-user.command.ts +3 -3
- package/commands/auth/register-user.command.ts +1 -1
- package/commands/auth/reset-password-by-security-code.command.ts +1 -1
- package/commands/auth/reset-password-by-token.command.ts +1 -1
- package/commands/auth/restore-password-by-security-code.command.ts +1 -1
- package/commands/branch/delete-branch.command.ts +1 -1
- package/commands/category/delete-category.command.ts +1 -1
- package/commands/category/get-category-by-uuid.query.ts +1 -1
- package/commands/category/get-category-list.query.ts +1 -1
- package/commands/category/update-category-command.ts +1 -1
- package/commands/category-alias/delete-category-alias.command.ts +1 -1
- package/commands/category-alias/get-category-alias-by-uuid.query.ts +1 -1
- package/commands/category-alias/update-category-alias.command.ts +1 -1
- package/commands/client/create-client.command.ts +1 -1
- package/commands/client/delete-client.command.ts +1 -1
- package/commands/client/marking/get-client-marking-by-client-list.command.ts +2 -2
- package/commands/client/profile/get-client-individual-profile.query.ts +1 -1
- package/commands/client/update-client.command.ts +2 -2
- package/commands/client/webshop/register-client-webshop.command.ts +1 -1
- package/commands/client/webshop/update-client-for-client.command.ts +1 -1
- package/commands/company/deleteCompany.command.ts +1 -1
- package/commands/company/getCompany.query.ts +1 -1
- package/commands/consignment/delete-consignment.command.ts +1 -1
- package/commands/delivery-route/attach-order-list-to-delivery-route.command.ts +1 -1
- package/commands/delivery-route/detach-order-list-to-delivery-route.command.ts +1 -1
- package/commands/discount-rules/get-discount-rules-all.query.ts +2 -2
- package/commands/message/get-context-unread-count.query.ts +2 -2
- package/commands/message/get-contexts-with-unread.query.ts +1 -1
- package/commands/message/list-context-messages.query.ts +4 -4
- package/commands/message/mark-context-read.command.ts +2 -2
- package/commands/message/send-context-message.command.ts +2 -2
- package/commands/order/create-order.command.ts +2 -2
- package/commands/order/update-order.command.ts +2 -2
- package/commands/order/webshop/update-cart.command.ts +1 -1
- package/commands/order-product/create-order-product.command.ts +1 -1
- package/commands/order-product/group/update-group-order-product-order.command.ts +1 -1
- package/commands/order-product/update-order-product.command.ts +2 -2
- package/commands/order-product/webshop/create-order-product-for-client.command.ts +1 -1
- package/commands/order-product/webshop/update-order-product-for-client.command.ts +1 -1
- package/commands/package/reorder-packages.command.ts +1 -1
- package/commands/pre-order/create-order-from-pre-order.command.ts +1 -1
- package/commands/pre-order/group/analyze-copy-pre-orders.command.ts +2 -2
- package/commands/pre-order/group/analyze-create-orders-from-pre-orders.command.ts +2 -2
- package/commands/pre-order/group/analyze-create-pre-orders-from-standing-orders.command.ts +2 -2
- package/commands/pre-order/group/group-copy-pre-orders-to-collection.command.ts +2 -2
- package/commands/pre-order/group/group-create-orders-from-pre-orders.command.ts +4 -4
- package/commands/pre-order/group/group-create-pre-orders-from-standing-orders.command.ts +4 -4
- package/commands/pre-order-collection/match-images-for-collection.command.ts +1 -1
- package/commands/pre-order-collection-item/multiplicity-option/reorder-pre-order-collection-item-multiplicity-options.command.ts +1 -1
- package/commands/product/get-product-quantity-calculate.query.ts +1 -1
- package/commands/product/group/update-group-product-update-batch.command.ts +1 -1
- package/commands/product/multiplicity-option/reorder-product-multiplicity-options.command.ts +1 -1
- package/commands/report/export-client-statement.query.ts +1 -1
- package/commands/report/export-inventory-movement.query.ts +1 -1
- package/commands/report/export-inventory-stock.query.ts +1 -1
- package/commands/report/export-inventory-turnover.query.ts +1 -1
- package/commands/report/get-report-group-by-position.query.ts +1 -1
- package/commands/transaction/apply-prepayment-transaction.command.ts +1 -1
- package/commands/type/delete-type.command.ts +1 -1
- package/commands/type/get-type-by-uuid.query.ts +1 -1
- package/commands/user/createUserByClientId.command.ts +2 -2
- package/commands/user/update-user.command.ts +1 -1
- package/enum/index.ts +2 -0
- package/package.json +1 -1
- package/schemas/bank-payment/bank-payment.schema.ts +4 -4
- package/schemas/branch/branch.schema.ts +2 -2
- package/schemas/category/category.schema.ts +1 -1
- package/schemas/category-alias/category-alias.schema.ts +4 -4
- package/schemas/category-template/category-template.schema.ts +1 -1
- package/schemas/client/client-debt.schema.ts +1 -1
- package/schemas/client/client-individual-profile.schema.ts +1 -1
- package/schemas/client/client-legal-profile.schema.ts +1 -1
- package/schemas/client/client-marking.schema.ts +1 -1
- package/schemas/client/client.schema.ts +3 -3
- package/schemas/company/company.schema.ts +1 -1
- package/schemas/consignment/consignment.schema.ts +1 -1
- package/schemas/consignment-import-schema/consignment-import-schema.scheme.ts +2 -2
- package/schemas/consignment-import-schema-relation/consignment-import-schema-relation.schema.ts +2 -2
- package/schemas/delivery-route/delivery-route.schema.ts +3 -3
- package/schemas/discount-rules/discount-rules.schema.ts +4 -4
- package/schemas/domain/domain.schema.ts +1 -1
- package/schemas/message/client-inbox-item.schema.ts +1 -1
- package/schemas/message/context-inbox.schema.ts +3 -3
- package/schemas/message/context-message.schema.ts +5 -5
- package/schemas/money-account/money-account.schema.ts +1 -1
- package/schemas/order/order.schema.ts +5 -5
- package/schemas/order-delivery/order-delivery.schema.ts +1 -1
- package/schemas/order-product/order-product-multiplicity-optiom.schema.ts +1 -1
- package/schemas/order-product/order-product.schema.ts +5 -5
- package/schemas/pre-order-product/pre-order-product.schema.ts +3 -3
- package/schemas/product/product-multiplicity-option.schema.ts +1 -1
- package/schemas/product/product.schema.ts +4 -4
- package/schemas/product-configuration/product-configuration.schema.ts +2 -2
- package/schemas/transaction/transaction.schema.ts +2 -2
- package/schemas/type/type.schema.ts +2 -2
- package/schemas/type/typeList.schema.ts +1 -1
- package/schemas/user/user.schema.ts +1 -1
- package/schemas/write-off/write-off-image.schema.ts +2 -2
- package/schemas/write-off/write-off.schema.ts +1 -1
package/build/commands/product/multiplicity-option/reorder-product-multiplicity-options.command.js
CHANGED
|
@@ -5,7 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const ReorderProductMultiplicityOptionsRequestSchema = zod_1.z.object({
|
|
6
6
|
items: zod_1.z
|
|
7
7
|
.array(zod_1.z.object({
|
|
8
|
-
optionUUID: zod_1.z.
|
|
8
|
+
optionUUID: zod_1.z.uuid(),
|
|
9
9
|
rank: zod_1.z.coerce.number().int().min(0),
|
|
10
10
|
}))
|
|
11
11
|
.min(1),
|
|
@@ -8,7 +8,7 @@ const ExportClientStatementRequestSchema = zod_1.z
|
|
|
8
8
|
.object({
|
|
9
9
|
startDate: zod_1.z.coerce.date().optional(),
|
|
10
10
|
endDate: zod_1.z.coerce.date().optional(),
|
|
11
|
-
clientUUID: zod_1.z.
|
|
11
|
+
clientUUID: zod_1.z.uuid(),
|
|
12
12
|
})
|
|
13
13
|
.refine(value => {
|
|
14
14
|
const { startDate, endDate } = value;
|
|
@@ -8,7 +8,7 @@ const ExportInventoryMovementRequestSchema = zod_1.z
|
|
|
8
8
|
.object({
|
|
9
9
|
startDate: zod_1.z.coerce.date().optional(),
|
|
10
10
|
endDate: zod_1.z.coerce.date().optional(),
|
|
11
|
-
categoryUUID: zod_1.z.
|
|
11
|
+
categoryUUID: zod_1.z.uuid().optional(), // Фильтр по категории
|
|
12
12
|
detailed: zod_1.z.coerce.boolean().optional().default(false), // Флаг для детализации
|
|
13
13
|
})
|
|
14
14
|
.refine(value => {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ExportInventoryStockContractQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const ExportInventoryStockRequestSchema = zod_1.z.object({
|
|
6
|
-
categoryUUID: zod_1.z.
|
|
6
|
+
categoryUUID: zod_1.z.uuid().optional(), // Фильтр по категории
|
|
7
7
|
detailed: zod_1.z.coerce.boolean().optional().default(false), // Флаг для детализации (группировка по name, size, grower)
|
|
8
8
|
});
|
|
9
9
|
// Ответ для обычного отчета (по категориям)
|
|
@@ -7,7 +7,7 @@ const ExportInventoryTurnoverRequestSchema = zod_1.z
|
|
|
7
7
|
.object({
|
|
8
8
|
startDate: zod_1.z.coerce.date().optional(),
|
|
9
9
|
endDate: zod_1.z.coerce.date().optional(),
|
|
10
|
-
categoryUUID: zod_1.z.
|
|
10
|
+
categoryUUID: zod_1.z.uuid().optional(), // Фильтр по категории
|
|
11
11
|
detailed: zod_1.z.coerce.boolean().optional().default(false), // Флаг для детализации
|
|
12
12
|
})
|
|
13
13
|
.refine(value => {
|
|
@@ -6,7 +6,7 @@ const enum_1 = require("../../enum");
|
|
|
6
6
|
const date_helper_1 = require("../../helpers/date.helper");
|
|
7
7
|
const GetReportGroupByPositionRequestSchema = zod_1.z
|
|
8
8
|
.object({
|
|
9
|
-
type: zod_1.z.
|
|
9
|
+
type: zod_1.z.nativeEnum(enum_1.PositionReportTypeEnum).default(enum_1.PositionReportTypeEnum.PRODUCT),
|
|
10
10
|
categoryUUID: zod_1.z.string().optional(),
|
|
11
11
|
startDate: zod_1.z.coerce.date().transform(val => (val ? (0, date_helper_1.setStartDay)(val) : val)),
|
|
12
12
|
endDate: zod_1.z.coerce.date().transform(val => (val ? (0, date_helper_1.setEndDay)(val) : val)),
|
|
@@ -4,7 +4,7 @@ exports.ApplyPrepaymentTransactionContractCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const schemas_1 = require("../../schemas");
|
|
6
6
|
const ApplyPrepaymentTransactionRequestSchema = zod_1.z.object({
|
|
7
|
-
orderUUID: zod_1.z.
|
|
7
|
+
orderUUID: zod_1.z.uuid().optional(),
|
|
8
8
|
});
|
|
9
9
|
const ApplyPrepaymentTransactionResponseSchema = zod_1.z.object({
|
|
10
10
|
message: zod_1.z.string().optional(),
|
|
@@ -4,7 +4,7 @@ exports.DeleteTypeContractCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const delete_data_response_schema_1 = require("../../schemas/delete-data-response.schema");
|
|
6
6
|
const DeleteTypeRequestSchema = zod_1.z.object({
|
|
7
|
-
uuid: zod_1.z.
|
|
7
|
+
uuid: zod_1.z.uuid(),
|
|
8
8
|
});
|
|
9
9
|
const DeleteTypeResponseSchema = zod_1.z.object({
|
|
10
10
|
message: zod_1.z.string().optional(),
|
|
@@ -4,7 +4,7 @@ exports.GetTypeByUUIDhContractQuery = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const type_schema_1 = require("../../schemas/type/type.schema");
|
|
6
6
|
const GetTypeByUUIDRequestSchema = zod_1.z.object({
|
|
7
|
-
uuid: zod_1.z.
|
|
7
|
+
uuid: zod_1.z.uuid(),
|
|
8
8
|
});
|
|
9
9
|
const GetTypeByUUIDResponseSchema = zod_1.z.object({
|
|
10
10
|
message: zod_1.z.string().optional(),
|
|
@@ -9,14 +9,14 @@ const CreateUserByClientIdRequestSchema = zod_1.z.object({
|
|
|
9
9
|
.object({
|
|
10
10
|
password: zod_1.z.string(),
|
|
11
11
|
name: zod_1.z.string(),
|
|
12
|
-
email: zod_1.z.
|
|
12
|
+
email: zod_1.z.email().toLowerCase().nullable().optional(),
|
|
13
13
|
phone: zod_1.z.string().nullable().optional(),
|
|
14
14
|
roles: zod_1.z.array(zod_1.z.nativeEnum(enum_1.UserRoleEnum)).optional().default([enum_1.UserRoleEnum.BUYER]),
|
|
15
15
|
})
|
|
16
16
|
.refine(data => data.email || data.phone, {
|
|
17
17
|
message: 'Either email or phone must be provided',
|
|
18
18
|
}),
|
|
19
|
-
clientUuid: zod_1.z.
|
|
19
|
+
clientUuid: zod_1.z.uuid(),
|
|
20
20
|
});
|
|
21
21
|
const CreateUserByClientIdResponseSchema = zod_1.z.object({
|
|
22
22
|
message: zod_1.z.string().optional(),
|
|
@@ -4,7 +4,7 @@ exports.UpdateUserContractCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const schemas_1 = require("../../schemas");
|
|
6
6
|
const UpdateUserRequestSchema = zod_1.z.object({
|
|
7
|
-
email: zod_1.z.
|
|
7
|
+
email: zod_1.z.email().toLowerCase().nullable().optional(),
|
|
8
8
|
name: zod_1.z.string().optional(),
|
|
9
9
|
phone: zod_1.z.string().nullable().optional(),
|
|
10
10
|
});
|
package/build/enum/index.js
CHANGED
|
@@ -42,6 +42,8 @@ __exportStar(require("./discount-rules-type.enum"), exports);
|
|
|
42
42
|
__exportStar(require("./discount-rules-mode-type.enum"), exports);
|
|
43
43
|
__exportStar(require("./order-distribute-status-list"), exports);
|
|
44
44
|
__exportStar(require("./order-active-status-list"), exports);
|
|
45
|
+
__exportStar(require("./client-status.enum"), exports);
|
|
46
|
+
__exportStar(require("./client-type.enum"), exports);
|
|
45
47
|
__exportStar(require("./consignment-distribution-validation-status.enum"), exports);
|
|
46
48
|
__exportStar(require("./consignment-distribution-validation-type.enum"), exports);
|
|
47
49
|
__exportStar(require("./consignment-access-client-status.enum"), exports);
|
|
@@ -5,7 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const bank_provider_enum_1 = require("../../enum/bank-provider.enum");
|
|
6
6
|
const bank_payment_event_status_enum_1 = require("../../enum/bank-payment-event-status.enum");
|
|
7
7
|
exports.BankPaymentSchema = zod_1.z.object({
|
|
8
|
-
uuid: zod_1.z.
|
|
8
|
+
uuid: zod_1.z.uuid(),
|
|
9
9
|
provider: zod_1.z.nativeEnum(bank_provider_enum_1.BankProviderEnum),
|
|
10
10
|
externalEventId: zod_1.z.string(),
|
|
11
11
|
accountNumber: zod_1.z.string(),
|
|
@@ -17,10 +17,10 @@ exports.BankPaymentSchema = zod_1.z.object({
|
|
|
17
17
|
clientName: zod_1.z.string().nullable(),
|
|
18
18
|
clientInn: zod_1.z.string().nullable(),
|
|
19
19
|
valueDate: zod_1.z.coerce.date(),
|
|
20
|
-
clientUUID: zod_1.z.
|
|
21
|
-
moneyAccountUUID: zod_1.z.
|
|
20
|
+
clientUUID: zod_1.z.uuid().nullable(),
|
|
21
|
+
moneyAccountUUID: zod_1.z.uuid().nullable(),
|
|
22
22
|
moneyAccountName: zod_1.z.string().nullable(),
|
|
23
23
|
payload: zod_1.z.unknown(),
|
|
24
|
-
appliedTransactionUUID: zod_1.z.
|
|
24
|
+
appliedTransactionUUID: zod_1.z.uuid().nullable(),
|
|
25
25
|
receivedAt: zod_1.z.coerce.date(),
|
|
26
26
|
});
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BranchSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.BranchSchema = zod_1.z.object({
|
|
6
|
-
uuid: zod_1.z.
|
|
6
|
+
uuid: zod_1.z.uuid(),
|
|
7
7
|
name: zod_1.z.string(),
|
|
8
8
|
contactName: zod_1.z.string().nullable(),
|
|
9
9
|
contactPhone: zod_1.z.string().nullable(),
|
|
@@ -11,7 +11,7 @@ exports.BranchSchema = zod_1.z.object({
|
|
|
11
11
|
city: zod_1.z.string().nullable(),
|
|
12
12
|
region: zod_1.z.string().nullable(),
|
|
13
13
|
country: zod_1.z.string().nullable(),
|
|
14
|
-
clientId: zod_1.z.
|
|
14
|
+
clientId: zod_1.z.uuid(),
|
|
15
15
|
createdAt: zod_1.z.date(),
|
|
16
16
|
updatedAt: zod_1.z.date(),
|
|
17
17
|
});
|
|
@@ -5,7 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const category_status_enum_1 = require("../../enum/category-status.enum");
|
|
6
6
|
const type_schema_1 = require("../type/type.schema");
|
|
7
7
|
exports.CategorySchema = zod_1.z.object({
|
|
8
|
-
uuid: zod_1.z.
|
|
8
|
+
uuid: zod_1.z.uuid(),
|
|
9
9
|
name: zod_1.z.string(),
|
|
10
10
|
multiplicity: zod_1.z.number().nullable(),
|
|
11
11
|
isSizeSeparate: zod_1.z.boolean(),
|
|
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AliasInListSchema = exports.CategoryAliasSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.CategoryAliasSchema = zod_1.z.object({
|
|
6
|
-
uuid: zod_1.z.
|
|
6
|
+
uuid: zod_1.z.uuid(),
|
|
7
7
|
name: zod_1.z.string(),
|
|
8
|
-
companyUUID: zod_1.z.
|
|
9
|
-
categoryUUID: zod_1.z.
|
|
8
|
+
companyUUID: zod_1.z.uuid(),
|
|
9
|
+
categoryUUID: zod_1.z.uuid(),
|
|
10
10
|
deletedAt: zod_1.z.date().nullable(),
|
|
11
11
|
createdAt: zod_1.z.date(),
|
|
12
12
|
updatedAt: zod_1.z.date(),
|
|
13
13
|
});
|
|
14
14
|
exports.AliasInListSchema = zod_1.z.object({
|
|
15
|
-
uuid: zod_1.z.
|
|
15
|
+
uuid: zod_1.z.uuid(),
|
|
16
16
|
name: zod_1.z.string(),
|
|
17
17
|
});
|
|
@@ -8,7 +8,7 @@ exports.CategoryTemplateTypeSchema = zod_1.z.object({
|
|
|
8
8
|
rank: zod_1.z.number(),
|
|
9
9
|
});
|
|
10
10
|
exports.CategoryTemplateSchema = zod_1.z.object({
|
|
11
|
-
uuid: zod_1.z.
|
|
11
|
+
uuid: zod_1.z.uuid(),
|
|
12
12
|
name: zod_1.z.string(),
|
|
13
13
|
alias: zod_1.z.string().array(),
|
|
14
14
|
type: exports.CategoryTemplateTypeSchema,
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ClientDebtListSchema = exports.ClientDebtItemSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.ClientDebtItemSchema = zod_1.z.object({
|
|
6
|
-
clientUUID: zod_1.z.
|
|
6
|
+
clientUUID: zod_1.z.uuid(),
|
|
7
7
|
name: zod_1.z.string(),
|
|
8
8
|
code: zod_1.z.string().nullable(),
|
|
9
9
|
group: zod_1.z.string().nullable(),
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ClientIndividualProfileSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.ClientIndividualProfileSchema = zod_1.z.object({
|
|
6
|
-
uuid: zod_1.z.
|
|
6
|
+
uuid: zod_1.z.uuid(),
|
|
7
7
|
firstName: zod_1.z.string().nullable(),
|
|
8
8
|
lastName: zod_1.z.string().nullable(),
|
|
9
9
|
middleName: zod_1.z.string().nullable(),
|
|
@@ -4,7 +4,7 @@ exports.ClientLegalProfileSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const enum_1 = require("../../enum");
|
|
6
6
|
exports.ClientLegalProfileSchema = zod_1.z.object({
|
|
7
|
-
uuid: zod_1.z.
|
|
7
|
+
uuid: zod_1.z.uuid(),
|
|
8
8
|
fullCompanyName: zod_1.z.string().nullable(),
|
|
9
9
|
taxId: zod_1.z.string().nullable(),
|
|
10
10
|
ogrn: zod_1.z.string().nullable(),
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ClientMarkingSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.ClientMarkingSchema = zod_1.z.object({
|
|
6
|
-
uuid: zod_1.z.
|
|
6
|
+
uuid: zod_1.z.uuid(),
|
|
7
7
|
name: zod_1.z.string(),
|
|
8
8
|
});
|
|
@@ -10,7 +10,7 @@ const client_legal_profile_schema_1 = require("./client-legal-profile.schema");
|
|
|
10
10
|
const discount_rules_schema_1 = require("../discount-rules/discount-rules.schema");
|
|
11
11
|
const client_marking_schema_1 = require("./client-marking.schema");
|
|
12
12
|
exports.ClientSchema = zod_1.z.object({
|
|
13
|
-
uuid: zod_1.z.
|
|
13
|
+
uuid: zod_1.z.uuid(),
|
|
14
14
|
name: zod_1.z.string(),
|
|
15
15
|
contactName: zod_1.z.string().nullable(),
|
|
16
16
|
phone: zod_1.z.string().nullable(),
|
|
@@ -31,9 +31,9 @@ exports.ClientSchema = zod_1.z.object({
|
|
|
31
31
|
deletedAt: zod_1.z.date().nullable(),
|
|
32
32
|
createdAt: zod_1.z.date(),
|
|
33
33
|
updatedAt: zod_1.z.date(),
|
|
34
|
-
companyUUID: zod_1.z.
|
|
34
|
+
companyUUID: zod_1.z.uuid(),
|
|
35
35
|
clientType: zod_1.z.nativeEnum(client_type_enum_1.ClientTypeEnum),
|
|
36
|
-
responsibleUserUUID: zod_1.z.
|
|
36
|
+
responsibleUserUUID: zod_1.z.uuid().nullable(),
|
|
37
37
|
responsibleSince: zod_1.z.date().nullable(),
|
|
38
38
|
});
|
|
39
39
|
exports.ClientExtendedSchema = exports.ClientSchema.merge(zod_1.z.object({
|
|
@@ -4,7 +4,7 @@ exports.CompanySchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const companyStatus_enum_1 = require("../../enum/companyStatus.enum");
|
|
6
6
|
exports.CompanySchema = zod_1.z.object({
|
|
7
|
-
uuid: zod_1.z.
|
|
7
|
+
uuid: zod_1.z.uuid(),
|
|
8
8
|
name: zod_1.z.string(),
|
|
9
9
|
alias: zod_1.z.string(),
|
|
10
10
|
status: zod_1.z.nativeEnum(companyStatus_enum_1.CompanyStatusEnum),
|
|
@@ -5,7 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const enum_1 = require("../../enum");
|
|
6
6
|
const client_1 = require("../client");
|
|
7
7
|
exports.ConsignmentSchema = zod_1.z.object({
|
|
8
|
-
uuid: zod_1.z.
|
|
8
|
+
uuid: zod_1.z.uuid(),
|
|
9
9
|
deliveryDate: zod_1.z.date(),
|
|
10
10
|
id: zod_1.z.number(),
|
|
11
11
|
deliveryTime: zod_1.z.string().nullable(),
|
|
@@ -4,10 +4,10 @@ exports.UpdateConsignmentImportSchemaSchema = exports.CreateConsignmentImportSch
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const consignment_import_schema_relation_schema_1 = require("../consignment-import-schema-relation/consignment-import-schema-relation.schema");
|
|
6
6
|
exports.ConsignmentImportSchema = zod_1.z.object({
|
|
7
|
-
uuid: zod_1.z.
|
|
7
|
+
uuid: zod_1.z.uuid(),
|
|
8
8
|
name: zod_1.z.string(),
|
|
9
9
|
isDefault: zod_1.z.boolean(),
|
|
10
|
-
companyUUID: zod_1.z.
|
|
10
|
+
companyUUID: zod_1.z.uuid(),
|
|
11
11
|
});
|
|
12
12
|
exports.ConsignmentImportSchemaExtendedSchema = exports.ConsignmentImportSchema.merge(zod_1.z.object({
|
|
13
13
|
relations: zod_1.z.array(consignment_import_schema_relation_schema_1.ConsignmentImportSchemaRelationSchema),
|
|
@@ -4,9 +4,9 @@ exports.ConsignmentImportSchemaRelationSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const enum_1 = require("../../enum");
|
|
6
6
|
exports.ConsignmentImportSchemaRelationSchema = zod_1.z.object({
|
|
7
|
-
uuid: zod_1.z.
|
|
7
|
+
uuid: zod_1.z.uuid(),
|
|
8
8
|
entityProperty: zod_1.z.nativeEnum(enum_1.ConsignmentImportSchemaRelationEntityPropertyEnum),
|
|
9
9
|
externalName: zod_1.z.string(),
|
|
10
10
|
isRequire: zod_1.z.boolean(),
|
|
11
|
-
consignmentImportSchemaUUID: zod_1.z.
|
|
11
|
+
consignmentImportSchemaUUID: zod_1.z.uuid(),
|
|
12
12
|
});
|
|
@@ -4,7 +4,7 @@ exports.DeliveryRouteWithOrdersSchema = exports.UpdateDeliveryRouteSchema = expo
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const enum_1 = require("../../enum");
|
|
6
6
|
exports.DeliveryRouteSchema = zod_1.z.object({
|
|
7
|
-
uuid: zod_1.z.
|
|
7
|
+
uuid: zod_1.z.uuid(),
|
|
8
8
|
routeName: zod_1.z.string().nullable(),
|
|
9
9
|
driverName: zod_1.z.string().nullable(),
|
|
10
10
|
driverPhone: zod_1.z.string().nullable(),
|
|
@@ -28,7 +28,7 @@ exports.UpdateDeliveryRouteSchema = exports.DeliveryRouteSchema.omit({
|
|
|
28
28
|
}).partial();
|
|
29
29
|
exports.DeliveryRouteWithOrdersSchema = exports.DeliveryRouteSchema.extend({
|
|
30
30
|
orders: zod_1.z.array(zod_1.z.object({
|
|
31
|
-
uuid: zod_1.z.
|
|
31
|
+
uuid: zod_1.z.uuid(),
|
|
32
32
|
orderNumber: zod_1.z.number(),
|
|
33
33
|
orderStatus: zod_1.z.nativeEnum(enum_1.OrderStatusEnum),
|
|
34
34
|
orderCreatedAt: zod_1.z.coerce.date(),
|
|
@@ -39,7 +39,7 @@ exports.DeliveryRouteWithOrdersSchema = exports.DeliveryRouteSchema.extend({
|
|
|
39
39
|
clientPhone: zod_1.z.string().nullable(),
|
|
40
40
|
clientCode: zod_1.z.string().nullable(),
|
|
41
41
|
clientGroup: zod_1.z.string().nullable(),
|
|
42
|
-
orderDeliveryUUID: zod_1.z.
|
|
42
|
+
orderDeliveryUUID: zod_1.z.uuid().nullable(),
|
|
43
43
|
orderDeliveryStatus: zod_1.z.nativeEnum(enum_1.OrderDeliveryStatusEnum).nullable(),
|
|
44
44
|
deliveryAddress: zod_1.z.string().nullable(),
|
|
45
45
|
deliveryComment: zod_1.z.string().nullable(),
|
|
@@ -53,10 +53,10 @@ exports.DiscountRulesTypeSchema = zod_1.z.discriminatedUnion('type', [
|
|
|
53
53
|
exports.DiscountRulesBaseSchema = zod_1.z.object({
|
|
54
54
|
uuid: zod_1.z.string(),
|
|
55
55
|
companyUUID: zod_1.z.string(),
|
|
56
|
-
type: zod_1.z.
|
|
57
|
-
defaultApplyProduct: zod_1.z.
|
|
58
|
-
defaultApplyClient: zod_1.z.
|
|
59
|
-
status: zod_1.z.
|
|
56
|
+
type: zod_1.z.nativeEnum(enum_1.DiscountRulesTypeEnum),
|
|
57
|
+
defaultApplyProduct: zod_1.z.nativeEnum(enum_1.DiscountRulesApplyTypeEnum),
|
|
58
|
+
defaultApplyClient: zod_1.z.nativeEnum(enum_1.DiscountRulesApplyTypeEnum),
|
|
59
|
+
status: zod_1.z.nativeEnum(enum_1.DiscountRulesStatusEnum),
|
|
60
60
|
createdAt: zod_1.z.coerce.date(),
|
|
61
61
|
updatedAt: zod_1.z.coerce.date(),
|
|
62
62
|
});
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UpdateDomainSchema = exports.CreateDomainSchema = exports.DomainListSchema = exports.DomainSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.DomainSchema = zod_1.z.object({
|
|
6
|
-
uuid: zod_1.z.
|
|
6
|
+
uuid: zod_1.z.uuid(),
|
|
7
7
|
name: zod_1.z.string(),
|
|
8
8
|
companyId: zod_1.z.string(),
|
|
9
9
|
createdAt: zod_1.z.date(),
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ClientInboxItemSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.ClientInboxItemSchema = zod_1.z.object({
|
|
6
|
-
clientUUID: zod_1.z.
|
|
6
|
+
clientUUID: zod_1.z.uuid(),
|
|
7
7
|
clientName: zod_1.z.string(),
|
|
8
8
|
clientCode: zod_1.z.string().nullable(),
|
|
9
9
|
clientGroup: zod_1.z.string().nullable(),
|
|
@@ -5,14 +5,14 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const context_message_context_type_enum_1 = require("../../enum/context-message-context-type.enum");
|
|
6
6
|
exports.ContextInboxItemSchema = zod_1.z.object({
|
|
7
7
|
contextType: zod_1.z.nativeEnum(context_message_context_type_enum_1.ContextMessageContextTypeEnum),
|
|
8
|
-
contextUUID: zod_1.z.
|
|
9
|
-
subjectUUID: zod_1.z.
|
|
8
|
+
contextUUID: zod_1.z.uuid(),
|
|
9
|
+
subjectUUID: zod_1.z.uuid().nullable().optional(),
|
|
10
10
|
lastMessageAt: zod_1.z.date(),
|
|
11
11
|
lastMessagePreview: zod_1.z.string().nullable(),
|
|
12
12
|
lastMessageIsFromClient: zod_1.z.boolean(),
|
|
13
13
|
unreadCount: zod_1.z.number(),
|
|
14
14
|
orderId: zod_1.z.number().nullable().optional(),
|
|
15
|
-
orderUUID: zod_1.z.
|
|
15
|
+
orderUUID: zod_1.z.uuid().nullable().optional(),
|
|
16
16
|
clientName: zod_1.z.string().nullable().optional(),
|
|
17
17
|
productName: zod_1.z.string().nullable().optional(),
|
|
18
18
|
});
|
|
@@ -4,13 +4,13 @@ exports.ContextMessageSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const context_message_context_type_enum_1 = require("../../enum/context-message-context-type.enum");
|
|
6
6
|
exports.ContextMessageSchema = zod_1.z.object({
|
|
7
|
-
uuid: zod_1.z.
|
|
7
|
+
uuid: zod_1.z.uuid(),
|
|
8
8
|
contextType: zod_1.z.nativeEnum(context_message_context_type_enum_1.ContextMessageContextTypeEnum),
|
|
9
|
-
contextUUID: zod_1.z.
|
|
10
|
-
subjectUUID: zod_1.z.
|
|
9
|
+
contextUUID: zod_1.z.uuid(),
|
|
10
|
+
subjectUUID: zod_1.z.uuid().nullable().optional(),
|
|
11
11
|
isFromClient: zod_1.z.boolean(),
|
|
12
|
-
authorUserUUID: zod_1.z.
|
|
13
|
-
authorClientUUID: zod_1.z.
|
|
12
|
+
authorUserUUID: zod_1.z.uuid().nullable(),
|
|
13
|
+
authorClientUUID: zod_1.z.uuid().nullable(),
|
|
14
14
|
text: zod_1.z.string(),
|
|
15
15
|
payload: zod_1.z.any().nullable().optional(),
|
|
16
16
|
createdAt: zod_1.z.date(),
|
|
@@ -5,7 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const money_account_status_enum_1 = require("../../enum/money-account-status.enum");
|
|
6
6
|
const enum_1 = require("../../enum");
|
|
7
7
|
exports.MoneyAccountSchema = zod_1.z.object({
|
|
8
|
-
uuid: zod_1.z.
|
|
8
|
+
uuid: zod_1.z.uuid(),
|
|
9
9
|
name: zod_1.z.string(),
|
|
10
10
|
companyUUID: zod_1.z.string(),
|
|
11
11
|
roles: zod_1.z.nativeEnum(enum_1.UserRoleEnum).array(),
|
|
@@ -8,11 +8,11 @@ const branch_schema_1 = require("../branch/branch.schema");
|
|
|
8
8
|
const order_delivery_schema_1 = require("../order-delivery/order-delivery.schema");
|
|
9
9
|
const delivery_route_schema_1 = require("../delivery-route/delivery-route.schema");
|
|
10
10
|
exports.OrderSchema = zod_1.z.object({
|
|
11
|
-
uuid: zod_1.z.
|
|
11
|
+
uuid: zod_1.z.uuid(),
|
|
12
12
|
orderNumber: zod_1.z.number(),
|
|
13
|
-
clientUUID: zod_1.z.
|
|
14
|
-
branchUUID: zod_1.z.
|
|
15
|
-
creatorUserUUID: zod_1.z.
|
|
13
|
+
clientUUID: zod_1.z.uuid(),
|
|
14
|
+
branchUUID: zod_1.z.uuid().nullable(),
|
|
15
|
+
creatorUserUUID: zod_1.z.uuid(),
|
|
16
16
|
isSync: zod_1.z.boolean(),
|
|
17
17
|
totalCost: zod_1.z.number(),
|
|
18
18
|
subtotal: zod_1.z.number(),
|
|
@@ -32,7 +32,7 @@ exports.OrderSchema = zod_1.z.object({
|
|
|
32
32
|
totalQuantity: zod_1.z.number(),
|
|
33
33
|
totalProductNumber: zod_1.z.number(),
|
|
34
34
|
invoiceSendAt: zod_1.z.date().nullable(),
|
|
35
|
-
deliveryRouteUUID: zod_1.z.
|
|
35
|
+
deliveryRouteUUID: zod_1.z.uuid().nullable(),
|
|
36
36
|
completedAt: zod_1.z.date().nullable(),
|
|
37
37
|
paymentDueAt: zod_1.z.date().nullable(),
|
|
38
38
|
createdAt: zod_1.z.date(),
|
|
@@ -4,7 +4,7 @@ exports.OrderDeliverySchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const enum_1 = require("../../enum");
|
|
6
6
|
exports.OrderDeliverySchema = zod_1.z.object({
|
|
7
|
-
uuid: zod_1.z.
|
|
7
|
+
uuid: zod_1.z.uuid(),
|
|
8
8
|
city: zod_1.z.string().nullable(),
|
|
9
9
|
deliveryDate: zod_1.z.coerce.date().nullable(),
|
|
10
10
|
address: zod_1.z.string().nullable(),
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OrderProductMultiplicityOptionSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.OrderProductMultiplicityOptionSchema = zod_1.z.object({
|
|
6
|
-
uuid: zod_1.z.
|
|
6
|
+
uuid: zod_1.z.uuid(),
|
|
7
7
|
title: zod_1.z.string().nullable(),
|
|
8
8
|
optionMultiplicity: zod_1.z.coerce.number(),
|
|
9
9
|
optionPrice: zod_1.z.coerce.number().nullable(),
|
|
@@ -9,10 +9,10 @@ const branch_schema_1 = require("../branch/branch.schema");
|
|
|
9
9
|
const distribution_schema_1 = require("../distribution/distribution.schema");
|
|
10
10
|
const order_product_multiplicity_optiom_schema_1 = require("./order-product-multiplicity-optiom.schema");
|
|
11
11
|
exports.OrderProductSchema = zod_1.z.object({
|
|
12
|
-
uuid: zod_1.z.
|
|
13
|
-
productUUID: zod_1.z.
|
|
14
|
-
orderUUID: zod_1.z.
|
|
15
|
-
multiplicityOptionUUID: zod_1.z.
|
|
12
|
+
uuid: zod_1.z.uuid(),
|
|
13
|
+
productUUID: zod_1.z.uuid(),
|
|
14
|
+
orderUUID: zod_1.z.uuid(),
|
|
15
|
+
multiplicityOptionUUID: zod_1.z.uuid().nullable().optional(),
|
|
16
16
|
quantity: zod_1.z.number(),
|
|
17
17
|
price: zod_1.z.number(),
|
|
18
18
|
amount: zod_1.z.number(),
|
|
@@ -41,7 +41,7 @@ exports.OrderProductExtendedSchema = exports.OrderProductSchema.extend({
|
|
|
41
41
|
});
|
|
42
42
|
exports.OrderProductForClientExtendedSchema = exports.OrderProductForClientSchema.extend({
|
|
43
43
|
product: product_schema_1.ProductExtendedForClientSchema,
|
|
44
|
-
multiplicityOptionUUID: zod_1.z.
|
|
44
|
+
multiplicityOptionUUID: zod_1.z.uuid().nullable().optional(),
|
|
45
45
|
});
|
|
46
46
|
exports.OrderProductForDistributeSchema = exports.OrderProductSchema.extend({
|
|
47
47
|
order: order_schema_1.OrderSchema,
|
|
@@ -15,7 +15,7 @@ exports.PreOrderProductSchema = zod_1.z.object({
|
|
|
15
15
|
uuid: zod_1.z.string(),
|
|
16
16
|
preOrderCollectionItemUUID: zod_1.z.string().nullable(),
|
|
17
17
|
preOrderUUID: zod_1.z.string(),
|
|
18
|
-
multiplicityOptionUUID: zod_1.z.
|
|
18
|
+
multiplicityOptionUUID: zod_1.z.uuid().nullable().optional(),
|
|
19
19
|
quantity: zod_1.z.number(),
|
|
20
20
|
comment: zod_1.z.string().nullable(),
|
|
21
21
|
tag: zod_1.z.string().nullable(),
|
|
@@ -38,7 +38,7 @@ exports.PreOrderProductExtendedSchema = exports.PreOrderProductSchema.extend({
|
|
|
38
38
|
deliveryDate: zod_1.z.coerce.date().nullable(),
|
|
39
39
|
});
|
|
40
40
|
exports.CreatePreOrderProductSchema = exports.PreOrderProductSchema.omit({ uuid: true, preOrderUUID: true }).extend({
|
|
41
|
-
multiplicityOptionUUID: zod_1.z.
|
|
41
|
+
multiplicityOptionUUID: zod_1.z.uuid().nullable().optional(),
|
|
42
42
|
categoryUUID: zod_1.z.string().nullable().optional(),
|
|
43
43
|
name: zod_1.z.string().nullable().optional(),
|
|
44
44
|
grower: zod_1.z.string().nullable().optional(),
|
|
@@ -53,7 +53,7 @@ exports.UpdatePreOrderProductSchema = exports.PreOrderProductSchema.omit({
|
|
|
53
53
|
preOrderUUID: true,
|
|
54
54
|
})
|
|
55
55
|
.extend({
|
|
56
|
-
multiplicityOptionUUID: zod_1.z.
|
|
56
|
+
multiplicityOptionUUID: zod_1.z.uuid().nullable().optional(),
|
|
57
57
|
categoryUUID: zod_1.z.string().nullable().optional(),
|
|
58
58
|
name: zod_1.z.string().nullable().optional(),
|
|
59
59
|
grower: zod_1.z.string().nullable().optional(),
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ProductMultiplicityOptionSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.ProductMultiplicityOptionSchema = zod_1.z.object({
|
|
6
|
-
uuid: zod_1.z.
|
|
6
|
+
uuid: zod_1.z.uuid(),
|
|
7
7
|
title: zod_1.z.string().nullable(),
|
|
8
8
|
optionMultiplicity: zod_1.z.number(),
|
|
9
9
|
optionPrice: zod_1.z.number().nullable(),
|
|
@@ -10,10 +10,10 @@ const enum_1 = require("../../enum");
|
|
|
10
10
|
const discount_rules_schema_1 = require("../discount-rules/discount-rules.schema");
|
|
11
11
|
const __1 = require("../..");
|
|
12
12
|
exports.ProductSchema = zod_1.z.object({
|
|
13
|
-
uuid: zod_1.z.
|
|
13
|
+
uuid: zod_1.z.uuid(),
|
|
14
14
|
dataSyncId: zod_1.z.string().nullable(),
|
|
15
|
-
consignmentUUID: zod_1.z.
|
|
16
|
-
categoryUUID: zod_1.z.
|
|
15
|
+
consignmentUUID: zod_1.z.uuid(),
|
|
16
|
+
categoryUUID: zod_1.z.uuid().nullable(),
|
|
17
17
|
name: zod_1.z.string(),
|
|
18
18
|
balance: zod_1.z.number(),
|
|
19
19
|
quantity: zod_1.z.number(),
|
|
@@ -47,7 +47,7 @@ exports.ProductExtendedSchema = exports.ProductSchema.merge(zod_1.z.object({
|
|
|
47
47
|
multiplicityOptions: zod_1.z.array(__1.ProductMultiplicityOptionSchema).optional(),
|
|
48
48
|
}));
|
|
49
49
|
exports.ProductForClientSchema = zod_1.z.object({
|
|
50
|
-
uuid: zod_1.z.
|
|
50
|
+
uuid: zod_1.z.uuid(),
|
|
51
51
|
name: zod_1.z.string(),
|
|
52
52
|
balance: zod_1.z.number(),
|
|
53
53
|
price: zod_1.z.number(),
|
|
@@ -4,8 +4,8 @@ exports.UpdateProductConfigurationRequestSchema = exports.CreateProductConfigura
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const enum_1 = require("../../enum");
|
|
6
6
|
exports.ProductConfigurationSchema = zod_1.z.object({
|
|
7
|
-
uuid: zod_1.z.
|
|
8
|
-
categoryUUID: zod_1.z.
|
|
7
|
+
uuid: zod_1.z.uuid(),
|
|
8
|
+
categoryUUID: zod_1.z.uuid(),
|
|
9
9
|
country: zod_1.z.nativeEnum(enum_1.CountryCodeEnum).nullable(),
|
|
10
10
|
grower: zod_1.z.string().nullable(),
|
|
11
11
|
size: zod_1.z.coerce.number().nullable(),
|
|
@@ -7,8 +7,8 @@ const money_account_schema_1 = require("../money-account/money-account.schema");
|
|
|
7
7
|
const client_1 = require("../client");
|
|
8
8
|
const order_schema_1 = require("../order/order.schema");
|
|
9
9
|
exports.TransactionSchema = zod_1.z.object({
|
|
10
|
-
uuid: zod_1.z.
|
|
11
|
-
moneyAccountUUID: zod_1.z.
|
|
10
|
+
uuid: zod_1.z.uuid(),
|
|
11
|
+
moneyAccountUUID: zod_1.z.uuid(),
|
|
12
12
|
amount: zod_1.z.number(),
|
|
13
13
|
comment: zod_1.z.string(),
|
|
14
14
|
clientUUID: zod_1.z.string().nullable(),
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TypeInCategorySchema = exports.TypeSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.TypeSchema = zod_1.z.object({
|
|
6
|
-
uuid: zod_1.z.
|
|
6
|
+
uuid: zod_1.z.uuid(),
|
|
7
7
|
name: zod_1.z.string(),
|
|
8
8
|
rank: zod_1.z.number(),
|
|
9
9
|
deletedAt: zod_1.z.date().nullable(),
|
|
@@ -11,7 +11,7 @@ exports.TypeSchema = zod_1.z.object({
|
|
|
11
11
|
updatedAt: zod_1.z.date(),
|
|
12
12
|
});
|
|
13
13
|
exports.TypeInCategorySchema = zod_1.z.object({
|
|
14
|
-
uuid: zod_1.z.
|
|
14
|
+
uuid: zod_1.z.uuid(),
|
|
15
15
|
name: zod_1.z.string(),
|
|
16
16
|
rank: zod_1.z.number(),
|
|
17
17
|
});
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TypeListSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.TypeListSchema = zod_1.z.object({
|
|
6
|
-
uuid: zod_1.z.
|
|
6
|
+
uuid: zod_1.z.uuid(),
|
|
7
7
|
name: zod_1.z.string(),
|
|
8
8
|
rank: zod_1.z.number(),
|
|
9
9
|
});
|