@floristcloud/api-lib 1.0.20 → 1.0.21
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/action-log/get-action-log-list-for-client.query.js +1 -1
- package/build/commands/action-log/get-action-log-list.query.js +1 -1
- 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/bank-payment/get-bank-payment-list.query.js +1 -1
- package/build/commands/bank-payment/update-bank-payment-status.query.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 +3 -3
- package/build/commands/category/update-category-command.js +2 -2
- 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 +3 -3
- package/build/commands/client/delete-client.command.js +1 -1
- package/build/commands/client/get-client-list.query.js +2 -2
- 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 +4 -4
- package/build/commands/client/webshop/register-client-webshop.command.js +2 -2
- 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/create-consignment.command.js +1 -1
- package/build/commands/consignment/delete-consignment.command.js +1 -1
- package/build/commands/consignment/update-consignment.command.js +1 -1
- package/build/commands/consignment/upsert-access-clients-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/delivery-route/get-delivery-route-list.query.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 +3 -3
- package/build/commands/message/get-contexts-with-unread.query.js +2 -2
- package/build/commands/message/list-context-messages.query.js +5 -5
- package/build/commands/message/mark-context-read.command.js +3 -3
- package/build/commands/message/send-context-message.command.js +3 -3
- package/build/commands/order/create-order.command.js +3 -3
- package/build/commands/order/get-order-list.query.js +2 -2
- package/build/commands/order/group/update-group-order-status.command.js +1 -1
- package/build/commands/order/group/update-group-order-type.command.js +1 -1
- package/build/commands/order/update-order.command.js +4 -4
- package/build/commands/order/webshop/update-cart.command.js +1 -1
- package/build/commands/order-delivery/update-order-delivery.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/get-package-filters-values.query.js +2 -2
- 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/get-pre-order-list.query.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/webshop/get-pre-order-list-webshop.command.js +1 -1
- package/build/commands/pre-order-collection/get-pre-order-collection-list.query.js +1 -1
- package/build/commands/pre-order-collection/match-images-for-collection.command.js +1 -1
- package/build/commands/pre-order-collection-item/export-pre-order-collection-item-with-clients-vertical.query.js +1 -1
- package/build/commands/pre-order-collection-item/get-pre-order-collection-item-extended-with-clients-pre-order-product-list.query.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/product-configuration/get-product-configuration-list.query.js +1 -1
- package/build/commands/product-image/get-product-image-list.query.js +1 -1
- package/build/commands/report/export-client-statement.query.js +1 -1
- package/build/commands/report/export-inventory-movement.query.js +3 -3
- 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/export-sales-revenue.query.js +1 -1
- package/build/commands/transaction/apply-prepayment-transaction.command.js +1 -1
- package/build/commands/transaction/export-transactions.command.js +1 -1
- package/build/commands/transaction/get-transaction-list.query.js +1 -1
- package/build/commands/transaction/get-transaction-summary.query.js +1 -1
- package/build/commands/transaction/webshop/get-transaction-list-for-client.query.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/type/get-type-list.query.js +1 -1
- package/build/commands/user/createUserByClientId.command.js +3 -3
- package/build/commands/user/createUserForCompany.command.js +1 -1
- package/build/commands/user/get-user-list.query.js +2 -2
- package/build/commands/user/update-user.command.js +1 -1
- package/build/commands/wrire-off-archive/create-wrire-off-archive.command.js +1 -1
- package/build/commands/wrire-off-archive/info-wrire-off-archive.command.js +1 -1
- package/build/commands/write-off/get-write-off-list.query.js +1 -1
- package/build/enum/index.js +2 -0
- package/build/schemas/action-log/action-log.schema.js +1 -1
- package/build/schemas/action-log/order-update-action-log.schema.js +2 -2
- package/build/schemas/action-log/transaction-info.schema.js +1 -1
- package/build/schemas/bank-payment/bank-payment.schema.js +6 -6
- package/build/schemas/branch/branch.schema.js +2 -2
- package/build/schemas/category/category.schema.js +2 -2
- package/build/schemas/category-alias/category-alias.schema.js +4 -4
- package/build/schemas/category-template/category-template.schema.js +2 -2
- 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 +2 -2
- package/build/schemas/client/client-marking.schema.js +1 -1
- package/build/schemas/client/client.schema.js +5 -5
- package/build/schemas/company/company.schema.js +2 -2
- package/build/schemas/consignment/consignment-distribution-validation.schema.js +2 -2
- package/build/schemas/consignment/consignment.schema.js +3 -3
- 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 +3 -3
- package/build/schemas/delivery-route/delivery-route.schema.js +6 -6
- 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 +4 -4
- package/build/schemas/message/context-message.schema.js +6 -6
- package/build/schemas/money-account/money-account.schema.js +3 -3
- package/build/schemas/order/order.schema.js +7 -7
- package/build/schemas/order-delivery/order-delivery.schema.js +2 -2
- 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/package/package.schema.js +3 -3
- package/build/schemas/pre-order/pre-order.schema.js +2 -2
- package/build/schemas/pre-order-collection/pre-order-collection.schema.js +3 -3
- package/build/schemas/pre-order-collection-item/pre-order-collection-item.schema.js +3 -3
- 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 +5 -5
- package/build/schemas/product-configuration/product-configuration.schema.js +3 -3
- package/build/schemas/product-in-package/product-in-package.schema.js +1 -1
- package/build/schemas/report/client-statement.schema.js +2 -2
- package/build/schemas/settings/settings.schema.js +18 -18
- package/build/schemas/transaction/transaction.schema.js +3 -3
- 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 +5 -5
- package/build/schemas/write-off/write-off-image.schema.js +2 -2
- package/build/schemas/write-off/write-off.schema.js +2 -2
- package/commands/action-log/get-action-log-list-for-client.query.ts +1 -1
- package/commands/action-log/get-action-log-list.query.ts +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/bank-payment/get-bank-payment-list.query.ts +1 -1
- package/commands/bank-payment/update-bank-payment-status.query.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 +3 -3
- package/commands/category/update-category-command.ts +2 -2
- 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 +3 -3
- package/commands/client/delete-client.command.ts +1 -1
- package/commands/client/get-client-list.query.ts +2 -2
- 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 +4 -4
- package/commands/client/webshop/register-client-webshop.command.ts +2 -2
- 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/create-consignment.command.ts +1 -1
- package/commands/consignment/delete-consignment.command.ts +1 -1
- package/commands/consignment/update-consignment.command.ts +1 -1
- package/commands/consignment/upsert-access-clients-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/delivery-route/get-delivery-route-list.query.ts +1 -1
- package/commands/discount-rules/get-discount-rules-all.query.ts +2 -2
- package/commands/message/get-context-unread-count.query.ts +3 -3
- package/commands/message/get-contexts-with-unread.query.ts +2 -2
- package/commands/message/list-context-messages.query.ts +5 -5
- package/commands/message/mark-context-read.command.ts +3 -3
- package/commands/message/send-context-message.command.ts +3 -3
- package/commands/order/create-order.command.ts +3 -3
- package/commands/order/get-order-list.query.ts +2 -2
- package/commands/order/group/update-group-order-status.command.ts +1 -1
- package/commands/order/group/update-group-order-type.command.ts +1 -1
- package/commands/order/update-order.command.ts +4 -4
- package/commands/order/webshop/update-cart.command.ts +1 -1
- package/commands/order-delivery/update-order-delivery.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/get-package-filters-values.query.ts +2 -2
- 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/get-pre-order-list.query.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/webshop/get-pre-order-list-webshop.command.ts +1 -1
- package/commands/pre-order-collection/get-pre-order-collection-list.query.ts +1 -1
- package/commands/pre-order-collection/match-images-for-collection.command.ts +1 -1
- package/commands/pre-order-collection-item/export-pre-order-collection-item-with-clients-vertical.query.ts +1 -1
- package/commands/pre-order-collection-item/get-pre-order-collection-item-extended-with-clients-pre-order-product-list.query.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/product-configuration/get-product-configuration-list.query.ts +1 -1
- package/commands/product-image/get-product-image-list.query.ts +1 -1
- package/commands/report/export-client-statement.query.ts +1 -1
- package/commands/report/export-inventory-movement.query.ts +3 -3
- package/commands/report/export-inventory-stock.query.ts +1 -1
- package/commands/report/export-inventory-turnover.query.ts +1 -1
- package/commands/report/export-sales-revenue.query.ts +1 -1
- package/commands/transaction/apply-prepayment-transaction.command.ts +1 -1
- package/commands/transaction/export-transactions.command.ts +1 -1
- package/commands/transaction/get-transaction-list.query.ts +1 -1
- package/commands/transaction/get-transaction-summary.query.ts +1 -1
- package/commands/transaction/webshop/get-transaction-list-for-client.query.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/type/get-type-list.query.ts +1 -1
- package/commands/user/createUserByClientId.command.ts +3 -3
- package/commands/user/createUserForCompany.command.ts +1 -1
- package/commands/user/get-user-list.query.ts +2 -2
- package/commands/user/update-user.command.ts +1 -1
- package/commands/wrire-off-archive/create-wrire-off-archive.command.ts +1 -1
- package/commands/wrire-off-archive/info-wrire-off-archive.command.ts +1 -1
- package/commands/write-off/get-write-off-list.query.ts +1 -1
- package/enum/index.ts +2 -0
- package/package.json +1 -1
- package/schemas/action-log/action-log.schema.ts +1 -1
- package/schemas/action-log/order-update-action-log.schema.ts +2 -2
- package/schemas/action-log/transaction-info.schema.ts +1 -1
- package/schemas/bank-payment/bank-payment.schema.ts +6 -6
- package/schemas/branch/branch.schema.ts +2 -2
- package/schemas/category/category.schema.ts +2 -2
- package/schemas/category-alias/category-alias.schema.ts +4 -4
- package/schemas/category-template/category-template.schema.ts +2 -2
- 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 +2 -2
- package/schemas/client/client-marking.schema.ts +1 -1
- package/schemas/client/client.schema.ts +5 -5
- package/schemas/company/company.schema.ts +2 -2
- package/schemas/consignment/consignment-distribution-validation.schema.ts +2 -2
- package/schemas/consignment/consignment.schema.ts +3 -3
- package/schemas/consignment-import-schema/consignment-import-schema.scheme.ts +2 -2
- package/schemas/consignment-import-schema-relation/consignment-import-schema-relation.schema.ts +3 -3
- package/schemas/delivery-route/delivery-route.schema.ts +6 -6
- 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 +4 -4
- package/schemas/message/context-message.schema.ts +6 -6
- package/schemas/money-account/money-account.schema.ts +3 -3
- package/schemas/order/order.schema.ts +7 -7
- package/schemas/order-delivery/order-delivery.schema.ts +2 -2
- package/schemas/order-product/order-product-multiplicity-optiom.schema.ts +1 -1
- package/schemas/order-product/order-product.schema.ts +5 -5
- package/schemas/package/package.schema.ts +3 -3
- package/schemas/pre-order/pre-order.schema.ts +2 -2
- package/schemas/pre-order-collection/pre-order-collection.schema.ts +3 -3
- package/schemas/pre-order-collection-item/pre-order-collection-item.schema.ts +3 -3
- 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 +5 -5
- package/schemas/product-configuration/product-configuration.schema.ts +3 -3
- package/schemas/product-in-package/product-in-package.schema.ts +1 -1
- package/schemas/report/client-statement.schema.ts +2 -2
- package/schemas/settings/settings.schema.ts +18 -18
- package/schemas/transaction/transaction.schema.ts +3 -3
- package/schemas/type/type.schema.ts +2 -2
- package/schemas/type/typeList.schema.ts +1 -1
- package/schemas/user/user.schema.ts +5 -5
- package/schemas/write-off/write-off-image.schema.ts +2 -2
- package/schemas/write-off/write-off.schema.ts +2 -2
|
@@ -3,7 +3,7 @@ import { PreOrderCollectionStatusEnum } from '../../enum';
|
|
|
3
3
|
|
|
4
4
|
export const PreOrderCollectionSchema = z.object({
|
|
5
5
|
uuid: z.string(),
|
|
6
|
-
status: z.
|
|
6
|
+
status: z.enum(PreOrderCollectionStatusEnum),
|
|
7
7
|
description: z.string(),
|
|
8
8
|
availableUntil: z.date(),
|
|
9
9
|
deliveryDate: z.date(),
|
|
@@ -13,7 +13,7 @@ export const PreOrderCollectionSchema = z.object({
|
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
export const CreatePreOrderCollectionSchema = z.object({
|
|
16
|
-
status: z.
|
|
16
|
+
status: z.enum(PreOrderCollectionStatusEnum),
|
|
17
17
|
description: z.string(),
|
|
18
18
|
availableUntil: z.coerce.date(),
|
|
19
19
|
deliveryDate: z.coerce.date(),
|
|
@@ -23,7 +23,7 @@ export const CreatePreOrderCollectionSchema = z.object({
|
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
export const UpdatePreOrderCollectionSchema = z.object({
|
|
26
|
-
status: z.
|
|
26
|
+
status: z.enum(PreOrderCollectionStatusEnum),
|
|
27
27
|
description: z.string(),
|
|
28
28
|
availableUntil: z.coerce.date(),
|
|
29
29
|
deliveryDate: z.coerce.date(),
|
|
@@ -30,7 +30,7 @@ export const PreOrderCollectionItemSchema = z.object({
|
|
|
30
30
|
country: z.string().nullable(),
|
|
31
31
|
vat: z.number().nullable(),
|
|
32
32
|
description: z.string().nullable(),
|
|
33
|
-
salesUnit: z.
|
|
33
|
+
salesUnit: z.enum(SalesUnitEnum).nullable(),
|
|
34
34
|
article: z.string().nullable(),
|
|
35
35
|
group: z.string().nullable(),
|
|
36
36
|
multiplicityDescription: z.string().nullable(),
|
|
@@ -60,7 +60,7 @@ export const CreatePreOrderCollectionItemSchema = z.object({
|
|
|
60
60
|
vat: z.coerce.number().nullable().optional(),
|
|
61
61
|
description: z.string().nullable().optional(),
|
|
62
62
|
article: z.string().nullable().optional(),
|
|
63
|
-
salesUnit: z.
|
|
63
|
+
salesUnit: z.enum(SalesUnitEnum).optional(),
|
|
64
64
|
group: z.string().nullable().optional(),
|
|
65
65
|
multiplicityDescription: z.string().nullable().optional(),
|
|
66
66
|
});
|
|
@@ -88,7 +88,7 @@ export const UpdatePreOrderCollectionItemSchema = z
|
|
|
88
88
|
country: z.string().nullable(),
|
|
89
89
|
vat: z.coerce.number().nullable(),
|
|
90
90
|
description: z.string().nullable(),
|
|
91
|
-
salesUnit: z.
|
|
91
|
+
salesUnit: z.enum(SalesUnitEnum),
|
|
92
92
|
article: z.string().nullable(),
|
|
93
93
|
group: z.string().nullable(),
|
|
94
94
|
multiplicityDescription: z.string().nullable(),
|
|
@@ -14,7 +14,7 @@ export const PreOrderProductSchema = z.object({
|
|
|
14
14
|
uuid: z.string(),
|
|
15
15
|
preOrderCollectionItemUUID: z.string().nullable(),
|
|
16
16
|
preOrderUUID: z.string(),
|
|
17
|
-
multiplicityOptionUUID: z.
|
|
17
|
+
multiplicityOptionUUID: z.uuid().nullable().optional(),
|
|
18
18
|
quantity: z.number(),
|
|
19
19
|
comment: z.string().nullable(),
|
|
20
20
|
tag: z.string().nullable(),
|
|
@@ -39,7 +39,7 @@ export const PreOrderProductExtendedSchema = PreOrderProductSchema.extend({
|
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
export const CreatePreOrderProductSchema = PreOrderProductSchema.omit({ uuid: true, preOrderUUID: true }).extend({
|
|
42
|
-
multiplicityOptionUUID: z.
|
|
42
|
+
multiplicityOptionUUID: z.uuid().nullable().optional(),
|
|
43
43
|
categoryUUID: z.string().nullable().optional(),
|
|
44
44
|
name: z.string().nullable().optional(),
|
|
45
45
|
grower: z.string().nullable().optional(),
|
|
@@ -55,7 +55,7 @@ export const UpdatePreOrderProductSchema = PreOrderProductSchema.omit({
|
|
|
55
55
|
preOrderUUID: true,
|
|
56
56
|
})
|
|
57
57
|
.extend({
|
|
58
|
-
multiplicityOptionUUID: z.
|
|
58
|
+
multiplicityOptionUUID: z.uuid().nullable().optional(),
|
|
59
59
|
categoryUUID: z.string().nullable().optional(),
|
|
60
60
|
name: z.string().nullable().optional(),
|
|
61
61
|
grower: z.string().nullable().optional(),
|
|
@@ -8,10 +8,10 @@ import { discountRulesModeSchema } from '../discount-rules/discount-rules.schema
|
|
|
8
8
|
import { ProductMultiplicityOptionSchema } from '../..';
|
|
9
9
|
|
|
10
10
|
export const ProductSchema = z.object({
|
|
11
|
-
uuid: z.
|
|
11
|
+
uuid: z.uuid(),
|
|
12
12
|
dataSyncId: z.string().nullable(),
|
|
13
|
-
consignmentUUID: z.
|
|
14
|
-
categoryUUID: z.
|
|
13
|
+
consignmentUUID: z.uuid(),
|
|
14
|
+
categoryUUID: z.uuid().nullable(),
|
|
15
15
|
name: z.string(),
|
|
16
16
|
|
|
17
17
|
balance: z.number(),
|
|
@@ -52,7 +52,7 @@ export const ProductExtendedSchema = ProductSchema.merge(
|
|
|
52
52
|
);
|
|
53
53
|
|
|
54
54
|
export const ProductForClientSchema = z.object({
|
|
55
|
-
uuid: z.
|
|
55
|
+
uuid: z.uuid(),
|
|
56
56
|
name: z.string(),
|
|
57
57
|
balance: z.number(),
|
|
58
58
|
price: z.number(),
|
|
@@ -96,7 +96,7 @@ export const ProductExtendedForClientSchema = ProductForClientSchema.merge(
|
|
|
96
96
|
discountDataList: z
|
|
97
97
|
.object({
|
|
98
98
|
discountRulesUUID: z.string(),
|
|
99
|
-
type: z.
|
|
99
|
+
type: z.enum(DiscountRulesTypeEnum),
|
|
100
100
|
discountValueData: discountRulesModeSchema,
|
|
101
101
|
priceWithDiscount: z.number(),
|
|
102
102
|
multipleQuantity: z.number().optional(),
|
|
@@ -2,9 +2,9 @@ import { z } from 'zod';
|
|
|
2
2
|
import { CountryCodeEnum } from '../../enum';
|
|
3
3
|
|
|
4
4
|
export const ProductConfigurationSchema = z.object({
|
|
5
|
-
uuid: z.
|
|
6
|
-
categoryUUID: z.
|
|
7
|
-
country: z.
|
|
5
|
+
uuid: z.uuid(),
|
|
6
|
+
categoryUUID: z.uuid(),
|
|
7
|
+
country: z.enum(CountryCodeEnum).nullable(),
|
|
8
8
|
grower: z.string().nullable(),
|
|
9
9
|
size: z.coerce.number().nullable(),
|
|
10
10
|
isOptional: z.coerce.boolean(),
|
|
@@ -8,7 +8,7 @@ export const ProductInPackageSchema = z.object({
|
|
|
8
8
|
quantityOfUnits: z.number(),
|
|
9
9
|
perUnits: z.number(),
|
|
10
10
|
quantity: z.number(),
|
|
11
|
-
status: z.
|
|
11
|
+
status: z.enum(ProductInPackageStatusEnum),
|
|
12
12
|
deletedAt: z.date().nullable(),
|
|
13
13
|
createdAt: z.date(),
|
|
14
14
|
updatedAt: z.date(),
|
|
@@ -3,9 +3,9 @@ import { ClientStatementTypeEnum, TransactionTypeEnum } from '../../enum';
|
|
|
3
3
|
|
|
4
4
|
export const ClientStatementItemSchema = z.object({
|
|
5
5
|
date: z.coerce.date(),
|
|
6
|
-
type: z.
|
|
6
|
+
type: z.enum(ClientStatementTypeEnum),
|
|
7
7
|
amount: z.coerce.number(),
|
|
8
8
|
description: z.string(),
|
|
9
9
|
documentNumber: z.string().nullable(),
|
|
10
|
-
transactionType: z.
|
|
10
|
+
transactionType: z.enum(TransactionTypeEnum).nullable(),
|
|
11
11
|
});
|
|
@@ -16,8 +16,8 @@ export const SettingsWorkingHoursSchema = z.object({
|
|
|
16
16
|
|
|
17
17
|
export const SettingsSchema = z.object({
|
|
18
18
|
uuid: z.string(),
|
|
19
|
-
language: z.
|
|
20
|
-
additionalLanguage: z.
|
|
19
|
+
language: z.enum(LanguageEnum),
|
|
20
|
+
additionalLanguage: z.enum(LanguageEnum).nullable(),
|
|
21
21
|
currency: z.string().nullable(),
|
|
22
22
|
timeZone: z.string().nullable(),
|
|
23
23
|
phoneFormat: z.string().nullable(),
|
|
@@ -44,17 +44,17 @@ export const SettingsSchema = z.object({
|
|
|
44
44
|
orderExpirationMin: z.number().nullable(),
|
|
45
45
|
paymentGraceDaysAfterCompletion: z.number().nullable(),
|
|
46
46
|
writeOffAllowedHoursAfterCompletion: z.number().nullable(),
|
|
47
|
-
discountPriceRounding: z.
|
|
47
|
+
discountPriceRounding: z.enum(DiscountPriceRoundingEnum),
|
|
48
48
|
createdAt: z.coerce.date(),
|
|
49
49
|
updatedAt: z.coerce.date(),
|
|
50
50
|
isWhatsappActive: z.boolean(),
|
|
51
51
|
isPostTerminalActive: z.boolean(),
|
|
52
|
-
webshopMainDisplayMode: z.
|
|
53
|
-
webshopMode: z.
|
|
52
|
+
webshopMainDisplayMode: z.enum(WebshopMainDisplayModeEnum).nullable(),
|
|
53
|
+
webshopMode: z.enum(WebshopModeEnum).nullable(),
|
|
54
54
|
phoneSales: z.string().nullable(),
|
|
55
55
|
phoneWhatsappSales: z.string().nullable(),
|
|
56
56
|
telegramChannel: z.string().nullable(),
|
|
57
|
-
menuItemsSort: z.array(z.
|
|
57
|
+
menuItemsSort: z.array(z.enum(MenuItemsUrlEnum)).nullable(),
|
|
58
58
|
phoneCountryCode: z.array(z.string()),
|
|
59
59
|
aboutCompany: z.string().nullable(),
|
|
60
60
|
companyRequisites: z.string().nullable(),
|
|
@@ -83,8 +83,8 @@ export const SettingsForAdminSchema = SettingsSchema.extend({
|
|
|
83
83
|
});
|
|
84
84
|
|
|
85
85
|
export const CreateSettingsSchema = z.object({
|
|
86
|
-
language: z.
|
|
87
|
-
additionalLanguage: z.
|
|
86
|
+
language: z.enum(LanguageEnum),
|
|
87
|
+
additionalLanguage: z.enum(LanguageEnum).nullable().optional(),
|
|
88
88
|
currency: z.string().optional(),
|
|
89
89
|
timeZone: z.string().optional(),
|
|
90
90
|
phoneFormat: z.string().optional(),
|
|
@@ -107,15 +107,15 @@ export const CreateSettingsSchema = z.object({
|
|
|
107
107
|
paymentGraceDaysAfterCompletion: z.coerce.number().nullable().optional(),
|
|
108
108
|
writeOffAllowedHoursAfterCompletion: z.coerce.number().nullable().optional(),
|
|
109
109
|
isShowPriceAnonymous: z.coerce.boolean().optional(),
|
|
110
|
-
discountPriceRounding: z.
|
|
110
|
+
discountPriceRounding: z.enum(DiscountPriceRoundingEnum).optional(),
|
|
111
111
|
vatTag: z.string().nullable().optional(),
|
|
112
112
|
taxMode: z.string().nullable().optional(),
|
|
113
113
|
integrationUrl: z.string().nullable().optional(),
|
|
114
114
|
receiptLogin: z.string().nullable().optional(),
|
|
115
115
|
receiptPassword: z.string().nullable().optional(),
|
|
116
116
|
retailPointUuid: z.string().nullable().optional(),
|
|
117
|
-
webshopMainDisplayMode: z.
|
|
118
|
-
webshopMode: z.
|
|
117
|
+
webshopMainDisplayMode: z.enum(WebshopMainDisplayModeEnum).nullable().optional(),
|
|
118
|
+
webshopMode: z.enum(WebshopModeEnum).nullable().optional(),
|
|
119
119
|
workingHours: z.array(
|
|
120
120
|
z.object({
|
|
121
121
|
dayOfWeek: z.coerce.number(),
|
|
@@ -127,7 +127,7 @@ export const CreateSettingsSchema = z.object({
|
|
|
127
127
|
phoneSales: z.string().nullable().optional(),
|
|
128
128
|
phoneWhatsappSales: z.string().nullable().optional(),
|
|
129
129
|
telegramChannel: z.string().nullable().optional(),
|
|
130
|
-
menuItemsSort: z.array(z.
|
|
130
|
+
menuItemsSort: z.array(z.enum(MenuItemsUrlEnum)).nullable().optional(),
|
|
131
131
|
phoneCountryCode: z.array(z.string()).optional(),
|
|
132
132
|
aboutCompany: z.string().nullable().optional(),
|
|
133
133
|
companyRequisites: z.string().nullable().optional(),
|
|
@@ -141,8 +141,8 @@ export const CreateSettingsSchema = z.object({
|
|
|
141
141
|
});
|
|
142
142
|
|
|
143
143
|
export const UpdateSettingsRequestSchema = z.object({
|
|
144
|
-
language: z.
|
|
145
|
-
additionalLanguage: z.
|
|
144
|
+
language: z.enum(LanguageEnum),
|
|
145
|
+
additionalLanguage: z.enum(LanguageEnum).nullable().optional(),
|
|
146
146
|
currency: z.string().optional(),
|
|
147
147
|
timeZone: z.string().optional(),
|
|
148
148
|
isImageTemplateSync: z.coerce.boolean().optional(),
|
|
@@ -165,9 +165,9 @@ export const UpdateSettingsRequestSchema = z.object({
|
|
|
165
165
|
orderExpirationMin: z.coerce.number().nullable().optional(),
|
|
166
166
|
paymentGraceDaysAfterCompletion: z.coerce.number().nullable().optional(),
|
|
167
167
|
writeOffAllowedHoursAfterCompletion: z.coerce.number().nullable().optional(),
|
|
168
|
-
discountPriceRounding: z.
|
|
169
|
-
webshopMainDisplayMode: z.
|
|
170
|
-
webshopMode: z.
|
|
168
|
+
discountPriceRounding: z.enum(DiscountPriceRoundingEnum).optional(),
|
|
169
|
+
webshopMainDisplayMode: z.enum(WebshopMainDisplayModeEnum).nullable().optional(),
|
|
170
|
+
webshopMode: z.enum(WebshopModeEnum).nullable().optional(),
|
|
171
171
|
workingHours: z.array(
|
|
172
172
|
z.object({
|
|
173
173
|
dayOfWeek: z.coerce.number(),
|
|
@@ -179,7 +179,7 @@ export const UpdateSettingsRequestSchema = z.object({
|
|
|
179
179
|
phoneSales: z.string().nullable().optional(),
|
|
180
180
|
phoneWhatsappSales: z.string().nullable().optional(),
|
|
181
181
|
telegramChannel: z.string().nullable().optional(),
|
|
182
|
-
menuItemsSort: z.array(z.
|
|
182
|
+
menuItemsSort: z.array(z.enum(MenuItemsUrlEnum)).nullable().optional(),
|
|
183
183
|
phoneCountryCode: z.array(z.string()).optional(),
|
|
184
184
|
aboutCompany: z.string().nullable().optional(),
|
|
185
185
|
companyRequisites: z.string().nullable().optional(),
|
|
@@ -5,8 +5,8 @@ import { ClientSchema } from '../client';
|
|
|
5
5
|
import { OrderForClientSchema, OrderSchema } from '../order/order.schema';
|
|
6
6
|
|
|
7
7
|
export const TransactionSchema = z.object({
|
|
8
|
-
uuid: z.
|
|
9
|
-
moneyAccountUUID: z.
|
|
8
|
+
uuid: z.uuid(),
|
|
9
|
+
moneyAccountUUID: z.uuid(),
|
|
10
10
|
|
|
11
11
|
amount: z.number(),
|
|
12
12
|
comment: z.string(),
|
|
@@ -14,7 +14,7 @@ export const TransactionSchema = z.object({
|
|
|
14
14
|
clientUUID: z.string().nullable(),
|
|
15
15
|
orderUUID: z.string().nullable(),
|
|
16
16
|
|
|
17
|
-
type: z.
|
|
17
|
+
type: z.enum(TransactionTypeEnum),
|
|
18
18
|
createdByUserUUID: z.string(),
|
|
19
19
|
|
|
20
20
|
createdAt: z.date(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
3
|
export const TypeSchema = z.object({
|
|
4
|
-
uuid: z.
|
|
4
|
+
uuid: z.uuid(),
|
|
5
5
|
name: z.string(),
|
|
6
6
|
rank: z.number(),
|
|
7
7
|
deletedAt: z.date().nullable(),
|
|
@@ -10,7 +10,7 @@ export const TypeSchema = z.object({
|
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
export const TypeInCategorySchema = z.object({
|
|
13
|
-
uuid: z.
|
|
13
|
+
uuid: z.uuid(),
|
|
14
14
|
name: z.string(),
|
|
15
15
|
rank: z.number(),
|
|
16
16
|
});
|
|
@@ -2,13 +2,13 @@ import { z } from 'zod';
|
|
|
2
2
|
import { UserRoleEnum, UserStatusEnum } from '../../enum';
|
|
3
3
|
|
|
4
4
|
export const UserSchema = z.object({
|
|
5
|
-
uuid: z.
|
|
5
|
+
uuid: z.uuid(),
|
|
6
6
|
name: z.string(),
|
|
7
7
|
email: z.string().nullable(),
|
|
8
8
|
phone: z.string().nullable(),
|
|
9
|
-
roles: z.array(z.
|
|
9
|
+
roles: z.array(z.enum(UserRoleEnum)),
|
|
10
10
|
companyUUID: z.string(),
|
|
11
|
-
status: z.
|
|
11
|
+
status: z.enum(UserStatusEnum),
|
|
12
12
|
isGlobal: z.boolean(),
|
|
13
13
|
restoreTokenHash: z.string().nullable(),
|
|
14
14
|
passwordHash: z.string(),
|
|
@@ -22,6 +22,6 @@ export const CreateUserSchema = z.object({
|
|
|
22
22
|
email: z.string(),
|
|
23
23
|
phone: z.string(),
|
|
24
24
|
password: z.string(),
|
|
25
|
-
roles: z.array(z.
|
|
26
|
-
status: z.
|
|
25
|
+
roles: z.array(z.enum(UserRoleEnum)).default([UserRoleEnum.BUYER]),
|
|
26
|
+
status: z.enum(UserStatusEnum).default(UserStatusEnum.INACTIVE),
|
|
27
27
|
});
|
|
@@ -7,7 +7,7 @@ import { WriteOffStatusEnum } from '../../enum';
|
|
|
7
7
|
import { ClientSchema } from '../client';
|
|
8
8
|
|
|
9
9
|
export const WriteOffSchema = z.object({
|
|
10
|
-
uuid: z.
|
|
10
|
+
uuid: z.uuid(),
|
|
11
11
|
quantity: z.number(),
|
|
12
12
|
reason: z.string(),
|
|
13
13
|
comment: z.string().nullable(),
|
|
@@ -17,7 +17,7 @@ export const WriteOffSchema = z.object({
|
|
|
17
17
|
orderUUID: z.string().nullable(),
|
|
18
18
|
createdByUUID: z.string(),
|
|
19
19
|
approvedByUUID: z.string().nullable(),
|
|
20
|
-
status: z.
|
|
20
|
+
status: z.enum(WriteOffStatusEnum),
|
|
21
21
|
|
|
22
22
|
createdAt: z.date(),
|
|
23
23
|
updatedAt: z.date(),
|