@floristcloud/api-lib 1.2.6 → 1.2.8

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 (25) hide show
  1. package/build/commands/auth/index.js +1 -1
  2. package/build/commands/auth/list-mobile-buyer-tenants.command.js +25 -0
  3. package/build/commands/order-product/group/price-correction-analyze.command.js +25 -0
  4. package/build/commands/order-product/group/price-correction-execute.command.js +24 -0
  5. package/build/commands/order-product/index.js +2 -0
  6. package/build/constant/error.js +17 -0
  7. package/build/enum/index.js +1 -0
  8. package/build/enum/order-price-correction-skipped-status-list.js +10 -0
  9. package/build/schemas/index.js +2 -0
  10. package/build/schemas/order-product/price-correction-analyze-item.schema.js +34 -0
  11. package/build/schemas/order-product/price-correction-execute-result-item.schema.js +13 -0
  12. package/commands/auth/index.ts +1 -1
  13. package/commands/auth/list-mobile-buyer-tenants.command.ts +28 -0
  14. package/commands/order-product/group/price-correction-analyze.command.ts +29 -0
  15. package/commands/order-product/group/price-correction-execute.command.ts +28 -0
  16. package/commands/order-product/index.ts +2 -0
  17. package/constant/error.ts +17 -0
  18. package/enum/index.ts +1 -0
  19. package/enum/order-price-correction-skipped-status-list.ts +8 -0
  20. package/package.json +1 -1
  21. package/schemas/index.ts +2 -0
  22. package/schemas/order-product/price-correction-analyze-item.schema.ts +37 -0
  23. package/schemas/order-product/price-correction-execute-result-item.schema.ts +11 -0
  24. package/build/commands/auth/list-mobile-buyer-tenants-by-phone.command.js +0 -20
  25. package/commands/auth/list-mobile-buyer-tenants-by-phone.command.ts +0 -23
@@ -18,7 +18,7 @@ __exportStar(require("./register-user.command"), exports);
18
18
  __exportStar(require("./reset-password-by-user.command"), exports);
19
19
  __exportStar(require("./reset-password-by-admin.command"), exports);
20
20
  __exportStar(require("./login-user.command"), exports);
21
- __exportStar(require("./list-mobile-buyer-tenants-by-phone.command"), exports);
21
+ __exportStar(require("./list-mobile-buyer-tenants.command"), exports);
22
22
  __exportStar(require("./reset-password-by-token.command"), exports);
23
23
  __exportStar(require("./restore-password-by-security-code.command"), exports);
