@esb-market-contracts/admin-backend 1.8.27 → 1.8.29
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 +71 -73
- package/package.json +1 -1
- package/types.d.ts +32 -17
package/api.d.ts
CHANGED
|
@@ -11,9 +11,7 @@ declare const authRouter: import("hono/hono-base").HonoBase<{}, {
|
|
|
11
11
|
password: string;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<
|
|
15
|
-
[x: string]: never;
|
|
16
|
-
}>;
|
|
14
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
17
15
|
outputFormat: "json";
|
|
18
16
|
status: 200;
|
|
19
17
|
};
|
|
@@ -33,9 +31,7 @@ declare const authRouter: import("hono/hono-base").HonoBase<{}, {
|
|
|
33
31
|
"/iam/authentication/logout": {
|
|
34
32
|
$post: {
|
|
35
33
|
input: {};
|
|
36
|
-
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<
|
|
37
|
-
[x: string]: never;
|
|
38
|
-
}>;
|
|
34
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
39
35
|
outputFormat: "json";
|
|
40
36
|
status: 200;
|
|
41
37
|
};
|
|
@@ -78,12 +74,28 @@ declare const managementRouter: import("hono/hono-base").HonoBase<{
|
|
|
78
74
|
$get: {
|
|
79
75
|
input: {};
|
|
80
76
|
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
81
|
-
grants:
|
|
77
|
+
grants: ("employee.create" | "employee.read" | "employee.update" | "inventory.create" | "inventory.read" | "inventory.update" | "inventory.write_off")[];
|
|
82
78
|
}>;
|
|
83
79
|
outputFormat: "json";
|
|
84
80
|
status: 200;
|
|
85
81
|
};
|
|
86
82
|
};
|
|
83
|
+
} & {
|
|
84
|
+
"/iam/management/employees/create": {
|
|
85
|
+
$post: {
|
|
86
|
+
input: {
|
|
87
|
+
json: {
|
|
88
|
+
email: string;
|
|
89
|
+
fullName: string;
|
|
90
|
+
password: string;
|
|
91
|
+
grants: ("employee.create" | "employee.read" | "employee.update" | "inventory.create" | "inventory.read" | "inventory.update" | "inventory.write_off")[];
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
95
|
+
outputFormat: "json";
|
|
96
|
+
status: 201;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
87
99
|
} & {
|
|
88
100
|
"/iam/management/employees/search": {
|
|
89
101
|
$post: {
|
|
@@ -96,37 +108,19 @@ declare const managementRouter: import("hono/hono-base").HonoBase<{
|
|
|
96
108
|
};
|
|
97
109
|
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
98
110
|
employees: {
|
|
99
|
-
id:
|
|
100
|
-
status:
|
|
101
|
-
updatedAt:
|
|
102
|
-
createdAt:
|
|
111
|
+
id: number;
|
|
112
|
+
status: "active" | "suspended";
|
|
113
|
+
updatedAt: Date | null;
|
|
114
|
+
createdAt: Date;
|
|
103
115
|
email: string;
|
|
104
116
|
fullName: string;
|
|
105
|
-
grants:
|
|
117
|
+
grants: ("employee.create" | "employee.read" | "employee.update" | "inventory.create" | "inventory.read" | "inventory.update" | "inventory.write_off")[];
|
|
106
118
|
}[];
|
|
107
119
|
}>;
|
|
108
120
|
outputFormat: "json";
|
|
109
121
|
status: 200;
|
|
110
122
|
};
|
|
111
123
|
};
|
|
112
|
-
} & {
|
|
113
|
-
"/iam/management/employees/create": {
|
|
114
|
-
$post: {
|
|
115
|
-
input: {
|
|
116
|
-
json: {
|
|
117
|
-
email: string;
|
|
118
|
-
fullName: string;
|
|
119
|
-
password: string;
|
|
120
|
-
grants: ("employee.create" | "employee.read" | "employee.update" | "inventory.create" | "inventory.read" | "inventory.update" | "inventory.write_off")[];
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
124
|
-
[x: string]: never;
|
|
125
|
-
}>;
|
|
126
|
-
outputFormat: "json";
|
|
127
|
-
status: 201;
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
124
|
} & {
|
|
131
125
|
"/iam/management/employees/switch-status": {
|
|
132
126
|
$post: {
|
|
@@ -136,9 +130,7 @@ declare const managementRouter: import("hono/hono-base").HonoBase<{
|
|
|
136
130
|
status: "active" | "suspended";
|
|
137
131
|
};
|
|
138
132
|
};
|
|
139
|
-
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<
|
|
140
|
-
[x: string]: never;
|
|
141
|
-
}>;
|
|
133
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
142
134
|
outputFormat: "json";
|
|
143
135
|
status: 200;
|
|
144
136
|
};
|
|
@@ -152,9 +144,7 @@ declare const managementRouter: import("hono/hono-base").HonoBase<{
|
|
|
152
144
|
password: string;
|
|
153
145
|
};
|
|
154
146
|
};
|
|
155
|
-
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<
|
|
156
|
-
[x: string]: never;
|
|
157
|
-
}>;
|
|
147
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
158
148
|
outputFormat: "json";
|
|
159
149
|
status: 200;
|
|
160
150
|
};
|
|
@@ -168,9 +158,7 @@ declare const managementRouter: import("hono/hono-base").HonoBase<{
|
|
|
168
158
|
grants: ("employee.create" | "employee.read" | "employee.update" | "inventory.create" | "inventory.read" | "inventory.update" | "inventory.write_off")[];
|
|
169
159
|
};
|
|
170
160
|
};
|
|
171
|
-
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<
|
|
172
|
-
[x: string]: never;
|
|
173
|
-
}>;
|
|
161
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
174
162
|
outputFormat: "json";
|
|
175
163
|
status: 200;
|
|
176
164
|
};
|
|
@@ -184,27 +172,45 @@ declare const assetsRouter: import("hono/hono-base").HonoBase<{
|
|
|
184
172
|
$get: {
|
|
185
173
|
input: {
|
|
186
174
|
query: {
|
|
187
|
-
|
|
175
|
+
id: string | string[];
|
|
176
|
+
assetCode?: string | undefined;
|
|
177
|
+
} | {
|
|
178
|
+
assetCode: string | string[];
|
|
179
|
+
id?: number | undefined;
|
|
188
180
|
};
|
|
189
181
|
};
|
|
190
182
|
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
191
183
|
asset: {
|
|
192
|
-
id:
|
|
184
|
+
id: number;
|
|
193
185
|
name: string;
|
|
194
186
|
assetCode: string;
|
|
195
187
|
serialNumber: string | null;
|
|
196
188
|
notes: string | null;
|
|
197
|
-
status:
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
createdAt: string;
|
|
189
|
+
status: "active" | "written_off";
|
|
190
|
+
writtenOffAt: Date | null;
|
|
191
|
+
updatedAt: Date | null;
|
|
192
|
+
createdAt: Date;
|
|
202
193
|
};
|
|
203
194
|
}>;
|
|
204
195
|
outputFormat: "json";
|
|
205
196
|
status: 200;
|
|
206
197
|
};
|
|
207
198
|
};
|
|
199
|
+
} & {
|
|
200
|
+
"/backoffice/assets/create": {
|
|
201
|
+
$post: {
|
|
202
|
+
input: {
|
|
203
|
+
json: {
|
|
204
|
+
name: string;
|
|
205
|
+
serialNumber?: string | null | undefined;
|
|
206
|
+
notes?: string | null | undefined;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
210
|
+
outputFormat: "json";
|
|
211
|
+
status: 201;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
208
214
|
} & {
|
|
209
215
|
"/backoffice/assets/search": {
|
|
210
216
|
$post: {
|
|
@@ -222,38 +228,36 @@ declare const assetsRouter: import("hono/hono-base").HonoBase<{
|
|
|
222
228
|
};
|
|
223
229
|
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
224
230
|
assets: {
|
|
225
|
-
id:
|
|
231
|
+
id: number;
|
|
226
232
|
name: string;
|
|
227
233
|
assetCode: string;
|
|
228
234
|
serialNumber: string | null;
|
|
229
235
|
notes: string | null;
|
|
230
|
-
status:
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
createdAt: string;
|
|
236
|
+
status: "active" | "written_off";
|
|
237
|
+
writtenOffAt: Date | null;
|
|
238
|
+
updatedAt: Date | null;
|
|
239
|
+
createdAt: Date;
|
|
235
240
|
}[];
|
|
236
|
-
total:
|
|
241
|
+
total: number;
|
|
237
242
|
}>;
|
|
238
243
|
outputFormat: "json";
|
|
239
244
|
status: 200;
|
|
240
245
|
};
|
|
241
246
|
};
|
|
242
247
|
} & {
|
|
243
|
-
"/backoffice/assets/
|
|
248
|
+
"/backoffice/assets/update-metadata": {
|
|
244
249
|
$post: {
|
|
245
250
|
input: {
|
|
246
251
|
json: {
|
|
247
252
|
name: string;
|
|
248
|
-
serialNumber
|
|
249
|
-
notes
|
|
253
|
+
serialNumber: string | null;
|
|
254
|
+
notes: string | null;
|
|
255
|
+
assetId: number;
|
|
250
256
|
};
|
|
251
257
|
};
|
|
252
|
-
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<
|
|
253
|
-
[x: string]: never;
|
|
254
|
-
}>;
|
|
258
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
255
259
|
outputFormat: "json";
|
|
256
|
-
status:
|
|
260
|
+
status: 200;
|
|
257
261
|
};
|
|
258
262
|
};
|
|
259
263
|
} & {
|
|
@@ -262,35 +266,29 @@ declare const assetsRouter: import("hono/hono-base").HonoBase<{
|
|
|
262
266
|
input: {
|
|
263
267
|
json: {
|
|
264
268
|
assetId: number;
|
|
265
|
-
writeOffReason: string;
|
|
266
269
|
};
|
|
267
270
|
};
|
|
268
|
-
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<
|
|
269
|
-
[x: string]: never;
|
|
270
|
-
}>;
|
|
271
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
271
272
|
outputFormat: "json";
|
|
272
273
|
status: 200;
|
|
273
274
|
};
|
|
274
275
|
};
|
|
275
276
|
} & {
|
|
276
|
-
"/backoffice/assets/
|
|
277
|
+
"/backoffice/assets/bulk-write-off": {
|
|
277
278
|
$post: {
|
|
278
279
|
input: {
|
|
279
280
|
json: {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
assetId: number;
|
|
281
|
+
assets: {
|
|
282
|
+
assetId: number;
|
|
283
|
+
}[];
|
|
284
284
|
};
|
|
285
285
|
};
|
|
286
|
-
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<
|
|
287
|
-
[x: string]: never;
|
|
288
|
-
}>;
|
|
286
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
289
287
|
outputFormat: "json";
|
|
290
288
|
status: 200;
|
|
291
289
|
};
|
|
292
290
|
};
|
|
293
|
-
}, "/backoffice/assets", "/backoffice/assets/
|
|
291
|
+
}, "/backoffice/assets", "/backoffice/assets/bulk-write-off">;
|
|
294
292
|
export type AssetsRouter = typeof assetsRouter;
|
|
295
293
|
|
|
296
294
|
export {};
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
+
import z from 'zod';
|
|
3
4
|
import { z } from 'zod';
|
|
4
5
|
|
|
5
6
|
declare const signinPayloadSchema: z.ZodObject<{
|
|
@@ -110,7 +111,7 @@ export type EmployeeCreatePayload = z.infer<typeof employeeCreatePayloadSchema>;
|
|
|
110
111
|
export type EmployeeSwitchStatusPayload = z.infer<typeof employeeSwitchStatusPayloadSchema>;
|
|
111
112
|
export type EmployeeUpdatePasswordPayload = z.infer<typeof employeeUpdatePasswordPayloadSchema>;
|
|
112
113
|
export type EmployeeUpdateGrantsPayload = z.infer<typeof employeeUpdateGrantsPayloadSchema>;
|
|
113
|
-
declare const
|
|
114
|
+
declare const assetSchema: z.ZodObject<{
|
|
114
115
|
id: z.ZodInt;
|
|
115
116
|
name: z.ZodString;
|
|
116
117
|
assetCode: z.ZodString;
|
|
@@ -120,22 +121,19 @@ declare const assetDTOSchema: z.ZodObject<{
|
|
|
120
121
|
active: "active";
|
|
121
122
|
written_off: "written_off";
|
|
122
123
|
}>;
|
|
123
|
-
writeOffReason: z.ZodNullable<z.ZodString>;
|
|
124
124
|
writtenOffAt: z.ZodNullable<z.ZodDate>;
|
|
125
125
|
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
126
126
|
createdAt: z.ZodDate;
|
|
127
127
|
}, z.core.$strip>;
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}, z.core.$strict>;
|
|
131
|
-
declare const assetSearchPayloadSchema: z.ZodObject<{
|
|
128
|
+
export type Asset = z.infer<typeof assetSchema>;
|
|
129
|
+
declare const assetSearchOptionsSchema: z.ZodObject<{
|
|
132
130
|
query: z.ZodOptional<z.ZodString>;
|
|
133
131
|
where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
134
132
|
status: z.ZodOptional<z.ZodEnum<{
|
|
135
133
|
active: "active";
|
|
136
134
|
written_off: "written_off";
|
|
137
135
|
}>>;
|
|
138
|
-
}, z.core.$
|
|
136
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
139
137
|
status: "active" | "written_off";
|
|
140
138
|
}, {
|
|
141
139
|
status?: "active" | "written_off" | undefined;
|
|
@@ -145,30 +143,47 @@ declare const assetSearchPayloadSchema: z.ZodObject<{
|
|
|
145
143
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
146
144
|
}, z.core.$strip>;
|
|
147
145
|
}, z.core.$strict>;
|
|
146
|
+
declare const assetSelectOneQuerySchema: z.ZodPipe<z.ZodObject<{
|
|
147
|
+
id: z.ZodOptional<z.ZodInt>;
|
|
148
|
+
assetCode: z.ZodOptional<z.ZodString>;
|
|
149
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
150
|
+
id: number;
|
|
151
|
+
assetCode?: string | undefined;
|
|
152
|
+
} | {
|
|
153
|
+
assetCode: string;
|
|
154
|
+
id?: number | undefined;
|
|
155
|
+
}, {
|
|
156
|
+
id?: number | undefined;
|
|
157
|
+
assetCode?: string | undefined;
|
|
158
|
+
}>>;
|
|
148
159
|
declare const assetCreatePayloadSchema: z.ZodObject<{
|
|
149
160
|
name: z.ZodString;
|
|
150
161
|
serialNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
151
162
|
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
152
163
|
}, z.core.$strict>;
|
|
153
|
-
declare const
|
|
154
|
-
assetId: z.ZodInt;
|
|
155
|
-
writeOffReason: z.ZodString;
|
|
156
|
-
}, z.core.$strict>;
|
|
157
|
-
declare const assetUpdateMetadataPayloadSchema: z.ZodObject<{
|
|
164
|
+
declare const assetUpdatePayloadSchema: z.ZodObject<{
|
|
158
165
|
name: z.ZodString;
|
|
159
166
|
serialNumber: z.ZodNullable<z.ZodString>;
|
|
160
167
|
notes: z.ZodNullable<z.ZodString>;
|
|
161
168
|
assetId: z.ZodInt;
|
|
162
169
|
}, z.core.$strict>;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
170
|
+
declare const assetWriteOffPayloadSchema: z.ZodObject<{
|
|
171
|
+
assetId: z.ZodInt;
|
|
172
|
+
}, z.core.$strict>;
|
|
173
|
+
declare const assetBulkWriteOffPayloadSchema: z.ZodObject<{
|
|
174
|
+
assets: z.ZodArray<z.ZodObject<{
|
|
175
|
+
assetId: z.ZodInt;
|
|
176
|
+
}, z.core.$strict>>;
|
|
177
|
+
}, z.core.$strict>;
|
|
178
|
+
export type AssetSearchOptions = z.infer<typeof assetSearchOptionsSchema>;
|
|
179
|
+
export type AssetSelectOneQuery = z.infer<typeof assetSelectOneQuerySchema>;
|
|
166
180
|
export type AssetSearchResult = {
|
|
167
|
-
assets:
|
|
181
|
+
assets: Asset[];
|
|
168
182
|
total: number;
|
|
169
183
|
};
|
|
170
184
|
export type AssetCreatePayload = z.infer<typeof assetCreatePayloadSchema>;
|
|
185
|
+
export type AssetUpdatePayload = z.infer<typeof assetUpdatePayloadSchema>;
|
|
171
186
|
export type AssetWriteOffPayload = z.infer<typeof assetWriteOffPayloadSchema>;
|
|
172
|
-
export type
|
|
187
|
+
export type AssetBulkWriteOffPayload = z.infer<typeof assetBulkWriteOffPayloadSchema>;
|
|
173
188
|
|
|
174
189
|
export {};
|