From 2aad7e0bc69acb6379813e6beb7a2aaad161fdee Mon Sep 17 00:00:00 2001 From: Sunny Tyagi <107617248+Tyagi-Sunny@users.noreply.github.com> Date: Wed, 3 Apr 2024 11:10:27 +0530 Subject: [PATCH] fix(mixin): refactor user interface (#108) refactor user interface gh-107 --- src/__tests__/unit/audit.mixin.unit.ts | 2 -- src/types.ts | 15 +++++---------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/__tests__/unit/audit.mixin.unit.ts b/src/__tests__/unit/audit.mixin.unit.ts index e28533e..a256acf 100644 --- a/src/__tests__/unit/audit.mixin.unit.ts +++ b/src/__tests__/unit/audit.mixin.unit.ts @@ -53,8 +53,6 @@ const mockOpts: IAuditMixinOptions = { const mockUser: User = { id: 'testCurrentUserId', username: 'testCurrentUserName', - authClientId: 123, - permissions: ['1', '2', '3'], role: 'admin', firstName: 'test', lastName: 'lastname', diff --git a/src/types.ts b/src/types.ts index 8097dfd..744cbc4 100644 --- a/src/types.ts +++ b/src/types.ts @@ -66,21 +66,16 @@ export type AuditMixinBase = MixinBaseClass<{ }>; export interface User { - id?: string; - username: string; - password?: string; + id?: string | number; + username?: string; identifier?: ID; - permissions: string[]; - authClientId: number; email?: string; - role: string; - firstName: string; - lastName: string; + role?: string; + firstName?: string; + lastName?: string; middleName?: string; tenantId?: TID; userTenantId?: UTID; - passwordExpiryTime?: Date; - allowedResources?: string[]; } export type ActorId = Extract;