@studyportals/campaign-management-api-interface 3.8.1-0 → 3.8.1-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -1
- package/src/domain/organisations/enums/source-link-sub-types.enum.d.ts +2 -1
- package/src/domain/organisations/enums/source-link-sub-types.enum.js +1 -0
- package/src/domain/organisations/enums/source-link-sub-types.enum.js.map +1 -1
- package/src/domain/organisations/index.d.ts +2 -1
- package/src/domain/organisations/index.js +3 -1
- package/src/domain/organisations/index.js.map +1 -1
- package/src/domain/organisations/source-link-data.dto.d.ts +12 -0
- package/src/domain/organisations/source-link-data.dto.js +15 -0
- package/src/domain/organisations/source-link-data.dto.js.map +1 -0
- package/src/domain/organisations/source-links.dto.d.ts +4 -3
- package/src/domain/organisations/source-links.dto.js +3 -1
- package/src/domain/organisations/source-links.dto.js.map +1 -1
- package/src/organisations-campaign-management-api.client.d.ts +5 -0
- package/src/organisations-campaign-management-api.client.js +47 -2
- package/src/organisations-campaign-management-api.client.js.map +1 -1
- package/src/private-campaign-management-api.client.d.ts +0 -2
- package/src/private-campaign-management-api.client.js +0 -3
- package/src/private-campaign-management-api.client.js.map +1 -1
- package/src/validation/dto/organisations/create-source-link-validator.d.ts +8 -0
- package/src/validation/dto/organisations/create-source-link-validator.js +38 -0
- package/src/validation/dto/organisations/create-source-link-validator.js.map +1 -0
- package/src/validation/dto/organisations/create-source-links.request.d.ts +4 -0
- package/src/validation/dto/organisations/create-source-links.request.js +24 -0
- package/src/validation/dto/organisations/create-source-links.request.js.map +1 -0
- package/src/validation/dto/organisations/index.d.ts +5 -0
- package/src/validation/dto/organisations/index.js +12 -0
- package/src/validation/dto/organisations/index.js.map +1 -0
- package/src/validation/dto/organisations/update-source-link-validator.d.ts +4 -0
- package/src/validation/dto/organisations/update-source-link-validator.js +23 -0
- package/src/validation/dto/organisations/update-source-link-validator.js.map +1 -0
- package/src/validation/dto/organisations/update-source-links.request.d.ts +4 -0
- package/src/validation/dto/organisations/update-source-links.request.js +24 -0
- package/src/validation/dto/organisations/update-source-links.request.js.map +1 -0
- package/src/validation/index.d.ts +1 -0
- package/src/validation/index.js +15 -0
- package/src/validation/index.js.map +1 -1
- package/src/domain/campaign/get-campaigns-lift-overview.dto.d.ts +0 -4
- package/src/domain/campaign/get-campaigns-lift-overview.dto.js +0 -10
- package/src/domain/campaign/get-campaigns-lift-overview.dto.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studyportals/campaign-management-api-interface",
|
|
3
|
-
"version": "3.8.1-
|
|
3
|
+
"version": "3.8.1-1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"compile": "rm -fR bin && npx tsc",
|
|
6
6
|
"test-u": "jest -c jest.config.unit.json --maxWorkers=1",
|
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
"@types/chai": "^4.3.4",
|
|
35
35
|
"@types/jest": "^29.4.0",
|
|
36
36
|
"@types/node": "^16.9.4",
|
|
37
|
+
"class-transformer": "^0.5.1",
|
|
38
|
+
"class-validator": "^0.14.1",
|
|
37
39
|
"inversify": "^6.0.1",
|
|
38
40
|
"reflect-metadata": "^0.1.13",
|
|
39
41
|
"typescript": "^4.9.5"
|
|
@@ -8,5 +8,6 @@ var SourceLinkSubTypes;
|
|
|
8
8
|
SourceLinkSubTypes["EEA"] = "eea";
|
|
9
9
|
SourceLinkSubTypes["NATIONAL_EEA"] = "national_eea";
|
|
10
10
|
SourceLinkSubTypes["LOCAL"] = "local";
|
|
11
|
+
SourceLinkSubTypes["NO_SUB_TYPE"] = "no_sub_type";
|
|
11
12
|
})(SourceLinkSubTypes = exports.SourceLinkSubTypes || (exports.SourceLinkSubTypes = {}));
|
|
12
13
|
//# sourceMappingURL=source-link-sub-types.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-link-sub-types.enum.js","sourceRoot":"","sources":["../../../../../src/domain/organisations/enums/source-link-sub-types.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"source-link-sub-types.enum.js","sourceRoot":"","sources":["../../../../../src/domain/organisations/enums/source-link-sub-types.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC7B,2CAAqB,CAAA;IACrB,qDAA+B,CAAA;IAC/B,iCAAW,CAAA;IACX,mDAA6B,CAAA;IAC7B,qCAAe,CAAA;IACf,iDAA2B,CAAA;AAC5B,CAAC,EAPW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAO7B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SourceLinkLevels } from "./enums/source-link-levels.enum";
|
|
2
2
|
import { SourceLinkSubTypes } from "./enums/source-link-sub-types.enum";
|
|
3
3
|
import { SourceLinkTypes } from "./enums/source-link-types.enum";
|
|
4
|
+
import { SourceLinkDataDto } from "./source-link-data.dto";
|
|
4
5
|
import { SourceLinkDto } from "./source-links.dto";
|
|
5
|
-
export { SourceLinkDto, SourceLinkLevels, SourceLinkSubTypes, SourceLinkTypes };
|
|
6
|
+
export { SourceLinkDto, SourceLinkDataDto, SourceLinkLevels, SourceLinkSubTypes, SourceLinkTypes };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SourceLinkTypes = exports.SourceLinkSubTypes = exports.SourceLinkLevels = exports.SourceLinkDto = void 0;
|
|
3
|
+
exports.SourceLinkTypes = exports.SourceLinkSubTypes = exports.SourceLinkLevels = exports.SourceLinkDataDto = exports.SourceLinkDto = void 0;
|
|
4
4
|
const source_link_levels_enum_1 = require("./enums/source-link-levels.enum");
|
|
5
5
|
Object.defineProperty(exports, "SourceLinkLevels", { enumerable: true, get: function () { return source_link_levels_enum_1.SourceLinkLevels; } });
|
|
6
6
|
const source_link_sub_types_enum_1 = require("./enums/source-link-sub-types.enum");
|
|
7
7
|
Object.defineProperty(exports, "SourceLinkSubTypes", { enumerable: true, get: function () { return source_link_sub_types_enum_1.SourceLinkSubTypes; } });
|
|
8
8
|
const source_link_types_enum_1 = require("./enums/source-link-types.enum");
|
|
9
9
|
Object.defineProperty(exports, "SourceLinkTypes", { enumerable: true, get: function () { return source_link_types_enum_1.SourceLinkTypes; } });
|
|
10
|
+
const source_link_data_dto_1 = require("./source-link-data.dto");
|
|
11
|
+
Object.defineProperty(exports, "SourceLinkDataDto", { enumerable: true, get: function () { return source_link_data_dto_1.SourceLinkDataDto; } });
|
|
10
12
|
const source_links_dto_1 = require("./source-links.dto");
|
|
11
13
|
Object.defineProperty(exports, "SourceLinkDto", { enumerable: true, get: function () { return source_links_dto_1.SourceLinkDto; } });
|
|
12
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/domain/organisations/index.ts"],"names":[],"mappings":";;;AAAA,6EAAmE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/domain/organisations/index.ts"],"names":[],"mappings":";;;AAAA,6EAAmE;AAWlE,iGAXQ,0CAAgB,OAWR;AAVjB,mFAAwE;AAWvE,mGAXQ,+CAAkB,OAWR;AAVnB,2EAAiE;AAWhE,gGAXQ,wCAAe,OAWR;AAVhB,iEAA2D;AAM1D,kGANQ,wCAAiB,OAMR;AALlB,yDAAmD;AAIlD,8FAJQ,gCAAa,OAIR"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SourceLinkLevels } from "./enums/source-link-levels.enum";
|
|
2
|
+
import { SourceLinkSubTypes } from "./enums/source-link-sub-types.enum";
|
|
3
|
+
import { SourceLinkTypes } from "./enums/source-link-types.enum";
|
|
4
|
+
export declare class SourceLinkDataDto {
|
|
5
|
+
readonly organisationId: number;
|
|
6
|
+
readonly level: SourceLinkLevels;
|
|
7
|
+
readonly type: SourceLinkTypes;
|
|
8
|
+
readonly subType: SourceLinkSubTypes;
|
|
9
|
+
readonly url: string | null;
|
|
10
|
+
readonly doesExist: boolean;
|
|
11
|
+
constructor(organisationId: number, level: SourceLinkLevels, type: SourceLinkTypes, subType: SourceLinkSubTypes, url: string | null, doesExist: boolean);
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SourceLinkDataDto = void 0;
|
|
4
|
+
class SourceLinkDataDto {
|
|
5
|
+
constructor(organisationId, level, type, subType, url, doesExist) {
|
|
6
|
+
this.organisationId = organisationId;
|
|
7
|
+
this.level = level;
|
|
8
|
+
this.type = type;
|
|
9
|
+
this.subType = subType;
|
|
10
|
+
this.url = url;
|
|
11
|
+
this.doesExist = doesExist;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.SourceLinkDataDto = SourceLinkDataDto;
|
|
15
|
+
//# sourceMappingURL=source-link-data.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-link-data.dto.js","sourceRoot":"","sources":["../../../../src/domain/organisations/source-link-data.dto.ts"],"names":[],"mappings":";;;AAIA,MAAa,iBAAiB;IAC7B,YACiB,cAAsB,EACtB,KAAuB,EACvB,IAAqB,EACrB,OAA2B,EAC3B,GAAkB,EAClB,SAAkB;QALlB,mBAAc,GAAd,cAAc,CAAQ;QACtB,UAAK,GAAL,KAAK,CAAkB;QACvB,SAAI,GAAJ,IAAI,CAAiB;QACrB,YAAO,GAAP,OAAO,CAAoB;QAC3B,QAAG,GAAH,GAAG,CAAe;QAClB,cAAS,GAAT,SAAS,CAAS;IAChC,CAAC;CACJ;AATD,8CASC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { SourceLinkLevels } from "./enums/source-link-levels.enum";
|
|
2
2
|
import { SourceLinkSubTypes } from "./enums/source-link-sub-types.enum";
|
|
3
3
|
import { SourceLinkTypes } from "./enums/source-link-types.enum";
|
|
4
|
-
|
|
4
|
+
import { SourceLinkDataDto } from "./source-link-data.dto";
|
|
5
|
+
export declare class SourceLinkDto extends SourceLinkDataDto {
|
|
5
6
|
readonly id: number;
|
|
6
7
|
readonly organisationId: number;
|
|
7
8
|
readonly level: SourceLinkLevels;
|
|
8
9
|
readonly type: SourceLinkTypes;
|
|
9
|
-
readonly subType: SourceLinkSubTypes
|
|
10
|
+
readonly subType: SourceLinkSubTypes;
|
|
10
11
|
readonly url: string | null;
|
|
11
12
|
readonly doesExist: boolean;
|
|
12
|
-
constructor(id: number, organisationId: number, level: SourceLinkLevels, type: SourceLinkTypes, subType: SourceLinkSubTypes
|
|
13
|
+
constructor(id: number, organisationId: number, level: SourceLinkLevels, type: SourceLinkTypes, subType: SourceLinkSubTypes, url: string | null, doesExist: boolean);
|
|
13
14
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SourceLinkDto = void 0;
|
|
4
|
-
|
|
4
|
+
const source_link_data_dto_1 = require("./source-link-data.dto");
|
|
5
|
+
class SourceLinkDto extends source_link_data_dto_1.SourceLinkDataDto {
|
|
5
6
|
constructor(id, organisationId, level, type, subType, url, doesExist) {
|
|
7
|
+
super(organisationId, level, type, subType, url, doesExist);
|
|
6
8
|
this.id = id;
|
|
7
9
|
this.organisationId = organisationId;
|
|
8
10
|
this.level = level;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-links.dto.js","sourceRoot":"","sources":["../../../../src/domain/organisations/source-links.dto.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"source-links.dto.js","sourceRoot":"","sources":["../../../../src/domain/organisations/source-links.dto.ts"],"names":[],"mappings":";;;AAGA,iEAA2D;AAE3D,MAAa,aAAc,SAAQ,wCAAiB;IACnD,YACiB,EAAU,EACV,cAAsB,EACtB,KAAuB,EACvB,IAAqB,EACrB,OAA2B,EAC3B,GAAkB,EAClB,SAAkB;QAElC,KAAK,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAR5C,OAAE,GAAF,EAAE,CAAQ;QACV,mBAAc,GAAd,cAAc,CAAQ;QACtB,UAAK,GAAL,KAAK,CAAkB;QACvB,SAAI,GAAJ,IAAI,CAAiB;QACrB,YAAO,GAAP,OAAO,CAAoB;QAC3B,QAAG,GAAH,GAAG,CAAe;QAClB,cAAS,GAAT,SAAS,CAAS;IAGnC,CAAC;CACD;AAZD,sCAYC"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
2
|
import { MinimalOrganisationDto } from "./domain/organisations/minimal-organisations.dto";
|
|
3
3
|
import { SourceLinkDto } from "./domain/organisations";
|
|
4
|
+
import { CreateSourceLinkValidator } from "./validation/dto/organisations/create-source-link-validator";
|
|
5
|
+
import { UpdateSourceLinkValidator } from "./validation/dto/organisations/update-source-link-validator";
|
|
4
6
|
export declare class OrganisationsCampaignManagementAPIClient {
|
|
5
7
|
private readonly baseUrl;
|
|
6
8
|
constructor(baseUrl: string);
|
|
7
9
|
getMinimalOrganisation(organisationID: number, jwt?: string): Promise<MinimalOrganisationDto>;
|
|
8
10
|
searchOrganisations(searchTerm: string, jwt?: string, limit?: number): Promise<MinimalOrganisationDto[]>;
|
|
9
11
|
getSourceLinks(organisationID: number, jwt?: string): Promise<SourceLinkDto[]>;
|
|
12
|
+
createSourceLinks(organisationID: number, sourceLinks: CreateSourceLinkValidator[], jwt?: string): Promise<void>;
|
|
13
|
+
updateSourceLinks(organisationID: number, sourceLinks: UpdateSourceLinkValidator[], jwt?: string): Promise<void>;
|
|
10
14
|
private postRequest;
|
|
15
|
+
private putRequest;
|
|
11
16
|
private getRequest;
|
|
12
17
|
private buildBaseUrl;
|
|
13
18
|
}
|
|
@@ -13,6 +13,9 @@ exports.OrganisationsCampaignManagementAPIClient = void 0;
|
|
|
13
13
|
require("reflect-metadata");
|
|
14
14
|
const inversify_1 = require("inversify");
|
|
15
15
|
const superagent = require("superagent");
|
|
16
|
+
const update_source_links_request_1 = require("./validation/dto/organisations/update-source-links.request");
|
|
17
|
+
const class_validator_1 = require("class-validator");
|
|
18
|
+
const create_source_links_request_1 = require("./validation/dto/organisations/create-source-links.request");
|
|
16
19
|
let OrganisationsCampaignManagementAPIClient = class OrganisationsCampaignManagementAPIClient {
|
|
17
20
|
constructor(baseUrl) {
|
|
18
21
|
this.baseUrl = baseUrl;
|
|
@@ -31,8 +34,8 @@ let OrganisationsCampaignManagementAPIClient = class OrganisationsCampaignManage
|
|
|
31
34
|
try {
|
|
32
35
|
const path = `organisations/search`;
|
|
33
36
|
const result = await this.postRequest(path, {
|
|
34
|
-
searchTerm
|
|
35
|
-
limit
|
|
37
|
+
searchTerm,
|
|
38
|
+
limit
|
|
36
39
|
}, jwt);
|
|
37
40
|
return result.body;
|
|
38
41
|
}
|
|
@@ -50,12 +53,54 @@ let OrganisationsCampaignManagementAPIClient = class OrganisationsCampaignManage
|
|
|
50
53
|
throw new Error(`getSourceLinks error: ${error}`);
|
|
51
54
|
}
|
|
52
55
|
}
|
|
56
|
+
async createSourceLinks(organisationID, sourceLinks, jwt = "") {
|
|
57
|
+
try {
|
|
58
|
+
const path = `organisations/${organisationID}/source-links`;
|
|
59
|
+
const data = new create_source_links_request_1.CreateSourceLinksRequest();
|
|
60
|
+
data.sourceLinks = sourceLinks;
|
|
61
|
+
const errors = await (0, class_validator_1.validate)(data);
|
|
62
|
+
if (errors.length > 0) {
|
|
63
|
+
throw new Error(`createSourceLinks validation error: ${errors}`);
|
|
64
|
+
}
|
|
65
|
+
const result = await this.postRequest(path, data, jwt);
|
|
66
|
+
if (result.status !== 201) {
|
|
67
|
+
throw new Error(`createSourceLinks status is not 201. ${result.body}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
throw new Error(`createSourceLinks error: ${error}`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async updateSourceLinks(organisationID, sourceLinks, jwt = "") {
|
|
75
|
+
try {
|
|
76
|
+
const path = `organisations/${organisationID}/source-links`;
|
|
77
|
+
const data = new update_source_links_request_1.UpdateSourceLinksRequest();
|
|
78
|
+
data.sourceLinks = sourceLinks;
|
|
79
|
+
const errors = await (0, class_validator_1.validate)(data);
|
|
80
|
+
if (errors.length > 0) {
|
|
81
|
+
throw new Error(`updateSourceLinks validation error: ${errors}`);
|
|
82
|
+
}
|
|
83
|
+
const result = await this.putRequest(path, data, jwt);
|
|
84
|
+
if (result.status !== 200) {
|
|
85
|
+
throw new Error(`updateSourceLinks status is not 200. ${result.body}`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
throw new Error(`updateSourceLinks error: ${error}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
53
92
|
async postRequest(relative = "", data, jwt = "") {
|
|
54
93
|
return await superagent.post(this.buildBaseUrl(relative))
|
|
55
94
|
.set("Content-Type", "application/json")
|
|
56
95
|
.set("Authorization", jwt)
|
|
57
96
|
.send(data);
|
|
58
97
|
}
|
|
98
|
+
async putRequest(relative = "", data, jwt = "") {
|
|
99
|
+
return await superagent.put(this.buildBaseUrl(relative))
|
|
100
|
+
.set("Content-Type", "application/json")
|
|
101
|
+
.set("Authorization", jwt)
|
|
102
|
+
.send(data);
|
|
103
|
+
}
|
|
59
104
|
async getRequest(relative = "", jwt = "") {
|
|
60
105
|
return await superagent.get(this.buildBaseUrl(relative))
|
|
61
106
|
.set("Content-Type", "application/json")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisations-campaign-management-api.client.js","sourceRoot":"","sources":["../../src/organisations-campaign-management-api.client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAA0B;AAG1B,yCAAuC;AAEvC,yCAAyC;
|
|
1
|
+
{"version":3,"file":"organisations-campaign-management-api.client.js","sourceRoot":"","sources":["../../src/organisations-campaign-management-api.client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAA0B;AAG1B,yCAAuC;AAEvC,yCAAyC;AAKzC,4GAAsG;AACtG,qDAA2C;AAC3C,4GAAsG;AAG/F,IAAM,wCAAwC,GAA9C,MAAM,wCAAwC;IACpD,YACkB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;IAC7B,CAAC;IAEE,KAAK,CAAC,sBAAsB,CAAC,cAAsB,EAAE,GAAG,GAAG,EAAE;QACnE,IAAI;YACH,MAAM,IAAI,GAAG,yBAAyB,cAAc,EAAE,CAAC;YACvD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YAEhD,OAAO,MAAM,CAAC,IAA8B,CAAC;SAC7C;QAAC,OAAO,KAAK,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,iCAAiC,KAAK,EAAE,CAAC,CAAC;SAC1D;IACF,CAAC;IAEM,KAAK,CAAC,mBAAmB,CAAC,UAAkB,EAAE,GAAG,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE;QACxE,IAAI;YACH,MAAM,IAAI,GAAG,sBAAsB,CAAC;YACpC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE;gBAC3C,UAAU;gBACV,KAAK;aACL,EAAE,GAAG,CAAC,CAAC;YAER,OAAO,MAAM,CAAC,IAAgC,CAAC;SAC/C;QAAC,OAAO,KAAK,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,8BAA8B,KAAK,EAAE,CAAC,CAAC;SACvD;IACF,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,cAAsB,EAAE,GAAG,GAAG,EAAE;QAC3D,IAAI;YACH,MAAM,IAAI,GAAG,iBAAiB,cAAc,eAAe,CAAC;YAC5D,MAAM,MAAM,GAAG,MAAM,IAAI,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,CAAC,cAAc,EAAE,kBAAkB,CAAC;aACvC,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC;aACzB,IAAI,EAAE,CAAC;IACV,CAAC;IAGO,YAAY,CAAC,QAAgB;QACpC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,QAAQ,EAAE,CAAC;IACtC,CAAC;CACD,CAAA;AA3GY,wCAAwC;IADpD,IAAA,sBAAU,GAAE;;GACA,wCAAwC,CA2GpD;AA3GY,4FAAwC"}
|
|
@@ -3,7 +3,6 @@ import { CampaignsEntitiesConfigDto } from "./domain/campaign/campaign-entities-
|
|
|
3
3
|
import { ISuperAgentRequestFactory, SignedRequestSender } from "@studyportals/mb-platform-http-requests";
|
|
4
4
|
import { CampaignWithDates } from "./domain/campaign/campaign-with-dates.entity";
|
|
5
5
|
import { PersistGoogleLinkerResultDto } from "./domain/campaign/persist-google-linker-result.dto";
|
|
6
|
-
import { GetCampaignsLiftOverviewDto } from "./domain/campaign/get-campaigns-lift-overview.dto";
|
|
7
6
|
export declare class PrivateCampaignManagementAPIClient {
|
|
8
7
|
private readonly superAgentRequestFactory;
|
|
9
8
|
private readonly requestSender;
|
|
@@ -17,7 +16,6 @@ export declare class PrivateCampaignManagementAPIClient {
|
|
|
17
16
|
setEntitiesPremium(campaignID: number, organisationIDs: number[], studyIDs: number[]): Promise<void>;
|
|
18
17
|
getCampaignPersistGoogleLinkerProperty(campaignID: number): Promise<PersistGoogleLinkerResultDto>;
|
|
19
18
|
setEntitiesPersistGoogleLinkerProperty(organisationIds: number[], studyIds: number[], persistGoogleLinkerValue: boolean): Promise<void>;
|
|
20
|
-
getCampaignLiftOverview(): Promise<GetCampaignsLiftOverviewDto>;
|
|
21
19
|
private getRequest;
|
|
22
20
|
private createGetRequest;
|
|
23
21
|
private postRequest;
|
|
@@ -75,9 +75,6 @@ let PrivateCampaignManagementAPIClient = class PrivateCampaignManagementAPIClien
|
|
|
75
75
|
};
|
|
76
76
|
await this.postRequest(path, data);
|
|
77
77
|
}
|
|
78
|
-
async getCampaignLiftOverview() {
|
|
79
|
-
return await this.getRequest(`private/campaigns/lift-overview`);
|
|
80
|
-
}
|
|
81
78
|
async getRequest(relative = "") {
|
|
82
79
|
const request = this.createGetRequest(relative);
|
|
83
80
|
return await this.requestSender.sendAndExtractBody(request);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-campaign-management-api.client.js","sourceRoot":"","sources":["../../src/private-campaign-management-api.client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAA0B;AAG1B,yCAAuC;AAEvC,uFAAyG;
|
|
1
|
+
{"version":3,"file":"private-campaign-management-api.client.js","sourceRoot":"","sources":["../../src/private-campaign-management-api.client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAA0B;AAG1B,yCAAuC;AAEvC,uFAAyG;AAKlG,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAC9C,YACkB,wBAAmD,EACnD,aAAkC,EAClC,OAAe;QAFf,6BAAwB,GAAxB,wBAAwB,CAA2B;QACnD,kBAAa,GAAb,aAAa,CAAqB;QAClC,YAAO,GAAP,OAAO,CAAQ;IAC7B,CAAC;IAEE,KAAK,CAAC,iBAAiB,CAAC,WAAqB;QACnD,MAAM,IAAI,GAAG,wCAAwC,CAAC;QACtD,MAAM,IAAI,GAAG;YACZ,WAAW,EAAE,WAAW;SACxB,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAClD,OAAO,MAAM,CAAC,IAA2B,CAAC;IAC3C,CAAC;IAEM,KAAK,CAAC,2BAA2B,CAAC,UAAkB,EAAE,wBAAsD;QAClH,MAAM,IAAI,GAAG,kDAAkD,CAAC;QAChE,MAAM,IAAI,GAAG;YACZ,wBAAwB,EAAE,wBAAwB;YAClD,UAAU,EAAE,UAAU;SACtB,CAAC;QAEF,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,C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C,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,QAAQ,EAAE,CAAC;IACtC,CAAC;CACD,CAAA;AA1GY,kCAAkC;IAD9C,IAAA,sBAAU,GAAE;6CAIqB,+CAAmB;GAHxC,kCAAkC,CA0G9C;AA1GY,gFAAkC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SourceLinkLevels, SourceLinkTypes, SourceLinkSubTypes } from "../../../domain/organisations";
|
|
2
|
+
export declare class CreateSourceLinkValidator {
|
|
3
|
+
level: SourceLinkLevels;
|
|
4
|
+
type: SourceLinkTypes;
|
|
5
|
+
subType: SourceLinkSubTypes;
|
|
6
|
+
url: string;
|
|
7
|
+
doesExist: boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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.CreateSourceLinkValidator = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const organisations_1 = require("../../../domain/organisations");
|
|
15
|
+
class CreateSourceLinkValidator {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsEnum)(organisations_1.SourceLinkLevels),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], CreateSourceLinkValidator.prototype, "level", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsEnum)(organisations_1.SourceLinkTypes),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], CreateSourceLinkValidator.prototype, "type", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsEnum)(organisations_1.SourceLinkSubTypes),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], CreateSourceLinkValidator.prototype, "subType", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], CreateSourceLinkValidator.prototype, "url", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsBoolean)(),
|
|
35
|
+
__metadata("design:type", Boolean)
|
|
36
|
+
], CreateSourceLinkValidator.prototype, "doesExist", void 0);
|
|
37
|
+
exports.CreateSourceLinkValidator = CreateSourceLinkValidator;
|
|
38
|
+
//# sourceMappingURL=create-source-link-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-source-link-validator.js","sourceRoot":"","sources":["../../../../../src/validation/dto/organisations/create-source-link-validator.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAoE;AACpE,iEAAsG;AAEtG,MAAa,yBAAyB;CAerC;AAdA;IAAC,IAAA,wBAAM,EAAC,gCAAgB,CAAC;;wDACD;AAExB;IAAC,IAAA,wBAAM,EAAC,+BAAe,CAAC;;uDACF;AAEtB;IAAC,IAAA,wBAAM,EAAC,kCAAkB,CAAC;;0DACC;AAE5B;IAAC,IAAA,0BAAQ,GAAE;;sDACC;AAEZ;IAAC,IAAA,2BAAS,GAAE;;4DACO;AAdpB,8DAeC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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.CreateSourceLinksRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const create_source_link_validator_1 = require("./create-source-link-validator");
|
|
16
|
+
class CreateSourceLinksRequest {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
20
|
+
(0, class_transformer_1.Type)(() => create_source_link_validator_1.CreateSourceLinkValidator),
|
|
21
|
+
__metadata("design:type", Array)
|
|
22
|
+
], CreateSourceLinksRequest.prototype, "sourceLinks", void 0);
|
|
23
|
+
exports.CreateSourceLinksRequest = CreateSourceLinksRequest;
|
|
24
|
+
//# sourceMappingURL=create-source-links.request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-source-links.request.js","sourceRoot":"","sources":["../../../../../src/validation/dto/organisations/create-source-links.request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyC;AACzC,qDAA6D;AAC7D,iFAA2E;AAE3E,MAAa,wBAAwB;CAIpC;AAHA;IAAC,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,wDAAyB,CAAC;;6DACG;AAH1C,4DAIC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CreateSourceLinkValidator } from "./create-source-link-validator";
|
|
2
|
+
import { CreateSourceLinksRequest } from "./create-source-links.request";
|
|
3
|
+
import { UpdateSourceLinkValidator } from "./update-source-link-validator";
|
|
4
|
+
import { UpdateSourceLinksRequest } from "./update-source-links.request";
|
|
5
|
+
export { CreateSourceLinksRequest, CreateSourceLinkValidator, UpdateSourceLinkValidator, UpdateSourceLinksRequest };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateSourceLinksRequest = exports.UpdateSourceLinkValidator = exports.CreateSourceLinkValidator = exports.CreateSourceLinksRequest = void 0;
|
|
4
|
+
const create_source_link_validator_1 = require("./create-source-link-validator");
|
|
5
|
+
Object.defineProperty(exports, "CreateSourceLinkValidator", { enumerable: true, get: function () { return create_source_link_validator_1.CreateSourceLinkValidator; } });
|
|
6
|
+
const create_source_links_request_1 = require("./create-source-links.request");
|
|
7
|
+
Object.defineProperty(exports, "CreateSourceLinksRequest", { enumerable: true, get: function () { return create_source_links_request_1.CreateSourceLinksRequest; } });
|
|
8
|
+
const update_source_link_validator_1 = require("./update-source-link-validator");
|
|
9
|
+
Object.defineProperty(exports, "UpdateSourceLinkValidator", { enumerable: true, get: function () { return update_source_link_validator_1.UpdateSourceLinkValidator; } });
|
|
10
|
+
const update_source_links_request_1 = require("./update-source-links.request");
|
|
11
|
+
Object.defineProperty(exports, "UpdateSourceLinksRequest", { enumerable: true, get: function () { return update_source_links_request_1.UpdateSourceLinksRequest; } });
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/validation/dto/organisations/index.ts"],"names":[],"mappings":";;;AAAA,iFAA2E;AAO1E,0GAPQ,wDAAyB,OAOR;AAN1B,+EAAyE;AAKxE,yGALQ,sDAAwB,OAKR;AAJzB,iFAA2E;AAM1E,0GANQ,wDAAyB,OAMR;AAL1B,+EAAyE;AAMxE,yGANQ,sDAAwB,OAMR"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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.UpdateSourceLinkValidator = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const create_source_link_validator_1 = require("./create-source-link-validator");
|
|
15
|
+
class UpdateSourceLinkValidator extends create_source_link_validator_1.CreateSourceLinkValidator {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsInt)(),
|
|
19
|
+
(0, class_validator_1.Min)(1),
|
|
20
|
+
__metadata("design:type", Number)
|
|
21
|
+
], UpdateSourceLinkValidator.prototype, "id", void 0);
|
|
22
|
+
exports.UpdateSourceLinkValidator = UpdateSourceLinkValidator;
|
|
23
|
+
//# sourceMappingURL=update-source-link-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-source-link-validator.js","sourceRoot":"","sources":["../../../../../src/validation/dto/organisations/update-source-link-validator.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6C;AAC7C,iFAA2E;AAE3E,MAAa,yBAA0B,SAAQ,wDAAyB;CAIvE;AAHA;IAAC,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,CAAC,CAAC;;qDACI;AAHZ,8DAIC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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.UpdateSourceLinksRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const update_source_link_validator_1 = require("./update-source-link-validator");
|
|
16
|
+
class UpdateSourceLinksRequest {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
20
|
+
(0, class_transformer_1.Type)(() => update_source_link_validator_1.UpdateSourceLinkValidator),
|
|
21
|
+
__metadata("design:type", Array)
|
|
22
|
+
], UpdateSourceLinksRequest.prototype, "sourceLinks", void 0);
|
|
23
|
+
exports.UpdateSourceLinksRequest = UpdateSourceLinksRequest;
|
|
24
|
+
//# sourceMappingURL=update-source-links.request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-source-links.request.js","sourceRoot":"","sources":["../../../../../src/validation/dto/organisations/update-source-links.request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyC;AACzC,qDAA6D;AAC7D,iFAA2E;AAE3E,MAAa,wBAAwB;CAIpC;AAHA;IAAC,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,wDAAyB,CAAC;;6DACG;AAH1C,4DAIC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CampaignMandatoryFieldsValidator } from "./campaign/mandatory-fields-validator";
|
|
2
2
|
import { SpecificResult } from "./types/SpecificResult";
|
|
3
3
|
import { ValidationResult } from "./types/ValidationResult";
|
|
4
|
+
export * from "./dto/organisations";
|
|
4
5
|
export { ValidationResult, SpecificResult, CampaignMandatoryFieldsValidator };
|
package/src/validation/index.js
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
17
|
exports.CampaignMandatoryFieldsValidator = exports.SpecificResult = void 0;
|
|
4
18
|
const mandatory_fields_validator_1 = require("./campaign/mandatory-fields-validator");
|
|
5
19
|
Object.defineProperty(exports, "CampaignMandatoryFieldsValidator", { enumerable: true, get: function () { return mandatory_fields_validator_1.CampaignMandatoryFieldsValidator; } });
|
|
6
20
|
const SpecificResult_1 = require("./types/SpecificResult");
|
|
7
21
|
Object.defineProperty(exports, "SpecificResult", { enumerable: true, get: function () { return SpecificResult_1.SpecificResult; } });
|
|
22
|
+
__exportStar(require("./dto/organisations"), exports);
|
|
8
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/validation/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/validation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,sFAAyF;AASxF,iHATQ,6DAAgC,OASR;AARjC,2DAAwD;AAOvD,+FAPQ,+BAAc,OAOR;AAJf,sDAAoC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetCampaignsLiftOverviewDto = void 0;
|
|
4
|
-
class GetCampaignsLiftOverviewDto {
|
|
5
|
-
constructor(campaignIds) {
|
|
6
|
-
this.campaignIds = campaignIds;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
exports.GetCampaignsLiftOverviewDto = GetCampaignsLiftOverviewDto;
|
|
10
|
-
//# sourceMappingURL=get-campaigns-lift-overview.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-campaigns-lift-overview.dto.js","sourceRoot":"","sources":["../../../../src/domain/campaign/get-campaigns-lift-overview.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,2BAA2B;IACpC,YACoB,WAAqB;QAArB,gBAAW,GAAX,WAAW,CAAU;IACrC,CAAC;CACR;AAJD,kEAIC"}
|