@solidxai/core 0.0.2 → 0.1.1
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-saved-filters.dto.d.ts.map +1 -1
- package/dist/dtos/create-saved-filters.dto.js.map +1 -1
- package/dist/entities/chatter-message.entity.d.ts.map +1 -1
- package/dist/entities/chatter-message.entity.js +2 -0
- package/dist/entities/chatter-message.entity.js.map +1 -1
- package/dist/helpers/schematic.service.d.ts.map +1 -1
- package/dist/helpers/schematic.service.js +5 -1
- package/dist/helpers/schematic.service.js.map +1 -1
- package/dist/jobs/api-email-queue-options.d.ts.map +1 -1
- package/dist/jobs/api-email-queue-options.js +2 -2
- package/dist/jobs/api-email-queue-options.js.map +1 -1
- package/dist/jobs/chatter-queue-options.js +2 -2
- package/dist/jobs/chatter-queue-options.js.map +1 -1
- package/dist/jobs/computed-field-evaluation-queue-options.js +2 -2
- package/dist/jobs/computed-field-evaluation-queue-options.js.map +1 -1
- package/dist/jobs/database/api-email-queue-options-database.js +2 -2
- package/dist/jobs/database/api-email-queue-options-database.js.map +1 -1
- package/dist/jobs/database/computed-field-evaluation-queue-options-database.js +2 -2
- package/dist/jobs/database/computed-field-evaluation-queue-options-database.js.map +1 -1
- package/dist/jobs/database/generate-code-queue-options-database.js +2 -2
- package/dist/jobs/database/generate-code-queue-options-database.js.map +1 -1
- package/dist/jobs/database/msg91-sms-queue-database-options.d.ts.map +1 -1
- package/dist/jobs/database/msg91-sms-queue-database-options.js +2 -2
- package/dist/jobs/database/msg91-sms-queue-database-options.js.map +1 -1
- package/dist/jobs/database/msg91-whatsapp-queue-options-database.js +2 -2
- package/dist/jobs/database/msg91-whatsapp-queue-options-database.js.map +1 -1
- package/dist/jobs/database/otp-queue-options-database.d.ts.map +1 -1
- package/dist/jobs/database/otp-queue-options-database.js +2 -2
- package/dist/jobs/database/otp-queue-options-database.js.map +1 -1
- package/dist/jobs/database/smtp-email-queue-options-database.js +1 -1
- package/dist/jobs/database/smtp-email-queue-options-database.js.map +1 -1
- package/dist/jobs/database/test-queue-options-database.js +2 -2
- package/dist/jobs/database/test-queue-options-database.js.map +1 -1
- package/dist/jobs/database/three60-whatsapp-queue-options-database.js +2 -2
- package/dist/jobs/database/three60-whatsapp-queue-options-database.js.map +1 -1
- package/dist/jobs/database/trigger-mcp-client-queue-options.js +2 -2
- package/dist/jobs/database/trigger-mcp-client-queue-options.js.map +1 -1
- package/dist/jobs/database/twilio-sms-queue-database-options.js +2 -2
- package/dist/jobs/database/twilio-sms-queue-database-options.js.map +1 -1
- package/dist/jobs/generate-code-queue-options.js +2 -2
- package/dist/jobs/generate-code-queue-options.js.map +1 -1
- package/dist/jobs/msg91-otp-queue-options.d.ts.map +1 -1
- package/dist/jobs/msg91-otp-queue-options.js +2 -2
- package/dist/jobs/msg91-otp-queue-options.js.map +1 -1
- package/dist/jobs/msg91-sms-queue-options.d.ts.map +1 -1
- package/dist/jobs/msg91-sms-queue-options.js +2 -2
- package/dist/jobs/msg91-sms-queue-options.js.map +1 -1
- package/dist/jobs/msg91-whatsapp-queue-options.d.ts.map +1 -1
- package/dist/jobs/msg91-whatsapp-queue-options.js +2 -2
- package/dist/jobs/msg91-whatsapp-queue-options.js.map +1 -1
- package/dist/jobs/smtp-email-queue-options.d.ts.map +1 -1
- package/dist/jobs/smtp-email-queue-options.js +1 -1
- package/dist/jobs/smtp-email-queue-options.js.map +1 -1
- package/dist/jobs/test-queue-options.d.ts.map +1 -1
- package/dist/jobs/test-queue-options.js +2 -2
- package/dist/jobs/test-queue-options.js.map +1 -1
- package/dist/jobs/three60-whatsapp-queue-options.d.ts.map +1 -1
- package/dist/jobs/three60-whatsapp-queue-options.js +2 -2
- package/dist/jobs/three60-whatsapp-queue-options.js.map +1 -1
- package/dist/jobs/three60-whatsapp-subscriber.service.js +2 -2
- package/dist/jobs/three60-whatsapp-subscriber.service.js.map +1 -1
- package/dist/jobs/trigger-mcp-client-queue-options.js +2 -2
- package/dist/jobs/trigger-mcp-client-queue-options.js.map +1 -1
- package/dist/jobs/twilio-sms-queue-options.js +2 -2
- package/dist/jobs/twilio-sms-queue-options.js.map +1 -1
- package/dist/services/chatter-message.service.d.ts.map +1 -1
- package/dist/services/chatter-message.service.js +8 -1
- package/dist/services/chatter-message.service.js.map +1 -1
- package/dist/services/crud-helper.service.js.map +1 -1
- package/dist/services/queues/database-publisher.service.js +0 -1
- package/dist/services/queues/database-publisher.service.js.map +1 -1
- package/dist/services/queues/database-subscriber.service.d.ts.map +1 -1
- package/dist/services/queues/database-subscriber.service.js +14 -1
- package/dist/services/queues/database-subscriber.service.js.map +1 -1
- package/dist/services/queues/rabbitmq-subscriber.service.d.ts.map +1 -1
- package/dist/services/queues/rabbitmq-subscriber.service.js +18 -3
- package/dist/services/queues/rabbitmq-subscriber.service.js.map +1 -1
- package/dist/services/scheduled-jobs/scheduler.service.d.ts +1 -0
- package/dist/services/scheduled-jobs/scheduler.service.d.ts.map +1 -1
- package/dist/services/scheduled-jobs/scheduler.service.js +26 -10
- package/dist/services/scheduled-jobs/scheduler.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/dtos/create-saved-filters.dto.ts +10 -1
- package/src/entities/chatter-message.entity.ts +11 -1
- package/src/helpers/schematic.service.ts +5 -1
- package/src/jobs/api-email-queue-options.ts +2 -6
- package/src/jobs/chatter-queue-options.ts +2 -2
- package/src/jobs/computed-field-evaluation-queue-options.ts +2 -2
- package/src/jobs/database/api-email-queue-options-database.ts +2 -2
- package/src/jobs/database/computed-field-evaluation-queue-options-database.ts +2 -2
- package/src/jobs/database/generate-code-queue-options-database.ts +2 -2
- package/src/jobs/database/msg91-sms-queue-database-options.ts +3 -2
- package/src/jobs/database/msg91-whatsapp-queue-options-database.ts +2 -2
- package/src/jobs/database/otp-queue-options-database.ts +3 -2
- package/src/jobs/database/smtp-email-queue-options-database.ts +1 -1
- package/src/jobs/database/test-queue-options-database.ts +2 -2
- package/src/jobs/database/three60-whatsapp-queue-options-database.ts +2 -2
- package/src/jobs/database/trigger-mcp-client-queue-options.ts +2 -2
- package/src/jobs/database/twilio-sms-queue-database-options.ts +2 -2
- package/src/jobs/generate-code-queue-options.ts +2 -2
- package/src/jobs/msg91-otp-queue-options.ts +3 -8
- package/src/jobs/msg91-sms-queue-options.ts +3 -6
- package/src/jobs/msg91-whatsapp-queue-options.ts +4 -7
- package/src/jobs/smtp-email-queue-options.ts +1 -6
- package/src/jobs/test-queue-options.ts +2 -6
- package/src/jobs/three60-whatsapp-queue-options.ts +4 -7
- package/src/jobs/three60-whatsapp-subscriber.service.ts +1 -1
- package/src/jobs/trigger-mcp-client-queue-options.ts +2 -2
- package/src/jobs/twilio-sms-queue-options.ts +3 -3
- package/src/services/chatter-message.service.ts +32 -26
- package/src/services/crud-helper.service.ts +1 -1
- package/src/services/queues/database-publisher.service.ts +1 -1
- package/src/services/queues/database-subscriber.service.ts +17 -28
- package/src/services/queues/rabbitmq-subscriber.service.ts +21 -5
- package/src/services/scheduled-jobs/scheduler.service.ts +31 -14
package/package.json
CHANGED
|
@@ -7,40 +7,49 @@ export class CreateSavedFiltersDto {
|
|
|
7
7
|
@IsJSON()
|
|
8
8
|
@ApiProperty()
|
|
9
9
|
filterQueryJson: any;
|
|
10
|
+
|
|
10
11
|
@IsNotEmpty()
|
|
11
12
|
@IsString()
|
|
12
13
|
@ApiProperty()
|
|
13
14
|
name: string;
|
|
15
|
+
|
|
14
16
|
@IsOptional()
|
|
15
17
|
@IsBoolean()
|
|
16
18
|
@ApiProperty()
|
|
17
19
|
isPrivate: boolean = false;
|
|
20
|
+
|
|
18
21
|
@IsOptional()
|
|
19
22
|
@IsInt()
|
|
20
23
|
@ApiProperty({ description: "This is the user id field" })
|
|
21
24
|
userId: number;
|
|
25
|
+
|
|
22
26
|
@IsString()
|
|
23
27
|
@IsOptional()
|
|
24
28
|
@ApiProperty({ description: "This is the user id field" })
|
|
25
29
|
userUserKey: string;
|
|
30
|
+
|
|
26
31
|
@IsOptional()
|
|
27
32
|
@IsInt()
|
|
28
33
|
@ApiProperty({ description: "This is the model related to saved filter." })
|
|
29
34
|
modelId: number;
|
|
35
|
+
|
|
30
36
|
@IsString()
|
|
31
37
|
@IsOptional()
|
|
32
38
|
@ApiProperty({ description: "This is the model related to saved filter." })
|
|
33
39
|
modelUserKey: string;
|
|
40
|
+
|
|
34
41
|
@IsOptional()
|
|
35
42
|
@IsInt()
|
|
36
43
|
@ApiProperty({ description: "This is the view related to saved filter." })
|
|
37
44
|
viewId: number;
|
|
45
|
+
|
|
38
46
|
@IsString()
|
|
39
47
|
@IsOptional()
|
|
40
48
|
@ApiProperty({ description: "This is the view related to saved filter." })
|
|
41
49
|
viewUserKey: string;
|
|
50
|
+
|
|
42
51
|
@IsString()
|
|
43
52
|
@IsOptional()
|
|
44
53
|
@ApiProperty({ description: "A brief description providing additional context about the saved filter’s purpose or usage within the view." })
|
|
45
54
|
description: string;
|
|
46
|
-
}
|
|
55
|
+
}
|
|
@@ -8,22 +8,32 @@ export class ChatterMessage extends CommonEntity {
|
|
|
8
8
|
@Index()
|
|
9
9
|
@Column({ type: "varchar" })
|
|
10
10
|
messageType: string; // audit | custom
|
|
11
|
+
|
|
11
12
|
@Column({ type: "varchar" })
|
|
12
13
|
messageSubType: string; // audit_update | audit_insert | audit_delete | custom
|
|
14
|
+
|
|
13
15
|
@Column({ type: "text", nullable: true })
|
|
14
16
|
messageBody: string;
|
|
17
|
+
|
|
15
18
|
@Index()
|
|
16
19
|
@Column({ type: "integer" })
|
|
17
20
|
coModelEntityId: number;
|
|
21
|
+
|
|
22
|
+
@Index()
|
|
18
23
|
@Column({ type: "varchar" })
|
|
19
24
|
coModelName: string;
|
|
25
|
+
|
|
26
|
+
@Index()
|
|
20
27
|
@ManyToOne(() => User, { nullable: true })
|
|
21
28
|
@JoinColumn()
|
|
22
29
|
user: User;
|
|
30
|
+
|
|
23
31
|
@OneToMany(() => ChatterMessageDetails, (chatterMessageDetails) => chatterMessageDetails.chatterMessage, { cascade: true })
|
|
24
32
|
chatterMessageDetails: ChatterMessageDetails[];
|
|
33
|
+
|
|
25
34
|
@Column({ type: "text", nullable: true })
|
|
26
35
|
modelDisplayName: string;
|
|
36
|
+
|
|
27
37
|
@Column({ type: "text", nullable: true })
|
|
28
38
|
modelUserKey: string;
|
|
29
|
-
}
|
|
39
|
+
}
|
|
@@ -48,7 +48,11 @@ export class SchematicService {
|
|
|
48
48
|
) {
|
|
49
49
|
const { fieldNamesForRemoval, ...modelSpecificOptions } = options as ModelAndFieldGenerationOptions;
|
|
50
50
|
const modelArgs = this.buildModelGenerationArgs(modelSpecificOptions);
|
|
51
|
-
const fieldArgs =
|
|
51
|
+
const fieldArgs: string[] = [];
|
|
52
|
+
if (fieldNamesForRemoval && fieldNamesForRemoval.length > 0) {
|
|
53
|
+
const _fieldArgs = this.buildFieldGenerationArgs(fieldNamesForRemoval);
|
|
54
|
+
fieldArgs.push(..._fieldArgs);
|
|
55
|
+
}
|
|
52
56
|
const args = [...baseArgs, ...modelArgs, ...fieldArgs];
|
|
53
57
|
this.logger.debug('schematicCommand args', args);
|
|
54
58
|
return { command: this.SCHEMATICS_COMMAND, args };
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { QueueMessage } from 'src/interfaces/mq';
|
|
2
2
|
import { BrokerType } from "../interfaces";
|
|
3
3
|
|
|
4
|
-
const API_MAIL_QUEUE_NAME = '
|
|
4
|
+
const API_MAIL_QUEUE_NAME = 'solid_api_mail_queue';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
name:
|
|
7
|
+
name: API_MAIL_QUEUE_NAME,
|
|
8
8
|
type: BrokerType.RabbitMQ,
|
|
9
9
|
queueName: API_MAIL_QUEUE_NAME,
|
|
10
|
-
// receive: async (message: QueueMessage<any>) => { // Default receive handler
|
|
11
|
-
// console.log(`Received message: ${JSON.stringify(message)} from queue ${MAIL_QUEUE_NAME}`);
|
|
12
|
-
// return 'Received';
|
|
13
|
-
// },
|
|
14
10
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "../interfaces";
|
|
2
2
|
|
|
3
|
-
const QUEUE_NAME = '
|
|
3
|
+
const QUEUE_NAME = 'solid_computed_field_evaluation_queue';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
name:
|
|
6
|
+
name: QUEUE_NAME,
|
|
7
7
|
type: BrokerType.RabbitMQ,
|
|
8
8
|
queueName: QUEUE_NAME,
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "src/interfaces";
|
|
2
2
|
|
|
3
|
-
const API_MAIL_QUEUE_NAME = '
|
|
3
|
+
const API_MAIL_QUEUE_NAME = 'solid_api_mail_queue_database';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
name:
|
|
6
|
+
name: API_MAIL_QUEUE_NAME,
|
|
7
7
|
type: BrokerType.Database,
|
|
8
8
|
queueName: API_MAIL_QUEUE_NAME,
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "../../interfaces";
|
|
2
2
|
|
|
3
|
-
const QUEUE_NAME = '
|
|
3
|
+
const QUEUE_NAME = 'solid_computed_field_evaluation_queue_database';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
name:
|
|
6
|
+
name: QUEUE_NAME,
|
|
7
7
|
type: BrokerType.Database,
|
|
8
8
|
queueName: QUEUE_NAME,
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "../../interfaces";
|
|
2
2
|
|
|
3
|
-
const QUEUE_NAME = '
|
|
3
|
+
const QUEUE_NAME = 'solid_generate_code_queue_database';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
name:
|
|
6
|
+
name: QUEUE_NAME,
|
|
7
7
|
type: BrokerType.Database,
|
|
8
8
|
queueName: QUEUE_NAME,
|
|
9
9
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "src/interfaces";
|
|
2
2
|
|
|
3
|
-
const SMS_QUEUE_NAME = '
|
|
3
|
+
const SMS_QUEUE_NAME = 'solid_msg91_sms_queue_database';
|
|
4
|
+
|
|
4
5
|
export default {
|
|
5
|
-
name:
|
|
6
|
+
name: SMS_QUEUE_NAME,
|
|
6
7
|
type: BrokerType.Database,
|
|
7
8
|
queueName: SMS_QUEUE_NAME,
|
|
8
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "src/interfaces";
|
|
2
2
|
|
|
3
|
-
const WHATSAPP_QUEUE_NAME = '
|
|
3
|
+
const WHATSAPP_QUEUE_NAME = 'solid_msg91_whatsapp_queue_database';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
name:
|
|
6
|
+
name: WHATSAPP_QUEUE_NAME,
|
|
7
7
|
type: BrokerType.Database,
|
|
8
8
|
queueName: WHATSAPP_QUEUE_NAME,
|
|
9
9
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "src/interfaces";
|
|
2
2
|
|
|
3
|
-
const OTP_QUEUE_NAME = '
|
|
3
|
+
const OTP_QUEUE_NAME = 'solid_msg91_otp_queue_database';
|
|
4
|
+
|
|
4
5
|
export default {
|
|
5
|
-
name:
|
|
6
|
+
name: OTP_QUEUE_NAME,
|
|
6
7
|
type: BrokerType.Database,
|
|
7
8
|
queueName: OTP_QUEUE_NAME,
|
|
8
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "src/interfaces";
|
|
2
2
|
|
|
3
|
-
const WHATSAPP_QUEUE_NAME = '
|
|
3
|
+
const WHATSAPP_QUEUE_NAME = 'solid_three60_whatsapp_queue_database';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
name:
|
|
6
|
+
name: WHATSAPP_QUEUE_NAME,
|
|
7
7
|
type: BrokerType.Database,
|
|
8
8
|
queueName: WHATSAPP_QUEUE_NAME,
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "src/interfaces";
|
|
2
2
|
|
|
3
|
-
const TRIGGER_MCP_CLIENT_QUEUE_NAME = '
|
|
3
|
+
const TRIGGER_MCP_CLIENT_QUEUE_NAME = 'solid_trigger_mcp_client_queue';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
name:
|
|
6
|
+
name: TRIGGER_MCP_CLIENT_QUEUE_NAME,
|
|
7
7
|
type: BrokerType.Database,
|
|
8
8
|
queueName: TRIGGER_MCP_CLIENT_QUEUE_NAME,
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "src/interfaces";
|
|
2
2
|
|
|
3
|
-
const SMS_QUEUE_NAME = '
|
|
3
|
+
const SMS_QUEUE_NAME = 'solid_twilio_sms_queue_database';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
name:
|
|
6
|
+
name: SMS_QUEUE_NAME,
|
|
7
7
|
type: BrokerType.Database,
|
|
8
8
|
queueName: SMS_QUEUE_NAME,
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "../interfaces";
|
|
2
2
|
|
|
3
|
-
const QUEUE_NAME = '
|
|
3
|
+
const QUEUE_NAME = 'solid_generate_code_queue_rabbitmq';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
name:
|
|
6
|
+
name: QUEUE_NAME,
|
|
7
7
|
type: BrokerType.RabbitMQ,
|
|
8
8
|
queueName: QUEUE_NAME,
|
|
9
9
|
};
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { QueueMessage } from 'src/interfaces/mq';
|
|
2
|
-
|
|
3
1
|
import { BrokerType } from "../interfaces";
|
|
4
2
|
|
|
5
|
-
const OTP_QUEUE_NAME = '
|
|
3
|
+
const OTP_QUEUE_NAME = 'solid_msg91_otp_queue';
|
|
4
|
+
|
|
6
5
|
export default {
|
|
7
|
-
name:
|
|
6
|
+
name: OTP_QUEUE_NAME,
|
|
8
7
|
type: BrokerType.RabbitMQ,
|
|
9
8
|
queueName: OTP_QUEUE_NAME,
|
|
10
|
-
// receive: async (message: QueueMessage<any>) => { // Default receive handler
|
|
11
|
-
// console.log(`Received message: ${JSON.stringify(message)} from queue ${SMS_QUEUE_NAME}`);
|
|
12
|
-
// return 'Received';
|
|
13
|
-
// },
|
|
14
9
|
};
|
|
@@ -2,13 +2,10 @@ import { QueueMessage } from 'src/interfaces/mq';
|
|
|
2
2
|
|
|
3
3
|
import { BrokerType } from "../interfaces";
|
|
4
4
|
|
|
5
|
-
const SMS_QUEUE_NAME = '
|
|
5
|
+
const SMS_QUEUE_NAME = 'solid_msg91_sms_queue';
|
|
6
|
+
|
|
6
7
|
export default {
|
|
7
|
-
name:
|
|
8
|
+
name: SMS_QUEUE_NAME,
|
|
8
9
|
type: BrokerType.RabbitMQ,
|
|
9
10
|
queueName: SMS_QUEUE_NAME,
|
|
10
|
-
// receive: async (message: QueueMessage<any>) => { // Default receive handler
|
|
11
|
-
// console.log(`Received message: ${JSON.stringify(message)} from queue ${SMS_QUEUE_NAME}`);
|
|
12
|
-
// return 'Received';
|
|
13
|
-
// },
|
|
14
11
|
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "../interfaces";
|
|
2
2
|
|
|
3
|
-
const MSG91_WHATSAPP_QUEUE_NAME = '
|
|
3
|
+
const MSG91_WHATSAPP_QUEUE_NAME = 'solid_msg91_whatsapp_queue';
|
|
4
|
+
|
|
4
5
|
export default {
|
|
5
|
-
name:
|
|
6
|
+
name: MSG91_WHATSAPP_QUEUE_NAME,
|
|
6
7
|
type: BrokerType.RabbitMQ,
|
|
7
8
|
queueName: MSG91_WHATSAPP_QUEUE_NAME,
|
|
8
|
-
|
|
9
|
-
// console.log(`Received message: ${JSON.stringify(message)} from queue ${SMS_QUEUE_NAME}`);
|
|
10
|
-
// return 'Received';
|
|
11
|
-
// },
|
|
12
|
-
};
|
|
9
|
+
};
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { QueueMessage } from 'src/interfaces/mq';
|
|
2
1
|
import { BrokerType } from "../interfaces";
|
|
3
2
|
|
|
4
3
|
const MAIL_QUEUE_NAME = 'solid_email_queue_v3';
|
|
5
4
|
|
|
6
5
|
export default {
|
|
7
|
-
name:
|
|
6
|
+
name: MAIL_QUEUE_NAME,
|
|
8
7
|
type: BrokerType.RabbitMQ,
|
|
9
8
|
queueName: MAIL_QUEUE_NAME,
|
|
10
|
-
// receive: async (message: QueueMessage<any>) => { // Default receive handler
|
|
11
|
-
// console.log(`Received message: ${JSON.stringify(message)} from queue ${MAIL_QUEUE_NAME}`);
|
|
12
|
-
// return 'Received';
|
|
13
|
-
// },
|
|
14
9
|
};
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "../interfaces";
|
|
2
2
|
|
|
3
|
-
const QUEUE_NAME = '
|
|
3
|
+
const QUEUE_NAME = 'solid_test_queue';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
name:
|
|
6
|
+
name: QUEUE_NAME,
|
|
7
7
|
type: BrokerType.RabbitMQ,
|
|
8
8
|
queueName: QUEUE_NAME,
|
|
9
|
-
// receive: async (message: QueueMessage<any>) => { // Default receive handler
|
|
10
|
-
// console.log(`Received message: ${JSON.stringify(message)} from queue ${MAIL_QUEUE_NAME}`);
|
|
11
|
-
// return 'Received';
|
|
12
|
-
// },
|
|
13
9
|
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "../interfaces";
|
|
2
2
|
|
|
3
|
-
const _WHATSAPP_QUEUE_NAME = '
|
|
3
|
+
const _WHATSAPP_QUEUE_NAME = 'solid_three60_whatsapp_queue';
|
|
4
|
+
|
|
4
5
|
export default {
|
|
5
|
-
name:
|
|
6
|
+
name: _WHATSAPP_QUEUE_NAME,
|
|
6
7
|
type: BrokerType.RabbitMQ,
|
|
7
8
|
queueName: _WHATSAPP_QUEUE_NAME,
|
|
8
|
-
|
|
9
|
-
// console.log(`Received message: ${JSON.stringify(message)} from queue ${SMS_QUEUE_NAME}`);
|
|
10
|
-
// return 'Received';
|
|
11
|
-
// },
|
|
12
|
-
};
|
|
9
|
+
};
|
|
@@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
|
|
|
2
2
|
|
|
3
3
|
import { RabbitMqSubscriber } from 'src/services/queues/rabbitmq-subscriber.service';
|
|
4
4
|
import { QueueMessage } from 'src/interfaces/mq';
|
|
5
|
-
import whatsappQueueOptions from './
|
|
5
|
+
import whatsappQueueOptions from './three60-whatsapp-queue-options';
|
|
6
6
|
import { MqMessageService } from 'src/services/mq-message.service';
|
|
7
7
|
import { MqMessageQueueService } from 'src/services/mq-message-queue.service';
|
|
8
8
|
import { QueuesModuleOptions } from "../interfaces";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "src/interfaces";
|
|
2
2
|
|
|
3
|
-
const TRIGGER_MCP_CLIENT_QUEUE_NAME = '
|
|
3
|
+
const TRIGGER_MCP_CLIENT_QUEUE_NAME = 'solid_trigger_mcp_client_queue_rabbitmq';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
name:
|
|
6
|
+
name: TRIGGER_MCP_CLIENT_QUEUE_NAME,
|
|
7
7
|
type: BrokerType.RabbitMQ,
|
|
8
8
|
queueName: TRIGGER_MCP_CLIENT_QUEUE_NAME,
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BrokerType } from "src/interfaces";
|
|
2
2
|
|
|
3
|
-
const SMS_QUEUE_NAME = '
|
|
3
|
+
const SMS_QUEUE_NAME = 'solid_twilio_sms_queue_rabbitmq';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
name:
|
|
6
|
+
name: SMS_QUEUE_NAME,
|
|
7
7
|
type: BrokerType.RabbitMQ,
|
|
8
8
|
queueName: SMS_QUEUE_NAME,
|
|
9
|
-
};
|
|
9
|
+
};
|
|
@@ -18,6 +18,7 @@ import { ChatterMessageDetails } from '../entities/chatter-message-details.entit
|
|
|
18
18
|
import { ChatterMessage } from '../entities/chatter-message.entity';
|
|
19
19
|
import { getMediaStorageProvider } from './mediaStorageProviders';
|
|
20
20
|
import { RequestContextService } from './request-context.service';
|
|
21
|
+
import { take } from 'rxjs';
|
|
21
22
|
@Injectable()
|
|
22
23
|
export class ChatterMessageService extends CRUDService<ChatterMessage> {
|
|
23
24
|
constructor(
|
|
@@ -331,28 +332,28 @@ export class ChatterMessageService extends CRUDService<ChatterMessage> {
|
|
|
331
332
|
|
|
332
333
|
if (field.type === 'relation') {
|
|
333
334
|
if (field.relationType === "many-to-one") {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
try {
|
|
339
|
-
const relatedModel = await this.modelMetadataRepo.findOne({
|
|
340
|
-
where: { singularName: field.relationCoModelSingularName || field.relation },
|
|
341
|
-
relations: { userKeyField: true }
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
if (relatedModel && relatedModel.userKeyField) {
|
|
345
|
-
const userKeyFieldName = relatedModel.userKeyField.name;
|
|
346
|
-
return value[userKeyFieldName] ? value[userKeyFieldName].toString() : '';
|
|
335
|
+
if (value.name) {
|
|
336
|
+
return value.name;
|
|
347
337
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
338
|
+
|
|
339
|
+
try {
|
|
340
|
+
const relatedModel = await this.modelMetadataRepo.findOne({
|
|
341
|
+
where: { singularName: field.relationCoModelSingularName || field.relation },
|
|
342
|
+
relations: { userKeyField: true }
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
if (relatedModel && relatedModel.userKeyField) {
|
|
346
|
+
const userKeyFieldName = relatedModel.userKeyField.name;
|
|
347
|
+
return value[userKeyFieldName] ? value[userKeyFieldName].toString() : '';
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
if (value.id) {
|
|
351
|
+
return value.id.toString();
|
|
352
|
+
}
|
|
353
|
+
} catch (error) {
|
|
354
|
+
console.error('Error fetching related model metadata:', error);
|
|
355
|
+
return value.id ? value.id.toString() : '';
|
|
351
356
|
}
|
|
352
|
-
} catch (error) {
|
|
353
|
-
console.error('Error fetching related model metadata:', error);
|
|
354
|
-
return value.id ? value.id.toString() : '';
|
|
355
|
-
}
|
|
356
357
|
}
|
|
357
358
|
|
|
358
359
|
if (field.relationType === 'many-to-many') {
|
|
@@ -501,11 +502,9 @@ export class ChatterMessageService extends CRUDService<ChatterMessage> {
|
|
|
501
502
|
return populatedEntity;
|
|
502
503
|
}
|
|
503
504
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
query: any
|
|
508
|
-
) {
|
|
505
|
+
// [2026-02-05T23:31:21.025Z] INFO: [200 OK]
|
|
506
|
+
// GET /api/chatter-message/getChatterMessages/216/mswipeBoomboxBulkUpload?populateMedia[0]=messageAttachments&populate[0]=user&populate[1]=chatterMessageDetails&limit=25 22747ms
|
|
507
|
+
async getChatterMessages(entityId: number, entityName: string, query: any) {
|
|
509
508
|
const { limit = 25, offset = 0, populate = [], populateMedia = [], filters } = query;
|
|
510
509
|
|
|
511
510
|
const model = await this.modelMetadataRepo.findOne({
|
|
@@ -524,6 +523,9 @@ export class ChatterMessageService extends CRUDService<ChatterMessage> {
|
|
|
524
523
|
const relatedEntitiesMap = new Map<string, number[]>();
|
|
525
524
|
|
|
526
525
|
for (const field of oneToManyFields) {
|
|
526
|
+
if (field.enableAuditTracking === false) {
|
|
527
|
+
continue
|
|
528
|
+
}
|
|
527
529
|
const coModelName = field.relationCoModelSingularName;
|
|
528
530
|
const coModelFieldName = field.relationCoModelFieldName;
|
|
529
531
|
|
|
@@ -539,7 +541,11 @@ export class ChatterMessageService extends CRUDService<ChatterMessage> {
|
|
|
539
541
|
const relatedEntityRepository = em.getRepository(classify(coModelName));
|
|
540
542
|
|
|
541
543
|
const relatedEntities = await relatedEntityRepository.find({
|
|
542
|
-
|
|
544
|
+
select: {
|
|
545
|
+
id: true,
|
|
546
|
+
},
|
|
547
|
+
where: { [coModelFieldName]: { id: entityId } },
|
|
548
|
+
take: 5,
|
|
543
549
|
});
|
|
544
550
|
|
|
545
551
|
const relatedIds = relatedEntities.map((entity: any) => entity.id);
|
|
@@ -164,7 +164,7 @@ export class CrudHelperService {
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
normalize(value: string | string[]): string[] {
|
|
167
|
-
if (!value) return []
|
|
167
|
+
if (!value) return []; // if the value is nullish, then return an empty array
|
|
168
168
|
return Array.isArray(value) ? value : [value]; // if the value is an array, return it as is, otherwise return it as an array
|
|
169
169
|
}
|
|
170
170
|
|
|
@@ -18,7 +18,7 @@ export abstract class DatabasePublisher<T> implements QueuePublisher<T> {
|
|
|
18
18
|
if (!this.serviceRole) {
|
|
19
19
|
this.logger.debug('Queue service Role is not defined in the environment variables');
|
|
20
20
|
}
|
|
21
|
-
this.logger.debug(`DatabasePublisher instance created with options: ${JSON.stringify(this.options())}`);
|
|
21
|
+
// this.logger.debug(`DatabasePublisher instance created with options: ${JSON.stringify(this.options())}`);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
abstract options(): QueuesModuleOptions;
|
|
@@ -20,7 +20,7 @@ export abstract class DatabaseSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
20
20
|
if (!this.serviceRole) {
|
|
21
21
|
this.logger.debug('Queue service Role is not defined in the environment variables');
|
|
22
22
|
}
|
|
23
|
-
this.logger.debug(`DatabaseSubscriber instance created with options: ${JSON.stringify(this.options())}`);
|
|
23
|
+
// this.logger.debug(`DatabaseSubscriber instance created with options: ${JSON.stringify(this.options())}`);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
abstract subscribe(message: QueueMessage<T>);
|
|
@@ -72,42 +72,31 @@ export abstract class DatabaseSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
72
72
|
// this.logger.debug(`#### DatabaseSubscriber finished processing message from queue: ${queueName}`);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
// async onModuleInit(): Promise<void> {
|
|
76
|
-
// // we will start subscriber only if the current service role is subscriber.
|
|
77
|
-
// if (['both', 'subscriber'].includes(this.serviceRole)) {
|
|
78
|
-
|
|
79
|
-
// const options = this.options();
|
|
80
|
-
|
|
81
|
-
// const queueName = options.queueName;
|
|
82
|
-
// // setInterval(() => this.processNext(queueName), 1000);
|
|
83
|
-
// const poll = async () => {
|
|
84
|
-
// try {
|
|
85
|
-
// await this.processNext(queueName);
|
|
86
|
-
// } catch (err) {
|
|
87
|
-
// this.logger.error(`Polling error: ${err.message}`);
|
|
88
|
-
// } finally {
|
|
89
|
-
// setTimeout(poll, 1000); // Wait 1s *after* processing finishes
|
|
90
|
-
// }
|
|
91
|
-
// };
|
|
92
|
-
|
|
93
|
-
// // start the loop
|
|
94
|
-
// poll();
|
|
95
|
-
|
|
96
|
-
// this.logger.log(`DatabaseSubscriber ready to consume messages: ${JSON.stringify(this.options())}`);
|
|
97
|
-
// }
|
|
98
|
-
// }
|
|
99
|
-
|
|
100
75
|
async onModuleInit(): Promise<void> {
|
|
76
|
+
// Not using SettingService here as that will necessitate all implementors of DatabaseSubscriber to also inject SettingService which is not ideal.
|
|
77
|
+
// Instead we directly read the environment variables here.
|
|
101
78
|
const defaultBroker = process.env.QUEUES_DEFAULT_BROKER || 'database';
|
|
102
79
|
const solidCliRunning = process.env.SOLID_CLI_RUNNING || "false";
|
|
80
|
+
const queueNameRegex = (process.env.QUEUES_QUEUE_NAME_REGEX_TO_ENABLE || '').trim();
|
|
103
81
|
|
|
104
82
|
// we will start subscriber only if the current service role is subscriber.
|
|
105
83
|
if (['both', 'subscriber'].includes(this.serviceRole) && defaultBroker === 'database' && solidCliRunning === "false") {
|
|
106
|
-
|
|
107
84
|
const options = this.options();
|
|
108
|
-
|
|
109
85
|
const queueName = options.queueName;
|
|
110
86
|
|
|
87
|
+
if (queueNameRegex && queueNameRegex !== "all") {
|
|
88
|
+
try {
|
|
89
|
+
const regex = new RegExp(queueNameRegex);
|
|
90
|
+
if (!regex.test(queueName)) {
|
|
91
|
+
this.logger.log(`DatabaseSubscriber for queue ${queueName} is disabled because it does not match QUEUES_QUEUE_NAME_REGEX_TO_ENABLE=${queueNameRegex}`);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
} catch (error) {
|
|
95
|
+
this.logger.error(`Invalid QUEUES_QUEUE_NAME_REGEX_TO_ENABLE regex "${queueNameRegex}". Subscriber for queue ${queueName} will not start.`);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
111
100
|
this.poller.start(queueName, (q) => this.processNext(q), {
|
|
112
101
|
baseDelayMs: 1000,
|
|
113
102
|
maxDelayMs: 30_000,
|