@studyportals/campaign-management-api-interface 2.1.1-3 → 2.2.1-0
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.d.ts +2 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/links/swapping-active-link-for-studies-response.d.ts +11 -0
- package/src/domain/links/swapping-active-link-for-studies-response.js +11 -0
- package/src/domain/links/swapping-active-link-for-studies-response.js.map +1 -0
- package/src/domain/links/swapping-enabled-link-types.enum.d.ts +4 -0
- package/src/domain/links/swapping-enabled-link-types.enum.js +9 -0
- package/src/domain/links/swapping-enabled-link-types.enum.js.map +1 -0
- package/src/links-campaign-management-api.client.d.ts +3 -0
- package/src/links-campaign-management-api.client.js +9 -0
- package/src/links-campaign-management-api.client.js.map +1 -1
package/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { LinkType } from "./src/domain/studies/enums/link-type.enum";
|
|
|
14
14
|
import { PersistGoogleLinkerResultDto } from "./src/domain/campaign/persist-google-linker-result.dto";
|
|
15
15
|
import { LinkEntityType } from "./src/domain/links/link-entity-type.enum";
|
|
16
16
|
import { LinksCampaignManagementAPIClient } from './src/links-campaign-management-api.client';
|
|
17
|
+
import { SwappingEnabledLinkTypes } from "./src/domain/links/swapping-enabled-link-types.enum";
|
|
17
18
|
export * from "./src/domain/campaign";
|
|
18
19
|
export * from "./src/domain/users";
|
|
19
|
-
export { AuditorCampaignManagementAPIClient, OrganisationsCampaignManagementAPIClient, CampaignManagementAPIClient, PrivateCampaignManagementAPIClient, UserCampaignManagementAPIClient, StudyCampaignManagementAPIClient, LinksCampaignManagementAPIClient, AuditorEntityType, AuditorOperation, LinkType, LinkEntityType, GetAuditorDto, PersistGoogleLinkerResultDto, CampaignsEntitiesConfigDto, MinimalOrganisationDto, NumberMap, Pricing, ICampaignAuditorData };
|
|
20
|
+
export { AuditorCampaignManagementAPIClient, OrganisationsCampaignManagementAPIClient, CampaignManagementAPIClient, PrivateCampaignManagementAPIClient, UserCampaignManagementAPIClient, StudyCampaignManagementAPIClient, LinksCampaignManagementAPIClient, AuditorEntityType, AuditorOperation, LinkType, LinkEntityType, SwappingEnabledLinkTypes, GetAuditorDto, PersistGoogleLinkerResultDto, CampaignsEntitiesConfigDto, MinimalOrganisationDto, NumberMap, Pricing, ICampaignAuditorData };
|
package/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Pricing = exports.MinimalOrganisationDto = exports.CampaignsEntitiesConfigDto = exports.PersistGoogleLinkerResultDto = exports.GetAuditorDto = exports.LinkEntityType = exports.LinkType = exports.AuditorOperation = exports.AuditorEntityType = exports.LinksCampaignManagementAPIClient = exports.StudyCampaignManagementAPIClient = exports.UserCampaignManagementAPIClient = exports.PrivateCampaignManagementAPIClient = exports.CampaignManagementAPIClient = exports.OrganisationsCampaignManagementAPIClient = exports.AuditorCampaignManagementAPIClient = void 0;
|
|
17
|
+
exports.Pricing = exports.MinimalOrganisationDto = exports.CampaignsEntitiesConfigDto = exports.PersistGoogleLinkerResultDto = exports.GetAuditorDto = exports.SwappingEnabledLinkTypes = exports.LinkEntityType = exports.LinkType = exports.AuditorOperation = exports.AuditorEntityType = exports.LinksCampaignManagementAPIClient = exports.StudyCampaignManagementAPIClient = exports.UserCampaignManagementAPIClient = exports.PrivateCampaignManagementAPIClient = exports.CampaignManagementAPIClient = exports.OrganisationsCampaignManagementAPIClient = exports.AuditorCampaignManagementAPIClient = void 0;
|
|
18
18
|
const auditor_campaign_management_api_client_1 = require("./src/auditor-campaign-management-api.client");
|
|
19
19
|
Object.defineProperty(exports, "AuditorCampaignManagementAPIClient", { enumerable: true, get: function () { return auditor_campaign_management_api_client_1.AuditorCampaignManagementAPIClient; } });
|
|
20
20
|
const organisations_campaign_management_api_client_1 = require("./src/organisations-campaign-management-api.client");
|
|
@@ -47,6 +47,8 @@ const link_entity_type_enum_1 = require("./src/domain/links/link-entity-type.enu
|
|
|
47
47
|
Object.defineProperty(exports, "LinkEntityType", { enumerable: true, get: function () { return link_entity_type_enum_1.LinkEntityType; } });
|
|
48
48
|
const links_campaign_management_api_client_1 = require("./src/links-campaign-management-api.client");
|
|
49
49
|
Object.defineProperty(exports, "LinksCampaignManagementAPIClient", { enumerable: true, get: function () { return links_campaign_management_api_client_1.LinksCampaignManagementAPIClient; } });
|
|
50
|
+
const swapping_enabled_link_types_enum_1 = require("./src/domain/links/swapping-enabled-link-types.enum");
|
|
51
|
+
Object.defineProperty(exports, "SwappingEnabledLinkTypes", { enumerable: true, get: function () { return swapping_enabled_link_types_enum_1.SwappingEnabledLinkTypes; } });
|
|
50
52
|
__exportStar(require("./src/domain/campaign"), exports);
|
|
51
53
|
__exportStar(require("./src/domain/users"), exports);
|
|
52
54
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yGAAkG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yGAAkG;AAuBjG,mHAvBQ,2EAAkC,OAuBR;AAtBnC,qHAA8G;AAuB7G,yHAvBQ,uFAAwC,OAuBR;AAtBzC,yFAAmF;AAuBlF,4GAvBQ,4DAA2B,OAuBR;AAtB5B,kGAAwF;AA6BvF,kGA7BQ,4CAAiB,OA6BR;AA5BlB,8FAAqF;AA6BpF,iGA7BQ,yCAAgB,OA6BR;AA5BjB,0EAAqE;AAkCpE,8FAlCQ,+BAAa,OAkCR;AAjCd,qGAAgG;AAqC/F,2GArCQ,yDAA0B,OAqCR;AApC3B,gGAAgH;AA0C/G,wFA1CmB,+BAAO,OA0CnB;AAzCR,yGAAkG;AAkBjG,mHAlBQ,2EAAkC,OAkBR;AAjBnC,mGAA4F;AAkB3F,gHAlBQ,qEAA+B,OAkBR;AAjBhC,qGAA8F;AAkB7F,iHAlBQ,uEAAgC,OAkBR;AAjBjC,oGAA8F;AAmC7F,uGAnCQ,kDAAsB,OAmCR;AAlCvB,8EAAqE;AAsBpE,yFAtBQ,yBAAQ,OAsBR;AArBT,6GAAsG;AA2BrG,6GA3BQ,+DAA4B,OA2BR;AA1B7B,oFAA0E;AAqBzE,+FArBQ,sCAAc,OAqBR;AApBf,qGAA8F;AAc7F,iHAdQ,uEAAgC,OAcR;AAbjC,0GAA+F;AAoB9F,yGApBQ,2DAAwB,OAoBR;AAlBzB,wDAAsC;AACtC,qDAAmC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SwappingActiveLinkForStudiesResponse = void 0;
|
|
4
|
+
class SwappingActiveLinkForStudiesResponse {
|
|
5
|
+
constructor(success, error) {
|
|
6
|
+
this.success = success;
|
|
7
|
+
this.error = error;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.SwappingActiveLinkForStudiesResponse = SwappingActiveLinkForStudiesResponse;
|
|
11
|
+
//# sourceMappingURL=swapping-active-link-for-studies-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swapping-active-link-for-studies-response.js","sourceRoot":"","sources":["../../../../src/domain/links/swapping-active-link-for-studies-response.ts"],"names":[],"mappings":";;;AAAA,MAAa,oCAAoC;IAChD,YACQ,OAAiB,EACjB,KAA6C;QAD7C,YAAO,GAAP,OAAO,CAAU;QACjB,UAAK,GAAL,KAAK,CAAwC;IACjD,CAAC;CAEL;AAND,oFAMC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SwappingEnabledLinkTypes = void 0;
|
|
4
|
+
var SwappingEnabledLinkTypes;
|
|
5
|
+
(function (SwappingEnabledLinkTypes) {
|
|
6
|
+
SwappingEnabledLinkTypes["HOMEPAGE"] = "homepage";
|
|
7
|
+
SwappingEnabledLinkTypes["MICROSITE"] = "microsite";
|
|
8
|
+
})(SwappingEnabledLinkTypes = exports.SwappingEnabledLinkTypes || (exports.SwappingEnabledLinkTypes = {}));
|
|
9
|
+
//# sourceMappingURL=swapping-enabled-link-types.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swapping-enabled-link-types.enum.js","sourceRoot":"","sources":["../../../../src/domain/links/swapping-enabled-link-types.enum.ts"],"names":[],"mappings":";;;AAEA,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IACnC,iDAA4B,CAAA;IAC5B,mDAA8B,CAAA;AAC/B,CAAC,EAHW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAGnC"}
|
|
@@ -3,10 +3,13 @@ import { CreateLinkDto } from "./domain/links/create-link.dto";
|
|
|
3
3
|
import { UpdateLinkDto } from "./domain/links/update-link.dto";
|
|
4
4
|
import { ParentEntityDto } from "./domain/links/parent-entity.dto";
|
|
5
5
|
import { CreateOrUpdateLinksResponse } from "./domain/links/create-or-update-link-response.dto";
|
|
6
|
+
import { SwappingEnabledLinkTypes } from "./domain/links/swapping-enabled-link-types.enum";
|
|
7
|
+
import { SwappingActiveLinkForStudiesResponse } from "./domain/links/swapping-active-link-for-studies-response";
|
|
6
8
|
export declare class LinksCampaignManagementAPIClient {
|
|
7
9
|
private readonly baseUrl;
|
|
8
10
|
constructor(baseUrl: string);
|
|
9
11
|
createOrUpdateLinks(parentEntity: ParentEntityDto, linksToBeCreated: CreateLinkDto[], linksToBeUpdated: UpdateLinkDto[], jwt?: string): Promise<CreateOrUpdateLinksResponse>;
|
|
12
|
+
swapActiveLinkForStudies(studyIds: number[], linkTypeIsGoingTobeActive: SwappingEnabledLinkTypes, jwt?: string): Promise<SwappingActiveLinkForStudiesResponse>;
|
|
10
13
|
private postRequest;
|
|
11
14
|
private buildBaseUrl;
|
|
12
15
|
}
|
|
@@ -29,6 +29,15 @@ let LinksCampaignManagementAPIClient = class LinksCampaignManagementAPIClient {
|
|
|
29
29
|
const result = await this.postRequest(path, sendData, jwt);
|
|
30
30
|
return result.body;
|
|
31
31
|
}
|
|
32
|
+
async swapActiveLinkForStudies(studyIds, linkTypeIsGoingTobeActive, jwt = "") {
|
|
33
|
+
const sendData = {
|
|
34
|
+
studyIds,
|
|
35
|
+
linkTypeIsGoingTobeActive
|
|
36
|
+
};
|
|
37
|
+
const path = 'links/study/swap-active-links';
|
|
38
|
+
const result = await this.postRequest(path, sendData, jwt);
|
|
39
|
+
return result.body;
|
|
40
|
+
}
|
|
32
41
|
async postRequest(relative = "", data, jwt = "") {
|
|
33
42
|
return await superagent.post(this.buildBaseUrl(relative))
|
|
34
43
|
.set("Content-Type", "application/json")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links-campaign-management-api.client.js","sourceRoot":"","sources":["../../src/links-campaign-management-api.client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAA0B;AAG1B,yCAAuC;AAEvC,yCAAyC;
|
|
1
|
+
{"version":3,"file":"links-campaign-management-api.client.js","sourceRoot":"","sources":["../../src/links-campaign-management-api.client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAA0B;AAG1B,yCAAuC;AAEvC,yCAAyC;AASlC,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IAC5C,YACkB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;IAC7B,CAAC;IAEE,KAAK,CAAC,mBAAmB,CAC/B,YAA6B,EAC7B,gBAAiC,EACjC,gBAAiC,EACjC,MAAc,EAAE;QAEhB,MAAM,QAAQ,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