ia-common 1.1.1-beta.32 → 1.1.1-beta.34
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/build/src/constants/entity_constants.d.ts +21 -1
- package/build/src/constants/entity_constants.js +59 -15
- package/build/src/interface/api/create-corporate-action-advice.interface.d.ts +2 -0
- package/build/src/interface/api/create-corporate-action-advice.interface.js +33 -0
- package/build/src/interface/api/delete-document-details.interface.d.ts +4 -0
- package/build/src/interface/api/equity-advice-create-dto.interface.d.ts +6 -1
- package/build/src/interface/api/equity-advice-create-dto.interface.js +33 -0
- package/build/src/interface/api/{equity-advice-update-dto..d.ts → equity-advice-update-dto.interface..d.ts} +6 -2
- package/build/src/interface/api/index.d.ts +5 -13
- package/build/src/interface/api/index.js +5 -13
- package/build/src/interface/api/multer-file-config.d.ts +7 -0
- package/build/src/interface/api/mutual-fund-advice-create-dto.interface.d.ts +2 -0
- package/build/src/interface/api/mutual-fund-advice-create-dto.interface.js +33 -0
- package/build/src/interface/api/nfo-advice-create-dto.interface.d.ts +2 -0
- package/build/src/interface/api/nfo-advice-create-dto.interface.js +33 -0
- package/build/src/interface/api/organization-create-dto.interface.js +31 -0
- package/build/src/interface/entity/entity-utils.interface.d.ts +1 -1
- package/build/src/interface/entity/{advice-entity.interface.d.ts → equity-advice-entity.interface.d.ts} +1 -1
- package/build/src/interface/entity/index.d.ts +10 -10
- package/build/src/interface/entity/index.js +10 -10
- package/build/src/utils/helper.fn.utils.d.ts +23 -0
- package/build/src/utils/helper.fn.utils.js +33 -1
- package/package.json +1 -1
- package/build/src/interface/api/get-advice-by-id.interface.d.ts +0 -4
- package/build/src/interface/api/get-advice-by-ids-status.inteface.d.ts +0 -4
- package/build/src/interface/api/get-bank-details.interface.d.ts +0 -7
- package/build/src/interface/api/get-configuration.interface.d.ts +0 -4
- package/build/src/interface/api/get-configuration.interface.js +0 -2
- package/build/src/interface/api/get-nfo-advice.interface.d.ts +0 -4
- package/build/src/interface/api/get-nfo-advice.interface.js +0 -2
- package/build/src/interface/api/get-nfo.interface.d.ts +0 -4
- package/build/src/interface/api/get-nfo.interface.js +0 -2
- package/build/src/interface/api/get-organization-entities.interface.d.ts +0 -9
- package/build/src/interface/api/get-organization-entities.interface.js +0 -2
- package/build/src/interface/api/get-staff-members.interface.d.ts +0 -10
- package/build/src/interface/api/get-staff-members.interface.js +0 -2
- package/build/src/interface/api/get-user-entities-by-advisor-id-type.interface.d.ts +0 -3
- package/build/src/interface/api/get-user-entities-by-advisor-id-type.interface.js +0 -2
- package/build/src/interface/entity/advice-entity.interface.js +0 -2
- /package/build/src/interface/api/{equity-advice-update-dto..js → delete-document-details.interface.js} +0 -0
- /package/build/src/interface/api/{get-advice-by-id.interface.js → equity-advice-update-dto.interface..js} +0 -0
- /package/build/src/interface/api/{get-advice-by-ids-status.inteface.js → multer-file-config.js} +0 -0
- /package/build/src/interface/{api/get-bank-details.interface.js → entity/equity-advice-entity.interface.js} +0 -0
|
@@ -1 +1,21 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const ONE_MB: number;
|
|
2
|
+
export declare const TEN_MB: number;
|
|
3
|
+
export declare const FIFTY_MB: number;
|
|
4
|
+
export declare enum FileFormatEnum {
|
|
5
|
+
PDF = "application/pdf",
|
|
6
|
+
MP3 = "audio/mp3",
|
|
7
|
+
MPEG = "audio/mpeg",
|
|
8
|
+
MP4 = "video/mp4",
|
|
9
|
+
JPEG = "image/jpeg",
|
|
10
|
+
PNG = "image/png"
|
|
11
|
+
}
|
|
12
|
+
export declare namespace FileFormatConfig {
|
|
13
|
+
/** get allowed MIME types for a file format */
|
|
14
|
+
function getAllowedMimeTypes(format: FileFormatEnum): string[];
|
|
15
|
+
/** check if a MIME type is allowed for a format */
|
|
16
|
+
function isMimeTypeAllowed(format: FileFormatEnum, mimeType: string): boolean;
|
|
17
|
+
/** get max file size (bytes) with optional fallback */
|
|
18
|
+
function getMaxSize(format: FileFormatEnum, fallback: number): number;
|
|
19
|
+
/** get allowed mime types from formats */
|
|
20
|
+
function getAllowedMimeTypesFromFormats(formats: FileFormatEnum[]): string[];
|
|
21
|
+
}
|
|
@@ -1,17 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
exports.FileFormatConfig = exports.FileFormatEnum = exports.FIFTY_MB = exports.TEN_MB = exports.ONE_MB = void 0;
|
|
4
|
+
exports.ONE_MB = 1 * 1024 * 1024;
|
|
5
|
+
exports.TEN_MB = 10 * 1024 * 1024;
|
|
6
|
+
exports.FIFTY_MB = 50 * 1024 * 1024;
|
|
7
|
+
// give me an enum for each file mime type agains the actual format
|
|
8
|
+
var FileFormatEnum;
|
|
9
|
+
(function (FileFormatEnum) {
|
|
10
|
+
FileFormatEnum["PDF"] = "application/pdf";
|
|
11
|
+
FileFormatEnum["MP3"] = "audio/mp3";
|
|
12
|
+
FileFormatEnum["MPEG"] = "audio/mpeg";
|
|
13
|
+
FileFormatEnum["MP4"] = "video/mp4";
|
|
14
|
+
FileFormatEnum["JPEG"] = "image/jpeg";
|
|
15
|
+
FileFormatEnum["PNG"] = "image/png";
|
|
16
|
+
})(FileFormatEnum || (exports.FileFormatEnum = FileFormatEnum = {}));
|
|
17
|
+
var FileFormatConfig;
|
|
18
|
+
(function (FileFormatConfig) {
|
|
19
|
+
/** MIME types allowed for each file format */
|
|
20
|
+
const mimeTypeMap = new Map([
|
|
21
|
+
[FileFormatEnum.PDF, ["application/pdf"]],
|
|
22
|
+
[FileFormatEnum.MP3, ["audio/mpeg", "audio/mp3"]],
|
|
23
|
+
[FileFormatEnum.MP4, ["video/mp4"]],
|
|
24
|
+
[FileFormatEnum.JPEG, ["image/jpeg"]],
|
|
25
|
+
[FileFormatEnum.PNG, ["image/png"]],
|
|
26
|
+
]);
|
|
27
|
+
/** Default max file size (in bytes) per format */
|
|
28
|
+
const sizeMap = new Map([
|
|
29
|
+
[FileFormatEnum.PDF, 1 * 1024 * 1024], // 1 MB
|
|
30
|
+
[FileFormatEnum.MP3, 10 * 1024 * 1024],
|
|
31
|
+
[FileFormatEnum.MP4, 50 * 1024 * 1024],
|
|
32
|
+
[FileFormatEnum.JPEG, 2 * 1024 * 1024],
|
|
33
|
+
[FileFormatEnum.PNG, 2 * 1024 * 1024],
|
|
34
|
+
]);
|
|
35
|
+
/** get allowed MIME types for a file format */
|
|
36
|
+
function getAllowedMimeTypes(format) {
|
|
37
|
+
var _a;
|
|
38
|
+
return (_a = mimeTypeMap.get(format)) !== null && _a !== void 0 ? _a : [];
|
|
39
|
+
}
|
|
40
|
+
FileFormatConfig.getAllowedMimeTypes = getAllowedMimeTypes;
|
|
41
|
+
/** check if a MIME type is allowed for a format */
|
|
42
|
+
function isMimeTypeAllowed(format, mimeType) {
|
|
43
|
+
return getAllowedMimeTypes(format).includes(mimeType);
|
|
44
|
+
}
|
|
45
|
+
FileFormatConfig.isMimeTypeAllowed = isMimeTypeAllowed;
|
|
46
|
+
/** get max file size (bytes) with optional fallback */
|
|
47
|
+
function getMaxSize(format, fallback) {
|
|
48
|
+
var _a;
|
|
49
|
+
return (_a = sizeMap.get(format)) !== null && _a !== void 0 ? _a : fallback;
|
|
50
|
+
}
|
|
51
|
+
FileFormatConfig.getMaxSize = getMaxSize;
|
|
52
|
+
/** get allowed mime types from formats */
|
|
53
|
+
function getAllowedMimeTypesFromFormats(formats) {
|
|
54
|
+
const allowedMimeTypes = [];
|
|
55
|
+
for (const format of formats) {
|
|
56
|
+
allowedMimeTypes.push(this.getAllowedMimeTypes(format));
|
|
57
|
+
}
|
|
58
|
+
return allowedMimeTypes.flat();
|
|
59
|
+
}
|
|
60
|
+
FileFormatConfig.getAllowedMimeTypesFromFormats = getAllowedMimeTypesFromFormats;
|
|
61
|
+
})(FileFormatConfig || (exports.FileFormatConfig = FileFormatConfig = {}));
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { EntityEnum, EnumEntityType, ICorporateActionsEntity, IEntityCreateDto } from "../entity";
|
|
2
|
+
import { IMulterFileConfig } from "./multer-file-config";
|
|
2
3
|
export type ICorporateActionsAdviceCreateDtoExclude = "companyName" | "status" | "advisorOrgId";
|
|
3
4
|
export interface ICorporateActionAdviceCreateDto extends Omit<IEntityCreateDto<EnumEntityType<EntityEnum.CORPORATE_ACTIONS_ADVICE>>, ICorporateActionsAdviceCreateDtoExclude> {
|
|
4
5
|
}
|
|
5
6
|
export interface ICorporateActionAdviceCreateDtoValidationData {
|
|
6
7
|
existingCorporateActionEntity: ICorporateActionsEntity;
|
|
7
8
|
}
|
|
9
|
+
export declare const corporateActionAdviceFileUploadConfig: IMulterFileConfig[];
|
|
@@ -1,2 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.corporateActionAdviceFileUploadConfig = void 0;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
exports.corporateActionAdviceFileUploadConfig = [
|
|
6
|
+
{
|
|
7
|
+
name: "noteDocument",
|
|
8
|
+
size: constants_1.FileFormatConfig.getMaxSize(constants_1.FileFormatEnum.PDF, constants_1.ONE_MB),
|
|
9
|
+
count: 1,
|
|
10
|
+
isRequired: false,
|
|
11
|
+
format: constants_1.FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
12
|
+
constants_1.FileFormatEnum.JPEG,
|
|
13
|
+
constants_1.FileFormatEnum.PDF,
|
|
14
|
+
]),
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "voiceDocument",
|
|
18
|
+
size: constants_1.FileFormatConfig.getMaxSize(constants_1.FileFormatEnum.MP3, constants_1.TEN_MB),
|
|
19
|
+
count: 1,
|
|
20
|
+
isRequired: false,
|
|
21
|
+
format: constants_1.FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
22
|
+
constants_1.FileFormatEnum.MP3,
|
|
23
|
+
constants_1.FileFormatEnum.MPEG,
|
|
24
|
+
]),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "videoDocument",
|
|
28
|
+
size: constants_1.FileFormatConfig.getMaxSize(constants_1.FileFormatEnum.MP4, constants_1.FIFTY_MB),
|
|
29
|
+
count: 1,
|
|
30
|
+
isRequired: false,
|
|
31
|
+
format: constants_1.FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
32
|
+
constants_1.FileFormatEnum.MP4,
|
|
33
|
+
]),
|
|
34
|
+
},
|
|
35
|
+
];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AdviceTransactionType, InvestDurationType } from "../../enum";
|
|
2
|
-
import { IEquityAdviceEntity } from "../entity";
|
|
2
|
+
import { EntityEnum, EnumEntityType, IEntityCreateDto, IEquityAdviceEntity } from "../entity";
|
|
3
3
|
import { IFiles } from "./bank-details-create-dto..interface";
|
|
4
|
+
import { IMulterFileConfig } from "./multer-file-config";
|
|
4
5
|
export interface IEquityAdviceCreateDto {
|
|
5
6
|
stockName: string;
|
|
6
7
|
cmp: number;
|
|
@@ -16,5 +17,9 @@ export interface IEquityAdviceCreateDto {
|
|
|
16
17
|
rationale?: string;
|
|
17
18
|
files: IFiles[];
|
|
18
19
|
}
|
|
20
|
+
export type IEquityAdviceCreateDtoExclude = "advisorOrgId" | "status" | "type" | "targetHitOn" | "targetHitCMP" | "gainLoss" | "noteDocumentUrl" | "videoUrl" | "voiceUrl";
|
|
21
|
+
export interface IEquityAdviceCreateDtoV2 extends Omit<IEntityCreateDto<EnumEntityType<EntityEnum.EQUITY_ADVICE>>, IEquityAdviceCreateDtoExclude> {
|
|
22
|
+
}
|
|
19
23
|
export interface ICreateAdviceResponse extends IEquityAdviceEntity {
|
|
20
24
|
}
|
|
25
|
+
export declare const equityAdviceFileUploadConfig: IMulterFileConfig[];
|
|
@@ -1,2 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.equityAdviceFileUploadConfig = void 0;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
exports.equityAdviceFileUploadConfig = [
|
|
6
|
+
{
|
|
7
|
+
name: "noteDocument",
|
|
8
|
+
size: constants_1.FileFormatConfig.getMaxSize(constants_1.FileFormatEnum.PDF, constants_1.ONE_MB),
|
|
9
|
+
count: 1,
|
|
10
|
+
isRequired: false,
|
|
11
|
+
format: constants_1.FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
12
|
+
constants_1.FileFormatEnum.JPEG,
|
|
13
|
+
constants_1.FileFormatEnum.PDF,
|
|
14
|
+
]),
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "voiceDocument",
|
|
18
|
+
size: constants_1.FileFormatConfig.getMaxSize(constants_1.FileFormatEnum.MP3, constants_1.TEN_MB),
|
|
19
|
+
count: 1,
|
|
20
|
+
isRequired: false,
|
|
21
|
+
format: constants_1.FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
22
|
+
constants_1.FileFormatEnum.MP3,
|
|
23
|
+
constants_1.FileFormatEnum.MPEG,
|
|
24
|
+
]),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "videoDocument",
|
|
28
|
+
size: constants_1.FileFormatConfig.getMaxSize(constants_1.FileFormatEnum.MP4, constants_1.FIFTY_MB),
|
|
29
|
+
count: 1,
|
|
30
|
+
isRequired: false,
|
|
31
|
+
format: constants_1.FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
32
|
+
constants_1.FileFormatEnum.MP4,
|
|
33
|
+
]),
|
|
34
|
+
},
|
|
35
|
+
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdviceTransactionType, AdviceType, InvestDurationType } from "../../enum";
|
|
2
|
-
import {
|
|
2
|
+
import { EntityEnum, EnumEntityType, IEntityUpdateDto } from "../entity";
|
|
3
3
|
export interface IEquityAdviceUpdateDto {
|
|
4
4
|
type?: AdviceType;
|
|
5
5
|
stockName?: string;
|
|
@@ -15,5 +15,9 @@ export interface IEquityAdviceUpdateDto {
|
|
|
15
15
|
voiceDocument?: string;
|
|
16
16
|
rationale?: string;
|
|
17
17
|
}
|
|
18
|
-
export interface
|
|
18
|
+
export interface IEquityAdviceUpdateDtoV2 extends IEntityUpdateDto<EnumEntityType<EntityEnum.EQUITY_ADVICE>> {
|
|
19
|
+
}
|
|
20
|
+
export interface IDeleteDocumentDetails<T extends IEntityUpdateDto<EnumEntityType<EntityEnum>>> {
|
|
21
|
+
key: keyof T;
|
|
22
|
+
urls: string[];
|
|
19
23
|
}
|
|
@@ -8,7 +8,6 @@ export * from "./pricing-plan-update-dto.interface";
|
|
|
8
8
|
export * from "./subscription-create.dto.interface";
|
|
9
9
|
export * from "./subscription-update.dto.interface";
|
|
10
10
|
export * from "./delete-bank-details-by-id.interface";
|
|
11
|
-
export * from "./get-bank-details.interface";
|
|
12
11
|
export * from "./get-pricing-plan-by-date.interface";
|
|
13
12
|
export * from "./get-registration-by-id.interface";
|
|
14
13
|
export * from "./get-registration-with-organization-owners.interface";
|
|
@@ -16,13 +15,10 @@ export * from "./update-pricing-plan-by-id.interface";
|
|
|
16
15
|
export * from "./get-organization-by-id.interface";
|
|
17
16
|
export * from "./login.interface";
|
|
18
17
|
export * from "./registration-update-dto.interface";
|
|
19
|
-
export * from "./get-advice-by-id.interface";
|
|
20
|
-
export * from "./get-advice-by-ids-status.inteface";
|
|
21
18
|
export * from "./equity-advice-create-dto.interface";
|
|
22
|
-
export * from "./equity-advice-update-dto.";
|
|
19
|
+
export * from "./equity-advice-update-dto.interface.";
|
|
23
20
|
export * from "./get-mutual-funds-by-type.interface";
|
|
24
21
|
export * from "./mutual-funds-create-dto.interface";
|
|
25
|
-
export * from "./get-user-entities-by-advisor-id-type.interface";
|
|
26
22
|
export * from "./mutual-fund-advice-create-dto.interface";
|
|
27
23
|
export * from "../entity/advisor-user-mapping-entity.interface";
|
|
28
24
|
export * from "../corporate-actions/base-corporate-actions.interface";
|
|
@@ -31,13 +27,7 @@ export * from "../corporate-actions/create-bonus-stock.interface";
|
|
|
31
27
|
export * from "./advior-user-interface";
|
|
32
28
|
export * from "./create-bulk-advice-using-csv.interface";
|
|
33
29
|
export * from "./create-corporate-action-advice.interface";
|
|
34
|
-
export * from "./get-configuration.interface";
|
|
35
30
|
export * from "./get-corporate-action-advice.interface";
|
|
36
|
-
export * from "./get-cron-job-by-date-range.interface";
|
|
37
|
-
export * from "./get-nfo-advice.interface";
|
|
38
|
-
export * from "./get-nfo.interface";
|
|
39
|
-
export * from "./get-organization-entities.interface";
|
|
40
|
-
export * from "./get-staff-members.interface";
|
|
41
31
|
export * from "./get-user-entities-by-filter.interface";
|
|
42
32
|
export * from "./manual-trigger-cron-job.interface";
|
|
43
33
|
export * from "./nfo-advice-create-dto.interface";
|
|
@@ -58,9 +48,11 @@ export * from "./permission.create.dto.interface";
|
|
|
58
48
|
export * from "./permission.update.dto.interface";
|
|
59
49
|
export * from "./role-create-dto.interface";
|
|
60
50
|
export * from "./role-update-dto.interface";
|
|
51
|
+
export * from "./role-user-mapping-create-dto.interface";
|
|
52
|
+
export * from "./role-user-mapping-delete-dto.interface";
|
|
61
53
|
export * from "./role.permission.mapping.create.dto.interface";
|
|
62
54
|
export * from "./role.permission.mapping.delete.dto.interface";
|
|
63
55
|
export * from "./role.permission.mapping.response";
|
|
64
56
|
export * from "./role.permission.mapping.update.dto.interface";
|
|
65
|
-
export * from "./
|
|
66
|
-
export * from "./
|
|
57
|
+
export * from "./multer-file-config";
|
|
58
|
+
export * from "./get-cron-job-by-date-range.interface";
|
|
@@ -24,7 +24,6 @@ __exportStar(require("./pricing-plan-update-dto.interface"), exports);
|
|
|
24
24
|
__exportStar(require("./subscription-create.dto.interface"), exports);
|
|
25
25
|
__exportStar(require("./subscription-update.dto.interface"), exports);
|
|
26
26
|
__exportStar(require("./delete-bank-details-by-id.interface"), exports);
|
|
27
|
-
__exportStar(require("./get-bank-details.interface"), exports);
|
|
28
27
|
__exportStar(require("./get-pricing-plan-by-date.interface"), exports);
|
|
29
28
|
__exportStar(require("./get-registration-by-id.interface"), exports);
|
|
30
29
|
__exportStar(require("./get-registration-with-organization-owners.interface"), exports);
|
|
@@ -32,13 +31,10 @@ __exportStar(require("./update-pricing-plan-by-id.interface"), exports);
|
|
|
32
31
|
__exportStar(require("./get-organization-by-id.interface"), exports);
|
|
33
32
|
__exportStar(require("./login.interface"), exports);
|
|
34
33
|
__exportStar(require("./registration-update-dto.interface"), exports);
|
|
35
|
-
__exportStar(require("./get-advice-by-id.interface"), exports);
|
|
36
|
-
__exportStar(require("./get-advice-by-ids-status.inteface"), exports);
|
|
37
34
|
__exportStar(require("./equity-advice-create-dto.interface"), exports);
|
|
38
|
-
__exportStar(require("./equity-advice-update-dto."), exports);
|
|
35
|
+
__exportStar(require("./equity-advice-update-dto.interface."), exports);
|
|
39
36
|
__exportStar(require("./get-mutual-funds-by-type.interface"), exports);
|
|
40
37
|
__exportStar(require("./mutual-funds-create-dto.interface"), exports);
|
|
41
|
-
__exportStar(require("./get-user-entities-by-advisor-id-type.interface"), exports);
|
|
42
38
|
__exportStar(require("./mutual-fund-advice-create-dto.interface"), exports);
|
|
43
39
|
__exportStar(require("../entity/advisor-user-mapping-entity.interface"), exports);
|
|
44
40
|
__exportStar(require("../corporate-actions/base-corporate-actions.interface"), exports);
|
|
@@ -47,13 +43,7 @@ __exportStar(require("../corporate-actions/create-bonus-stock.interface"), expor
|
|
|
47
43
|
__exportStar(require("./advior-user-interface"), exports);
|
|
48
44
|
__exportStar(require("./create-bulk-advice-using-csv.interface"), exports);
|
|
49
45
|
__exportStar(require("./create-corporate-action-advice.interface"), exports);
|
|
50
|
-
__exportStar(require("./get-configuration.interface"), exports);
|
|
51
46
|
__exportStar(require("./get-corporate-action-advice.interface"), exports);
|
|
52
|
-
__exportStar(require("./get-cron-job-by-date-range.interface"), exports);
|
|
53
|
-
__exportStar(require("./get-nfo-advice.interface"), exports);
|
|
54
|
-
__exportStar(require("./get-nfo.interface"), exports);
|
|
55
|
-
__exportStar(require("./get-organization-entities.interface"), exports);
|
|
56
|
-
__exportStar(require("./get-staff-members.interface"), exports);
|
|
57
47
|
__exportStar(require("./get-user-entities-by-filter.interface"), exports);
|
|
58
48
|
__exportStar(require("./manual-trigger-cron-job.interface"), exports);
|
|
59
49
|
__exportStar(require("./nfo-advice-create-dto.interface"), exports);
|
|
@@ -74,9 +64,11 @@ __exportStar(require("./permission.create.dto.interface"), exports);
|
|
|
74
64
|
__exportStar(require("./permission.update.dto.interface"), exports);
|
|
75
65
|
__exportStar(require("./role-create-dto.interface"), exports);
|
|
76
66
|
__exportStar(require("./role-update-dto.interface"), exports);
|
|
67
|
+
__exportStar(require("./role-user-mapping-create-dto.interface"), exports);
|
|
68
|
+
__exportStar(require("./role-user-mapping-delete-dto.interface"), exports);
|
|
77
69
|
__exportStar(require("./role.permission.mapping.create.dto.interface"), exports);
|
|
78
70
|
__exportStar(require("./role.permission.mapping.delete.dto.interface"), exports);
|
|
79
71
|
__exportStar(require("./role.permission.mapping.response"), exports);
|
|
80
72
|
__exportStar(require("./role.permission.mapping.update.dto.interface"), exports);
|
|
81
|
-
__exportStar(require("./
|
|
82
|
-
__exportStar(require("./
|
|
73
|
+
__exportStar(require("./multer-file-config"), exports);
|
|
74
|
+
__exportStar(require("./get-cron-job-by-date-range.interface"), exports);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EntityEnum, EnumEntityType, IEntityCreateDto, IMutualFundsEntity } from "../entity";
|
|
2
|
+
import { IMulterFileConfig } from "./multer-file-config";
|
|
2
3
|
export type IMutualFundAdviceDtoExclude = "schemeName" | "navRegular" | "navDirect" | "noteDocumentUrl" | "videoUrl" | "voiceUrl" | "advisorOrgId" | "status";
|
|
3
4
|
export interface IMutualFundAdviceDtoInclude {
|
|
4
5
|
mutualFundId: number;
|
|
@@ -11,3 +12,4 @@ export interface IMutualFundAdviceCreateDto extends IEntityCreateDto<Omit<EnumEn
|
|
|
11
12
|
export interface IMutualFundAdviceCreateDtoValidationData {
|
|
12
13
|
mutualFundEntity: IMutualFundsEntity;
|
|
13
14
|
}
|
|
15
|
+
export declare const mutualFundAdviceFileUploadConfig: IMulterFileConfig[];
|
|
@@ -1,2 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mutualFundAdviceFileUploadConfig = void 0;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
exports.mutualFundAdviceFileUploadConfig = [
|
|
6
|
+
{
|
|
7
|
+
name: "noteDocument",
|
|
8
|
+
size: constants_1.FileFormatConfig.getMaxSize(constants_1.FileFormatEnum.PDF, constants_1.ONE_MB),
|
|
9
|
+
count: 1,
|
|
10
|
+
isRequired: false,
|
|
11
|
+
format: constants_1.FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
12
|
+
constants_1.FileFormatEnum.JPEG,
|
|
13
|
+
constants_1.FileFormatEnum.PDF,
|
|
14
|
+
]),
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "voiceDocument",
|
|
18
|
+
size: constants_1.FileFormatConfig.getMaxSize(constants_1.FileFormatEnum.MP3, constants_1.TEN_MB),
|
|
19
|
+
count: 1,
|
|
20
|
+
isRequired: false,
|
|
21
|
+
format: constants_1.FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
22
|
+
constants_1.FileFormatEnum.MP3,
|
|
23
|
+
constants_1.FileFormatEnum.MPEG,
|
|
24
|
+
]),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "videoDocument",
|
|
28
|
+
size: constants_1.FileFormatConfig.getMaxSize(constants_1.FileFormatEnum.MP4, constants_1.FIFTY_MB),
|
|
29
|
+
count: 1,
|
|
30
|
+
isRequired: false,
|
|
31
|
+
format: constants_1.FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
32
|
+
constants_1.FileFormatEnum.MP4,
|
|
33
|
+
]),
|
|
34
|
+
},
|
|
35
|
+
];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EntityEnum, EnumEntityType, IEntityCreateDto, INFOEntity } from "../entity";
|
|
2
|
+
import { IMulterFileConfig } from "./multer-file-config";
|
|
2
3
|
export type INFOAdviceDtoExclude = "nfoId" | "mutualFundName" | "advisorOrgId" | "noteDocumentUrl" | "videoUrl" | "voiceUrl" | "status";
|
|
3
4
|
export interface INFOAdviceDtoInclude {
|
|
4
5
|
nfoId: number;
|
|
@@ -11,3 +12,4 @@ export interface INFOAdviceCreateDto extends IEntityCreateDto<Omit<EnumEntityTyp
|
|
|
11
12
|
export interface INFOAdviceCreateDtoValidationData {
|
|
12
13
|
nfoEntity: INFOEntity;
|
|
13
14
|
}
|
|
15
|
+
export declare const nfoAdviceFileUploadConfig: IMulterFileConfig[];
|
|
@@ -1,2 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nfoAdviceFileUploadConfig = void 0;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
exports.nfoAdviceFileUploadConfig = [
|
|
6
|
+
{
|
|
7
|
+
name: "noteDocument",
|
|
8
|
+
size: constants_1.FileFormatConfig.getMaxSize(constants_1.FileFormatEnum.PDF, constants_1.ONE_MB),
|
|
9
|
+
count: 1,
|
|
10
|
+
isRequired: false,
|
|
11
|
+
format: constants_1.FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
12
|
+
constants_1.FileFormatEnum.JPEG,
|
|
13
|
+
constants_1.FileFormatEnum.PDF,
|
|
14
|
+
]),
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "voiceDocument",
|
|
18
|
+
size: constants_1.FileFormatConfig.getMaxSize(constants_1.FileFormatEnum.MP3, constants_1.TEN_MB),
|
|
19
|
+
count: 1,
|
|
20
|
+
isRequired: false,
|
|
21
|
+
format: constants_1.FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
22
|
+
constants_1.FileFormatEnum.MP3,
|
|
23
|
+
constants_1.FileFormatEnum.MPEG,
|
|
24
|
+
]),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "videoDocument",
|
|
28
|
+
size: constants_1.FileFormatConfig.getMaxSize(constants_1.FileFormatEnum.MP4, constants_1.FIFTY_MB),
|
|
29
|
+
count: 1,
|
|
30
|
+
isRequired: false,
|
|
31
|
+
format: constants_1.FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
32
|
+
constants_1.FileFormatEnum.MP4,
|
|
33
|
+
]),
|
|
34
|
+
},
|
|
35
|
+
];
|
|
@@ -1,2 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// export const corporateActionAdviceFileUploadConfig: IMulterFileConfig[] = [
|
|
4
|
+
// {
|
|
5
|
+
// name: "noteDocument",
|
|
6
|
+
// size: FileFormatConfig.getMaxSize(FileFormatEnum.PDF, ONE_MB),
|
|
7
|
+
// count: 1,
|
|
8
|
+
// isRequired: false,
|
|
9
|
+
// format: FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
10
|
+
// FileFormatEnum.JPEG,
|
|
11
|
+
// FileFormatEnum.PDF,
|
|
12
|
+
// ]),
|
|
13
|
+
// },
|
|
14
|
+
// {
|
|
15
|
+
// name: "voiceDocument",
|
|
16
|
+
// size: FileFormatConfig.getMaxSize(FileFormatEnum.MP3, TEN_MB),
|
|
17
|
+
// count: 1,
|
|
18
|
+
// isRequired: false,
|
|
19
|
+
// format: FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
20
|
+
// FileFormatEnum.MP3,
|
|
21
|
+
// FileFormatEnum.MPEG,
|
|
22
|
+
// ]),
|
|
23
|
+
// },
|
|
24
|
+
// {
|
|
25
|
+
// name: "videoDocument",
|
|
26
|
+
// size: FileFormatConfig.getMaxSize(FileFormatEnum.MP4, FIFTY_MB),
|
|
27
|
+
// count: 1,
|
|
28
|
+
// isRequired: false,
|
|
29
|
+
// format: FileFormatConfig.getAllowedMimeTypesFromFormats([
|
|
30
|
+
// FileFormatEnum.MP4,
|
|
31
|
+
// ]),
|
|
32
|
+
// },
|
|
33
|
+
// ];
|
|
@@ -7,7 +7,6 @@ import { PermissionEntityModel } from "../../model/permission-entity-model";
|
|
|
7
7
|
import { RegistrationEntityModel } from "../../model/registration-entity-model";
|
|
8
8
|
import { RoleEntityModel } from "../../model/role-entity-model";
|
|
9
9
|
import { RoleUserMappingEntityModel } from "../../model/role-user-mapping-entity-model";
|
|
10
|
-
import { IEquityAdviceEntity } from "./advice-entity.interface";
|
|
11
10
|
import { IAdvisorUserMappingEntity } from "./advisor-user-mapping-entity.interface";
|
|
12
11
|
import { IBankDetailEntity } from "./bank-details-entity.interface";
|
|
13
12
|
import { IConfigurationsEntity } from "./configurations-entity.interface";
|
|
@@ -15,6 +14,7 @@ import { ICorporateActionsAdviceEntity } from "./corporate-action-advice-entity.
|
|
|
15
14
|
import { ICorporateActionsEntity } from "./corporate-actions-entity.interface";
|
|
16
15
|
import { ICronJobsEntity } from "./cron-job-entity.interface";
|
|
17
16
|
import { IEntityAuditColumn } from "./entity-audit-column.interface";
|
|
17
|
+
import { IEquityAdviceEntity } from "./equity-advice-entity.interface";
|
|
18
18
|
import { IMutualFundAdviceEntity } from "./mutual-fund-advice-entity.interface";
|
|
19
19
|
import { IMutualFundsEntity } from "./mutual-funds-entity.interface";
|
|
20
20
|
import { INFOAdviceEntity } from "./nfo-advice-entity.interface";
|
|
@@ -16,7 +16,7 @@ export interface IEquityAdviceEntity extends IAuditColumnEntity {
|
|
|
16
16
|
videoUrl: string | null;
|
|
17
17
|
voiceUrl: string | null;
|
|
18
18
|
status: AdviceStatus;
|
|
19
|
-
rationale
|
|
19
|
+
rationale?: string | null;
|
|
20
20
|
targetHitOn: Date | null;
|
|
21
21
|
targetHitCMP: number | null;
|
|
22
22
|
gainLoss: number | null;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
export * from "./entity-audit-column.interface";
|
|
2
2
|
export * from "./organization-entity.interface";
|
|
3
|
-
export * from "./user-entity.interface";
|
|
4
3
|
export * from "./registration-entity";
|
|
4
|
+
export * from "./user-entity.interface";
|
|
5
5
|
export * from "./bank-details-entity.interface";
|
|
6
6
|
export * from "./pricing-plan-entity.interface";
|
|
7
7
|
export * from "./subscription-entity.interface";
|
|
8
|
-
export * from "./advice-entity.interface";
|
|
9
|
-
export * from "./mutual-funds-entity.interface";
|
|
10
8
|
export * from "../../model/interface/organization-entity-model.interface";
|
|
9
|
+
export * from "./equity-advice-entity.interface";
|
|
10
|
+
export * from "./mutual-funds-entity.interface";
|
|
11
11
|
export * from "./mutual-fund-advice-entity.interface";
|
|
12
|
-
export * from "./
|
|
12
|
+
export * from "./configurations-entity.interface";
|
|
13
13
|
export * from "./corporate-action-advice-entity.interface";
|
|
14
|
+
export * from "./corporate-actions-entity.interface";
|
|
15
|
+
export * from "./cron-job-entity.interface";
|
|
14
16
|
export * from "./equity-advice-in-process-entity.interface";
|
|
15
|
-
export * from "./nfo-entity.interface";
|
|
16
17
|
export * from "./nfo-advice-entity.interface";
|
|
17
|
-
export * from "./
|
|
18
|
-
export * from "./cron-job-entity.interface";
|
|
19
|
-
export * from "./entity-utils.interface";
|
|
18
|
+
export * from "./nfo-entity.interface";
|
|
20
19
|
export * from "./audit-column-entity.interface";
|
|
20
|
+
export * from "./entity-utils.interface";
|
|
21
21
|
export * from "./relation-config.interface";
|
|
22
|
-
export * from "./role.entity.interface";
|
|
23
22
|
export * from "./permission.entity.interface";
|
|
24
|
-
export * from "./role.permission.mapping.entity.interface";
|
|
25
23
|
export * from "./role-user-mapping-entity.interface";
|
|
24
|
+
export * from "./role.entity.interface";
|
|
25
|
+
export * from "./role.permission.mapping.entity.interface";
|
|
@@ -16,26 +16,26 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./entity-audit-column.interface"), exports);
|
|
18
18
|
__exportStar(require("./organization-entity.interface"), exports);
|
|
19
|
-
__exportStar(require("./user-entity.interface"), exports);
|
|
20
19
|
__exportStar(require("./registration-entity"), exports);
|
|
20
|
+
__exportStar(require("./user-entity.interface"), exports);
|
|
21
21
|
__exportStar(require("./bank-details-entity.interface"), exports);
|
|
22
22
|
__exportStar(require("./pricing-plan-entity.interface"), exports);
|
|
23
23
|
__exportStar(require("./subscription-entity.interface"), exports);
|
|
24
|
-
__exportStar(require("./advice-entity.interface"), exports);
|
|
25
|
-
__exportStar(require("./mutual-funds-entity.interface"), exports);
|
|
26
24
|
__exportStar(require("../../model/interface/organization-entity-model.interface"), exports);
|
|
25
|
+
__exportStar(require("./equity-advice-entity.interface"), exports);
|
|
26
|
+
__exportStar(require("./mutual-funds-entity.interface"), exports);
|
|
27
27
|
__exportStar(require("./mutual-fund-advice-entity.interface"), exports);
|
|
28
|
-
__exportStar(require("./
|
|
28
|
+
__exportStar(require("./configurations-entity.interface"), exports);
|
|
29
29
|
__exportStar(require("./corporate-action-advice-entity.interface"), exports);
|
|
30
|
+
__exportStar(require("./corporate-actions-entity.interface"), exports);
|
|
31
|
+
__exportStar(require("./cron-job-entity.interface"), exports);
|
|
30
32
|
__exportStar(require("./equity-advice-in-process-entity.interface"), exports);
|
|
31
|
-
__exportStar(require("./nfo-entity.interface"), exports);
|
|
32
33
|
__exportStar(require("./nfo-advice-entity.interface"), exports);
|
|
33
|
-
__exportStar(require("./
|
|
34
|
-
__exportStar(require("./cron-job-entity.interface"), exports);
|
|
35
|
-
__exportStar(require("./entity-utils.interface"), exports);
|
|
34
|
+
__exportStar(require("./nfo-entity.interface"), exports);
|
|
36
35
|
__exportStar(require("./audit-column-entity.interface"), exports);
|
|
36
|
+
__exportStar(require("./entity-utils.interface"), exports);
|
|
37
37
|
__exportStar(require("./relation-config.interface"), exports);
|
|
38
|
-
__exportStar(require("./role.entity.interface"), exports);
|
|
39
38
|
__exportStar(require("./permission.entity.interface"), exports);
|
|
40
|
-
__exportStar(require("./role.permission.mapping.entity.interface"), exports);
|
|
41
39
|
__exportStar(require("./role-user-mapping-entity.interface"), exports);
|
|
40
|
+
__exportStar(require("./role.entity.interface"), exports);
|
|
41
|
+
__exportStar(require("./role.permission.mapping.entity.interface"), exports);
|
|
@@ -129,3 +129,26 @@ export declare function getDuplicates<T>(arr: T[]): T[];
|
|
|
129
129
|
* USER_NAV → user_nav
|
|
130
130
|
*/
|
|
131
131
|
export declare function derivePermissionGroup(permissionName: string): string;
|
|
132
|
+
/**
|
|
133
|
+
* Converts a camelCase or PascalCase string into a human-readable
|
|
134
|
+
* title-cased string with spaces.
|
|
135
|
+
*
|
|
136
|
+
* This is useful for generating user-friendly field names in
|
|
137
|
+
* validation or error messages.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* camelCaseToTitle("noteDocument");
|
|
141
|
+
* // → "Note Document"
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* camelCaseToTitle("additionalDocuments");
|
|
145
|
+
* // → "Additional Documents"
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* camelCaseToTitle("PDFDocument");
|
|
149
|
+
* // → "PDF Document"
|
|
150
|
+
*
|
|
151
|
+
* @param input - The camelCase or PascalCase string to convert
|
|
152
|
+
* @returns A title-cased, space-separated string
|
|
153
|
+
*/
|
|
154
|
+
export declare function camelCaseToTitle(input: string): string;
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.derivePermissionGroup = exports.getDuplicates = exports.getPropertyFilterByPermissionFn = exports.groupByOneToOneFunction = exports.deepMerge = exports.toDateFromEpoch = exports.groupByFunction = exports.transformDate = exports.getStringValues = exports.getTodayISTEpoch = void 0;
|
|
12
|
+
exports.camelCaseToTitle = exports.derivePermissionGroup = exports.getDuplicates = exports.getPropertyFilterByPermissionFn = exports.groupByOneToOneFunction = exports.deepMerge = exports.toDateFromEpoch = exports.groupByFunction = exports.transformDate = exports.getStringValues = exports.getTodayISTEpoch = void 0;
|
|
13
13
|
const _enum_1 = require("../@enum");
|
|
14
14
|
const _type_1 = require("../@type");
|
|
15
15
|
const model_1 = require("../model");
|
|
@@ -282,3 +282,35 @@ function derivePermissionGroup(permissionName) {
|
|
|
282
282
|
return `${entity}_${action.toLowerCase()}`;
|
|
283
283
|
}
|
|
284
284
|
exports.derivePermissionGroup = derivePermissionGroup;
|
|
285
|
+
/**
|
|
286
|
+
* Converts a camelCase or PascalCase string into a human-readable
|
|
287
|
+
* title-cased string with spaces.
|
|
288
|
+
*
|
|
289
|
+
* This is useful for generating user-friendly field names in
|
|
290
|
+
* validation or error messages.
|
|
291
|
+
*
|
|
292
|
+
* @example
|
|
293
|
+
* camelCaseToTitle("noteDocument");
|
|
294
|
+
* // → "Note Document"
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* camelCaseToTitle("additionalDocuments");
|
|
298
|
+
* // → "Additional Documents"
|
|
299
|
+
*
|
|
300
|
+
* @example
|
|
301
|
+
* camelCaseToTitle("PDFDocument");
|
|
302
|
+
* // → "PDF Document"
|
|
303
|
+
*
|
|
304
|
+
* @param input - The camelCase or PascalCase string to convert
|
|
305
|
+
* @returns A title-cased, space-separated string
|
|
306
|
+
*/
|
|
307
|
+
function camelCaseToTitle(input) {
|
|
308
|
+
if (input.length === 0)
|
|
309
|
+
return input;
|
|
310
|
+
return (input
|
|
311
|
+
// insert space before capital letters
|
|
312
|
+
.replace(/([a-z])([A-Z])/g, "$1 $2")
|
|
313
|
+
// capitalize first letter
|
|
314
|
+
.replace(/^./, (char) => char.toUpperCase()));
|
|
315
|
+
}
|
|
316
|
+
exports.camelCaseToTitle = camelCaseToTitle;
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IOrganizationEntity, ISubscriptionEntity } from "../entity";
|
|
2
|
-
import { IUserEntityWithoutPassword } from "../user-entity-without-password.interface";
|
|
3
|
-
export interface IGetOrganizationEntities extends IOrganizationEntity {
|
|
4
|
-
advisors: IUserEntityWithoutPassword[];
|
|
5
|
-
subscriptions: ISubscriptionEntity[];
|
|
6
|
-
}
|
|
7
|
-
export interface IGetOrganizationEntitiesResponse {
|
|
8
|
-
[organizationId: number]: IGetOrganizationEntities;
|
|
9
|
-
}
|
|
File without changes
|
|
File without changes
|
/package/build/src/interface/api/{get-advice-by-ids-status.inteface.js → multer-file-config.js}
RENAMED
|
File without changes
|
|
File without changes
|