ia-common 1.0.1-beta.210 → 1.0.1-beta.212
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/@enum.d.ts +6 -0
- package/build/@enum.js +6 -0
- package/build/@model.d.ts +1 -0
- package/build/@model.js +1 -0
- package/build/enum/configuration-description.enum.d.ts +3 -0
- package/build/enum/configuration-description.enum.js +7 -0
- package/build/enum/configuration-key.enum.d.ts +8 -0
- package/build/enum/configuration-key.enum.js +25 -0
- package/build/enum/configuration-text.enum.d.ts +3 -0
- package/build/enum/configuration-text.enum.js +7 -0
- package/build/enum/cron-job-name.enum.d.ts +3 -0
- package/build/enum/cron-job-name.enum.js +7 -0
- package/build/enum/cron-job-status.enum.d.ts +5 -0
- package/build/enum/cron-job-status.enum.js +9 -0
- package/build/enum/time-zone.enum.d.ts +3 -0
- package/build/enum/time-zone.enum.js +7 -0
- package/build/interface/api/get-cron-job-by-date-range.interface.d.ts +13 -0
- package/build/interface/api/get-cron-job-by-date-range.interface.js +2 -0
- package/build/interface/api/manual-trigger-cron-job.interface.d.ts +5 -0
- package/build/interface/api/manual-trigger-cron-job.interface.js +2 -0
- package/build/interface/entity/configurations-entity.interface.d.ts +9 -0
- package/build/interface/entity/configurations-entity.interface.js +2 -0
- package/build/interface/entity/cron-job-entity.interface.d.ts +11 -0
- package/build/interface/entity/cron-job-entity.interface.js +2 -0
- package/build/interface/entity/index.d.ts +2 -0
- package/build/interface/entity/index.js +2 -0
- package/build/model/configurations-entity-model.d.ts +16 -0
- package/build/model/configurations-entity-model.js +17 -0
- package/build/utils/string-to-date-conversion-methods.d.ts +14 -0
- package/build/utils/string-to-date-conversion-methods.js +15 -1
- package/package.json +1 -1
package/build/@enum.d.ts
CHANGED
|
@@ -28,3 +28,9 @@ export * from "./enum/advisor-user-mapping-type.enum";
|
|
|
28
28
|
export * from "./enum/mutual-fund-status.enum";
|
|
29
29
|
export * from "./enum/nfo-advice-status.enum";
|
|
30
30
|
export * from "./enum/corporate-action-advice-status.enum";
|
|
31
|
+
export * from "./enum/configuration-description.enum";
|
|
32
|
+
export * from "./enum/configuration-key.enum";
|
|
33
|
+
export * from "./enum/configuration-text.enum";
|
|
34
|
+
export * from "./enum/cron-job-name.enum";
|
|
35
|
+
export * from "./enum/cron-job-status.enum";
|
|
36
|
+
export * from "./enum/time-zone.enum";
|
package/build/@enum.js
CHANGED
|
@@ -44,3 +44,9 @@ __exportStar(require("./enum/advisor-user-mapping-type.enum"), exports);
|
|
|
44
44
|
__exportStar(require("./enum/mutual-fund-status.enum"), exports);
|
|
45
45
|
__exportStar(require("./enum/nfo-advice-status.enum"), exports);
|
|
46
46
|
__exportStar(require("./enum/corporate-action-advice-status.enum"), exports);
|
|
47
|
+
__exportStar(require("./enum/configuration-description.enum"), exports);
|
|
48
|
+
__exportStar(require("./enum/configuration-key.enum"), exports);
|
|
49
|
+
__exportStar(require("./enum/configuration-text.enum"), exports);
|
|
50
|
+
__exportStar(require("./enum/cron-job-name.enum"), exports);
|
|
51
|
+
__exportStar(require("./enum/cron-job-status.enum"), exports);
|
|
52
|
+
__exportStar(require("./enum/time-zone.enum"), exports);
|
package/build/@model.d.ts
CHANGED
|
@@ -17,3 +17,4 @@ export * from "./model/ipo-corporate-action-model";
|
|
|
17
17
|
export * from "./model/corporate-action-model";
|
|
18
18
|
export * from "./model/split-bonus-corporate-action-model";
|
|
19
19
|
export * from "./model/ofs-corporate-action-model";
|
|
20
|
+
export * from "./model/configurations-entity-model";
|
package/build/@model.js
CHANGED
|
@@ -33,3 +33,4 @@ __exportStar(require("./model/ipo-corporate-action-model"), exports);
|
|
|
33
33
|
__exportStar(require("./model/corporate-action-model"), exports);
|
|
34
34
|
__exportStar(require("./model/split-bonus-corporate-action-model"), exports);
|
|
35
35
|
__exportStar(require("./model/ofs-corporate-action-model"), exports);
|
|
36
|
+
__exportStar(require("./model/configurations-entity-model"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfigurationDescription = void 0;
|
|
4
|
+
var ConfigurationDescription;
|
|
5
|
+
(function (ConfigurationDescription) {
|
|
6
|
+
ConfigurationDescription["ORGANIZATION_DEACTIVATION"] = "Update the status of \"Account_suspended\" accounts in Organization, Users, and Subscription entities upon SEBI certificate expiration";
|
|
7
|
+
})(ConfigurationDescription || (exports.ConfigurationDescription = ConfigurationDescription = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CronJobsNames } from './cron-job-name.enum';
|
|
2
|
+
export declare enum ConfigurationKey {
|
|
3
|
+
ORGANIZATION_DEACTIVATION = "organization_deactivation"
|
|
4
|
+
}
|
|
5
|
+
export declare namespace ConfigurationKey {
|
|
6
|
+
function CronJobsConfigurationsKeys(key: ConfigurationKey): boolean;
|
|
7
|
+
function getCronJobName(configurationKey: ConfigurationKey): CronJobsNames;
|
|
8
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfigurationKey = void 0;
|
|
4
|
+
var cron_job_name_enum_1 = require("./cron-job-name.enum");
|
|
5
|
+
var ConfigurationKey;
|
|
6
|
+
(function (ConfigurationKey) {
|
|
7
|
+
ConfigurationKey["ORGANIZATION_DEACTIVATION"] = "organization_deactivation";
|
|
8
|
+
})(ConfigurationKey || (exports.ConfigurationKey = ConfigurationKey = {}));
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
10
|
+
(function (ConfigurationKey) {
|
|
11
|
+
function CronJobsConfigurationsKeys(key) {
|
|
12
|
+
if (getCronJobName(key))
|
|
13
|
+
return true;
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
ConfigurationKey.CronJobsConfigurationsKeys = CronJobsConfigurationsKeys;
|
|
17
|
+
function getCronJobName(configurationKey) {
|
|
18
|
+
var _a;
|
|
19
|
+
var cronJobConfigurationKeyMapping = (_a = {},
|
|
20
|
+
_a[ConfigurationKey.ORGANIZATION_DEACTIVATION] = cron_job_name_enum_1.CronJobsNames.ORGANIZATION_DEACTIVATION,
|
|
21
|
+
_a);
|
|
22
|
+
return cronJobConfigurationKeyMapping[configurationKey];
|
|
23
|
+
}
|
|
24
|
+
ConfigurationKey.getCronJobName = getCronJobName;
|
|
25
|
+
})(ConfigurationKey || (exports.ConfigurationKey = ConfigurationKey = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfigurationText = void 0;
|
|
4
|
+
var ConfigurationText;
|
|
5
|
+
(function (ConfigurationText) {
|
|
6
|
+
ConfigurationText["ORGANIZATION_DEACTIVATION"] = "Update the status of \"Account_suspended\" accounts in Organization, Users, and Subscription entities upon SEBI certificate expiration";
|
|
7
|
+
})(ConfigurationText || (exports.ConfigurationText = ConfigurationText = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CronJobsNames = void 0;
|
|
4
|
+
var CronJobsNames;
|
|
5
|
+
(function (CronJobsNames) {
|
|
6
|
+
CronJobsNames["ORGANIZATION_DEACTIVATION"] = "organization_deactivation";
|
|
7
|
+
})(CronJobsNames || (exports.CronJobsNames = CronJobsNames = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CronJobsStatus = void 0;
|
|
4
|
+
var CronJobsStatus;
|
|
5
|
+
(function (CronJobsStatus) {
|
|
6
|
+
CronJobsStatus["RUNNING"] = "running";
|
|
7
|
+
CronJobsStatus["FAILED"] = "failed";
|
|
8
|
+
CronJobsStatus["SUCCESS"] = "success";
|
|
9
|
+
})(CronJobsStatus || (exports.CronJobsStatus = CronJobsStatus = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CronJobsNames, CronJobsStatus } from "../../@enum";
|
|
2
|
+
import { ICronJobsEntity } from "../entity";
|
|
3
|
+
import { Modify } from "../modify.interface";
|
|
4
|
+
export interface IGetCronJobsByDateRangeRequest {
|
|
5
|
+
dateRange: string;
|
|
6
|
+
name: CronJobsNames[];
|
|
7
|
+
status: CronJobsStatus[];
|
|
8
|
+
}
|
|
9
|
+
export interface IGetCronJobsByDateRangeResponse extends Modify<ICronJobsEntity, {
|
|
10
|
+
startTime: string;
|
|
11
|
+
endTime: string | null;
|
|
12
|
+
}> {
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConfigurationKey } from "../../@enum";
|
|
2
|
+
import { IEntityAuditColumn } from "./entity-audit-column.interface";
|
|
3
|
+
export interface IConfigurationsEntity extends IEntityAuditColumn {
|
|
4
|
+
id: number;
|
|
5
|
+
key: ConfigurationKey;
|
|
6
|
+
value: string | null;
|
|
7
|
+
text: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CronJobsNames, CronJobsStatus } from "../../@enum";
|
|
2
|
+
export interface ICronJobsEntity {
|
|
3
|
+
id: number;
|
|
4
|
+
job: CronJobsNames;
|
|
5
|
+
startTime: Date;
|
|
6
|
+
endTime: Date | null;
|
|
7
|
+
message: string;
|
|
8
|
+
error: string;
|
|
9
|
+
data: string;
|
|
10
|
+
status: CronJobsStatus;
|
|
11
|
+
}
|
|
@@ -16,3 +16,5 @@ export * from "./corporate-action-advice-entity.interface";
|
|
|
16
16
|
export * from "./equity-advice-in-process-entity.interface";
|
|
17
17
|
export * from "./nfo-entity.interface";
|
|
18
18
|
export * from "./nfp-advice-entity.interface";
|
|
19
|
+
export * from "./configurations-entity.interface";
|
|
20
|
+
export * from "./cron-job-entity.interface";
|
|
@@ -32,3 +32,5 @@ __exportStar(require("./corporate-action-advice-entity.interface"), exports);
|
|
|
32
32
|
__exportStar(require("./equity-advice-in-process-entity.interface"), exports);
|
|
33
33
|
__exportStar(require("./nfo-entity.interface"), exports);
|
|
34
34
|
__exportStar(require("./nfp-advice-entity.interface"), exports);
|
|
35
|
+
__exportStar(require("./configurations-entity.interface"), exports);
|
|
36
|
+
__exportStar(require("./cron-job-entity.interface"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IConfigurationsEntity } from "../@type";
|
|
2
|
+
import { ConfigurationKey } from "../enum/configuration-key.enum";
|
|
3
|
+
export declare class ConfigurationsModel implements IConfigurationsEntity {
|
|
4
|
+
id: number;
|
|
5
|
+
key: ConfigurationKey;
|
|
6
|
+
value: string;
|
|
7
|
+
description: string;
|
|
8
|
+
createdOn: Date;
|
|
9
|
+
updatedOn: Date;
|
|
10
|
+
createdBy: number;
|
|
11
|
+
updatedBy: number;
|
|
12
|
+
text: string;
|
|
13
|
+
constructor(data: IConfigurationsEntity);
|
|
14
|
+
isCronJobKey(): boolean;
|
|
15
|
+
static findByKey(configurationEntities: IConfigurationsEntity[], key: ConfigurationKey): IConfigurationsEntity | undefined;
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfigurationsModel = void 0;
|
|
4
|
+
var configuration_key_enum_1 = require("../enum/configuration-key.enum");
|
|
5
|
+
var ConfigurationsModel = /** @class */ (function () {
|
|
6
|
+
function ConfigurationsModel(data) {
|
|
7
|
+
Object.assign(this, data);
|
|
8
|
+
}
|
|
9
|
+
ConfigurationsModel.prototype.isCronJobKey = function () {
|
|
10
|
+
return configuration_key_enum_1.ConfigurationKey.CronJobsConfigurationsKeys(this.key);
|
|
11
|
+
};
|
|
12
|
+
ConfigurationsModel.findByKey = function (configurationEntities, key) {
|
|
13
|
+
return configurationEntities.find(function (configurationEntity) { return configurationEntity.key === key; });
|
|
14
|
+
};
|
|
15
|
+
return ConfigurationsModel;
|
|
16
|
+
}());
|
|
17
|
+
exports.ConfigurationsModel = ConfigurationsModel;
|
|
@@ -17,3 +17,17 @@ export declare function ConvertToCommonEntity<T extends {
|
|
|
17
17
|
createdOn: string;
|
|
18
18
|
updatedOn: string;
|
|
19
19
|
}>>(obj: T): R;
|
|
20
|
+
export declare function ConvertToCronJobEntities<T extends {
|
|
21
|
+
startTime: Date;
|
|
22
|
+
endTime: Date | null;
|
|
23
|
+
}>(inputObject: T[]): Modify<T, {
|
|
24
|
+
startTime: string;
|
|
25
|
+
endTime: string | null;
|
|
26
|
+
}>[];
|
|
27
|
+
export declare function ConvertToCommonCronJobEntity<T extends {
|
|
28
|
+
startTime: Date;
|
|
29
|
+
endTime: Date | null;
|
|
30
|
+
}, R extends Modify<T, {
|
|
31
|
+
startTime: string;
|
|
32
|
+
endTime: string | null;
|
|
33
|
+
}>>(obj: T): R;
|
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
return t;
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.ConvertToCommonEntity = exports.ConvertToCommonEntities = exports.ConvertCommonEntries = void 0;
|
|
25
|
+
exports.ConvertToCommonCronJobEntity = exports.ConvertToCronJobEntities = exports.ConvertToCommonEntity = exports.ConvertToCommonEntities = exports.ConvertCommonEntries = void 0;
|
|
26
26
|
//key - value converter
|
|
27
27
|
function ConvertCommonEntries(inputObject) {
|
|
28
28
|
return Object.entries(inputObject).reduce(function (acc, _a) {
|
|
@@ -46,3 +46,17 @@ function ConvertToCommonEntity(obj) {
|
|
|
46
46
|
return __assign({ createdOn: (_a = obj.createdOn) === null || _a === void 0 ? void 0 : _a.toISOString(), updatedOn: (_b = obj.updatedOn) === null || _b === void 0 ? void 0 : _b.toISOString() }, objectToAssign);
|
|
47
47
|
}
|
|
48
48
|
exports.ConvertToCommonEntity = ConvertToCommonEntity;
|
|
49
|
+
function ConvertToCronJobEntities(inputObject) {
|
|
50
|
+
return inputObject.reduce(function (acc, value) {
|
|
51
|
+
var modifiedEntity = ConvertToCommonCronJobEntity(value);
|
|
52
|
+
acc.push(modifiedEntity);
|
|
53
|
+
return acc;
|
|
54
|
+
}, []);
|
|
55
|
+
}
|
|
56
|
+
exports.ConvertToCronJobEntities = ConvertToCronJobEntities;
|
|
57
|
+
function ConvertToCommonCronJobEntity(obj) {
|
|
58
|
+
var _a, _b;
|
|
59
|
+
var _ = obj.startTime, __ = obj.endTime, objectToAssign = __rest(obj, ["startTime", "endTime"]);
|
|
60
|
+
return __assign({ startTime: (_a = obj.startTime) === null || _a === void 0 ? void 0 : _a.toISOString(), endTime: ((_b = obj.endTime) === null || _b === void 0 ? void 0 : _b.toISOString()) || null }, objectToAssign);
|
|
61
|
+
}
|
|
62
|
+
exports.ConvertToCommonCronJobEntity = ConvertToCommonCronJobEntity;
|