@servicelabsco/slabs-access-manager 0.1.220 → 0.1.222
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/dist/access/dtos/email.message.normalized.dto.d.ts +3 -1
- package/dist/access/dtos/email.message.normalized.dto.js +4 -0
- package/dist/access/dtos/email.message.normalized.dto.js.map +1 -1
- package/dist/access/enums/custom.column.type.enum.d.ts +2 -1
- package/dist/access/enums/custom.column.type.enum.js +1 -0
- package/dist/access/enums/custom.column.type.enum.js.map +1 -1
- package/dist/access/es6.classes.d.ts +3 -3
- package/dist/access/jobs/evaluate.email.rule.job.d.ts +3 -2
- package/dist/access/jobs/evaluate.email.rule.job.js +5 -3
- package/dist/access/jobs/evaluate.email.rule.job.js.map +1 -1
- package/dist/access/libraries/evaluate.email.rule.d.ts +5 -2
- package/dist/access/libraries/evaluate.email.rule.js +15 -6
- package/dist/access/libraries/evaluate.email.rule.js.map +1 -1
- package/dist/access/libraries/process.custom.field.creation.d.ts +1 -0
- package/dist/access/libraries/process.custom.field.creation.js +15 -0
- package/dist/access/libraries/process.custom.field.creation.js.map +1 -1
- package/dist/access/libraries/validate.custom.field.data.d.ts +1 -0
- package/dist/access/libraries/validate.custom.field.data.js +6 -0
- package/dist/access/libraries/validate.custom.field.data.js.map +1 -1
- package/dist/access/services/custom.field.service.d.ts +1 -0
- package/dist/access/services/custom.field.service.js +25 -1
- package/dist/access/services/custom.field.service.js.map +1 -1
- package/dist/app.controller.d.ts +5 -2
- package/dist/app.controller.js +19 -4
- package/dist/app.controller.js.map +1 -1
- package/dist/migrations/1681369386555-AddCustomColumnTypesDataSeederTable.js +3 -3
- package/dist/migrations/1681369386555-AddCustomColumnTypesDataSeederTable.js.map +1 -1
- package/dist/migrations/1738120370552-CustomPasswordFieldDataSeederTable.d.ts +5 -0
- package/dist/migrations/1738120370552-CustomPasswordFieldDataSeederTable.js +21 -0
- package/dist/migrations/1738120370552-CustomPasswordFieldDataSeederTable.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { EmailMessageEntity } from '../entities/email.message.entity';
|
|
2
|
+
import { EmailAttachmentEntity } from '../entities/email.attachment.entity';
|
|
2
3
|
export declare class EmailMessageNormalizedDto {
|
|
4
|
+
id?: number;
|
|
3
5
|
from?: string;
|
|
4
6
|
to?: string[];
|
|
5
7
|
cc?: string[];
|
|
6
8
|
bcc?: string[];
|
|
7
9
|
subject?: string;
|
|
8
10
|
body?: string;
|
|
9
|
-
attachments?:
|
|
11
|
+
attachments?: EmailAttachmentEntity[];
|
|
10
12
|
message?: EmailMessageEntity;
|
|
11
13
|
alias?: string;
|
|
12
14
|
}
|
|
@@ -15,6 +15,10 @@ const email_message_entity_1 = require("../entities/email.message.entity");
|
|
|
15
15
|
class EmailMessageNormalizedDto {
|
|
16
16
|
}
|
|
17
17
|
exports.EmailMessageNormalizedDto = EmailMessageNormalizedDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_transformer_1.Expose)(),
|
|
20
|
+
__metadata("design:type", Number)
|
|
21
|
+
], EmailMessageNormalizedDto.prototype, "id", void 0);
|
|
18
22
|
__decorate([
|
|
19
23
|
(0, class_transformer_1.Expose)(),
|
|
20
24
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.message.normalized.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/email.message.normalized.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,2EAAsE;
|
|
1
|
+
{"version":3,"file":"email.message.normalized.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/email.message.normalized.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,2EAAsE;AAGtE,MAAa,yBAAyB;CA8BrC;AA9BD,8DA8BC;AA5BG;IADC,IAAA,0BAAM,GAAE;;qDACG;AAGZ;IADC,IAAA,0BAAM,GAAE;;uDACK;AAGd;IADC,IAAA,0BAAM,GAAE;;qDACK;AAGd;IADC,IAAA,0BAAM,GAAE;;qDACK;AAGd;IADC,IAAA,0BAAM,GAAE;;sDACM;AAGf;IADC,IAAA,0BAAM,GAAE;;0DACQ;AAGjB;IADC,IAAA,0BAAM,GAAE;;uDACK;AAGd;IADC,IAAA,0BAAM,GAAE;;8DAC6B;AAGtC;IADC,IAAA,0BAAM,GAAE;8BACC,yCAAkB;0DAAC;AAG7B;IADC,IAAA,0BAAM,GAAE;;wDACM"}
|
|
@@ -13,5 +13,6 @@ var CustomColumnTypeEnum;
|
|
|
13
13
|
CustomColumnTypeEnum[CustomColumnTypeEnum["DATE_RANGE"] = 5055] = "DATE_RANGE";
|
|
14
14
|
CustomColumnTypeEnum[CustomColumnTypeEnum["YEAR_MONTH"] = 5056] = "YEAR_MONTH";
|
|
15
15
|
CustomColumnTypeEnum[CustomColumnTypeEnum["YEAR_MONTH_RANGE"] = 5057] = "YEAR_MONTH_RANGE";
|
|
16
|
+
CustomColumnTypeEnum[CustomColumnTypeEnum["ENCRYPT"] = 5058] = "ENCRYPT";
|
|
16
17
|
})(CustomColumnTypeEnum || (exports.CustomColumnTypeEnum = CustomColumnTypeEnum = {}));
|
|
17
18
|
//# sourceMappingURL=custom.column.type.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom.column.type.enum.js","sourceRoot":"","sources":["../../../src/access/enums/custom.column.type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"custom.column.type.enum.js","sourceRoot":"","sources":["../../../src/access/enums/custom.column.type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAYX;AAZD,WAAY,oBAAoB;IAC5B,kEAAW,CAAA;IACX,0EAAe,CAAA;IACf,kEAAW,CAAA;IACX,0EAAe,CAAA;IACf,wEAAc,CAAA;IACd,sEAAa,CAAA;IACb,8EAAiB,CAAA;IACjB,8EAAiB,CAAA;IACjB,8EAAiB,CAAA;IACjB,0FAAuB,CAAA;IACvB,wEAAc,CAAA;AAClB,CAAC,EAZW,oBAAoB,oCAApB,oBAAoB,QAY/B"}
|
|
@@ -382,11 +382,11 @@ import { WhitelistedWhatsappNumberSubscriber } from './subscribers/whitelisted.w
|
|
|
382
382
|
declare const es6Classes: {
|
|
383
383
|
commands: (typeof WebhookPollCommand)[];
|
|
384
384
|
controllers: (typeof AccessMenuController | typeof ApiAccountController | typeof BulkUploadController | typeof BulkUploadItemController | typeof BusinessAppIntegrationController | typeof BusinessNotificationChannelPreferenceController | typeof BusinessPreferenceController | typeof BusinessUserGroupController | typeof BusinessUserNotificationPreferenceController | typeof BusinessWebhookController | typeof ChoiceListController | typeof ChoiceTypeController | typeof CommonWebhookController | typeof CustomFieldController | typeof DashboardBuilderController | typeof DashboardComponentController | typeof DashboardController | typeof DashboardReportController | typeof DeveloperModeController | typeof DownloadLogController | typeof EmailRuleController | typeof FcmTokenController | typeof GroupMemberController | typeof GroupRoleController | typeof ListingController | typeof ListingPreferenceController | typeof ScheduledReportController | typeof ScheduledReportItemController | typeof TagController | typeof UserNotificationController | typeof UserPreferenceController)[];
|
|
385
|
-
dtos: (typeof FcmTemplateAttributesDto | typeof NotificationPayloadDto | typeof SendEmailNotificationDataDto | typeof GchatPostingPayloadDto | typeof BoardCastInternalStatusMessageDto | typeof SendWhatsappMessagePayloadDto | typeof AddShortUrlDto | typeof BankAccountPayloadDto | typeof RecurringDefinitionDto | typeof SendWebhookRequestPayload | typeof AccessBusinessParamDto | typeof DateRangeFilterDto | typeof DateFilterDto | typeof ListResponseFormatDto | typeof NumberRangeFilterDto | typeof CommonListFilterDto | typeof DbFindDto | typeof ListResponseDto | typeof AddListingPreferenceDto | typeof ProcessCommonListConfigDto | typeof AddIntegrationPreferenceDto | typeof AddBusinessPreferenceDto | typeof AddBusinessUserNotificationPreferenceDto | typeof AddWebhookDto | typeof ModifyCustomFieldStatusDto | typeof GetScriptValuesDto | typeof AddDashboardComponentPropertiesDto | typeof AddDashboardComponentDto | typeof StringSearchDto | typeof EditQueryDto | typeof TokenPayloadDto | typeof AddGroupMemberDto | typeof AddRoleDto | typeof AddScheduledReportDto | typeof AddBusinessAppIntegrationDto | typeof AddConversationDto | typeof AddTagDto | typeof BusinessAppIntegrationMessagePayloadDto | typeof
|
|
385
|
+
dtos: (typeof FcmTemplateAttributesDto | typeof NotificationPayloadDto | typeof SendEmailNotificationDataDto | typeof GchatPostingPayloadDto | typeof BoardCastInternalStatusMessageDto | typeof SendWhatsappMessagePayloadDto | typeof AddShortUrlDto | typeof BankAccountPayloadDto | typeof RecurringDefinitionDto | typeof EmailMessageNormalizedDto | typeof SendWebhookRequestPayload | typeof AccessBusinessParamDto | typeof DateRangeFilterDto | typeof DateFilterDto | typeof ListResponseFormatDto | typeof NumberRangeFilterDto | typeof CommonListFilterDto | typeof DbFindDto | typeof ListResponseDto | typeof AddListingPreferenceDto | typeof ProcessCommonListConfigDto | typeof AddIntegrationPreferenceDto | typeof AddBusinessPreferenceDto | typeof AddBusinessUserNotificationPreferenceDto | typeof AddWebhookDto | typeof ModifyCustomFieldStatusDto | typeof GetScriptValuesDto | typeof AddDashboardComponentPropertiesDto | typeof AddDashboardComponentDto | typeof StringSearchDto | typeof EditQueryDto | typeof TokenPayloadDto | typeof AddGroupMemberDto | typeof AddRoleDto | typeof AddScheduledReportDto | typeof AddBusinessAppIntegrationDto | typeof AddConversationDto | typeof AddTagDto | typeof BusinessAppIntegrationMessagePayloadDto | typeof ProcessListingPayloadDto | typeof RequestLogOptionsDto | typeof ServerEmailRecipientsDto | typeof ServerEmailMessageDto | typeof SlackMessageDataDto)[];
|
|
386
386
|
entities: (typeof AccessBusinessEntity | typeof BusinessUserEntity | typeof ProductEntity | typeof EmailTemplateLogEntity | typeof FcmMessageEntity | typeof FcmTokenEntity | typeof GchatUserEntity | typeof GchatMessageEntity | typeof GchatWebhookMessageEntity | typeof SlackMessageEntity | typeof BzNotificationChannelPreferenceEntity | typeof SlackIntegrationEntity | typeof SlackUserEntity | typeof WhatsappMessageEntity | typeof WhatsappPreferenceEntity | typeof BusinessAppIntegrationCredentialEntity | typeof BusinessAppIntegrationMessagesEntity | typeof BusinessEmailEntity | typeof BusinessGroupRoleEntity | typeof MenuRoleEntity | typeof MenuEntity | typeof UiActionRoleEntity | typeof MenuActionEntity | typeof ChildMenuEntity | typeof BusinessMenuEntity | typeof GroupRoleEntity | typeof BusinessUserRoleEntity | typeof BusinessWebhookEntity | typeof ConversationEntity | typeof DashboardComponentEntity | typeof DownloadLogEntity | typeof EmailRecipientEntity | typeof EmailMessageEntity | typeof GroupMemberEntity | typeof PreferenceUserEntity | typeof PreferenceUserGroupEntity | typeof ModuleMenuEntity | typeof RequestLogEntity | typeof ScheduledReportEntity | typeof ScheduledReportEmailEntity | typeof ScheduledReportItemEntity | typeof SlackWebhookMessageEntity | typeof UserNotificationEntity | typeof UserRoleEntity | typeof WatchlistAssignmentEntity | typeof WebhookLogEntity | typeof WebhookSlugEntity)[];
|
|
387
387
|
enums: (typeof NotificationTypeEnum | typeof NotificationChannelTypeEnum | typeof RecurringPeriodEnum | typeof CustomColumnTypeEnum | typeof ProductTypeEnum | typeof PlatformTypeEnum)[];
|
|
388
|
-
jobs: (typeof WhatsappMessagePayloadDto | typeof AccessTestJob | typeof ApiAccountJob | typeof AppIntegrationJob | typeof BusinessAppIntegrationCredentialJob | typeof BusinessAppIntegrationJob | typeof BusinessAppIntegrationMessagesJob | typeof BusinessEmailJob | typeof BusinessGroupRoleJob | typeof BusinessMenuJob | typeof BusinessPreferenceJob | typeof BusinessUserGroupJob | typeof BusinessUserJob | typeof BusinessUserNotificationPreferenceJob | typeof BusinessUserRoleJob | typeof BusinessWebhookJob | typeof BzNotificationChannelPreferenceJob | typeof ChildMenuJob | typeof ChoiceListJob | typeof ChoiceTypeJob | typeof ConversationJob | typeof CustomFieldJob | typeof CustomReportJob | typeof DashboardComponentJob | typeof DashboardJob | typeof DownloadLogJob | typeof EmailAttachmentJob | typeof
|
|
389
|
-
libraries: (typeof ProcessEmailNotification | typeof SendEmailNotification | typeof SendFcmNotification | typeof SendGchatMessageNotification | typeof SendGchatWebhookNotification | typeof SendSlackMessageNotification | typeof SendSlackWebhookNotification | typeof ProcessWhatsappMessage | typeof SendWhatsappMessageNotification | typeof SendWebhookRequest | typeof ProcessApplicationMenu | typeof ProcessMenuDetails | typeof ProcessApiAccountData | typeof ProcessDateFilter | typeof ProcessCommonList | typeof ProcessListingCsvFile | typeof ProcessApiAccountList | typeof ProcessDbFind | typeof ProcessBulkUploadList | typeof ProcessBulkUploadItemList | typeof ProcessWhatsappIntegration | typeof ProcessAppIntegration | typeof ProcessBusinessNotificationChannelPreferenceList | typeof ProcessBusinessUserGroupList | typeof ProcessUserGroupCreation | typeof ProcessBusinessUserNotificationPreferenceList | typeof ProcessChoiceListData | typeof ProcessChoiceTypeList | typeof ProcessChoiceTypeData | typeof ProcessSlackIntegration | typeof ProcessZohoIntegration | typeof ProcessCustomFieldList | typeof ProcessCustomFieldCreation | typeof ProcessDashboardReportData | typeof ProcessReportData | typeof ProcessCreateDashboardComponent | typeof ProcessDashboardComponent | typeof ProcessDashboardReport | typeof ProcessDownloadLogList | typeof ProcessEmailRuleList | typeof ProcessEmailRuleData | typeof SetFcmToken | typeof ProcessGroupMemberList | typeof ProcessGroupRoleList | typeof ProcessPreferenceData | typeof ProcessScheduledReportData | typeof ProcessScheduledReportList | typeof ProcessScheduledReportItemList | typeof ProcessUserNotificationList | typeof ProcessRevokeSlackIntegration | typeof ProcessRevokeZohoIntegration | typeof ProcessBusinessGroupRoleUpdation | typeof ProcessBusinessUserRoleUpdate | typeof
|
|
388
|
+
jobs: (typeof WhatsappMessagePayloadDto | typeof EvaluateEmailRuleJob | typeof AccessTestJob | typeof ApiAccountJob | typeof AppIntegrationJob | typeof BusinessAppIntegrationCredentialJob | typeof BusinessAppIntegrationJob | typeof BusinessAppIntegrationMessagesJob | typeof BusinessEmailJob | typeof BusinessGroupRoleJob | typeof BusinessMenuJob | typeof BusinessPreferenceJob | typeof BusinessUserGroupJob | typeof BusinessUserJob | typeof BusinessUserNotificationPreferenceJob | typeof BusinessUserRoleJob | typeof BusinessWebhookJob | typeof BzNotificationChannelPreferenceJob | typeof ChildMenuJob | typeof ChoiceListJob | typeof ChoiceTypeJob | typeof ConversationJob | typeof CustomFieldJob | typeof CustomReportJob | typeof DashboardComponentJob | typeof DashboardJob | typeof DownloadLogJob | typeof EmailAttachmentJob | typeof EmailMessageJob | typeof EmailRecipientJob | typeof EmailRuleJob | typeof EmailTemplateLogJob | typeof FcmMessageJob | typeof FcmNotificationJob | typeof FcmTemplateJob | typeof FcmTokenJob | typeof GchatIncomingWebhookJob | typeof GchatMessageJob | typeof GchatTemplateJob | typeof GchatUserJob | typeof GchatWebhookJob | typeof GchatWebhookMessageJob | typeof GroupMemberJob | typeof GroupRoleJob | typeof ListPreferenceJob | typeof ListingColumnJob | typeof ListingPageJob | typeof ListingPreferenceJob | typeof MenuActionJob | typeof MenuJob | typeof MenuRoleJob | typeof ModuleJob | typeof ModuleMenuJob | typeof PreferenceUserGroupJob | typeof PreferenceUsersJob | typeof ProcessServerEmailJob | typeof ProductJob | typeof RequestLogJob | typeof RoleGroupJob | typeof ScheduledReportEmailJob | typeof ScheduledReportItemJob | typeof ScheduledReportJob | typeof SlackIncomingWebhookJob | typeof SlackIntegrationJob | typeof SlackMessageJob | typeof SlackTemplateJob | typeof SlackUserJob | typeof SlackWebhookJob | typeof SlackWebhookMessageJob | typeof SyncBURoleJob | typeof UiActionJob | typeof UiActionRoleJob | typeof UserNotificationJob | typeof UserPreferenceJob | typeof UserRoleJob | typeof WatchlistAssignmentJob | typeof WebhookEventJob | typeof WebhookLogJob | typeof WebhookSlugJob | typeof WebhookTypeJob | typeof WhatsappIncomingWebhookJob | typeof WhatsappMessageJob | typeof WhatsappTemplateJob | typeof WhitelistedWhatsappNumberJob)[];
|
|
389
|
+
libraries: (typeof ProcessEmailNotification | typeof SendEmailNotification | typeof SendFcmNotification | typeof SendGchatMessageNotification | typeof SendGchatWebhookNotification | typeof SendSlackMessageNotification | typeof SendSlackWebhookNotification | typeof ProcessWhatsappMessage | typeof SendWhatsappMessageNotification | typeof EvaluateEmailRule | typeof SendWebhookRequest | typeof ProcessApplicationMenu | typeof ProcessMenuDetails | typeof ProcessApiAccountData | typeof ProcessDateFilter | typeof ProcessCommonList | typeof ProcessListingCsvFile | typeof ProcessApiAccountList | typeof ProcessDbFind | typeof ProcessBulkUploadList | typeof ProcessBulkUploadItemList | typeof ProcessWhatsappIntegration | typeof ProcessAppIntegration | typeof ProcessBusinessNotificationChannelPreferenceList | typeof ProcessBusinessUserGroupList | typeof ProcessUserGroupCreation | typeof ProcessBusinessUserNotificationPreferenceList | typeof ProcessChoiceListData | typeof ProcessChoiceTypeList | typeof ProcessChoiceTypeData | typeof ProcessSlackIntegration | typeof ProcessZohoIntegration | typeof ProcessCustomFieldList | typeof ProcessCustomFieldCreation | typeof ProcessDashboardReportData | typeof ProcessReportData | typeof ProcessCreateDashboardComponent | typeof ProcessDashboardComponent | typeof ProcessDashboardReport | typeof ProcessDownloadLogList | typeof ProcessEmailRuleList | typeof ProcessEmailRuleData | typeof SetFcmToken | typeof ProcessGroupMemberList | typeof ProcessGroupRoleList | typeof ProcessPreferenceData | typeof ProcessScheduledReportData | typeof ProcessScheduledReportList | typeof ProcessScheduledReportItemList | typeof ProcessUserNotificationList | typeof ProcessRevokeSlackIntegration | typeof ProcessRevokeZohoIntegration | typeof ProcessBusinessGroupRoleUpdation | typeof ProcessBusinessUserRoleUpdate | typeof ProcessGroupMemberUpdation | typeof SyncBusinessUserRole | typeof CommonTagController | typeof ProcessConversationData | typeof ConversationController | typeof ValidateCustomFieldData | typeof ProcessCommonCustomField | typeof ProcessNotification | typeof ProcessSlackMessage | typeof ProcessTestList)[];
|
|
390
390
|
middlewares: (typeof BusinessMiddleware | typeof ExternalAccessMiddleware)[];
|
|
391
391
|
services: (typeof SendEmailService | typeof GchatService | typeof SlackService | typeof WhatsappService | typeof NotificationService | typeof SlabsService | typeof WebhookService | typeof AccessBusinessService | typeof ListingService | typeof AuditLogService | typeof AccessReportService | typeof PlatformService | typeof ListingPreferenceService | typeof ScheduledReportService | typeof BusinessUserRoleService | typeof UtilityService | typeof CustomFieldService | typeof ApiAccountService | typeof AppIntegrationService | typeof BusinessPreferenceService | typeof Es6JobsService | typeof GptService | typeof LoadEntityService | typeof RequestLogService | typeof UserNotificationService | typeof UserPreferenceService)[];
|
|
392
392
|
subscribers: (typeof ApiAccountSubscriber | typeof AppIntegrationSubscriber | typeof BusinessAppIntegrationCredentialSubscriber | typeof BusinessAppIntegrationMessagesSubscriber | typeof BusinessAppIntegrationSubscriber | typeof BusinessEmailSubscriber | typeof BusinessGroupRoleSubscriber | typeof BusinessMenuSubscriber | typeof BusinessPreferenceSubscriber | typeof BusinessUserGroupSubscriber | typeof BusinessUserNotificationPreferenceSubscriber | typeof BusinessUserRoleSubscriber | typeof BusinessUserSubscriber | typeof BusinessWebhookSubscriber | typeof BzNotificationChannelPreferenceSubscriber | typeof ChildMenuSubscriber | typeof ChoiceListSubscriber | typeof ChoiceTypeSubscriber | typeof ConversationSubscriber | typeof CustomFieldSubscriber | typeof CustomReportSubscriber | typeof DashboardComponentSubscriber | typeof DashboardSubscriber | typeof DownloadLogSubscriber | typeof EmailAttachmentSubscriber | typeof EmailMessageSubscriber | typeof EmailRecipientSubscriber | typeof EmailRuleSubscriber | typeof EmailTemplateLogSubscriber | typeof FcmMessageSubscriber | typeof FcmNotificationSubscriber | typeof FcmTemplateSubscriber | typeof FcmTokenSubscriber | typeof GchatMessageSubscriber | typeof GchatTemplateSubscriber | typeof GchatUserSubscriber | typeof GchatWebhookMessageSubscriber | typeof GchatWebhookSubscriber | typeof GroupMemberSubscriber | typeof GroupRoleSubscriber | typeof ListPreferenceSubscriber | typeof ListingColumnSubscriber | typeof ListingPageSubscriber | typeof ListingPreferenceSubscriber | typeof MenuActionSubscriber | typeof MenuRoleSubscriber | typeof MenuSubscriber | typeof ModuleMenuSubscriber | typeof ModuleSubscriber | typeof PreferenceUserGroupSubscriber | typeof PreferenceUserSubscriber | typeof ProductSubscriber | typeof RequestLogSubscriber | typeof RoleGroupSubscriber | typeof ScheduledReportEmailSubscriber | typeof ScheduledReportItemSubscriber | typeof ScheduledReportSubscriber | typeof SlackIntegrationSubscriber | typeof SlackMessageSubscriber | typeof SlackTemplateSubscriber | typeof SlackUserSubscriber | typeof SlackWebhookMessageSubscriber | typeof SlackWebhookSubscriber | typeof UiActionRoleSubscriber | typeof UiActionSubscriber | typeof UserNotificationSubscriber | typeof UserPreferenceSubscriber | typeof UserRoleSubscriber | typeof WatchlistAssignmentSubscriber | typeof WebhookEventSubscriber | typeof WebhookLogSubscriber | typeof WebhookSlugSubscriber | typeof WebhookTypeSubscriber | typeof WhatsappMessageSubscriber | typeof WhatsappTemplateSubscriber | typeof WhitelistedWhatsappNumberSubscriber)[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { AwsS3Service, CommonJob, QueueService } from '@servicelabsco/nestjs-utility-services';
|
|
1
|
+
import { AwsS3Service, CommonJob, QueueService, UploadService } from '@servicelabsco/nestjs-utility-services';
|
|
2
2
|
export declare class EvaluateEmailRuleJob extends CommonJob {
|
|
3
3
|
protected readonly queueService: QueueService;
|
|
4
4
|
private readonly awsS3Service;
|
|
5
|
-
|
|
5
|
+
protected readonly uploadService: UploadService;
|
|
6
|
+
constructor(queueService: QueueService, awsS3Service: AwsS3Service, uploadService: UploadService);
|
|
6
7
|
handle(id: number): Promise<void>;
|
|
7
8
|
}
|
|
@@ -14,19 +14,21 @@ const common_1 = require("@nestjs/common");
|
|
|
14
14
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
15
15
|
const evaluate_email_rule_1 = require("../libraries/evaluate.email.rule");
|
|
16
16
|
let EvaluateEmailRuleJob = class EvaluateEmailRuleJob extends nestjs_utility_services_1.CommonJob {
|
|
17
|
-
constructor(queueService, awsS3Service) {
|
|
17
|
+
constructor(queueService, awsS3Service, uploadService) {
|
|
18
18
|
super('5e77b61f1ec9433816b0304cca59b845');
|
|
19
19
|
this.queueService = queueService;
|
|
20
20
|
this.awsS3Service = awsS3Service;
|
|
21
|
+
this.uploadService = uploadService;
|
|
21
22
|
}
|
|
22
23
|
async handle(id) {
|
|
23
|
-
await new evaluate_email_rule_1.EvaluateEmailRule(this.awsS3Service).process(id);
|
|
24
|
+
await new evaluate_email_rule_1.EvaluateEmailRule(this.awsS3Service, this.uploadService).process(id);
|
|
24
25
|
}
|
|
25
26
|
};
|
|
26
27
|
exports.EvaluateEmailRuleJob = EvaluateEmailRuleJob;
|
|
27
28
|
exports.EvaluateEmailRuleJob = EvaluateEmailRuleJob = __decorate([
|
|
28
29
|
(0, common_1.Injectable)(),
|
|
29
30
|
__metadata("design:paramtypes", [nestjs_utility_services_1.QueueService,
|
|
30
|
-
nestjs_utility_services_1.AwsS3Service
|
|
31
|
+
nestjs_utility_services_1.AwsS3Service,
|
|
32
|
+
nestjs_utility_services_1.UploadService])
|
|
31
33
|
], EvaluateEmailRuleJob);
|
|
32
34
|
//# sourceMappingURL=evaluate.email.rule.job.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate.email.rule.job.js","sourceRoot":"","sources":["../../../src/access/jobs/evaluate.email.rule.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"evaluate.email.rule.job.js","sourceRoot":"","sources":["../../../src/access/jobs/evaluate.email.rule.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAA8G;AAC9G,0EAAqE;AAG9D,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,mCAAS;IAC/C,YACuB,YAA0B,EAC5B,YAA0B,EACxB,aAA4B;QAE/C,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAJvB,iBAAY,GAAZ,YAAY,CAAc;QAC5B,iBAAY,GAAZ,YAAY,CAAc;QACxB,kBAAa,GAAb,aAAa,CAAe;IAGnD,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU;QACnB,MAAM,IAAI,uCAAiB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACnF,CAAC;CACJ,CAAA;AAXY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAG4B,sCAAY;QACd,sCAAY;QACT,uCAAa;GAJ1C,oBAAoB,CAWhC"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { AwsS3Service } from '@servicelabsco/nestjs-utility-services';
|
|
1
|
+
import { AwsS3Service, UploadService } from '@servicelabsco/nestjs-utility-services';
|
|
2
2
|
import { EmailMessageNormalizedDto } from '../dtos/email.message.normalized.dto';
|
|
3
3
|
import { EmailMessageEntity } from '../entities/email.message.entity';
|
|
4
|
+
import { EmailAttachmentEntity } from '../entities/email.attachment.entity';
|
|
4
5
|
export declare class EvaluateEmailRule {
|
|
5
6
|
private readonly awsS3Service;
|
|
6
|
-
|
|
7
|
+
private readonly uploadService;
|
|
8
|
+
constructor(awsS3Service: AwsS3Service, uploadService: UploadService);
|
|
7
9
|
process(id: number): Promise<EmailMessageEntity>;
|
|
8
10
|
private processRule;
|
|
9
11
|
protected getApprovalRule(data: EmailMessageNormalizedDto): Promise<void>;
|
|
10
12
|
private normalizeMessage;
|
|
11
13
|
private getRecipientOfType;
|
|
14
|
+
getSignedAttachments(attachments: EmailAttachmentEntity[]): Promise<EmailAttachmentEntity[]>;
|
|
12
15
|
}
|
|
@@ -6,8 +6,9 @@ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-service
|
|
|
6
6
|
const email_message_entity_1 = require("../entities/email.message.entity");
|
|
7
7
|
const email_rule_entity_1 = require("../entities/email.rule.entity");
|
|
8
8
|
class EvaluateEmailRule {
|
|
9
|
-
constructor(awsS3Service) {
|
|
9
|
+
constructor(awsS3Service, uploadService) {
|
|
10
10
|
this.awsS3Service = awsS3Service;
|
|
11
|
+
this.uploadService = uploadService;
|
|
11
12
|
}
|
|
12
13
|
async process(id) {
|
|
13
14
|
const message = await email_message_entity_1.EmailMessageEntity.first(id, { relations: ['email', 'attachments', 'recipients'] });
|
|
@@ -20,7 +21,8 @@ class EvaluateEmailRule {
|
|
|
20
21
|
data.message.rule_id = rule.id;
|
|
21
22
|
const script = await nestjs_utility_services_1.SystemScriptEntity.first(rule.script_id);
|
|
22
23
|
const htmlParser = cheerio.load(data.body);
|
|
23
|
-
|
|
24
|
+
const uploadService = this.uploadService;
|
|
25
|
+
await new nestjs_utility_services_1.CodeEvaluator().execute(script.script, { data, fn: { htmlParser, uploadService } });
|
|
24
26
|
}
|
|
25
27
|
async getApprovalRule(data) {
|
|
26
28
|
const rules = await email_rule_entity_1.EmailRuleEntity.find({
|
|
@@ -46,10 +48,8 @@ class EvaluateEmailRule {
|
|
|
46
48
|
const attributes = this.awsS3Service.getS3BucketKeyFromUrl(message.body);
|
|
47
49
|
const data = await this.awsS3Service.getObject(attributes.bucket, attributes.key);
|
|
48
50
|
const body = await data.Body.transformToString();
|
|
49
|
-
const attachments = message.attachments
|
|
50
|
-
|
|
51
|
-
});
|
|
52
|
-
return { from, to, cc, bcc, subject, body, attachments, message, alias };
|
|
51
|
+
const attachments = await this.getSignedAttachments(message.attachments);
|
|
52
|
+
return { id: message.id, from, to, cc, bcc, subject, body, attachments, message, alias };
|
|
53
53
|
}
|
|
54
54
|
getRecipientOfType(recipients, type) {
|
|
55
55
|
return recipients
|
|
@@ -58,6 +58,15 @@ class EvaluateEmailRule {
|
|
|
58
58
|
})
|
|
59
59
|
.map((recipient) => recipient.email);
|
|
60
60
|
}
|
|
61
|
+
async getSignedAttachments(attachments) {
|
|
62
|
+
const r = [];
|
|
63
|
+
for (const attachment of attachments) {
|
|
64
|
+
const attributes = this.awsS3Service.getS3BucketKeyFromUrl(attachment.url);
|
|
65
|
+
attachment.url = await this.awsS3Service.getPublicUrl(attributes.bucket, attributes.key);
|
|
66
|
+
r.push(attachment);
|
|
67
|
+
}
|
|
68
|
+
return r;
|
|
69
|
+
}
|
|
61
70
|
}
|
|
62
71
|
exports.EvaluateEmailRule = EvaluateEmailRule;
|
|
63
72
|
//# sourceMappingURL=evaluate.email.rule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate.email.rule.js","sourceRoot":"","sources":["../../../src/access/libraries/evaluate.email.rule.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AACnC,
|
|
1
|
+
{"version":3,"file":"evaluate.email.rule.js","sourceRoot":"","sources":["../../../src/access/libraries/evaluate.email.rule.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AACnC,oFAOgD;AAEhD,2EAAsE;AAEtE,qEAAgE;AAMhE,MAAa,iBAAiB;IAC1B,YACqB,YAA0B,EAC1B,aAA4B;QAD5B,iBAAY,GAAZ,YAAY,CAAc;QAC1B,kBAAa,GAAb,aAAa,CAAe;IAC9C,CAAC;IAOJ,KAAK,CAAC,OAAO,CAAC,EAAU;QACpB,MAAM,OAAO,GAAG,MAAM,yCAAkB,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC;QAE1G,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC/D,MAAM,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;QAE9C,OAAO,CAAC,YAAY,GAAG,IAAI,IAAI,EAAE,CAAC;QAClC,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC;IAC1B,CAAC;IAQO,KAAK,CAAC,WAAW,CAAC,IAAqB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AAC,qBAAqB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YAC3E,UAAU,CAAC,GAAG,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;YAEzF,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACvB,CAAC;QAED,OAAO,CAAC,CAAC;IACb,CAAC;CACJ;AApHD,8CAoHC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ProcessCustomFieldCreation = void 0;
|
|
4
4
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
5
6
|
const process_common_data_1 = require("../../accessUtility/libraries/process.common.data");
|
|
6
7
|
const custom_field_entity_1 = require("../entities/custom.field.entity");
|
|
7
8
|
const custom_column_type_enum_1 = require("../enums/custom.column.type.enum");
|
|
@@ -18,6 +19,7 @@ class ProcessCustomFieldCreation extends process_common_data_1.ProcessCommonData
|
|
|
18
19
|
async validate() {
|
|
19
20
|
await this.validateChoice();
|
|
20
21
|
await this.validateIdentifier();
|
|
22
|
+
await this.validateDuplicateName();
|
|
21
23
|
this.throwExceptionOnError();
|
|
22
24
|
}
|
|
23
25
|
async set(body) {
|
|
@@ -65,6 +67,19 @@ class ProcessCustomFieldCreation extends process_common_data_1.ProcessCommonData
|
|
|
65
67
|
if (r.id !== this.payload.id)
|
|
66
68
|
return this.setColumnError('name', `There is already a column with similar name`);
|
|
67
69
|
}
|
|
70
|
+
async validateDuplicateName() {
|
|
71
|
+
const r = await custom_field_entity_1.CustomFieldEntity.findOne({
|
|
72
|
+
where: {
|
|
73
|
+
business_id: this.business.id,
|
|
74
|
+
type_id: this.payload.type_id,
|
|
75
|
+
name: (0, typeorm_1.ILike)(this.payload.name),
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
if (!r)
|
|
79
|
+
return;
|
|
80
|
+
if (r.id !== this.payload.id)
|
|
81
|
+
return this.setColumnError('name', `There is already a column with similar name`);
|
|
82
|
+
}
|
|
68
83
|
}
|
|
69
84
|
exports.ProcessCustomFieldCreation = ProcessCustomFieldCreation;
|
|
70
85
|
//# sourceMappingURL=process.custom.field.creation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.custom.field.creation.js","sourceRoot":"","sources":["../../../src/access/libraries/process.custom.field.creation.ts"],"names":[],"mappings":";;;AAAA,oFAAyE;AACzE,2FAAsF;AAGtF,yEAAoE;AACpE,8EAAwE;AAExE,MAAa,0BAA2B,SAAQ,uCAAiB;IAE7D,YAA+B,QAA8B;QACzD,KAAK,EAAE,CAAC;QADmB,aAAQ,GAAR,QAAQ,CAAsB;IAE7D,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAA0B;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;QAEtB,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAEO,KAAK,CAAC,QAAQ;QAClB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"process.custom.field.creation.js","sourceRoot":"","sources":["../../../src/access/libraries/process.custom.field.creation.ts"],"names":[],"mappings":";;;AAAA,oFAAyE;AACzE,qCAAgC;AAChC,2FAAsF;AAGtF,yEAAoE;AACpE,8EAAwE;AAExE,MAAa,0BAA2B,SAAQ,uCAAiB;IAE7D,YAA+B,QAA8B;QACzD,KAAK,EAAE,CAAC;QADmB,aAAQ,GAAR,QAAQ,CAAsB;IAE7D,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAA0B;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,MAAM,IAAI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AC;QACH,IAAI,CAAC,CAAC;YAAE,OAAO;QACf,IAAI,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,OAAO,CAAC,EAAE;YAAE,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,6CAA6C,CAAC,CAAC;IACpH,CAAC;CACJ;AAvFD,gEAuFC"}
|
|
@@ -57,6 +57,8 @@ class ValidateCustomFieldData extends process_common_data_1.ProcessCommonData {
|
|
|
57
57
|
return this.validateYearMonth(field, value);
|
|
58
58
|
if (field.column_type_id === custom_column_type_enum_1.CustomColumnTypeEnum.YEAR_MONTH_RANGE)
|
|
59
59
|
return this.validateYearMonthRange(field, value);
|
|
60
|
+
if (field.column_type_id === custom_column_type_enum_1.CustomColumnTypeEnum.ENCRYPT)
|
|
61
|
+
return this.validateText(field, value);
|
|
60
62
|
}
|
|
61
63
|
async validateNumber(field, value) {
|
|
62
64
|
if (isNaN(value))
|
|
@@ -100,6 +102,10 @@ class ValidateCustomFieldData extends process_common_data_1.ProcessCommonData {
|
|
|
100
102
|
if (!r)
|
|
101
103
|
return this.setColumnError(`custom_field_data.${field.identifier}`, `The field does not match with choice list option`);
|
|
102
104
|
}
|
|
105
|
+
validateText(field, value) {
|
|
106
|
+
if (typeof value !== 'string')
|
|
107
|
+
return this.setColumnError(`custom_field_data.${field.identifier}`, `This is invalid field.`);
|
|
108
|
+
}
|
|
103
109
|
}
|
|
104
110
|
exports.ValidateCustomFieldData = ValidateCustomFieldData;
|
|
105
111
|
//# sourceMappingURL=validate.custom.field.data.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.custom.field.data.js","sourceRoot":"","sources":["../../../src/access/libraries/validate.custom.field.data.ts"],"names":[],"mappings":";;;AAAA,2FAAsF;AACtF,uEAAkE;AAElE,8EAAwE;AAExE,MAAa,uBAAwB,SAAQ,uCAAiB;IAG1D,YAA6B,MAA2B;QACpD,KAAK,EAAE,CAAC;QADiB,WAAM,GAAN,MAAM,CAAqB;
|
|
1
|
+
{"version":3,"file":"validate.custom.field.data.js","sourceRoot":"","sources":["../../../src/access/libraries/validate.custom.field.data.ts"],"names":[],"mappings":";;;AAAA,2FAAsF;AACtF,uEAAkE;AAElE,8EAAwE;AAExE,MAAa,uBAAwB,SAAQ,uCAAiB;IAG1D,YAA6B,MAA2B;QACpD,KAAK,EAAE,CAAC;QADiB,WAAM,GAAN,MAAM,CAAqB;QAwFxD,iBAAY,GAAG,CAAC,KAAK,EAAE,EAAE;YACrB,MAAM,KAAK,GAAG,wBAAwB,CAAC;YACvC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC,CAAC;IAzFF,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,IAAS;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAEjB,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;QACtB,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAE7B,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,MAAM,QAAQ,GAAG,EAAE,CAAC;QAEpB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACnD,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACtC,OAAO,IAAI,CAAC,IAAI,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,GAAW,EAAE,KAAU;QAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;YACtC,OAAO,IAAI,CAA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AAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QAEnG,IAAI,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC,cAAc,CAAC,qBAAqB,KAAK,CAAC,UAAU,EAAE,EAAE,kDAAkD,CAAC,CAAC;IACpI,CAAC;IAEO,YAAY,CAAC,KAAwB,EAAE,KAAa;QACxD,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC,cAAc,CAAC,qBAAqB,KAAK,CAAC,UAAU,EAAE,EAAE,wBAAwB,CAAC,CAAC;IACjI,CAAC;CACJ;AA3GD,0DA2GC"}
|
|
@@ -9,9 +9,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.CustomFieldService = void 0;
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
11
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
12
|
+
const choice_list_entity_1 = require("../entities/choice.list.entity");
|
|
12
13
|
const custom_field_entity_1 = require("../entities/custom.field.entity");
|
|
13
14
|
const custom_column_type_enum_1 = require("../enums/custom.column.type.enum");
|
|
14
|
-
const choice_list_entity_1 = require("../entities/choice.list.entity");
|
|
15
15
|
let CustomFieldService = class CustomFieldService {
|
|
16
16
|
async getRecordData(record, type, businessId) {
|
|
17
17
|
if (!record?.custom_field_data)
|
|
@@ -70,6 +70,30 @@ let CustomFieldService = class CustomFieldService {
|
|
|
70
70
|
return nestjs_utility_services_1.ClassMapper.removeWhoColumns(r);
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
|
+
async encryptValue(entity, typeId, prevCustomFieldData) {
|
|
74
|
+
if (!entity?.custom_field_data)
|
|
75
|
+
return;
|
|
76
|
+
const fields = await custom_field_entity_1.CustomFieldEntity.find({
|
|
77
|
+
where: {
|
|
78
|
+
business_id: entity.business_id,
|
|
79
|
+
type_id: typeId,
|
|
80
|
+
column_type_id: custom_column_type_enum_1.CustomColumnTypeEnum.ENCRYPT,
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
if (!fields?.length)
|
|
84
|
+
return;
|
|
85
|
+
const sanitizedCustomFieldData = entity.custom_field_data;
|
|
86
|
+
for (const field of fields) {
|
|
87
|
+
const current = sanitizedCustomFieldData[field?.identifier];
|
|
88
|
+
if (!current)
|
|
89
|
+
continue;
|
|
90
|
+
const prev = prevCustomFieldData[field.identifier];
|
|
91
|
+
if (current !== prev) {
|
|
92
|
+
sanitizedCustomFieldData[field.identifier] = nestjs_utility_services_1.CustomCrypt.encrypt(current);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
entity.custom_field_data = sanitizedCustomFieldData;
|
|
96
|
+
}
|
|
73
97
|
};
|
|
74
98
|
exports.CustomFieldService = CustomFieldService;
|
|
75
99
|
exports.CustomFieldService = CustomFieldService = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom.field.service.js","sourceRoot":"","sources":["../../../src/access/services/custom.field.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"custom.field.service.js","sourceRoot":"","sources":["../../../src/access/services/custom.field.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,oFAAkF;AAClF,uEAAkE;AAClE,yEAAoE;AACpE,8EAAwE;AAGjE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC3B,KAAK,CAAC,aAAa,CAAC,MAAW,EAAE,IAAY,EAAE,UAAmB;QAC9D,IAAI,CAAC,MAAM,EAAE,iBAAiB;YAAE,OAAO,MAAM,CAAC;QAC9C,UAAU,GAAG,UAAU,IAAI,MAAM,CAAC,WAAW,CAAC;QAE9C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAE5D,MAAM,CAAC,iBAAiB,GAAG,MAAM,IAAI,CAAC,kBAAkB,C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W,EAAE,MAAM,CAAC,WAAW;gBAC/B,OAAO,EAAE,MAAM;gBACf,cAAc,EAAE,8CAAoB,CAAC,OAAO;aAC/C;SACJ,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,EAAE,MAAM;YAAE,OAAO;QAE5B,MAAM,wBAAwB,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAE1D,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YACzB,MAAM,OAAO,GAAG,wBAAwB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;YAE5D,IAAI,CAAC,OAAO;gBAAE,SAAS;YAEvB,MAAM,IAAI,GAAG,mBAAmB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YAEnD,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;gBACnB,wBAAwB,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,qCAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAC9E,CAAC;QACL,CAAC;QAED,MAAM,CAAC,iBAAiB,GAAG,wBAAwB,CAAC;IACxD,CAAC;CACJ,CAAA;AA1GY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;GACA,kBAAkB,CA0G9B"}
|
package/dist/app.controller.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { NotificationService } from './access/services/notification.service';
|
|
|
3
3
|
import { SlabsService } from './access/services/slabs.service';
|
|
4
4
|
import { AnalyseBulkUploadJob } from './accessUtility/jobs/analyse.bulk.upload.job';
|
|
5
5
|
import { AppService } from './app.service';
|
|
6
|
+
import { EvaluateEmailRuleJob } from './access/jobs/evaluate.email.rule.job';
|
|
6
7
|
export declare class AppController {
|
|
7
8
|
private readonly appService;
|
|
8
9
|
private readonly queueService;
|
|
@@ -13,7 +14,8 @@ export declare class AppController {
|
|
|
13
14
|
protected readonly analyseBulkUploadJob: AnalyseBulkUploadJob;
|
|
14
15
|
protected readonly notificationService: NotificationService;
|
|
15
16
|
protected readonly slabsService: SlabsService;
|
|
16
|
-
|
|
17
|
+
protected readonly evaluateEmailRuleJob: EvaluateEmailRuleJob;
|
|
18
|
+
constructor(appService: AppService, queueService: QueueService, sqlService: SqlService, uploadService: UploadService, propertyService: PropertyService, refreshPropertyCacheJob: RefreshPropertyCacheJob, analyseBulkUploadJob: AnalyseBulkUploadJob, notificationService: NotificationService, slabsService: SlabsService, evaluateEmailRuleJob: EvaluateEmailRuleJob);
|
|
17
19
|
getHello(): string;
|
|
18
20
|
check(): string;
|
|
19
21
|
auth(): Promise<import("@servicelabsco/nestjs-utility-services").UserAccessDto>;
|
|
@@ -27,5 +29,6 @@ export declare class AppController {
|
|
|
27
29
|
[index: string]: number;
|
|
28
30
|
};
|
|
29
31
|
}>;
|
|
30
|
-
set(): Promise<
|
|
32
|
+
set(): Promise<void>;
|
|
33
|
+
sets(): Promise<any>;
|
|
31
34
|
}
|
package/dist/app.controller.js
CHANGED
|
@@ -19,8 +19,9 @@ const notification_service_1 = require("./access/services/notification.service")
|
|
|
19
19
|
const slabs_service_1 = require("./access/services/slabs.service");
|
|
20
20
|
const analyse_bulk_upload_job_1 = require("./accessUtility/jobs/analyse.bulk.upload.job");
|
|
21
21
|
const app_service_1 = require("./app.service");
|
|
22
|
+
const evaluate_email_rule_job_1 = require("./access/jobs/evaluate.email.rule.job");
|
|
22
23
|
let AppController = class AppController {
|
|
23
|
-
constructor(appService, queueService, sqlService, uploadService, propertyService, refreshPropertyCacheJob, analyseBulkUploadJob, notificationService, slabsService) {
|
|
24
|
+
constructor(appService, queueService, sqlService, uploadService, propertyService, refreshPropertyCacheJob, analyseBulkUploadJob, notificationService, slabsService, evaluateEmailRuleJob) {
|
|
24
25
|
this.appService = appService;
|
|
25
26
|
this.queueService = queueService;
|
|
26
27
|
this.sqlService = sqlService;
|
|
@@ -30,6 +31,7 @@ let AppController = class AppController {
|
|
|
30
31
|
this.analyseBulkUploadJob = analyseBulkUploadJob;
|
|
31
32
|
this.notificationService = notificationService;
|
|
32
33
|
this.slabsService = slabsService;
|
|
34
|
+
this.evaluateEmailRuleJob = evaluateEmailRuleJob;
|
|
33
35
|
}
|
|
34
36
|
getHello() {
|
|
35
37
|
return this.appService.getHello();
|
|
@@ -62,8 +64,14 @@ let AppController = class AppController {
|
|
|
62
64
|
const jobStats = await this.queueService.getQueueStats();
|
|
63
65
|
return { runningStats, jobStats };
|
|
64
66
|
}
|
|
65
|
-
async set() {
|
|
66
|
-
|
|
67
|
+
async set() { }
|
|
68
|
+
async sets() {
|
|
69
|
+
return this.evaluateEmailRuleJob.dispatch(2081);
|
|
70
|
+
const sql = `select * from bz_email_messages where email_id = 5 and from_email = 'care@snapmint.com' and processed_at is not null order by id desc`;
|
|
71
|
+
const records = await this.sqlService.read(sql);
|
|
72
|
+
for (const record of records) {
|
|
73
|
+
await this.evaluateEmailRuleJob.dispatch(record.id);
|
|
74
|
+
}
|
|
67
75
|
}
|
|
68
76
|
};
|
|
69
77
|
exports.AppController = AppController;
|
|
@@ -122,6 +130,12 @@ __decorate([
|
|
|
122
130
|
__metadata("design:paramtypes", []),
|
|
123
131
|
__metadata("design:returntype", Promise)
|
|
124
132
|
], AppController.prototype, "set", null);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, common_1.Post)('sets'),
|
|
135
|
+
__metadata("design:type", Function),
|
|
136
|
+
__metadata("design:paramtypes", []),
|
|
137
|
+
__metadata("design:returntype", Promise)
|
|
138
|
+
], AppController.prototype, "sets", null);
|
|
125
139
|
exports.AppController = AppController = __decorate([
|
|
126
140
|
(0, common_1.Controller)(),
|
|
127
141
|
__metadata("design:paramtypes", [app_service_1.AppService,
|
|
@@ -132,6 +146,7 @@ exports.AppController = AppController = __decorate([
|
|
|
132
146
|
nestjs_utility_services_1.RefreshPropertyCacheJob,
|
|
133
147
|
analyse_bulk_upload_job_1.AnalyseBulkUploadJob,
|
|
134
148
|
notification_service_1.NotificationService,
|
|
135
|
-
slabs_service_1.SlabsService
|
|
149
|
+
slabs_service_1.SlabsService,
|
|
150
|
+
evaluate_email_rule_job_1.EvaluateEmailRuleJob])
|
|
136
151
|
], AppController);
|
|
137
152
|
//# sourceMappingURL=app.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA8D;AAC9D,oFAAiJ;AACjJ,iFAA6E;AAC7E,mEAA+D;AAC/D,0FAAoF;AACpF,+CAA2C;AAE3C,mFAA6E;AAGtE,IAAM,aAAa,GAAnB,MAAM,aAAa;IACtB,YACqB,UAAsB,EACtB,YAA0B,EAC1B,UAAsB,EACtB,aAA4B,EAC1B,eAAgC,EAClC,uBAAgD,EAC9C,oBAA0C,EAC1C,mBAAwC,EACxC,YAA0B,EAC1B,oBAA0C;QAT5C,eAAU,GAAV,UAAU,CAAY;QACtB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,eAAU,GAAV,UAAU,CAAY;QACtB,kBAAa,GAAb,aAAa,CAAe;QAC1B,oBAAe,GAAf,eAAe,CAAiB;QAClC,4BAAuB,GAAvB,uBAAuB,CAAyB;QAC9C,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,yBAAoB,GAApB,oBAAoB,CAAsB;IAC9D,CAAC;IAGJ,QAAQ;QACJ,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC;IAGD,KAAK;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;IAGK,AAAN,KAAK,CAAC,IAAI;QACN,OAAO,8BAAI,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;IAGK,AAAN,KAAK,CAAC,aAAa;QACf,OAAO,IAAI,CAAC,YA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I,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC3B,MAAM,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACxD,CAAC;IACL,CAAC;CACJ,CAAA;AA7EY,sCAAa;AAetB;IADC,IAAA,YAAG,GAAE;;;;6CAGL;AAGD;IADC,IAAA,YAAG,EAAC,eAAe,CAAC;;;;0CAGpB;AAGK;IADL,IAAA,YAAG,EAAC,UAAU,CAAC;;;;yCAGf;AAGK;IADL,IAAA,YAAG,EAAC,aAAa,CAAC;;;;kDAGlB;AAGK;IADL,IAAA,YAAG,EAAC,eAAe,CAAC;;;;iDAGpB;AAGK;IADL,IAAA,YAAG,EAAC,YAAY,CAAC;;;;+CASjB;AAGK;IADL,IAAA,YAAG,EAAC,WAAW,CAAC;IACM,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;oDAEjC;AAGK;IADL,IAAA,YAAG,EAAC,OAAO,CAAC;;;;6CAMZ;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;;;;wCACG;AAGR;IADL,IAAA,aAAI,EAAC,MAAM,CAAC;;;;yCAUZ;wBA5EQ,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAGwB,wBAAU;QACR,sCAAY;QACd,oCAAU;QACP,uCAAa;QACT,yCAAe;QACT,iDAAuB;QACxB,8CAAoB;QACrB,0CAAmB;QAC1B,4BAAY;QACJ,8CAAoB;GAXxD,aAAa,CA6EzB"}
|
|
@@ -22,9 +22,9 @@ class AddCustomColumnTypesDataSeederTable1681369386555 extends nestjs_utility_se
|
|
|
22
22
|
const records = [
|
|
23
23
|
{
|
|
24
24
|
id: 1038,
|
|
25
|
-
name: '
|
|
26
|
-
value: '
|
|
27
|
-
description: '
|
|
25
|
+
name: 'String',
|
|
26
|
+
value: 'String',
|
|
27
|
+
description: 'String',
|
|
28
28
|
lookup_type_id: 109,
|
|
29
29
|
},
|
|
30
30
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1681369386555-AddCustomColumnTypesDataSeederTable.js","sourceRoot":"","sources":["../../src/migrations/1681369386555-AddCustomColumnTypesDataSeederTable.ts"],"names":[],"mappings":";;;AAAA,oFAAuE;AAEvE,MAAa,gDAAiD,SAAQ,uCAAa;IAC/E;QACI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;IAED,aAAa;QACT,IAAI,CAAC,SAAS,CACV;YACI,EAAE,EAAE,GAAG;YACP,IAAI,EAAE,2BAA2B;YACjC,WAAW,EAAE,2BAA2B;SAC3C,EACD,kBAAkB,CACrB,CAAC;IACN,CAAC;IAED,eAAe;QACX,MAAM,OAAO,GAAG;YACZ;gBACI,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"1681369386555-AddCustomColumnTypesDataSeederTable.js","sourceRoot":"","sources":["../../src/migrations/1681369386555-AddCustomColumnTypesDataSeederTable.ts"],"names":[],"mappings":";;;AAAA,oFAAuE;AAEvE,MAAa,gDAAiD,SAAQ,uCAAa;IAC/E;QACI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;IAED,aAAa;QACT,IAAI,CAAC,SAAS,CACV;YACI,EAAE,EAAE,GAAG;YACP,IAAI,EAAE,2BAA2B;YACjC,WAAW,EAAE,2BAA2B;SAC3C,EACD,kBAAkB,CACrB,CAAC;IACN,CAAC;IAED,eAAe;QACX,MAAM,OAAO,GAAG;YACZ;gBACI,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,QAAQ;gBACrB,cAAc,EAAE,GAAG;aACtB;YACD;gBACI,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,UAAU;gBACvB,cAAc,EAAE,GAAG;aACtB;YACD;gBACI,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;gBACb,WAAW,EAAE,MAAM;gBACnB,cAAc,EAAE,GAAG;aACtB;YACD;gBACI,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,UAAU;gBACvB,cAAc,EAAE,GAAG;aACtB;YACD;gBACI,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,SAAS;gBACtB,cAAc,EAAE,GAAG;aACtB;YACD;gBACI,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,QAAQ;gBACrB,cAAc,EAAE,GAAG;aACtB;YACD;gBACI,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,YAAY;gBACnB,WAAW,EAAE,YAAY;gBACzB,cAAc,EAAE,GAAG;aACtB;SACJ,CAAC;QAEF,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC3B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAC3B,CAAC;IACL,CAAC;CACJ;AA/ED,4GA+EC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomPasswordFieldDataSeederTable1738120370552 = void 0;
|
|
4
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
class CustomPasswordFieldDataSeederTable1738120370552 extends nestjs_utility_services_1.SeederUtility {
|
|
6
|
+
constructor() {
|
|
7
|
+
super('sys_lookup_values');
|
|
8
|
+
this.process();
|
|
9
|
+
}
|
|
10
|
+
process() {
|
|
11
|
+
this.addRecord({
|
|
12
|
+
id: 5058,
|
|
13
|
+
name: 'Encryption',
|
|
14
|
+
value: 'Encryption',
|
|
15
|
+
description: 'Encryption',
|
|
16
|
+
lookup_type_id: 109,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.CustomPasswordFieldDataSeederTable1738120370552 = CustomPasswordFieldDataSeederTable1738120370552;
|
|
21
|
+
//# sourceMappingURL=1738120370552-CustomPasswordFieldDataSeederTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1738120370552-CustomPasswordFieldDataSeederTable.js","sourceRoot":"","sources":["../../src/migrations/1738120370552-CustomPasswordFieldDataSeederTable.ts"],"names":[],"mappings":";;;AAAA,oFAAuE;AAEvE,MAAa,+CAAgD,SAAQ,uCAAa;IAC9E;QACI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,SAAS,CAAC;YACX,EAAE,EAAE,IAAI;YACR,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,YAAY;YACzB,cAAc,EAAE,GAAG;SACtB,CAAC,CAAC;IACP,CAAC;CACJ;AAfD,0GAeC"}
|
package/package.json
CHANGED