@studyportals/campaign-management-api-interface 0.13.1 → 0.13.3
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/{index.ts → index.d.ts} +1 -21
- package/index.js +20 -0
- package/index.js.map +1 -0
- package/package.json +3 -3
- package/src/auditor-campaign-management-api.client.d.ts +12 -0
- package/src/auditor-campaign-management-api.client.js +56 -0
- package/src/auditor-campaign-management-api.client.js.map +1 -0
- package/src/campaign-management-api.client.d.ts +13 -0
- package/src/campaign-management-api.client.js +68 -0
- package/src/campaign-management-api.client.js.map +1 -0
- package/src/domain/auditor/campaigns/geotargeting.entities.d.ts +14 -0
- package/src/domain/auditor/campaigns/geotargeting.entities.js +11 -0
- package/src/domain/auditor/campaigns/geotargeting.entities.js.map +1 -0
- package/src/domain/auditor/enums/auditor-entity-type.enum.d.ts +3 -0
- package/src/domain/auditor/enums/auditor-entity-type.enum.js +8 -0
- package/src/domain/auditor/enums/auditor-entity-type.enum.js.map +1 -0
- package/src/domain/auditor/enums/{auditor-operation.enum.ts → auditor-operation.enum.d.ts} +2 -2
- package/src/domain/auditor/enums/auditor-operation.enum.js +14 -0
- package/src/domain/auditor/enums/auditor-operation.enum.js.map +1 -0
- package/src/domain/auditor/get-auditor.dto.d.ts +13 -0
- package/src/domain/auditor/get-auditor.dto.js +17 -0
- package/src/domain/auditor/get-auditor.dto.js.map +1 -0
- package/src/domain/campaign/CampaignsEntitiesConfig.dto.d.ts +7 -0
- package/src/domain/campaign/CampaignsEntitiesConfig.dto.js +10 -0
- package/src/domain/campaign/CampaignsEntitiesConfig.dto.js.map +1 -0
- package/src/private-campaign-management-api.client.d.ts +18 -0
- package/src/private-campaign-management-api.client.js +79 -0
- package/src/private-campaign-management-api.client.js.map +1 -0
- package/.vscode/launch.json +0 -36
- package/.vscode/settings.json +0 -4
- package/.vscode/tasks.json +0 -41
- package/README.md +0 -2
- package/jest.config.single-file.json +0 -20
- package/jest.config.unit.json +0 -19
- package/src/auditor-campaign-management-api.client.ts +0 -54
- package/src/campaign-management-api.client.ts +0 -68
- package/src/domain/auditor/campaigns/geotargeting.entities.ts +0 -20
- package/src/domain/auditor/enums/auditor-entity-type.enum.ts +0 -3
- package/src/domain/auditor/get-auditor.dto.ts +0 -33
- package/src/domain/campaign/CampaignsEntitiesConfig.dto.ts +0 -7
- package/src/private-campaign-management-api.client.ts +0 -80
- package/tests-u/domain/auditor/auditor-campaign-management-api-client.test.ts +0 -99
- package/tests-u/domain/auditor/enums/auditor-entity-type-enum.test.ts +0 -22
- package/tests-u/domain/auditor/enums/auditor-operation-enum.test.ts +0 -34
- package/tests-u/domain/auditor/get-auditor-entity.test.ts +0 -34
- package/tests-u/domain/campaign/campaign-management-api-client.test.ts +0 -111
- package/tests-u/domain/campaign/private-campaign-management-api-client.test.ts +0 -114
- package/tsconfig.json +0 -39
package/{index.ts → index.d.ts}
RENAMED
|
@@ -6,24 +6,4 @@ import { GetAuditorDto } from "./src/domain/auditor/get-auditor.dto";
|
|
|
6
6
|
import { CampaignsEntitiesConfigDto } from "./src/domain/campaign/CampaignsEntitiesConfig.dto";
|
|
7
7
|
import { NumberMap, Pricing, ICampaignAuditorData } from "./src/domain/auditor/campaigns/geotargeting.entities";
|
|
8
8
|
import { PrivateCampaignManagementAPIClient } from "./src/private-campaign-management-api.client";
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
// Clients
|
|
12
|
-
AuditorCampaignManagementAPIClient,
|
|
13
|
-
CampaignManagementAPIClient,
|
|
14
|
-
PrivateCampaignManagementAPIClient,
|
|
15
|
-
|
|
16
|
-
// Enums
|
|
17
|
-
AuditorEntityType,
|
|
18
|
-
AuditorOperation,
|
|
19
|
-
|
|
20
|
-
// Output Dto
|
|
21
|
-
GetAuditorDto,
|
|
22
|
-
|
|
23
|
-
// Input Dto
|
|
24
|
-
CampaignsEntitiesConfigDto,
|
|
25
|
-
|
|
26
|
-
NumberMap,
|
|
27
|
-
Pricing,
|
|
28
|
-
ICampaignAuditorData
|
|
29
|
-
}
|
|
9
|
+
export { AuditorCampaignManagementAPIClient, CampaignManagementAPIClient, PrivateCampaignManagementAPIClient, AuditorEntityType, AuditorOperation, GetAuditorDto, CampaignsEntitiesConfigDto, NumberMap, Pricing, ICampaignAuditorData };
|
package/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Pricing = exports.CampaignsEntitiesConfigDto = exports.GetAuditorDto = exports.AuditorOperation = exports.AuditorEntityType = exports.PrivateCampaignManagementAPIClient = exports.CampaignManagementAPIClient = exports.AuditorCampaignManagementAPIClient = void 0;
|
|
4
|
+
const auditor_campaign_management_api_client_1 = require("./src/auditor-campaign-management-api.client");
|
|
5
|
+
Object.defineProperty(exports, "AuditorCampaignManagementAPIClient", { enumerable: true, get: function () { return auditor_campaign_management_api_client_1.AuditorCampaignManagementAPIClient; } });
|
|
6
|
+
const campaign_management_api_client_1 = require("./src/campaign-management-api.client");
|
|
7
|
+
Object.defineProperty(exports, "CampaignManagementAPIClient", { enumerable: true, get: function () { return campaign_management_api_client_1.CampaignManagementAPIClient; } });
|
|
8
|
+
const auditor_entity_type_enum_1 = require("./src/domain/auditor/enums/auditor-entity-type.enum");
|
|
9
|
+
Object.defineProperty(exports, "AuditorEntityType", { enumerable: true, get: function () { return auditor_entity_type_enum_1.AuditorEntityType; } });
|
|
10
|
+
const auditor_operation_enum_1 = require("./src/domain/auditor/enums/auditor-operation.enum");
|
|
11
|
+
Object.defineProperty(exports, "AuditorOperation", { enumerable: true, get: function () { return auditor_operation_enum_1.AuditorOperation; } });
|
|
12
|
+
const get_auditor_dto_1 = require("./src/domain/auditor/get-auditor.dto");
|
|
13
|
+
Object.defineProperty(exports, "GetAuditorDto", { enumerable: true, get: function () { return get_auditor_dto_1.GetAuditorDto; } });
|
|
14
|
+
const CampaignsEntitiesConfig_dto_1 = require("./src/domain/campaign/CampaignsEntitiesConfig.dto");
|
|
15
|
+
Object.defineProperty(exports, "CampaignsEntitiesConfigDto", { enumerable: true, get: function () { return CampaignsEntitiesConfig_dto_1.CampaignsEntitiesConfigDto; } });
|
|
16
|
+
const geotargeting_entities_1 = require("./src/domain/auditor/campaigns/geotargeting.entities");
|
|
17
|
+
Object.defineProperty(exports, "Pricing", { enumerable: true, get: function () { return geotargeting_entities_1.Pricing; } });
|
|
18
|
+
const private_campaign_management_api_client_1 = require("./src/private-campaign-management-api.client");
|
|
19
|
+
Object.defineProperty(exports, "PrivateCampaignManagementAPIClient", { enumerable: true, get: function () { return private_campaign_management_api_client_1.PrivateCampaignManagementAPIClient; } });
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,yGAAkG;AAW9F,mHAXK,2EAAkC,OAWL;AAVtC,yFAAmF;AAW/E,4GAXK,4DAA2B,OAWL;AAV/B,kGAAwF;AAcpF,kGAdK,4CAAiB,OAcL;AAbrB,8FAAqF;AAcjF,iGAdK,yCAAgB,OAcL;AAbpB,0EAAqE;AAgBjE,8FAhBK,+BAAa,OAgBL;AAfjB,mGAA+F;AAkB3F,2GAlBK,wDAA0B,OAkBL;AAjB9B,gGAAgH;AAoB5G,wFApBgB,+BAAO,OAoBhB;AAnBX,yGAAkG;AAM9F,mHANK,2EAAkC,OAML"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studyportals/campaign-management-api-interface",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"compile": "rm -fR bin && npx tsc",
|
|
6
6
|
"test-u": "jest -c jest.config.unit.json --silent --maxWorkers=1",
|
|
7
7
|
"test-i": "nyc mocha src tests-i",
|
|
8
8
|
"prepare-deployment": "npm run test-u && npm run compile && cp package.json bin/package.json && rm -fR bin/tests-u",
|
|
9
|
-
"deploy": "npm run prepare-deployment && npm publish --access=public",
|
|
9
|
+
"deploy": "npm run prepare-deployment && npm publish ./bin --access=public",
|
|
10
10
|
"deploy-patch": "npm version patch && npm run deploy",
|
|
11
11
|
"deploy-minor": "npm version minor && npm run deploy",
|
|
12
12
|
"deploy-major": "npm version major && npm run deploy",
|
|
13
|
-
"deploy-beta": "npm version prerelease && npm run prepare-deployment && npm publish bin --tag beta --access=public"
|
|
13
|
+
"deploy-beta": "npm version prerelease && npm run prepare-deployment && npm publish ./bin --tag beta --access=public"
|
|
14
14
|
},
|
|
15
15
|
"author": "SPNightsWatch",
|
|
16
16
|
"license": "ISC",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { GetAuditorDto } from "./domain/auditor/get-auditor.dto";
|
|
3
|
+
import { AuditorOperation } from "./domain/auditor/enums/auditor-operation.enum";
|
|
4
|
+
export declare class AuditorCampaignManagementAPIClient {
|
|
5
|
+
private readonly baseUrl;
|
|
6
|
+
constructor(baseUrl: string);
|
|
7
|
+
getCampaignAuditorData(campaignID: number, jwt?: string): Promise<GetAuditorDto[]>;
|
|
8
|
+
storeCampaignAuditorData(operation: AuditorOperation, campaignID: number, username: string, isUserAction: boolean, data: any, jwt?: string): Promise<GetAuditorDto>;
|
|
9
|
+
private getRequest;
|
|
10
|
+
private postRequest;
|
|
11
|
+
private buildBaseUrl;
|
|
12
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AuditorCampaignManagementAPIClient = void 0;
|
|
13
|
+
require("reflect-metadata");
|
|
14
|
+
const inversify_1 = require("inversify");
|
|
15
|
+
const superagent = require("superagent");
|
|
16
|
+
let AuditorCampaignManagementAPIClient = class AuditorCampaignManagementAPIClient {
|
|
17
|
+
constructor(baseUrl) {
|
|
18
|
+
this.baseUrl = baseUrl;
|
|
19
|
+
}
|
|
20
|
+
async getCampaignAuditorData(campaignID, jwt = "") {
|
|
21
|
+
const result = await this.getRequest(`auditor/campaigns/${campaignID}`, jwt);
|
|
22
|
+
const getAuditorDtos = result.body;
|
|
23
|
+
return getAuditorDtos;
|
|
24
|
+
}
|
|
25
|
+
async storeCampaignAuditorData(operation, campaignID, username, isUserAction, data, jwt = "") {
|
|
26
|
+
const sendData = {
|
|
27
|
+
"operation": operation,
|
|
28
|
+
"entityID": campaignID,
|
|
29
|
+
"username": username,
|
|
30
|
+
"isUserAction": isUserAction,
|
|
31
|
+
"data": data
|
|
32
|
+
};
|
|
33
|
+
const result = await this.postRequest(`auditor/campaigns`, sendData, jwt);
|
|
34
|
+
return result.body;
|
|
35
|
+
}
|
|
36
|
+
async getRequest(relative = "", jwt = "") {
|
|
37
|
+
return await superagent.get(this.buildBaseUrl(relative))
|
|
38
|
+
.set("Content-Type", "application/json")
|
|
39
|
+
.set("Authorization", jwt);
|
|
40
|
+
}
|
|
41
|
+
async postRequest(relative = "", data, jwt = "") {
|
|
42
|
+
return await superagent.post(this.buildBaseUrl(relative))
|
|
43
|
+
.set("Content-Type", "application/json")
|
|
44
|
+
.set("Authorization", jwt)
|
|
45
|
+
.send(data);
|
|
46
|
+
}
|
|
47
|
+
buildBaseUrl(relative) {
|
|
48
|
+
return `${this.baseUrl}/${relative}`;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
AuditorCampaignManagementAPIClient = __decorate([
|
|
52
|
+
(0, inversify_1.injectable)(),
|
|
53
|
+
__metadata("design:paramtypes", [String])
|
|
54
|
+
], AuditorCampaignManagementAPIClient);
|
|
55
|
+
exports.AuditorCampaignManagementAPIClient = AuditorCampaignManagementAPIClient;
|
|
56
|
+
//# sourceMappingURL=auditor-campaign-management-api.client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auditor-campaign-management-api.client.js","sourceRoot":"","sources":["../../src/auditor-campaign-management-api.client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAA0B;AAK1B,yCAAuC;AAEvC,yCAAyC;AAGlC,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAC3C,YACqB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;IAChC,CAAC;IAEE,KAAK,CAAC,sBAAsB,CAAC,UAAkB,EAAE,GAAG,GAAG,EAAE;QAC5D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,qBAAqB,UAAU,EAAE,EAAE,GAAG,CAAC,CAAC;QAC7E,MAAM,cAAc,GAAG,MAAM,CAAC,IAAuB,CAAC;QAEtD,OAAO,cAAc,CAAC;IAC1B,CAAC;IAEM,KAAK,CAAC,wBAAwB,CAAC,SAA2B,EAAE,UAAkB,EAAE,QAAgB,EAAE,YAAqB,EAAE,IAAS,EAAE,GAAG,GAAG,EAAE;QAC/I,MAAM,QAAQ,GAAG;YACb,WAAW,EAAE,SAAS;YACtB,UAAU,EAAE,UAAU;YACtB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,YAAY;YAC5B,MAAM,EAAE,IAAI;SACf,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,mBAAmB,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;QAE1E,OAAO,MAAM,CAAC,IAAqB,CAAC;IACxC,CAAC;IAGO,KAAK,CAAC,UAAU,CAAC,WAAmB,EAAE,EAAE,GAAG,GAAG,EAAE;QACpD,OAAO,MAAM,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;aACnD,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC;aACvC,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;IACnC,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,WAAmB,EAAE,EAAE,IAAS,EAAE,GAAG,GAAG,EAAE;QAChE,OAAO,MAAM,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;aACpD,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC;aACvC,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC;aACzB,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAEO,YAAY,CAAC,QAAgB;QACjC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,QAAQ,EAAE,CAAC;IACzC,CAAC;CACJ,CAAA;AA3CY,kCAAkC;IAD9C,IAAA,sBAAU,GAAE;;GACA,kCAAkC,CA2C9C;AA3CY,gFAAkC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { CampaignsEntitiesConfigDto } from "./domain/campaign/CampaignsEntitiesConfig.dto";
|
|
3
|
+
export declare class CampaignManagementAPIClient {
|
|
4
|
+
private readonly baseUrl;
|
|
5
|
+
constructor(baseUrl: string);
|
|
6
|
+
addCampaignsEntitiesConfigs(campaignID: number, campaignsEntitiesConfigs: CampaignsEntitiesConfigDto[]): Promise<void>;
|
|
7
|
+
removeCampaignsEntitiesConfigsByID(campaignID: number, campaignsEntitiesConfigsIDs: number[]): Promise<void>;
|
|
8
|
+
clearCampaignsEntitiesConfigsByCampaignID(campaignID: number): Promise<void>;
|
|
9
|
+
setEntitiesBasic(campaignID: number, organisationIDs: number[], studyIDs: number[]): Promise<void>;
|
|
10
|
+
setEntitiesPremium(campaignID: number, organisationIDs: number[], studyIDs: number[]): Promise<void>;
|
|
11
|
+
private postRequest;
|
|
12
|
+
private buildBaseUrl;
|
|
13
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CampaignManagementAPIClient = void 0;
|
|
13
|
+
require("reflect-metadata");
|
|
14
|
+
const inversify_1 = require("inversify");
|
|
15
|
+
const superagent = require("superagent");
|
|
16
|
+
let CampaignManagementAPIClient = class CampaignManagementAPIClient {
|
|
17
|
+
constructor(baseUrl) {
|
|
18
|
+
this.baseUrl = baseUrl;
|
|
19
|
+
}
|
|
20
|
+
async addCampaignsEntitiesConfigs(campaignID, campaignsEntitiesConfigs) {
|
|
21
|
+
const path = `campaigns/add-campaigns-entities-configs`;
|
|
22
|
+
const data = {
|
|
23
|
+
campaignsEntitiesConfigs: campaignsEntitiesConfigs,
|
|
24
|
+
campaignID: campaignID
|
|
25
|
+
};
|
|
26
|
+
await this.postRequest(path, data);
|
|
27
|
+
}
|
|
28
|
+
async removeCampaignsEntitiesConfigsByID(campaignID, campaignsEntitiesConfigsIDs) {
|
|
29
|
+
const path = `campaigns/remove-campaigns-entities-configs`;
|
|
30
|
+
const data = { campaignsEntitiesConfigsIDs: campaignsEntitiesConfigsIDs, campaignID: campaignID };
|
|
31
|
+
await this.postRequest(path, data);
|
|
32
|
+
}
|
|
33
|
+
async clearCampaignsEntitiesConfigsByCampaignID(campaignID) {
|
|
34
|
+
const path = `campaigns/clear-campaigns-entities-configs`;
|
|
35
|
+
const data = { campaignID: campaignID };
|
|
36
|
+
await this.postRequest(path, data);
|
|
37
|
+
}
|
|
38
|
+
async setEntitiesBasic(campaignID, organisationIDs, studyIDs) {
|
|
39
|
+
const path = `campaigns/set-entities-basic`;
|
|
40
|
+
const data = {
|
|
41
|
+
organisationIDs: organisationIDs,
|
|
42
|
+
studyIDs: studyIDs,
|
|
43
|
+
campaignID: campaignID
|
|
44
|
+
};
|
|
45
|
+
await this.postRequest(path, data);
|
|
46
|
+
}
|
|
47
|
+
async setEntitiesPremium(campaignID, organisationIDs, studyIDs) {
|
|
48
|
+
const path = `campaigns/set-entities-premium`;
|
|
49
|
+
const data = {
|
|
50
|
+
organisationIDs: organisationIDs,
|
|
51
|
+
studyIDs: studyIDs,
|
|
52
|
+
campaignID: campaignID
|
|
53
|
+
};
|
|
54
|
+
await this.postRequest(path, data);
|
|
55
|
+
}
|
|
56
|
+
async postRequest(relative = "", data) {
|
|
57
|
+
return await superagent.post(this.buildBaseUrl(relative)).set("Content-Type", "application/json").send(data);
|
|
58
|
+
}
|
|
59
|
+
buildBaseUrl(relative) {
|
|
60
|
+
return `${this.baseUrl}/${relative}`;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
CampaignManagementAPIClient = __decorate([
|
|
64
|
+
(0, inversify_1.injectable)(),
|
|
65
|
+
__metadata("design:paramtypes", [String])
|
|
66
|
+
], CampaignManagementAPIClient);
|
|
67
|
+
exports.CampaignManagementAPIClient = CampaignManagementAPIClient;
|
|
68
|
+
//# sourceMappingURL=campaign-management-api.client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"campaign-management-api.client.js","sourceRoot":"","sources":["../../src/campaign-management-api.client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAA0B;AAG1B,yCAAuC;AAEvC,yCAAyC;AAGlC,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACvC,YACkB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;IAC7B,CAAC;IAEE,KAAK,CAAC,2BAA2B,CAAC,UAAkB,EAAE,wBAAsD;QAClH,MAAM,IAAI,GAAG,0CAA0C,CAAC;QACxD,MAAM,IAAI,GAAG;YACZ,wBAAwB,EAAE,wBAAwB;YAClD,UAAU,EAAE,UAAU;SACtB,CAAC;QAEF,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAEM,KAAK,CAAC,kCAAkC,CAAC,UAAkB,EAAE,2BAAqC;QACxG,MAAM,IAAI,GAAG,6CAA6C,CAAC;QAC3D,MAAM,IAAI,GAAG,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;QAElG,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAEM,KAAK,CAAC,yCAAyC,CAAC,UAAkB;QACxE,MAAM,IAAI,GAAG,4CAA4C,CAAC;QAC1D,MAAM,IAAI,GAAG,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;QAExC,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,UAAkB,EAAE,eAAyB,EAAE,QAAkB;QAC9F,MAAM,IAAI,GAAG,8BAA8B,CAAC;QAC5C,MAAM,IAAI,GAAG;YACZ,eAAe,EAAE,eAAe;YAChC,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE,UAAU;SACtB,CAAC;QAEF,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,UAAkB,EAAE,eAAyB,EAAE,QAAkB;QAChG,MAAM,IAAI,GAAG,gCAAgC,CAAC;QAC9C,MAAM,IAAI,GAAG;YACZ,eAAe,EAAE,eAAe;YAChC,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE,UAAU;SACtB,CAAC;QAEF,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,WAAmB,EAAE,EAAE,IAAS;QACnD,OAAO,MAAM,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpH,CAAC;IAEO,YAAY,CAAC,QAAgB;QACpC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,QAAQ,EAAE,CAAC;IACtC,CAAC;CACD,CAAA;AA1DY,2BAA2B;IADvC,IAAA,sBAAU,GAAE;;GACA,2BAA2B,CA0DvC;AA1DY,kEAA2B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface NumberMap {
|
|
2
|
+
[key: string]: number;
|
|
3
|
+
}
|
|
4
|
+
interface ICampaignAuditorData {
|
|
5
|
+
geo: any[];
|
|
6
|
+
pricing: Pricing;
|
|
7
|
+
geo_remainders: NumberMap;
|
|
8
|
+
}
|
|
9
|
+
declare class Pricing {
|
|
10
|
+
s: NumberMap;
|
|
11
|
+
o: NumberMap;
|
|
12
|
+
constructor(s?: NumberMap, o?: NumberMap);
|
|
13
|
+
}
|
|
14
|
+
export { ICampaignAuditorData, NumberMap, Pricing };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Pricing = void 0;
|
|
4
|
+
class Pricing {
|
|
5
|
+
constructor(s = {}, o = {}) {
|
|
6
|
+
this.s = s;
|
|
7
|
+
this.o = o;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.Pricing = Pricing;
|
|
11
|
+
//# sourceMappingURL=geotargeting.entities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geotargeting.entities.js","sourceRoot":"","sources":["../../../../../src/domain/auditor/campaigns/geotargeting.entities.ts"],"names":[],"mappings":";;;AAQA,MAAM,OAAO;IACT,YACW,IAAe,EAAE,EACjB,IAAe,EAAE;QADjB,MAAC,GAAD,CAAC,CAAgB;QACjB,MAAC,GAAD,CAAC,CAAgB;IACzB,CAAC;CACP;AAKG,0BAAO"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuditorEntityType = void 0;
|
|
4
|
+
var AuditorEntityType;
|
|
5
|
+
(function (AuditorEntityType) {
|
|
6
|
+
AuditorEntityType["CAMPAIGN"] = "campaign";
|
|
7
|
+
})(AuditorEntityType = exports.AuditorEntityType || (exports.AuditorEntityType = {}));
|
|
8
|
+
//# sourceMappingURL=auditor-entity-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auditor-entity-type.enum.js","sourceRoot":"","sources":["../../../../../src/domain/auditor/enums/auditor-entity-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAEX;AAFD,WAAY,iBAAiB;IACzB,0CAAqB,CAAA;AACzB,CAAC,EAFW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAE5B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuditorOperation = void 0;
|
|
4
|
+
var AuditorOperation;
|
|
5
|
+
(function (AuditorOperation) {
|
|
6
|
+
AuditorOperation["CLEANUP"] = "cleanup";
|
|
7
|
+
AuditorOperation["UPDATE"] = "update";
|
|
8
|
+
AuditorOperation["CREATE"] = "create";
|
|
9
|
+
AuditorOperation["LINK"] = "link";
|
|
10
|
+
AuditorOperation["UNLINK"] = "unlink";
|
|
11
|
+
AuditorOperation["DELETE"] = "delete";
|
|
12
|
+
AuditorOperation["ENDOR"] = "endor";
|
|
13
|
+
})(AuditorOperation = exports.AuditorOperation || (exports.AuditorOperation = {}));
|
|
14
|
+
//# sourceMappingURL=auditor-operation.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auditor-operation.enum.js","sourceRoot":"","sources":["../../../../../src/domain/auditor/enums/auditor-operation.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAQX;AARD,WAAY,gBAAgB;IACxB,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;IACjB,iCAAa,CAAA;IACb,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;IACjB,mCAAe,CAAA;AACnB,CAAC,EARW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAQ3B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AuditorEntityType } from "./enums/auditor-entity-type.enum";
|
|
2
|
+
import { AuditorOperation } from "./enums/auditor-operation.enum";
|
|
3
|
+
export declare class GetAuditorDto {
|
|
4
|
+
readonly id: number;
|
|
5
|
+
readonly auditTime: string;
|
|
6
|
+
readonly operation: AuditorOperation;
|
|
7
|
+
readonly entityID: number;
|
|
8
|
+
readonly entityType: AuditorEntityType;
|
|
9
|
+
readonly username: string;
|
|
10
|
+
readonly isUserAction: boolean;
|
|
11
|
+
readonly data: any;
|
|
12
|
+
constructor(id: number, auditTime: string, operation: AuditorOperation, entityID: number, entityType: AuditorEntityType, username: string, isUserAction: boolean, data: any);
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetAuditorDto = void 0;
|
|
4
|
+
class GetAuditorDto {
|
|
5
|
+
constructor(id, auditTime, operation, entityID, entityType, username, isUserAction, data) {
|
|
6
|
+
this.id = id;
|
|
7
|
+
this.auditTime = auditTime;
|
|
8
|
+
this.operation = operation;
|
|
9
|
+
this.entityID = entityID;
|
|
10
|
+
this.entityType = entityType;
|
|
11
|
+
this.username = username;
|
|
12
|
+
this.isUserAction = isUserAction;
|
|
13
|
+
this.data = data;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.GetAuditorDto = GetAuditorDto;
|
|
17
|
+
//# sourceMappingURL=get-auditor.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-auditor.dto.js","sourceRoot":"","sources":["../../../../src/domain/auditor/get-auditor.dto.ts"],"names":[],"mappings":";;;AAGA,MAAa,aAAa;IAUtB,YACI,EAAU,EACV,SAAiB,EACjB,SAA2B,EAC3B,QAAgB,EAChB,UAA6B,EAC7B,QAAgB,EAChB,YAAqB,EACrB,IAAS;QAET,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CACJ;AA7BD,sCA6BC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CampaignsEntitiesConfigDto = void 0;
|
|
4
|
+
class CampaignsEntitiesConfigDto {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.product2_id = null;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.CampaignsEntitiesConfigDto = CampaignsEntitiesConfigDto;
|
|
10
|
+
//# sourceMappingURL=CampaignsEntitiesConfig.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CampaignsEntitiesConfig.dto.js","sourceRoot":"","sources":["../../../../src/domain/campaign/CampaignsEntitiesConfig.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,0BAA0B;IAAvC;QAIW,gBAAW,GAAkB,IAAI,CAAC;IAE7C,CAAC;CAAA;AAND,gEAMC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { CampaignsEntitiesConfigDto } from "./domain/campaign/CampaignsEntitiesConfig.dto";
|
|
3
|
+
import { ISuperAgentRequestFactory, SignedRequestSender } from "@studyportals/mb-platform-http-requests";
|
|
4
|
+
export declare class PrivateCampaignManagementAPIClient {
|
|
5
|
+
private readonly superAgentRequestFactory;
|
|
6
|
+
private readonly requestSender;
|
|
7
|
+
private readonly baseUrl;
|
|
8
|
+
constructor(superAgentRequestFactory: ISuperAgentRequestFactory, requestSender: SignedRequestSender, baseUrl: string);
|
|
9
|
+
addCampaignsEntitiesConfigs(campaignID: number, campaignsEntitiesConfigs: CampaignsEntitiesConfigDto[]): Promise<void>;
|
|
10
|
+
removeCampaignsEntitiesConfigsByID(campaignID: number, campaignsEntitiesConfigsIDs: number[]): Promise<void>;
|
|
11
|
+
clearCampaignsEntitiesConfigsByCampaignID(campaignID: number): Promise<void>;
|
|
12
|
+
setEntitiesBasic(campaignID: number, organisationIDs: number[], studyIDs: number[]): Promise<void>;
|
|
13
|
+
setEntitiesPremium(campaignID: number, organisationIDs: number[], studyIDs: number[]): Promise<void>;
|
|
14
|
+
private postRequest;
|
|
15
|
+
private createPostRequest;
|
|
16
|
+
private sendRequest;
|
|
17
|
+
private buildBaseUrl;
|
|
18
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PrivateCampaignManagementAPIClient = void 0;
|
|
13
|
+
require("reflect-metadata");
|
|
14
|
+
const inversify_1 = require("inversify");
|
|
15
|
+
const mb_platform_http_requests_1 = require("@studyportals/mb-platform-http-requests");
|
|
16
|
+
let PrivateCampaignManagementAPIClient = class PrivateCampaignManagementAPIClient {
|
|
17
|
+
constructor(superAgentRequestFactory, requestSender, baseUrl) {
|
|
18
|
+
this.superAgentRequestFactory = superAgentRequestFactory;
|
|
19
|
+
this.requestSender = requestSender;
|
|
20
|
+
this.baseUrl = baseUrl;
|
|
21
|
+
}
|
|
22
|
+
async addCampaignsEntitiesConfigs(campaignID, campaignsEntitiesConfigs) {
|
|
23
|
+
const path = `private/campaigns/add-campaigns-entities-configs`;
|
|
24
|
+
const data = {
|
|
25
|
+
campaignsEntitiesConfigs: campaignsEntitiesConfigs,
|
|
26
|
+
campaignID: campaignID
|
|
27
|
+
};
|
|
28
|
+
await this.postRequest(path, data);
|
|
29
|
+
}
|
|
30
|
+
async removeCampaignsEntitiesConfigsByID(campaignID, campaignsEntitiesConfigsIDs) {
|
|
31
|
+
const path = `private/campaigns/remove-campaigns-entities-configs`;
|
|
32
|
+
const data = { campaignsEntitiesConfigsIDs: campaignsEntitiesConfigsIDs, campaignID: campaignID };
|
|
33
|
+
await this.postRequest(path, data);
|
|
34
|
+
}
|
|
35
|
+
async clearCampaignsEntitiesConfigsByCampaignID(campaignID) {
|
|
36
|
+
const path = `private/campaigns/clear-campaigns-entities-configs`;
|
|
37
|
+
const data = { campaignID: campaignID };
|
|
38
|
+
await this.postRequest(path, data);
|
|
39
|
+
}
|
|
40
|
+
async setEntitiesBasic(campaignID, organisationIDs, studyIDs) {
|
|
41
|
+
const path = `private/campaigns/set-entities-basic`;
|
|
42
|
+
const data = {
|
|
43
|
+
organisationIDs: organisationIDs,
|
|
44
|
+
studyIDs: studyIDs,
|
|
45
|
+
campaignID: campaignID
|
|
46
|
+
};
|
|
47
|
+
await this.postRequest(path, data);
|
|
48
|
+
}
|
|
49
|
+
async setEntitiesPremium(campaignID, organisationIDs, studyIDs) {
|
|
50
|
+
const path = `private/campaigns/set-entities-premium`;
|
|
51
|
+
const data = {
|
|
52
|
+
organisationIDs: organisationIDs,
|
|
53
|
+
studyIDs: studyIDs,
|
|
54
|
+
campaignID: campaignID
|
|
55
|
+
};
|
|
56
|
+
await this.postRequest(path, data);
|
|
57
|
+
}
|
|
58
|
+
async postRequest(relative = "", data) {
|
|
59
|
+
const request = this.createPostRequest(relative);
|
|
60
|
+
return await this.sendRequest(request, data);
|
|
61
|
+
}
|
|
62
|
+
createPostRequest(relative = "") {
|
|
63
|
+
const url = this.buildBaseUrl(relative);
|
|
64
|
+
return this.superAgentRequestFactory.post(url);
|
|
65
|
+
}
|
|
66
|
+
async sendRequest(request, payload) {
|
|
67
|
+
request.send(payload);
|
|
68
|
+
return await this.requestSender.send(request);
|
|
69
|
+
}
|
|
70
|
+
buildBaseUrl(relative) {
|
|
71
|
+
return `${this.baseUrl}/${relative}`;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
PrivateCampaignManagementAPIClient = __decorate([
|
|
75
|
+
(0, inversify_1.injectable)(),
|
|
76
|
+
__metadata("design:paramtypes", [Object, mb_platform_http_requests_1.SignedRequestSender, String])
|
|
77
|
+
], PrivateCampaignManagementAPIClient);
|
|
78
|
+
exports.PrivateCampaignManagementAPIClient = PrivateCampaignManagementAPIClient;
|
|
79
|
+
//# sourceMappingURL=private-campaign-management-api.client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-campaign-management-api.client.js","sourceRoot":"","sources":["../../src/private-campaign-management-api.client.ts"],"names":[],"mappings":"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"}
|
package/.vscode/launch.json
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "0.2.0",
|
|
3
|
-
"configurations": [
|
|
4
|
-
{
|
|
5
|
-
"type": "node",
|
|
6
|
-
"request": "launch",
|
|
7
|
-
"name": "Jest watch current file",
|
|
8
|
-
"program": "${workspaceFolder}/node_modules/jest-cli/bin/jest",
|
|
9
|
-
"args": [
|
|
10
|
-
"${fileBasename}",
|
|
11
|
-
"--verbose",
|
|
12
|
-
"-i",
|
|
13
|
-
"--no-cache",
|
|
14
|
-
"--watchAll"
|
|
15
|
-
],
|
|
16
|
-
"console": "integratedTerminal",
|
|
17
|
-
"internalConsoleOptions": "neverOpen"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"name": "TypeScript - All Tests Files",
|
|
21
|
-
"type": "node",
|
|
22
|
-
"request": "launch",
|
|
23
|
-
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
|
|
24
|
-
"args": [
|
|
25
|
-
"--require",
|
|
26
|
-
"ts-node/register",
|
|
27
|
-
"--colors",
|
|
28
|
-
"${relativeFile}",
|
|
29
|
-
"--no-timeouts",
|
|
30
|
-
"src/*-tests/*.test.ts"
|
|
31
|
-
],
|
|
32
|
-
"cwd": "${workspaceRoot}",
|
|
33
|
-
"protocol": "inspector"
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
}
|
package/.vscode/settings.json
DELETED
package/.vscode/tasks.json
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "2.0.0",
|
|
3
|
-
"tasks": [
|
|
4
|
-
{
|
|
5
|
-
"label": "runCurrentTest",
|
|
6
|
-
"type": "shell",
|
|
7
|
-
"command": "cross-env NODE_ENV=tst npx jest -c jest.config.single-file.json --maxWorkers=1 \"${relativeFile}\"",
|
|
8
|
-
"group": "test",
|
|
9
|
-
"presentation": {
|
|
10
|
-
"echo": true,
|
|
11
|
-
"reveal": "always",
|
|
12
|
-
"focus": true,
|
|
13
|
-
"panel": "dedicated"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"label": "runCurrentTestWatch",
|
|
18
|
-
"type": "shell",
|
|
19
|
-
"command": "npx jest -c jest.config.unit.json --maxWorkers=1 --watch \"${relativeFile}\"",
|
|
20
|
-
"group": "test",
|
|
21
|
-
"presentation": {
|
|
22
|
-
"echo": true,
|
|
23
|
-
"reveal": "always",
|
|
24
|
-
"focus": true,
|
|
25
|
-
"panel": "dedicated"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"label": "runCurrentTestClearCache",
|
|
30
|
-
"type": "shell",
|
|
31
|
-
"command": "npx jest -c jest.config.unit.json --maxWorkers=1 --clearCache",
|
|
32
|
-
"group": "test",
|
|
33
|
-
"presentation": {
|
|
34
|
-
"echo": true,
|
|
35
|
-
"reveal": "always",
|
|
36
|
-
"focus": true,
|
|
37
|
-
"panel": "dedicated"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
]
|
|
41
|
-
}
|
package/README.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"moduleFileExtensions": [
|
|
3
|
-
"js",
|
|
4
|
-
"json",
|
|
5
|
-
"ts"
|
|
6
|
-
],
|
|
7
|
-
"rootDir": "",
|
|
8
|
-
"transform": {
|
|
9
|
-
"^.+\\.(t|j)s$": "ts-jest"
|
|
10
|
-
},
|
|
11
|
-
"collectCoverageFrom": [
|
|
12
|
-
"src/**/*.(t|j)s"
|
|
13
|
-
],
|
|
14
|
-
"coverageDirectory": "../coverage",
|
|
15
|
-
"testEnvironment": "node",
|
|
16
|
-
"testMatch": [
|
|
17
|
-
"<rootDir>/tests-u/**/*\\.(spec|test)\\.ts",
|
|
18
|
-
"<rootDir>/tests-i/**/*\\.(spec|test)\\.ts"
|
|
19
|
-
]
|
|
20
|
-
}
|
package/jest.config.unit.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"moduleFileExtensions": [
|
|
3
|
-
"js",
|
|
4
|
-
"json",
|
|
5
|
-
"ts"
|
|
6
|
-
],
|
|
7
|
-
"rootDir": "",
|
|
8
|
-
"transform": {
|
|
9
|
-
"^.+\\.(t|j)s$": "ts-jest"
|
|
10
|
-
},
|
|
11
|
-
"collectCoverageFrom": [
|
|
12
|
-
"src/**/*.(t|j)s"
|
|
13
|
-
],
|
|
14
|
-
"coverageDirectory": "../coverage",
|
|
15
|
-
"testEnvironment": "node",
|
|
16
|
-
"testMatch": [
|
|
17
|
-
"<rootDir>/tests-u/**/*\\.(spec|test)\\.ts"
|
|
18
|
-
]
|
|
19
|
-
}
|