24
24
  __exportStar(require("./reset-password-by-security-code.command"), exports);
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListMobileBuyerTenantsContractCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const ListMobileBuyerTenantsRequestSchema = zod_1.z
6
+ .object({
7
+ phone: zod_1.z.string().min(1).optional(),
8
+ email: zod_1.z.email().optional(),
9
+ })
10
+ .refine((data) => data.phone || data.email, {
11
+ message: 'Either phone or email must be provided',
12
+ });
13
+ const MobileBuyerTenantItemSchema = zod_1.z.object({
14
+ companyUUID: zod_1.z.uuid(),
15
+ displayName: zod_1.z.string(),
16
+ domain: zod_1.z.string().nullable(),
17
+ });
18
+ const ListMobileBuyerTenantsResponseSchema = zod_1.z.object({
19
+ items: zod_1.z.array(MobileBuyerTenantItemSchema),
20
+ });
21
+ var ListMobileBuyerTenantsContractCommand;
22
+ (function (ListMobileBuyerTenantsContractCommand) {
23
+ ListMobileBuyerTenantsContractCommand.RequestSchema = ListMobileBuyerTenantsRequestSchema;
24
+ ListMobileBuyerTenantsContractCommand.ResponseSchema = ListMobileBuyerTenantsResponseSchema;
25
+ })(ListMobileBuyerTenantsContractCommand || (exports.ListMobileBuyerTenantsContractCommand = ListMobileBuyerTenantsContractCommand = {}));
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PriceCorrectionAnalyzeContractCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const schemas_1 = require("../../../schemas");
6
+ const PriceCorrectionAnalyzeRequestSchema = zod_1.z
7
+ .object({
8
+ productUUIDList: zod_1.z.array(zod_1.z.string().uuid()).optional(),
9
+ consignmentUUID: zod_1.z.string().uuid().optional(),
10
+ })
11
+ .refine(data => { var _a; return ((_a = data.productUUIDList) === null || _a === void 0 ? void 0 : _a.length) || data.consignmentUUID; }, {
12
+ message: 'Either productUUIDList or consignmentUUID must be provided',
13
+ });
14
+ const PriceCorrectionAnalyzeResponseSchema = zod_1.z.object({
15
+ message: zod_1.z.string().optional(),
16
+ data: zod_1.z.object({
17
+ items: zod_1.z.array(schemas_1.PriceCorrectionAnalyzeItemSchema),
18
+ }),
19
+ });
20
+ var PriceCorrectionAnalyzeContractCommand;
21
+ (function (PriceCorrectionAnalyzeContractCommand) {
22
+ PriceCorrectionAnalyzeContractCommand.RequestSchema = PriceCorrectionAnalyzeRequestSchema;
23
+ PriceCorrectionAnalyzeContractCommand.ItemSchema = schemas_1.PriceCorrectionAnalyzeItemSchema;
24
+ PriceCorrectionAnalyzeContractCommand.ResponseSchema = PriceCorrectionAnalyzeResponseSchema;
25
+ })(PriceCorrectionAnalyzeContractCommand || (exports.PriceCorrectionAnalyzeContractCommand = PriceCorrectionAnalyzeContractCommand = {}));
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PriceCorrectionExecuteContractCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const schemas_1 = require("../../../schemas");
6
+ const PRICE_CORRECTION_BATCH_LIMIT = 50;
7
+ const PriceCorrectionExecuteRequestSchema = zod_1.z.object({
8
+ orderProductUUIDList: zod_1.z.array(zod_1.z.string().uuid()).min(1).max(PRICE_CORRECTION_BATCH_LIMIT),
9
+ withDiscount: zod_1.z.boolean(),
10
+ });
11
+ const PriceCorrectionExecuteResponseSchema = zod_1.z.object({
12
+ message: zod_1.z.string().optional(),
13
+ data: zod_1.z.object({
14
+ results: zod_1.z.array(schemas_1.PriceCorrectionExecuteResultItemSchema),
15
+ successCount: zod_1.z.number(),
16
+ skippedCount: zod_1.z.number(),
17
+ }),
18
+ });
19
+ var PriceCorrectionExecuteContractCommand;
20
+ (function (PriceCorrectionExecuteContractCommand) {
21
+ PriceCorrectionExecuteContractCommand.RequestSchema = PriceCorrectionExecuteRequestSchema;
22
+ PriceCorrectionExecuteContractCommand.BATCH_LIMIT = PRICE_CORRECTION_BATCH_LIMIT;
23
+ PriceCorrectionExecuteContractCommand.ResponseSchema = PriceCorrectionExecuteResponseSchema;
24
+ })(PriceCorrectionExecuteContractCommand || (exports.PriceCorrectionExecuteContractCommand = PriceCorrectionExecuteContractCommand = {}));
@@ -27,6 +27,8 @@ __exportStar(require("./group/update-group-order-product-tag.command"), exports)
27
27
  __exportStar(require("./group/delete-group-order-product.command"), exports);
28
28
  __exportStar(require("./group/update-group-order-product-order.command"), exports);
29
29
  __exportStar(require("./group/zeroing-receipt-order-product.command"), exports);
30
+ __exportStar(require("./group/price-correction-analyze.command"), exports);
31
+ __exportStar(require("./group/price-correction-execute.command"), exports);
30
32
  //webshop
31
33
  __exportStar(require("./webshop/update-order-product-for-client.command"), exports);
