@pksep/zod-shared 0.0.566 → 0.0.568
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.
- package/dist/ai-mcp/index.d.ts +1 -0
- package/dist/ai-mcp/index.js +1 -0
- package/dist/ai-mcp/interfaces/ai-mcp.interface.d.ts +172 -3
- package/dist/ai-mcp/schemas/ai-mcp-shipment.schema.d.ts +109 -0
- package/dist/ai-mcp/schemas/ai-mcp-shipment.schema.js +110 -0
- package/dist/ai-mcp/schemas/ai-mcp.schema.d.ts +59 -2
- package/dist/ai-mcp/schemas/ai-mcp.schema.js +31 -3
- package/dist/assemble/interfaces/interfaces.d.ts +4 -0
- package/dist/document/dto/entity-document-command.dto.d.ts +14 -14
- package/dist/document/dto/entity-document-command.dto.js +2 -1
- package/dist/document/types/uploaded-file-map.type.d.ts +5 -0
- package/dist/document/types/uploaded-file-map.type.js +2 -0
- package/dist/excel-export/excel-export.dto.d.ts +990 -2555
- package/dist/excel-export/excel-export.dto.js +15 -116
- package/dist/excel-export/index.d.ts +0 -1
- package/dist/excel-export/index.js +0 -1
- package/dist/marks/dto/get-result-work.dto.d.ts +18 -4
- package/dist/marks/dto/get-result-work.dto.js +2 -1
- package/dist/production-tasks/dto/repair-production-task-priority.dto.d.ts +30 -0
- package/dist/production-tasks/dto/repair-production-task-priority.dto.js +18 -0
- package/dist/production-tasks/interfaces/production-tasks.d.ts +28 -8
- package/dist/role/constants/permission.constants.d.ts +9 -0
- package/dist/role/constants/permission.constants.js +13 -0
- package/dist/role/dto/update-role-permissions.dto.d.ts +15 -0
- package/dist/role/dto/update-role-permissions.dto.js +9 -0
- package/dist/role/enums/permission.enum.d.ts +116 -0
- package/dist/role/enums/permission.enum.js +123 -0
- package/dist/role/schemas/permission.schema.d.ts +169 -0
- package/dist/role/schemas/permission.schema.js +44 -0
- package/dist/role/types/permission.types.d.ts +38 -0
- package/dist/role/types/permission.types.js +2 -0
- package/dist/sclad/schemas/revision.schema.d.ts +5 -5
- package/dist/stock-order/dto/get-stock-order-items-by-entity.dto.d.ts +19 -0
- package/dist/stock-order/dto/get-stock-order-items-by-entity.dto.js +11 -0
- package/dist/tech-process/types/tech-process-load-options.d.ts +3 -0
- package/dist/tech-process/types/tech-process-load-options.js +2 -0
- package/dist/utils/enums.d.ts +1 -0
- package/dist/utils/enums.js +1 -0
- package/dist/utils/sorting.d.ts +2 -1
- package/dist/utils/sorting.js +1 -0
- package/dist/utils/tables-config/enum.d.ts +2 -0
- package/dist/utils/tables-config/enum.js +2 -0
- package/dist/utils/tables-config/tables-array.js +8 -0
- package/package.json +2 -2
- package/dist/excel-export/warehouse-excel-export.d.ts +0 -269
- package/dist/excel-export/warehouse-excel-export.js +0 -76
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PermissionResource = exports.PermissionRequirementModeEnum = exports.PermissionErrorCodeEnum = exports.PermissionActionEnum = void 0;
|
|
4
|
+
/** Действия, поддерживаемые системой ролевых разрешений. */
|
|
5
|
+
var PermissionActionEnum;
|
|
6
|
+
(function (PermissionActionEnum) {
|
|
7
|
+
PermissionActionEnum["View"] = "view";
|
|
8
|
+
PermissionActionEnum["Create"] = "create";
|
|
9
|
+
PermissionActionEnum["Update"] = "update";
|
|
10
|
+
PermissionActionEnum["Archive"] = "archive";
|
|
11
|
+
PermissionActionEnum["Attach"] = "attach";
|
|
12
|
+
PermissionActionEnum["Detach"] = "detach";
|
|
13
|
+
})(PermissionActionEnum || (exports.PermissionActionEnum = PermissionActionEnum = {}));
|
|
14
|
+
/** Код ошибки, возвращаемой при отказе ролевой авторизации. */
|
|
15
|
+
var PermissionErrorCodeEnum;
|
|
16
|
+
(function (PermissionErrorCodeEnum) {
|
|
17
|
+
PermissionErrorCodeEnum["Denied"] = "PERMISSION_DENIED";
|
|
18
|
+
})(PermissionErrorCodeEnum || (exports.PermissionErrorCodeEnum = PermissionErrorCodeEnum = {}));
|
|
19
|
+
/** Способ применения перечисленных в ответе обязательных разрешений. */
|
|
20
|
+
var PermissionRequirementModeEnum;
|
|
21
|
+
(function (PermissionRequirementModeEnum) {
|
|
22
|
+
PermissionRequirementModeEnum["AnyOf"] = "anyOf";
|
|
23
|
+
PermissionRequirementModeEnum["AllOf"] = "allOf";
|
|
24
|
+
})(PermissionRequirementModeEnum || (exports.PermissionRequirementModeEnum = PermissionRequirementModeEnum = {}));
|
|
25
|
+
/**
|
|
26
|
+
* Стабильные коды ресурсов системы разрешений.
|
|
27
|
+
* Значения enum совпадают с кодами в authorization_resources.
|
|
28
|
+
*/
|
|
29
|
+
var PermissionResource;
|
|
30
|
+
(function (PermissionResource) {
|
|
31
|
+
PermissionResource["General"] = "general";
|
|
32
|
+
PermissionResource["GeneralHome"] = "general.home";
|
|
33
|
+
PermissionResource["GeneralWorkResults"] = "general.work-results";
|
|
34
|
+
PermissionResource["GeneralProjects"] = "general.projects";
|
|
35
|
+
PermissionResource["GeneralCalendar"] = "general.calendar";
|
|
36
|
+
PermissionResource["Account"] = "account";
|
|
37
|
+
PermissionResource["AccountProfile"] = "account.profile";
|
|
38
|
+
PermissionResource["Catalog"] = "catalog";
|
|
39
|
+
PermissionResource["CatalogProducts"] = "catalog.products";
|
|
40
|
+
PermissionResource["CatalogCbeds"] = "catalog.cbeds";
|
|
41
|
+
PermissionResource["CatalogDetals"] = "catalog.detals";
|
|
42
|
+
PermissionResource["CatalogMaterials"] = "catalog.materials";
|
|
43
|
+
PermissionResource["CatalogTools"] = "catalog.tools";
|
|
44
|
+
PermissionResource["CatalogEquipment"] = "catalog.equipment";
|
|
45
|
+
PermissionResource["CatalogInventory"] = "catalog.inventory";
|
|
46
|
+
PermissionResource["CatalogContacts"] = "catalog.contacts";
|
|
47
|
+
PermissionResource["CatalogCompanies"] = "catalog.companies";
|
|
48
|
+
PermissionResource["Files"] = "files";
|
|
49
|
+
PermissionResource["FilesLibrary"] = "files.library";
|
|
50
|
+
PermissionResource["FilesAttachments"] = "files.attachments";
|
|
51
|
+
PermissionResource["FilesAttachmentsProduct"] = "files.attachments.product";
|
|
52
|
+
PermissionResource["FilesAttachmentsCbed"] = "files.attachments.cbed";
|
|
53
|
+
PermissionResource["FilesAttachmentsDetal"] = "files.attachments.detal";
|
|
54
|
+
PermissionResource["FilesAttachmentsMaterial"] = "files.attachments.material";
|
|
55
|
+
PermissionResource["FilesAttachmentsProvider"] = "files.attachments.provider";
|
|
56
|
+
PermissionResource["FilesAttachmentsCompany"] = "files.attachments.company";
|
|
57
|
+
PermissionResource["FilesAttachmentsEquipment"] = "files.attachments.equipment";
|
|
58
|
+
PermissionResource["FilesAttachmentsInstrument"] = "files.attachments.instrument";
|
|
59
|
+
PermissionResource["FilesAttachmentsInventory"] = "files.attachments.inventory";
|
|
60
|
+
PermissionResource["FilesAttachmentsUser"] = "files.attachments.user";
|
|
61
|
+
PermissionResource["FilesAttachmentsWaybill"] = "files.attachments.waybill";
|
|
62
|
+
PermissionResource["FilesAttachmentsDelivery"] = "files.attachments.delivery";
|
|
63
|
+
PermissionResource["FilesAttachmentsShipment"] = "files.attachments.shipment";
|
|
64
|
+
PermissionResource["FilesAttachmentsOperation"] = "files.attachments.operation";
|
|
65
|
+
PermissionResource["FilesAttachmentsTechProcess"] = "files.attachments.tech-process";
|
|
66
|
+
PermissionResource["FilesAttachmentsAssembleKit"] = "files.attachments.assemble-kit";
|
|
67
|
+
PermissionResource["FilesAttachmentsMoving"] = "files.attachments.moving";
|
|
68
|
+
PermissionResource["FilesAttachmentsShipmentCompletion"] = "files.attachments.shipment-completion";
|
|
69
|
+
PermissionResource["Shipping"] = "shipping";
|
|
70
|
+
PermissionResource["ShippingTasks"] = "shipping.tasks";
|
|
71
|
+
PermissionResource["Warehouse"] = "warehouse";
|
|
72
|
+
PermissionResource["WarehouseOverview"] = "warehouse.overview";
|
|
73
|
+
PermissionResource["WarehouseReceipts"] = "warehouse.receipts";
|
|
74
|
+
PermissionResource["WarehouseConsumption"] = "warehouse.consumption";
|
|
75
|
+
PermissionResource["WarehouseCompletedKits"] = "warehouse.completed-kits";
|
|
76
|
+
PermissionResource["WarehouseProductResiduals"] = "warehouse.product-residuals";
|
|
77
|
+
PermissionResource["WarehouseOrderedInTransit"] = "warehouse.ordered-in-transit";
|
|
78
|
+
PermissionResource["WarehouseShippingTasks"] = "warehouse.shipping-tasks";
|
|
79
|
+
PermissionResource["WarehouseCbedCompletion"] = "warehouse.cbed-completion";
|
|
80
|
+
PermissionResource["WarehouseProductCompletion"] = "warehouse.product-completion";
|
|
81
|
+
PermissionResource["WarehouseSupplierOrders"] = "warehouse.supplier-orders";
|
|
82
|
+
PermissionResource["WarehouseCbedDeficit"] = "warehouse.cbed-deficit";
|
|
83
|
+
PermissionResource["WarehouseProductDeficit"] = "warehouse.product-deficit";
|
|
84
|
+
PermissionResource["WarehouseMaterialDeficit"] = "warehouse.material-deficit";
|
|
85
|
+
PermissionResource["WarehouseDetalDeficit"] = "warehouse.detal-deficit";
|
|
86
|
+
PermissionResource["WarehouseShippedOrders"] = "warehouse.shipped-orders";
|
|
87
|
+
PermissionResource["WarehouseRevision"] = "warehouse.revision";
|
|
88
|
+
PermissionResource["WarehouseMovement"] = "warehouse.movement";
|
|
89
|
+
PermissionResource["WarehouseMetalworkingOrders"] = "warehouse.metalworking-orders";
|
|
90
|
+
PermissionResource["WarehouseAssemblyOrders"] = "warehouse.assembly-orders";
|
|
91
|
+
PermissionResource["WarehouseRacks"] = "warehouse.racks";
|
|
92
|
+
PermissionResource["Production"] = "production";
|
|
93
|
+
PermissionResource["ProductionOverview"] = "production.overview";
|
|
94
|
+
PermissionResource["ProductionTasks"] = "production.tasks";
|
|
95
|
+
PermissionResource["ProductionMetalworking"] = "production.metalworking";
|
|
96
|
+
PermissionResource["ProductionAssembly"] = "production.assembly";
|
|
97
|
+
PermissionResource["ProductionOperationMetalworking"] = "production.operation-metalworking";
|
|
98
|
+
PermissionResource["ProductionOperationAssembly"] = "production.operation-assembly";
|
|
99
|
+
PermissionResource["ProductionBoard"] = "production.board";
|
|
100
|
+
PermissionResource["ProductionBoardMetalworking"] = "production.board-metalworking";
|
|
101
|
+
PermissionResource["ProductionOnlineBoard"] = "production.online-board";
|
|
102
|
+
PermissionResource["Control"] = "control";
|
|
103
|
+
PermissionResource["ControlArchive"] = "control.archive";
|
|
104
|
+
PermissionResource["ControlActions"] = "control.actions";
|
|
105
|
+
PermissionResource["ControlMarks"] = "control.marks";
|
|
106
|
+
PermissionResource["Settings"] = "settings";
|
|
107
|
+
PermissionResource["SettingsOverview"] = "settings.overview";
|
|
108
|
+
PermissionResource["SettingsEmployees"] = "settings.employees";
|
|
109
|
+
PermissionResource["SettingsUnits"] = "settings.units";
|
|
110
|
+
PermissionResource["SettingsMaterials"] = "settings.materials";
|
|
111
|
+
PermissionResource["SettingsOperations"] = "settings.operations";
|
|
112
|
+
PermissionResource["SettingsTools"] = "settings.tools";
|
|
113
|
+
PermissionResource["SettingsEquipment"] = "settings.equipment";
|
|
114
|
+
PermissionResource["SettingsInventory"] = "settings.inventory";
|
|
115
|
+
PermissionResource["SettingsDeficit"] = "settings.deficit";
|
|
116
|
+
PermissionResource["SettingsTimeTracking"] = "settings.time-tracking";
|
|
117
|
+
PermissionResource["SettingsRoles"] = "settings.roles";
|
|
118
|
+
PermissionResource["SettingsPositions"] = "settings.positions";
|
|
119
|
+
PermissionResource["SettingsNormHours"] = "settings.norm-hours";
|
|
120
|
+
PermissionResource["SettingsBackups"] = "settings.backups";
|
|
121
|
+
PermissionResource["SettingsNotifications"] = "settings.notifications";
|
|
122
|
+
PermissionResource["SettingsExclusions"] = "settings.exclusions";
|
|
123
|
+
})(PermissionResource || (exports.PermissionResource = PermissionResource = {}));
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PermissionActionSchema: z.ZodEnum<["archive" | "create" | "view" | "update" | "attach" | "detach", ...("archive" | "create" | "view" | "update" | "attach" | "detach")[]]>;
|
|
3
|
+
export declare const PermissionResourceCodeSchema: z.ZodEnum<["files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions", ...("files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions")[]]>;
|
|
4
|
+
export declare const AuthorizationResourceSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodNumber;
|
|
6
|
+
code: z.ZodEnum<["files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions", ...("files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions")[]]>;
|
|
7
|
+
parent_id: z.ZodNullable<z.ZodNumber>;
|
|
8
|
+
title: z.ZodString;
|
|
9
|
+
description: z.ZodDefault<z.ZodString>;
|
|
10
|
+
sort_order: z.ZodDefault<z.ZodNumber>;
|
|
11
|
+
is_active: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
code: "files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions";
|
|
14
|
+
description: string;
|
|
15
|
+
id: number;
|
|
16
|
+
title: string;
|
|
17
|
+
parent_id: number | null;
|
|
18
|
+
is_active: boolean;
|
|
19
|
+
sort_order: number;
|
|
20
|
+
}, {
|
|
21
|
+
code: "files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions";
|
|
22
|
+
id: number;
|
|
23
|
+
title: string;
|
|
24
|
+
parent_id: number | null;
|
|
25
|
+
description?: string | undefined;
|
|
26
|
+
is_active?: boolean | undefined;
|
|
27
|
+
sort_order?: number | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const AuthorizationPermissionSchema: z.ZodObject<{
|
|
30
|
+
id: z.ZodNumber;
|
|
31
|
+
resource_id: z.ZodNumber;
|
|
32
|
+
action: z.ZodEnum<["archive" | "create" | "view" | "update" | "attach" | "detach", ...("archive" | "create" | "view" | "update" | "attach" | "detach")[]]>;
|
|
33
|
+
description: z.ZodDefault<z.ZodString>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
description: string;
|
|
36
|
+
id: number;
|
|
37
|
+
action: "archive" | "create" | "view" | "update" | "attach" | "detach";
|
|
38
|
+
resource_id: number;
|
|
39
|
+
}, {
|
|
40
|
+
id: number;
|
|
41
|
+
action: "archive" | "create" | "view" | "update" | "attach" | "detach";
|
|
42
|
+
resource_id: number;
|
|
43
|
+
description?: string | undefined;
|
|
44
|
+
}>;
|
|
45
|
+
export declare const EffectivePermissionSchema: z.ZodObject<{
|
|
46
|
+
permission_id: z.ZodNumber;
|
|
47
|
+
resource_code: z.ZodEnum<["files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions", ...("files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions")[]]>;
|
|
48
|
+
action: z.ZodEnum<["archive" | "create" | "view" | "update" | "attach" | "detach", ...("archive" | "create" | "view" | "update" | "attach" | "detach")[]]>;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
action: "archive" | "create" | "view" | "update" | "attach" | "detach";
|
|
51
|
+
permission_id: number;
|
|
52
|
+
resource_code: "files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions";
|
|
53
|
+
}, {
|
|
54
|
+
action: "archive" | "create" | "view" | "update" | "attach" | "detach";
|
|
55
|
+
permission_id: number;
|
|
56
|
+
resource_code: "files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions";
|
|
57
|
+
}>;
|
|
58
|
+
export declare const PermissionCatalogItemSchema: z.ZodObject<{
|
|
59
|
+
id: z.ZodNumber;
|
|
60
|
+
code: z.ZodEnum<["files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions", ...("files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions")[]]>;
|
|
61
|
+
parent_id: z.ZodNullable<z.ZodNumber>;
|
|
62
|
+
title: z.ZodString;
|
|
63
|
+
description: z.ZodDefault<z.ZodString>;
|
|
64
|
+
sort_order: z.ZodDefault<z.ZodNumber>;
|
|
65
|
+
is_active: z.ZodDefault<z.ZodBoolean>;
|
|
66
|
+
} & {
|
|
67
|
+
permissions: z.ZodArray<z.ZodObject<{
|
|
68
|
+
id: z.ZodNumber;
|
|
69
|
+
resource_id: z.ZodNumber;
|
|
70
|
+
action: z.ZodEnum<["archive" | "create" | "view" | "update" | "attach" | "detach", ...("archive" | "create" | "view" | "update" | "attach" | "detach")[]]>;
|
|
71
|
+
description: z.ZodDefault<z.ZodString>;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
description: string;
|
|
74
|
+
id: number;
|
|
75
|
+
action: "archive" | "create" | "view" | "update" | "attach" | "detach";
|
|
76
|
+
resource_id: number;
|
|
77
|
+
}, {
|
|
78
|
+
id: number;
|
|
79
|
+
action: "archive" | "create" | "view" | "update" | "attach" | "detach";
|
|
80
|
+
resource_id: number;
|
|
81
|
+
description?: string | undefined;
|
|
82
|
+
}>, "many">;
|
|
83
|
+
}, "strip", z.ZodTypeAny, {
|
|
84
|
+
code: "files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions";
|
|
85
|
+
description: string;
|
|
86
|
+
id: number;
|
|
87
|
+
title: string;
|
|
88
|
+
parent_id: number | null;
|
|
89
|
+
is_active: boolean;
|
|
90
|
+
sort_order: number;
|
|
91
|
+
permissions: {
|
|
92
|
+
description: string;
|
|
93
|
+
id: number;
|
|
94
|
+
action: "archive" | "create" | "view" | "update" | "attach" | "detach";
|
|
95
|
+
resource_id: number;
|
|
96
|
+
}[];
|
|
97
|
+
}, {
|
|
98
|
+
code: "files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions";
|
|
99
|
+
id: number;
|
|
100
|
+
title: string;
|
|
101
|
+
parent_id: number | null;
|
|
102
|
+
permissions: {
|
|
103
|
+
id: number;
|
|
104
|
+
action: "archive" | "create" | "view" | "update" | "attach" | "detach";
|
|
105
|
+
resource_id: number;
|
|
106
|
+
description?: string | undefined;
|
|
107
|
+
}[];
|
|
108
|
+
description?: string | undefined;
|
|
109
|
+
is_active?: boolean | undefined;
|
|
110
|
+
sort_order?: number | undefined;
|
|
111
|
+
}>;
|
|
112
|
+
export declare const EffectiveRolePermissionsSchema: z.ZodObject<{
|
|
113
|
+
roleId: z.ZodNumber;
|
|
114
|
+
permissionsVersion: z.ZodNumber;
|
|
115
|
+
permissions: z.ZodArray<z.ZodObject<{
|
|
116
|
+
permission_id: z.ZodNumber;
|
|
117
|
+
resource_code: z.ZodEnum<["files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions", ...("files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions")[]]>;
|
|
118
|
+
action: z.ZodEnum<["archive" | "create" | "view" | "update" | "attach" | "detach", ...("archive" | "create" | "view" | "update" | "attach" | "detach")[]]>;
|
|
119
|
+
}, "strip", z.ZodTypeAny, {
|
|
120
|
+
action: "archive" | "create" | "view" | "update" | "attach" | "detach";
|
|
121
|
+
permission_id: number;
|
|
122
|
+
resource_code: "files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions";
|
|
123
|
+
}, {
|
|
124
|
+
action: "archive" | "create" | "view" | "update" | "attach" | "detach";
|
|
125
|
+
permission_id: number;
|
|
126
|
+
resource_code: "files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions";
|
|
127
|
+
}>, "many">;
|
|
128
|
+
}, "strip", z.ZodTypeAny, {
|
|
129
|
+
roleId: number;
|
|
130
|
+
permissions: {
|
|
131
|
+
action: "archive" | "create" | "view" | "update" | "attach" | "detach";
|
|
132
|
+
permission_id: number;
|
|
133
|
+
resource_code: "files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions";
|
|
134
|
+
}[];
|
|
135
|
+
permissionsVersion: number;
|
|
136
|
+
}, {
|
|
137
|
+
roleId: number;
|
|
138
|
+
permissions: {
|
|
139
|
+
action: "archive" | "create" | "view" | "update" | "attach" | "detach";
|
|
140
|
+
permission_id: number;
|
|
141
|
+
resource_code: "files" | "general" | "general.home" | "general.work-results" | "general.projects" | "general.calendar" | "account" | "account.profile" | "catalog" | "catalog.products" | "catalog.cbeds" | "catalog.detals" | "catalog.materials" | "catalog.tools" | "catalog.equipment" | "catalog.inventory" | "catalog.contacts" | "catalog.companies" | "files.library" | "files.attachments" | "files.attachments.product" | "files.attachments.cbed" | "files.attachments.detal" | "files.attachments.material" | "files.attachments.provider" | "files.attachments.company" | "files.attachments.equipment" | "files.attachments.instrument" | "files.attachments.inventory" | "files.attachments.user" | "files.attachments.waybill" | "files.attachments.delivery" | "files.attachments.shipment" | "files.attachments.operation" | "files.attachments.tech-process" | "files.attachments.assemble-kit" | "files.attachments.moving" | "files.attachments.shipment-completion" | "shipping" | "shipping.tasks" | "warehouse" | "warehouse.overview" | "warehouse.receipts" | "warehouse.consumption" | "warehouse.completed-kits" | "warehouse.product-residuals" | "warehouse.ordered-in-transit" | "warehouse.shipping-tasks" | "warehouse.cbed-completion" | "warehouse.product-completion" | "warehouse.supplier-orders" | "warehouse.cbed-deficit" | "warehouse.product-deficit" | "warehouse.material-deficit" | "warehouse.detal-deficit" | "warehouse.shipped-orders" | "warehouse.revision" | "warehouse.movement" | "warehouse.metalworking-orders" | "warehouse.assembly-orders" | "warehouse.racks" | "production" | "production.overview" | "production.tasks" | "production.metalworking" | "production.assembly" | "production.operation-metalworking" | "production.operation-assembly" | "production.board" | "production.board-metalworking" | "production.online-board" | "control" | "control.archive" | "control.actions" | "control.marks" | "settings" | "settings.overview" | "settings.employees" | "settings.units" | "settings.materials" | "settings.operations" | "settings.tools" | "settings.equipment" | "settings.inventory" | "settings.deficit" | "settings.time-tracking" | "settings.roles" | "settings.positions" | "settings.norm-hours" | "settings.backups" | "settings.notifications" | "settings.exclusions";
|
|
142
|
+
}[];
|
|
143
|
+
permissionsVersion: number;
|
|
144
|
+
}>;
|
|
145
|
+
export declare const RolePermissionSelectionSchema: z.ZodObject<{
|
|
146
|
+
roleId: z.ZodNumber;
|
|
147
|
+
roleName: z.ZodString;
|
|
148
|
+
isSystem: z.ZodBoolean;
|
|
149
|
+
permissionsVersion: z.ZodNumber;
|
|
150
|
+
permissionIds: z.ZodArray<z.ZodNumber, "many">;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
roleId: number;
|
|
153
|
+
permissionsVersion: number;
|
|
154
|
+
roleName: string;
|
|
155
|
+
isSystem: boolean;
|
|
156
|
+
permissionIds: number[];
|
|
157
|
+
}, {
|
|
158
|
+
roleId: number;
|
|
159
|
+
permissionsVersion: number;
|
|
160
|
+
roleName: string;
|
|
161
|
+
isSystem: boolean;
|
|
162
|
+
permissionIds: number[];
|
|
163
|
+
}>;
|
|
164
|
+
export type AuthorizationResourceType = z.infer<typeof AuthorizationResourceSchema>;
|
|
165
|
+
export type AuthorizationPermissionType = z.infer<typeof AuthorizationPermissionSchema>;
|
|
166
|
+
export type EffectivePermissionType = z.infer<typeof EffectivePermissionSchema>;
|
|
167
|
+
export type PermissionCatalogItemType = z.infer<typeof PermissionCatalogItemSchema>;
|
|
168
|
+
export type EffectiveRolePermissionsType = z.infer<typeof EffectiveRolePermissionsSchema>;
|
|
169
|
+
export type RolePermissionSelectionType = z.infer<typeof RolePermissionSelectionSchema>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RolePermissionSelectionSchema = exports.EffectiveRolePermissionsSchema = exports.PermissionCatalogItemSchema = exports.EffectivePermissionSchema = exports.AuthorizationPermissionSchema = exports.AuthorizationResourceSchema = exports.PermissionResourceCodeSchema = exports.PermissionActionSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const permission_enum_1 = require("../enums/permission.enum");
|
|
6
|
+
const permissionActionValues = Object.values(permission_enum_1.PermissionActionEnum);
|
|
7
|
+
const permissionResourceValues = Object.values(permission_enum_1.PermissionResource);
|
|
8
|
+
exports.PermissionActionSchema = zod_1.z.enum(permissionActionValues);
|
|
9
|
+
exports.PermissionResourceCodeSchema = zod_1.z.enum(permissionResourceValues);
|
|
10
|
+
exports.AuthorizationResourceSchema = zod_1.z.object({
|
|
11
|
+
id: zod_1.z.number().int().positive(),
|
|
12
|
+
code: exports.PermissionResourceCodeSchema,
|
|
13
|
+
parent_id: zod_1.z.number().int().positive().nullable(),
|
|
14
|
+
title: zod_1.z.string().min(1).max(255),
|
|
15
|
+
description: zod_1.z.string().max(1000).default(''),
|
|
16
|
+
sort_order: zod_1.z.number().int().default(0),
|
|
17
|
+
is_active: zod_1.z.boolean().default(true)
|
|
18
|
+
});
|
|
19
|
+
exports.AuthorizationPermissionSchema = zod_1.z.object({
|
|
20
|
+
id: zod_1.z.number().int().positive(),
|
|
21
|
+
resource_id: zod_1.z.number().int().positive(),
|
|
22
|
+
action: exports.PermissionActionSchema,
|
|
23
|
+
description: zod_1.z.string().max(1000).default('')
|
|
24
|
+
});
|
|
25
|
+
exports.EffectivePermissionSchema = zod_1.z.object({
|
|
26
|
+
permission_id: zod_1.z.number().int().positive(),
|
|
27
|
+
resource_code: exports.PermissionResourceCodeSchema,
|
|
28
|
+
action: exports.PermissionActionSchema
|
|
29
|
+
});
|
|
30
|
+
exports.PermissionCatalogItemSchema = exports.AuthorizationResourceSchema.extend({
|
|
31
|
+
permissions: zod_1.z.array(exports.AuthorizationPermissionSchema)
|
|
32
|
+
});
|
|
33
|
+
exports.EffectiveRolePermissionsSchema = zod_1.z.object({
|
|
34
|
+
roleId: zod_1.z.number().int().positive(),
|
|
35
|
+
permissionsVersion: zod_1.z.number().int().positive(),
|
|
36
|
+
permissions: zod_1.z.array(exports.EffectivePermissionSchema)
|
|
37
|
+
});
|
|
38
|
+
exports.RolePermissionSelectionSchema = zod_1.z.object({
|
|
39
|
+
roleId: zod_1.z.number().int().positive(),
|
|
40
|
+
roleName: zod_1.z.string().min(1),
|
|
41
|
+
isSystem: zod_1.z.boolean(),
|
|
42
|
+
permissionsVersion: zod_1.z.number().int().positive(),
|
|
43
|
+
permissionIds: zod_1.z.array(zod_1.z.number().int().positive())
|
|
44
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PermissionActionEnum, PermissionErrorCodeEnum, PermissionRequirementModeEnum, PermissionResource } from '../enums/permission.enum';
|
|
2
|
+
/** Строковое значение действия сохраняет совместимость JSON-контрактов. */
|
|
3
|
+
export type PermissionAction = `${PermissionActionEnum}`;
|
|
4
|
+
/** Строковое значение ресурса сохраняет совместимость JSON-контрактов. */
|
|
5
|
+
export type PermissionResourceCode = `${PermissionResource}`;
|
|
6
|
+
export type PermissionRequirement = Readonly<{
|
|
7
|
+
resource: PermissionResourceCode;
|
|
8
|
+
action: PermissionAction;
|
|
9
|
+
}>;
|
|
10
|
+
export type PermissionPrincipal = Readonly<{
|
|
11
|
+
id?: number | string;
|
|
12
|
+
rolesId?: number | string;
|
|
13
|
+
}>;
|
|
14
|
+
/** Минимальный HTTP-контекст, необходимый для вычисления разрешения. */
|
|
15
|
+
export type PermissionRequestContext = Readonly<{
|
|
16
|
+
body?: Readonly<Record<string, unknown>>;
|
|
17
|
+
params?: Readonly<Record<string, unknown>>;
|
|
18
|
+
query?: Readonly<Record<string, unknown>>;
|
|
19
|
+
user?: PermissionPrincipal;
|
|
20
|
+
method?: string;
|
|
21
|
+
originalUrl?: string;
|
|
22
|
+
}>;
|
|
23
|
+
export type PermissionResourceResolver = (request: PermissionRequestContext) => PermissionResourceCode | undefined;
|
|
24
|
+
export type ContextualPermissionRequirement = Readonly<{
|
|
25
|
+
resource?: PermissionResourceCode;
|
|
26
|
+
resolveResource?: PermissionResourceResolver;
|
|
27
|
+
action: PermissionAction;
|
|
28
|
+
}>;
|
|
29
|
+
export type RequiredPermissionPolicy = ContextualPermissionRequirement | Readonly<{
|
|
30
|
+
anyOf: readonly ContextualPermissionRequirement[];
|
|
31
|
+
}>;
|
|
32
|
+
/** Дополнительные данные ответа сервера при отказе ролевой авторизации. */
|
|
33
|
+
export type PermissionDeniedResponse = Readonly<{
|
|
34
|
+
code: PermissionErrorCodeEnum.Denied;
|
|
35
|
+
message: string;
|
|
36
|
+
requiredPermissions: readonly PermissionRequirement[];
|
|
37
|
+
requirementMode: PermissionRequirementModeEnum;
|
|
38
|
+
}>;
|
|
@@ -31,13 +31,13 @@ declare const RevisionSchema: z.ZodObject<{
|
|
|
31
31
|
id?: number | null | undefined;
|
|
32
32
|
createdAt?: string | undefined;
|
|
33
33
|
updatedAt?: string | undefined;
|
|
34
|
-
entity_type?: RevisionEntityTypes | undefined;
|
|
35
|
-
entity_id?: number | null | undefined;
|
|
36
34
|
entity?: {
|
|
37
35
|
designation: string;
|
|
38
36
|
name: string;
|
|
39
37
|
articl: string;
|
|
40
38
|
} | undefined;
|
|
39
|
+
entity_type?: RevisionEntityTypes | undefined;
|
|
40
|
+
entity_id?: number | null | undefined;
|
|
41
41
|
}, {
|
|
42
42
|
user_id: number;
|
|
43
43
|
new_count: number;
|
|
@@ -45,14 +45,14 @@ declare const RevisionSchema: z.ZodObject<{
|
|
|
45
45
|
id?: number | null | undefined;
|
|
46
46
|
createdAt?: string | undefined;
|
|
47
47
|
updatedAt?: string | undefined;
|
|
48
|
-
entity_type?: RevisionEntityTypes | undefined;
|
|
49
|
-
last_count?: number | undefined;
|
|
50
|
-
entity_id?: number | null | undefined;
|
|
51
48
|
entity?: {
|
|
52
49
|
designation: string;
|
|
53
50
|
name: string;
|
|
54
51
|
articl: string;
|
|
55
52
|
} | undefined;
|
|
53
|
+
entity_type?: RevisionEntityTypes | undefined;
|
|
54
|
+
last_count?: number | undefined;
|
|
55
|
+
entity_id?: number | null | undefined;
|
|
56
56
|
}>;
|
|
57
57
|
export type ModelRevision = z.infer<typeof RevisionSchema>;
|
|
58
58
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { IzdType } from '../../utils';
|
|
3
|
+
export declare const getStockOrderItemsByEntitySchema: z.ZodObject<{
|
|
4
|
+
entityId: z.ZodNumber;
|
|
5
|
+
entityType: z.ZodNativeEnum<typeof IzdType>;
|
|
6
|
+
childId: z.ZodNumber;
|
|
7
|
+
childType: z.ZodNativeEnum<typeof IzdType>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
entityId: number;
|
|
10
|
+
entityType: IzdType;
|
|
11
|
+
childId: number;
|
|
12
|
+
childType: IzdType;
|
|
13
|
+
}, {
|
|
14
|
+
entityId: number;
|
|
15
|
+
entityType: IzdType;
|
|
16
|
+
childId: number;
|
|
17
|
+
childType: IzdType;
|
|
18
|
+
}>;
|
|
19
|
+
export type GetStockOrderItemsByEntityDto = z.infer<typeof getStockOrderItemsByEntitySchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStockOrderItemsByEntitySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
exports.getStockOrderItemsByEntitySchema = zod_1.z.object({
|
|
7
|
+
entityId: zod_1.z.number().int().positive(),
|
|
8
|
+
entityType: zod_1.z.nativeEnum(utils_1.IzdType),
|
|
9
|
+
childId: zod_1.z.number().int().positive(),
|
|
10
|
+
childType: zod_1.z.nativeEnum(utils_1.IzdType)
|
|
11
|
+
});
|
package/dist/utils/enums.d.ts
CHANGED
package/dist/utils/enums.js
CHANGED
|
@@ -206,6 +206,7 @@ var ModuleIncludeForDocumentEnum;
|
|
|
206
206
|
ModuleIncludeForDocumentEnum["cbed"] = "cbed";
|
|
207
207
|
ModuleIncludeForDocumentEnum["detal"] = "detal";
|
|
208
208
|
ModuleIncludeForDocumentEnum["product"] = "product";
|
|
209
|
+
ModuleIncludeForDocumentEnum["shipments"] = "shipments";
|
|
209
210
|
ModuleIncludeForDocumentEnum["material"] = "material";
|
|
210
211
|
ModuleIncludeForDocumentEnum["waybill"] = "waybill";
|
|
211
212
|
ModuleIncludeForDocumentEnum["instrument"] = "instrument";
|
package/dist/utils/sorting.d.ts
CHANGED
|
@@ -11,7 +11,8 @@ export declare enum ProductionPlanSortField {
|
|
|
11
11
|
warehouseReadinessDate = "warehouseReadinessDate",
|
|
12
12
|
orderedByProduction = "orderedByProduction",
|
|
13
13
|
productionDelay = "productionDelay",
|
|
14
|
-
startTimeDelay = "startTimeDelay"
|
|
14
|
+
startTimeDelay = "startTimeDelay",
|
|
15
|
+
calculatedStartTimeDelay = "calculatedStartTimeDelay"
|
|
15
16
|
}
|
|
16
17
|
export type ProductionPlanSortRule = {
|
|
17
18
|
sortField?: ProductionPlanSortField | null;
|