@floristcloud/api-lib 1.2.183 → 1.2.185

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 (123) hide show
  1. package/build/commands/company/createCompany.command.js +4 -14
  2. package/build/commands/company-legal-profile/create.command.js +10 -0
  3. package/build/commands/company-legal-profile/delete.command.js +8 -0
  4. package/build/commands/company-legal-profile/get-list.query.js +8 -0
  5. package/build/commands/company-legal-profile/index.js +21 -0
  6. package/build/commands/company-legal-profile/save-integration-link.command.js +10 -0
  7. package/build/commands/company-legal-profile/update.command.js +10 -0
  8. package/build/commands/index.js +1 -0
  9. package/build/commands/integration/moysklad/get-seller-sync-status.query.js +10 -0
  10. package/build/commands/integration/moysklad/index.js +2 -0
  11. package/build/commands/integration/moysklad/retry-seller-sync.command.js +10 -0
  12. package/build/commands/order/create-order.command.js +4 -25
  13. package/build/commands/order/update-order.command.js +4 -29
  14. package/build/constant/error.js +22 -0
  15. package/build/enum/action-log-type.enum.js +1 -0
  16. package/build/enum/index.js +3 -0
  17. package/build/enum/order-seller-sync-status-list.js +14 -0
  18. package/build/enum/order-updated-field.enum.js +1 -0
  19. package/build/enum/seller-sync-item-status.enum.js +10 -0
  20. package/build/enum/seller-sync-status.enum.js +11 -0
  21. package/build/schemas/action-log/action-log-company-legal-profile.schema.js +10 -0
  22. package/build/schemas/action-log/action-log-payload.schema.js +2 -0
  23. package/build/schemas/action-log/action-log.schema.js +2 -0
  24. package/build/schemas/action-log/company-legal-profile-action-log.schema.js +9 -0
  25. package/build/schemas/action-log/index.js +2 -0
  26. package/build/schemas/company/create-company-request.schema.js +13 -0
  27. package/build/schemas/company/create-company-response.schema.js +6 -0
  28. package/build/schemas/company-legal-profile/company-legal-profile-integration-link.schema.js +5 -0
  29. package/build/schemas/company-legal-profile/company-legal-profile-integration-links-response.schema.js +6 -0
  30. package/build/schemas/company-legal-profile/company-legal-profile-list-response.schema.js +6 -0
  31. package/build/schemas/company-legal-profile/company-legal-profile-requisites.schema.js +28 -0
  32. package/build/schemas/company-legal-profile/company-legal-profile-response.schema.js +6 -0
  33. package/build/schemas/company-legal-profile/company-legal-profile.schema.js +14 -0
  34. package/build/schemas/company-legal-profile/create-company-legal-profile-request.schema.js +9 -0
  35. package/build/schemas/company-legal-profile/delete-company-legal-profile-response.schema.js +5 -0
  36. package/build/schemas/company-legal-profile/index.js +26 -0
  37. package/build/schemas/company-legal-profile/save-company-legal-profile-integration-link-request.schema.js +5 -0
  38. package/build/schemas/company-legal-profile/update-company-legal-profile-request.schema.js +8 -0
  39. package/build/schemas/index.js +7 -0
  40. package/build/schemas/integration/moysklad/index.js +4 -0
  41. package/build/schemas/integration/moysklad/seller-sync-failure.schema.js +5 -0
  42. package/build/schemas/integration/moysklad/seller-sync-request.schema.js +5 -0
  43. package/build/schemas/integration/moysklad/seller-sync-status-response.schema.js +6 -0
  44. package/build/schemas/integration/moysklad/seller-sync-status.schema.js +23 -0
  45. package/build/schemas/order/create-order-request.schema.js +25 -0
  46. package/build/schemas/order/create-order-response.schema.js +9 -0
  47. package/build/schemas/order/delivery-pricing-split-group.schema.js +12 -0
  48. package/build/schemas/order/delivery-pricing.schema.js +7 -2
  49. package/build/schemas/order/index.js +2 -0
  50. package/build/schemas/order/order-base.schema.js +1 -0
  51. package/build/schemas/order/order-vat-source-confirmation.schema.js +10 -0
  52. package/build/schemas/order/update-order-request.schema.js +30 -0
  53. package/build/schemas/order/update-order-response.schema.js +9 -0
  54. package/build/schemas/order-product/order-product-base.schema.js +1 -0
  55. package/build/schemas/order-service-line/order-service-line.schema.js +1 -0
  56. package/build/schemas/payment-invoice/create-payment-invoice-request.schema.js +1 -0
  57. package/build/schemas/payment-invoice/payment-invoice.schema.js +1 -0
  58. package/build/schemas/settings/settings.schema.js +14 -186
  59. package/build/schemas/transfer-document/transfer-document.schema.js +1 -0
  60. package/build/types/index.js +1 -0
  61. package/build/types/order-vat-source-confirmation.type.js +2 -0
  62. package/commands/company/createCompany.command.ts +3 -15
  63. package/commands/company-legal-profile/create.command.ts +9 -0
  64. package/commands/company-legal-profile/delete.command.ts +6 -0
  65. package/commands/company-legal-profile/get-list.query.ts +6 -0
  66. package/commands/company-legal-profile/index.ts +5 -0
  67. package/commands/company-legal-profile/save-integration-link.command.ts +9 -0
  68. package/commands/company-legal-profile/update.command.ts +9 -0
  69. package/commands/index.ts +2 -0
  70. package/commands/integration/moysklad/get-seller-sync-status.query.ts +10 -0
  71. package/commands/integration/moysklad/index.ts +4 -0
  72. package/commands/integration/moysklad/retry-seller-sync.command.ts +10 -0
  73. package/commands/order/create-order.command.ts +3 -26
  74. package/commands/order/update-order.command.ts +3 -30
  75. package/constant/error.ts +23 -0
  76. package/enum/action-log-type.enum.ts +1 -0
  77. package/enum/index.ts +6 -0
  78. package/enum/order-seller-sync-status-list.ts +12 -0
  79. package/enum/order-updated-field.enum.ts +1 -0
  80. package/enum/seller-sync-item-status.enum.ts +6 -0
  81. package/enum/seller-sync-status.enum.ts +7 -0
  82. package/package.json +1 -1
  83. package/schemas/action-log/action-log-company-legal-profile.schema.ts +7 -0
  84. package/schemas/action-log/action-log-payload.schema.ts +2 -0
  85. package/schemas/action-log/action-log.schema.ts +2 -0
  86. package/schemas/action-log/company-legal-profile-action-log.schema.ts +6 -0
  87. package/schemas/action-log/index.ts +3 -0
  88. package/schemas/company/create-company-request.schema.ts +10 -0
  89. package/schemas/company/create-company-response.schema.ts +3 -0
  90. package/schemas/company-legal-profile/company-legal-profile-integration-link.schema.ts +2 -0
  91. package/schemas/company-legal-profile/company-legal-profile-integration-links-response.schema.ts +3 -0
  92. package/schemas/company-legal-profile/company-legal-profile-list-response.schema.ts +3 -0
  93. package/schemas/company-legal-profile/company-legal-profile-requisites.schema.ts +25 -0
  94. package/schemas/company-legal-profile/company-legal-profile-response.schema.ts +3 -0
  95. package/schemas/company-legal-profile/company-legal-profile.schema.ts +11 -0
  96. package/schemas/company-legal-profile/create-company-legal-profile-request.schema.ts +6 -0
  97. package/schemas/company-legal-profile/delete-company-legal-profile-response.schema.ts +2 -0
  98. package/schemas/company-legal-profile/index.ts +10 -0
  99. package/schemas/company-legal-profile/save-company-legal-profile-integration-link-request.schema.ts +2 -0
  100. package/schemas/company-legal-profile/update-company-legal-profile-request.schema.ts +5 -0
  101. package/schemas/index.ts +9 -0
  102. package/schemas/integration/moysklad/index.ts +8 -0
  103. package/schemas/integration/moysklad/seller-sync-failure.schema.ts +3 -0
  104. package/schemas/integration/moysklad/seller-sync-request.schema.ts +3 -0
  105. package/schemas/integration/moysklad/seller-sync-status-response.schema.ts +4 -0
  106. package/schemas/integration/moysklad/seller-sync-status.schema.ts +21 -0
  107. package/schemas/order/create-order-request.schema.ts +24 -0
  108. package/schemas/order/create-order-response.schema.ts +8 -0
  109. package/schemas/order/delivery-pricing-split-group.schema.ts +10 -0
  110. package/schemas/order/delivery-pricing.schema.ts +9 -2
  111. package/schemas/order/index.ts +3 -0
  112. package/schemas/order/order-base.schema.ts +1 -0
  113. package/schemas/order/order-vat-source-confirmation.schema.ts +8 -0
  114. package/schemas/order/update-order-request.schema.ts +29 -0
  115. package/schemas/order/update-order-response.schema.ts +8 -0
  116. package/schemas/order-product/order-product-base.schema.ts +1 -0
  117. package/schemas/order-service-line/order-service-line.schema.ts +1 -0
  118. package/schemas/payment-invoice/create-payment-invoice-request.schema.ts +1 -0
  119. package/schemas/payment-invoice/payment-invoice.schema.ts +1 -0
  120. package/schemas/settings/settings.schema.ts +12 -61
  121. package/schemas/transfer-document/transfer-document.schema.ts +1 -0
  122. package/types/index.ts +2 -0
  123. package/types/order-vat-source-confirmation.type.ts +4 -0
