av6-core 1.2.2 → 1.2.3
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/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -428,14 +428,14 @@ declare class NotificationEmitter {
|
|
|
428
428
|
notifyNow(shortCode: string, body: Omit<EmitPayload, "shortCode">): Promise<void>;
|
|
429
429
|
}
|
|
430
430
|
|
|
431
|
-
interface AuditContext {
|
|
431
|
+
interface AuditContext<Module extends string = "OPD" | "PROCEDURE" | "GENERAL_BILL" | "PHARMACY" | "LAB" | "IPD"> {
|
|
432
432
|
userId: number | null;
|
|
433
433
|
traceId: string | null;
|
|
434
434
|
level1Id: number | null;
|
|
435
435
|
level2Id: number | null;
|
|
436
|
-
module:
|
|
436
|
+
module: Module;
|
|
437
437
|
}
|
|
438
|
-
type AuditContextProvider = () => AuditContext
|
|
438
|
+
type AuditContextProvider<Module extends string = "OPD" | "PROCEDURE" | "GENERAL_BILL" | "PHARMACY" | "LAB" | "IPD"> = () => AuditContext<Module>;
|
|
439
439
|
interface AuditLogPayload {
|
|
440
440
|
message: string;
|
|
441
441
|
type?: "INFO" | "CREATE" | "UPDATE" | "DELETE" | "ERROR";
|
|
@@ -444,12 +444,12 @@ interface AuditLogPayload {
|
|
|
444
444
|
extra?: Record<string, any>;
|
|
445
445
|
}
|
|
446
446
|
|
|
447
|
-
declare class AuditCore {
|
|
447
|
+
declare class AuditCore<Module extends string = "OPD" | "PROCEDURE" | "GENERAL_BILL" | "PHARMACY" | "LAB" | "IPD"> {
|
|
448
448
|
private prisma;
|
|
449
449
|
private contextProvider;
|
|
450
|
-
constructor(prisma: PrismaClient, contextProvider: AuditContextProvider);
|
|
450
|
+
constructor(prisma: PrismaClient, contextProvider: AuditContextProvider<Module>);
|
|
451
451
|
getPrisma(): PrismaClient;
|
|
452
|
-
getContext(): AuditContext
|
|
452
|
+
getContext(): AuditContext<Module>;
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
declare class AuditLogger {
|
package/dist/index.d.ts
CHANGED
|
@@ -428,14 +428,14 @@ declare class NotificationEmitter {
|
|
|
428
428
|
notifyNow(shortCode: string, body: Omit<EmitPayload, "shortCode">): Promise<void>;
|
|
429
429
|
}
|
|
430
430
|
|
|
431
|
-
interface AuditContext {
|
|
431
|
+
interface AuditContext<Module extends string = "OPD" | "PROCEDURE" | "GENERAL_BILL" | "PHARMACY" | "LAB" | "IPD"> {
|
|
432
432
|
userId: number | null;
|
|
433
433
|
traceId: string | null;
|
|
434
434
|
level1Id: number | null;
|
|
435
435
|
level2Id: number | null;
|
|
436
|
-
module:
|
|
436
|
+
module: Module;
|
|
437
437
|
}
|
|
438
|
-
type AuditContextProvider = () => AuditContext
|
|
438
|
+
type AuditContextProvider<Module extends string = "OPD" | "PROCEDURE" | "GENERAL_BILL" | "PHARMACY" | "LAB" | "IPD"> = () => AuditContext<Module>;
|
|
439
439
|
interface AuditLogPayload {
|
|
440
440
|
message: string;
|
|
441
441
|
type?: "INFO" | "CREATE" | "UPDATE" | "DELETE" | "ERROR";
|
|
@@ -444,12 +444,12 @@ interface AuditLogPayload {
|
|
|
444
444
|
extra?: Record<string, any>;
|
|
445
445
|
}
|
|
446
446
|
|
|
447
|
-
declare class AuditCore {
|
|
447
|
+
declare class AuditCore<Module extends string = "OPD" | "PROCEDURE" | "GENERAL_BILL" | "PHARMACY" | "LAB" | "IPD"> {
|
|
448
448
|
private prisma;
|
|
449
449
|
private contextProvider;
|
|
450
|
-
constructor(prisma: PrismaClient, contextProvider: AuditContextProvider);
|
|
450
|
+
constructor(prisma: PrismaClient, contextProvider: AuditContextProvider<Module>);
|
|
451
451
|
getPrisma(): PrismaClient;
|
|
452
|
-
getContext(): AuditContext
|
|
452
|
+
getContext(): AuditContext<Module>;
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
declare class AuditLogger {
|