@pksep/zod-shared 0.0.543 → 0.0.545

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.
@@ -516,6 +516,23 @@ export declare const CreateMaterialDtoZod: z.ZodObject<{
516
516
  deliveryTime: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodNumber>>, number | null | undefined, unknown>;
517
517
  description: z.ZodString;
518
518
  attention: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
519
+ material_aliases: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodObject<{
520
+ id: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, unknown>;
521
+ alias: z.ZodString;
522
+ default: z.ZodEffects<z.ZodBoolean, boolean, unknown>;
523
+ }, "strip", z.ZodTypeAny, {
524
+ alias: string;
525
+ default: boolean;
526
+ id?: number | undefined;
527
+ }, {
528
+ alias: string;
529
+ id?: unknown;
530
+ default?: unknown;
531
+ }>, "many">>, {
532
+ alias: string;
533
+ default: boolean;
534
+ id?: number | undefined;
535
+ }[] | undefined, unknown>>;
519
536
  companyIds: z.ZodOptional<z.ZodNullable<z.ZodString>>;
520
537
  file_base: z.ZodOptional<z.ZodNullable<z.ZodString>>;
521
538
  }, "strip", z.ZodTypeAny, {
@@ -581,6 +598,11 @@ export declare const CreateMaterialDtoZod: z.ZodObject<{
581
598
  rootParentId?: number | undefined;
582
599
  companyIds?: string | null | undefined;
583
600
  subtypeMaterialId?: number | undefined;
601
+ material_aliases?: {
602
+ alias: string;
603
+ default: boolean;
604
+ id?: number | undefined;
605
+ }[] | undefined;
584
606
  }, {
585
607
  description: string;
586
608
  name: string;
@@ -595,5 +617,6 @@ export declare const CreateMaterialDtoZod: z.ZodObject<{
595
617
  companyIds?: string | null | undefined;
596
618
  units_measurement?: unknown;
597
619
  subtypeMaterialId?: unknown;
620
+ material_aliases?: unknown;
598
621
  }>;
599
622
  export type CreateMaterialDtoZodType = z.infer<typeof CreateMaterialDtoZod>;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateMaterialDtoZod = exports.MaterialCharacteristicsSchemaZod = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const utils_1 = require("../../utils");
6
+ const material_alias_schema_1 = require("../schemas/material-alias.schema");
6
7
  exports.MaterialCharacteristicsSchemaZod = zod_1.z.object({
7
8
  width: zod_1.z
8
9
  .object({
@@ -81,6 +82,9 @@ exports.CreateMaterialDtoZod = zod_1.z.object({
81
82
  deliveryTime: zod_1.z.preprocess(val => typeof val === 'string' && parseInt(val, 10) ? parseInt(val, 10) : null, zod_1.z.number().optional().nullable()),
82
83
  description: zod_1.z.string(),
83
84
  attention: zod_1.z.preprocess(val => (typeof val === 'string' ? (0, utils_1.parseBoolean)(val) : val), zod_1.z.boolean().optional()),
85
+ material_aliases: zod_1.z
86
+ .preprocess(value => typeof value === 'string' ? (0, utils_1.parseParamsOrBody)({ value }, null) : value, zod_1.z.array(material_alias_schema_1.NormalizeMaterialAliasForSaveSchema).optional())
87
+ .optional(),
84
88
  companyIds: zod_1.z.string().nullable().optional(),
85
89
  file_base: zod_1.z.string().nullable().optional()
86
90
  });
@@ -1,4 +1,5 @@
1
1
  export * from './schemas/mat-pod-mat.schema';
2
+ export * from './schemas/material-alias.schema';
2
3
  export * from './schemas/material.schema';
3
4
  export * from './schemas/material-shipments-response.schema';
4
5
  export * from './schemas/subtype-material.schema';
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./schemas/mat-pod-mat.schema"), exports);
18
+ __exportStar(require("./schemas/material-alias.schema"), exports);
18
19
  __exportStar(require("./schemas/material.schema"), exports);
19
20
  __exportStar(require("./schemas/material-shipments-response.schema"), exports);
20
21
  __exportStar(require("./schemas/subtype-material.schema"), exports);
@@ -0,0 +1,52 @@
1
+ import { z } from 'zod';
2
+ export declare const NormalizeMaterialAliasForSaveSchema: z.ZodObject<{
3
+ id: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, unknown>;
4
+ alias: z.ZodString;
5
+ default: z.ZodEffects<z.ZodBoolean, boolean, unknown>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ alias: string;
8
+ default: boolean;
9
+ id?: number | undefined;
10
+ }, {
11
+ alias: string;
12
+ id?: unknown;
13
+ default?: unknown;
14
+ }>;
15
+ export declare const MaterialMatchedAliasSchema: z.ZodObject<{
16
+ id: z.ZodNumber;
17
+ material_id: z.ZodNumber;
18
+ alias: z.ZodString;
19
+ default: z.ZodBoolean;
20
+ }, "strip", z.ZodTypeAny, {
21
+ id: number;
22
+ material_id: number;
23
+ alias: string;
24
+ default: boolean;
25
+ }, {
26
+ id: number;
27
+ material_id: number;
28
+ alias: string;
29
+ default: boolean;
30
+ }>;
31
+ export declare const MaterialMeasurementCoefficientRestrictionsInfoSchema: z.ZodObject<{
32
+ materialId: z.ZodNumber;
33
+ hasRemains: z.ZodBoolean;
34
+ hasOrders: z.ZodBoolean;
35
+ hasParentsInProduction: z.ZodBoolean;
36
+ canChangeMeasurementCoefficient: z.ZodBoolean;
37
+ }, "strip", z.ZodTypeAny, {
38
+ materialId: number;
39
+ hasRemains: boolean;
40
+ hasOrders: boolean;
41
+ hasParentsInProduction: boolean;
42
+ canChangeMeasurementCoefficient: boolean;
43
+ }, {
44
+ materialId: number;
45
+ hasRemains: boolean;
46
+ hasOrders: boolean;
47
+ hasParentsInProduction: boolean;
48
+ canChangeMeasurementCoefficient: boolean;
49
+ }>;
50
+ export type NormalizeMaterialAliasForSave = z.infer<typeof NormalizeMaterialAliasForSaveSchema>;
51
+ export type MaterialMatchedAlias = z.infer<typeof MaterialMatchedAliasSchema>;
52
+ export type MaterialMeasurementCoefficientRestrictionsInfo = z.infer<typeof MaterialMeasurementCoefficientRestrictionsInfoSchema>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MaterialMeasurementCoefficientRestrictionsInfoSchema = exports.MaterialMatchedAliasSchema = exports.NormalizeMaterialAliasForSaveSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const utils_1 = require("../../utils");
6
+ exports.NormalizeMaterialAliasForSaveSchema = zod_1.z.object({
7
+ id: zod_1.z.preprocess(val => typeof val === 'string' && parseInt(val, 10) ? parseInt(val, 10) : val, zod_1.z.number().optional()),
8
+ alias: zod_1.z.string(),
9
+ default: zod_1.z.preprocess(val => (typeof val === 'string' ? (0, utils_1.parseBoolean)(val) : val), zod_1.z.boolean())
10
+ });
11
+ exports.MaterialMatchedAliasSchema = zod_1.z.object({
12
+ id: zod_1.z.number().int(),
13
+ material_id: zod_1.z.number().int(),
14
+ alias: zod_1.z.string(),
15
+ default: zod_1.z.boolean()
16
+ });
17
+ exports.MaterialMeasurementCoefficientRestrictionsInfoSchema = zod_1.z.object({
18
+ materialId: zod_1.z.number().int(),
19
+ hasRemains: zod_1.z.boolean(),
20
+ hasOrders: zod_1.z.boolean(),
21
+ hasParentsInProduction: zod_1.z.boolean(),
22
+ canChangeMeasurementCoefficient: zod_1.z.boolean()
23
+ });
@@ -163,7 +163,7 @@ export interface IGetDeficitsDetalByProductionTask {
163
163
  productionTaskId: number;
164
164
  startTimeDelay?: number;
165
165
  detalProductionTaskId: number;
166
- childrenCalculateNeedsTime: Date;
166
+ childrenCalculateNeedsTime: Date | 0;
167
167
  totalProductionTaskOrdered: number;
168
168
  entityStartTime?: Date;
169
169
  createTimeByLastOperation: {
@@ -14,3 +14,22 @@ export declare const EntityListItemSchema: z.ZodObject<{
14
14
  quantity: number;
15
15
  }>;
16
16
  export type EntityListItem = z.infer<typeof EntityListItemSchema>;
17
+ export type ShipmentItemByEntityResponse = {
18
+ [key: string]: any;
19
+ entityId: number;
20
+ name: string | null;
21
+ designation: string | null;
22
+ avatar: string | null;
23
+ photo: string | null;
24
+ shipmentNumber: string | null;
25
+ shipmentOrderDate: Date | string | null;
26
+ numberOrder: string | null;
27
+ orderDate: Date | string | null;
28
+ plannedShipmentDate: Date | string | null;
29
+ warehouseReadinessDate: Date | string | null;
30
+ countForOrder: number;
31
+ needForOrder: number;
32
+ deficitForOrder: number;
33
+ countPerShipment: number;
34
+ deficitByShipments: number;
35
+ };
@@ -28,3 +28,21 @@ export declare const StockOrderDataZod: z.ZodObject<{
28
28
  }>;
29
29
  export type StockOrderDataZodType = z.infer<typeof StockOrderDataZod>;
30
30
  export type StockOrderComplectZodType = z.infer<typeof StockOrderComplectZod>;
31
+ export type StockOrderItemByEntityResponse = {
32
+ [key: string]: any;
33
+ entityId: number;
34
+ name: string | null;
35
+ designation: string | null;
36
+ avatar: string | null;
37
+ photo: string | null;
38
+ stockOrderNumber: string | null;
39
+ stockOrderDate: Date | string | null;
40
+ plannedShipmentDate: Date | string | null;
41
+ warehouseReadinessDate: Date | string | null;
42
+ requiredReadinessTime: Date | string | null;
43
+ countForOrder: number;
44
+ needForOrder: number;
45
+ deficitForOrder: number;
46
+ countPerStockOrderItem: number;
47
+ deficitByStockOrderItem: number;
48
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pksep/zod-shared",
3
- "version": "0.0.543",
3
+ "version": "0.0.545",
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",