32
34
  __exportStar(require("./webshop/create-order-product-for-client.command"), exports);
@@ -400,6 +400,21 @@ exports.ERRORS = {
400
400
  message: 'The product is not deleted, because it has write-off',
401
401
  httpCode: 500,
402
402
  },
403
+ ORDER_PRODUCT_PRICE_CORRECTION_BATCH_LIMIT_EXCEEDED: {
404
+ code: 'OP015',
405
+ message: 'Price correction batch limit exceeded',
406
+ httpCode: 400,
407
+ },
408
+ ORDER_PRODUCT_PRICE_CORRECTION_FAILED: {
409
+ code: 'OP016',
410
+ message: 'Failed to correct price for order product',
411
+ httpCode: 500,
412
+ },
413
+ ORDER_PRODUCT_PRICE_CORRECTION_ORDER_STATUS_NOT_ALLOWED: {
414
+ code: 'OP017',
415
+ message: 'Order status does not allow price correction',
416
+ httpCode: 400,
417
+ },
403
418
  //TRANSACTION
404
419
  TRANSACTION_NOT_CREATED: { code: 'TR001', message: 'Failed to transaction product', httpCode: 500 },
405
420
  TRANSACTION_FETCH_FAILED: { code: 'TR002', message: 'Error when retrieving a transaction', httpCode: 500 },
@@ -473,6 +488,8 @@ exports.ERRORS = {
473
488
  CATEGORY_NOT_UPDATED: { code: 'CA014', message: 'Failed to update category', httpCode: 500 },
474
489
  CATEGORY_CREATE_MANY_FAILED: { code: 'CA015', message: 'Failed to create many categories', httpCode: 500 },
475
490
  CATEGORY_USE_IN_PRODUCT: { code: 'CA016', message: 'Category use in product', httpCode: 500 },
491
+ CATEGORY_USE_IN_PRE_ORDER_COLLECTION_ITEM: { code: 'CA017', message: 'Category use in pre order collection item', httpCode: 500 },
492
+ CATEGORY_USE_IN_PRODUCT_IMAGE: { code: 'CA018', message: 'Category use in product image', httpCode: 500 },
476
493
  // CATEGORY ALIAS
477
494
  ALIAS_NOT_CREATED: { code: 'AL009', message: 'Failed to create category-category-category-alias', httpCode: 500 },
478
495
  ALIAS_NOT_FOUND: { code: 'AL010', message: 'Alias with this relation not found', httpCode: 404 },
@@ -43,6 +43,7 @@ __exportStar(require("./discount-rules-type.enum"), exports);
43
43
  __exportStar(require("./discount-rules-mode-type.enum"), exports);
44
44
  __exportStar(require("./order-distribute-status-list"), exports);
45
45
  __exportStar(require("./order-active-status-list"), exports);
46
+ __exportStar(require("./order-price-correction-skipped-status-list"), exports);
46
47
  __exportStar(require("./client-status.enum"), exports);
47
48
  __exportStar(require("./client-type.enum"), exports);
48
49
  __exportStar(require("./consignment-distribution-validation-status.enum"), exports);
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrderPriceCorrectionSkippedStatusList = void 0;
4
+ const order_status_enum_1 = require("./order-status.enum");
5
+ exports.OrderPriceCorrectionSkippedStatusList = [
6
+ order_status_enum_1.OrderStatusEnum.ASSEMBLED,
7
+ order_status_enum_1.OrderStatusEnum.VERIFIED,
8
+ order_status_enum_1.OrderStatusEnum.SHIPPED,
9
+ order_status_enum_1.OrderStatusEnum.COMPLETED,
10
+ ];
@@ -26,6 +26,8 @@ __exportStar(require("./order-delivery/order-delivery.schema"), exports);
26
26
  __exportStar(require("./order-product/order-product.schema"), exports);
27
27
  __exportStar(require("./order-product/order-product-list.schema"), exports);
28
28
  __exportStar(require("./order-product/order-product-multiplicity-optiom.schema"), exports);
29
+ __exportStar(require("./order-product/price-correction-analyze-item.schema"), exports);
30
+ __exportStar(require("./order-product/price-correction-execute-result-item.schema"), exports);
29
31
  __exportStar(require("./transaction/transaction.schema"), exports);
30
32
  __exportStar(require("./transaction/transaction-list.schema"), exports);
31
33
  __exportStar(require("./file"), exports);
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PriceCorrectionAnalyzeItemSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const enum_1 = require("../../enum");
6
+ const error_message_schema_1 = require("../error-message.schema");
7
+ exports.PriceCorrectionAnalyzeItemSchema = zod_1.z.object({
8
+ orderProductUUID: zod_1.z.string(),
9
+ orderUUID: zod_1.z.string(),
10
+ orderNumber: zod_1.z.number(),
11
+ orderStatus: zod_1.z.nativeEnum(enum_1.OrderStatusEnum),
12
+ clientName: zod_1.z.string(),
13
+ clientUUID: zod_1.z.string(),
14
+ productUUID: zod_1.z.string(),
15
+ productName: zod_1.z.string(),
16
+ categoryName: zod_1.z.string().nullable(),
17
+ grower: zod_1.z.string().nullable(),
18
+ size: zod_1.z.string().nullable(),
19
+ size2: zod_1.z.string().nullable(),
20
+ size3: zod_1.z.string().nullable(),
21
+ article: zod_1.z.string().nullable(),
22
+ color: zod_1.z.string().nullable(),
23
+ currentPrice: zod_1.z.number(),
24
+ currentAmount: zod_1.z.number(),
25
+ quantity: zod_1.z.number(),
26
+ newPriceWithoutDiscount: zod_1.z.number(),
27
+ newPriceWithDiscount: zod_1.z.number(),
28
+ newAmountWithoutDiscount: zod_1.z.number(),
29
+ newAmountWithDiscount: zod_1.z.number(),
30
+ priceDifferenceWithoutDiscount: zod_1.z.number(),
31
+ priceDifferenceWithDiscount: zod_1.z.number(),
32
+ isSkipped: zod_1.z.boolean(),
33
+ skipReason: error_message_schema_1.ErrorMessageSchema.optional(),
34
+ });
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PriceCorrectionExecuteResultItemSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const error_message_schema_1 = require("../error-message.schema");
6
+ exports.PriceCorrectionExecuteResultItemSchema = zod_1.z.object({
7
+ orderProductUUID: zod_1.z.string(),
8
+ orderUUID: zod_1.z.string(),
9
+ isSuccess: zod_1.z.boolean(),
10
+ error: error_message_schema_1.ErrorMessageSchema.optional(),
11
+ oldPrice: zod_1.z.number().optional(),
12
+ newPrice: zod_1.z.number().optional(),
13
+ });
@@ -2,7 +2,7 @@ export * from './register-user.command';
2
2
  export * from './reset-password-by-user.command';
3
3
  export * from './reset-password-by-admin.command';
4
4
  export * from './login-user.command';
5
- export * from './list-mobile-buyer-tenants-by-phone.command';
5
+ export * from './list-mobile-buyer-tenants.command';
6
6
  export * from './reset-password-by-token.command';
7
7
  export * from './restore-password-by-security-code.command';
8
8
  export * from './reset-password-by-security-code.command';
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+
3
+ const ListMobileBuyerTenantsRequestSchema = z
4
+ .object({
5
+ phone: z.string().min(1).optional(),
6
+ email: z.email().optional(),
7
+ })
8
+ .refine((data) => data.phone || data.email, {
9
+ message: 'Either phone or email must be provided',
10
+ });
11
+
12
+ const MobileBuyerTenantItemSchema = z.object({
13
+ companyUUID: z.uuid(),
14
+ displayName: z.string(),
15
+ domain: z.string().nullable(),
16
+ });
17
+
18
+ const ListMobileBuyerTenantsResponseSchema = z.object({
19
+ items: z.array(MobileBuyerTenantItemSchema),
20
+ });
21
+
22
+ export namespace ListMobileBuyerTenantsContractCommand {
23
+ export const RequestSchema = ListMobileBuyerTenantsRequestSchema;
24
+ export type Request = z.infer<typeof RequestSchema>;
25
+
26
+ export const ResponseSchema = ListMobileBuyerTenantsResponseSchema;
27
+ export type Response = z.infer<typeof ResponseSchema>;
28
+ }
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ import { PriceCorrectionAnalyzeItemSchema } from '../../../schemas';
3
+
4
+ const PriceCorrectionAnalyzeRequestSchema = z
5
+ .object({
6
+ productUUIDList: z.array(z.string().uuid()).optional(),
7
+ consignmentUUID: z.string().uuid().optional(),
8
+ })
9
+ .refine(data => data.productUUIDList?.length || data.consignmentUUID, {
10
+ message: 'Either productUUIDList or consignmentUUID must be provided',
11
+ });
12
+
13
+ const PriceCorrectionAnalyzeResponseSchema = z.object({
14
+ message: z.string().optional(),
15
+ data: z.object({
16
+ items: z.array(PriceCorrectionAnalyzeItemSchema),
17
+ }),
18
+ });
19
+
20
+ export namespace PriceCorrectionAnalyzeContractCommand {
21
+ export const RequestSchema = PriceCorrectionAnalyzeRequestSchema;
22
+ export type Request = z.infer<typeof RequestSchema>;
23
+
24
+ export const ItemSchema = PriceCorrectionAnalyzeItemSchema;
25
+ export type Item = z.infer<typeof ItemSchema>;
26
+
27
+ export const ResponseSchema = PriceCorrectionAnalyzeResponseSchema;
28
+ export type Response = z.infer<typeof ResponseSchema>;
29
+ }
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+ import { PriceCorrectionExecuteResultItemSchema } from '../../../schemas';
3
+
4
+ const PRICE_CORRECTION_BATCH_LIMIT = 50;
5
+
6
+ const PriceCorrectionExecuteRequestSchema = z.object({
7
+ orderProductUUIDList: z.array(z.string().uuid()).min(1).max(PRICE_CORRECTION_BATCH_LIMIT),
8
+ withDiscount: z.boolean(),
9
+ });
10
+
11
+ const PriceCorrectionExecuteResponseSchema = z.object({
12
+ message: z.string().optional(),
13
+ data: z.object({
14
+ results: z.array(PriceCorrectionExecuteResultItemSchema),
15
+ successCount: z.number(),
16
+ skippedCount: z.number(),
17
+ }),
18
+ });
19
+
20
+ export namespace PriceCorrectionExecuteContractCommand {
21
+ export const RequestSchema = PriceCorrectionExecuteRequestSchema;
22
+ export type Request = z.infer<typeof RequestSchema>;
23
+
24
+ export const BATCH_LIMIT = PRICE_CORRECTION_BATCH_LIMIT;
25
+
26
+ export const ResponseSchema = PriceCorrectionExecuteResponseSchema;
27
+ export type Response = z.infer<typeof ResponseSchema>;
28
+ }
@@ -11,6 +11,8 @@ export * from './group/update-group-order-product-tag.command';
11
11
  export * from './group/delete-group-order-product.command';
12
12
  export * from './group/update-group-order-product-order.command';
13
13
  export * from './group/zeroing-receipt-order-product.command';
14
+ export * from './group/price-correction-analyze.command';
15
+ export * from './group/price-correction-execute.command';
14
16
  //webshop
15
17
  export * from './webshop/update-order-product-for-client.command';
16
18
  export * from './webshop/create-order-product-for-client.command';
package/constant/error.ts CHANGED
@@ -416,6 +416,21 @@ export const ERRORS = {
416
416
  message: 'The product is not deleted, because it has write-off',
417
417
  httpCode: 500,
418
418
  },
419
+ ORDER_PRODUCT_PRICE_CORRECTION_BATCH_LIMIT_EXCEEDED: {
420
+ code: 'OP015',
421
+ message: 'Price correction batch limit exceeded',
422
+ httpCode: 400,
423
+ },
424
+ ORDER_PRODUCT_PRICE_CORRECTION_FAILED: {
425
+ code: 'OP016',
426
+ message: 'Failed to correct price for order product',
427
+ httpCode: 500,
428
+ },
429
+ ORDER_PRODUCT_PRICE_CORRECTION_ORDER_STATUS_NOT_ALLOWED: {
430
+ code: 'OP017',
431
+ message: 'Order status does not allow price correction',
432
+ httpCode: 400,
433
+ },
419
434
 
420
435
  //TRANSACTION
421
436
  TRANSACTION_NOT_CREATED: { code: 'TR001', message: 'Failed to transaction product', httpCode: 500 },
@@ -495,6 +510,8 @@ export const ERRORS = {
495
510
  CATEGORY_NOT_UPDATED: { code: 'CA014', message: 'Failed to update category', httpCode: 500 },
496
511
  CATEGORY_CREATE_MANY_FAILED: { code: 'CA015', message: 'Failed to create many categories', httpCode: 500 },
497
512
  CATEGORY_USE_IN_PRODUCT: { code: 'CA016', message: 'Category use in product', httpCode: 500 },
513
+ CATEGORY_USE_IN_PRE_ORDER_COLLECTION_ITEM: { code: 'CA017', message: 'Category use in pre order collection item', httpCode: 500 },
514
+ CATEGORY_USE_IN_PRODUCT_IMAGE: { code: 'CA018', message: 'Category use in product image', httpCode: 500 },
498
515
 
499
516
  // CATEGORY ALIAS
500
517
  ALIAS_NOT_CREATED: { code: 'AL009', message: 'Failed to create category-category-category-alias', httpCode: 500 },
package/enum/index.ts CHANGED
@@ -27,6 +27,7 @@ export * from './discount-rules-type.enum';
27
27
  export * from './discount-rules-mode-type.enum';
28
28
  export * from './order-distribute-status-list';
29
29
  export * from './order-active-status-list';
30
+ export * from './order-price-correction-skipped-status-list';
30
31
  export * from './client-status.enum';
31
32
  export * from './client-type.enum';
32
33
  export * from './consignment-distribution-validation-status.enum';
@@ -0,0 +1,8 @@
1
+ import { OrderStatusEnum } from './order-status.enum';
2
+
3
+ export const OrderPriceCorrectionSkippedStatusList: OrderStatusEnum[] = [
4
+ OrderStatusEnum.ASSEMBLED,
5
+ OrderStatusEnum.VERIFIED,
6
+ OrderStatusEnum.SHIPPED,
7
+ OrderStatusEnum.COMPLETED,
8
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floristcloud/api-lib",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {
package/schemas/index.ts CHANGED
@@ -10,6 +10,8 @@ export * from './order-delivery/order-delivery.schema';
10
10
  export * from './order-product/order-product.schema';
11
11
  export * from './order-product/order-product-list.schema';
12
12
  export * from './order-product/order-product-multiplicity-optiom.schema';
13
+ export * from './order-product/price-correction-analyze-item.schema';
14
+ export * from './order-product/price-correction-execute-result-item.schema';
13
15
  export * from './transaction/transaction.schema';
14
16
  export * from './transaction/transaction-list.schema';
15
17
  export * from './file';
@@ -0,0 +1,37 @@
1
+ import { z } from 'zod';
2
+ import { OrderStatusEnum } from '../../enum';
3
+ import { ErrorMessageSchema } from '../error-message.schema';
4
+
5
+ export const PriceCorrectionAnalyzeItemSchema = z.object({
6
+ orderProductUUID: z.string(),
7
+ orderUUID: z.string(),
8
+ orderNumber: z.number(),
9
+ orderStatus: z.nativeEnum(OrderStatusEnum),
10
+ clientName: z.string(),
11
+ clientUUID: z.string(),
12
+
13
+ productUUID: z.string(),
14
+ productName: z.string(),
15
+ categoryName: z.string().nullable(),
16
+ grower: z.string().nullable(),
17
+ size: z.string().nullable(),
18
+ size2: z.string().nullable(),
19
+ size3: z.string().nullable(),
20
+ article: z.string().nullable(),
21
+ color: z.string().nullable(),
22
+
23
+ currentPrice: z.number(),
24
+ currentAmount: z.number(),
25
+ quantity: z.number(),
26
+
27
+ newPriceWithoutDiscount: z.number(),
28
+ newPriceWithDiscount: z.number(),
29
+ newAmountWithoutDiscount: z.number(),
30
+ newAmountWithDiscount: z.number(),
31
+
32
+ priceDifferenceWithoutDiscount: z.number(),
33
+ priceDifferenceWithDiscount: z.number(),
34
+
35
+ isSkipped: z.boolean(),
36
+ skipReason: ErrorMessageSchema.optional(),
37
+ });
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { ErrorMessageSchema } from '../error-message.schema';
3
+
4
+ export const PriceCorrectionExecuteResultItemSchema = z.object({
5
+ orderProductUUID: z.string(),
6
+ orderUUID: z.string(),
7
+ isSuccess: z.boolean(),
8
+ error: ErrorMessageSchema.optional(),
9
+ oldPrice: z.number().optional(),
10
+ newPrice: z.number().optional(),
11
+ });
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ListMobileBuyerTenantsByPhoneContractCommand = void 0;
4
- const zod_1 = require("zod");
5
- const ListMobileBuyerTenantsByPhoneRequestSchema = zod_1.z.object({
6
- phone: zod_1.z.string().min(1),
7
- });
8
- const MobileBuyerTenantItemSchema = zod_1.z.object({
9
- companyUUID: zod_1.z.uuid(),
10
- displayName: zod_1.z.string(),
11
- domain: zod_1.z.string().nullable(),
12
- });
13
- const ListMobileBuyerTenantsByPhoneResponseSchema = zod_1.z.object({
14
- items: zod_1.z.array(MobileBuyerTenantItemSchema),
15
- });
16
- var ListMobileBuyerTenantsByPhoneContractCommand;
17
- (function (ListMobileBuyerTenantsByPhoneContractCommand) {
18
- ListMobileBuyerTenantsByPhoneContractCommand.RequestSchema = ListMobileBuyerTenantsByPhoneRequestSchema;
19
- ListMobileBuyerTenantsByPhoneContractCommand.ResponseSchema = ListMobileBuyerTenantsByPhoneResponseSchema;
20
- })(ListMobileBuyerTenantsByPhoneContractCommand || (exports.ListMobileBuyerTenantsByPhoneContractCommand = ListMobileBuyerTenantsByPhoneContractCommand = {}));
@@ -1,23 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- const ListMobileBuyerTenantsByPhoneRequestSchema = z.object({
4
- phone: z.string().min(1),
5
- });
6
-
7
- const MobileBuyerTenantItemSchema = z.object({
8
- companyUUID: z.uuid(),
9
- displayName: z.string(),
10
- domain: z.string().nullable(),
11
- });
12
-
13
- const ListMobileBuyerTenantsByPhoneResponseSchema = z.object({
14
- items: z.array(MobileBuyerTenantItemSchema),
15
- });
16
-
17
- export namespace ListMobileBuyerTenantsByPhoneContractCommand {
18
- export const RequestSchema = ListMobileBuyerTenantsByPhoneRequestSchema;
19
- export type Request = z.infer<typeof RequestSchema>;
20
-
21
- export const ResponseSchema = ListMobileBuyerTenantsByPhoneResponseSchema;
22
- export type Response = z.infer<typeof ResponseSchema>;
23
- }