@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.
Files changed (279) hide show
  1. package/build/commands/action-log/get-action-log-list-for-client.query.js +1 -1
  2. package/build/commands/action-log/get-action-log-list.query.js +1 -1
  3. package/build/commands/auth/login-user.command.js +3 -3
  4. package/build/commands/auth/register-user.command.js +1 -1
  5. package/build/commands/auth/reset-password-by-security-code.command.js +1 -1
  6. package/build/commands/auth/reset-password-by-token.command.js +1 -1
  7. package/build/commands/auth/restore-password-by-security-code.command.js +1 -1
  8. package/build/commands/bank-payment/get-bank-payment-list.query.js +1 -1
  9. package/build/commands/bank-payment/update-bank-payment-status.query.js +1 -1
  10. package/build/commands/branch/delete-branch.command.js +1 -1
  11. package/build/commands/category/delete-category.command.js +1 -1
  12. package/build/commands/category/get-category-by-uuid.query.js +1 -1
  13. package/build/commands/category/get-category-list.query.js +3 -3
  14. package/build/commands/category/update-category-command.js +2 -2
  15. package/build/commands/category-alias/delete-category-alias.command.js +1 -1
  16. package/build/commands/category-alias/get-category-alias-by-uuid.query.js +1 -1
  17. package/build/commands/category-alias/update-category-alias.command.js +1 -1
  18. package/build/commands/client/create-client.command.js +3 -3
  19. package/build/commands/client/delete-client.command.js +1 -1
  20. package/build/commands/client/get-client-list.query.js +2 -2
  21. package/build/commands/client/marking/get-client-marking-by-client-list.command.js +2 -2
  22. package/build/commands/client/profile/get-client-individual-profile.query.js +1 -1
  23. package/build/commands/client/update-client.command.js +4 -4
  24. package/build/commands/client/webshop/register-client-webshop.command.js +2 -2
  25. package/build/commands/client/webshop/update-client-for-client.command.js +1 -1
  26. package/build/commands/company/deleteCompany.command.js +1 -1
  27. package/build/commands/company/getCompany.query.js +1 -1
  28. package/build/commands/consignment/create-consignment.command.js +1 -1
  29. package/build/commands/consignment/delete-consignment.command.js +1 -1
  30. package/build/commands/consignment/update-consignment.command.js +1 -1
  31. package/build/commands/consignment/upsert-access-clients-consignment.command.js +1 -1
  32. package/build/commands/delivery-route/attach-order-list-to-delivery-route.command.js +1 -1
  33. package/build/commands/delivery-route/detach-order-list-to-delivery-route.command.js +1 -1
  34. package/build/commands/delivery-route/get-delivery-route-list.query.js +1 -1
  35. package/build/commands/discount-rules/get-discount-rules-all.query.js +2 -2
  36. package/build/commands/message/get-context-unread-count.query.js +3 -3
  37. package/build/commands/message/get-contexts-with-unread.query.js +2 -2
  38. package/build/commands/message/list-context-messages.query.js +5 -5
  39. package/build/commands/message/mark-context-read.command.js +3 -3
  40. package/build/commands/message/send-context-message.command.js +3 -3
  41. package/build/commands/order/create-order.command.js +3 -3
  42. package/build/commands/order/get-order-list.query.js +2 -2
  43. package/build/commands/order/group/update-group-order-status.command.js +1 -1
  44. package/build/commands/order/group/update-group-order-type.command.js +1 -1
  45. package/build/commands/order/update-order.command.js +4 -4
  46. package/build/commands/order/webshop/update-cart.command.js +1 -1
  47. package/build/commands/order-delivery/update-order-delivery.command.js +1 -1
  48. package/build/commands/order-product/create-order-product.command.js +1 -1
  49. package/build/commands/order-product/group/update-group-order-product-order.command.js +1 -1
  50. package/build/commands/order-product/update-order-product.command.js +2 -2
  51. package/build/commands/order-product/webshop/create-order-product-for-client.command.js +1 -1
  52. package/build/commands/order-product/webshop/update-order-product-for-client.command.js +1 -1
  53. package/build/commands/package/get-package-filters-values.query.js +2 -2
  54. package/build/commands/package/reorder-packages.command.js +1 -1
  55. package/build/commands/pre-order/create-order-from-pre-order.command.js +1 -1
  56. package/build/commands/pre-order/get-pre-order-list.query.js +1 -1
  57. package/build/commands/pre-order/group/analyze-copy-pre-orders.command.js +2 -2
  58. package/build/commands/pre-order/group/analyze-create-orders-from-pre-orders.command.js +2 -2
  59. package/build/commands/pre-order/group/analyze-create-pre-orders-from-standing-orders.command.js +2 -2
  60. package/build/commands/pre-order/group/group-copy-pre-orders-to-collection.command.js +2 -2
  61. package/build/commands/pre-order/group/group-create-orders-from-pre-orders.command.js +4 -4
  62. package/build/commands/pre-order/group/group-create-pre-orders-from-standing-orders.command.js +4 -4
  63. package/build/commands/pre-order/webshop/get-pre-order-list-webshop.command.js +1 -1
  64. package/build/commands/pre-order-collection/get-pre-order-collection-list.query.js +1 -1
  65. package/build/commands/pre-order-collection/match-images-for-collection.command.js +1 -1
  66. package/build/commands/pre-order-collection-item/export-pre-order-collection-item-with-clients-vertical.query.js +1 -1
  67. package/build/commands/pre-order-collection-item/get-pre-order-collection-item-extended-with-clients-pre-order-product-list.query.js +1 -1
  68. package/build/commands/pre-order-collection-item/multiplicity-option/reorder-pre-order-collection-item-multiplicity-options.command.js +1 -1
  69. package/build/commands/product/get-product-quantity-calculate.query.js +1 -1
  70. package/build/commands/product/group/update-group-product-update-batch.command.js +1 -1
  71. package/build/commands/product/multiplicity-option/reorder-product-multiplicity-options.command.js +1 -1
  72. package/build/commands/product-configuration/get-product-configuration-list.query.js +1 -1
  73. package/build/commands/product-image/get-product-image-list.query.js +1 -1
  74. package/build/commands/report/export-client-statement.query.js +1 -1
  75. package/build/commands/report/export-inventory-movement.query.js +3 -3
  76. package/build/commands/report/export-inventory-stock.query.js +1 -1
  77. package/build/commands/report/export-inventory-turnover.query.js +1 -1
  78. package/build/commands/report/export-sales-revenue.query.js +1 -1
  79. package/build/commands/transaction/apply-prepayment-transaction.command.js +1 -1
  80. package/build/commands/transaction/export-transactions.command.js +1 -1
  81. package/build/commands/transaction/get-transaction-list.query.js +1 -1
  82. package/build/commands/transaction/get-transaction-summary.query.js +1 -1
  83. package/build/commands/transaction/webshop/get-transaction-list-for-client.query.js +1 -1
  84. package/build/commands/type/delete-type.command.js +1 -1
  85. package/build/commands/type/get-type-by-uuid.query.js +1 -1
  86. package/build/commands/type/get-type-list.query.js +1 -1
  87. package/build/commands/user/createUserByClientId.command.js +3 -3
  88. package/build/commands/user/createUserForCompany.command.js +1 -1
  89. package/build/commands/user/get-user-list.query.js +2 -2
  90. package/build/commands/user/update-user.command.js +1 -1
  91. package/build/commands/wrire-off-archive/create-wrire-off-archive.command.js +1 -1
  92. package/build/commands/wrire-off-archive/info-wrire-off-archive.command.js +1 -1
  93. package/build/commands/write-off/get-write-off-list.query.js +1 -1
  94. package/build/enum/index.js +2 -0
  95. package/build/schemas/action-log/action-log.schema.js +1 -1
  96. package/build/schemas/action-log/order-update-action-log.schema.js +2 -2
  97. package/build/schemas/action-log/transaction-info.schema.js +1 -1
  98. package/build/schemas/bank-payment/bank-payment.schema.js +6 -6
  99. package/build/schemas/branch/branch.schema.js +2 -2
  100. package/build/schemas/category/category.schema.js +2 -2
  101. package/build/schemas/category-alias/category-alias.schema.js +4 -4
  102. package/build/schemas/category-template/category-template.schema.js +2 -2
  103. package/build/schemas/client/client-debt.schema.js +1 -1
  104. package/build/schemas/client/client-individual-profile.schema.js +1 -1
  105. package/build/schemas/client/client-legal-profile.schema.js +2 -2
  106. package/build/schemas/client/client-marking.schema.js +1 -1
  107. package/build/schemas/client/client.schema.js +5 -5
  108. package/build/schemas/company/company.schema.js +2 -2
  109. package/build/schemas/consignment/consignment-distribution-validation.schema.js +2 -2
  110. package/build/schemas/consignment/consignment.schema.js +3 -3
  111. package/build/schemas/consignment-import-schema/consignment-import-schema.scheme.js +2 -2
  112. package/build/schemas/consignment-import-schema-relation/consignment-import-schema-relation.schema.js +3 -3
  113. package/build/schemas/delivery-route/delivery-route.schema.js +6 -6
  114. package/build/schemas/domain/domain.schema.js +1 -1
  115. package/build/schemas/message/client-inbox-item.schema.js +1 -1
  116. package/build/schemas/message/context-inbox.schema.js +4 -4
  117. package/build/schemas/message/context-message.schema.js +6 -6
  118. package/build/schemas/money-account/money-account.schema.js +3 -3
  119. package/build/schemas/order/order.schema.js +7 -7
  120. package/build/schemas/order-delivery/order-delivery.schema.js +2 -2
  121. package/build/schemas/order-product/order-product-multiplicity-optiom.schema.js +1 -1
  122. package/build/schemas/order-product/order-product.schema.js +5 -5
  123. package/build/schemas/package/package.schema.js +3 -3
  124. package/build/schemas/pre-order/pre-order.schema.js +2 -2
  125. package/build/schemas/pre-order-collection/pre-order-collection.schema.js +3 -3
  126. package/build/schemas/pre-order-collection-item/pre-order-collection-item.schema.js +3 -3
  127. package/build/schemas/pre-order-product/pre-order-product.schema.js +3 -3
  128. package/build/schemas/product/product-multiplicity-option.schema.js +1 -1
  129. package/build/schemas/product/product.schema.js +5 -5
  130. package/build/schemas/product-configuration/product-configuration.schema.js +3 -3
  131. package/build/schemas/product-in-package/product-in-package.schema.js +1 -1
  132. package/build/schemas/report/client-statement.schema.js +2 -2
  133. package/build/schemas/settings/settings.schema.js +18 -18
  134. package/build/schemas/transaction/transaction.schema.js +3 -3
  135. package/build/schemas/type/type.schema.js +2 -2
  136. package/build/schemas/type/typeList.schema.js +1 -1
  137. package/build/schemas/user/user.schema.js +5 -5
  138. package/build/schemas/write-off/write-off-image.schema.js +2 -2
  139. package/build/schemas/write-off/write-off.schema.js +2 -2
  140. package/commands/action-log/get-action-log-list-for-client.query.ts +1 -1
  141. package/commands/action-log/get-action-log-list.query.ts +1 -1
  142. package/commands/auth/login-user.command.ts +3 -3
  143. package/commands/auth/register-user.command.ts +1 -1
  144. package/commands/auth/reset-password-by-security-code.command.ts +1 -1
  145. package/commands/auth/reset-password-by-token.command.ts +1 -1
  146. package/commands/auth/restore-password-by-security-code.command.ts +1 -1
  147. package/commands/bank-payment/get-bank-payment-list.query.ts +1 -1
  148. package/commands/bank-payment/update-bank-payment-status.query.ts +1 -1
  149. package/commands/branch/delete-branch.command.ts +1 -1
  150. package/commands/category/delete-category.command.ts +1 -1
  151. package/commands/category/get-category-by-uuid.query.ts +1 -1
  152. package/commands/category/get-category-list.query.ts +3 -3
  153. package/commands/category/update-category-command.ts +2 -2
  154. package/commands/category-alias/delete-category-alias.command.ts +1 -1
  155. package/commands/category-alias/get-category-alias-by-uuid.query.ts +1 -1
  156. package/commands/category-alias/update-category-alias.command.ts +1 -1
  157. package/commands/client/create-client.command.ts +3 -3
  158. package/commands/client/delete-client.command.ts +1 -1
  159. package/commands/client/get-client-list.query.ts +2 -2
  160. package/commands/client/marking/get-client-marking-by-client-list.command.ts +2 -2
  161. package/commands/client/profile/get-client-individual-profile.query.ts +1 -1
  162. package/commands/client/update-client.command.ts +4 -4
  163. package/commands/client/webshop/register-client-webshop.command.ts +2 -2
  164. package/commands/client/webshop/update-client-for-client.command.ts +1 -1
  165. package/commands/company/deleteCompany.command.ts +1 -1
  166. package/commands/company/getCompany.query.ts +1 -1
  167. package/commands/consignment/create-consignment.command.ts +1 -1
  168. package/commands/consignment/delete-consignment.command.ts +1 -1
  169. package/commands/consignment/update-consignment.command.ts +1 -1
  170. package/commands/consignment/upsert-access-clients-consignment.command.ts +1 -1
  171. package/commands/delivery-route/attach-order-list-to-delivery-route.command.ts +1 -1
  172. package/commands/delivery-route/detach-order-list-to-delivery-route.command.ts +1 -1
  173. package/commands/delivery-route/get-delivery-route-list.query.ts +1 -1
  174. package/commands/discount-rules/get-discount-rules-all.query.ts +2 -2
  175. package/commands/message/get-context-unread-count.query.ts +3 -3
  176. package/commands/message/get-contexts-with-unread.query.ts +2 -2
  177. package/commands/message/list-context-messages.query.ts +5 -5
  178. package/commands/message/mark-context-read.command.ts +3 -3
  179. package/commands/message/send-context-message.command.ts +3 -3
  180. package/commands/order/create-order.command.ts +3 -3
  181. package/commands/order/get-order-list.query.ts +2 -2
  182. package/commands/order/group/update-group-order-status.command.ts +1 -1
  183. package/commands/order/group/update-group-order-type.command.ts +1 -1
  184. package/commands/order/update-order.command.ts +4 -4
  185. package/commands/order/webshop/update-cart.command.ts +1 -1
  186. package/commands/order-delivery/update-order-delivery.command.ts +1 -1
  187. package/commands/order-product/create-order-product.command.ts +1 -1
  188. package/commands/order-product/group/update-group-order-product-order.command.ts +1 -1
  189. package/commands/order-product/update-order-product.command.ts +2 -2
  190. package/commands/order-product/webshop/create-order-product-for-client.command.ts +1 -1
  191. package/commands/order-product/webshop/update-order-product-for-client.command.ts +1 -1
  192. package/commands/package/get-package-filters-values.query.ts +2 -2
  193. package/commands/package/reorder-packages.command.ts +1 -1
  194. package/commands/pre-order/create-order-from-pre-order.command.ts +1 -1
  195. package/commands/pre-order/get-pre-order-list.query.ts +1 -1
  196. package/commands/pre-order/group/analyze-copy-pre-orders.command.ts +2 -2
  197. package/commands/pre-order/group/analyze-create-orders-from-pre-orders.command.ts +2 -2
  198. package/commands/pre-order/group/analyze-create-pre-orders-from-standing-orders.command.ts +2 -2
  199. package/commands/pre-order/group/group-copy-pre-orders-to-collection.command.ts +2 -2
  200. package/commands/pre-order/group/group-create-orders-from-pre-orders.command.ts +4 -4
  201. package/commands/pre-order/group/group-create-pre-orders-from-standing-orders.command.ts +4 -4
  202. package/commands/pre-order/webshop/get-pre-order-list-webshop.command.ts +1 -1
  203. package/commands/pre-order-collection/get-pre-order-collection-list.query.ts +1 -1
  204. package/commands/pre-order-collection/match-images-for-collection.command.ts +1 -1
  205. package/commands/pre-order-collection-item/export-pre-order-collection-item-with-clients-vertical.query.ts +1 -1
  206. package/commands/pre-order-collection-item/get-pre-order-collection-item-extended-with-clients-pre-order-product-list.query.ts +1 -1
  207. package/commands/pre-order-collection-item/multiplicity-option/reorder-pre-order-collection-item-multiplicity-options.command.ts +1 -1
  208. package/commands/product/get-product-quantity-calculate.query.ts +1 -1
  209. package/commands/product/group/update-group-product-update-batch.command.ts +1 -1
  210. package/commands/product/multiplicity-option/reorder-product-multiplicity-options.command.ts +1 -1
  211. package/commands/product-configuration/get-product-configuration-list.query.ts +1 -1
  212. package/commands/product-image/get-product-image-list.query.ts +1 -1
  213. package/commands/report/export-client-statement.query.ts +1 -1
  214. package/commands/report/export-inventory-movement.query.ts +3 -3
  215. package/commands/report/export-inventory-stock.query.ts +1 -1
  216. package/commands/report/export-inventory-turnover.query.ts +1 -1
  217. package/commands/report/export-sales-revenue.query.ts +1 -1
  218. package/commands/transaction/apply-prepayment-transaction.command.ts +1 -1
  219. package/commands/transaction/export-transactions.command.ts +1 -1
  220. package/commands/transaction/get-transaction-list.query.ts +1 -1
  221. package/commands/transaction/get-transaction-summary.query.ts +1 -1
  222. package/commands/transaction/webshop/get-transaction-list-for-client.query.ts +1 -1
  223. package/commands/type/delete-type.command.ts +1 -1
  224. package/commands/type/get-type-by-uuid.query.ts +1 -1
  225. package/commands/type/get-type-list.query.ts +1 -1
  226. package/commands/user/createUserByClientId.command.ts +3 -3
  227. package/commands/user/createUserForCompany.command.ts +1 -1
  228. package/commands/user/get-user-list.query.ts +2 -2
  229. package/commands/user/update-user.command.ts +1 -1
  230. package/commands/wrire-off-archive/create-wrire-off-archive.command.ts +1 -1
  231. package/commands/wrire-off-archive/info-wrire-off-archive.command.ts +1 -1
  232. package/commands/write-off/get-write-off-list.query.ts +1 -1
  233. package/enum/index.ts +2 -0
  234. package/package.json +1 -1
  235. package/schemas/action-log/action-log.schema.ts +1 -1
  236. package/schemas/action-log/order-update-action-log.schema.ts +2 -2
  237. package/schemas/action-log/transaction-info.schema.ts +1 -1
  238. package/schemas/bank-payment/bank-payment.schema.ts +6 -6
  239. package/schemas/branch/branch.schema.ts +2 -2
  240. package/schemas/category/category.schema.ts +2 -2
  241. package/schemas/category-alias/category-alias.schema.ts +4 -4
  242. package/schemas/category-template/category-template.schema.ts +2 -2
  243. package/schemas/client/client-debt.schema.ts +1 -1
  244. package/schemas/client/client-individual-profile.schema.ts +1 -1
  245. package/schemas/client/client-legal-profile.schema.ts +2 -2
  246. package/schemas/client/client-marking.schema.ts +1 -1
  247. package/schemas/client/client.schema.ts +5 -5
  248. package/schemas/company/company.schema.ts +2 -2
  249. package/schemas/consignment/consignment-distribution-validation.schema.ts +2 -2
  250. package/schemas/consignment/consignment.schema.ts +3 -3
  251. package/schemas/consignment-import-schema/consignment-import-schema.scheme.ts +2 -2
  252. package/schemas/consignment-import-schema-relation/consignment-import-schema-relation.schema.ts +3 -3
  253. package/schemas/delivery-route/delivery-route.schema.ts +6 -6
  254. package/schemas/domain/domain.schema.ts +1 -1
  255. package/schemas/message/client-inbox-item.schema.ts +1 -1
  256. package/schemas/message/context-inbox.schema.ts +4 -4
  257. package/schemas/message/context-message.schema.ts +6 -6
  258. package/schemas/money-account/money-account.schema.ts +3 -3
  259. package/schemas/order/order.schema.ts +7 -7
  260. package/schemas/order-delivery/order-delivery.schema.ts +2 -2
  261. package/schemas/order-product/order-product-multiplicity-optiom.schema.ts +1 -1
  262. package/schemas/order-product/order-product.schema.ts +5 -5
  263. package/schemas/package/package.schema.ts +3 -3
  264. package/schemas/pre-order/pre-order.schema.ts +2 -2
  265. package/schemas/pre-order-collection/pre-order-collection.schema.ts +3 -3
  266. package/schemas/pre-order-collection-item/pre-order-collection-item.schema.ts +3 -3
  267. package/schemas/pre-order-product/pre-order-product.schema.ts +3 -3
  268. package/schemas/product/product-multiplicity-option.schema.ts +1 -1
  269. package/schemas/product/product.schema.ts +5 -5
  270. package/schemas/product-configuration/product-configuration.schema.ts +3 -3
  271. package/schemas/product-in-package/product-in-package.schema.ts +1 -1
  272. package/schemas/report/client-statement.schema.ts +2 -2
  273. package/schemas/settings/settings.schema.ts +18 -18
  274. package/schemas/transaction/transaction.schema.ts +3 -3
  275. package/schemas/type/type.schema.ts +2 -2
  276. package/schemas/type/typeList.schema.ts +1 -1
  277. package/schemas/user/user.schema.ts +5 -5
  278. package/schemas/write-off/write-off-image.schema.ts +2 -2
  279. package/schemas/write-off/write-off.schema.ts +2 -2
