@pksep/zod-shared 0.0.562 → 0.0.564

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 (32) hide show
  1. package/dist/ai-mcp/index.d.ts +3 -0
  2. package/dist/ai-mcp/index.js +3 -0
  3. package/dist/ai-mcp/interfaces/ai-mcp.interface.d.ts +149 -1
  4. package/dist/ai-mcp/schemas/ai-mcp-entity-editor.schema.d.ts +32 -38
  5. package/dist/ai-mcp/schemas/ai-mcp-entity-editor.schema.js +26 -21
  6. package/dist/ai-mcp/schemas/ai-mcp-technology.schema.d.ts +225 -0
  7. package/dist/ai-mcp/schemas/ai-mcp-technology.schema.js +156 -0
  8. package/dist/ai-mcp/schemas/ai-mcp.schema.d.ts +4 -1
  9. package/dist/ai-mcp/schemas/ai-mcp.schema.js +6 -1
  10. package/dist/bull-queue/index.d.ts +1 -0
  11. package/dist/bull-queue/index.js +17 -0
  12. package/dist/bull-queue/schemas/queue-ownership.schema.d.ts +74 -0
  13. package/dist/bull-queue/schemas/queue-ownership.schema.js +33 -0
  14. package/dist/deficit/index.d.ts +1 -0
  15. package/dist/deficit/index.js +1 -0
  16. package/dist/deficit/schemas/deficit-queue.schema.d.ts +2 -0
  17. package/dist/deficit/schemas/deficit-queue.schema.js +7 -0
  18. package/dist/excel-export/excel-export.dto.d.ts +3215 -620
  19. package/dist/excel-export/excel-export.dto.js +219 -2
  20. package/dist/excel-export/index.d.ts +1 -0
  21. package/dist/excel-export/index.js +1 -0
  22. package/dist/excel-export/warehouse-excel-export.d.ts +269 -0
  23. package/dist/excel-export/warehouse-excel-export.js +76 -0
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.js +1 -0
  26. package/dist/production-tasks/dto/split-production-task.dto.js +1 -1
  27. package/dist/production-tasks/interfaces/production-tasks.d.ts +2 -0
  28. package/dist/production-tasks/methods/methods.d.ts +3 -3
  29. package/dist/production-tasks/methods/methods.js +3 -3
  30. package/dist/specification/dto/mutate-specification.dto.d.ts +13 -0
  31. package/dist/specification/dto/mutate-specification.dto.js +14 -6
  32. package/package.json +2 -2
@@ -217,7 +217,9 @@ export interface IGetActualTaskRelative {
217
217
  }
218
218
  export interface IRelevanceOfProductionTask {
219
219
  operationId: number;
220
+ forceRedistributeMarks?: boolean;
220
221
  isStopActualPositions?: boolean;
222
+ redistributeMarksByGlobalPriority?: boolean;
221
223
  transaction?: any;
222
224
  }
