gemcap-be-common 1.4.252 → 1.4.254
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/microservice/channels.constants.d.ts +1 -0
- package/microservice/channels.constants.js +1 -0
- package/microservice/channels.constants.ts +1 -0
- package/microservice/events.constants.d.ts +7 -0
- package/microservice/events.constants.js +7 -0
- package/microservice/events.constants.ts +8 -0
- package/microservice/queues.constants.d.ts +6 -0
- package/microservice/queues.constants.js +6 -0
- package/microservice/queues.constants.ts +6 -0
- package/models/BankIntegrationTransaction.model.d.ts +2 -0
- package/models/BankIntegrationTransaction.model.js +6 -0
- package/models/BankIntegrationTransaction.model.ts +8 -0
- package/models/ExternalUserAccess.model.d.ts +12 -3
- package/models/ExternalUserAccess.model.ts +14 -3
- package/package.json +1 -1
- package/services/rabbit.service.d.ts +2 -1
- package/services/rabbit.service.js +1 -1
- package/services/rabbit.service.ts +3 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -8,6 +8,13 @@ export declare const EVENT_KEYS: {
|
|
|
8
8
|
readonly COMPLIANCE_FIND_MATCH_REQUESTED: "ai.compliance.find-match.requested";
|
|
9
9
|
readonly PORTFOLIO_NOTE_SUMMARY_REQUESTED: "ai.portfolio.note.summary.requested";
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* ========= AUTH DOMAIN EVENTS =========
|
|
13
|
+
*/
|
|
14
|
+
readonly auth: {
|
|
15
|
+
readonly PASSWORD_RESET_BY_ADMIN_REQUESTED: "auth.password.reset-by-admin.requested";
|
|
16
|
+
readonly PASSWORD_UPDATE_BY_USER_REQUESTED: "auth.password.update-by-user.requested";
|
|
17
|
+
};
|
|
11
18
|
/**
|
|
12
19
|
* ========= COMPLIANCE DOMAIN EVENTS =========
|
|
13
20
|
*/
|
|
@@ -11,6 +11,13 @@ exports.EVENT_KEYS = {
|
|
|
11
11
|
COMPLIANCE_FIND_MATCH_REQUESTED: 'ai.compliance.find-match.requested',
|
|
12
12
|
PORTFOLIO_NOTE_SUMMARY_REQUESTED: 'ai.portfolio.note.summary.requested',
|
|
13
13
|
},
|
|
14
|
+
/**
|
|
15
|
+
* ========= AUTH DOMAIN EVENTS =========
|
|
16
|
+
*/
|
|
17
|
+
auth: {
|
|
18
|
+
PASSWORD_RESET_BY_ADMIN_REQUESTED: 'auth.password.reset-by-admin.requested',
|
|
19
|
+
PASSWORD_UPDATE_BY_USER_REQUESTED: 'auth.password.update-by-user.requested',
|
|
20
|
+
},
|
|
14
21
|
/**
|
|
15
22
|
* ========= COMPLIANCE DOMAIN EVENTS =========
|
|
16
23
|
*/
|
|
@@ -9,6 +9,14 @@ export const EVENT_KEYS = {
|
|
|
9
9
|
PORTFOLIO_NOTE_SUMMARY_REQUESTED: 'ai.portfolio.note.summary.requested',
|
|
10
10
|
},
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* ========= AUTH DOMAIN EVENTS =========
|
|
14
|
+
*/
|
|
15
|
+
auth: {
|
|
16
|
+
PASSWORD_RESET_BY_ADMIN_REQUESTED: 'auth.password.reset-by-admin.requested',
|
|
17
|
+
PASSWORD_UPDATE_BY_USER_REQUESTED: 'auth.password.update-by-user.requested',
|
|
18
|
+
},
|
|
19
|
+
|
|
12
20
|
/**
|
|
13
21
|
* ========= COMPLIANCE DOMAIN EVENTS =========
|
|
14
22
|
*/
|
|
@@ -13,6 +13,12 @@ export declare const QUEUES: {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
+
readonly auth: {
|
|
17
|
+
readonly password: {
|
|
18
|
+
readonly resetByAdmin: "auth.password.reset-by-admin";
|
|
19
|
+
readonly updateByUser: "auth.password.update-by-user";
|
|
20
|
+
};
|
|
21
|
+
};
|
|
16
22
|
readonly compliance: {
|
|
17
23
|
readonly summaryReady: "compliance.summary.ready";
|
|
18
24
|
readonly findMatchReady: "compliance.find-match.ready";
|
|
@@ -16,6 +16,12 @@ exports.QUEUES = {
|
|
|
16
16
|
},
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
+
auth: {
|
|
20
|
+
password: {
|
|
21
|
+
resetByAdmin: 'auth.password.reset-by-admin',
|
|
22
|
+
updateByUser: 'auth.password.update-by-user',
|
|
23
|
+
}
|
|
24
|
+
},
|
|
19
25
|
compliance: {
|
|
20
26
|
summaryReady: 'compliance.summary.ready',
|
|
21
27
|
findMatchReady: 'compliance.find-match.ready',
|
|
@@ -13,6 +13,12 @@ export const QUEUES = {
|
|
|
13
13
|
},
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
+
auth: {
|
|
17
|
+
password: {
|
|
18
|
+
resetByAdmin: 'auth.password.reset-by-admin',
|
|
19
|
+
updateByUser: 'auth.password.update-by-user',
|
|
20
|
+
}
|
|
21
|
+
},
|
|
16
22
|
compliance: {
|
|
17
23
|
summaryReady: 'compliance.summary.ready',
|
|
18
24
|
findMatchReady: 'compliance.find-match.ready',
|
|
@@ -33,6 +33,8 @@ export interface IBankIntegrationTransaction {
|
|
|
33
33
|
status: string;
|
|
34
34
|
rawPayload: string;
|
|
35
35
|
syncedAt: Date;
|
|
36
|
+
text: string;
|
|
37
|
+
description: string;
|
|
36
38
|
}
|
|
37
39
|
export type TBankIntegrationTransactionCreate = Omit<IBankIntegrationTransaction, 'accountId'> & {
|
|
38
40
|
accountId: string;
|
|
@@ -12,6 +12,8 @@ export interface IBankIntegrationTransaction {
|
|
|
12
12
|
status: string;
|
|
13
13
|
rawPayload: string;
|
|
14
14
|
syncedAt: Date;
|
|
15
|
+
text: string;
|
|
16
|
+
description: string;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
export type TBankIntegrationTransactionCreate = Omit<IBankIntegrationTransaction, 'accountId'> & {
|
|
@@ -66,6 +68,12 @@ export const BankIntegrationTransactionSchema = new mongoose.Schema<IBankIntegra
|
|
|
66
68
|
rawPayload: {
|
|
67
69
|
type: String,
|
|
68
70
|
},
|
|
71
|
+
text: {
|
|
72
|
+
type: String,
|
|
73
|
+
},
|
|
74
|
+
description: {
|
|
75
|
+
type: String,
|
|
76
|
+
},
|
|
69
77
|
syncedAt: {
|
|
70
78
|
type: Date,
|
|
71
79
|
},
|
|
@@ -22,14 +22,23 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
import mongoose
|
|
25
|
+
import mongoose from 'mongoose';
|
|
26
26
|
export interface IExternalUserAccess {
|
|
27
27
|
email: string;
|
|
28
28
|
hashedPassword: string;
|
|
29
29
|
}
|
|
30
|
-
export
|
|
30
|
+
export type IExternalUserAccessDoc = mongoose.HydratedDocument<IExternalUserAccess>;
|
|
31
|
+
export interface IExternalUserAccessLean extends IExternalUserAccess {
|
|
32
|
+
_id: mongoose.Types.ObjectId;
|
|
33
|
+
createdAt: Date;
|
|
34
|
+
updatedAt: Date;
|
|
35
|
+
}
|
|
36
|
+
export interface IExternalUserAccessPlain extends Omit<IExternalUserAccess, 'prospectId'> {
|
|
37
|
+
_id: string;
|
|
38
|
+
createdAt: Date;
|
|
39
|
+
updatedAt: Date;
|
|
31
40
|
}
|
|
32
|
-
export type ExternalUserAccessModel = Model<IExternalUserAccess>;
|
|
41
|
+
export type ExternalUserAccessModel = mongoose.Model<IExternalUserAccess>;
|
|
33
42
|
export declare const ExternalUserAccessSchema: mongoose.Schema<IExternalUserAccess, ExternalUserAccessModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IExternalUserAccess, mongoose.Document<unknown, {}, mongoose.FlatRecord<IExternalUserAccess>> & mongoose.FlatRecord<IExternalUserAccess> & {
|
|
34
43
|
_id: mongoose.Types.ObjectId;
|
|
35
44
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import mongoose
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
2
|
|
|
3
3
|
import { MODEL_NAMES } from './_models';
|
|
4
4
|
|
|
@@ -7,10 +7,21 @@ export interface IExternalUserAccess {
|
|
|
7
7
|
hashedPassword: string;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export
|
|
10
|
+
export type IExternalUserAccessDoc = mongoose.HydratedDocument<IExternalUserAccess>;
|
|
11
|
+
|
|
12
|
+
export interface IExternalUserAccessLean extends IExternalUserAccess {
|
|
13
|
+
_id: mongoose.Types.ObjectId;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IExternalUserAccessPlain extends Omit<IExternalUserAccess, 'prospectId'> {
|
|
19
|
+
_id: string;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
11
22
|
}
|
|
12
23
|
|
|
13
|
-
export type ExternalUserAccessModel = Model<IExternalUserAccess>;
|
|
24
|
+
export type ExternalUserAccessModel = mongoose.Model<IExternalUserAccess>;
|
|
14
25
|
|
|
15
26
|
export const ExternalUserAccessSchema = new mongoose.Schema<IExternalUserAccess, ExternalUserAccessModel>(
|
|
16
27
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { TTaskEnvelope } from '../microservice/task-envelope.type';
|
|
1
2
|
export declare class RabbitService {
|
|
2
3
|
private connection;
|
|
3
4
|
private channel;
|
|
4
5
|
init(): Promise<void>;
|
|
5
|
-
publish(exchange: string, routingKey: string, payload: unknown):
|
|
6
|
+
publish(exchange: string, routingKey: string, payload: TTaskEnvelope<unknown>): void;
|
|
6
7
|
}
|
|
@@ -42,7 +42,7 @@ class RabbitService {
|
|
|
42
42
|
this.channel = await this.connection.createChannel();
|
|
43
43
|
console.log('RabbitMQ connected');
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
publish(exchange, routingKey, payload) {
|
|
46
46
|
if (!this.channel) {
|
|
47
47
|
throw new Error('RabbitMQ channel is not initialized');
|
|
48
48
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as amqp from 'amqplib';
|
|
2
2
|
|
|
3
|
+
import { TTaskEnvelope } from '../microservice/task-envelope.type';
|
|
4
|
+
|
|
3
5
|
const { NODE_ENV } = process.env;
|
|
4
6
|
|
|
5
7
|
export class RabbitService {
|
|
@@ -25,7 +27,7 @@ export class RabbitService {
|
|
|
25
27
|
console.log('RabbitMQ connected');
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
publish(exchange: string, routingKey: string, payload: TTaskEnvelope<unknown>) {
|
|
29
31
|
if (!this.channel) {
|
|
30
32
|
throw new Error('RabbitMQ channel is not initialized');
|
|
31
33
|
}
|