@solidstarters/solid-core 1.2.175 → 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.175",
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" })
package/src/index.ts CHANGED
@@ -170,6 +170,7 @@ export * from './helpers/field-crud-managers/UUIDFieldCrudManager' //rename
170
170
  export * from './helpers/environment.helper'
171
171
  export * from './helpers/cors.helper'
172
172
  export * from './helpers/security.helper'
173
+ export * from './helpers/model-metadata-helper.service'
173
174
 
174
175
  export * from './services/crud.service'
175
176
  export * from './interceptors/logging.interceptor'
@@ -280,6 +281,7 @@ export * from './repository/solid-base.repository'
280
281
  export * from './repository/security-rule.repository'
281
282
  export * from './repository/field.repository'
282
283
  export * from './repository/chatter-message.repository'
284
+ export * from './repository/chatter-message-details.repository'
283
285
 
284
286
 
285
287
  //softDeleteAwareEventSubscriber.subscriber.ts
@@ -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;
@@ -645,8 +645,9 @@ import { ViewMetadataSubsciber } from './subscribers/view-metadata.subscriber';
645
645
 
646
646
  ],
647
647
  exports: [
648
- ModuleMetadataService,
649
648
  ModelMetadataService,
649
+ ModelMetadataHelperService,
650
+ ModuleMetadataService,
650
651
  FieldMetadataService,
651
652
  MediaStorageProviderMetadataService,
652
653
  MediaService,
@@ -689,6 +690,11 @@ import { ViewMetadataSubsciber } from './subscribers/view-metadata.subscriber';
689
690
  MailFactory,
690
691
  PollerService,
691
692
  AiInteractionService,
693
+ ChatterMessageService,
694
+ ChatterMessageRepository,
695
+ ChatterMessageDetailsService,
696
+ ChatterMessageDetailsRepository,
697
+ TypeOrmModule
692
698
  // ThrottlerModule,
693
699
  ],
694
700
  })