@esb-market-contracts/admin-backend 1.5.4 → 1.5.6
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 +49 -1
- package/package.json +1 -1
- package/types.d.ts +4 -0
package/api.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
3
5
|
declare const authRouter: import("hono/hono-base").HonoBase<{}, {
|
|
4
6
|
"/iam/authentication/signin": {
|
|
5
7
|
$post: {
|
|
@@ -40,7 +42,53 @@ declare const authRouter: import("hono/hono-base").HonoBase<{}, {
|
|
|
40
42
|
};
|
|
41
43
|
}, "/iam/authentication", "/iam/authentication/refresh">;
|
|
42
44
|
export type AuthRouter = typeof authRouter;
|
|
43
|
-
declare const
|
|
45
|
+
declare const accessTokenPayloadSchema: z.ZodObject<{
|
|
46
|
+
employee: z.ZodObject<{
|
|
47
|
+
id: z.ZodInt;
|
|
48
|
+
email: z.ZodString;
|
|
49
|
+
fullName: z.ZodString;
|
|
50
|
+
}, {
|
|
51
|
+
out: {};
|
|
52
|
+
in: {};
|
|
53
|
+
}>;
|
|
54
|
+
permissions: z.ZodArray<z.ZodEnum<{
|
|
55
|
+
"employee.create": "employee.create";
|
|
56
|
+
"employee.read": "employee.read";
|
|
57
|
+
"employee.update": "employee.update";
|
|
58
|
+
}>>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export type AccessTokenPayload = z.infer<typeof accessTokenPayloadSchema>;
|
|
61
|
+
/** Variables available in the context after successful Bearer authentication. */
|
|
62
|
+
export type VariablesWithActor = {
|
|
63
|
+
actor: AccessTokenPayload;
|
|
64
|
+
};
|
|
65
|
+
declare const managementRouter: import("hono/hono-base").HonoBase<{
|
|
66
|
+
Variables: VariablesWithActor;
|
|
67
|
+
} & {
|
|
68
|
+
Variables: VariablesWithActor;
|
|
69
|
+
}, {
|
|
70
|
+
"/iam/management/employee": {
|
|
71
|
+
$get: {
|
|
72
|
+
input: {
|
|
73
|
+
query: {
|
|
74
|
+
id: string | string[];
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
78
|
+
safeEmployee: {
|
|
79
|
+
id: number;
|
|
80
|
+
email: string;
|
|
81
|
+
fullName: string;
|
|
82
|
+
status: "active" | "suspended";
|
|
83
|
+
updatedAt: string | null;
|
|
84
|
+
createdAt: string;
|
|
85
|
+
};
|
|
86
|
+
}>;
|
|
87
|
+
outputFormat: "json";
|
|
88
|
+
status: 200;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
} & {
|
|
44
92
|
"/iam/management/employees": {
|
|
45
93
|
$get: {
|
|
46
94
|
input: {};
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -24,6 +24,9 @@ declare const accessTokenPayloadSchema: z.ZodObject<{
|
|
|
24
24
|
}, z.core.$strip>;
|
|
25
25
|
export type AuthorizeRequest = z.infer<typeof authorizeRequestSchema>;
|
|
26
26
|
export type AccessTokenPayload = z.infer<typeof accessTokenPayloadSchema>;
|
|
27
|
+
declare const getEmployeeRequestSchema: z.ZodObject<{
|
|
28
|
+
id: z.ZodPreprocess<z.ZodNumber>;
|
|
29
|
+
}, z.core.$strip>;
|
|
27
30
|
declare const createEmployeeRequestSchema: z.ZodObject<{
|
|
28
31
|
email: z.ZodEmail;
|
|
29
32
|
fullName: z.ZodString;
|
|
@@ -34,6 +37,7 @@ declare const createEmployeeRequestSchema: z.ZodObject<{
|
|
|
34
37
|
"employee.update": "employee.update";
|
|
35
38
|
}>>;
|
|
36
39
|
}, z.core.$strip>;
|
|
40
|
+
export type GetEmployeeRequest = z.infer<typeof getEmployeeRequestSchema>;
|
|
37
41
|
export type CreateEmployeeRequest = z.infer<typeof createEmployeeRequestSchema>;
|
|
38
42
|
|
|
39
43
|
export {};
|