@solidxai/core 0.1.12-beta.1 → 0.1.12-beta.2
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/dtos/create-chatter-message.dto.d.ts +1 -0
- package/dist/dtos/create-chatter-message.dto.d.ts.map +1 -1
- package/dist/dtos/create-chatter-message.dto.js +7 -1
- package/dist/dtos/create-chatter-message.dto.js.map +1 -1
- package/dist/dtos/post-chatter-message.dto.d.ts +1 -0
- package/dist/dtos/post-chatter-message.dto.d.ts.map +1 -1
- package/dist/dtos/post-chatter-message.dto.js +6 -1
- package/dist/dtos/post-chatter-message.dto.js.map +1 -1
- package/dist/dtos/update-chatter-message.dto.d.ts +1 -0
- package/dist/dtos/update-chatter-message.dto.d.ts.map +1 -1
- package/dist/dtos/update-chatter-message.dto.js +8 -1
- package/dist/dtos/update-chatter-message.dto.js.map +1 -1
- package/dist/dtos/update-chatter-note-message.dto.d.ts +1 -0
- package/dist/dtos/update-chatter-note-message.dto.d.ts.map +1 -1
- package/dist/dtos/update-chatter-note-message.dto.js +7 -1
- package/dist/dtos/update-chatter-note-message.dto.js.map +1 -1
- package/dist/entities/chatter-message.entity.d.ts +1 -0
- package/dist/entities/chatter-message.entity.d.ts.map +1 -1
- package/dist/entities/chatter-message.entity.js +5 -1
- package/dist/entities/chatter-message.entity.js.map +1 -1
- package/dist/interfaces/chatter-mention-notification.interface.d.ts +27 -0
- package/dist/interfaces/chatter-mention-notification.interface.d.ts.map +1 -0
- package/dist/interfaces/chatter-mention-notification.interface.js +3 -0
- package/dist/interfaces/chatter-mention-notification.interface.js.map +1 -0
- package/dist/jobs/chatter-mention-notification-email-queue-handler.service.d.ts +17 -0
- package/dist/jobs/chatter-mention-notification-email-queue-handler.service.d.ts.map +1 -0
- package/dist/jobs/chatter-mention-notification-email-queue-handler.service.js +106 -0
- package/dist/jobs/chatter-mention-notification-email-queue-handler.service.js.map +1 -0
- package/dist/jobs/database/chatter-mention-notification-email-publisher-database.service.d.ts +12 -0
- package/dist/jobs/database/chatter-mention-notification-email-publisher-database.service.d.ts.map +1 -0
- package/dist/jobs/database/chatter-mention-notification-email-publisher-database.service.js +39 -0
- package/dist/jobs/database/chatter-mention-notification-email-publisher-database.service.js.map +1 -0
- package/dist/jobs/database/chatter-mention-notification-email-queue-options-database.d.ts +8 -0
- package/dist/jobs/database/chatter-mention-notification-email-queue-options-database.d.ts.map +1 -0
- package/dist/jobs/database/chatter-mention-notification-email-queue-options-database.js +10 -0
- package/dist/jobs/database/chatter-mention-notification-email-queue-options-database.js.map +1 -0
- package/dist/jobs/database/chatter-mention-notification-email-subscriber-database.service.d.ts +20 -0
- package/dist/jobs/database/chatter-mention-notification-email-subscriber-database.service.d.ts.map +1 -0
- package/dist/jobs/database/chatter-mention-notification-email-subscriber-database.service.js +48 -0
- package/dist/jobs/database/chatter-mention-notification-email-subscriber-database.service.js.map +1 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-publisher.service.d.ts +12 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-publisher.service.d.ts.map +1 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-publisher.service.js +39 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-publisher.service.js.map +1 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-queue-options.d.ts +8 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-queue-options.d.ts.map +1 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-queue-options.js +10 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-queue-options.js.map +1 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-subscriber.service.d.ts +18 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-subscriber.service.d.ts.map +1 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-subscriber.service.js +45 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-subscriber.service.js.map +1 -0
- package/dist/jobs/redis/chatter-mention-notification-email-publisher-redis.service.d.ts +12 -0
- package/dist/jobs/redis/chatter-mention-notification-email-publisher-redis.service.d.ts.map +1 -0
- package/dist/jobs/redis/chatter-mention-notification-email-publisher-redis.service.js +39 -0
- package/dist/jobs/redis/chatter-mention-notification-email-publisher-redis.service.js.map +1 -0
- package/dist/jobs/redis/chatter-mention-notification-email-queue-options-redis.d.ts +8 -0
- package/dist/jobs/redis/chatter-mention-notification-email-queue-options-redis.d.ts.map +1 -0
- package/dist/jobs/redis/chatter-mention-notification-email-queue-options-redis.js +10 -0
- package/dist/jobs/redis/chatter-mention-notification-email-queue-options-redis.js.map +1 -0
- package/dist/jobs/redis/chatter-mention-notification-email-subscriber-redis.service.d.ts +18 -0
- package/dist/jobs/redis/chatter-mention-notification-email-subscriber-redis.service.d.ts.map +1 -0
- package/dist/jobs/redis/chatter-mention-notification-email-subscriber-redis.service.js +45 -0
- package/dist/jobs/redis/chatter-mention-notification-email-subscriber-redis.service.js.map +1 -0
- package/dist/seeders/seed-data/solid-core-metadata.json +21 -0
- package/dist/services/chatter-message.service.d.ts +7 -1
- package/dist/services/chatter-message.service.d.ts.map +1 -1
- package/dist/services/chatter-message.service.js +85 -4
- package/dist/services/chatter-message.service.js.map +1 -1
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +14 -0
- package/dist/solid-core.module.js.map +1 -1
- package/dist-tests/api/authenticate.spec.js +119 -0
- package/dist-tests/api/authenticate.spec.js.map +1 -0
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js +97 -0
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js.map +1 -0
- package/dist-tests/api/ping.spec.js +21 -0
- package/dist-tests/api/ping.spec.js.map +1 -0
- package/dist-tests/helpers/auth.js +41 -0
- package/dist-tests/helpers/auth.js.map +1 -0
- package/dist-tests/helpers/env.js +11 -0
- package/dist-tests/helpers/env.js.map +1 -0
- package/docs/agent-builder/notebook-lm-prompt-for-agent-builder.md +136 -0
- package/docs/agent-builder/team-ready-note-agent-builder.md +305 -0
- package/docs/agent-hub-grooming.md +301 -0
- package/docs/dashboards/AGENTIC_DASHBOARD_IMPLEMENTATION_PLAN.md +438 -0
- package/docs/dashboards/dashboard-curl-smoke-tests.txt +146 -0
- package/docs/dashboards/delete-legacy-dashboard-metadata.sql +172 -0
- package/docs/datasource-introspection-ddl-analysis.md +326 -0
- package/docs/datasource-introspection-implementation-plan.md +306 -0
- package/docs/grouping-enhancements.md +89 -0
- package/docs/java-spring/README.md +3 -0
- package/docs/java-spring/solid-core-module-deep-dive-report.md +1317 -0
- package/docs/module-package-import-handoff.md +691 -0
- package/docs/seed-changes.md +65 -0
- package/docs/test-data-workflow.md +200 -0
- package/docs/type-declaration-import-issue.md +24 -0
- package/docs/workflow/business-automation-example-notes.md +309 -0
- package/docs/workflow/data-engineering-pipeline-example-notes.md +330 -0
- package/docs/workflow/foreach-example-notes.md +187 -0
- package/docs/workflow/hello-world-example-notes.md +271 -0
- package/docs/workflow/kestra-concepts-plugins-blueprints.md +315 -0
- package/docs/workflow/loop-until-example-notes.md +198 -0
- package/docs/workflow/microservices-and-apis-example-notes.md +264 -0
- package/docs/workflow/samples.md +25 -0
- package/docs/workflow/what-is-kestra.md +79 -0
- package/docs/workflow/workflow-core-module-handoff-summary.md +191 -0
- package/docs/workflow/workflow-module-brd.md +185 -0
- package/docs/workflow/workflow-module-domain-model.md +252 -0
- package/docs/workflow/workflow-module-metadata-dsl.md +302 -0
- package/docs/workflow/workflow-module-technical-spec.md +293 -0
- package/docs/workflow/workflow-node-type-contracts.md +635 -0
- package/docs/workflow/workflow-node-ui-metadata-contract.md +1262 -0
- package/docs/workflow/workflow-solidx-model-field-spec.md +284 -0
- package/package.json +1 -1
- package/src/dtos/create-chatter-message.dto.ts +5 -0
- package/src/dtos/post-chatter-message.dto.ts +4 -0
- package/src/dtos/update-chatter-message.dto.ts +6 -0
- package/src/dtos/update-chatter-note-message.dto.ts +5 -0
- package/src/entities/chatter-message.entity.ts +3 -0
- package/src/interfaces/chatter-mention-notification.interface.ts +29 -0
- package/src/jobs/chatter-mention-notification-email-queue-handler.service.ts +114 -0
- package/src/jobs/database/chatter-mention-notification-email-publisher-database.service.ts +23 -0
- package/src/jobs/database/chatter-mention-notification-email-queue-options-database.ts +9 -0
- package/src/jobs/database/chatter-mention-notification-email-subscriber-database.service.ts +32 -0
- package/src/jobs/rabbitmq/chatter-mention-notification-email-publisher.service.ts +23 -0
- package/src/jobs/rabbitmq/chatter-mention-notification-email-queue-options.ts +9 -0
- package/src/jobs/rabbitmq/chatter-mention-notification-email-subscriber.service.ts +30 -0
- package/src/jobs/redis/chatter-mention-notification-email-publisher-redis.service.ts +23 -0
- package/src/jobs/redis/chatter-mention-notification-email-queue-options-redis.ts +9 -0
- package/src/jobs/redis/chatter-mention-notification-email-subscriber-redis.service.ts +30 -0
- package/src/seeders/seed-data/email-templates/chatter-mention-notification.handlebars.html +200 -0
- package/src/seeders/seed-data/solid-core-metadata.json +21 -0
- package/src/services/chatter-message.service.ts +97 -2
- package/src/solid-core.module.ts +14 -0
- package/.claude/settings.local.json +0 -16
- package/CLAUDE.md +0 -26
- package/src/services/1.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-chatter-message.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/create-chatter-message.dto.ts"],"names":[],"mappings":"AAIA,qBAAa,uBAAuB;IAIhC,WAAW,EAAE,MAAM,CAAC;IAKpB,cAAc,EAAE,MAAM,CAAC;IAKvB,WAAW,EAAE,MAAM,CAAC;IAKpB,eAAe,EAAE,MAAM,CAAC;IAKxB,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,MAAM,CAAC;IAKf,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,MAAM,CAAC;CAClB"}
|
|
1
|
+
{"version":3,"file":"create-chatter-message.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/create-chatter-message.dto.ts"],"names":[],"mappings":"AAIA,qBAAa,uBAAuB;IAIhC,WAAW,EAAE,MAAM,CAAC;IAKpB,cAAc,EAAE,MAAM,CAAC;IAKvB,WAAW,EAAE,MAAM,CAAC;IAKpB,mBAAmB,EAAE,MAAM,CAAC;IAK5B,eAAe,EAAE,MAAM,CAAC;IAKxB,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,MAAM,CAAC;IAKf,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -16,7 +16,7 @@ const class_validator_1 = require("class-validator");
|
|
|
16
16
|
const class_validator_2 = require("class-validator");
|
|
17
17
|
class CreateChatterMessageDto {
|
|
18
18
|
static _OPENAPI_METADATA_FACTORY() {
|
|
19
|
-
return { messageType: { required: true, type: () => String }, messageSubType: { required: true, type: () => String }, messageBody: { required: true, type: () => String }, coModelEntityId: { required: true, type: () => Number }, coModelName: { required: true, type: () => String }, userId: { required: true, type: () => Number }, userUserKey: { required: true, type: () => String }, status: { required: true, type: () => String } };
|
|
19
|
+
return { messageType: { required: true, type: () => String }, messageSubType: { required: true, type: () => String }, messageBody: { required: true, type: () => String }, messageBodyMentions: { required: true, type: () => String }, coModelEntityId: { required: true, type: () => Number }, coModelName: { required: true, type: () => String }, userId: { required: true, type: () => Number }, userUserKey: { required: true, type: () => String }, status: { required: true, type: () => String } };
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
exports.CreateChatterMessageDto = CreateChatterMessageDto;
|
|
@@ -38,6 +38,12 @@ __decorate([
|
|
|
38
38
|
(0, swagger_1.ApiProperty)(),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], CreateChatterMessageDto.prototype, "messageBody", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_2.IsOptional)(),
|
|
43
|
+
(0, class_validator_1.IsString)(),
|
|
44
|
+
(0, swagger_1.ApiProperty)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], CreateChatterMessageDto.prototype, "messageBodyMentions", void 0);
|
|
41
47
|
__decorate([
|
|
42
48
|
(0, class_validator_2.IsNotEmpty)(),
|
|
43
49
|
(0, class_validator_2.IsInt)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-chatter-message.dto.js","sourceRoot":"","sources":["../../src/dtos/create-chatter-message.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAA2C;AAC3C,qDAAgE;AAEhE,MAAa,uBAAuB;;;;
|
|
1
|
+
{"version":3,"file":"create-chatter-message.dto.js","sourceRoot":"","sources":["../../src/dtos/create-chatter-message.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAA2C;AAC3C,qDAAgE;AAEhE,MAAa,uBAAuB;;;;CA6CnC;AA7CD,0DA6CC;AAzCG;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;4DACM;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;+DACS;AAKvB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;4DACM;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;oEACc;AAK5B;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAW,GAAE;;gEACU;AAKxB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;4DACM;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAW,GAAE;;uDACC;AAKf;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,GAAE;;4DACM;AAKpB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,GAAE;;uDACC","sourcesContent":["import { ApiProperty } from '@nestjs/swagger';\nimport { IsString } from 'class-validator';\nimport { IsNotEmpty, IsInt, IsOptional } from 'class-validator';\n\nexport class CreateChatterMessageDto {\n @IsNotEmpty()\n @IsString()\n @ApiProperty()\n messageType: string;\n\n @IsNotEmpty()\n @IsString()\n @ApiProperty()\n messageSubType: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n messageBody: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n messageBodyMentions: string;\n\n @IsNotEmpty()\n @IsInt()\n @ApiProperty()\n coModelEntityId: number;\n\n @IsNotEmpty()\n @IsString()\n @ApiProperty()\n coModelName: string;\n\n @IsOptional()\n @IsInt()\n @ApiProperty()\n userId: number;\n\n @IsString()\n @IsOptional()\n @ApiProperty()\n userUserKey: string;\n\n @IsString()\n @IsOptional()\n @ApiProperty()\n status: string;\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-chatter-message.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/post-chatter-message.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,qBAAqB;IAG9B,eAAe,EAAE,MAAM,CAAC;IAIxB,WAAW,EAAE,MAAM,CAAC;IAIpB,WAAW,EAAE,MAAM,CAAC;IAIpB,cAAc,CAAC,EAAE,MAAM,CAAC;IAIxB,YAAY,CAAC,EAAE,MAAM,CAAC;IAItB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
1
|
+
{"version":3,"file":"post-chatter-message.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/post-chatter-message.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,qBAAqB;IAG9B,eAAe,EAAE,MAAM,CAAC;IAIxB,WAAW,EAAE,MAAM,CAAC;IAIpB,WAAW,EAAE,MAAM,CAAC;IAIpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAI7B,cAAc,CAAC,EAAE,MAAM,CAAC;IAIxB,YAAY,CAAC,EAAE,MAAM,CAAC;IAItB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -14,7 +14,7 @@ const openapi = require("@nestjs/swagger");
|
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
class PostChatterMessageDto {
|
|
16
16
|
static _OPENAPI_METADATA_FACTORY() {
|
|
17
|
-
return { coModelEntityId: { required: true, type: () => Number }, coModelName: { required: true, type: () => String }, messageBody: { required: true, type: () => String }, messageSubType: { required: false, type: () => String }, modelUserKey: { required: false, type: () => String }, status: { required: false, type: () => String } };
|
|
17
|
+
return { coModelEntityId: { required: true, type: () => Number }, coModelName: { required: true, type: () => String }, messageBody: { required: true, type: () => String }, messageBodyMentions: { required: false, type: () => String }, messageSubType: { required: false, type: () => String }, modelUserKey: { required: false, type: () => String }, status: { required: false, type: () => String } };
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
exports.PostChatterMessageDto = PostChatterMessageDto;
|
|
@@ -33,6 +33,11 @@ __decorate([
|
|
|
33
33
|
(0, class_validator_1.IsNotEmpty)(),
|
|
34
34
|
__metadata("design:type", String)
|
|
35
35
|
], PostChatterMessageDto.prototype, "messageBody", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], PostChatterMessageDto.prototype, "messageBodyMentions", void 0);
|
|
36
41
|
__decorate([
|
|
37
42
|
(0, class_validator_1.IsString)(),
|
|
38
43
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-chatter-message.dto.js","sourceRoot":"","sources":["../../src/dtos/post-chatter-message.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qDAA6E;AAE7E,MAAa,qBAAqB;;;;
|
|
1
|
+
{"version":3,"file":"post-chatter-message.dto.js","sourceRoot":"","sources":["../../src/dtos/post-chatter-message.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qDAA6E;AAE7E,MAAa,qBAAqB;;;;CA4BjC;AA5BD,sDA4BC;AAzBG;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8DACW;AAIxB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kEACgB;AAI7B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACW;AAIxB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2DACS;AAItB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACG","sourcesContent":["import { IsNotEmpty, IsNumber, IsString, IsOptional } from 'class-validator';\n\nexport class PostChatterMessageDto {\n @IsNumber()\n @IsNotEmpty()\n coModelEntityId: number;\n\n @IsString()\n @IsNotEmpty()\n coModelName: string;\n\n @IsString()\n @IsNotEmpty()\n messageBody: string;\n\n @IsString()\n @IsOptional()\n messageBodyMentions?: string;\n\n @IsString()\n @IsOptional()\n messageSubType?: string;\n\n @IsString()\n @IsOptional()\n modelUserKey?: string;\n\n @IsString()\n @IsOptional()\n status?: string;\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-chatter-message.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/update-chatter-message.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,uBAAuB;IAGhC,EAAE,EAAE,MAAM,CAAC;IAMX,WAAW,EAAE,MAAM,CAAC;IAMpB,cAAc,EAAE,MAAM,CAAC;IAMvB,WAAW,EAAE,MAAM,CAAC;IAMpB,eAAe,EAAE,MAAM,CAAC;IAMxB,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,MAAM,CAAC;IAKf,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,MAAM,CAAC;CAClB"}
|
|
1
|
+
{"version":3,"file":"update-chatter-message.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/update-chatter-message.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,uBAAuB;IAGhC,EAAE,EAAE,MAAM,CAAC;IAMX,WAAW,EAAE,MAAM,CAAC;IAMpB,cAAc,EAAE,MAAM,CAAC;IAMvB,WAAW,EAAE,MAAM,CAAC;IAMpB,mBAAmB,EAAE,MAAM,CAAC;IAM5B,eAAe,EAAE,MAAM,CAAC;IAMxB,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,MAAM,CAAC;IAKf,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -15,7 +15,7 @@ const class_validator_1 = require("class-validator");
|
|
|
15
15
|
const swagger_1 = require("@nestjs/swagger");
|
|
16
16
|
class UpdateChatterMessageDto {
|
|
17
17
|
static _OPENAPI_METADATA_FACTORY() {
|
|
18
|
-
return { id: { required: true, type: () => Number }, messageType: { required: true, type: () => String }, messageSubType: { required: true, type: () => String }, messageBody: { required: true, type: () => String }, coModelEntityId: { required: true, type: () => Number }, coModelName: { required: true, type: () => String }, userId: { required: true, type: () => Number }, userUserKey: { required: true, type: () => String }, status: { required: true, type: () => String } };
|
|
18
|
+
return { id: { required: true, type: () => Number }, messageType: { required: true, type: () => String }, messageSubType: { required: true, type: () => String }, messageBody: { required: true, type: () => String }, messageBodyMentions: { required: true, type: () => String }, coModelEntityId: { required: true, type: () => Number }, coModelName: { required: true, type: () => String }, userId: { required: true, type: () => Number }, userUserKey: { required: true, type: () => String }, status: { required: true, type: () => String } };
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
exports.UpdateChatterMessageDto = UpdateChatterMessageDto;
|
|
@@ -45,6 +45,13 @@ __decorate([
|
|
|
45
45
|
(0, swagger_1.ApiProperty)(),
|
|
46
46
|
__metadata("design:type", String)
|
|
47
47
|
], UpdateChatterMessageDto.prototype, "messageBody", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
50
|
+
(0, class_validator_1.IsOptional)(),
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
(0, swagger_1.ApiProperty)(),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], UpdateChatterMessageDto.prototype, "messageBodyMentions", void 0);
|
|
48
55
|
__decorate([
|
|
49
56
|
(0, class_validator_1.IsNotEmpty)(),
|
|
50
57
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-chatter-message.dto.js","sourceRoot":"","sources":["../../src/dtos/update-chatter-message.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qDAA0E;AAC1E,6CAA8C;AAE9C,MAAa,uBAAuB;;;;
|
|
1
|
+
{"version":3,"file":"update-chatter-message.dto.js","sourceRoot":"","sources":["../../src/dtos/update-chatter-message.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qDAA0E;AAC1E,6CAA8C;AAE9C,MAAa,uBAAuB;;;;CAuDnC;AAvDD,0DAuDC;AApDG;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;mDACG;AAMX;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;4DACM;AAMpB;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;+DACS;AAMvB;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;4DACM;AAMpB;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;oEACc;AAM5B;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAW,GAAE;;gEACU;AAMxB;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;4DACM;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAW,GAAE;;uDACC;AAKf;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,GAAE;;4DACM;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;uDACC","sourcesContent":["import { IsInt, IsOptional, IsString, IsNotEmpty } from 'class-validator';\nimport { ApiProperty } from '@nestjs/swagger';\n\nexport class UpdateChatterMessageDto {\n @IsOptional()\n @IsInt()\n id: number;\n\n @IsNotEmpty()\n @IsOptional()\n @IsString()\n @ApiProperty()\n messageType: string;\n\n @IsNotEmpty()\n @IsOptional()\n @IsString()\n @ApiProperty()\n messageSubType: string;\n\n @IsNotEmpty()\n @IsOptional()\n @IsString()\n @ApiProperty()\n messageBody: string;\n\n @IsNotEmpty()\n @IsOptional()\n @IsString()\n @ApiProperty()\n messageBodyMentions: string;\n\n @IsNotEmpty()\n @IsOptional()\n @IsInt()\n @ApiProperty()\n coModelEntityId: number;\n\n @IsNotEmpty()\n @IsOptional()\n @IsString()\n @ApiProperty()\n coModelName: string;\n\n @IsOptional()\n @IsInt()\n @ApiProperty()\n userId: number;\n\n @IsString()\n @IsOptional()\n @ApiProperty()\n userUserKey: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n status: string;\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-chatter-note-message.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/update-chatter-note-message.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,2BAA2B;IAIpC,WAAW,EAAE,MAAM,CAAC;IAKpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC"}
|
|
1
|
+
{"version":3,"file":"update-chatter-note-message.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/update-chatter-note-message.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,2BAA2B;IAIpC,WAAW,EAAE,MAAM,CAAC;IAKpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAK7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC"}
|
|
@@ -15,7 +15,7 @@ const swagger_1 = require("@nestjs/swagger");
|
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
16
16
|
class UpdateChatterNoteMessageDto {
|
|
17
17
|
static _OPENAPI_METADATA_FACTORY() {
|
|
18
|
-
return { messageBody: { required: true, type: () => String }, removeAttachmentIds: { required: false, type: () => String } };
|
|
18
|
+
return { messageBody: { required: true, type: () => String }, messageBodyMentions: { required: false, type: () => String }, removeAttachmentIds: { required: false, type: () => String } };
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
exports.UpdateChatterNoteMessageDto = UpdateChatterNoteMessageDto;
|
|
@@ -25,6 +25,12 @@ __decorate([
|
|
|
25
25
|
(0, swagger_1.ApiProperty)(),
|
|
26
26
|
__metadata("design:type", String)
|
|
27
27
|
], UpdateChatterNoteMessageDto.prototype, "messageBody", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
(0, swagger_1.ApiProperty)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], UpdateChatterNoteMessageDto.prototype, "messageBodyMentions", void 0);
|
|
28
34
|
__decorate([
|
|
29
35
|
(0, class_validator_1.IsString)(),
|
|
30
36
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-chatter-note-message.dto.js","sourceRoot":"","sources":["../../src/dtos/update-chatter-note-message.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAAmE;AAEnE,MAAa,2BAA2B;;;;
|
|
1
|
+
{"version":3,"file":"update-chatter-note-message.dto.js","sourceRoot":"","sources":["../../src/dtos/update-chatter-note-message.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAAmE;AAEnE,MAAa,2BAA2B;;;;CAevC;AAfD,kEAeC;AAXG;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,GAAE;;gEACM;AAKpB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,GAAE;;wEACe;AAK7B;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,qDAAqD,EAAE,CAAC;;wEACxE","sourcesContent":["import { ApiProperty } from '@nestjs/swagger';\nimport { IsNotEmpty, IsOptional, IsString } from 'class-validator';\n\nexport class UpdateChatterNoteMessageDto {\n @IsString()\n @IsOptional()\n @ApiProperty()\n messageBody: string;\n\n @IsString()\n @IsOptional()\n @ApiProperty()\n messageBodyMentions?: string;\n\n @IsString()\n @IsOptional()\n @ApiProperty({ required: false, description: 'Comma-separated media IDs to remove from this note.' })\n removeAttachmentIds?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatter-message.entity.d.ts","sourceRoot":"","sources":["../../src/entities/chatter-message.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,qBAEa,cAAe,SAAQ,YAAY;IAG5C,WAAW,EAAE,MAAM,CAAC;IAIpB,cAAc,EAAE,MAAM,CAAC;IAGvB,WAAW,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"chatter-message.entity.d.ts","sourceRoot":"","sources":["../../src/entities/chatter-message.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,qBAEa,cAAe,SAAQ,YAAY;IAG5C,WAAW,EAAE,MAAM,CAAC;IAIpB,cAAc,EAAE,MAAM,CAAC;IAGvB,WAAW,EAAE,MAAM,CAAC;IAGpB,mBAAmB,EAAE,MAAM,CAAC;IAI5B,eAAe,EAAE,MAAM,CAAC;IAIxB,WAAW,EAAE,MAAM,CAAC;IAKpB,IAAI,EAAE,IAAI,CAAC;IAGX,qBAAqB,EAAE,qBAAqB,EAAE,CAAC;IAI/C,gBAAgB,EAAE,MAAM,CAAC;IAGzB,YAAY,EAAE,MAAM,CAAC;IAGrB,MAAM,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -18,7 +18,7 @@ const chatter_message_details_entity_1 = require("./chatter-message-details.enti
|
|
|
18
18
|
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
|
|
19
19
|
let ChatterMessage = class ChatterMessage extends common_entity_1.CommonEntity {
|
|
20
20
|
static _OPENAPI_METADATA_FACTORY() {
|
|
21
|
-
return { messageType: { required: true, type: () => String }, messageSubType: { required: true, type: () => String }, messageBody: { required: true, type: () => String }, coModelEntityId: { required: true, type: () => Number }, coModelName: { required: true, type: () => String }, user: { required: true, type: () => require("./user.entity").User }, chatterMessageDetails: { required: true, type: () => [require("./chatter-message-details.entity").ChatterMessageDetails] }, modelDisplayName: { required: true, type: () => String }, modelUserKey: { required: true, type: () => String }, status: { required: true, type: () => String } };
|
|
21
|
+
return { messageType: { required: true, type: () => String }, messageSubType: { required: true, type: () => String }, messageBody: { required: true, type: () => String }, messageBodyMentions: { required: true, type: () => String }, coModelEntityId: { required: true, type: () => Number }, coModelName: { required: true, type: () => String }, user: { required: true, type: () => require("./user.entity").User }, chatterMessageDetails: { required: true, type: () => [require("./chatter-message-details.entity").ChatterMessageDetails] }, modelDisplayName: { required: true, type: () => String }, modelUserKey: { required: true, type: () => String }, status: { required: true, type: () => String } };
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
exports.ChatterMessage = ChatterMessage;
|
|
@@ -36,6 +36,10 @@ __decorate([
|
|
|
36
36
|
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('longText') }),
|
|
37
37
|
__metadata("design:type", String)
|
|
38
38
|
], ChatterMessage.prototype, "messageBody", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('longText') }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], ChatterMessage.prototype, "messageBodyMentions", void 0);
|
|
39
43
|
__decorate([
|
|
40
44
|
(0, typeorm_1.Index)(),
|
|
41
45
|
(0, typeorm_1.Column)({ type: "integer" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatter-message.entity.js","sourceRoot":"","sources":["../../src/entities/chatter-message.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAAyD;AACzD,qCAAkF;AAClF,+CAA+C;AAC/C,qFAAyE;AACzE,oEAA8D;AAIvD,IAAM,cAAc,GAApB,MAAM,cAA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AAI,EAAE,CAAC;;6DAC5E;AAI/C;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACF;AAGzB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACN;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;;8CAChB;yBAvCN,cAAc;IAF1B,IAAA,eAAK,EAAC,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;IACzC,IAAA,gBAAM,EAAC,oBAAoB,CAAC;GAChB,cAAc,CAwC1B","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity'\nimport { Entity, Column, Index, JoinColumn, ManyToOne, OneToMany } from 'typeorm';\nimport { User } from 'src/entities/user.entity'\nimport { ChatterMessageDetails } from './chatter-message-details.entity';\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\n\n@Index([\"coModelName\", \"coModelEntityId\"])\n@Entity(\"ss_chatter_message\")\nexport class ChatterMessage extends CommonEntity {\n @Index()\n @Column({ type: \"varchar\" })\n messageType: string; // audit | custom \n\n @Index()\n @Column({ type: \"varchar\" })\n messageSubType: string; // audit_update | audit_insert | audit_delete | custom | note | task\n\n @Column({ nullable: true, ...getColumnType('longText') })\n messageBody: string;\n\n @Column({ nullable: true, ...getColumnType('longText') })\n messageBodyMentions: string;\n\n @Index()\n @Column({ type: \"integer\" })\n coModelEntityId: number;\n\n @Index()\n @Column({ type: \"varchar\" })\n coModelName: string;\n\n @Index()\n @ManyToOne(() => User, { nullable: true })\n @JoinColumn()\n user: User;\n\n @OneToMany(() => ChatterMessageDetails, (chatterMessageDetails) => chatterMessageDetails.chatterMessage, { cascade: true })\n chatterMessageDetails: ChatterMessageDetails[];\n\n @Index()\n @Column({ nullable: true })\n modelDisplayName: string;\n\n @Column({ nullable: true })\n modelUserKey: string;\n\n @Column({ default: 'pending' })\n status: string; // pending | completed\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface ChatterMentionNotificationMention {
|
|
2
|
+
id?: number;
|
|
3
|
+
username: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ChatterMentionNotificationActor {
|
|
7
|
+
id?: number;
|
|
8
|
+
username?: string;
|
|
9
|
+
email?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ChatterMentionNotificationEntity {
|
|
12
|
+
id: number;
|
|
13
|
+
modelName: string;
|
|
14
|
+
moduleName?: string;
|
|
15
|
+
displayName: string;
|
|
16
|
+
userKey?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ChatterMentionNotificationPayload {
|
|
19
|
+
templateName: string;
|
|
20
|
+
mentions: ChatterMentionNotificationMention[];
|
|
21
|
+
actor: ChatterMentionNotificationActor;
|
|
22
|
+
noteBody: string;
|
|
23
|
+
entity: ChatterMentionNotificationEntity;
|
|
24
|
+
parentEntity: string;
|
|
25
|
+
parentEntityId: number;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=chatter-mention-notification.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatter-mention-notification.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/chatter-mention-notification.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iCAAiC;IAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,+BAA+B;IAC5C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gCAAgC;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iCAAiC;IAC9C,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,iCAAiC,EAAE,CAAC;IAC9C,KAAK,EAAE,+BAA+B,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,gCAAgC,CAAC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatter-mention-notification.interface.js","sourceRoot":"","sources":["../../src/interfaces/chatter-mention-notification.interface.ts"],"names":[],"mappings":"","sourcesContent":["export interface ChatterMentionNotificationMention {\n id?: number;\n username: string;\n displayName: string;\n}\n\nexport interface ChatterMentionNotificationActor {\n id?: number;\n username?: string;\n email?: string;\n}\n\nexport interface ChatterMentionNotificationEntity {\n id: number;\n modelName: string;\n moduleName?: string;\n displayName: string;\n userKey?: string;\n}\n\nexport interface ChatterMentionNotificationPayload {\n templateName: string;\n mentions: ChatterMentionNotificationMention[];\n actor: ChatterMentionNotificationActor;\n noteBody: string;\n entity: ChatterMentionNotificationEntity;\n parentEntity: string;\n parentEntityId: number;\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MailFactory } from '../factories/mail.factory';
|
|
2
|
+
import { ChatterMentionNotificationPayload } from '../interfaces/chatter-mention-notification.interface';
|
|
3
|
+
import { QueueMessage } from '../interfaces/mq';
|
|
4
|
+
import { UserRepository } from '../repository/user.repository';
|
|
5
|
+
import { SettingService } from '../services/setting.service';
|
|
6
|
+
export declare class ChatterMentionNotificationEmailQueueHandler {
|
|
7
|
+
private readonly mailFactory;
|
|
8
|
+
private readonly userRepository;
|
|
9
|
+
private readonly settingService;
|
|
10
|
+
private readonly logger;
|
|
11
|
+
constructor(mailFactory: MailFactory, userRepository: UserRepository, settingService: SettingService);
|
|
12
|
+
private buildAdminRecordFormUrl;
|
|
13
|
+
handle(message: QueueMessage<ChatterMentionNotificationPayload>): Promise<{
|
|
14
|
+
sent: number;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=chatter-mention-notification-email-queue-handler.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatter-mention-notification-email-queue-handler.service.d.ts","sourceRoot":"","sources":["../../src/jobs/chatter-mention-notification-email-queue-handler.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,iCAAiC,EAAE,MAAM,uDAAuD,CAAC;AAC1G,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAI9D,qBACa,2CAA2C;IAIhD,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,cAAc;IALnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgE;gBAGlE,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc;IAGnD,OAAO,CAAC,uBAAuB;IAUzB,MAAM,CAAC,OAAO,EAAE,YAAY,CAAC,iCAAiC,CAAC;;;CAoFxE"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var ChatterMentionNotificationEmailQueueHandler_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.ChatterMentionNotificationEmailQueueHandler = void 0;
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const mail_factory_1 = require("../factories/mail.factory");
|
|
16
|
+
const user_repository_1 = require("../repository/user.repository");
|
|
17
|
+
const setting_service_1 = require("../services/setting.service");
|
|
18
|
+
const typeorm_1 = require("typeorm");
|
|
19
|
+
let ChatterMentionNotificationEmailQueueHandler = ChatterMentionNotificationEmailQueueHandler_1 = class ChatterMentionNotificationEmailQueueHandler {
|
|
20
|
+
constructor(mailFactory, userRepository, settingService) {
|
|
21
|
+
this.mailFactory = mailFactory;
|
|
22
|
+
this.userRepository = userRepository;
|
|
23
|
+
this.settingService = settingService;
|
|
24
|
+
this.logger = new common_1.Logger(ChatterMentionNotificationEmailQueueHandler_1.name);
|
|
25
|
+
}
|
|
26
|
+
buildAdminRecordFormUrl(frontendAdminBaseUrl, moduleName, modelName, recordId) {
|
|
27
|
+
if (!frontendAdminBaseUrl || !moduleName || !modelName || !recordId)
|
|
28
|
+
return '';
|
|
29
|
+
const normalizedModelName = modelName
|
|
30
|
+
.trim()
|
|
31
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
32
|
+
.replace(/[_\s]+/g, '-')
|
|
33
|
+
.toLowerCase();
|
|
34
|
+
return `${frontendAdminBaseUrl.replace(/\/+$/, '')}/admin/core/${moduleName.trim()}/${normalizedModelName}/form/${recordId}`;
|
|
35
|
+
}
|
|
36
|
+
async handle(message) {
|
|
37
|
+
const mailService = this.mailFactory.getMailService();
|
|
38
|
+
const payload = message.payload;
|
|
39
|
+
if (!payload?.mentions?.length) {
|
|
40
|
+
this.logger.debug('Skipping chatter mention notification because no mentions were provided.');
|
|
41
|
+
return { sent: 0 };
|
|
42
|
+
}
|
|
43
|
+
const mentionUserIds = payload.mentions
|
|
44
|
+
.map(mention => Number(mention.id))
|
|
45
|
+
.filter(id => Number.isInteger(id) && id > 0);
|
|
46
|
+
const userIdsToLoad = Array.from(new Set([
|
|
47
|
+
...mentionUserIds,
|
|
48
|
+
...(payload.actor?.id ? [Number(payload.actor.id)] : []),
|
|
49
|
+
]));
|
|
50
|
+
if (userIdsToLoad.length === 0) {
|
|
51
|
+
this.logger.debug('Skipping chatter mention notification because mention user ids were not provided.');
|
|
52
|
+
return { sent: 0 };
|
|
53
|
+
}
|
|
54
|
+
const users = await this.userRepository.find({
|
|
55
|
+
where: { id: (0, typeorm_1.In)(userIdsToLoad) },
|
|
56
|
+
});
|
|
57
|
+
const usersById = new Map(users.map(user => [Number(user.id), user]));
|
|
58
|
+
const actor = payload.actor?.id ? usersById.get(Number(payload.actor.id)) : null;
|
|
59
|
+
const recipients = Array.from(new Set(mentionUserIds))
|
|
60
|
+
.map(id => {
|
|
61
|
+
const user = usersById.get(id);
|
|
62
|
+
const mention = payload.mentions.find(item => Number(item.id) === id);
|
|
63
|
+
return {
|
|
64
|
+
id,
|
|
65
|
+
username: user?.username || mention?.username || '',
|
|
66
|
+
displayName: user?.fullName || mention?.displayName || user?.username || mention?.username || '',
|
|
67
|
+
email: user?.email || '',
|
|
68
|
+
};
|
|
69
|
+
})
|
|
70
|
+
.filter(recipient => Boolean(recipient.email));
|
|
71
|
+
if (recipients.length === 0) {
|
|
72
|
+
this.logger.debug('Skipping chatter mention notification because no mentioned users have email addresses.');
|
|
73
|
+
return { sent: 0 };
|
|
74
|
+
}
|
|
75
|
+
const frontendAdminBaseUrl = this.settingService.getConfigValue('frontendAdminBaseUrl');
|
|
76
|
+
const commonTemplateParams = {
|
|
77
|
+
mentionedByDisplayName: actor?.fullName || payload.actor?.username || payload.actor?.email || 'Someone',
|
|
78
|
+
mentionedByEmail: actor?.email || payload.actor?.email,
|
|
79
|
+
noteBody: payload.noteBody,
|
|
80
|
+
entityDisplayName: payload.entity.displayName,
|
|
81
|
+
entityUserKey: payload.entity.userKey,
|
|
82
|
+
entityFormUrl: this.buildAdminRecordFormUrl(frontendAdminBaseUrl, payload.entity.moduleName, payload.entity.modelName, payload.entity.id),
|
|
83
|
+
solidAppName: this.settingService.getConfigValue('appTitle'),
|
|
84
|
+
solidAppWebsiteUrl: this.settingService.getConfigValue('solidAppWebsiteUrl'),
|
|
85
|
+
companyLogoUrl: this.settingService.getConfigValue('companylogo'),
|
|
86
|
+
};
|
|
87
|
+
let sent = 0;
|
|
88
|
+
for (const recipient of recipients) {
|
|
89
|
+
await mailService.sendEmailUsingTemplate(recipient.email, payload.templateName, {
|
|
90
|
+
...commonTemplateParams,
|
|
91
|
+
mentionedUserDisplayName: recipient.displayName || recipient.username,
|
|
92
|
+
mentionedUserUsername: recipient.username,
|
|
93
|
+
}, false, null, null, payload.parentEntity, payload.parentEntityId);
|
|
94
|
+
sent += 1;
|
|
95
|
+
}
|
|
96
|
+
return { sent };
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
exports.ChatterMentionNotificationEmailQueueHandler = ChatterMentionNotificationEmailQueueHandler;
|
|
100
|
+
exports.ChatterMentionNotificationEmailQueueHandler = ChatterMentionNotificationEmailQueueHandler = ChatterMentionNotificationEmailQueueHandler_1 = __decorate([
|
|
101
|
+
(0, common_1.Injectable)(),
|
|
102
|
+
__metadata("design:paramtypes", [mail_factory_1.MailFactory,
|
|
103
|
+
user_repository_1.UserRepository,
|
|
104
|
+
setting_service_1.SettingService])
|
|
105
|
+
], ChatterMentionNotificationEmailQueueHandler);
|
|
106
|
+
//# sourceMappingURL=chatter-mention-notification-email-queue-handler.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatter-mention-notification-email-queue-handler.service.js","sourceRoot":"","sources":["../../src/jobs/chatter-mention-notification-email-queue-handler.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,4DAAyD;AAGzD,mEAAgE;AAChE,iEAA8D;AAE9D,qCAA6B;AAGtB,IAAM,2CAA2C,mDAAjD,MAAM,2CAA2C;IAGpD,YACqB,WAAwB,EACxB,cAA8B,EAC9B,cAA8B;QAF9B,gBAAW,GAAX,WAAW,CAAa;QACxB,mBAAc,GAAd,cAAc,CAAgB;QAC9B,mBAAc,GAAd,cAAc,CAAgB;QALlC,WAAM,GAAG,IAAI,eAAM,CAAC,6CAA2C,CAAC,IAAI,CAAC,CAAC;IAMpF,CAAC;IAEI,uBAAuB,CAAC,oBAA4B,EAAE,UAAkB,EAAE,SAAiB,EAAE,QAAgB;QACjH,IAAI,CAAC,oBAAoB,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS,IAAI,CAAC,QAAQ;YAAE,OAAO,EAAE,CAAC;QAC/E,MAAM,mBAAmB,GAAG,SAAS;aAChC,IAAI,EAAE;aACN,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;aACtC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;aACvB,WAAW,EAAE,CAAC;QACnB,OAAO,GAAG,oBAAoB,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,eAAe,UAAU,CAAC,IAAI,EAAE,IAAI,mBAAmB,SAAS,QAAQ,EAAE,CAAC;IACjI,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAwD;QACjE,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC;QACtD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAEhC,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;YAC7B,IAAI,CAAC,MAAM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} from 'src/factories/mail.factory';\nimport { ChatterMentionNotificationPayload } from 'src/interfaces/chatter-mention-notification.interface';\nimport { QueueMessage } from 'src/interfaces/mq';\nimport { UserRepository } from 'src/repository/user.repository';\nimport { SettingService } from 'src/services/setting.service';\nimport type { SolidCoreSetting } from 'src/services/settings/default-settings-provider.service';\nimport { In } from 'typeorm';\n\n@Injectable()\nexport class ChatterMentionNotificationEmailQueueHandler {\n private readonly logger = new Logger(ChatterMentionNotificationEmailQueueHandler.name);\n\n constructor(\n private readonly mailFactory: MailFactory,\n private readonly userRepository: UserRepository,\n private readonly settingService: SettingService,\n ) {}\n\n private buildAdminRecordFormUrl(frontendAdminBaseUrl: string, moduleName: string, modelName: string, recordId: number) {\n if (!frontendAdminBaseUrl || !moduleName || !modelName || !recordId) return '';\n const normalizedModelName = modelName\n .trim()\n .replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n .replace(/[_\\s]+/g, '-')\n .toLowerCase();\n return `${frontendAdminBaseUrl.replace(/\\/+$/, '')}/admin/core/${moduleName.trim()}/${normalizedModelName}/form/${recordId}`;\n }\n\n async handle(message: QueueMessage<ChatterMentionNotificationPayload>) {\n const mailService = this.mailFactory.getMailService();\n const payload = message.payload;\n\n if (!payload?.mentions?.length) {\n this.logger.debug('Skipping chatter mention notification because no mentions were provided.');\n return { sent: 0 };\n }\n\n const mentionUserIds = payload.mentions\n .map(mention => Number(mention.id))\n .filter(id => Number.isInteger(id) && id > 0);\n const userIdsToLoad = Array.from(new Set([\n ...mentionUserIds,\n ...(payload.actor?.id ? [Number(payload.actor.id)] : []),\n ]));\n\n if (userIdsToLoad.length === 0) {\n this.logger.debug('Skipping chatter mention notification because mention user ids were not provided.');\n return { sent: 0 };\n }\n\n const users = await this.userRepository.find({\n where: { id: In(userIdsToLoad) },\n });\n const usersById = new Map(users.map(user => [Number(user.id), user]));\n const actor = payload.actor?.id ? usersById.get(Number(payload.actor.id)) : null;\n const recipients = Array.from(new Set(mentionUserIds))\n .map(id => {\n const user = usersById.get(id);\n const mention = payload.mentions.find(item => Number(item.id) === id);\n return {\n id,\n username: user?.username || mention?.username || '',\n displayName: user?.fullName || mention?.displayName || user?.username || mention?.username || '',\n email: user?.email || '',\n };\n })\n .filter(recipient => Boolean(recipient.email));\n\n if (recipients.length === 0) {\n this.logger.debug('Skipping chatter mention notification because no mentioned users have email addresses.');\n return { sent: 0 };\n }\n\n const frontendAdminBaseUrl = this.settingService.getConfigValue<SolidCoreSetting>('frontendAdminBaseUrl');\n const commonTemplateParams = {\n mentionedByDisplayName: actor?.fullName || payload.actor?.username || payload.actor?.email || 'Someone',\n mentionedByEmail: actor?.email || payload.actor?.email,\n noteBody: payload.noteBody,\n entityDisplayName: payload.entity.displayName,\n entityUserKey: payload.entity.userKey,\n entityFormUrl: this.buildAdminRecordFormUrl(\n frontendAdminBaseUrl,\n payload.entity.moduleName,\n payload.entity.modelName,\n payload.entity.id,\n ),\n solidAppName: this.settingService.getConfigValue<SolidCoreSetting>('appTitle'),\n solidAppWebsiteUrl: this.settingService.getConfigValue<SolidCoreSetting>('solidAppWebsiteUrl'),\n companyLogoUrl: this.settingService.getConfigValue<SolidCoreSetting>('companylogo'),\n };\n\n let sent = 0;\n for (const recipient of recipients) {\n await mailService.sendEmailUsingTemplate(\n recipient.email,\n payload.templateName,\n {\n ...commonTemplateParams,\n mentionedUserDisplayName: recipient.displayName || recipient.username,\n mentionedUserUsername: recipient.username,\n },\n false,\n null,\n null,\n payload.parentEntity,\n payload.parentEntityId,\n );\n sent += 1;\n }\n\n return { sent };\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChatterMentionNotificationPayload } from '../../interfaces/chatter-mention-notification.interface';
|
|
2
|
+
import { QueuesModuleOptions } from '../../interfaces';
|
|
3
|
+
import { MqMessageQueueService } from '../../services/mq-message-queue.service';
|
|
4
|
+
import { MqMessageService } from '../../services/mq-message.service';
|
|
5
|
+
import { DatabasePublisher } from '../../services/queues/database-publisher.service';
|
|
6
|
+
export declare class ChatterMentionNotificationEmailQueuePublisherDatabase extends DatabasePublisher<ChatterMentionNotificationPayload> {
|
|
7
|
+
protected readonly mqMessageService: MqMessageService;
|
|
8
|
+
protected readonly mqMessageQueueService: MqMessageQueueService;
|
|
9
|
+
constructor(mqMessageService: MqMessageService, mqMessageQueueService: MqMessageQueueService);
|
|
10
|
+
options(): QueuesModuleOptions;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=chatter-mention-notification-email-publisher-database.service.d.ts.map
|
package/dist/jobs/database/chatter-mention-notification-email-publisher-database.service.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatter-mention-notification-email-publisher-database.service.d.ts","sourceRoot":"","sources":["../../../src/jobs/database/chatter-mention-notification-email-publisher-database.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iCAAiC,EAAE,MAAM,uDAAuD,CAAC;AAC1G,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAGnF,qBACa,qDAAsD,SAAQ,iBAAiB,CAAC,iCAAiC,CAAC;IAEvH,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB;IACrD,SAAS,CAAC,QAAQ,CAAC,qBAAqB,EAAE,qBAAqB;gBAD5C,gBAAgB,EAAE,gBAAgB,EAClC,qBAAqB,EAAE,qBAAqB;IAKnE,OAAO,IAAI,mBAAmB;CAKjC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ChatterMentionNotificationEmailQueuePublisherDatabase = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const mq_message_queue_service_1 = require("../../services/mq-message-queue.service");
|
|
18
|
+
const mq_message_service_1 = require("../../services/mq-message.service");
|
|
19
|
+
const database_publisher_service_1 = require("../../services/queues/database-publisher.service");
|
|
20
|
+
const chatter_mention_notification_email_queue_options_database_1 = __importDefault(require("./chatter-mention-notification-email-queue-options-database"));
|
|
21
|
+
let ChatterMentionNotificationEmailQueuePublisherDatabase = class ChatterMentionNotificationEmailQueuePublisherDatabase extends database_publisher_service_1.DatabasePublisher {
|
|
22
|
+
constructor(mqMessageService, mqMessageQueueService) {
|
|
23
|
+
super(mqMessageService, mqMessageQueueService);
|
|
24
|
+
this.mqMessageService = mqMessageService;
|
|
25
|
+
this.mqMessageQueueService = mqMessageQueueService;
|
|
26
|
+
}
|
|
27
|
+
options() {
|
|
28
|
+
return {
|
|
29
|
+
...chatter_mention_notification_email_queue_options_database_1.default
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.ChatterMentionNotificationEmailQueuePublisherDatabase = ChatterMentionNotificationEmailQueuePublisherDatabase;
|
|
34
|
+
exports.ChatterMentionNotificationEmailQueuePublisherDatabase = ChatterMentionNotificationEmailQueuePublisherDatabase = __decorate([
|
|
35
|
+
(0, common_1.Injectable)(),
|
|
36
|
+
__metadata("design:paramtypes", [mq_message_service_1.MqMessageService,
|
|
37
|
+
mq_message_queue_service_1.MqMessageQueueService])
|
|
38
|
+
], ChatterMentionNotificationEmailQueuePublisherDatabase);
|
|
39
|
+
//# sourceMappingURL=chatter-mention-notification-email-publisher-database.service.js.map
|
package/dist/jobs/database/chatter-mention-notification-email-publisher-database.service.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatter-mention-notification-email-publisher-database.service.js","sourceRoot":"","sources":["../../../src/jobs/database/chatter-mention-notification-email-publisher-database.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAG5C,sFAA8E;AAC9E,0EAAmE;AACnE,iGAAmF;AACnF,4JAAuF;AAGhF,IAAM,qDAAqD,GAA3D,MAAM,qDAAsD,SAAQ,8CAAoD;IAC3H,YACuB,gBAAkC,EAClC,qBAA4C;QAE/D,KAAK,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;QAH5B,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,0BAAqB,GAArB,qBAAqB,CAAuB;IAGnE,CAAC;IAED,OAAO;QACH,OAAO;YACH,GAAG,mEAAY;SAClB,CAAC;IACN,CAAC;CACJ,CAAA;AAbY,sHAAqD;gEAArD,qDAAqD;IADjE,IAAA,mBAAU,GAAE;qCAGgC,qCAAgB;QACX,gDAAqB;GAH1D,qDAAqD,CAajE","sourcesContent":["import { Injectable } from '@nestjs/common';\nimport { ChatterMentionNotificationPayload } from 'src/interfaces/chatter-mention-notification.interface';\nimport { QueuesModuleOptions } from 'src/interfaces';\nimport { MqMessageQueueService } from 'src/services/mq-message-queue.service';\nimport { MqMessageService } from 'src/services/mq-message.service';\nimport { DatabasePublisher } from 'src/services/queues/database-publisher.service';\nimport queueOptions from './chatter-mention-notification-email-queue-options-database';\n\n@Injectable()\nexport class ChatterMentionNotificationEmailQueuePublisherDatabase extends DatabasePublisher<ChatterMentionNotificationPayload> {\n constructor(\n protected readonly mqMessageService: MqMessageService,\n protected readonly mqMessageQueueService: MqMessageQueueService,\n ) {\n super(mqMessageService, mqMessageQueueService);\n }\n\n options(): QueuesModuleOptions {\n return {\n ...queueOptions\n };\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatter-mention-notification-email-queue-options-database.d.ts","sourceRoot":"","sources":["../../../src/jobs/database/chatter-mention-notification-email-queue-options-database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;;;;;;AAI5C,wBAIE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const interfaces_1 = require("../../interfaces");
|
|
4
|
+
const QUEUE_NAME = 'solid_chatter_mention_notification_email_queue_database';
|
|
5
|
+
exports.default = {
|
|
6
|
+
name: QUEUE_NAME,
|
|
7
|
+
type: interfaces_1.BrokerType.Database,
|
|
8
|
+
queueName: QUEUE_NAME,
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chatter-mention-notification-email-queue-options-database.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatter-mention-notification-email-queue-options-database.js","sourceRoot":"","sources":["../../../src/jobs/database/chatter-mention-notification-email-queue-options-database.ts"],"names":[],"mappings":";;AAAA,iDAA4C;AAE5C,MAAM,UAAU,GAAG,yDAAyD,CAAC;AAE7E,kBAAe;IACX,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,uBAAU,CAAC,QAAQ;IACzB,SAAS,EAAE,UAAU;CACxB,CAAC","sourcesContent":["import { BrokerType } from \"src/interfaces\";\n\nconst QUEUE_NAME = 'solid_chatter_mention_notification_email_queue_database';\n\nexport default {\n name: QUEUE_NAME,\n type: BrokerType.Database,\n queueName: QUEUE_NAME,\n};\n"]}
|
package/dist/jobs/database/chatter-mention-notification-email-subscriber-database.service.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ChatterMentionNotificationEmailQueueHandler } from '../../jobs/chatter-mention-notification-email-queue-handler.service';
|
|
2
|
+
import { ChatterMentionNotificationPayload } from '../../interfaces/chatter-mention-notification.interface';
|
|
3
|
+
import { QueuesModuleOptions } from '../../interfaces';
|
|
4
|
+
import { QueueMessage } from '../../interfaces/mq';
|
|
5
|
+
import { MqMessageQueueService } from '../../services/mq-message-queue.service';
|
|
6
|
+
import { MqMessageService } from '../../services/mq-message.service';
|
|
7
|
+
import { PollerService } from '../../services/poller.service';
|
|
8
|
+
import { DatabaseSubscriber } from '../../services/queues/database-subscriber.service';
|
|
9
|
+
export declare class ChatterMentionNotificationEmailQueueSubscriberDatabase extends DatabaseSubscriber<ChatterMentionNotificationPayload> {
|
|
10
|
+
readonly mqMessageService: MqMessageService;
|
|
11
|
+
readonly mqMessageQueueService: MqMessageQueueService;
|
|
12
|
+
readonly poller: PollerService;
|
|
13
|
+
private readonly handler;
|
|
14
|
+
constructor(mqMessageService: MqMessageService, mqMessageQueueService: MqMessageQueueService, poller: PollerService, handler: ChatterMentionNotificationEmailQueueHandler);
|
|
15
|
+
options(): QueuesModuleOptions;
|
|
16
|
+
subscribe(message: QueueMessage<ChatterMentionNotificationPayload>): Promise<{
|
|
17
|
+
sent: number;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=chatter-mention-notification-email-subscriber-database.service.d.ts.map
|
package/dist/jobs/database/chatter-mention-notification-email-subscriber-database.service.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatter-mention-notification-email-subscriber-database.service.d.ts","sourceRoot":"","sources":["../../../src/jobs/database/chatter-mention-notification-email-subscriber-database.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2CAA2C,EAAE,MAAM,mEAAmE,CAAC;AAChI,OAAO,EAAE,iCAAiC,EAAE,MAAM,uDAAuD,CAAC;AAC1G,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAGrF,qBACa,sDAAuD,SAAQ,kBAAkB,CAAC,iCAAiC,CAAC;IAEzH,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB;IAC3C,QAAQ,CAAC,qBAAqB,EAAE,qBAAqB;IACrD,QAAQ,CAAC,MAAM,EAAE,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAHf,gBAAgB,EAAE,gBAAgB,EAClC,qBAAqB,EAAE,qBAAqB,EAC5C,MAAM,EAAE,aAAa,EACb,OAAO,EAAE,2CAA2C;IAKzE,OAAO,IAAI,mBAAmB;IAM9B,SAAS,CAAC,OAAO,EAAE,YAAY,CAAC,iCAAiC,CAAC;;;CAGrE"}
|