@esb-market-contracts/backend 1.0.14 → 1.0.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.
- package/api.d.ts +44 -0
- package/package.json +1 -1
- package/types.d.ts +105 -0
package/api.d.ts
CHANGED
|
@@ -290,6 +290,50 @@ declare const countriesRouter: import("hono/hono-base").HonoBase<{
|
|
|
290
290
|
};
|
|
291
291
|
}, "/catalog/countries", "/catalog/countries/update">;
|
|
292
292
|
export type CountriesRouter = typeof countriesRouter;
|
|
293
|
+
declare const auditLogsRouter: import("hono/hono-base").HonoBase<{
|
|
294
|
+
Variables: VariablesWithActor;
|
|
295
|
+
}, {
|
|
296
|
+
"/operations/audit-logs/existing-events": {
|
|
297
|
+
$get: {
|
|
298
|
+
input: {};
|
|
299
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
300
|
+
auditEvents: string[];
|
|
301
|
+
}>;
|
|
302
|
+
outputFormat: "json";
|
|
303
|
+
status: 200;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
} & {
|
|
307
|
+
"/operations/audit-logs/search": {
|
|
308
|
+
$post: {
|
|
309
|
+
input: {
|
|
310
|
+
json: {
|
|
311
|
+
pagination: {
|
|
312
|
+
offset?: unknown;
|
|
313
|
+
limit?: unknown;
|
|
314
|
+
};
|
|
315
|
+
where?: {
|
|
316
|
+
event?: string | undefined;
|
|
317
|
+
actorEmployeeId?: number | null | undefined;
|
|
318
|
+
} | undefined;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
322
|
+
auditLogs: {
|
|
323
|
+
id: number;
|
|
324
|
+
event: string;
|
|
325
|
+
actorEmployeeId: number | null;
|
|
326
|
+
payload: import("drizzle-orm").Json;
|
|
327
|
+
createdAt: Date;
|
|
328
|
+
}[];
|
|
329
|
+
total: number;
|
|
330
|
+
}>;
|
|
331
|
+
outputFormat: "json";
|
|
332
|
+
status: 200;
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
}, "/operations/audit-logs", "/operations/audit-logs/search">;
|
|
336
|
+
export type AuditLogsRouter = typeof auditLogsRouter;
|
|
293
337
|
declare const customersRouter: import("hono/hono-base").HonoBase<{
|
|
294
338
|
Variables: VariablesWithActor;
|
|
295
339
|
}, {
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -219,6 +219,111 @@ export type CountrySearchResult = {
|
|
|
219
219
|
export type CountrySelectOneQuery = z.infer<typeof countrySelectOneQuerySchema>;
|
|
220
220
|
export type CountryCreatePayload = z.infer<typeof countryCreatePayloadSchema>;
|
|
221
221
|
export type CountryUpdatePayload = z.infer<typeof countryUpdatePayloadSchema>;
|
|
222
|
+
declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
|
|
223
|
+
id: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgSerialBuilder>, {
|
|
224
|
+
name: string;
|
|
225
|
+
tableName: "audit_logs";
|
|
226
|
+
dataType: "number int32";
|
|
227
|
+
data: number;
|
|
228
|
+
driverParam: number;
|
|
229
|
+
notNull: true;
|
|
230
|
+
hasDefault: true;
|
|
231
|
+
isPrimaryKey: false;
|
|
232
|
+
isAutoincrement: false;
|
|
233
|
+
hasRuntimeDefault: false;
|
|
234
|
+
enumValues: undefined;
|
|
235
|
+
identity: undefined;
|
|
236
|
+
generated: undefined;
|
|
237
|
+
}>;
|
|
238
|
+
event: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTextBuilder<[
|
|
239
|
+
string,
|
|
240
|
+
...string[]
|
|
241
|
+
]>>, "brand.created" | "brand.updated" | "category.created" | "category.updated" | "category.activated" | "category.archived" | "country.created" | "country.updated" | "customer.created" | "customer.updated">, {
|
|
242
|
+
name: string;
|
|
243
|
+
tableName: "audit_logs";
|
|
244
|
+
dataType: "string";
|
|
245
|
+
data: "brand.created" | "brand.updated" | "category.created" | "category.updated" | "category.activated" | "category.archived" | "country.created" | "country.updated" | "customer.created" | "customer.updated";
|
|
246
|
+
driverParam: string;
|
|
247
|
+
notNull: true;
|
|
248
|
+
hasDefault: false;
|
|
249
|
+
isPrimaryKey: false;
|
|
250
|
+
isAutoincrement: false;
|
|
251
|
+
hasRuntimeDefault: false;
|
|
252
|
+
enumValues: undefined;
|
|
253
|
+
identity: undefined;
|
|
254
|
+
generated: undefined;
|
|
255
|
+
}>;
|
|
256
|
+
actorEmployeeId: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").PgIntegerBuilder, {
|
|
257
|
+
name: string;
|
|
258
|
+
tableName: "audit_logs";
|
|
259
|
+
dataType: "number int32";
|
|
260
|
+
data: number;
|
|
261
|
+
driverParam: string | number;
|
|
262
|
+
notNull: false;
|
|
263
|
+
hasDefault: false;
|
|
264
|
+
isPrimaryKey: false;
|
|
265
|
+
isAutoincrement: false;
|
|
266
|
+
hasRuntimeDefault: false;
|
|
267
|
+
enumValues: undefined;
|
|
268
|
+
identity: undefined;
|
|
269
|
+
generated: undefined;
|
|
270
|
+
}>;
|
|
271
|
+
payload: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgJsonbBuilder>, {
|
|
272
|
+
name: string;
|
|
273
|
+
tableName: "audit_logs";
|
|
274
|
+
dataType: "object json";
|
|
275
|
+
data: unknown;
|
|
276
|
+
driverParam: unknown;
|
|
277
|
+
notNull: true;
|
|
278
|
+
hasDefault: false;
|
|
279
|
+
isPrimaryKey: false;
|
|
280
|
+
isAutoincrement: false;
|
|
281
|
+
hasRuntimeDefault: false;
|
|
282
|
+
enumValues: undefined;
|
|
283
|
+
identity: undefined;
|
|
284
|
+
generated: undefined;
|
|
285
|
+
}>;
|
|
286
|
+
createdAt: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTimestampBuilder>>, {
|
|
287
|
+
name: string;
|
|
288
|
+
tableName: "audit_logs";
|
|
289
|
+
dataType: "object date";
|
|
290
|
+
data: Date;
|
|
291
|
+
driverParam: string;
|
|
292
|
+
notNull: true;
|
|
293
|
+
hasDefault: true;
|
|
294
|
+
isPrimaryKey: false;
|
|
295
|
+
isAutoincrement: false;
|
|
296
|
+
hasRuntimeDefault: false;
|
|
297
|
+
enumValues: undefined;
|
|
298
|
+
identity: undefined;
|
|
299
|
+
generated: undefined;
|
|
300
|
+
}>;
|
|
301
|
+
}, undefined, undefined>;
|
|
302
|
+
export type AuditLog = z.infer<typeof auditLogSchema>;
|
|
303
|
+
declare const auditLogSearchPayloadSchema: z.ZodObject<{
|
|
304
|
+
where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
305
|
+
event: z.ZodOptional<z.ZodString>;
|
|
306
|
+
actorEmployeeId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
307
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
308
|
+
event: string;
|
|
309
|
+
actorEmployeeId?: number | null | undefined;
|
|
310
|
+
} | {
|
|
311
|
+
actorEmployeeId: number | null;
|
|
312
|
+
event?: string | undefined;
|
|
313
|
+
}, {
|
|
314
|
+
event?: string | undefined;
|
|
315
|
+
actorEmployeeId?: number | null | undefined;
|
|
316
|
+
}>>>;
|
|
317
|
+
pagination: z.ZodObject<{
|
|
318
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
319
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
320
|
+
}, z.core.$strip>;
|
|
321
|
+
}, z.core.$strict>;
|
|
322
|
+
export type AuditLogSearchPayload = z.infer<typeof auditLogSearchPayloadSchema>;
|
|
323
|
+
export type AuditLogSearchResult = {
|
|
324
|
+
auditLogs: AuditLog[];
|
|
325
|
+
total: number;
|
|
326
|
+
};
|
|
222
327
|
declare const customerSchema: z.ZodObject<{
|
|
223
328
|
id: z.ZodInt;
|
|
224
329
|
type: z.ZodEnum<{
|