@studyportals/campaign-management-api-interface 3.0.0 → 3.0.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 +1 -1
- package/src/campaign-management-api.client.d.ts +2 -0
- package/src/campaign-management-api.client.js +5 -0
- package/src/campaign-management-api.client.js.map +1 -1
- package/src/domain/campaign/custom-products.dto.d.ts +10 -0
- package/src/domain/campaign/custom-products.dto.js +7 -0
- package/src/domain/campaign/custom-products.dto.js.map +1 -0
- package/src/domain/campaign/enums/custom-product-types.enum.d.ts +9 -0
- package/src/domain/campaign/enums/custom-product-types.enum.js +14 -0
- package/src/domain/campaign/enums/custom-product-types.enum.js.map +1 -0
- package/src/domain/campaign/index.d.ts +2 -1
- package/src/domain/campaign/index.js +3 -1
- package/src/domain/campaign/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import { CampaignsDuplicatesDto } from "./domain/campaign/campaign-duplicates.dt
|
|
|
4
4
|
import { DuplicateCampaignDto } from "./domain/campaign/duplicate-campaign.dto";
|
|
5
5
|
import { CampaignEditorGetResultDto } from "./domain/campaign/campaign-editor-get-result.dto";
|
|
6
6
|
import { MinimalUserDto } from "./domain/users/minimal-user.dto";
|
|
7
|
+
import { CustomProductsDto } from "./domain/campaign/custom-products.dto";
|
|
7
8
|
export declare class CampaignManagementAPIClient {
|
|
8
9
|
private readonly baseUrl;
|
|
9
10
|
constructor(baseUrl: string);
|
|
@@ -17,6 +18,7 @@ export declare class CampaignManagementAPIClient {
|
|
|
17
18
|
getCampaignForCampaignEditor(campaignID: number, jwt?: string): Promise<CampaignEditorGetResultDto>;
|
|
18
19
|
getClientServicesUsers(jwt?: string): Promise<MinimalUserDto[]>;
|
|
19
20
|
getAccountManagers(jwt?: string): Promise<MinimalUserDto[]>;
|
|
21
|
+
getCustomProducts(campaignID: number, jwt?: string): Promise<CustomProductsDto[]>;
|
|
20
22
|
private postRequest;
|
|
21
23
|
private getRequest;
|
|
22
24
|
private buildBaseUrl;
|
|
@@ -82,6 +82,11 @@ let CampaignManagementAPIClient = class CampaignManagementAPIClient {
|
|
|
82
82
|
const result = await this.getRequest(path, jwt);
|
|
83
83
|
return result.body;
|
|
84
84
|
}
|
|
85
|
+
async getCustomProducts(campaignID, jwt = '') {
|
|
86
|
+
const path = `campaigns/campaign-editor/custom-products/${campaignID}`;
|
|
87
|
+
const result = await this.getRequest(path, jwt);
|
|
88
|
+
return result.body;
|
|
89
|
+
}
|
|
85
90
|
async postRequest(relative = "", data, jwt = "") {
|
|
86
91
|
const request = superagent.post(this.buildBaseUrl(relative))
|
|
87
92
|
.set("Content-Type", "application/json")
|
|
@@ -1 +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;
|
|
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;AAQlC,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACvC,YACkB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;IAC7B,CAAC;IAEE,KAAK,CAAC,qBAAqB,CAAC,mBAA2C,EAAE,GAAG,GAAG,EAAE;QACvF,MAAM,IAAI,GAAG,0BAA0B,CAAC;QAExC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,mBAAmB,EAAE,GAAG,CAAC,CAAC;QACtE,OAAO,MAAM,CAAC,IAA4B,CAAC;IAC5C,CAAC;IAEM,KAAK,CAAC,2BAA2B,CAAC,UAAkB,EAAE,wBAAsD,EAAE,GAAG,GAAG,EAAE;QAC5H,MAAM,IAAI,GAAG,0CAA0C,CAAC;QACxD,MAAM,IAAI,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AEO,KAAK,CAAC,WAAW,CAAC,WAAmB,EAAE,EAAE,IAAqB,EAAE,MAAc,EAAE;QACvF,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;aAC1D,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC;aACvC,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;QAE5B,OAAO,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAEO,KAAK,CAAC,UAAU,CAAC,WAAmB,EAAE,EAAE,MAAc,EAAE;QAC/D,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;aACzD,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC;aACvC,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;QAC5B,OAAO,MAAM,OAAO,CAAC;IACtB,CAAC;IAEO,YAAY,CAAC,QAAgB;QACpC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,QAAQ,EAAE,CAAC;IACtC,CAAC;CACD,CAAA;AAnHY,2BAA2B;IADvC,IAAA,sBAAU,GAAE;;GACA,2BAA2B,CAmHvC;AAnHY,kEAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-products.dto.js","sourceRoot":"","sources":["../../../../src/domain/campaign/custom-products.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,iBAAiB;CAS7B;AATD,8CASC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomProductTypes = void 0;
|
|
4
|
+
var CustomProductTypes;
|
|
5
|
+
(function (CustomProductTypes) {
|
|
6
|
+
CustomProductTypes["ACT"] = "act";
|
|
7
|
+
CustomProductTypes["BANNER_DESIGN"] = "banner_design";
|
|
8
|
+
CustomProductTypes["BUDGET_TRANSFER"] = "budget_transfer";
|
|
9
|
+
CustomProductTypes["EMAIL"] = "email";
|
|
10
|
+
CustomProductTypes["LEADS"] = "leads";
|
|
11
|
+
CustomProductTypes["REMARKETING"] = "remarketing";
|
|
12
|
+
CustomProductTypes["OTHER"] = "other";
|
|
13
|
+
})(CustomProductTypes = exports.CustomProductTypes || (exports.CustomProductTypes = {}));
|
|
14
|
+
//# sourceMappingURL=custom-product-types.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-product-types.enum.js","sourceRoot":"","sources":["../../../../../src/domain/campaign/enums/custom-product-types.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAQX;AARD,WAAY,kBAAkB;IAC7B,iCAAW,CAAA;IACX,qDAA+B,CAAA;IAC/B,yDAAmC,CAAA;IACnC,qCAAe,CAAA;IACf,qCAAe,CAAA;IACf,iDAA2B,CAAA;IAC3B,qCAAe,CAAA;AAChB,CAAC,EARW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAQ7B"}
|
|
@@ -4,4 +4,5 @@ import { Currency } from "./enums/currency.enum";
|
|
|
4
4
|
import { CustomOverperformanceDelivery, DeliveryMode, DeliveryType, EvenlyDelivery } from "./enums/delivery-mode";
|
|
5
5
|
import { PartnershipType, PartnershipTypeString } from "./partnership-type.enum";
|
|
6
6
|
import { Region } from "./enums/region.enum";
|
|
7
|
-
|
|
7
|
+
import { CustomProductTypes } from "./enums/custom-product-types.enum";
|
|
8
|
+
export { CampaignEditorGetResultDto, PartnershipType, PartnershipTypeString, Currency, CampaignType, Region, CustomProductTypes, DeliveryMode, DeliveryType, EvenlyDelivery, CustomOverperformanceDelivery };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeliveryType = exports.Region = exports.CampaignType = exports.Currency = exports.PartnershipTypeString = exports.PartnershipType = void 0;
|
|
3
|
+
exports.DeliveryType = exports.CustomProductTypes = exports.Region = exports.CampaignType = exports.Currency = exports.PartnershipTypeString = exports.PartnershipType = void 0;
|
|
4
4
|
const campaign_type_enum_1 = require("./enums/campaign-type.enum");
|
|
5
5
|
Object.defineProperty(exports, "CampaignType", { enumerable: true, get: function () { return campaign_type_enum_1.CampaignType; } });
|
|
6
6
|
const currency_enum_1 = require("./enums/currency.enum");
|
|
@@ -12,4 +12,6 @@ Object.defineProperty(exports, "PartnershipType", { enumerable: true, get: funct
|
|
|
12
12
|
Object.defineProperty(exports, "PartnershipTypeString", { enumerable: true, get: function () { return partnership_type_enum_1.PartnershipTypeString; } });
|
|
13
13
|
const region_enum_1 = require("./enums/region.enum");
|
|
14
14
|
Object.defineProperty(exports, "Region", { enumerable: true, get: function () { return region_enum_1.Region; } });
|
|
15
|
+
const custom_product_types_enum_1 = require("./enums/custom-product-types.enum");
|
|
16
|
+
Object.defineProperty(exports, "CustomProductTypes", { enumerable: true, get: function () { return custom_product_types_enum_1.CustomProductTypes; } });
|
|
15
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/domain/campaign/index.ts"],"names":[],"mappings":";;;AAAA,mEAA0D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/domain/campaign/index.ts"],"names":[],"mappings":";;;AAAA,mEAA0D;AAezD,6FAfQ,iCAAY,OAeR;AAbb,yDAAiD;AAYhD,yFAZQ,wBAAQ,OAYR;AAXT,yDAAkH;AAiBjH,6FAjBqD,4BAAY,OAiBrD;AAhBb,mEAAiF;AAQhF,gGARQ,uCAAe,OAQR;AACf,sGATyB,6CAAqB,OASzB;AARtB,qDAA6C;AAW5C,uFAXQ,oBAAM,OAWR;AAVP,iFAAuE;AAWtE,mGAXQ,8CAAkB,OAWR"}
|