rez_core 5.0.141 → 5.0.144

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": "rez_core",
3
- "version": "5.0.141",
3
+ "version": "5.0.144",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -13,10 +13,10 @@ export class BullConfigService implements SharedBullConfigurationFactory {
13
13
  createSharedConfiguration(): BullModuleOptions {
14
14
  return {
15
15
  redis: {
16
- host: this.configService.get<string>('REDIS_HOST', '43.205.35.45'),
17
- port: this.configService.get<number>('REDIS_PORT', 6379),
18
- password: this.configService.get<string>('REDIS_PASSWORD','Rezolut123'),
19
- db: this.configService.get<number>('REDIS_DB', 0),
16
+ host: '43.205.35.45',
17
+ port: 6379,
18
+ password: 'Rezolut123',
19
+ db: 0,
20
20
  // Enable offline queue to handle Redis disconnections
21
21
  enableOfflineQueue: true,
22
22
  // Retry strategy for Redis connection
@@ -127,11 +127,14 @@ export class SavedFilterRepositoryService {
127
127
  },
128
128
  });
129
129
 
130
- return filters.map((filter) => ({
131
- label: filter.name,
132
- value: filter.id,
133
- code: filter.code,
134
- }));
130
+ return filters;
131
+
132
+ // return filters.map((filter) => ({
133
+ // label: filter.name,
134
+ // value: filter.id,
135
+ // code: filter.code,
136
+
137
+ // }));
135
138
  }
136
139
 
137
140
  async getFilterById(id: number): Promise<
@@ -159,8 +162,6 @@ export class SavedFilterRepositoryService {
159
162
  filter_entity_name: detail.filter_entity_name,
160
163
  filter_entity_type: detail.filter_entity_type,
161
164
  datasource_list: detail.datasource_list,
162
- is_shared: saveFilterMasterData.is_shared,
163
- is_editable: saveFilterMasterData.is_editable,
164
165
  filter_value:
165
166
  detail.data_type === 'multiselect'
166
167
  ? detail.filter_value?.trim() === ''
@@ -3,6 +3,8 @@ import { GenericMessageDto, IntegrationService } from './integration.service';
3
3
  import { IcsMeetingService } from 'src/module/ics/service/ics.service';
4
4
  import { LoggingService } from 'src/utils/service/loggingUtil.service';
5
5
  import { ReflectionHelper } from '../../../utils/service/reflection-helper.service';
6
+ import { MediaDataService } from 'src/module/meta/service/media-data.service';
7
+ import axios from 'axios';
6
8
 
7
9
  @Injectable()
8
10
  export class WrapperService {
@@ -13,6 +15,7 @@ export class WrapperService {
13
15
  private readonly icsService: IcsMeetingService,
14
16
  private readonly loggingService: LoggingService,
15
17
  private readonly reflectionHelper: ReflectionHelper,
18
+ private readonly mediaService: MediaDataService,
16
19
  ) {}
17
20
 
18
21
  /**
@@ -405,6 +408,40 @@ export class WrapperService {
405
408
  [],
406
409
  );
407
410
 
411
+ // attachments: [1, 2, 3, 4]
412
+
413
+ if (entity.attachments && entity.attachments.length > 0) {
414
+ mailPayload.attachments = [];
415
+
416
+ for (const attachmentId of entity.attachments) {
417
+ // Step 1: Download or get media file
418
+ const url = await this.mediaService.getMediaDownloadUrl(
419
+ attachmentId,
420
+ {},
421
+ 60000,
422
+ );
423
+
424
+ if (!url?.signedUrl) continue;
425
+
426
+ // Step 2: Fetch file content
427
+ const response = await axios.get(url.signedUrl, {
428
+ responseType: 'arraybuffer',
429
+ });
430
+
431
+ // Step 3: Convert to base64
432
+ const base64Content = Buffer.from(response.data).toString('base64');
433
+
434
+ // Step 4: Push formatted attachment
435
+ mailPayload.attachments.push({
436
+ content: base64Content,
437
+ type:
438
+ response.headers['content-type'] || 'application/octet-stream',
439
+ filename: `attachment-${attachmentId}`,
440
+ disposition: 'attachment',
441
+ });
442
+ }
443
+ }
444
+
408
445
  // Step 5️⃣ Send via Integration Service
409
446
  const result =
410
447
  await this.integrationService.sendGenericMessage(mailPayload);
@@ -6,5 +6,6 @@ export class EntityTableDto extends EntityTable {
6
6
  operation_list: {};
7
7
  default_filter: {} | null;
8
8
  saved_filter: { label: string; value: number }[] | null;
9
- shared_filter: { label: string; value: number }[] | null;
9
+ // shared_filter: { label: string; value: number }[] | null;
10
+ shared_filter: any[] | null;
10
11
  }
@@ -129,6 +129,17 @@ export class MediaDataService extends EntityServiceImpl {
129
129
  jpg: 'image/jpeg',
130
130
  jpeg: 'image/jpeg',
131
131
  png: 'image/png',
132
+ gif: 'image/gif',
133
+ webp: 'image/webp',
134
+ txt: 'text/plain',
135
+ html: 'text/html',
136
+ htm: 'text/html',
137
+ doc: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
138
+ docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
139
+ xls: 'application/vnd.ms-excel',
140
+ xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
141
+ ppt: 'application/vnd.ms-powerpoint',
142
+ pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
132
143
  };
133
144
  return map[ext] || 'application/octet-stream';
134
145
  }