@esb-market-contracts/admin-backend 1.8.12 → 1.8.14
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 +17 -1
- package/enums.d.ts +7 -0
- package/enums.js +7 -0
- package/package.json +1 -1
package/api.d.ts
CHANGED
|
@@ -121,7 +121,23 @@ declare const managementRouter: import("hono/hono-base").HonoBase<{
|
|
|
121
121
|
status: 201;
|
|
122
122
|
};
|
|
123
123
|
};
|
|
124
|
-
}
|
|
124
|
+
} & {
|
|
125
|
+
"/iam/management/employees/switch-status": {
|
|
126
|
+
$post: {
|
|
127
|
+
input: {
|
|
128
|
+
json: {
|
|
129
|
+
employeeId: number;
|
|
130
|
+
status: "active" | "suspended";
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
134
|
+
[x: string]: never;
|
|
135
|
+
}>;
|
|
136
|
+
outputFormat: "json";
|
|
137
|
+
status: 200;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
}, "/iam/management", "/iam/management/employees/switch-status">;
|
|
125
141
|
export type ManagementRouter = typeof managementRouter;
|
|
126
142
|
|
|
127
143
|
export {};
|
package/enums.d.ts
CHANGED
|
@@ -7,8 +7,15 @@ declare const grantsArray: readonly [
|
|
|
7
7
|
];
|
|
8
8
|
declare const grantsRecord: Record<"EMPLOYEE_CREATE" | "EMPLOYEE_READ" | "EMPLOYEE_UPDATE", "employee.create" | "employee.read" | "employee.update">;
|
|
9
9
|
export type Grant = (typeof grantsArray)[number];
|
|
10
|
+
declare const employeeStatusesArray: readonly [
|
|
11
|
+
"active",
|
|
12
|
+
"suspended"
|
|
13
|
+
];
|
|
14
|
+
declare const employeeStatusesRecord: Record<"ACTIVE" | "SUSPENDED", "active" | "suspended">;
|
|
15
|
+
export type EmployeeStatus = (typeof employeeStatusesArray)[number];
|
|
10
16
|
|
|
11
17
|
export {
|
|
18
|
+
employeeStatusesRecord as employeeStatus,
|
|
12
19
|
grantsRecord as grants,
|
|
13
20
|
};
|
|
14
21
|
|
package/enums.js
CHANGED
|
@@ -10,6 +10,13 @@ function createStringEnumRecord(values) {
|
|
|
10
10
|
var grantsArray = ["employee.create", "employee.read", "employee.update"];
|
|
11
11
|
var grantsZodArray = z.array(z.enum(grantsArray));
|
|
12
12
|
var grantsRecord = createStringEnumRecord(grantsArray);
|
|
13
|
+
|
|
14
|
+
// src/app/domain/(iam)/employees/employees.enums.ts
|
|
15
|
+
import { pgEnum } from "drizzle-orm/pg-core";
|
|
16
|
+
var employeeStatusesArray = ["active", "suspended"];
|
|
17
|
+
var employeeStatusPGEnum = pgEnum("employee_status", employeeStatusesArray);
|
|
18
|
+
var employeeStatusesRecord = createStringEnumRecord(employeeStatusesArray);
|
|
13
19
|
export {
|
|
20
|
+
employeeStatusesRecord as employeeStatus,
|
|
14
21
|
grantsRecord as grants
|
|
15
22
|
};
|
package/package.json
CHANGED