223
225
  export interface IActualOperationPos {
@@ -5,9 +5,9 @@ import { ModelProductionOperationPos } from '../schemas/production-operation-pos
5
5
  * Возвращает пользовательский номер производственного задания.
6
6
  * @param productionTaskId - Внутренний идентификатор ПЗ.
7
7
  * @param parentProductionTaskId - Идентификатор родительского ПЗ.
8
- * @param subtaskNumber - Неизменяемый порядковый номер декомпозированного ПЗ в семье.
9
- * @param hasSubtasks - Признак наличия декомпозированных ПЗ у корневого задания.
10
- * @returns Номер обычного, родительского либо декомпозированного ПЗ.
8
+ * @param subtaskNumber - Неизменяемый порядковый номер разделённого ПЗ в семье.
9
+ * @param hasSubtasks - Признак наличия разделённых ПЗ у корневого задания.
10
+ * @returns Номер обычного, родительского либо разделённого ПЗ.
11
11
  */
12
12
  export declare const formatProductionTaskDisplayNumber: (productionTaskId: number, parentProductionTaskId: number | null | undefined, subtaskNumber: number | null | undefined, hasSubtasks?: boolean) => string;
13
13
  export declare const findMinGlobalIndex: (operationPosItems: ModelOperationPosition[]) => number;
@@ -6,9 +6,9 @@ const lodash_1 = require("lodash");
6
6
  * Возвращает пользовательский номер производственного задания.
7
7
  * @param productionTaskId - Внутренний идентификатор ПЗ.
8
8
  * @param parentProductionTaskId - Идентификатор родительского ПЗ.
9
- * @param subtaskNumber - Неизменяемый порядковый номер декомпозированного ПЗ в семье.
10
- * @param hasSubtasks - Признак наличия декомпозированных ПЗ у корневого задания.
11
- * @returns Номер обычного, родительского либо декомпозированного ПЗ.
9
+ * @param subtaskNumber - Неизменяемый порядковый номер разделённого ПЗ в семье.
10
+ * @param hasSubtasks - Признак наличия разделённых ПЗ у корневого задания.
11
+ * @returns Номер обычного, родительского либо разделённого ПЗ.
12
12
  */
13
13
  const formatProductionTaskDisplayNumber = (productionTaskId, parentProductionTaskId, subtaskNumber, hasSubtasks = false) => {
14
14
  if (parentProductionTaskId == null) {
@@ -3,10 +3,23 @@ import { IzdType, SpetificationEntityKeys } from '../../utils';
3
3
  export declare const SpecificationParentTypeZod: z.ZodEnum<[IzdType.product, IzdType.cbed, IzdType.detal]>;
4
4
  export declare const SpecificationSectionZod: z.ZodNativeEnum<typeof SpetificationEntityKeys>;
5
5
  export declare const SpecificationMutationOperationZod: z.ZodEnum<["add", "update", "move", "remove"]>;
6
+ export declare const SPECIFICATION_QUANTITY_MIN = 0.000001;
7
+ export declare const SPECIFICATION_QUANTITY_MAX = 1000000;
8
+ export declare const SPECIFICATION_POSITION_MIN = 1;
6
9
  /**
7
10
  * Единая команда точечного изменения спецификации.
8
11
  * position задаётся в привычном пользователю формате: первый элемент имеет позицию 1.
9
12
  */
13
+ export declare const MutateSpecificationDtoShape: {
14
+ parentType: z.ZodEnum<[IzdType.product, IzdType.cbed, IzdType.detal]>;
15
+ parentId: z.ZodNumber;
16
+ section: z.ZodNativeEnum<typeof SpetificationEntityKeys>;
17
+ operation: z.ZodEnum<["add", "update", "move", "remove"]>;
18
+ itemId: z.ZodNumber;
19
+ quantity: z.ZodOptional<z.ZodNumber>;
20
+ measureId: z.ZodOptional<z.ZodNumber>;
21
+ position: z.ZodOptional<z.ZodNumber>;
22
+ };
10
23
  export declare const MutateSpecificationDtoZod: z.ZodEffects<z.ZodObject<{
11
24
  parentType: z.ZodEnum<[IzdType.product, IzdType.cbed, IzdType.detal]>;
12
25
  parentId: z.ZodNumber;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MutateSpecificationDtoZod = exports.SpecificationMutationOperationZod = exports.SpecificationSectionZod = exports.SpecificationParentTypeZod = void 0;
3
+ exports.MutateSpecificationDtoZod = exports.MutateSpecificationDtoShape = exports.SPECIFICATION_POSITION_MIN = exports.SPECIFICATION_QUANTITY_MAX = exports.SPECIFICATION_QUANTITY_MIN = exports.SpecificationMutationOperationZod = exports.SpecificationSectionZod = exports.SpecificationParentTypeZod = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const utils_1 = require("../../utils");
6
6
  exports.SpecificationParentTypeZod = zod_1.z.enum([
@@ -15,21 +15,29 @@ exports.SpecificationMutationOperationZod = zod_1.z.enum([
15
15
  'move',
16
16
  'remove'
17
17
  ]);
18
+ exports.SPECIFICATION_QUANTITY_MIN = 0.000001;
19
+ exports.SPECIFICATION_QUANTITY_MAX = 1000000;
20
+ exports.SPECIFICATION_POSITION_MIN = 1;
18
21
  /**
19
22
  * Единая команда точечного изменения спецификации.
20
23
  * position задаётся в привычном пользователю формате: первый элемент имеет позицию 1.
21
24
  */
22
- exports.MutateSpecificationDtoZod = zod_1.z
23
- .object({
25
+ exports.MutateSpecificationDtoShape = {
24
26
  parentType: exports.SpecificationParentTypeZod,
25
27
  parentId: zod_1.z.coerce.number().int().min(1),
26
28
  section: exports.SpecificationSectionZod,
27
29
  operation: exports.SpecificationMutationOperationZod,
28
30
  itemId: zod_1.z.coerce.number().int().min(1),
29
- quantity: zod_1.z.coerce.number().min(0.000001).max(1000000).optional(),
31
+ quantity: zod_1.z.coerce
32
+ .number()
33
+ .min(exports.SPECIFICATION_QUANTITY_MIN)
34
+ .max(exports.SPECIFICATION_QUANTITY_MAX)
35
+ .optional(),
30
36
  measureId: zod_1.z.coerce.number().int().min(1).optional(),
31
- position: zod_1.z.coerce.number().int().min(1).optional()
32
- })
37
+ position: zod_1.z.coerce.number().int().min(exports.SPECIFICATION_POSITION_MIN).optional()
38
+ };
39
+ exports.MutateSpecificationDtoZod = zod_1.z
40
+ .object(exports.MutateSpecificationDtoShape)
33
41
  .superRefine((command, context) => {
34
42
  if (command.parentType === utils_1.IzdType.detal &&
35
43
  command.section !== utils_1.SpetificationEntityKeys.materialList) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pksep/zod-shared",
3
- "version": "0.0.562",
3
+ "version": "0.0.564",
4
4
  "description": "Zod package for erp project. Contains dto, interfaces, schems, types, enum",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -35,4 +35,4 @@
35
35
  "devDependencies": {
36
36
  "changelogen": "^0.6.1"
37
37
  }
38
- }
38
+ }