@floristcloud/api-lib 1.2.22 → 1.2.24

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.
@@ -21,6 +21,7 @@ const ExecutableItemSchema = zod_1.z.object({
21
21
  status: zod_1.z.enum(['new', 'known']),
22
22
  internalUUID: zod_1.z.string().nullable(),
23
23
  resolvedCategoryUUID: zod_1.z.string().nullable(),
24
+ resolvedImageUUID: zod_1.z.string().nullable(),
24
25
  });
25
26
  const ExecuteMoyskladImportRequestSchema = zod_1.z.object({
26
27
  items: zod_1.z.array(ExecutableItemSchema),
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetMoyskladStatusContractQuery = void 0;
4
4
  const zod_1 = require("zod");
5
+ const consignment_import_name_convention_enum_1 = require("../../../enum/consignment-import-name-convention.enum");
5
6
  const GetMoyskladStatusResponseSchema = zod_1.z.object({
6
7
  message: zod_1.z.string().optional(),
7
8
  data: zod_1.z.object({
@@ -12,6 +13,9 @@ const GetMoyskladStatusResponseSchema = zod_1.z.object({
12
13
  defaultOrgId: zod_1.z.string().nullable(),
13
14
  defaultStoreId: zod_1.z.string().nullable(),
14
15
  lastSyncAt: zod_1.z.string().datetime().nullable(),
16
+ nameProcessingConvention: zod_1.z.nativeEnum(consignment_import_name_convention_enum_1.ConsignmentImportNameConventionEnum).nullable(),
17
+ isRemoveSizeFromName: zod_1.z.boolean(),
18
+ isCutCategoryFromName: zod_1.z.boolean(),
15
19
  }),
16
20
  });
17
21
  var GetMoyskladStatusContractQuery;
@@ -6,6 +6,8 @@ const enum_1 = require("../../../enum");
6
6
  const ScannedItemSchema = zod_1.z.object({
7
7
  externalSourceId: zod_1.z.string(),
8
8
  externalHref: zod_1.z.string(),
9
+ originalName: zod_1.z.string(),
10
+ normalizedName: zod_1.z.string(),
9
11
  name: zod_1.z.string(),
10
12
  article: zod_1.z.string().nullable(),
11
13
  barcode: zod_1.z.string().nullable(),
@@ -23,6 +25,7 @@ const ScannedItemSchema = zod_1.z.object({
23
25
  internalUUID: zod_1.z.string().nullable(),
24
26
  resolvedCategoryUUID: zod_1.z.string().nullable(),
25
27
  resolvedCategoryName: zod_1.z.string().nullable(),
28
+ resolvedImageUUID: zod_1.z.string().nullable(),
26
29
  });
27
30
  const CategoryMatchSchema = zod_1.z.object({
28
31
  fcCategoryUUID: zod_1.z.string(),
@@ -50,6 +53,7 @@ const ScanMoyskladImportResponseSchema = zod_1.z.object({
50
53
  withCountry: zod_1.z.number(),
51
54
  withGrower: zod_1.z.number(),
52
55
  withSize: zod_1.z.number(),
56
+ withImage: zod_1.z.number(),
53
57
  }),
54
58
  items: zod_1.z.array(ScannedItemSchema),
55
59
  }),
@@ -994,4 +994,9 @@ exports.ERRORS = {
994
994
  message: 'MoySklad clients import is already in progress for this company',
995
995
  httpCode: 409,
996
996
  },
997
+ MOYSKLAD_CATALOG_TOO_LARGE: {
998
+ code: 'MS010',
999
+ message: 'MoySklad catalog exceeds the import size limit; archive unused items in MoySklad first',
1000
+ httpCode: 413,
1001
+ },
997
1002
  };
@@ -19,6 +19,7 @@ const ExecutableItemSchema = z.object({
19
19
  status: z.enum(['new', 'known']),
20
20
  internalUUID: z.string().nullable(),
21
21
  resolvedCategoryUUID: z.string().nullable(),
22
+ resolvedImageUUID: z.string().nullable(),
22
23
  });
23
24
 
24
25
  const ExecuteMoyskladImportRequestSchema = z.object({
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { ConsignmentImportNameConventionEnum } from '../../../enum/consignment-import-name-convention.enum';
2
3
 
3
4
  const GetMoyskladStatusResponseSchema = z.object({
4
5
  message: z.string().optional(),
@@ -10,6 +11,9 @@ const GetMoyskladStatusResponseSchema = z.object({
10
11
  defaultOrgId: z.string().nullable(),
11
12
  defaultStoreId: z.string().nullable(),
12
13
  lastSyncAt: z.string().datetime().nullable(),
14
+ nameProcessingConvention: z.nativeEnum(ConsignmentImportNameConventionEnum).nullable(),
15
+ isRemoveSizeFromName: z.boolean(),
16
+ isCutCategoryFromName: z.boolean(),
13
17
  }),
14
18
  });
15
19
 
@@ -4,6 +4,8 @@ import { SalesUnitEnum } from '../../../enum';
4
4
  const ScannedItemSchema = z.object({
5
5
  externalSourceId: z.string(),
6
6
  externalHref: z.string(),
7
+ originalName: z.string(),
8
+ normalizedName: z.string(),
7
9
  name: z.string(),
8
10
  article: z.string().nullable(),
9
11
  barcode: z.string().nullable(),
@@ -21,6 +23,7 @@ const ScannedItemSchema = z.object({
21
23
  internalUUID: z.string().nullable(),
22
24
  resolvedCategoryUUID: z.string().nullable(),
23
25
  resolvedCategoryName: z.string().nullable(),
26
+ resolvedImageUUID: z.string().nullable(),
24
27
  });
25
28
 
26
29
  const CategoryMatchSchema = z.object({
@@ -50,6 +53,7 @@ const ScanMoyskladImportResponseSchema = z.object({
50
53
  withCountry: z.number(),
51
54
  withGrower: z.number(),
52
55
  withSize: z.number(),
56
+ withImage: z.number(),
53
57
  }),
54
58
  items: z.array(ScannedItemSchema),
55
59
  }),
package/constant/error.ts CHANGED
@@ -1054,4 +1054,9 @@ export const ERRORS = {
1054
1054
  message: 'MoySklad clients import is already in progress for this company',
1055
1055
  httpCode: 409,
1056
1056
  },
1057
+ MOYSKLAD_CATALOG_TOO_LARGE: {
1058
+ code: 'MS010',
1059
+ message: 'MoySklad catalog exceeds the import size limit; archive unused items in MoySklad first',
1060
+ httpCode: 413,
1061
+ },
1057
1062
  } as const;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floristcloud/api-lib",
3
- "version": "1.2.22",
3
+ "version": "1.2.24",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {