@arrowsphere/api-client 3.19.0-rc.2 → 3.19.0-rc.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.
|
@@ -3,6 +3,7 @@ import { GetResult } from '../getResult';
|
|
|
3
3
|
import { Campaign } from './entities/campaign/campaign';
|
|
4
4
|
import { CampaignV2 } from './entities/v2/campaign/campaign';
|
|
5
5
|
import { CampaignAssets } from './entities/campaignAssets/campaignAssets';
|
|
6
|
+
import { CampaignList } from './entities/v2/campaignList';
|
|
6
7
|
export declare enum PostEmailCampaignFields {
|
|
7
8
|
COLUMN_APPLICATION = "application",
|
|
8
9
|
COLUMN_METADATA = "metadata"
|
|
@@ -23,7 +24,7 @@ export declare class CampaignClient extends AbstractClient {
|
|
|
23
24
|
* @deprecated Use getActiveCampaignV2() instead
|
|
24
25
|
*/
|
|
25
26
|
getActiveCampaign(parameters?: Parameters): Promise<GetResult<Campaign>>;
|
|
26
|
-
getActiveCampaignV2(parameters?: Parameters): Promise<GetResult<
|
|
27
|
+
getActiveCampaignV2(parameters?: Parameters): Promise<GetResult<CampaignList>>;
|
|
27
28
|
getCampaignAssets(campaignReference: string, parameters?: Parameters): Promise<GetResult<CampaignAssets>>;
|
|
28
29
|
/**
|
|
29
30
|
* @deprecated Use getCampaignDetailsV2() instead
|
|
@@ -6,6 +6,7 @@ const getResult_1 = require("../getResult");
|
|
|
6
6
|
const campaign_1 = require("./entities/campaign/campaign");
|
|
7
7
|
const campaign_2 = require("./entities/v2/campaign/campaign");
|
|
8
8
|
const campaignAssets_1 = require("./entities/campaignAssets/campaignAssets");
|
|
9
|
+
const campaignList_1 = require("./entities/v2/campaignList");
|
|
9
10
|
var PostEmailCampaignFields;
|
|
10
11
|
(function (PostEmailCampaignFields) {
|
|
11
12
|
PostEmailCampaignFields["COLUMN_APPLICATION"] = "application";
|
|
@@ -28,7 +29,7 @@ class CampaignClient extends abstractClient_1.AbstractClient {
|
|
|
28
29
|
}
|
|
29
30
|
async getActiveCampaignV2(parameters = {}) {
|
|
30
31
|
this.path = '/v2/active';
|
|
31
|
-
return new getResult_1.GetResult(
|
|
32
|
+
return new getResult_1.GetResult(campaignList_1.CampaignList, await this.get(parameters));
|
|
32
33
|
}
|
|
33
34
|
async getCampaignAssets(campaignReference, parameters = {}) {
|
|
34
35
|
this.path = `/${campaignReference}/assets`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstractEntity';
|
|
2
|
+
import { CampaignV2Type, CampaignV2 } from './campaign/campaign';
|
|
3
|
+
export declare type CampaignListType = Array<CampaignV2Type>;
|
|
4
|
+
export declare class CampaignList extends AbstractEntity<CampaignListType> {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(campaignListDataInput: Array<CampaignV2Type>);
|
|
7
|
+
get campaignList(): Array<CampaignV2>;
|
|
8
|
+
toJSON(): CampaignListType;
|
|
9
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _campaignList;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.CampaignList = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../abstractEntity");
|
|
19
|
+
const campaign_1 = require("./campaign/campaign");
|
|
20
|
+
class CampaignList extends abstractEntity_1.AbstractEntity {
|
|
21
|
+
constructor(campaignListDataInput) {
|
|
22
|
+
super(campaignListDataInput);
|
|
23
|
+
_campaignList.set(this, void 0);
|
|
24
|
+
__classPrivateFieldSet(this, _campaignList, campaignListDataInput.map((campaign) => new campaign_1.CampaignV2(campaign)));
|
|
25
|
+
}
|
|
26
|
+
get campaignList() {
|
|
27
|
+
return __classPrivateFieldGet(this, _campaignList);
|
|
28
|
+
}
|
|
29
|
+
toJSON() {
|
|
30
|
+
return this.campaignList.map((campaign) => campaign.toJSON());
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.CampaignList = CampaignList;
|
|
34
|
+
_campaignList = new WeakMap();
|
|
35
|
+
//# sourceMappingURL=campaignList.js.map
|
package/package.json
CHANGED