@solidstarters/solid-core 1.2.176 → 1.2.177

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidstarters/solid-core",
3
- "version": "1.2.176",
3
+ "version": "1.2.177",
4
4
  "description": "This module is a NestJS module containing all the required core providers required by a Solid application",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,7 +11,7 @@ export class CreateChatterMessageDto {
11
11
  @IsString()
12
12
  @ApiProperty()
13
13
  messageSubType: string;
14
- @IsNotEmpty()
14
+ @IsOptional()
15
15
  @IsString()
16
16
  @ApiProperty()
17
17
  messageBody: string;
@@ -10,7 +10,7 @@ export class ChatterMessage extends CommonEntity {
10
10
  messageType: string; // audit | custom
11
11
  @Column({ type: "varchar" })
12
12
  messageSubType: string; // audit_update | audit_insert | audit_delete | custom
13
- @Column({ type: "text" })
13
+ @Column({ type: "text", nullable: true })
14
14
  messageBody: string;
15
15
  @Index()
16
16
  @Column({ type: "integer" })
@@ -3757,7 +3757,7 @@
3757
3757
  "displayName": "Message Body",
3758
3758
  "type": "longText",
3759
3759
  "ormType": "text",
3760
- "required": true,
3760
+ "required": false,
3761
3761
  "unique": false,
3762
3762
  "index": false,
3763
3763
  "private": false,
@@ -492,7 +492,7 @@ export class ChatterMessageService extends CRUDService<ChatterMessage> {
492
492
  entityName: string,
493
493
  query: any
494
494
  ) {
495
- const { limit = 25, offset = 0, sort, populate = [] } = query;
495
+ const { limit = 25, offset = 0, sort, populate = [], populateMedia = [] } = query;
496
496
 
497
497
  const model = await this.modelMetadataRepo.findOne({
498
498
  where: {
@@ -571,6 +571,11 @@ export class ChatterMessageService extends CRUDService<ChatterMessage> {
571
571
 
572
572
  const [entities, count] = await qb.getManyAndCount();
573
573
 
574
+ if (populateMedia && populateMedia.length > 0) {
575
+ const normalizedPopulateMedia = this.crudHelperService.normalize(populateMedia);
576
+ await this['handlePopulateMedia'](normalizedPopulateMedia, entities);
577
+ }
578
+
574
579
  const currentPage = Math.floor(offset / limit) + 1;
575
580
  const totalPages = Math.ceil(count / limit);
576
581
  const nextPage = currentPage < totalPages ? currentPage + 1 : null;
@@ -693,7 +693,8 @@ import { ViewMetadataSubsciber } from './subscribers/view-metadata.subscriber';
693
693
  ChatterMessageService,
694
694
  ChatterMessageRepository,
695
695
  ChatterMessageDetailsService,
696
- ChatterMessageDetailsRepository
696
+ ChatterMessageDetailsRepository,
697
+ TypeOrmModule
697
698
  // ThrottlerModule,
698
699
  ],
699
700
  })