@dynamatix/gb-schemas 2.0.44 → 2.0.46

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.
@@ -4,6 +4,7 @@ export declare class RoleGroupEntity {
4
4
  groupId: number;
5
5
  name: string;
6
6
  description?: string;
7
+ roleIds?: string[];
7
8
  createdAt: Date;
8
9
  updatedAt: Date;
9
10
  roles?: RoleEntity[];
@@ -1 +1 @@
1
- {"version":3,"file":"role-group.entity.d.ts","sourceRoot":"","sources":["../../../entities/users/role-group.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,eAAe;IACxB,EAAE,EAAG,MAAM,CAAC;IACZ,OAAO,EAAG,MAAM,CAAC;IACjB,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;gBAET,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC;CAGhD"}
1
+ {"version":3,"file":"role-group.entity.d.ts","sourceRoot":"","sources":["../../../entities/users/role-group.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,eAAe;IACxB,EAAE,EAAG,MAAM,CAAC;IACZ,OAAO,EAAG,MAAM,CAAC;IACjB,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;gBAET,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC;CAGhD"}
@@ -5,6 +5,8 @@ export declare class RoleEntity {
5
5
  roleId: number;
6
6
  name: string;
7
7
  description?: string;
8
+ roleIds?: string[];
9
+ permissionIds?: string[];
8
10
  createdAt: Date;
9
11
  updatedAt: Date;
10
12
  permissions?: PermissionEntity[];
@@ -1 +1 @@
1
- {"version":3,"file":"role.entity.d.ts","sourceRoot":"","sources":["../../../entities/users/role.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,qBAAa,UAAU;IACnB,EAAE,EAAG,MAAM,CAAC;IACZ,MAAM,EAAG,MAAM,CAAC;IAChB,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACjC,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;gBAEnB,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC;CAG3C"}
1
+ {"version":3,"file":"role.entity.d.ts","sourceRoot":"","sources":["../../../entities/users/role.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,qBAAa,UAAU;IACnB,EAAE,EAAG,MAAM,CAAC;IACZ,MAAM,EAAG,MAAM,CAAC;IAChB,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACjC,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;gBAEnB,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC;CAG3C"}
@@ -6,14 +6,16 @@ export declare class UserEntity {
6
6
  email: string;
7
7
  fullName: string;
8
8
  organisationId?: string;
9
- status: string;
9
+ status: number;
10
+ externalData?: string;
10
11
  modifiedOn?: Date;
11
- modifiedById?: string;
12
+ modifiedById?: number;
12
13
  createdOnInApprivo?: Date;
13
- createdById?: string;
14
+ createdById?: number;
14
15
  deletedOn?: Date;
15
- deletedById?: string;
16
+ deletedById?: number;
16
17
  token?: string;
18
+ groupIds?: string[];
17
19
  createdAt: Date;
18
20
  updatedAt: Date;
19
21
  groups?: RoleGroupEntity[];
@@ -1 +1 @@
1
- {"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../../entities/users/user.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,qBAAa,UAAU;IACnB,EAAE,EAAG,MAAM,CAAC;IACZ,SAAS,EAAG,MAAM,CAAC;IACnB,KAAK,EAAG,MAAM,CAAC;IACf,QAAQ,EAAG,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAG,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,uBAAuB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAClD,uBAAuB,CAAC,EAAE,qBAAqB,EAAE,CAAC;gBAEtC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC;CAG3C"}
1
+ {"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../../entities/users/user.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,qBAAa,UAAU;IACnB,EAAE,EAAG,MAAM,CAAC;IACZ,SAAS,EAAG,MAAM,CAAC;IACnB,KAAK,EAAG,MAAM,CAAC;IACf,QAAQ,EAAG,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAG,MAAM,CAAC;IAChB,YAAY,CAAC,EAAC,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,uBAAuB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAClD,uBAAuB,CAAC,EAAE,qBAAqB,EAAE,CAAC;gBAEtC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC;CAG3C"}
@@ -5,6 +5,7 @@ export class RoleGroupEntity {
5
5
  groupId!: number;
6
6
  name!: string;
7
7
  description?: string;
8
+ roleIds?: string[];
8
9
  createdAt!: Date;
9
10
  updatedAt!: Date;
10
11
 
@@ -6,6 +6,8 @@ export class RoleEntity {
6
6
  roleId!: number;
7
7
  name!: string;
8
8
  description?: string;
9
+ roleIds?: string[];
10
+ permissionIds?: string[];
9
11
  createdAt!: Date;
10
12
  updatedAt!: Date;
11
13
 
@@ -6,14 +6,16 @@ export class UserEntity {
6
6
  email!: string;
7
7
  fullName!: string;
8
8
  organisationId?: string;
9
- status!: string;
9
+ status!: number;
10
+ externalData?:string;
10
11
  modifiedOn?: Date;
11
- modifiedById?: string;
12
+ modifiedById?: number;
12
13
  createdOnInApprivo?: Date;
13
- createdById?: string;
14
+ createdById?: number;
14
15
  deletedOn?: Date;
15
- deletedById?: string;
16
+ deletedById?: number;
16
17
  token?: string;
18
+ groupIds?: string[];
17
19
  createdAt!: Date;
18
20
  updatedAt!: Date;
19
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "2.0.44",
3
+ "version": "2.0.46",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,18 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - The `modified_by_id` column on the `users` table would be dropped and recreated. This will lead to data loss if there is data in the column.
5
+ - The `created_by_id` column on the `users` table would be dropped and recreated. This will lead to data loss if there is data in the column.
6
+ - The `deleted_by_id` column on the `users` table would be dropped and recreated. This will lead to data loss if there is data in the column.
7
+ - Changed the type of `status` on the `users` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
8
+
9
+ */
10
+ -- AlterTable
11
+ ALTER TABLE "users" DROP COLUMN "status",
12
+ ADD COLUMN "status" INTEGER NOT NULL,
13
+ DROP COLUMN "modified_by_id",
14
+ ADD COLUMN "modified_by_id" INTEGER,
15
+ DROP COLUMN "created_by_id",
16
+ ADD COLUMN "created_by_id" INTEGER,
17
+ DROP COLUMN "deleted_by_id",
18
+ ADD COLUMN "deleted_by_id" INTEGER;
@@ -0,0 +1,9 @@
1
+ -- AlterTable
2
+ ALTER TABLE "role_groups" ADD COLUMN "role_ids" TEXT[];
3
+
4
+ -- AlterTable
5
+ ALTER TABLE "roles" ADD COLUMN "permission_ids" TEXT[];
6
+
7
+ -- AlterTable
8
+ ALTER TABLE "users" ADD COLUMN "external_data" TEXT,
9
+ ADD COLUMN "group_ids" TEXT[];
@@ -318,6 +318,7 @@ model RoleGroup {
318
318
  groupId Int @unique @map("group_id")
319
319
  name String @map("name")
320
320
  description String? @map("description")
321
+ roleIds String[] @map("role_ids")
321
322
  createdAt DateTime @default(now()) @map("created_at")
322
323
  updatedAt DateTime @updatedAt @map("updated_at")
323
324
 
@@ -330,12 +331,13 @@ model RoleGroup {
330
331
 
331
332
  // From prisma/users/role.prisma
332
333
  model Role {
333
- id String @id @default(uuid())
334
- roleId Int @unique @map("role_id")
335
- name String
336
- description String?
337
- createdAt DateTime @default(now()) @map("created_at")
338
- updatedAt DateTime @updatedAt @map("updated_at")
334
+ id String @id @default(uuid())
335
+ roleId Int @unique @map("role_id")
336
+ name String
337
+ description String?
338
+ permissionIds String[] @map("permission_ids")
339
+ createdAt DateTime @default(now()) @map("created_at")
340
+ updatedAt DateTime @updatedAt @map("updated_at")
339
341
 
340
342
  // Relations
341
343
  permissions Permission[]
@@ -351,14 +353,16 @@ model User {
351
353
  email String @unique
352
354
  fullName String @map("full_name")
353
355
  organisationId String? @map("organisation_id")
354
- status String
356
+ status Int
357
+ externalData String? @map("external_data")
355
358
  modifiedOn DateTime? @map("modified_on")
356
- modifiedById String? @map("modified_by_id")
359
+ modifiedById Int? @map("modified_by_id")
357
360
  createdOnInApprivo DateTime? @map("created_on_in_apprivo")
358
- createdById String? @map("created_by_id")
361
+ createdById Int? @map("created_by_id")
359
362
  deletedOn DateTime? @map("deleted_on")
360
- deletedById String? @map("deleted_by_id")
363
+ deletedById Int? @map("deleted_by_id")
361
364
  token String?
365
+ groupIds String[] @map("group_ids")
362
366
  createdAt DateTime @default(now()) @map("created_at")
363
367
  updatedAt DateTime @updatedAt @map("updated_at")
364
368
 
@@ -3,6 +3,7 @@ model RoleGroup {
3
3
  groupId Int @unique @map("group_id")
4
4
  name String @map("name")
5
5
  description String? @map("description")
6
+ roleIds String[] @map("role_ids")
6
7
  createdAt DateTime @default(now()) @map("created_at")
7
8
  updatedAt DateTime @updatedAt @map("updated_at")
8
9
 
@@ -1,10 +1,11 @@
1
1
  model Role {
2
- id String @id @default(uuid())
3
- roleId Int @unique @map("role_id")
4
- name String
5
- description String?
6
- createdAt DateTime @default(now()) @map("created_at")
7
- updatedAt DateTime @updatedAt @map("updated_at")
2
+ id String @id @default(uuid())
3
+ roleId Int @unique @map("role_id")
4
+ name String
5
+ description String?
6
+ permissionIds String[] @map("permission_ids")
7
+ createdAt DateTime @default(now()) @map("created_at")
8
+ updatedAt DateTime @updatedAt @map("updated_at")
8
9
 
9
10
  // Relations
10
11
  permissions Permission[]
@@ -4,14 +4,16 @@ model User {
4
4
  email String @unique
5
5
  fullName String @map("full_name")
6
6
  organisationId String? @map("organisation_id")
7
- status String
7
+ status Int
8
+ externalData String? @map("external_data")
8
9
  modifiedOn DateTime? @map("modified_on")
9
- modifiedById String? @map("modified_by_id")
10
+ modifiedById Int? @map("modified_by_id")
10
11
  createdOnInApprivo DateTime? @map("created_on_in_apprivo")
11
- createdById String? @map("created_by_id")
12
+ createdById Int? @map("created_by_id")
12
13
  deletedOn DateTime? @map("deleted_on")
13
- deletedById String? @map("deleted_by_id")
14
+ deletedById Int? @map("deleted_by_id")
14
15
  token String?
16
+ groupIds String[] @map("group_ids")
15
17
  createdAt DateTime @default(now()) @map("created_at")
16
18
  updatedAt DateTime @updatedAt @map("updated_at")
17
19
 
@@ -25,4 +27,4 @@ model User {
25
27
  underwriters Underwriter[] @relation("UserUnderwriters")
26
28
 
27
29
  @@map("users")
28
- }
30
+ }