@studyportals/campaign-management-api-interface 0.33.1-1 → 0.33.1-4
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/create-or-update-link-response.dto.d.ts +4 -0
- package/src/domain/links/create-or-update-link-response.dto.js +8 -0
- package/src/domain/links/create-or-update-link-response.dto.js.map +1 -0
- package/src/domain/links/link.dto.d.ts +12 -0
- package/src/domain/links/link.dto.js +18 -0
- package/src/domain/links/link.dto.js.map +1 -0
- package/src/links-campaign-management-api.client.d.ts +2 -1
- package/src/links-campaign-management-api.client.js +1 -3
- package/src/links-campaign-management-api.client.js.map +1 -1
package/index.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ import { CmsGroupDto } from "./src/domain/users/cms-group.dto";
|
|
|
14
14
|
import { DetailedUserDto } from "./src/domain/users/detailed-user.dto";
|
|
15
15
|
import { LinkType } from "./src/domain/studies/enums/link-type.enum";
|
|
16
16
|
import { PersistGoogleLinkerResultDto } from "./src/domain/campaign/persist-google-linker-result.dto";
|
|
17
|
-
|
|
17
|
+
import { LinkEntityType } from "./src/domain/links/link-entity-type.enum";
|
|
18
|
+
export { AuditorCampaignManagementAPIClient, OrganisationsCampaignManagementAPIClient, CampaignManagementAPIClient, PrivateCampaignManagementAPIClient, UserCampaignManagementAPIClient, StudyCampaignManagementAPIClient, AuditorEntityType, AuditorOperation, LinkType, LinkEntityType, GetAuditorDto, PersistGoogleLinkerResultDto, CampaignsEntitiesConfigDto, MinimalOrganisationDto, DetailedUserDto, CmsGroupDto, NumberMap, Pricing, ICampaignAuditorData };
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Pricing = exports.CmsGroupDto = exports.DetailedUserDto = exports.MinimalOrganisationDto = exports.CampaignsEntitiesConfigDto = exports.PersistGoogleLinkerResultDto = exports.GetAuditorDto = exports.LinkType = exports.AuditorOperation = exports.AuditorEntityType = exports.StudyCampaignManagementAPIClient = exports.UserCampaignManagementAPIClient = exports.PrivateCampaignManagementAPIClient = exports.CampaignManagementAPIClient = exports.OrganisationsCampaignManagementAPIClient = exports.AuditorCampaignManagementAPIClient = void 0;
|
|
3
|
+
exports.Pricing = exports.CmsGroupDto = exports.DetailedUserDto = exports.MinimalOrganisationDto = exports.CampaignsEntitiesConfigDto = exports.PersistGoogleLinkerResultDto = exports.GetAuditorDto = exports.LinkEntityType = exports.LinkType = exports.AuditorOperation = exports.AuditorEntityType = exports.StudyCampaignManagementAPIClient = exports.UserCampaignManagementAPIClient = exports.PrivateCampaignManagementAPIClient = exports.CampaignManagementAPIClient = exports.OrganisationsCampaignManagementAPIClient = exports.AuditorCampaignManagementAPIClient = void 0;
|
|
4
4
|
const auditor_campaign_management_api_client_1 = require("./src/auditor-campaign-management-api.client");
|
|
5
5
|
Object.defineProperty(exports, "AuditorCampaignManagementAPIClient", { enumerable: true, get: function () { return auditor_campaign_management_api_client_1.AuditorCampaignManagementAPIClient; } });
|
|
6
6
|
const organisations_campaign_management_api_client_1 = require("./src/organisations-campaign-management-api.client");
|
|
@@ -33,4 +33,6 @@ const link_type_enum_1 = require("./src/domain/studies/enums/link-type.enum");
|
|
|
33
33
|
Object.defineProperty(exports, "LinkType", { enumerable: true, get: function () { return link_type_enum_1.LinkType; } });
|
|
34
34
|
const persist_google_linker_result_dto_1 = require("./src/domain/campaign/persist-google-linker-result.dto");
|
|
35
35
|
Object.defineProperty(exports, "PersistGoogleLinkerResultDto", { enumerable: true, get: function () { return persist_google_linker_result_dto_1.PersistGoogleLinkerResultDto; } });
|
|
36
|
+
const link_entity_type_enum_1 = require("./src/domain/links/link-entity-type.enum");
|
|
37
|
+
Object.defineProperty(exports, "LinkEntityType", { enumerable: true, get: function () { return link_entity_type_enum_1.LinkEntityType; } });
|
|
36
38
|
//# 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;AAoB9F,mHApBK,2EAAkC,OAoBL;AAnBtC,qHAA8G;AAoB1G,yHApBK,uFAAwC,OAoBL;AAnB5C,yFAAmF;AAoB/E,4GApBK,4DAA2B,OAoBL;AAnB/B,kGAAwF;AAyBpF,kGAzBK,4CAAiB,OAyBL;AAxBrB,8FAAqF;AAyBjF,iGAzBK,yCAAgB,OAyBL;AAxBpB,0EAAqE;AA4BjE,8FA5BK,+BAAa,OA4BL;AA3BjB,qGAAgG;AA+B5F,2GA/BK,yDAA0B,OA+BL;AA9B9B,gGAAgH;AAwC5G,wFAxCgB,+BAAO,OAwChB;AAvCX,yGAAkG;AAe9F,mHAfK,2EAAkC,OAeL;AAdtC,mGAA4F;AAexF,gHAfK,qEAA+B,OAeL;AAdnC,qGAA8F;AAe1F,iHAfK,uEAAgC,OAeL;AAdpC,oGAA8F;AA6B1F,uGA7BK,kDAAsB,OA6BL;AA5B1B,oEAA+D;AAgC3D,4FAhCK,2BAAW,OAgCL;AA/Bf,4EAAuE;AA8BnE,gGA9BK,mCAAe,OA8BL;AA7BnB,8EAAqE;AAgBjE,yFAhBK,yBAAQ,OAgBL;AAfZ,6GAAsG;AAmBlG,6GAnBK,+DAA4B,OAmBL;AAlBhC,oFAA0E;AAezE,+FAfQ,sCAAc,OAeR"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateOrUpdateLinksResponse = void 0;
|
|
4
|
+
class CreateOrUpdateLinksResponse {
|
|
5
|
+
constructor(createdLinks, updatedLinks) { }
|
|
6
|
+
}
|
|
7
|
+
exports.CreateOrUpdateLinksResponse = CreateOrUpdateLinksResponse;
|
|
8
|
+
//# sourceMappingURL=create-or-update-link-response.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-or-update-link-response.dto.js","sourceRoot":"","sources":["../../../../src/domain/links/create-or-update-link-response.dto.ts"],"names":[],"mappings":";;;AAEA,MAAa,2BAA2B;IACvC,YACC,YAAoB,EACpB,YAAoB,IACjB,CAAC;CACL;AALD,kEAKC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class Link {
|
|
2
|
+
id: number;
|
|
3
|
+
studyId: number;
|
|
4
|
+
organisationId: number;
|
|
5
|
+
countryId: number;
|
|
6
|
+
url: string;
|
|
7
|
+
type: string;
|
|
8
|
+
description: string;
|
|
9
|
+
name: string;
|
|
10
|
+
active: boolean;
|
|
11
|
+
constructor(id: number, studyId: number, organisationId: number, countryId: number, url: string, type: string, description: string, name: string, active: boolean);
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Link = void 0;
|
|
4
|
+
class Link {
|
|
5
|
+
constructor(id, studyId, organisationId, countryId, url, type, description, name, active) {
|
|
6
|
+
this.id = id;
|
|
7
|
+
this.studyId = studyId;
|
|
8
|
+
this.organisationId = organisationId;
|
|
9
|
+
this.countryId = countryId;
|
|
10
|
+
this.url = url;
|
|
11
|
+
this.type = type;
|
|
12
|
+
this.description = description;
|
|
13
|
+
this.name = name;
|
|
14
|
+
this.active = active;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.Link = Link;
|
|
18
|
+
//# sourceMappingURL=link.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.dto.js","sourceRoot":"","sources":["../../../../src/domain/links/link.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,IAAI;IAChB,YACQ,EAAU,EACV,OAAe,EACf,cAAsB,EACtB,SAAiB,EACjB,GAAW,EACX,IAAY,EACZ,WAAmB,EACnB,IAAY,EACZ,MAAe;QARf,OAAE,GAAF,EAAE,CAAQ;QACV,YAAO,GAAP,OAAO,CAAQ;QACf,mBAAc,GAAd,cAAc,CAAQ;QACtB,cAAS,GAAT,SAAS,CAAQ;QACjB,QAAG,GAAH,GAAG,CAAQ;QACX,SAAI,GAAJ,IAAI,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAQ;QACnB,SAAI,GAAJ,IAAI,CAAQ;QACZ,WAAM,GAAN,MAAM,CAAS;IACnB,CAAC;CACL;AAZD,oBAYC"}
|
|
@@ -2,10 +2,11 @@ import "reflect-metadata";
|
|
|
2
2
|
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
|
+
import { CreateOrUpdateLinksResponse } from "./domain/links/create-or-update-link-response.dto";
|
|
5
6
|
export declare class LinksCampaignManagementAPIClient {
|
|
6
7
|
private readonly baseUrl;
|
|
7
8
|
constructor(baseUrl: string);
|
|
8
|
-
createOrUpdateLinks(parentEntity: ParentEntityDto, linksToCreate: CreateLinkDto[], linksToUpdate: UpdateLinkDto[], jwt?: string): Promise<
|
|
9
|
+
createOrUpdateLinks(parentEntity: ParentEntityDto, linksToCreate: CreateLinkDto[], linksToUpdate: UpdateLinkDto[], jwt?: string): Promise<CreateOrUpdateLinksResponse>;
|
|
9
10
|
private postRequest;
|
|
10
11
|
private buildBaseUrl;
|
|
11
12
|
}
|
|
@@ -27,9 +27,7 @@ let LinksCampaignManagementAPIClient = class LinksCampaignManagementAPIClient {
|
|
|
27
27
|
// update path when decided on the path and if changed
|
|
28
28
|
const path = 'links/create-or-update-links';
|
|
29
29
|
const result = await this.postRequest(path, sendData, jwt);
|
|
30
|
-
|
|
31
|
-
throw new Error("Failed to create or update links");
|
|
32
|
-
}
|
|
30
|
+
return result.body;
|
|
33
31
|
}
|
|
34
32
|
async postRequest(relative = "", data, jwt = "") {
|
|
35
33
|
return await superagent.post(this.buildBaseUrl(relative))
|
|
@@ -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;
|
|
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;AAOlC,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IAC5C,YACkB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;IAC7B,CAAC;IAEE,KAAK,CAAC,mBAAmB,CAC/B,YAA6B,EAC7B,aAA8B,EAC9B,aAA8B,EAC9B,MAAc,EAAE;QAEhB,MAAM,QAAQ,GAAG;YAChB,UAAU,EAAE,YAAY,CAAC,IAAI;YAC7B,QAAQ,EAAE,YAAY,CAAC,EAAE;YACzB,aAAa;YACb,aAAa;SACb,CAAC;QACF,sDAAsD;QACtD,MAAM,IAAI,GAAG,8BAA8B,CAAC;QAC5C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;QAE3D,OAAO,MAAM,CAAC,IAAmC,CAAC;IACnD,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,WAAmB,EAAE,EAAE,IAAS,EAAE,GAAG,GAAG,EAAE;QACnE,OAAO,MAAM,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;aACvD,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC;aACvC,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC;aACzB,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAGO,YAAY,CAAC,QAAgB;QACpC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,QAAQ,EAAE,CAAC;IACtC,CAAC;CACD,CAAA;AAnCY,gCAAgC;IAD5C,IAAA,sBAAU,GAAE;;GACA,gCAAgC,CAmC5C;AAnCY,4EAAgC"}
|