@esb-market-contracts/admin-backend 1.8.13 → 1.8.15

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 (3) hide show
  1. package/api.d.ts +17 -1
  2. package/package.json +1 -1
  3. package/types.d.ts +22 -0
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
- }, "/iam/management", "/iam/management/employees/create">;
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/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.13",
4
+ "version": "1.8.15",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -64,8 +64,30 @@ declare const employeeCreatePayloadSchema: z.ZodObject<{
64
64
  "employee.update": "employee.update";
65
65
  }>>;
66
66
  }, z.core.$strict>;
67
+ declare const employeeSwitchStatusPayloadSchema: z.ZodObject<{
68
+ employeeId: z.ZodInt;
69
+ status: z.ZodEnum<{
70
+ active: "active";
71
+ suspended: "suspended";
72
+ }>;
73
+ }, z.core.$strict>;
74
+ declare const employeeUpdatePasswordPayloadSchema: z.ZodObject<{
75
+ employeeId: z.ZodInt;
76
+ password: z.ZodString;
77
+ }, z.core.$strict>;
78
+ declare const employeeUpdateGrantsPayloadSchema: z.ZodObject<{
79
+ employeeId: z.ZodInt;
80
+ grants: z.ZodArray<z.ZodEnum<{
81
+ "employee.create": "employee.create";
82
+ "employee.read": "employee.read";
83
+ "employee.update": "employee.update";
84
+ }>>;
85
+ }, z.core.$strict>;
67
86
  export type EmployeeSafe = z.infer<typeof employeeSafeSchema>;
68
87
  export type EmployeeFindManyQuery = z.infer<typeof employeeFindManyQuerySchema>;
69
88
  export type EmployeeCreatePayload = z.infer<typeof employeeCreatePayloadSchema>;
89
+ export type EmployeeSwitchStatusPayload = z.infer<typeof employeeSwitchStatusPayloadSchema>;
90
+ export type EmployeeUpdatePasswordPayload = z.infer<typeof employeeUpdatePasswordPayloadSchema>;
91
+ export type EmployeeUpdateGrantsPayload = z.infer<typeof employeeUpdateGrantsPayloadSchema>;
70
92
 
71
93
  export {};