@@ -1,20 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateCompanyContractCommand = void 0;
4
- const zod_1 = require("zod");
5
- const schemas_1 = require("../../schemas");
6
- const CreateCompanyRequestSchema = zod_1.z.object({
7
- name: zod_1.z.string(),
8
- alias: zod_1.z.string().optional(),
9
- settings: schemas_1.CreateSettingsSchema,
10
- domain: zod_1.z.string(),
11
- });
12
- const CreateCompanyResponseSchema = zod_1.z.object({
13
- message: zod_1.z.string().optional(),
14
- data: schemas_1.CompanySchema.nullable(),
15
- });
4
+ const create_company_request_schema_1 = require("../../schemas/company/create-company-request.schema");
5
+ const create_company_response_schema_1 = require("../../schemas/company/create-company-response.schema");
16
6
  var CreateCompanyContractCommand;
17
7
  (function (CreateCompanyContractCommand) {
18
- CreateCompanyContractCommand.RequestSchema = CreateCompanyRequestSchema;
19
- CreateCompanyContractCommand.ResponseSchema = CreateCompanyResponseSchema;
8
+ CreateCompanyContractCommand.RequestSchema = create_company_request_schema_1.CreateCompanyRequestSchema;
9
+ CreateCompanyContractCommand.ResponseSchema = create_company_response_schema_1.CreateCompanyResponseSchema;
20
10
  })(CreateCompanyContractCommand || (exports.CreateCompanyContractCommand = CreateCompanyContractCommand = {}));
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateCompanyLegalProfileContractCommand = void 0;
4
+ const create_company_legal_profile_request_schema_1 = require("../../schemas/company-legal-profile/create-company-legal-profile-request.schema");
5
+ const company_legal_profile_response_schema_1 = require("../../schemas/company-legal-profile/company-legal-profile-response.schema");
6
+ var CreateCompanyLegalProfileContractCommand;
7
+ (function (CreateCompanyLegalProfileContractCommand) {
8
+ CreateCompanyLegalProfileContractCommand.RequestSchema = create_company_legal_profile_request_schema_1.CreateCompanyLegalProfileRequestSchema;
9
+ CreateCompanyLegalProfileContractCommand.ResponseSchema = company_legal_profile_response_schema_1.CompanyLegalProfileResponseSchema;
10
+ })(CreateCompanyLegalProfileContractCommand || (exports.CreateCompanyLegalProfileContractCommand = CreateCompanyLegalProfileContractCommand = {}));
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteCompanyLegalProfileContractCommand = void 0;
4
+ const delete_company_legal_profile_response_schema_1 = require("../../schemas/company-legal-profile/delete-company-legal-profile-response.schema");
5
+ var DeleteCompanyLegalProfileContractCommand;
6
+ (function (DeleteCompanyLegalProfileContractCommand) {
7
+ DeleteCompanyLegalProfileContractCommand.ResponseSchema = delete_company_legal_profile_response_schema_1.DeleteCompanyLegalProfileResponseSchema;
8
+ })(DeleteCompanyLegalProfileContractCommand || (exports.DeleteCompanyLegalProfileContractCommand = DeleteCompanyLegalProfileContractCommand = {}));
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetListCompanyLegalProfileContractQuery = void 0;
4
+ const company_legal_profile_list_response_schema_1 = require("../../schemas/company-legal-profile/company-legal-profile-list-response.schema");
5
+ var GetListCompanyLegalProfileContractQuery;
6
+ (function (GetListCompanyLegalProfileContractQuery) {
7
+ GetListCompanyLegalProfileContractQuery.ResponseSchema = company_legal_profile_list_response_schema_1.CompanyLegalProfileListResponseSchema;
8
+ })(GetListCompanyLegalProfileContractQuery || (exports.GetListCompanyLegalProfileContractQuery = GetListCompanyLegalProfileContractQuery = {}));
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./create.command"), exports);
18
+ __exportStar(require("./update.command"), exports);
19
+ __exportStar(require("./delete.command"), exports);
20
+ __exportStar(require("./get-list.query"), exports);
21
+ __exportStar(require("./save-integration-link.command"), exports);
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SaveCompanyLegalProfileIntegrationLinkContractCommand = void 0;
4
+ const save_company_legal_profile_integration_link_request_schema_1 = require("../../schemas/company-legal-profile/save-company-legal-profile-integration-link-request.schema");
5
+ const company_legal_profile_integration_links_response_schema_1 = require("../../schemas/company-legal-profile/company-legal-profile-integration-links-response.schema");
6
+ var SaveCompanyLegalProfileIntegrationLinkContractCommand;
7
+ (function (SaveCompanyLegalProfileIntegrationLinkContractCommand) {
8
+ SaveCompanyLegalProfileIntegrationLinkContractCommand.RequestSchema = save_company_legal_profile_integration_link_request_schema_1.SaveCompanyLegalProfileIntegrationLinkRequestSchema;
9
+ SaveCompanyLegalProfileIntegrationLinkContractCommand.ResponseSchema = company_legal_profile_integration_links_response_schema_1.CompanyLegalProfileIntegrationLinksResponseSchema;
10
+ })(SaveCompanyLegalProfileIntegrationLinkContractCommand || (exports.SaveCompanyLegalProfileIntegrationLinkContractCommand = SaveCompanyLegalProfileIntegrationLinkContractCommand = {}));
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateCompanyLegalProfileContractCommand = void 0;
4
+ const update_company_legal_profile_request_schema_1 = require("../../schemas/company-legal-profile/update-company-legal-profile-request.schema");
5
+ const company_legal_profile_response_schema_1 = require("../../schemas/company-legal-profile/company-legal-profile-response.schema");
6
+ var UpdateCompanyLegalProfileContractCommand;
7
+ (function (UpdateCompanyLegalProfileContractCommand) {
8
+ UpdateCompanyLegalProfileContractCommand.RequestSchema = update_company_legal_profile_request_schema_1.UpdateCompanyLegalProfileRequestSchema;
9
+ UpdateCompanyLegalProfileContractCommand.ResponseSchema = company_legal_profile_response_schema_1.CompanyLegalProfileResponseSchema;
10
+ })(UpdateCompanyLegalProfileContractCommand || (exports.UpdateCompanyLegalProfileContractCommand = UpdateCompanyLegalProfileContractCommand = {}));
@@ -88,3 +88,4 @@ var validate_ws_ticket_s2s_query_1 = require("./session/validate-ws-ticket-s2s.q
88
88
  Object.defineProperty(exports, "ValidateWsTicketS2SContractQuery", { enumerable: true, get: function () { return validate_ws_ticket_s2s_query_1.ValidateWsTicketS2SContractQuery; } });
89
89
  __exportStar(require("./transfer-document"), exports);
90
90
  __exportStar(require("./measure-unit"), exports);
91
+ __exportStar(require("./company-legal-profile"), exports);
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetSellerSyncStatusContractQuery = void 0;
4
+ const seller_sync_request_schema_1 = require("../../../schemas/integration/moysklad/seller-sync-request.schema");
5
+ const seller_sync_status_response_schema_1 = require("../../../schemas/integration/moysklad/seller-sync-status-response.schema");
6
+ var GetSellerSyncStatusContractQuery;
7
+ (function (GetSellerSyncStatusContractQuery) {
8
+ GetSellerSyncStatusContractQuery.RequestSchema = seller_sync_request_schema_1.SellerSyncRequestSchema;
9
+ GetSellerSyncStatusContractQuery.ResponseSchema = seller_sync_status_response_schema_1.SellerSyncStatusResponseSchema;
10
+ })(GetSellerSyncStatusContractQuery || (exports.GetSellerSyncStatusContractQuery = GetSellerSyncStatusContractQuery = {}));
@@ -31,3 +31,5 @@ __exportStar(require("./sync-moysklad-supplier-orders.command"), exports);
31
31
  __exportStar(require("./retry-moysklad-order-sync.command"), exports);
32
32
  __exportStar(require("./get-moysklad-order-states.query"), exports);
33
33
  __exportStar(require("./update-moysklad-order-state-mapping.command"), exports);
34
+ __exportStar(require("./get-seller-sync-status.query"), exports);
35
+ __exportStar(require("./retry-seller-sync.command"), exports);
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RetrySellerSyncContractCommand = void 0;
4
+ const seller_sync_request_schema_1 = require("../../../schemas/integration/moysklad/seller-sync-request.schema");
5
+ const seller_sync_status_response_schema_1 = require("../../../schemas/integration/moysklad/seller-sync-status-response.schema");
6
+ var RetrySellerSyncContractCommand;
7
+ (function (RetrySellerSyncContractCommand) {
8
+ RetrySellerSyncContractCommand.RequestSchema = seller_sync_request_schema_1.SellerSyncRequestSchema;
9
+ RetrySellerSyncContractCommand.ResponseSchema = seller_sync_status_response_schema_1.SellerSyncStatusResponseSchema;
10
+ })(RetrySellerSyncContractCommand || (exports.RetrySellerSyncContractCommand = RetrySellerSyncContractCommand = {}));
@@ -1,31 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateOrderContractCommand = void 0;
4
- const zod_1 = require("zod");
5
- const enum_1 = require("../../enum");
6
- const schemas_1 = require("../../schemas");
7
- const money_schema_1 = require("../../schemas/money.schema");
8
- const CreateOrderRequestSchema = zod_1.z.object({
9
- clientUUID: zod_1.z.uuid(),
10
- branchUUID: zod_1.z.uuid().nullable(),
11
- deliveryCost: money_schema_1.MoneySchema,
12
- deliveryVat: zod_1.z.number().nullable(),
13
- type: zod_1.z.nativeEnum(enum_1.OrderTypeEnum),
14
- comment: zod_1.z.string().nullable(),
15
- clientComment: zod_1.z.string().nullable(),
16
- tag: zod_1.z.string().nullable(),
17
- externalNumber: schemas_1.OrderExternalNumberRequestSchema,
18
- // Дата отгрузки/выдачи — одна для самовывоза и доставки. Приоритет над устаревшим
19
- // `delivery.deliveryDate`.
20
- plannedShipmentDate: schemas_1.CalendarDaySchema.nullable().optional(),
21
- delivery: schemas_1.OrderDeliverySchema.omit({ uuid: true }).nullable(),
22
- });
23
- const CreateOrderResponseSchema = zod_1.z.object({
24
- message: zod_1.z.string().optional(),
25
- data: schemas_1.OrderSchema.nullable(),
26
- });
4
+ const create_order_request_schema_1 = require("../../schemas/order/create-order-request.schema");
5
+ const create_order_response_schema_1 = require("../../schemas/order/create-order-response.schema");
27
6
  var CreateOrderContractCommand;
28
7
  (function (CreateOrderContractCommand) {
29
- CreateOrderContractCommand.RequestSchema = CreateOrderRequestSchema;
30
- CreateOrderContractCommand.ResponseSchema = CreateOrderResponseSchema;
8
+ CreateOrderContractCommand.RequestSchema = create_order_request_schema_1.CreateOrderRequestSchema;
9
+ CreateOrderContractCommand.ResponseSchema = create_order_response_schema_1.CreateOrderResponseSchema;
31
10
  })(CreateOrderContractCommand || (exports.CreateOrderContractCommand = CreateOrderContractCommand = {}));
@@ -1,35 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UpdateOrderContractCommand = void 0;
4
- const zod_1 = require("zod");
5
- const enum_1 = require("../../enum");
6
- const schemas_1 = require("../../schemas");
7
- const money_schema_1 = require("../../schemas/money.schema");
8
- const UpdateOrderRequestSchema = zod_1.z.object({
9
- clientUUID: zod_1.z.uuid(),
10
- branchUUID: zod_1.z.uuid().nullable(),
11
- deliveryCost: money_schema_1.MoneySchema,
12
- type: zod_1.z.nativeEnum(enum_1.OrderTypeEnum),
13
- comment: zod_1.z.string().nullable(),
14
- clientComment: zod_1.z.string().nullable(),
15
- tag: zod_1.z.string().nullable(),
16
- externalNumber: schemas_1.OrderExternalNumberRequestSchema,
17
- status: zod_1.z.nativeEnum(enum_1.OrderStatusEnum),
18
- isPaid: zod_1.z.coerce.boolean(),
19
- deliveryVat: zod_1.z.coerce.number().nullable(),
20
- deliveryVatAmount: money_schema_1.MoneySchema,
21
- completedAt: zod_1.z.coerce.date().nullable().optional(),
22
- paymentDueAt: zod_1.z.coerce.date().nullable().optional(),
23
- // Дата отгрузки/выдачи — одна для самовывоза и доставки. Не раньше прихода товара в пути
24
- // (O061, в errorData — самый ранний день). Не передано — не меняется, null — снять.
25
- plannedShipmentDate: schemas_1.CalendarDaySchema.nullable().optional(),
26
- });
27
- const UpdateOrderResponseSchema = zod_1.z.object({
28
- message: zod_1.z.string().optional(),
29
- data: schemas_1.OrderSchema.nullable(),
30
- });
4
+ const update_order_request_schema_1 = require("../../schemas/order/update-order-request.schema");
5
+ const update_order_response_schema_1 = require("../../schemas/order/update-order-response.schema");
31
6
  var UpdateOrderContractCommand;
32
7
  (function (UpdateOrderContractCommand) {
33
- UpdateOrderContractCommand.RequestSchema = UpdateOrderRequestSchema;
34
- UpdateOrderContractCommand.ResponseSchema = UpdateOrderResponseSchema;
8
+ UpdateOrderContractCommand.RequestSchema = update_order_request_schema_1.UpdateOrderRequestSchema;
9
+ UpdateOrderContractCommand.ResponseSchema = update_order_response_schema_1.UpdateOrderResponseSchema;
35
10
  })(UpdateOrderContractCommand || (exports.UpdateOrderContractCommand = UpdateOrderContractCommand = {}));
@@ -2,6 +2,28 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ERRORS = void 0;
4
4
  exports.ERRORS = {
5
+ COMPANY_LEGAL_PROFILE_HAS_ORDERS: {
6
+ code: 'CLP010',
7
+ message: 'Seller cannot be archived or deleted because it has orders, including deleted orders',
8
+ httpCode: 409,
9
+ },
10
+ ORDER_VAT_SOURCE_UNKNOWN: { code: 'CLP008', message: 'Confirm VAT sources of historical lines before changing seller', httpCode: 409 },
11
+ ORDER_VAT_SOURCE_CONFIRMATION_INVALID: {
12
+ code: 'CLP009',
13
+ message: 'VAT source confirmation is stale or invalid; refresh the order and confirm sources before changing seller',
14
+ httpCode: 409,
15
+ },
16
+ COMPANY_LEGAL_PROFILE_NOT_FOUND: { code: 'CLP001', message: 'Card was not found', httpCode: 404 },
17
+ COMPANY_LEGAL_PROFILE_ARCHIVED: { code: 'CLP002', message: 'Card is archived', httpCode: 409 },
18
+ COMPANY_LEGAL_PROFILE_DEFAULT_REQUIRED: { code: 'CLP003', message: 'At least one active seller card is required', httpCode: 409 },
19
+ COMPANY_LEGAL_PROFILE_FAILED: { code: 'CLP004', message: 'Failed to save seller card', httpCode: 500 },
20
+ COMPANY_LEGAL_PROFILE_MIXED: { code: 'CLP005', message: 'Orders must have the same seller', httpCode: 409 },
21
+ COMPANY_LEGAL_PROFILE_ORDER_LOCKED: {
22
+ code: 'CLP006',
23
+ message: 'Seller cannot be changed while the order belongs to a document',
24
+ httpCode: 409,
25
+ },
26
+ COMPANY_LEGAL_PROFILE_CHANGED: { code: 'CLP007', message: 'Seller changed during document creation; retry', httpCode: 409 },
5
27
  // COMPANY
6
28
  COMPANY_NOT_CREATED: { code: 'C001', message: 'Failed to create company', httpCode: 500 },
7
29
  COMPANY_NOT_DELETED: { code: 'C002', message: 'Failed to delete company', httpCode: 500 },
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActionLogTypeEnum = void 0;
4
4
  var ActionLogTypeEnum;
5
5
  (function (ActionLogTypeEnum) {
6
+ ActionLogTypeEnum["UPDATE_COMPANY_LEGAL_PROFILE"] = "UPDATE_COMPANY_LEGAL_PROFILE";
6
7
  ActionLogTypeEnum["CONFIRM_ORDER"] = "CONFIRM_ORDER";
7
8
  ActionLogTypeEnum["UPDATE_ORDER_STATUS"] = "UPDATE_ORDER_STATUS";
8
9
  ActionLogTypeEnum["UPDATE_ORDER"] = "UPDATE_ORDER";
@@ -178,3 +178,6 @@ __exportStar(require("./pre-order-fulfillment-status.enum"), exports);
178
178
  __exportStar(require("./delivery-pricing-rule-scope.enum"), exports);
179
179
  __exportStar(require("./delivery-pricing-in-transit-mode.enum"), exports);
180
180
  __exportStar(require("./measure-unit-match-source.enum"), exports);
181
+ __exportStar(require("./order-seller-sync-status-list"), exports);
182
+ __exportStar(require("./seller-sync-status.enum"), exports);
183
+ __exportStar(require("./seller-sync-item-status.enum"), exports);
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ORDER_SELLER_SYNC_STATUS_LIST = void 0;
4
+ const order_status_enum_1 = require("./order-status.enum");
5
+ // Orders already shipped, completed, imported or used as templates must not be relinked in bulk.
6
+ exports.ORDER_SELLER_SYNC_STATUS_LIST = [
7
+ order_status_enum_1.OrderStatusEnum.NEW,
8
+ order_status_enum_1.OrderStatusEnum.WEBSHOP_NEW,
9
+ order_status_enum_1.OrderStatusEnum.PREPAYMENT,
10
+ order_status_enum_1.OrderStatusEnum.UNDER_REVIEW,
11
+ order_status_enum_1.OrderStatusEnum.ACCEPTED,
12
+ order_status_enum_1.OrderStatusEnum.ASSEMBLED,
13
+ order_status_enum_1.OrderStatusEnum.VERIFIED,
14
+ ];
@@ -10,6 +10,7 @@ exports.OrderUpdatedFieldEnum = void 0;
10
10
  */
11
11
  var OrderUpdatedFieldEnum;
12
12
  (function (OrderUpdatedFieldEnum) {
13
+ OrderUpdatedFieldEnum["SELLER"] = "SELLER";
13
14
  OrderUpdatedFieldEnum["CLIENT"] = "CLIENT";
14
15
  OrderUpdatedFieldEnum["BRANCH"] = "BRANCH";
15
16
  OrderUpdatedFieldEnum["DELIVERY_COST"] = "DELIVERY_COST";
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SellerSyncItemStatusEnum = void 0;
4
+ var SellerSyncItemStatusEnum;
5
+ (function (SellerSyncItemStatusEnum) {
6
+ SellerSyncItemStatusEnum["PENDING"] = "PENDING";
7
+ SellerSyncItemStatusEnum["SUCCEEDED"] = "SUCCEEDED";
8
+ SellerSyncItemStatusEnum["SKIPPED"] = "SKIPPED";
9
+ SellerSyncItemStatusEnum["FAILED"] = "FAILED";
10
+ })(SellerSyncItemStatusEnum || (exports.SellerSyncItemStatusEnum = SellerSyncItemStatusEnum = {}));
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SellerSyncStatusEnum = void 0;
4
+ var SellerSyncStatusEnum;
5
+ (function (SellerSyncStatusEnum) {
6
+ SellerSyncStatusEnum["PREPARING"] = "PREPARING";
7
+ SellerSyncStatusEnum["RUNNING"] = "RUNNING";
8
+ SellerSyncStatusEnum["COMPLETED"] = "COMPLETED";
9
+ SellerSyncStatusEnum["COMPLETED_WITH_ERRORS"] = "COMPLETED_WITH_ERRORS";
10
+ SellerSyncStatusEnum["SUPERSEDED"] = "SUPERSEDED";
11
+ })(SellerSyncStatusEnum || (exports.SellerSyncStatusEnum = SellerSyncStatusEnum = {}));
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActionLogCompanyLegalProfileSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const action_log_type_enum_1 = require("../../enum/action-log-type.enum");
6
+ const base_action_fields_schema_1 = require("./base-action-fields.schema");
7
+ const company_legal_profile_action_log_schema_1 = require("./company-legal-profile-action-log.schema");
8
+ exports.ActionLogCompanyLegalProfileSchema = zod_1.z
9
+ .object({ actionType: zod_1.z.literal(action_log_type_enum_1.ActionLogTypeEnum.UPDATE_COMPANY_LEGAL_PROFILE), payload: company_legal_profile_action_log_schema_1.CompanyLegalProfileActionLogSchema })
10
+ .merge(base_action_fields_schema_1.BaseActionFields);
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActionLogPayloadSchema = void 0;
4
+ const company_legal_profile_action_log_schema_1 = require("./company-legal-profile-action-log.schema");
4
5
  const zod_1 = require("zod");
5
6
  const client_create_action_log_schema_1 = require("./client-create-action-log.schema");
6
7
  const client_delete_action_log_schema_1 = require("./client-delete-action-log.schema");
@@ -83,6 +84,7 @@ const write_off_status_update_action_log_schema_1 = require("./write-off-status-
83
84
  // ActionLogSchema, здесь только формы: вариант, забытый тут, не ломает чтение журнала, но
84
85
  // оставляет потребителя контракта с типом, в котором не хватает полей.
85
86
  exports.ActionLogPayloadSchema = zod_1.z.union([
87
+ company_legal_profile_action_log_schema_1.CompanyLegalProfileActionLogSchema,
86
88
  order_delete_action_log_payload_schema_1.OrderDeleteActionLogPayloadSchema,
87
89
  order_merge_action_log_schema_1.OrderMergeActionLogSchema,
88
90
  order_product_create_action_log_schema_1.OrderProductCreateActionLogSchema,
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActionLogSchema = void 0;
4
+ const action_log_company_legal_profile_schema_1 = require("./action-log-company-legal-profile.schema");
4
5
  const zod_1 = require("zod");
5
6
  const action_log_add_payment_schema_1 = require("./action-log-add-payment.schema");
6
7
  const action_log_apply_bank_payment_schema_1 = require("./action-log-apply-bank-payment.schema");
@@ -82,6 +83,7 @@ const action_log_update_write_off_price_schema_1 = require("./action-log-update-
82
83
  const action_log_update_write_off_status_schema_1 = require("./action-log-update-write-off-status.schema");
83
84
  const action_log_verify_order_item_schema_1 = require("./action-log-verify-order-item.schema");
84
85
  exports.ActionLogSchema = zod_1.z.discriminatedUnion('actionType', [
86
+ action_log_company_legal_profile_schema_1.ActionLogCompanyLegalProfileSchema,
85
87
  action_log_delete_order_schema_1.ActionLogDeleteOrderSchema,
86
88
  action_log_delete_order_item_schema_1.ActionLogDeleteOrderItemSchema,
87
89
  action_log_create_order_item_schema_1.ActionLogCreateOrderItemSchema,
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompanyLegalProfileActionLogSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.CompanyLegalProfileActionLogSchema = zod_1.z.object({
6
+ profileUUID: zod_1.z.uuid(),
7
+ label: zod_1.z.string(),
8
+ operation: zod_1.z.enum(['CREATE', 'UPDATE', 'DELETE', 'ARCHIVE']),
9
+ });
@@ -195,3 +195,5 @@ __exportStar(require("./write-off-delete-action-log.schema"), exports);
195
195
  __exportStar(require("./write-off-info.schema"), exports);
196
196
  __exportStar(require("./write-off-price-update-action-log.schema"), exports);
197
197
  __exportStar(require("./write-off-status-update-action-log.schema"), exports);
198
+ __exportStar(require("./company-legal-profile-action-log.schema"), exports);
199
+ __exportStar(require("./action-log-company-legal-profile.schema"), exports);
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateCompanyRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const settings_schema_1 = require("../settings/settings.schema");
6
+ const create_company_legal_profile_request_schema_1 = require("../company-legal-profile/create-company-legal-profile-request.schema");
7
+ exports.CreateCompanyRequestSchema = zod_1.z.object({
8
+ name: zod_1.z.string(),
9
+ alias: zod_1.z.string().optional(),
10
+ settings: settings_schema_1.CreateSettingsSchema,
11
+ legalProfile: create_company_legal_profile_request_schema_1.CreateCompanyLegalProfileRequestSchema.optional(),
12
+ domain: zod_1.z.string(),
13
+ });
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateCompanyResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const company_schema_1 = require("./company.schema");
6
+ exports.CreateCompanyResponseSchema = zod_1.z.object({ message: zod_1.z.string().optional(), data: company_schema_1.CompanySchema.nullable() });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompanyLegalProfileIntegrationLinkSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.CompanyLegalProfileIntegrationLinkSchema = zod_1.z.object({ profileUUID: zod_1.z.uuid(), externalId: zod_1.z.uuid() });
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompanyLegalProfileIntegrationLinksResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const company_legal_profile_integration_link_schema_1 = require("./company-legal-profile-integration-link.schema");
6
+ exports.CompanyLegalProfileIntegrationLinksResponseSchema = zod_1.z.object({ data: zod_1.z.array(company_legal_profile_integration_link_schema_1.CompanyLegalProfileIntegrationLinkSchema) });
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompanyLegalProfileListResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const company_legal_profile_schema_1 = require("./company-legal-profile.schema");
6
+ exports.CompanyLegalProfileListResponseSchema = zod_1.z.object({ data: zod_1.z.array(company_legal_profile_schema_1.CompanyLegalProfileSchema) });
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompanyLegalProfileRequisitesSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.CompanyLegalProfileRequisitesSchema = zod_1.z.object({
6
+ invoiceNumberPrefix: zod_1.z.string().trim().max(100).optional(),
7
+ transferDocumentStatus: zod_1.z
8
+ .union([zod_1.z.literal(1), zod_1.z.literal(2)])
9
+ .nullable()
10
+ .optional(),
11
+ legalName: zod_1.z.string().trim().max(1000).nullable().optional(),
12
+ taxId: zod_1.z.string().trim().max(1000).nullable().optional(),
13
+ kpp: zod_1.z.string().trim().max(1000).nullable().optional(),
14
+ ogrn: zod_1.z.string().trim().max(1000).nullable().optional(),
15
+ legalAddress: zod_1.z.string().trim().max(1000).nullable().optional(),
16
+ bankName: zod_1.z.string().trim().max(1000).nullable().optional(),
17
+ bankAccountNumber: zod_1.z.string().trim().max(1000).nullable().optional(),
18
+ bankBic: zod_1.z.string().trim().max(1000).nullable().optional(),
19
+ correspondentAccount: zod_1.z.string().trim().max(1000).nullable().optional(),
20
+ signatoryName: zod_1.z.string().trim().max(1000).nullable().optional(),
21
+ signatoryPosition: zod_1.z.string().trim().max(1000).nullable().optional(),
22
+ accountantName: zod_1.z.string().trim().max(1000).nullable().optional(),
23
+ responsibleName: zod_1.z.string().trim().max(1000).nullable().optional(),
24
+ responsiblePosition: zod_1.z.string().trim().max(1000).nullable().optional(),
25
+ shipperName: zod_1.z.string().trim().max(1000).nullable().optional(),
26
+ shipperAddress: zod_1.z.string().trim().max(1000).nullable().optional(),
27
+ vat: zod_1.z.number().int().min(0).max(100).nullable().optional(),
28
+ });
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompanyLegalProfileResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const company_legal_profile_schema_1 = require("./company-legal-profile.schema");
6
+ exports.CompanyLegalProfileResponseSchema = zod_1.z.object({ data: company_legal_profile_schema_1.CompanyLegalProfileSchema });
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompanyLegalProfileSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const company_legal_profile_requisites_schema_1 = require("./company-legal-profile-requisites.schema");
6
+ exports.CompanyLegalProfileSchema = company_legal_profile_requisites_schema_1.CompanyLegalProfileRequisitesSchema.required().extend({
7
+ uuid: zod_1.z.uuid(),
8
+ companyUUID: zod_1.z.uuid(),
9
+ label: zod_1.z.string(),
10
+ isDefault: zod_1.z.boolean(),
11
+ isArchived: zod_1.z.boolean(),
12
+ createdAt: zod_1.z.coerce.date(),
13
+ updatedAt: zod_1.z.coerce.date(),
14
+ });
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateCompanyLegalProfileRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const company_legal_profile_requisites_schema_1 = require("./company-legal-profile-requisites.schema");
6
+ exports.CreateCompanyLegalProfileRequestSchema = company_legal_profile_requisites_schema_1.CompanyLegalProfileRequisitesSchema.extend({
7
+ label: zod_1.z.string().trim().min(1).max(255),
8
+ isDefault: zod_1.z.boolean().optional(),
9
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteCompanyLegalProfileResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.DeleteCompanyLegalProfileResponseSchema = zod_1.z.object({ isArchived: zod_1.z.boolean() });
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./company-legal-profile-list-response.schema"), exports);
18
+ __exportStar(require("./company-legal-profile-requisites.schema"), exports);
19
+ __exportStar(require("./company-legal-profile-response.schema"), exports);
20
+ __exportStar(require("./company-legal-profile.schema"), exports);
21
+ __exportStar(require("./create-company-legal-profile-request.schema"), exports);
22
+ __exportStar(require("./delete-company-legal-profile-response.schema"), exports);
23
+ __exportStar(require("./update-company-legal-profile-request.schema"), exports);
24
+ __exportStar(require("./company-legal-profile-integration-link.schema"), exports);
25
+ __exportStar(require("./save-company-legal-profile-integration-link-request.schema"), exports);
26
+ __exportStar(require("./company-legal-profile-integration-links-response.schema"), exports);
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SaveCompanyLegalProfileIntegrationLinkRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.SaveCompanyLegalProfileIntegrationLinkRequestSchema = zod_1.z.object({ profileUUID: zod_1.z.uuid(), externalId: zod_1.z.uuid().nullable() });
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateCompanyLegalProfileRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const create_company_legal_profile_request_schema_1 = require("./create-company-legal-profile-request.schema");
6
+ exports.UpdateCompanyLegalProfileRequestSchema = create_company_legal_profile_request_schema_1.CreateCompanyLegalProfileRequestSchema.partial().extend({
7
+ isArchived: zod_1.z.boolean().optional(),
8
+ });
@@ -153,3 +153,10 @@ __exportStar(require("./consignment"), exports);
153
153
  __exportStar(require("./product/group"), exports);
154
154
  __exportStar(require("./report"), exports);
155
155
  __exportStar(require("./integration/moysklad"), exports);
156
+ __exportStar(require("./company-legal-profile"), exports);
157
+ __exportStar(require("./order/create-order-request.schema"), exports);
158
+ __exportStar(require("./order/create-order-response.schema"), exports);
159
+ __exportStar(require("./order/update-order-request.schema"), exports);
160
+ __exportStar(require("./order/update-order-response.schema"), exports);
161
+ __exportStar(require("./company/create-company-request.schema"), exports);
162
+ __exportStar(require("./company/create-company-response.schema"), exports);
@@ -38,3 +38,7 @@ __exportStar(require("./moysklad-measure-unit-mapping.schema"), exports);
38
38
  __exportStar(require("./moysklad-scanned-measure-unit.schema"), exports);
39
39
  __exportStar(require("./moysklad-measure-unit-alias-added.schema"), exports);
40
40
  __exportStar(require("./moysklad-measure-unit-dictionary-item.schema"), exports);
41
+ __exportStar(require("./seller-sync-failure.schema"), exports);
42
+ __exportStar(require("./seller-sync-status.schema"), exports);
43
+ __exportStar(require("./seller-sync-status-response.schema"), exports);
44
+ __exportStar(require("./seller-sync-request.schema"), exports);
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SellerSyncFailureSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.SellerSyncFailureSchema = zod_1.z.object({ orderUUID: zod_1.z.string().uuid(), error: zod_1.z.string().nullable() });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SellerSyncRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.SellerSyncRequestSchema = zod_1.z.object({ profileUUID: zod_1.z.string().uuid() });
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SellerSyncStatusResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const seller_sync_status_schema_1 = require("./seller-sync-status.schema");
6
+ exports.SellerSyncStatusResponseSchema = zod_1.z.object({ data: seller_sync_status_schema_1.SellerSyncStatusSchema.nullable() });
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SellerSyncStatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const seller_sync_status_enum_1 = require("../../../enum/seller-sync-status.enum");
6
+ const seller_sync_failure_schema_1 = require("./seller-sync-failure.schema");
7
+ exports.SellerSyncStatusSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string().uuid(),
9
+ profileUUID: zod_1.z.string().uuid(),
10
+ status: zod_1.z.nativeEnum(seller_sync_status_enum_1.SellerSyncStatusEnum),
11
+ total: zod_1.z.number().int().nonnegative(),
12
+ processed: zod_1.z.number().int().nonnegative(),
13
+ succeeded: zod_1.z.number().int().nonnegative(),
14
+ skipped: zod_1.z.number().int().nonnegative(),
15
+ failed: zod_1.z.number().int().nonnegative(),
16
+ pending: zod_1.z.number().int().nonnegative(),
17
+ // Null until discovery finishes. Counts are actual HTTP outcomes, not enqueue acknowledgements.
18
+ progressPercent: zod_1.z.number().min(0).max(100).nullable(),
19
+ failures: zod_1.z.array(seller_sync_failure_schema_1.SellerSyncFailureSchema),
20
+ hasMoreFailures: zod_1.z.boolean(),
21
+ createdAt: zod_1.z.string().datetime(),
22
+ updatedAt: zod_1.z.string().datetime(),
23
+ });