@esb-market-contracts/admin-backend 1.8.28 → 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 +46 -30
- package/package.json +1 -1
- package/types.d.ts +32 -17
package/api.d.ts
CHANGED
|
@@ -80,6 +80,22 @@ declare const managementRouter: import("hono/hono-base").HonoBase<{
|
|
|
80
80
|
status: 200;
|
|
81
81
|
};
|
|
82
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
|
+
};
|
|
83
99
|
} & {
|
|
84
100
|
"/iam/management/employees/search": {
|
|
85
101
|
$post: {
|
|
@@ -105,22 +121,6 @@ declare const managementRouter: import("hono/hono-base").HonoBase<{
|
|
|
105
121
|
status: 200;
|
|
106
122
|
};
|
|
107
123
|
};
|
|
108
|
-
} & {
|
|
109
|
-
"/iam/management/employees/create": {
|
|
110
|
-
$post: {
|
|
111
|
-
input: {
|
|
112
|
-
json: {
|
|
113
|
-
email: string;
|
|
114
|
-
fullName: string;
|
|
115
|
-
password: string;
|
|
116
|
-
grants: ("employee.create" | "employee.read" | "employee.update" | "inventory.create" | "inventory.read" | "inventory.update" | "inventory.write_off")[];
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
120
|
-
outputFormat: "json";
|
|
121
|
-
status: 201;
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
124
|
} & {
|
|
125
125
|
"/iam/management/employees/switch-status": {
|
|
126
126
|
$post: {
|
|
@@ -172,7 +172,11 @@ declare const assetsRouter: import("hono/hono-base").HonoBase<{
|
|
|
172
172
|
$get: {
|
|
173
173
|
input: {
|
|
174
174
|
query: {
|
|
175
|
-
|
|
175
|
+
id: string | string[];
|
|
176
|
+
assetCode?: string | undefined;
|
|
177
|
+
} | {
|
|
178
|
+
assetCode: string | string[];
|
|
179
|
+
id?: number | undefined;
|
|
176
180
|
};
|
|
177
181
|
};
|
|
178
182
|
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
@@ -183,7 +187,6 @@ declare const assetsRouter: import("hono/hono-base").HonoBase<{
|
|
|
183
187
|
serialNumber: string | null;
|
|
184
188
|
notes: string | null;
|
|
185
189
|
status: "active" | "written_off";
|
|
186
|
-
writeOffReason: string | null;
|
|
187
190
|
writtenOffAt: Date | null;
|
|
188
191
|
updatedAt: Date | null;
|
|
189
192
|
createdAt: Date;
|
|
@@ -193,6 +196,21 @@ declare const assetsRouter: import("hono/hono-base").HonoBase<{
|
|
|
193
196
|
status: 200;
|
|
194
197
|
};
|
|
195
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
|
+
};
|
|
196
214
|
} & {
|
|
197
215
|
"/backoffice/assets/search": {
|
|
198
216
|
$post: {
|
|
@@ -216,7 +234,6 @@ declare const assetsRouter: import("hono/hono-base").HonoBase<{
|
|
|
216
234
|
serialNumber: string | null;
|
|
217
235
|
notes: string | null;
|
|
218
236
|
status: "active" | "written_off";
|
|
219
|
-
writeOffReason: string | null;
|
|
220
237
|
writtenOffAt: Date | null;
|
|
221
238
|
updatedAt: Date | null;
|
|
222
239
|
createdAt: Date;
|
|
@@ -228,18 +245,19 @@ declare const assetsRouter: import("hono/hono-base").HonoBase<{
|
|
|
228
245
|
};
|
|
229
246
|
};
|
|
230
247
|
} & {
|
|
231
|
-
"/backoffice/assets/
|
|
248
|
+
"/backoffice/assets/update-metadata": {
|
|
232
249
|
$post: {
|
|
233
250
|
input: {
|
|
234
251
|
json: {
|
|
235
252
|
name: string;
|
|
236
|
-
serialNumber
|
|
237
|
-
notes
|
|
253
|
+
serialNumber: string | null;
|
|
254
|
+
notes: string | null;
|
|
255
|
+
assetId: number;
|
|
238
256
|
};
|
|
239
257
|
};
|
|
240
258
|
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
241
259
|
outputFormat: "json";
|
|
242
|
-
status:
|
|
260
|
+
status: 200;
|
|
243
261
|
};
|
|
244
262
|
};
|
|
245
263
|
} & {
|
|
@@ -248,7 +266,6 @@ declare const assetsRouter: import("hono/hono-base").HonoBase<{
|
|
|
248
266
|
input: {
|
|
249
267
|
json: {
|
|
250
268
|
assetId: number;
|
|
251
|
-
writeOffReason: string;
|
|
252
269
|
};
|
|
253
270
|
};
|
|
254
271
|
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
@@ -257,14 +274,13 @@ declare const assetsRouter: import("hono/hono-base").HonoBase<{
|
|
|
257
274
|
};
|
|
258
275
|
};
|
|
259
276
|
} & {
|
|
260
|
-
"/backoffice/assets/
|
|
277
|
+
"/backoffice/assets/bulk-write-off": {
|
|
261
278
|
$post: {
|
|
262
279
|
input: {
|
|
263
280
|
json: {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
assetId: number;
|
|
281
|
+
assets: {
|
|
282
|
+
assetId: number;
|
|
283
|
+
}[];
|
|
268
284
|
};
|
|
269
285
|
};
|
|
270
286
|
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
@@ -272,7 +288,7 @@ declare const assetsRouter: import("hono/hono-base").HonoBase<{
|
|
|
272
288
|
status: 200;
|
|
273
289
|
};
|
|
274
290
|
};
|
|
275
|
-
}, "/backoffice/assets", "/backoffice/assets/
|
|
291
|
+
}, "/backoffice/assets", "/backoffice/assets/bulk-write-off">;
|
|
276
292
|
export type AssetsRouter = typeof assetsRouter;
|
|
277
293
|
|
|
278
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 {};
|