@esb-market-contracts/admin-backend 1.2.9 → 1.2.11
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 +68 -3
- package/package.json +1 -1
- package/types.d.ts +114 -11
package/api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
-
declare const
|
|
3
|
+
declare const authRouter: import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, {
|
|
4
4
|
"/iam/authentication/session": {
|
|
5
5
|
$get: {
|
|
6
6
|
input: {};
|
|
@@ -14,7 +14,6 @@ declare const authenticationRouter: import("hono/hono-base").HonoBase<import("ho
|
|
|
14
14
|
status: "active" | "inactive" | "suspended";
|
|
15
15
|
lastLoginAt: string | null;
|
|
16
16
|
};
|
|
17
|
-
permissions: string[];
|
|
18
17
|
};
|
|
19
18
|
}>;
|
|
20
19
|
outputFormat: "json";
|
|
@@ -49,6 +48,72 @@ declare const authenticationRouter: import("hono/hono-base").HonoBase<import("ho
|
|
|
49
48
|
};
|
|
50
49
|
};
|
|
51
50
|
}, "/iam/authentication", "/iam/authentication/logout">;
|
|
52
|
-
export type
|
|
51
|
+
export type AuthRouter = typeof authRouter;
|
|
52
|
+
declare const employeesRouter: import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, {
|
|
53
|
+
"/iam/employees/table-metadata": {
|
|
54
|
+
$get: {
|
|
55
|
+
input: {};
|
|
56
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
57
|
+
filters: {
|
|
58
|
+
statuses: {
|
|
59
|
+
label: string;
|
|
60
|
+
value: string;
|
|
61
|
+
}[];
|
|
62
|
+
roles: {
|
|
63
|
+
label: string;
|
|
64
|
+
value: string;
|
|
65
|
+
}[];
|
|
66
|
+
};
|
|
67
|
+
sorting: {
|
|
68
|
+
fields: {
|
|
69
|
+
label: string;
|
|
70
|
+
value: string;
|
|
71
|
+
}[];
|
|
72
|
+
default: {
|
|
73
|
+
field: string;
|
|
74
|
+
direction: "desc" | "asc";
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
pagination: {
|
|
78
|
+
defaultLimit: number;
|
|
79
|
+
availableLimits: number[];
|
|
80
|
+
};
|
|
81
|
+
}>;
|
|
82
|
+
outputFormat: "json";
|
|
83
|
+
status: 200;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
} & {
|
|
87
|
+
"/iam/employees": {
|
|
88
|
+
$get: {
|
|
89
|
+
input: {};
|
|
90
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
91
|
+
items: {
|
|
92
|
+
id: number;
|
|
93
|
+
email: string;
|
|
94
|
+
fullName: string;
|
|
95
|
+
status: "active" | "inactive" | "suspended";
|
|
96
|
+
lastLoginAt: string | null;
|
|
97
|
+
updatedAt: string;
|
|
98
|
+
createdAt: string;
|
|
99
|
+
roles: {
|
|
100
|
+
id: number;
|
|
101
|
+
name: string;
|
|
102
|
+
code: string;
|
|
103
|
+
}[];
|
|
104
|
+
}[];
|
|
105
|
+
meta: {
|
|
106
|
+
page: number;
|
|
107
|
+
limit: number;
|
|
108
|
+
total: number;
|
|
109
|
+
totalPages: number;
|
|
110
|
+
};
|
|
111
|
+
}>;
|
|
112
|
+
outputFormat: "json";
|
|
113
|
+
status: 200;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
}, "/iam/employees", "/iam/employees">;
|
|
117
|
+
export type EmployeesRouter = typeof employeesRouter;
|
|
53
118
|
|
|
54
119
|
export {};
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import { SerializeDates } from '@kalutskii/foundation';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
|
-
declare const
|
|
6
|
+
declare const AuthLoginSchema: z.ZodObject<{
|
|
7
7
|
email: z.ZodEmail;
|
|
8
8
|
password: z.ZodString;
|
|
9
9
|
}, z.core.$strict>;
|
|
10
|
-
export type
|
|
11
|
-
declare const
|
|
10
|
+
export type AuthLogin = z.infer<typeof AuthLoginSchema>;
|
|
11
|
+
declare const AuthSessionSchema: z.ZodObject<{
|
|
12
12
|
expiresAt: z.ZodDate;
|
|
13
13
|
user: z.ZodObject<{
|
|
14
14
|
id: z.ZodInt;
|
|
@@ -24,17 +24,120 @@ declare const AuthenticationSessionSchema: z.ZodObject<{
|
|
|
24
24
|
out: {};
|
|
25
25
|
in: {};
|
|
26
26
|
}>;
|
|
27
|
-
permissions: z.ZodArray<z.ZodString>;
|
|
28
27
|
}, {
|
|
29
28
|
out: {};
|
|
30
29
|
in: {};
|
|
31
30
|
}>;
|
|
32
|
-
export type
|
|
33
|
-
export type
|
|
34
|
-
export type
|
|
35
|
-
export type
|
|
36
|
-
export type
|
|
37
|
-
export type
|
|
38
|
-
export type
|
|
31
|
+
export type AuthSession = z.infer<typeof AuthSessionSchema>;
|
|
32
|
+
export type AuthLoginRequest = AuthLogin;
|
|
33
|
+
export type AuthSessionRequest = Record<string, never>;
|
|
34
|
+
export type AuthSessionResponse = SerializeDates<AuthSession>;
|
|
35
|
+
export type AuthClientSession = AuthSession;
|
|
36
|
+
export type AuthLogoutRequest = Record<string, never>;
|
|
37
|
+
export type AuthLogoutResponse = Record<string, never>;
|
|
38
|
+
declare const EmployeeSchema: z.ZodObject<{
|
|
39
|
+
id: z.ZodInt;
|
|
40
|
+
email: z.ZodString;
|
|
41
|
+
fullName: z.ZodString;
|
|
42
|
+
status: z.ZodEnum<{
|
|
43
|
+
active: "active";
|
|
44
|
+
inactive: "inactive";
|
|
45
|
+
suspended: "suspended";
|
|
46
|
+
}>;
|
|
47
|
+
lastLoginAt: z.ZodNullable<z.ZodDate>;
|
|
48
|
+
updatedAt: z.ZodDate;
|
|
49
|
+
createdAt: z.ZodDate;
|
|
50
|
+
roles: z.ZodArray<z.ZodObject<{
|
|
51
|
+
id: z.ZodInt;
|
|
52
|
+
name: z.ZodString;
|
|
53
|
+
code: z.ZodString;
|
|
54
|
+
}, {
|
|
55
|
+
out: {};
|
|
56
|
+
in: {};
|
|
57
|
+
}>>;
|
|
58
|
+
}, {
|
|
59
|
+
out: {};
|
|
60
|
+
in: {};
|
|
61
|
+
}>;
|
|
62
|
+
export type Employee = z.infer<typeof EmployeeSchema>;
|
|
63
|
+
declare const EmployeeListResultSchema: z.ZodObject<{
|
|
64
|
+
items: z.ZodArray<z.ZodObject<{
|
|
65
|
+
id: z.ZodInt;
|
|
66
|
+
email: z.ZodString;
|
|
67
|
+
fullName: z.ZodString;
|
|
68
|
+
status: z.ZodEnum<{
|
|
69
|
+
active: "active";
|
|
70
|
+
inactive: "inactive";
|
|
71
|
+
suspended: "suspended";
|
|
72
|
+
}>;
|
|
73
|
+
lastLoginAt: z.ZodNullable<z.ZodDate>;
|
|
74
|
+
updatedAt: z.ZodDate;
|
|
75
|
+
createdAt: z.ZodDate;
|
|
76
|
+
roles: z.ZodArray<z.ZodObject<{
|
|
77
|
+
id: z.ZodInt;
|
|
78
|
+
name: z.ZodString;
|
|
79
|
+
code: z.ZodString;
|
|
80
|
+
}, {
|
|
81
|
+
out: {};
|
|
82
|
+
in: {};
|
|
83
|
+
}>>;
|
|
84
|
+
}, {
|
|
85
|
+
out: {};
|
|
86
|
+
in: {};
|
|
87
|
+
}>>;
|
|
88
|
+
meta: z.ZodObject<{
|
|
89
|
+
page: z.ZodNumber;
|
|
90
|
+
limit: z.ZodNumber;
|
|
91
|
+
total: z.ZodNumber;
|
|
92
|
+
totalPages: z.ZodNumber;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export type EmployeeListResult = z.infer<typeof EmployeeListResultSchema>;
|
|
96
|
+
declare const EmployeesQuerySchema: z.ZodObject<{
|
|
97
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
98
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown> & z.ZodType<100 | 10 | 20 | 50, unknown, z.core.$ZodTypeInternals<100 | 10 | 20 | 50, unknown>>>;
|
|
99
|
+
sort: z.ZodOptional<z.ZodString>;
|
|
100
|
+
status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
101
|
+
active: "active";
|
|
102
|
+
inactive: "inactive";
|
|
103
|
+
suspended: "suspended";
|
|
104
|
+
}>>>;
|
|
105
|
+
role: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
106
|
+
search: z.ZodOptional<z.ZodString>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
export type EmployeesQuery = z.infer<typeof EmployeesQuerySchema>;
|
|
109
|
+
declare const EmployeesTableMetadataSchema: z.ZodObject<{
|
|
110
|
+
filters: z.ZodObject<{
|
|
111
|
+
statuses: z.ZodArray<z.ZodObject<{
|
|
112
|
+
label: z.ZodString;
|
|
113
|
+
value: z.ZodString;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
roles: z.ZodArray<z.ZodObject<{
|
|
116
|
+
label: z.ZodString;
|
|
117
|
+
value: z.ZodString;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
sorting: z.ZodObject<{
|
|
121
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
122
|
+
label: z.ZodString;
|
|
123
|
+
value: z.ZodString;
|
|
124
|
+
}, z.core.$strip>>;
|
|
125
|
+
default: z.ZodObject<{
|
|
126
|
+
field: z.ZodString;
|
|
127
|
+
direction: z.ZodEnum<{
|
|
128
|
+
asc: "asc";
|
|
129
|
+
desc: "desc";
|
|
130
|
+
}>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
pagination: z.ZodObject<{
|
|
134
|
+
defaultLimit: z.ZodNumber;
|
|
135
|
+
availableLimits: z.ZodArray<z.ZodNumber>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
export type EmployeesTableMetadata = z.infer<typeof EmployeesTableMetadataSchema>;
|
|
139
|
+
export type EmployeesListRequest = EmployeesQuery;
|
|
140
|
+
export type EmployeesListResponse = SerializeDates<EmployeeListResult>;
|
|
141
|
+
export type EmployeesTableMetadataResponse = EmployeesTableMetadata;
|
|
39
142
|
|
|
40
143
|
export {};
|