@@ -7,14 +7,14 @@ const CreateUserByClientIdRequestSchema = z.object({
7
7
  .object({
8
8
  password: z.string(),
9
9
  name: z.string(),
10
- email: z.string().email().toLowerCase().nullable().optional(),
10
+ email: z.email().toLowerCase().nullable().optional(),
11
11
  phone: z.string().nullable().optional(),
12
- roles: z.array(z.nativeEnum(UserRoleEnum)).optional().default([UserRoleEnum.BUYER]),
12
+ roles: z.array(z.enum(UserRoleEnum)).optional().default([UserRoleEnum.BUYER]),
13
13
  })
14
14
  .refine(data => data.email || data.phone, {
15
15
  message: 'Either email or phone must be provided',
16
16
  }),
17
- clientUuid: z.string().uuid(),
17
+ clientUuid: z.uuid(),
18
18
  });
19
19
 
20
20
  const CreateUserByClientIdResponseSchema = z.object({
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import { UserSchema } from '../../schemas';
3
3
  import { UserRoleEnum } from '../../enum';
4
4
 
5
- const UserRoles = z.nativeEnum(UserRoleEnum);
5
+ const UserRoles = z.enum(UserRoleEnum);
6
6
  const AllowedRoles = UserRoles.refine(role => role !== UserRoleEnum.BUYER, {
7
7
  message: 'Allowed roles are: Admin, Manager, Employee',
8
8
  });
@@ -7,8 +7,8 @@ const GetUserListRequestSchema = z.object({
7
7
  page: z.coerce.number().optional().default(1),
8
8
  count: z.coerce.number().optional().default(10),
9
9
  searchQuery: z.string().optional().nullable().default(null),
10
- orderBy: z.nativeEnum(OrderByEnum).default(OrderByEnum.ASC),
11
- roles: z.array(z.nativeEnum(UserRoleEnum)).optional().nullable().default(null),
10
+ orderBy: z.enum(OrderByEnum).default(OrderByEnum.ASC),
11
+ roles: z.array(z.enum(UserRoleEnum)).optional().nullable().default(null),
12
12
  });
13
13
 
14
14
  const GetUserListResponseSchema = z.object({
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import { UserSchema } from '../../schemas';
3
3
 
4
4
  const UpdateUserRequestSchema = z.object({
5
- email: z.string().email().toLowerCase().nullable().optional(),
5
+ email: z.email().toLowerCase().nullable().optional(),
6
6
  name: z.string().optional(),
7
7
  phone: z.string().nullable().optional(),
8
8
  });
@@ -7,7 +7,7 @@ const CreateWriteOffArchiveResponseSchema = z.object({
7
7
  message: z.string().optional(),
8
8
  data: z
9
9
  .object({
10
- status: z.nativeEnum(ConsignmentWriteOffArchivesStatusEnum),
10
+ status: z.enum(ConsignmentWriteOffArchivesStatusEnum),
11
11
  url: z.string().nullable().optional(),
12
12
  })
13
13
  .nullable(),
@@ -7,7 +7,7 @@ const InfoWriteOffArchiveResponseSchema = z.object({
7
7
  message: z.string().optional(),
8
8
  data: z
9
9
  .object({
10
- status: z.nativeEnum(ConsignmentWriteOffArchivesStatusEnum),
10
+ status: z.enum(ConsignmentWriteOffArchivesStatusEnum),
11
11
  url: z.string().nullable().optional(),
12
12
  })
13
13
  .nullable(),
@@ -10,7 +10,7 @@ const GetWriteOffListRequestSchema = z.object({
10
10
  clientUUID: z.string().optional(),
11
11
  searchQuery: z.string().optional(),
12
12
  responsibleUserUUID: z.string().optional(),
13
- status: z.nativeEnum(WriteOffStatusEnum).optional(),
13
+ status: z.enum(WriteOffStatusEnum).optional(),
14
14
  page: z.coerce.number().optional().default(1),
15
15
  count: z.coerce.number().optional().default(10),
16
16
  });
package/enum/index.ts CHANGED
@@ -26,6 +26,8 @@ export * from './discount-rules-type.enum';
26
26
  export * from './discount-rules-mode-type.enum';
27
27
  export * from './order-distribute-status-list';
28
28
  export * from './order-active-status-list';
29
+ export * from './client-status.enum';
30
+ export * from './client-type.enum';
29
31
  export * from './consignment-distribution-validation-status.enum';
30
32
  export * from './consignment-distribution-validation-type.enum';
31
33
  export * from './consignment-access-client-status.enum';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floristcloud/api-lib",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {
@@ -96,7 +96,7 @@ export const ActionLogSchema = z.discriminatedUnion('actionType', [
96
96
  ]);
97
97
 
98
98
  export const CreateActionLogSchema = z.object({
99
- actionType: z.nativeEnum(ActionLogTypeEnum),
99
+ actionType: z.enum(ActionLogTypeEnum),
100
100
  entityUUID: z.string(),
101
101
  });
102
102
 
@@ -2,6 +2,6 @@ import { z } from 'zod';
2
2
  import { OrderStatusEnum } from '../../enum';
3
3
 
4
4
  export const OrderUpdateActionLogSchema = z.object({
5
- oldStatus: z.nativeEnum(OrderStatusEnum),
6
- newStatus: z.nativeEnum(OrderStatusEnum),
5
+ oldStatus: z.enum(OrderStatusEnum),
6
+ newStatus: z.enum(OrderStatusEnum),
7
7
  });
@@ -6,6 +6,6 @@ export const TransactionInfoSchema = z.object({
6
6
  createdAt: z.coerce.date(),
7
7
  amount: z.coerce.number(),
8
8
  moneyAccountName: z.string(),
9
- type: z.nativeEnum(TransactionTypeEnum),
9
+ type: z.enum(TransactionTypeEnum),
10
10
  clientName: z.string().nullable(),
11
11
  });
@@ -3,22 +3,22 @@ import { BankProviderEnum } from '../../enum/bank-provider.enum';
3
3
  import { BankPaymentEventStatusEnum } from '../../enum/bank-payment-event-status.enum';
4
4
 
5
5
  export const BankPaymentSchema = z.object({
6
- uuid: z.string().uuid(),
7
- provider: z.nativeEnum(BankProviderEnum),
6
+ uuid: z.uuid(),
7
+ provider: z.enum(BankProviderEnum),
8
8
  externalEventId: z.string(),
9
9
  accountNumber: z.string(),
10
10
  amount: z.coerce.number(),
11
11
  currency: z.string(),
12
12
  purpose: z.string(),
13
- status: z.nativeEnum(BankPaymentEventStatusEnum),
13
+ status: z.enum(BankPaymentEventStatusEnum),
14
14
  docNumber: z.string().nullable(),
15
15
  clientName: z.string().nullable(),
16
16
  clientInn: z.string().nullable(),
17
17
  valueDate: z.coerce.date(),
18
- clientUUID: z.string().uuid().nullable(),
19
- moneyAccountUUID: z.string().uuid().nullable(),
18
+ clientUUID: z.uuid().nullable(),
19
+ moneyAccountUUID: z.uuid().nullable(),
20
20
  moneyAccountName: z.string().nullable(),
21
21
  payload: z.unknown(),
22
- appliedTransactionUUID: z.string().uuid().nullable(),
22
+ appliedTransactionUUID: z.uuid().nullable(),
23
23
  receivedAt: z.coerce.date(),
24
24
  });
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  export const BranchSchema = z.object({
4
- uuid: z.string().uuid(),
4
+ uuid: z.uuid(),
5
5
  name: z.string(),
6
6
  contactName: z.string().nullable(),
7
7
  contactPhone: z.string().nullable(),
@@ -9,7 +9,7 @@ export const BranchSchema = z.object({
9
9
  city: z.string().nullable(),
10
10
  region: z.string().nullable(),
11
11
  country: z.string().nullable(),
12
- clientId: z.string().uuid(),
12
+ clientId: z.uuid(),
13
13
  createdAt: z.date(),
14
14
  updatedAt: z.date(),
15
15
  });
@@ -3,12 +3,12 @@ import { CategoryStatusEnum } from '../../enum/category-status.enum';
3
3
  import { TypeSchema } from '../type/type.schema';
4
4
 
5
5
  export const CategorySchema = z.object({
6
- uuid: z.string().uuid(),
6
+ uuid: z.uuid(),
7
7
  name: z.string(),
8
8
  multiplicity: z.number().nullable(),
9
9
  isSizeSeparate: z.boolean(),
10
10
  isSaveCategoryName: z.boolean(),
11
- status: z.nativeEnum(CategoryStatusEnum),
11
+ status: z.enum(CategoryStatusEnum),
12
12
  createdAt: z.date(),
13
13
  updatedAt: z.date(),
14
14
  deletedAt: z.date().nullable(),
@@ -1,16 +1,16 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  export const CategoryAliasSchema = z.object({
4
- uuid: z.string().uuid(),
4
+ uuid: z.uuid(),
5
5
  name: z.string(),
6
- companyUUID: z.string().uuid(),
7
- categoryUUID: z.string().uuid(),
6
+ companyUUID: z.uuid(),
7
+ categoryUUID: z.uuid(),
8
8
  deletedAt: z.date().nullable(),
9
9
  createdAt: z.date(),
10
10
  updatedAt: z.date(),
11
11
  });
12
12
 
13
13
  export const AliasInListSchema = z.object({
14
- uuid: z.string().uuid(),
14
+ uuid: z.uuid(),
15
15
  name: z.string(),
16
16
  });
@@ -7,11 +7,11 @@ export const CategoryTemplateTypeSchema = z.object({
7
7
  });
8
8
 
9
9
  export const CategoryTemplateSchema = z.object({
10
- uuid: z.string().uuid(),
10
+ uuid: z.uuid(),
11
11
  name: z.string(),
12
12
  alias: z.string().array(),
13
13
  type: CategoryTemplateTypeSchema,
14
- language: z.nativeEnum(LanguageEnum),
14
+ language: z.enum(LanguageEnum),
15
15
  deletedAt: z.date().nullable(),
16
16
  createdAt: z.date(),
17
17
  updatedAt: z.date(),
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  export const ClientDebtItemSchema = z.object({
4
- clientUUID: z.string().uuid(),
4
+ clientUUID: z.uuid(),
5
5
  name: z.string(),
6
6
  code: z.string().nullable(),
7
7
  group: z.string().nullable(),
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  export const ClientIndividualProfileSchema = z.object({
4
- uuid: z.string().uuid(),
4
+ uuid: z.uuid(),
5
5
  firstName: z.string().nullable(),
6
6
  lastName: z.string().nullable(),
7
7
  middleName: z.string().nullable(),
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import { ClientLegalTypeEnum } from '../../enum';
3
3
 
4
4
  export const ClientLegalProfileSchema = z.object({
5
- uuid: z.string().uuid(),
5
+ uuid: z.uuid(),
6
6
  fullCompanyName: z.string().nullable(),
7
7
  taxId: z.string().nullable(),
8
8
  ogrn: z.string().nullable(),
@@ -17,7 +17,7 @@ export const ClientLegalProfileSchema = z.object({
17
17
  edoUsage: z.boolean(),
18
18
  edoId: z.string().nullable(),
19
19
  address: z.string().nullable(),
20
- legalType: z.nativeEnum(ClientLegalTypeEnum),
20
+ legalType: z.enum(ClientLegalTypeEnum),
21
21
  createdAt: z.date(),
22
22
  updatedAt: z.date(),
23
23
  });
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  export const ClientMarkingSchema = z.object({
4
- uuid: z.string().uuid(),
4
+ uuid: z.uuid(),
5
5
  name: z.string(),
6
6
  });
@@ -8,12 +8,12 @@ import { DiscountRulesSchema } from '../discount-rules/discount-rules.schema';
8
8
  import { ClientMarkingSchema } from './client-marking.schema';
9
9
 
10
10
  export const ClientSchema = z.object({
11
- uuid: z.string().uuid(),
11
+ uuid: z.uuid(),
12
12
  name: z.string(),
13
13
  contactName: z.string().nullable(),
14
14
  phone: z.string().nullable(),
15
15
  email: z.string().nullable(),
16
- status: z.nativeEnum(ClientStatusEnum),
16
+ status: z.enum(ClientStatusEnum),
17
17
  isCommon: z.boolean(),
18
18
  contractNumber: z.string().nullable(),
19
19
  contractDate: z.date().nullable(),
@@ -31,10 +31,10 @@ export const ClientSchema = z.object({
31
31
  deletedAt: z.date().nullable(),
32
32
  createdAt: z.date(),
33
33
  updatedAt: z.date(),
34
- companyUUID: z.string().uuid(),
34
+ companyUUID: z.uuid(),
35
35
 
36
- clientType: z.nativeEnum(ClientTypeEnum),
37
- responsibleUserUUID: z.string().uuid().nullable(),
36
+ clientType: z.enum(ClientTypeEnum),
37
+ responsibleUserUUID: z.uuid().nullable(),
38
38
  responsibleSince: z.date().nullable(),
39
39
  });
40
40
 
@@ -2,10 +2,10 @@ import { z } from 'zod';
2
2
  import { CompanyStatusEnum } from '../../enum/companyStatus.enum';
3
3
 
4
4
  export const CompanySchema = z.object({
5
- uuid: z.string().uuid(),
5
+ uuid: z.uuid(),
6
6
  name: z.string(),
7
7
  alias: z.string(),
8
- status: z.nativeEnum(CompanyStatusEnum),
8
+ status: z.enum(CompanyStatusEnum),
9
9
  deletedAt: z.date().nullable(),
10
10
  createdAt: z.date(),
11
11
  updatedAt: z.date(),
@@ -6,14 +6,14 @@ import { OrderProductExtendedSchema } from '../order-product/order-product.schem
6
6
  export const ValidationProductSchema = z.object({
7
7
  type: z.literal(ConsignmentDistributionValidationTypeEnum.PACKAGE),
8
8
  product: ProductSchema,
9
- status: z.nativeEnum(ConsignmentDistributionValidationStatusEnum),
9
+ status: z.enum(ConsignmentDistributionValidationStatusEnum),
10
10
  quantity: z.number(),
11
11
  });
12
12
 
13
13
  export const ValidationDistributionSchema = z.object({
14
14
  type: z.literal(ConsignmentDistributionValidationTypeEnum.DISTRIBUTION),
15
15
  orderProduct: OrderProductExtendedSchema,
16
- status: z.nativeEnum(ConsignmentDistributionValidationStatusEnum),
16
+ status: z.enum(ConsignmentDistributionValidationStatusEnum),
17
17
  quantity: z.number(),
18
18
  });
19
19
 
@@ -3,7 +3,7 @@ import { ConsignmentImportSchemaRelationEntityPropertyEnum, ConsignmentStatusEnu
3
3
  import { ClientSchema } from '../client';
4
4
 
5
5
  export const ConsignmentSchema = z.object({
6
- uuid: z.string().uuid(),
6
+ uuid: z.uuid(),
7
7
  deliveryDate: z.date(),
8
8
  id: z.number(),
9
9
  deliveryTime: z.string().nullable(),
@@ -11,7 +11,7 @@ export const ConsignmentSchema = z.object({
11
11
  description: z.string().nullable(),
12
12
  label: z.string().nullable(),
13
13
  isInStock: z.boolean(),
14
- status: z.nativeEnum(ConsignmentStatusEnum),
14
+ status: z.enum(ConsignmentStatusEnum),
15
15
  url: z.string().nullable(),
16
16
  isWithSync: z.boolean(),
17
17
  createdAt: z.date(),
@@ -44,7 +44,7 @@ export const ConsignmentWithStatisticSchema = ConsignmentSchema.extend({
44
44
 
45
45
  export const ProductErrorTypeSchema = z.object({
46
46
  row: z.number().optional(),
47
- path: z.nativeEnum(ConsignmentImportSchemaRelationEntityPropertyEnum).optional(),
47
+ path: z.enum(ConsignmentImportSchemaRelationEntityPropertyEnum).optional(),
48
48
  type: z.union([z.literal(ConsingmentImportErrorsEnum.REQUIRED), z.literal(ConsingmentImportErrorsEnum.INVALID_VALUE)]),
49
49
  });
50
50
 
@@ -2,10 +2,10 @@ import { z } from 'zod';
2
2
  import { ConsignmentImportSchemaRelationSchema } from '../consignment-import-schema-relation/consignment-import-schema-relation.schema';
3
3
 
4
4
  export const ConsignmentImportSchema = z.object({
5
- uuid: z.string().uuid(),
5
+ uuid: z.uuid(),
6
6
  name: z.string(),
7
7
  isDefault: z.boolean(),
8
- companyUUID: z.string().uuid(),
8
+ companyUUID: z.uuid(),
9
9
  });
10
10
 
11
11
  export const ConsignmentImportSchemaExtendedSchema = ConsignmentImportSchema.merge(
@@ -2,9 +2,9 @@ import { z } from 'zod';
2
2
  import { ConsignmentImportSchemaRelationEntityPropertyEnum } from '../../enum';
3
3
 
4
4
  export const ConsignmentImportSchemaRelationSchema = z.object({
5
- uuid: z.string().uuid(),
6
- entityProperty: z.nativeEnum(ConsignmentImportSchemaRelationEntityPropertyEnum),
5
+ uuid: z.uuid(),
6
+ entityProperty: z.enum(ConsignmentImportSchemaRelationEntityPropertyEnum),
7
7
  externalName: z.string(),
8
8
  isRequire: z.boolean(),
9
- consignmentImportSchemaUUID: z.string().uuid(),
9
+ consignmentImportSchemaUUID: z.uuid(),
10
10
  });
@@ -2,12 +2,12 @@ import { z } from 'zod';
2
2
  import { DeliveryRouteStatusEnum, OrderDeliveryStatusEnum, OrderStatusEnum } from '../../enum';
3
3
 
4
4
  export const DeliveryRouteSchema = z.object({
5
- uuid: z.string().uuid(),
5
+ uuid: z.uuid(),
6
6
  routeName: z.string().nullable(),
7
7
  driverName: z.string().nullable(),
8
8
  driverPhone: z.string().nullable(),
9
9
  comment: z.string().nullable(),
10
- status: z.nativeEnum(DeliveryRouteStatusEnum),
10
+ status: z.enum(DeliveryRouteStatusEnum),
11
11
  date: z.coerce.date(),
12
12
  createdAt: z.coerce.date(),
13
13
  updatedAt: z.coerce.date(),
@@ -30,9 +30,9 @@ export const UpdateDeliveryRouteSchema = DeliveryRouteSchema.omit({
30
30
  export const DeliveryRouteWithOrdersSchema = DeliveryRouteSchema.extend({
31
31
  orders: z.array(
32
32
  z.object({
33
- uuid: z.string().uuid(),
33
+ uuid: z.uuid(),
34
34
  orderNumber: z.number(),
35
- orderStatus: z.nativeEnum(OrderStatusEnum),
35
+ orderStatus: z.enum(OrderStatusEnum),
36
36
  orderCreatedAt: z.coerce.date(),
37
37
  totalCost: z.number(),
38
38
  clientName: z.string(),
@@ -41,8 +41,8 @@ export const DeliveryRouteWithOrdersSchema = DeliveryRouteSchema.extend({
41
41
  clientPhone: z.string().nullable(),
42
42
  clientCode: z.string().nullable(),
43
43
  clientGroup: z.string().nullable(),
44
- orderDeliveryUUID: z.string().uuid().nullable(),
45
- orderDeliveryStatus: z.nativeEnum(OrderDeliveryStatusEnum).nullable(),
44
+ orderDeliveryUUID: z.uuid().nullable(),
45
+ orderDeliveryStatus: z.enum(OrderDeliveryStatusEnum).nullable(),
46
46
  deliveryAddress: z.string().nullable(),
47
47
  deliveryComment: z.string().nullable(),
48
48
  consignmentDates: z.array(z.coerce.date()),
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  export const DomainSchema = z.object({
4
- uuid: z.string().uuid(),
4
+ uuid: z.uuid(),
5
5
  name: z.string(),
6
6
  companyId: z.string(),
7
7
  createdAt: z.date(),
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  export const ClientInboxItemSchema = z.object({
4
- clientUUID: z.string().uuid(),
4
+ clientUUID: z.uuid(),
5
5
  clientName: z.string(),
6
6
  clientCode: z.string().nullable(),
7
7
  clientGroup: z.string().nullable(),
@@ -2,16 +2,16 @@ import { z } from 'zod';
2
2
  import { ContextMessageContextTypeEnum } from '../../enum/context-message-context-type.enum';
3
3
 
4
4
  export const ContextInboxItemSchema = z.object({
5
- contextType: z.nativeEnum(ContextMessageContextTypeEnum),
6
- contextUUID: z.string().uuid(),
7
- subjectUUID: z.string().uuid().nullable().optional(),
5
+ contextType: z.enum(ContextMessageContextTypeEnum),
6
+ contextUUID: z.uuid(),
7
+ subjectUUID: z.uuid().nullable().optional(),
8
8
  lastMessageAt: z.date(),
9
9
  lastMessagePreview: z.string().nullable(),
10
10
  lastMessageIsFromClient: z.boolean(),
11
11
  unreadCount: z.number(),
12
12
 
13
13
  orderId: z.number().nullable().optional(),
14
- orderUUID: z.string().uuid().nullable().optional(),
14
+ orderUUID: z.uuid().nullable().optional(),
15
15
  clientName: z.string().nullable().optional(),
16
16
  productName: z.string().nullable().optional(),
17
17
  });
@@ -2,14 +2,14 @@ import { z } from 'zod';
2
2
  import { ContextMessageContextTypeEnum } from '../../enum/context-message-context-type.enum';
3
3
 
4
4
  export const ContextMessageSchema = z.object({
5
- uuid: z.string().uuid(),
6
- contextType: z.nativeEnum(ContextMessageContextTypeEnum),
7
- contextUUID: z.string().uuid(),
8
- subjectUUID: z.string().uuid().nullable().optional(),
5
+ uuid: z.uuid(),
6
+ contextType: z.enum(ContextMessageContextTypeEnum),
7
+ contextUUID: z.uuid(),
8
+ subjectUUID: z.uuid().nullable().optional(),
9
9
 
10
10
  isFromClient: z.boolean(),
11
- authorUserUUID: z.string().uuid().nullable(),
12
- authorClientUUID: z.string().uuid().nullable(),
11
+ authorUserUUID: z.uuid().nullable(),
12
+ authorClientUUID: z.uuid().nullable(),
13
13
 
14
14
  text: z.string(),
15
15
  payload: z.any().nullable().optional(),
@@ -3,11 +3,11 @@ import { MoneyAccountStatusEnum } from '../../enum/money-account-status.enum';
3
3
  import { UserRoleEnum } from '../../enum';
4
4
 
5
5
  export const MoneyAccountSchema = z.object({
6
- uuid: z.string().uuid(),
6
+ uuid: z.uuid(),
7
7
  name: z.string(),
8
8
  companyUUID: z.string(),
9
- roles: z.nativeEnum(UserRoleEnum).array(),
10
- status: z.nativeEnum(MoneyAccountStatusEnum),
9
+ roles: z.enum(UserRoleEnum).array(),
10
+ status: z.enum(MoneyAccountStatusEnum),
11
11
  createdAt: z.date(),
12
12
  updatedAt: z.date(),
13
13
  deletedAt: z.date().nullable(),
@@ -6,11 +6,11 @@ import { OrderDeliverySchema } from '../order-delivery/order-delivery.schema';
6
6
  import { DeliveryRouteSchema } from '../delivery-route/delivery-route.schema';
7
7
 
8
8
  export const OrderSchema = z.object({
9
- uuid: z.string().uuid(),
9
+ uuid: z.uuid(),
10
10
  orderNumber: z.number(),
11
- clientUUID: z.string().uuid(),
12
- branchUUID: z.string().uuid().nullable(),
13
- creatorUserUUID: z.string().uuid(),
11
+ clientUUID: z.uuid(),
12
+ branchUUID: z.uuid().nullable(),
13
+ creatorUserUUID: z.uuid(),
14
14
 
15
15
  isSync: z.boolean(),
16
16
  totalCost: z.number(),
@@ -23,8 +23,8 @@ export const OrderSchema = z.object({
23
23
  discountAmount: z.number(),
24
24
  discount: z.number().nullable(),
25
25
 
26
- status: z.nativeEnum(OrderStatusEnum),
27
- type: z.nativeEnum(OrderTypeEnum),
26
+ status: z.enum(OrderStatusEnum),
27
+ type: z.enum(OrderTypeEnum),
28
28
  isPaid: z.boolean(),
29
29
 
30
30
  comment: z.string().nullable(),
@@ -34,7 +34,7 @@ export const OrderSchema = z.object({
34
34
  totalQuantity: z.number(),
35
35
  totalProductNumber: z.number(),
36
36
  invoiceSendAt: z.date().nullable(),
37
- deliveryRouteUUID: z.string().uuid().nullable(),
37
+ deliveryRouteUUID: z.uuid().nullable(),
38
38
 
39
39
  completedAt: z.date().nullable(),
40
40
  paymentDueAt: z.date().nullable(),
@@ -2,11 +2,11 @@ import { z } from 'zod';
2
2
  import { OrderDeliveryStatusEnum } from '../../enum';
3
3
 
4
4
  export const OrderDeliverySchema = z.object({
5
- uuid: z.string().uuid(),
5
+ uuid: z.uuid(),
6
6
  city: z.string().nullable(),
7
7
  deliveryDate: z.coerce.date().nullable(),
8
8
  address: z.string().nullable(),
9
9
  time: z.string().nullable(),
10
10
  comment: z.string().nullable(),
11
- orderDeliveryStatus: z.nativeEnum(OrderDeliveryStatusEnum),
11
+ orderDeliveryStatus: z.enum(OrderDeliveryStatusEnum),
12
12
  });
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  export const OrderProductMultiplicityOptionSchema = z.object({
4
- uuid: z.string().uuid(),
4
+ uuid: z.uuid(),
5
5
  title: z.string().nullable(),
6
6
  optionMultiplicity: z.coerce.number(),
7
7
  optionPrice: z.coerce.number().nullable(),
@@ -7,10 +7,10 @@ import { DistributionSchema } from '../distribution/distribution.schema';
7
7
  import { OrderProductMultiplicityOptionSchema } from './order-product-multiplicity-optiom.schema';
8
8
 
9
9
  export const OrderProductSchema = z.object({
10
- uuid: z.string().uuid(),
11
- productUUID: z.string().uuid(),
12
- orderUUID: z.string().uuid(),
13
- multiplicityOptionUUID: z.string().uuid().nullable().optional(),
10
+ uuid: z.uuid(),
11
+ productUUID: z.uuid(),
12
+ orderUUID: z.uuid(),
13
+ multiplicityOptionUUID: z.uuid().nullable().optional(),
14
14
 
15
15
  quantity: z.number(),
16
16
  price: z.number(),
@@ -47,7 +47,7 @@ export const OrderProductExtendedSchema = OrderProductSchema.extend({
47
47
 
48
48
  export const OrderProductForClientExtendedSchema = OrderProductForClientSchema.extend({
49
49
  product: ProductExtendedForClientSchema,
50
- multiplicityOptionUUID: z.string().uuid().nullable().optional(),
50
+ multiplicityOptionUUID: z.uuid().nullable().optional(),
51
51
  });
52
52
 
53
53
  export const OrderProductForDistributeSchema = OrderProductSchema.extend({
@@ -5,8 +5,8 @@ export const PackageSchema = z.object({
5
5
  uuid: z.string(),
6
6
  displayId: z.string(),
7
7
  marking: z.string(),
8
- type: z.nativeEnum(PackageTypeEnum),
9
- status: z.nativeEnum(PackageStatusEnum),
8
+ type: z.enum(PackageTypeEnum),
9
+ status: z.enum(PackageStatusEnum),
10
10
  rank: z.number().nullable(),
11
11
  companyUUID: z.string(),
12
12
  consignmentUUID: z.string(),
@@ -24,7 +24,7 @@ export const PackageExtendedSchema = PackageSchema.merge(
24
24
  quantity: z.number(),
25
25
  quantityOfUnits: z.number(),
26
26
  perUnits: z.number(),
27
- status: z.nativeEnum(ProductInPackageStatusEnum),
27
+ status: z.enum(ProductInPackageStatusEnum),
28
28
  }),
29
29
  uuid: z.string(),
30
30
  category: z
@@ -8,7 +8,7 @@ export const PreOrderSchema = z.object({
8
8
  uuid: z.string(),
9
9
  clientUUID: z.string(),
10
10
  branchUUID: z.string().nullable(),
11
- status: z.nativeEnum(PreOrderStatusEnum),
11
+ status: z.enum(PreOrderStatusEnum),
12
12
  preOrderNum: z.number(),
13
13
  comment: z.string().nullable(),
14
14
  tag: z.string().nullable(),
@@ -40,7 +40,7 @@ export const CreatePreOrderSchema = z.object({
40
40
  branchUUID: z.string().nullable().optional(),
41
41
  comment: z.string().nullable(),
42
42
  tag: z.string().nullable(),
43
- status: z.nativeEnum(PreOrderStatusEnum),
43
+ status: z.enum(PreOrderStatusEnum),
44
44
  });
45
45
 
46
46
  export const UpdatePreOrderSchema = PreOrderSchema.omit({ uuid: true, preOrderNum: true, createdAt: true }).partial();