@esb-market-contracts/admin-backend 1.8.16 → 1.8.18

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/api.d.ts CHANGED
@@ -153,7 +153,23 @@ declare const managementRouter: import("hono/hono-base").HonoBase<{
153
153
  status: 200;
154
154
  };
155
155
  };
156
- }, "/iam/management", "/iam/management/employees/update-password">;
156
+ } & {
157
+ "/iam/management/employees/update-grants": {
158
+ $post: {
159
+ input: {
160
+ json: {
161
+ employeeId: number;
162
+ grants: ("employee.create" | "employee.read" | "employee.update")[];
163
+ };
164
+ };
165
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
166
+ [x: string]: never;
167
+ }>;
168
+ outputFormat: "json";
169
+ status: 200;
170
+ };
171
+ };
172
+ }, "/iam/management", "/iam/management/employees/update-grants">;
157
173
  export type ManagementRouter = typeof managementRouter;
158
174
 
159
175
  export {};
package/enums.d.ts CHANGED
@@ -5,13 +5,20 @@ declare const grantsArray: readonly [
5
5
  "employee.read",
6
6
  "employee.update"
7
7
  ];
8
- declare const grantsRecord: Record<"EMPLOYEE_CREATE" | "EMPLOYEE_READ" | "EMPLOYEE_UPDATE", "employee.create" | "employee.read" | "employee.update">;
8
+ declare const grantsRecord: Readonly<{
9
+ EMPLOYEE_CREATE: "employee.create";
10
+ EMPLOYEE_READ: "employee.read";
11
+ EMPLOYEE_UPDATE: "employee.update";
12
+ }>;
9
13
  export type Grant = (typeof grantsArray)[number];
10
14
  declare const employeeStatusesArray: readonly [
11
15
  "active",
12
16
  "suspended"
13
17
  ];
14
- declare const employeeStatusesRecord: Record<"ACTIVE" | "SUSPENDED", "active" | "suspended">;
18
+ declare const employeeStatusesRecord: Readonly<{
19
+ ACTIVE: "active";
20
+ SUSPENDED: "suspended";
21
+ }>;
15
22
  export type EmployeeStatus = (typeof employeeStatusesArray)[number];
16
23
 
17
24
  export {
package/enums.js CHANGED
@@ -3,7 +3,7 @@ import z from "zod";
3
3
 
4
4
  // src/utilities/enums.utilities.ts
5
5
  function createStringEnumRecord(values) {
6
- return Object.fromEntries(values.map((v) => [v.replace(/\./g, "_").toUpperCase(), v]));
6
+ return Object.freeze(Object.fromEntries(values.map((value) => [value.replace(/\./g, "_").toUpperCase(), value])));
7
7
  }
8
8
 
9
9
  // src/app/domain/(iam)/permissions/permissions.enums.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@esb-market-contracts/admin-backend",
3
3
  "description": "Shared TypeScript contract definitions for admin-backend.",
4
- "version": "1.8.16",
4
+ "version": "1.8.18",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,