@cakemail-org/ui-components-v2 2.2.27 → 2.2.28
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/dist/cjs/index.js +275 -5
- package/dist/cjs/models/contact/index.d.ts +6 -0
- package/dist/cjs/models/contact/types.d.ts +1 -0
- package/dist/cjs/models/list/index.d.ts +34 -1
- package/dist/cjs/services/contacts/index.d.ts +18 -0
- package/dist/cjs/services/lists/index.d.ts +37 -2
- package/dist/cjs/types/generic.d.ts +5 -0
- package/dist/cjs/utils/posthog.d.ts +4 -0
- package/dist/esm/index.js +266 -6
- package/dist/esm/models/contact/index.d.ts +6 -0
- package/dist/esm/models/contact/types.d.ts +1 -0
- package/dist/esm/models/list/index.d.ts +34 -1
- package/dist/esm/services/contacts/index.d.ts +18 -0
- package/dist/esm/services/lists/index.d.ts +37 -2
- package/dist/esm/types/generic.d.ts +5 -0
- package/dist/esm/utils/posthog.d.ts +4 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -5378,9 +5378,13 @@ exports.EEvents = void 0;
|
|
|
5378
5378
|
EEvents["CONTACT_EXPORT"] = "Contact.Export";
|
|
5379
5379
|
EEvents["CONTACT_EXPORT_DOWNLOAD"] = "Contact.Export.Download";
|
|
5380
5380
|
EEvents["CONTACT_TAGGED"] = "Contact.Tagged";
|
|
5381
|
+
EEvents["CONTACTS_TAGGED"] = "Contacts.Tagged";
|
|
5381
5382
|
EEvents["CONTACT_UNTAGGED"] = "Contact.Untagged";
|
|
5383
|
+
EEvents["CONTACTS_UNTAGGED"] = "Contacts.Untagged";
|
|
5382
5384
|
EEvents["CONTACT_INTERESTED"] = "Contact.Interested";
|
|
5385
|
+
EEvents["CONTACTS_INTERESTED"] = "Contacts.Interested";
|
|
5383
5386
|
EEvents["CONTACT_UNINTERESTED"] = "Contact.Uninterested";
|
|
5387
|
+
EEvents["CONTACTS_UNINTERESTED"] = "Contacts.Uninterested";
|
|
5384
5388
|
EEvents["SUPPRESSED_EMAIL_EXPORT_CREATED"] = "SuppressedEmail.Export.Created";
|
|
5385
5389
|
EEvents["SUPPRESSED_EMAIL_EXPORT_DOWNLOAD"] = "SuppressedEmail.Export.Download";
|
|
5386
5390
|
EEvents["SUPPRESSED_EMAIL_DELETED"] = "SuppressedEmail.Deleted";
|
|
@@ -10520,6 +10524,48 @@ function listContacts(_a) {
|
|
|
10520
10524
|
useImpersonationTree: useImpersonationTree
|
|
10521
10525
|
});
|
|
10522
10526
|
}
|
|
10527
|
+
function deleteContact(_a) {
|
|
10528
|
+
var contactId = _a.contactId, listId = _a.listId;
|
|
10529
|
+
return callApi({
|
|
10530
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/").concat(contactId),
|
|
10531
|
+
fetchOptions: {
|
|
10532
|
+
method: exports.EMethods.delete
|
|
10533
|
+
}
|
|
10534
|
+
});
|
|
10535
|
+
}
|
|
10536
|
+
function unsubscribeContact(_a) {
|
|
10537
|
+
var contactId = _a.contactId, listId = _a.listId;
|
|
10538
|
+
return callApi({
|
|
10539
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/").concat(contactId, "/unsubscribe"),
|
|
10540
|
+
fetchOptions: {
|
|
10541
|
+
method: exports.EMethods.post
|
|
10542
|
+
}
|
|
10543
|
+
});
|
|
10544
|
+
}
|
|
10545
|
+
function tagContact(_a) {
|
|
10546
|
+
var contactId = _a.contactId, listId = _a.listId, tags = _a.tags;
|
|
10547
|
+
return callApi({
|
|
10548
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/").concat(contactId, "/tag"),
|
|
10549
|
+
fetchOptions: {
|
|
10550
|
+
method: exports.EMethods.post,
|
|
10551
|
+
body: {
|
|
10552
|
+
tags: tags
|
|
10553
|
+
}
|
|
10554
|
+
}
|
|
10555
|
+
});
|
|
10556
|
+
}
|
|
10557
|
+
function untagContact(_a) {
|
|
10558
|
+
var contactId = _a.contactId, listId = _a.listId, tags = _a.tags;
|
|
10559
|
+
return callApi({
|
|
10560
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/").concat(contactId, "/untag"),
|
|
10561
|
+
fetchOptions: {
|
|
10562
|
+
method: exports.EMethods.post,
|
|
10563
|
+
body: {
|
|
10564
|
+
tags: tags
|
|
10565
|
+
}
|
|
10566
|
+
}
|
|
10567
|
+
});
|
|
10568
|
+
}
|
|
10523
10569
|
|
|
10524
10570
|
exports.EEmailLogTypeParam = void 0;
|
|
10525
10571
|
(function (EEmailLogTypeParam) {
|
|
@@ -10859,19 +10905,99 @@ function listListInterests(_a) {
|
|
|
10859
10905
|
},
|
|
10860
10906
|
});
|
|
10861
10907
|
}
|
|
10862
|
-
function
|
|
10908
|
+
function downloadListLogExport(_a) {
|
|
10863
10909
|
var listId = _a.listId, exportId = _a.exportId;
|
|
10864
10910
|
return callApi({
|
|
10865
|
-
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/exports/").concat(exportId, "/download"),
|
|
10911
|
+
url: uiKitConfig.GATEWAY_PROXY + "/logs/lists/".concat(listId, "/exports/").concat(exportId, "/download"),
|
|
10866
10912
|
fetchOptions: {
|
|
10867
10913
|
method: exports.EMethods.get,
|
|
10868
10914
|
},
|
|
10869
10915
|
});
|
|
10870
10916
|
}
|
|
10871
|
-
function
|
|
10917
|
+
function tagsContactsOfList(_a) {
|
|
10918
|
+
var tags = _a.tags, contactIds = _a.contactIds, json = _a.json, listId = _a.listId;
|
|
10919
|
+
return callApi({
|
|
10920
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/tag"),
|
|
10921
|
+
fetchOptions: {
|
|
10922
|
+
method: exports.EMethods.post,
|
|
10923
|
+
body: {
|
|
10924
|
+
tags: tags,
|
|
10925
|
+
contact_ids: contactIds,
|
|
10926
|
+
json: json
|
|
10927
|
+
}
|
|
10928
|
+
},
|
|
10929
|
+
});
|
|
10930
|
+
}
|
|
10931
|
+
function untagContactsOfList(_a) {
|
|
10932
|
+
var tags = _a.tags, contactIds = _a.contactIds, json = _a.json, listId = _a.listId;
|
|
10933
|
+
return callApi({
|
|
10934
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/untag"),
|
|
10935
|
+
fetchOptions: {
|
|
10936
|
+
method: exports.EMethods.post,
|
|
10937
|
+
body: {
|
|
10938
|
+
tags: tags,
|
|
10939
|
+
contact_ids: contactIds,
|
|
10940
|
+
json: json
|
|
10941
|
+
}
|
|
10942
|
+
},
|
|
10943
|
+
});
|
|
10944
|
+
}
|
|
10945
|
+
function addInterestsToContactsOfList(_a) {
|
|
10946
|
+
var interests = _a.interests, contactIds = _a.contactIds, json = _a.json, listId = _a.listId;
|
|
10947
|
+
return callApi({
|
|
10948
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/add-interests"),
|
|
10949
|
+
fetchOptions: {
|
|
10950
|
+
method: exports.EMethods.post,
|
|
10951
|
+
body: {
|
|
10952
|
+
interests: interests,
|
|
10953
|
+
contact_ids: contactIds,
|
|
10954
|
+
json: json
|
|
10955
|
+
}
|
|
10956
|
+
},
|
|
10957
|
+
});
|
|
10958
|
+
}
|
|
10959
|
+
function removeInterestsFromContactsOfList(_a) {
|
|
10960
|
+
var interests = _a.interests, contactIds = _a.contactIds, json = _a.json, listId = _a.listId;
|
|
10961
|
+
return callApi({
|
|
10962
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/remove-interests"),
|
|
10963
|
+
fetchOptions: {
|
|
10964
|
+
method: exports.EMethods.post,
|
|
10965
|
+
body: {
|
|
10966
|
+
interests: interests,
|
|
10967
|
+
contact_ids: contactIds,
|
|
10968
|
+
json: json
|
|
10969
|
+
}
|
|
10970
|
+
},
|
|
10971
|
+
});
|
|
10972
|
+
}
|
|
10973
|
+
function createContactsExport(_a) {
|
|
10974
|
+
var listId = _a.listId, description = _a.description, json = _a.json, segmentId = _a.segmentId, filter = _a.filter;
|
|
10975
|
+
return callApi({
|
|
10976
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/exports"),
|
|
10977
|
+
fetchOptions: {
|
|
10978
|
+
method: exports.EMethods.post,
|
|
10979
|
+
body: {
|
|
10980
|
+
description: description,
|
|
10981
|
+
segment_id: segmentId,
|
|
10982
|
+
filter: filter,
|
|
10983
|
+
json: json
|
|
10984
|
+
}
|
|
10985
|
+
},
|
|
10986
|
+
});
|
|
10987
|
+
}
|
|
10988
|
+
function getContactsExport(_a) {
|
|
10872
10989
|
var listId = _a.listId, exportId = _a.exportId;
|
|
10873
10990
|
return callApi({
|
|
10874
|
-
url: uiKitConfig.GATEWAY_PROXY + "/
|
|
10991
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/exports/").concat(exportId),
|
|
10992
|
+
fetchOptions: {
|
|
10993
|
+
method: exports.EMethods.get,
|
|
10994
|
+
},
|
|
10995
|
+
});
|
|
10996
|
+
}
|
|
10997
|
+
function downloadContactsExport(_a) {
|
|
10998
|
+
var listId = _a.listId, exportId = _a.exportId;
|
|
10999
|
+
return callApi({
|
|
11000
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/exports/").concat(exportId, "/download"),
|
|
10875
11001
|
fetchOptions: {
|
|
10876
11002
|
method: exports.EMethods.get,
|
|
10877
11003
|
},
|
|
@@ -17899,6 +18025,7 @@ var ContactModel = /** @class */ (function () {
|
|
|
17899
18025
|
this.custom_attributes = params.custom_attributes;
|
|
17900
18026
|
this.tags = params.tags;
|
|
17901
18027
|
this.interests = params.interests;
|
|
18028
|
+
this.listId = params.listId;
|
|
17902
18029
|
}
|
|
17903
18030
|
ContactModel.prototype.toJson = function () {
|
|
17904
18031
|
return modelToJson(this);
|
|
@@ -17906,6 +18033,54 @@ var ContactModel = /** @class */ (function () {
|
|
|
17906
18033
|
ContactModel.prototype.set = function (property, value) {
|
|
17907
18034
|
modelSet(this, property, value);
|
|
17908
18035
|
};
|
|
18036
|
+
ContactModel.prototype.delete = function () {
|
|
18037
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
18038
|
+
var _this = this;
|
|
18039
|
+
return __generator(this, function (_a) {
|
|
18040
|
+
return [2 /*return*/, deleteContact({ contactId: this.id, listId: this.listId })
|
|
18041
|
+
.then(function (data) {
|
|
18042
|
+
trackEvent(exports.EEvents.CONTACT_DELETED, { contactId: _this.id, listId: _this.listId });
|
|
18043
|
+
return data;
|
|
18044
|
+
})];
|
|
18045
|
+
});
|
|
18046
|
+
});
|
|
18047
|
+
};
|
|
18048
|
+
ContactModel.prototype.unsubscribe = function () {
|
|
18049
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
18050
|
+
var _this = this;
|
|
18051
|
+
return __generator(this, function (_a) {
|
|
18052
|
+
return [2 /*return*/, unsubscribeContact({ contactId: this.id, listId: this.listId })
|
|
18053
|
+
.then(function (data) {
|
|
18054
|
+
trackEvent(exports.EEvents.CONTACT_UNSUBSCRIBED, { contactId: _this.id, listId: _this.listId });
|
|
18055
|
+
return data;
|
|
18056
|
+
})];
|
|
18057
|
+
});
|
|
18058
|
+
});
|
|
18059
|
+
};
|
|
18060
|
+
ContactModel.prototype.tag = function (tags) {
|
|
18061
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
18062
|
+
var _this = this;
|
|
18063
|
+
return __generator(this, function (_a) {
|
|
18064
|
+
return [2 /*return*/, tagContact({ contactId: this.id, listId: this.listId, tags: tags })
|
|
18065
|
+
.then(function (data) {
|
|
18066
|
+
trackEvent(exports.EEvents.CONTACT_TAGGED, { contactId: _this.id, listId: _this.listId, tags: tags });
|
|
18067
|
+
return data;
|
|
18068
|
+
})];
|
|
18069
|
+
});
|
|
18070
|
+
});
|
|
18071
|
+
};
|
|
18072
|
+
ContactModel.prototype.untag = function (tags) {
|
|
18073
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
18074
|
+
var _this = this;
|
|
18075
|
+
return __generator(this, function (_a) {
|
|
18076
|
+
return [2 /*return*/, untagContact({ contactId: this.id, listId: this.listId, tags: tags })
|
|
18077
|
+
.then(function (data) {
|
|
18078
|
+
trackEvent(exports.EEvents.CONTACT_UNTAGGED, { contactId: _this.id, listId: _this.listId, tags: tags });
|
|
18079
|
+
return data;
|
|
18080
|
+
})];
|
|
18081
|
+
});
|
|
18082
|
+
});
|
|
18083
|
+
};
|
|
17909
18084
|
return ContactModel;
|
|
17910
18085
|
}());
|
|
17911
18086
|
|
|
@@ -17917,7 +18092,7 @@ var ContactsFactory = /** @class */ (function () {
|
|
|
17917
18092
|
var options = __rest(_a, []);
|
|
17918
18093
|
return __generator(this, function (_b) {
|
|
17919
18094
|
return [2 /*return*/, listContacts(options).then(function (data) {
|
|
17920
|
-
data.data = data.data.map(function (contact) { return new ContactModel(contact); });
|
|
18095
|
+
data.data = data.data.map(function (contact) { return new ContactModel(__assign(__assign({}, contact), { listId: options.listId })); });
|
|
17921
18096
|
return data;
|
|
17922
18097
|
})];
|
|
17923
18098
|
});
|
|
@@ -18329,6 +18504,91 @@ var ListModel = /** @class */ (function () {
|
|
|
18329
18504
|
});
|
|
18330
18505
|
});
|
|
18331
18506
|
};
|
|
18507
|
+
ListModel.prototype.tagsContacts = function (_a) {
|
|
18508
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
18509
|
+
var _this = this;
|
|
18510
|
+
var tags = _b.tags, contactIds = _b.contactIds, json = _b.json;
|
|
18511
|
+
return __generator(this, function (_c) {
|
|
18512
|
+
return [2 /*return*/, tagsContactsOfList({ tags: tags, contactIds: contactIds, json: json, listId: this.id })
|
|
18513
|
+
.then(function (data) {
|
|
18514
|
+
trackEvent(exports.EEvents.CONTACTS_TAGGED, { listId: _this.id, tags: tags });
|
|
18515
|
+
return data;
|
|
18516
|
+
})];
|
|
18517
|
+
});
|
|
18518
|
+
});
|
|
18519
|
+
};
|
|
18520
|
+
ListModel.prototype.untagContacts = function (_a) {
|
|
18521
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
18522
|
+
var _this = this;
|
|
18523
|
+
var tags = _b.tags, contactIds = _b.contactIds, json = _b.json;
|
|
18524
|
+
return __generator(this, function (_c) {
|
|
18525
|
+
return [2 /*return*/, untagContactsOfList({ tags: tags, contactIds: contactIds, json: json, listId: this.id })
|
|
18526
|
+
.then(function (data) {
|
|
18527
|
+
trackEvent(exports.EEvents.CONTACTS_UNTAGGED, { listId: _this.id, tags: tags });
|
|
18528
|
+
return data;
|
|
18529
|
+
})];
|
|
18530
|
+
});
|
|
18531
|
+
});
|
|
18532
|
+
};
|
|
18533
|
+
ListModel.prototype.addInterestsToContacts = function (_a) {
|
|
18534
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
18535
|
+
var _this = this;
|
|
18536
|
+
var interests = _b.interests, contactIds = _b.contactIds, json = _b.json;
|
|
18537
|
+
return __generator(this, function (_c) {
|
|
18538
|
+
return [2 /*return*/, addInterestsToContactsOfList({ interests: interests, contactIds: contactIds, json: json, listId: this.id })
|
|
18539
|
+
.then(function (data) {
|
|
18540
|
+
trackEvent(exports.EEvents.CONTACTS_INTERESTED, { listId: _this.id, interests: interests });
|
|
18541
|
+
return data;
|
|
18542
|
+
})];
|
|
18543
|
+
});
|
|
18544
|
+
});
|
|
18545
|
+
};
|
|
18546
|
+
ListModel.prototype.removeInterestsFromContacts = function (_a) {
|
|
18547
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
18548
|
+
var _this = this;
|
|
18549
|
+
var interests = _b.interests, contactIds = _b.contactIds, json = _b.json;
|
|
18550
|
+
return __generator(this, function (_c) {
|
|
18551
|
+
return [2 /*return*/, removeInterestsFromContactsOfList({ interests: interests, contactIds: contactIds, json: json, listId: this.id })
|
|
18552
|
+
.then(function (data) {
|
|
18553
|
+
trackEvent(exports.EEvents.CONTACTS_UNINTERESTED, { listId: _this.id, interests: interests });
|
|
18554
|
+
return data;
|
|
18555
|
+
})];
|
|
18556
|
+
});
|
|
18557
|
+
});
|
|
18558
|
+
};
|
|
18559
|
+
ListModel.prototype.exportContacts = function (_a) {
|
|
18560
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
18561
|
+
var _this = this;
|
|
18562
|
+
var description = _b.description, json = _b.json, segmentId = _b.segmentId, filter = _b.filter;
|
|
18563
|
+
return __generator(this, function (_c) {
|
|
18564
|
+
return [2 /*return*/, createContactsExport({ listId: this.id, description: description, json: json, segmentId: segmentId, filter: filter })
|
|
18565
|
+
.then(function (data) {
|
|
18566
|
+
trackEvent(exports.EEvents.CONTACT_EXPORT, { listId: _this.id });
|
|
18567
|
+
return data;
|
|
18568
|
+
})];
|
|
18569
|
+
});
|
|
18570
|
+
});
|
|
18571
|
+
};
|
|
18572
|
+
ListModel.prototype.getExport = function (_a) {
|
|
18573
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
18574
|
+
var exportId = _b.exportId;
|
|
18575
|
+
return __generator(this, function (_c) {
|
|
18576
|
+
return [2 /*return*/, getContactsExport({ listId: this.id, exportId: exportId })];
|
|
18577
|
+
});
|
|
18578
|
+
});
|
|
18579
|
+
};
|
|
18580
|
+
ListModel.prototype.downloadExport = function (_a) {
|
|
18581
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
18582
|
+
var _this = this;
|
|
18583
|
+
var exportId = _b.exportId;
|
|
18584
|
+
return __generator(this, function (_c) {
|
|
18585
|
+
return [2 /*return*/, downloadContactsExport({ listId: this.id, exportId: exportId }).then(function (data) {
|
|
18586
|
+
trackEvent(exports.EEvents.CONTACT_EXPORT_DOWNLOAD, { listId: _this.id, exportId: exportId });
|
|
18587
|
+
return data;
|
|
18588
|
+
})];
|
|
18589
|
+
});
|
|
18590
|
+
});
|
|
18591
|
+
};
|
|
18332
18592
|
return ListModel;
|
|
18333
18593
|
}());
|
|
18334
18594
|
|
|
@@ -19515,6 +19775,7 @@ exports.Typography = Typography;
|
|
|
19515
19775
|
exports.UserModel = UserModel;
|
|
19516
19776
|
exports.UsersFactory = UsersFactory;
|
|
19517
19777
|
exports.acceptListPolicy = acceptListPolicy;
|
|
19778
|
+
exports.addInterestsToContactsOfList = addInterestsToContactsOfList;
|
|
19518
19779
|
exports.addPartialInformation = addPartialInformation;
|
|
19519
19780
|
exports.addSuppressedEmail = addSuppressedEmail;
|
|
19520
19781
|
exports.addToImpersonificationTree = addToImpersonificationTree;
|
|
@@ -19538,6 +19799,7 @@ exports.createBrand = createBrand;
|
|
|
19538
19799
|
exports.createCampaign = createCampaign;
|
|
19539
19800
|
exports.createCampaignLogsExports = createCampaignLogsExports;
|
|
19540
19801
|
exports.createCampaignsReportsExport = createCampaignsReportsExport;
|
|
19802
|
+
exports.createContactsExport = createContactsExport;
|
|
19541
19803
|
exports.createForm = createForm;
|
|
19542
19804
|
exports.createPage = createPage;
|
|
19543
19805
|
exports.createPopup = createPopup;
|
|
@@ -19549,6 +19811,7 @@ exports.deleteAnyAutomation = deleteAnyAutomation;
|
|
|
19549
19811
|
exports.deleteAutomation = deleteAutomation;
|
|
19550
19812
|
exports.deleteCampaign = deleteCampaign;
|
|
19551
19813
|
exports.deleteCampaignsReportsExport = deleteCampaignsReportsExport;
|
|
19814
|
+
exports.deleteContact = deleteContact;
|
|
19552
19815
|
exports.deleteForm = deleteForm;
|
|
19553
19816
|
exports.deleteList = deleteList;
|
|
19554
19817
|
exports.deletePage = deletePage;
|
|
@@ -19607,6 +19870,7 @@ exports.getCampaignReport = getCampaignReport;
|
|
|
19607
19870
|
exports.getCampaignRevisions = getCampaignRevisions;
|
|
19608
19871
|
exports.getCampaignsReportsExport = getCampaignsReportsExport;
|
|
19609
19872
|
exports.getComparator = getComparator;
|
|
19873
|
+
exports.getContactsExport = getContactsExport;
|
|
19610
19874
|
exports.getCustomerProfile = getCustomerProfile;
|
|
19611
19875
|
exports.getDate = getDate;
|
|
19612
19876
|
exports.getDomainFromEmail = getDomainFromEmail;
|
|
@@ -19682,6 +19946,7 @@ exports.publishPage = publishPage;
|
|
|
19682
19946
|
exports.publishPopup = publishPopup;
|
|
19683
19947
|
exports.reScheduleCampaign = reScheduleCampaign;
|
|
19684
19948
|
exports.removeEmptyProperties = removeEmptyProperties;
|
|
19949
|
+
exports.removeInterestsFromContactsOfList = removeInterestsFromContactsOfList;
|
|
19685
19950
|
exports.removeQueryParams = removeQueryParams;
|
|
19686
19951
|
exports.removeTrailingChar = removeTrailingChar;
|
|
19687
19952
|
exports.renderCampaign = renderCampaign;
|
|
@@ -19707,6 +19972,8 @@ exports.stableSort = stableSort;
|
|
|
19707
19972
|
exports.startPromisePool = startPromisePool;
|
|
19708
19973
|
exports.suspendAccount = suspendAccount;
|
|
19709
19974
|
exports.suspendCampaign = suspendCampaign;
|
|
19975
|
+
exports.tagContact = tagContact;
|
|
19976
|
+
exports.tagsContactsOfList = tagsContactsOfList;
|
|
19710
19977
|
exports.trackEvent = trackEvent;
|
|
19711
19978
|
exports.truncateEmail = truncateEmail;
|
|
19712
19979
|
exports.truncateText = truncateText;
|
|
@@ -19715,6 +19982,9 @@ exports.unArchiveCampaign = unArchiveCampaign;
|
|
|
19715
19982
|
exports.unScheduleCampaign = unScheduleCampaign;
|
|
19716
19983
|
exports.unSuspendAccount = unSuspendAccount;
|
|
19717
19984
|
exports.unshareTemplate = unshareTemplate;
|
|
19985
|
+
exports.unsubscribeContact = unsubscribeContact;
|
|
19986
|
+
exports.untagContact = untagContact;
|
|
19987
|
+
exports.untagContactsOfList = untagContactsOfList;
|
|
19718
19988
|
exports.updateAccount = updateAccount;
|
|
19719
19989
|
exports.updateAndClearUrlParams = updateAndClearUrlParams;
|
|
19720
19990
|
exports.updateAnyAutomation = updateAnyAutomation;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TActionApiResource, TDeleteApiResource, TUnsubscribeApiResource } from "../../types";
|
|
1
2
|
import { TContactCustomAttribute, TContactModel } from "./types";
|
|
2
3
|
export declare class ContactModel {
|
|
3
4
|
readonly id: number;
|
|
@@ -9,8 +10,13 @@ export declare class ContactModel {
|
|
|
9
10
|
custom_attributes: TContactCustomAttribute[];
|
|
10
11
|
tags: string[];
|
|
11
12
|
interests: string[];
|
|
13
|
+
private listId;
|
|
12
14
|
constructor(params: TContactModel);
|
|
13
15
|
toJson(): any;
|
|
14
16
|
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
17
|
+
delete(): Promise<TDeleteApiResource>;
|
|
18
|
+
unsubscribe(): Promise<TUnsubscribeApiResource<TContactModel>>;
|
|
19
|
+
tag(tags: string[]): Promise<TActionApiResource>;
|
|
20
|
+
untag(tags: string[]): Promise<TActionApiResource>;
|
|
15
21
|
}
|
|
16
22
|
export * from "./types";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EApiLanguages, TDeleteApiResource, TGenericListParams, TGenericListReturn } from "../../types";
|
|
1
|
+
import { EApiLanguages, TActionApiResource, TDeleteApiResource, TGenericListParams, TGenericListReturn, TGenericReturn } from "../../types";
|
|
2
|
+
import { TTask, TTaskDownload } from "../tasks";
|
|
2
3
|
import { TListCustomAttribute, TListInterest, TListModel, TListPages, TListRedirections, TListReport, TListSender, TListWebhook } from "./types";
|
|
3
4
|
export declare class ListModel {
|
|
4
5
|
readonly id: number;
|
|
@@ -24,5 +25,37 @@ export declare class ListModel {
|
|
|
24
25
|
getAttributes(options?: TGenericListParams): Promise<TGenericListReturn<TListCustomAttribute>>;
|
|
25
26
|
getInterests(options?: TGenericListParams): Promise<TGenericListReturn<TListInterest>>;
|
|
26
27
|
getReport(): Promise<TListReport>;
|
|
28
|
+
tagsContacts({ tags, contactIds, json }: {
|
|
29
|
+
tags: string[];
|
|
30
|
+
contactIds?: number[];
|
|
31
|
+
json?: boolean;
|
|
32
|
+
}): Promise<TActionApiResource>;
|
|
33
|
+
untagContacts({ tags, contactIds, json }: {
|
|
34
|
+
tags: string[];
|
|
35
|
+
contactIds?: number[];
|
|
36
|
+
json?: boolean;
|
|
37
|
+
}): Promise<TActionApiResource>;
|
|
38
|
+
addInterestsToContacts({ interests, contactIds, json }: {
|
|
39
|
+
interests: string[];
|
|
40
|
+
contactIds?: number[];
|
|
41
|
+
json?: boolean;
|
|
42
|
+
}): Promise<TActionApiResource>;
|
|
43
|
+
removeInterestsFromContacts({ interests, contactIds, json }: {
|
|
44
|
+
interests: string[];
|
|
45
|
+
contactIds?: number[];
|
|
46
|
+
json?: boolean;
|
|
47
|
+
}): Promise<TActionApiResource>;
|
|
48
|
+
exportContacts({ description, json, segmentId, filter }: {
|
|
49
|
+
description?: string;
|
|
50
|
+
json?: boolean;
|
|
51
|
+
segmentId?: number;
|
|
52
|
+
filter?: string;
|
|
53
|
+
}): Promise<TGenericReturn<TTask>>;
|
|
54
|
+
getExport({ exportId }: {
|
|
55
|
+
exportId: string;
|
|
56
|
+
}): Promise<TGenericReturn<TTask>>;
|
|
57
|
+
downloadExport({ exportId }: {
|
|
58
|
+
exportId: string;
|
|
59
|
+
}): Promise<TGenericReturn<TTaskDownload>>;
|
|
27
60
|
}
|
|
28
61
|
export * from "./types";
|
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
import { TListContacts } from "./types";
|
|
2
2
|
export declare function listContacts({ listId, useImpersonationTree, ...options }: TListContacts): Promise<any>;
|
|
3
|
+
export declare function deleteContact({ contactId, listId }: {
|
|
4
|
+
contactId: number;
|
|
5
|
+
listId: number;
|
|
6
|
+
}): Promise<any>;
|
|
7
|
+
export declare function unsubscribeContact({ contactId, listId }: {
|
|
8
|
+
contactId: number;
|
|
9
|
+
listId: number;
|
|
10
|
+
}): Promise<any>;
|
|
11
|
+
export declare function tagContact({ contactId, listId, tags }: {
|
|
12
|
+
contactId: number;
|
|
13
|
+
listId: number;
|
|
14
|
+
tags: string[];
|
|
15
|
+
}): Promise<any>;
|
|
16
|
+
export declare function untagContact({ contactId, listId, tags }: {
|
|
17
|
+
contactId: number;
|
|
18
|
+
listId: number;
|
|
19
|
+
tags: string[];
|
|
20
|
+
}): Promise<any>;
|
|
3
21
|
export * from "./types";
|
|
@@ -27,11 +27,46 @@ export declare function listListAttributes({ id, ...options }: TGenericListParam
|
|
|
27
27
|
export declare function listListInterests({ id, ...options }: TGenericListParams & {
|
|
28
28
|
id: number;
|
|
29
29
|
}): Promise<any>;
|
|
30
|
-
export declare function
|
|
30
|
+
export declare function downloadListLogExport({ listId, exportId }: {
|
|
31
31
|
listId: number;
|
|
32
32
|
exportId: string;
|
|
33
33
|
}): Promise<any>;
|
|
34
|
-
export declare function
|
|
34
|
+
export declare function tagsContactsOfList({ tags, contactIds, json, listId }: {
|
|
35
|
+
tags: string[];
|
|
36
|
+
contactIds?: number[];
|
|
37
|
+
json?: boolean;
|
|
38
|
+
listId: number;
|
|
39
|
+
}): Promise<any>;
|
|
40
|
+
export declare function untagContactsOfList({ tags, contactIds, json, listId }: {
|
|
41
|
+
tags: string[];
|
|
42
|
+
contactIds?: number[];
|
|
43
|
+
json?: boolean;
|
|
44
|
+
listId: number;
|
|
45
|
+
}): Promise<any>;
|
|
46
|
+
export declare function addInterestsToContactsOfList({ interests, contactIds, json, listId }: {
|
|
47
|
+
interests: string[];
|
|
48
|
+
contactIds?: number[];
|
|
49
|
+
json?: boolean;
|
|
50
|
+
listId: number;
|
|
51
|
+
}): Promise<any>;
|
|
52
|
+
export declare function removeInterestsFromContactsOfList({ interests, contactIds, json, listId }: {
|
|
53
|
+
interests: string[];
|
|
54
|
+
contactIds?: number[];
|
|
55
|
+
json?: boolean;
|
|
56
|
+
listId: number;
|
|
57
|
+
}): Promise<any>;
|
|
58
|
+
export declare function createContactsExport({ listId, description, json, segmentId, filter }: {
|
|
59
|
+
listId: number;
|
|
60
|
+
description?: string;
|
|
61
|
+
json?: boolean;
|
|
62
|
+
segmentId?: number;
|
|
63
|
+
filter?: string;
|
|
64
|
+
}): Promise<any>;
|
|
65
|
+
export declare function getContactsExport({ listId, exportId }: {
|
|
66
|
+
listId: number;
|
|
67
|
+
exportId: string;
|
|
68
|
+
}): Promise<any>;
|
|
69
|
+
export declare function downloadContactsExport({ listId, exportId }: {
|
|
35
70
|
listId: number;
|
|
36
71
|
exportId: string;
|
|
37
72
|
}): Promise<any>;
|
|
@@ -112,6 +112,11 @@ export type TCreateApiResource<T> = {
|
|
|
112
112
|
object: string;
|
|
113
113
|
data: T;
|
|
114
114
|
};
|
|
115
|
+
export type TUnsubscribeApiResource<T> = {
|
|
116
|
+
subscribed: boolean;
|
|
117
|
+
object: string;
|
|
118
|
+
data: T;
|
|
119
|
+
};
|
|
115
120
|
export type TRenderResponse = {
|
|
116
121
|
data: string;
|
|
117
122
|
};
|
|
@@ -66,9 +66,13 @@ export declare enum EEvents {
|
|
|
66
66
|
CONTACT_EXPORT = "Contact.Export",
|
|
67
67
|
CONTACT_EXPORT_DOWNLOAD = "Contact.Export.Download",
|
|
68
68
|
CONTACT_TAGGED = "Contact.Tagged",
|
|
69
|
+
CONTACTS_TAGGED = "Contacts.Tagged",
|
|
69
70
|
CONTACT_UNTAGGED = "Contact.Untagged",
|
|
71
|
+
CONTACTS_UNTAGGED = "Contacts.Untagged",
|
|
70
72
|
CONTACT_INTERESTED = "Contact.Interested",
|
|
73
|
+
CONTACTS_INTERESTED = "Contacts.Interested",
|
|
71
74
|
CONTACT_UNINTERESTED = "Contact.Uninterested",
|
|
75
|
+
CONTACTS_UNINTERESTED = "Contacts.Uninterested",
|
|
72
76
|
SUPPRESSED_EMAIL_EXPORT_CREATED = "SuppressedEmail.Export.Created",
|
|
73
77
|
SUPPRESSED_EMAIL_EXPORT_DOWNLOAD = "SuppressedEmail.Export.Download",
|
|
74
78
|
SUPPRESSED_EMAIL_DELETED = "SuppressedEmail.Deleted",
|
package/dist/esm/index.js
CHANGED
|
@@ -5358,9 +5358,13 @@ var EEvents;
|
|
|
5358
5358
|
EEvents["CONTACT_EXPORT"] = "Contact.Export";
|
|
5359
5359
|
EEvents["CONTACT_EXPORT_DOWNLOAD"] = "Contact.Export.Download";
|
|
5360
5360
|
EEvents["CONTACT_TAGGED"] = "Contact.Tagged";
|
|
5361
|
+
EEvents["CONTACTS_TAGGED"] = "Contacts.Tagged";
|
|
5361
5362
|
EEvents["CONTACT_UNTAGGED"] = "Contact.Untagged";
|
|
5363
|
+
EEvents["CONTACTS_UNTAGGED"] = "Contacts.Untagged";
|
|
5362
5364
|
EEvents["CONTACT_INTERESTED"] = "Contact.Interested";
|
|
5365
|
+
EEvents["CONTACTS_INTERESTED"] = "Contacts.Interested";
|
|
5363
5366
|
EEvents["CONTACT_UNINTERESTED"] = "Contact.Uninterested";
|
|
5367
|
+
EEvents["CONTACTS_UNINTERESTED"] = "Contacts.Uninterested";
|
|
5364
5368
|
EEvents["SUPPRESSED_EMAIL_EXPORT_CREATED"] = "SuppressedEmail.Export.Created";
|
|
5365
5369
|
EEvents["SUPPRESSED_EMAIL_EXPORT_DOWNLOAD"] = "SuppressedEmail.Export.Download";
|
|
5366
5370
|
EEvents["SUPPRESSED_EMAIL_DELETED"] = "SuppressedEmail.Deleted";
|
|
@@ -10500,6 +10504,48 @@ function listContacts(_a) {
|
|
|
10500
10504
|
useImpersonationTree: useImpersonationTree
|
|
10501
10505
|
});
|
|
10502
10506
|
}
|
|
10507
|
+
function deleteContact(_a) {
|
|
10508
|
+
var contactId = _a.contactId, listId = _a.listId;
|
|
10509
|
+
return callApi({
|
|
10510
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/").concat(contactId),
|
|
10511
|
+
fetchOptions: {
|
|
10512
|
+
method: EMethods.delete
|
|
10513
|
+
}
|
|
10514
|
+
});
|
|
10515
|
+
}
|
|
10516
|
+
function unsubscribeContact(_a) {
|
|
10517
|
+
var contactId = _a.contactId, listId = _a.listId;
|
|
10518
|
+
return callApi({
|
|
10519
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/").concat(contactId, "/unsubscribe"),
|
|
10520
|
+
fetchOptions: {
|
|
10521
|
+
method: EMethods.post
|
|
10522
|
+
}
|
|
10523
|
+
});
|
|
10524
|
+
}
|
|
10525
|
+
function tagContact(_a) {
|
|
10526
|
+
var contactId = _a.contactId, listId = _a.listId, tags = _a.tags;
|
|
10527
|
+
return callApi({
|
|
10528
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/").concat(contactId, "/tag"),
|
|
10529
|
+
fetchOptions: {
|
|
10530
|
+
method: EMethods.post,
|
|
10531
|
+
body: {
|
|
10532
|
+
tags: tags
|
|
10533
|
+
}
|
|
10534
|
+
}
|
|
10535
|
+
});
|
|
10536
|
+
}
|
|
10537
|
+
function untagContact(_a) {
|
|
10538
|
+
var contactId = _a.contactId, listId = _a.listId, tags = _a.tags;
|
|
10539
|
+
return callApi({
|
|
10540
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/").concat(contactId, "/untag"),
|
|
10541
|
+
fetchOptions: {
|
|
10542
|
+
method: EMethods.post,
|
|
10543
|
+
body: {
|
|
10544
|
+
tags: tags
|
|
10545
|
+
}
|
|
10546
|
+
}
|
|
10547
|
+
});
|
|
10548
|
+
}
|
|
10503
10549
|
|
|
10504
10550
|
var EEmailLogTypeParam;
|
|
10505
10551
|
(function (EEmailLogTypeParam) {
|
|
@@ -10839,19 +10885,99 @@ function listListInterests(_a) {
|
|
|
10839
10885
|
},
|
|
10840
10886
|
});
|
|
10841
10887
|
}
|
|
10842
|
-
function
|
|
10888
|
+
function downloadListLogExport(_a) {
|
|
10843
10889
|
var listId = _a.listId, exportId = _a.exportId;
|
|
10844
10890
|
return callApi({
|
|
10845
|
-
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/exports/").concat(exportId, "/download"),
|
|
10891
|
+
url: uiKitConfig.GATEWAY_PROXY + "/logs/lists/".concat(listId, "/exports/").concat(exportId, "/download"),
|
|
10846
10892
|
fetchOptions: {
|
|
10847
10893
|
method: EMethods.get,
|
|
10848
10894
|
},
|
|
10849
10895
|
});
|
|
10850
10896
|
}
|
|
10851
|
-
function
|
|
10897
|
+
function tagsContactsOfList(_a) {
|
|
10898
|
+
var tags = _a.tags, contactIds = _a.contactIds, json = _a.json, listId = _a.listId;
|
|
10899
|
+
return callApi({
|
|
10900
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/tag"),
|
|
10901
|
+
fetchOptions: {
|
|
10902
|
+
method: EMethods.post,
|
|
10903
|
+
body: {
|
|
10904
|
+
tags: tags,
|
|
10905
|
+
contact_ids: contactIds,
|
|
10906
|
+
json: json
|
|
10907
|
+
}
|
|
10908
|
+
},
|
|
10909
|
+
});
|
|
10910
|
+
}
|
|
10911
|
+
function untagContactsOfList(_a) {
|
|
10912
|
+
var tags = _a.tags, contactIds = _a.contactIds, json = _a.json, listId = _a.listId;
|
|
10913
|
+
return callApi({
|
|
10914
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/untag"),
|
|
10915
|
+
fetchOptions: {
|
|
10916
|
+
method: EMethods.post,
|
|
10917
|
+
body: {
|
|
10918
|
+
tags: tags,
|
|
10919
|
+
contact_ids: contactIds,
|
|
10920
|
+
json: json
|
|
10921
|
+
}
|
|
10922
|
+
},
|
|
10923
|
+
});
|
|
10924
|
+
}
|
|
10925
|
+
function addInterestsToContactsOfList(_a) {
|
|
10926
|
+
var interests = _a.interests, contactIds = _a.contactIds, json = _a.json, listId = _a.listId;
|
|
10927
|
+
return callApi({
|
|
10928
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/add-interests"),
|
|
10929
|
+
fetchOptions: {
|
|
10930
|
+
method: EMethods.post,
|
|
10931
|
+
body: {
|
|
10932
|
+
interests: interests,
|
|
10933
|
+
contact_ids: contactIds,
|
|
10934
|
+
json: json
|
|
10935
|
+
}
|
|
10936
|
+
},
|
|
10937
|
+
});
|
|
10938
|
+
}
|
|
10939
|
+
function removeInterestsFromContactsOfList(_a) {
|
|
10940
|
+
var interests = _a.interests, contactIds = _a.contactIds, json = _a.json, listId = _a.listId;
|
|
10941
|
+
return callApi({
|
|
10942
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/contacts/remove-interests"),
|
|
10943
|
+
fetchOptions: {
|
|
10944
|
+
method: EMethods.post,
|
|
10945
|
+
body: {
|
|
10946
|
+
interests: interests,
|
|
10947
|
+
contact_ids: contactIds,
|
|
10948
|
+
json: json
|
|
10949
|
+
}
|
|
10950
|
+
},
|
|
10951
|
+
});
|
|
10952
|
+
}
|
|
10953
|
+
function createContactsExport(_a) {
|
|
10954
|
+
var listId = _a.listId, description = _a.description, json = _a.json, segmentId = _a.segmentId, filter = _a.filter;
|
|
10955
|
+
return callApi({
|
|
10956
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/exports"),
|
|
10957
|
+
fetchOptions: {
|
|
10958
|
+
method: EMethods.post,
|
|
10959
|
+
body: {
|
|
10960
|
+
description: description,
|
|
10961
|
+
segment_id: segmentId,
|
|
10962
|
+
filter: filter,
|
|
10963
|
+
json: json
|
|
10964
|
+
}
|
|
10965
|
+
},
|
|
10966
|
+
});
|
|
10967
|
+
}
|
|
10968
|
+
function getContactsExport(_a) {
|
|
10852
10969
|
var listId = _a.listId, exportId = _a.exportId;
|
|
10853
10970
|
return callApi({
|
|
10854
|
-
url: uiKitConfig.GATEWAY_PROXY + "/
|
|
10971
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/exports/").concat(exportId),
|
|
10972
|
+
fetchOptions: {
|
|
10973
|
+
method: EMethods.get,
|
|
10974
|
+
},
|
|
10975
|
+
});
|
|
10976
|
+
}
|
|
10977
|
+
function downloadContactsExport(_a) {
|
|
10978
|
+
var listId = _a.listId, exportId = _a.exportId;
|
|
10979
|
+
return callApi({
|
|
10980
|
+
url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/exports/").concat(exportId, "/download"),
|
|
10855
10981
|
fetchOptions: {
|
|
10856
10982
|
method: EMethods.get,
|
|
10857
10983
|
},
|
|
@@ -17879,6 +18005,7 @@ var ContactModel = /** @class */ (function () {
|
|
|
17879
18005
|
this.custom_attributes = params.custom_attributes;
|
|
17880
18006
|
this.tags = params.tags;
|
|
17881
18007
|
this.interests = params.interests;
|
|
18008
|
+
this.listId = params.listId;
|
|
17882
18009
|
}
|
|
17883
18010
|
ContactModel.prototype.toJson = function () {
|
|
17884
18011
|
return modelToJson(this);
|
|
@@ -17886,6 +18013,54 @@ var ContactModel = /** @class */ (function () {
|
|
|
17886
18013
|
ContactModel.prototype.set = function (property, value) {
|
|
17887
18014
|
modelSet(this, property, value);
|
|
17888
18015
|
};
|
|
18016
|
+
ContactModel.prototype.delete = function () {
|
|
18017
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
18018
|
+
var _this = this;
|
|
18019
|
+
return __generator(this, function (_a) {
|
|
18020
|
+
return [2 /*return*/, deleteContact({ contactId: this.id, listId: this.listId })
|
|
18021
|
+
.then(function (data) {
|
|
18022
|
+
trackEvent(EEvents.CONTACT_DELETED, { contactId: _this.id, listId: _this.listId });
|
|
18023
|
+
return data;
|
|
18024
|
+
})];
|
|
18025
|
+
});
|
|
18026
|
+
});
|
|
18027
|
+
};
|
|
18028
|
+
ContactModel.prototype.unsubscribe = function () {
|
|
18029
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
18030
|
+
var _this = this;
|
|
18031
|
+
return __generator(this, function (_a) {
|
|
18032
|
+
return [2 /*return*/, unsubscribeContact({ contactId: this.id, listId: this.listId })
|
|
18033
|
+
.then(function (data) {
|
|
18034
|
+
trackEvent(EEvents.CONTACT_UNSUBSCRIBED, { contactId: _this.id, listId: _this.listId });
|
|
18035
|
+
return data;
|
|
18036
|
+
})];
|
|
18037
|
+
});
|
|
18038
|
+
});
|
|
18039
|
+
};
|
|
18040
|
+
ContactModel.prototype.tag = function (tags) {
|
|
18041
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
18042
|
+
var _this = this;
|
|
18043
|
+
return __generator(this, function (_a) {
|
|
18044
|
+
return [2 /*return*/, tagContact({ contactId: this.id, listId: this.listId, tags: tags })
|
|
18045
|
+
.then(function (data) {
|
|
18046
|
+
trackEvent(EEvents.CONTACT_TAGGED, { contactId: _this.id, listId: _this.listId, tags: tags });
|
|
18047
|
+
return data;
|
|
18048
|
+
})];
|
|
18049
|
+
});
|
|
18050
|
+
});
|
|
18051
|
+
};
|
|
18052
|
+
ContactModel.prototype.untag = function (tags) {
|
|
18053
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
18054
|
+
var _this = this;
|
|
18055
|
+
return __generator(this, function (_a) {
|
|
18056
|
+
return [2 /*return*/, untagContact({ contactId: this.id, listId: this.listId, tags: tags })
|
|
18057
|
+
.then(function (data) {
|
|
18058
|
+
trackEvent(EEvents.CONTACT_UNTAGGED, { contactId: _this.id, listId: _this.listId, tags: tags });
|
|
18059
|
+
return data;
|
|
18060
|
+
})];
|
|
18061
|
+
});
|
|
18062
|
+
});
|
|
18063
|
+
};
|
|
17889
18064
|
return ContactModel;
|
|
17890
18065
|
}());
|
|
17891
18066
|
|
|
@@ -17897,7 +18072,7 @@ var ContactsFactory = /** @class */ (function () {
|
|
|
17897
18072
|
var options = __rest(_a, []);
|
|
17898
18073
|
return __generator(this, function (_b) {
|
|
17899
18074
|
return [2 /*return*/, listContacts(options).then(function (data) {
|
|
17900
|
-
data.data = data.data.map(function (contact) { return new ContactModel(contact); });
|
|
18075
|
+
data.data = data.data.map(function (contact) { return new ContactModel(__assign(__assign({}, contact), { listId: options.listId })); });
|
|
17901
18076
|
return data;
|
|
17902
18077
|
})];
|
|
17903
18078
|
});
|
|
@@ -18309,6 +18484,91 @@ var ListModel = /** @class */ (function () {
|
|
|
18309
18484
|
});
|
|
18310
18485
|
});
|
|
18311
18486
|
};
|
|
18487
|
+
ListModel.prototype.tagsContacts = function (_a) {
|
|
18488
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
18489
|
+
var _this = this;
|
|
18490
|
+
var tags = _b.tags, contactIds = _b.contactIds, json = _b.json;
|
|
18491
|
+
return __generator(this, function (_c) {
|
|
18492
|
+
return [2 /*return*/, tagsContactsOfList({ tags: tags, contactIds: contactIds, json: json, listId: this.id })
|
|
18493
|
+
.then(function (data) {
|
|
18494
|
+
trackEvent(EEvents.CONTACTS_TAGGED, { listId: _this.id, tags: tags });
|
|
18495
|
+
return data;
|
|
18496
|
+
})];
|
|
18497
|
+
});
|
|
18498
|
+
});
|
|
18499
|
+
};
|
|
18500
|
+
ListModel.prototype.untagContacts = function (_a) {
|
|
18501
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
18502
|
+
var _this = this;
|
|
18503
|
+
var tags = _b.tags, contactIds = _b.contactIds, json = _b.json;
|
|
18504
|
+
return __generator(this, function (_c) {
|
|
18505
|
+
return [2 /*return*/, untagContactsOfList({ tags: tags, contactIds: contactIds, json: json, listId: this.id })
|
|
18506
|
+
.then(function (data) {
|
|
18507
|
+
trackEvent(EEvents.CONTACTS_UNTAGGED, { listId: _this.id, tags: tags });
|
|
18508
|
+
return data;
|
|
18509
|
+
})];
|
|
18510
|
+
});
|
|
18511
|
+
});
|
|
18512
|
+
};
|
|
18513
|
+
ListModel.prototype.addInterestsToContacts = function (_a) {
|
|
18514
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
18515
|
+
var _this = this;
|
|
18516
|
+
var interests = _b.interests, contactIds = _b.contactIds, json = _b.json;
|
|
18517
|
+
return __generator(this, function (_c) {
|
|
18518
|
+
return [2 /*return*/, addInterestsToContactsOfList({ interests: interests, contactIds: contactIds, json: json, listId: this.id })
|
|
18519
|
+
.then(function (data) {
|
|
18520
|
+
trackEvent(EEvents.CONTACTS_INTERESTED, { listId: _this.id, interests: interests });
|
|
18521
|
+
return data;
|
|
18522
|
+
})];
|
|
18523
|
+
});
|
|
18524
|
+
});
|
|
18525
|
+
};
|
|
18526
|
+
ListModel.prototype.removeInterestsFromContacts = function (_a) {
|
|
18527
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
18528
|
+
var _this = this;
|
|
18529
|
+
var interests = _b.interests, contactIds = _b.contactIds, json = _b.json;
|
|
18530
|
+
return __generator(this, function (_c) {
|
|
18531
|
+
return [2 /*return*/, removeInterestsFromContactsOfList({ interests: interests, contactIds: contactIds, json: json, listId: this.id })
|
|
18532
|
+
.then(function (data) {
|
|
18533
|
+
trackEvent(EEvents.CONTACTS_UNINTERESTED, { listId: _this.id, interests: interests });
|
|
18534
|
+
return data;
|
|
18535
|
+
})];
|
|
18536
|
+
});
|
|
18537
|
+
});
|
|
18538
|
+
};
|
|
18539
|
+
ListModel.prototype.exportContacts = function (_a) {
|
|
18540
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
18541
|
+
var _this = this;
|
|
18542
|
+
var description = _b.description, json = _b.json, segmentId = _b.segmentId, filter = _b.filter;
|
|
18543
|
+
return __generator(this, function (_c) {
|
|
18544
|
+
return [2 /*return*/, createContactsExport({ listId: this.id, description: description, json: json, segmentId: segmentId, filter: filter })
|
|
18545
|
+
.then(function (data) {
|
|
18546
|
+
trackEvent(EEvents.CONTACT_EXPORT, { listId: _this.id });
|
|
18547
|
+
return data;
|
|
18548
|
+
})];
|
|
18549
|
+
});
|
|
18550
|
+
});
|
|
18551
|
+
};
|
|
18552
|
+
ListModel.prototype.getExport = function (_a) {
|
|
18553
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
18554
|
+
var exportId = _b.exportId;
|
|
18555
|
+
return __generator(this, function (_c) {
|
|
18556
|
+
return [2 /*return*/, getContactsExport({ listId: this.id, exportId: exportId })];
|
|
18557
|
+
});
|
|
18558
|
+
});
|
|
18559
|
+
};
|
|
18560
|
+
ListModel.prototype.downloadExport = function (_a) {
|
|
18561
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
18562
|
+
var _this = this;
|
|
18563
|
+
var exportId = _b.exportId;
|
|
18564
|
+
return __generator(this, function (_c) {
|
|
18565
|
+
return [2 /*return*/, downloadContactsExport({ listId: this.id, exportId: exportId }).then(function (data) {
|
|
18566
|
+
trackEvent(EEvents.CONTACT_EXPORT_DOWNLOAD, { listId: _this.id, exportId: exportId });
|
|
18567
|
+
return data;
|
|
18568
|
+
})];
|
|
18569
|
+
});
|
|
18570
|
+
});
|
|
18571
|
+
};
|
|
18312
18572
|
return ListModel;
|
|
18313
18573
|
}());
|
|
18314
18574
|
|
|
@@ -19383,4 +19643,4 @@ var UsersFactory = /** @class */ (function () {
|
|
|
19383
19643
|
return UsersFactory;
|
|
19384
19644
|
}());
|
|
19385
19645
|
|
|
19386
|
-
export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationModel, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CountryDropdown, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, EAssetManagerMatchType, ECampaignStatuses, EEMailSummaryStatuses, EEditorType, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailStatuses, EEmailSummaryEngagement, EEvents, EListAttributeType, EMethods, EOperatorTypes, EPageBranding, EPartialInfoPool, EPopupBranding, EPopupBrowserType, EPopupCloseButtonPosition, EPopupDeviceType, EPopupDisplayFrequency, EPopupPosition, EPopupTriggerType, EStorageType, ETaskType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListPageModel, ListPopupModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, Overlay, OverlayHandler, OverlayHeading, PageModel, PagesFactory, PhoneTextField, PopupModel, PopupsFactory, Radio, ResourceEdit, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SummaryEnhancedFormModel, SupportFactory, SuppressedEmailsFactory, SystemEmailsFactory, SystemEmailsModel, TagsFactory, TasksFactory, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopMenu, Typography, UserModel, UsersFactory, acceptListPolicy, addPartialInformation, addSuppressedEmail, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, connectToZendeskSupportService, copyToClipboard, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createForm, createPage, createPopup, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteAccount, deleteAnyAutomation, deleteAutomation, deleteCampaign, deleteCampaignsReportsExport, deleteForm, deleteList, deletePage, deletePartialInformation, deletePopup, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteUser, deleteWorkflow, descendingComparator, disableForm, disablePage, disablePopup, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enablePage, enablePopup, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountReport, getAdjustedBillingCycle, getAllAutomationStats, getAutomation, getAutomationEmailContent, getAutomationExecutionsCount, getAutomationStats, getBeeTokenService, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getComparator, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPage, getPopup, getPropertyValue, getSender, getStartOfDate, getStorage, getSuppressedEmailExport, getTColor, getTaskService, getTemplate, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listAutomations, listCampaigns, listCampaignsReportsExports, listContacts, listEmailLogs, listForms, listList, listListAttributes, listListInterests, listPages, listPopups, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, listWorkflows, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchForm, popImpersonificationTree, postMessage, publishForm, publishPage, publishPopup, reScheduleCampaign, removeEmptyProperties, removeQueryParams, removeTrailingChar, renderCampaign, renderEmail, renderForm, renderPage, renderPopup, renderPublicHtmlForm, renderTemplate, requestSupportService, resendVerificationEmail, resumeCampaign, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendAccount, suspendCampaign, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unSuspendAccount, unshareTemplate, updateAccount, updateAndClearUrlParams, updateAnyAutomation, updateAutomation, updateCampaign, updatePage, updatePopup, updateSystemEmails, updateTemplate, updateUser, updateWorkflow, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
|
|
19646
|
+
export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationModel, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CountryDropdown, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, EAssetManagerMatchType, ECampaignStatuses, EEMailSummaryStatuses, EEditorType, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailStatuses, EEmailSummaryEngagement, EEvents, EListAttributeType, EMethods, EOperatorTypes, EPageBranding, EPartialInfoPool, EPopupBranding, EPopupBrowserType, EPopupCloseButtonPosition, EPopupDeviceType, EPopupDisplayFrequency, EPopupPosition, EPopupTriggerType, EStorageType, ETaskType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListPageModel, ListPopupModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, Overlay, OverlayHandler, OverlayHeading, PageModel, PagesFactory, PhoneTextField, PopupModel, PopupsFactory, Radio, ResourceEdit, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SummaryEnhancedFormModel, SupportFactory, SuppressedEmailsFactory, SystemEmailsFactory, SystemEmailsModel, TagsFactory, TasksFactory, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopMenu, Typography, UserModel, UsersFactory, acceptListPolicy, addInterestsToContactsOfList, addPartialInformation, addSuppressedEmail, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, connectToZendeskSupportService, copyToClipboard, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createContactsExport, createForm, createPage, createPopup, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteAccount, deleteAnyAutomation, deleteAutomation, deleteCampaign, deleteCampaignsReportsExport, deleteContact, deleteForm, deleteList, deletePage, deletePartialInformation, deletePopup, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteUser, deleteWorkflow, descendingComparator, disableForm, disablePage, disablePopup, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enablePage, enablePopup, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountReport, getAdjustedBillingCycle, getAllAutomationStats, getAutomation, getAutomationEmailContent, getAutomationExecutionsCount, getAutomationStats, getBeeTokenService, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getComparator, getContactsExport, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPage, getPopup, getPropertyValue, getSender, getStartOfDate, getStorage, getSuppressedEmailExport, getTColor, getTaskService, getTemplate, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listAutomations, listCampaigns, listCampaignsReportsExports, listContacts, listEmailLogs, listForms, listList, listListAttributes, listListInterests, listPages, listPopups, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, listWorkflows, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchForm, popImpersonificationTree, postMessage, publishForm, publishPage, publishPopup, reScheduleCampaign, removeEmptyProperties, removeInterestsFromContactsOfList, removeQueryParams, removeTrailingChar, renderCampaign, renderEmail, renderForm, renderPage, renderPopup, renderPublicHtmlForm, renderTemplate, requestSupportService, resendVerificationEmail, resumeCampaign, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendAccount, suspendCampaign, tagContact, tagsContactsOfList, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unSuspendAccount, unshareTemplate, unsubscribeContact, untagContact, untagContactsOfList, updateAccount, updateAndClearUrlParams, updateAnyAutomation, updateAutomation, updateCampaign, updatePage, updatePopup, updateSystemEmails, updateTemplate, updateUser, updateWorkflow, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TActionApiResource, TDeleteApiResource, TUnsubscribeApiResource } from "../../types";
|
|
1
2
|
import { TContactCustomAttribute, TContactModel } from "./types";
|
|
2
3
|
export declare class ContactModel {
|
|
3
4
|
readonly id: number;
|
|
@@ -9,8 +10,13 @@ export declare class ContactModel {
|
|
|
9
10
|
custom_attributes: TContactCustomAttribute[];
|
|
10
11
|
tags: string[];
|
|
11
12
|
interests: string[];
|
|
13
|
+
private listId;
|
|
12
14
|
constructor(params: TContactModel);
|
|
13
15
|
toJson(): any;
|
|
14
16
|
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
17
|
+
delete(): Promise<TDeleteApiResource>;
|
|
18
|
+
unsubscribe(): Promise<TUnsubscribeApiResource<TContactModel>>;
|
|
19
|
+
tag(tags: string[]): Promise<TActionApiResource>;
|
|
20
|
+
untag(tags: string[]): Promise<TActionApiResource>;
|
|
15
21
|
}
|
|
16
22
|
export * from "./types";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EApiLanguages, TDeleteApiResource, TGenericListParams, TGenericListReturn } from "../../types";
|
|
1
|
+
import { EApiLanguages, TActionApiResource, TDeleteApiResource, TGenericListParams, TGenericListReturn, TGenericReturn } from "../../types";
|
|
2
|
+
import { TTask, TTaskDownload } from "../tasks";
|
|
2
3
|
import { TListCustomAttribute, TListInterest, TListModel, TListPages, TListRedirections, TListReport, TListSender, TListWebhook } from "./types";
|
|
3
4
|
export declare class ListModel {
|
|
4
5
|
readonly id: number;
|
|
@@ -24,5 +25,37 @@ export declare class ListModel {
|
|
|
24
25
|
getAttributes(options?: TGenericListParams): Promise<TGenericListReturn<TListCustomAttribute>>;
|
|
25
26
|
getInterests(options?: TGenericListParams): Promise<TGenericListReturn<TListInterest>>;
|
|
26
27
|
getReport(): Promise<TListReport>;
|
|
28
|
+
tagsContacts({ tags, contactIds, json }: {
|
|
29
|
+
tags: string[];
|
|
30
|
+
contactIds?: number[];
|
|
31
|
+
json?: boolean;
|
|
32
|
+
}): Promise<TActionApiResource>;
|
|
33
|
+
untagContacts({ tags, contactIds, json }: {
|
|
34
|
+
tags: string[];
|
|
35
|
+
contactIds?: number[];
|
|
36
|
+
json?: boolean;
|
|
37
|
+
}): Promise<TActionApiResource>;
|
|
38
|
+
addInterestsToContacts({ interests, contactIds, json }: {
|
|
39
|
+
interests: string[];
|
|
40
|
+
contactIds?: number[];
|
|
41
|
+
json?: boolean;
|
|
42
|
+
}): Promise<TActionApiResource>;
|
|
43
|
+
removeInterestsFromContacts({ interests, contactIds, json }: {
|
|
44
|
+
interests: string[];
|
|
45
|
+
contactIds?: number[];
|
|
46
|
+
json?: boolean;
|
|
47
|
+
}): Promise<TActionApiResource>;
|
|
48
|
+
exportContacts({ description, json, segmentId, filter }: {
|
|
49
|
+
description?: string;
|
|
50
|
+
json?: boolean;
|
|
51
|
+
segmentId?: number;
|
|
52
|
+
filter?: string;
|
|
53
|
+
}): Promise<TGenericReturn<TTask>>;
|
|
54
|
+
getExport({ exportId }: {
|
|
55
|
+
exportId: string;
|
|
56
|
+
}): Promise<TGenericReturn<TTask>>;
|
|
57
|
+
downloadExport({ exportId }: {
|
|
58
|
+
exportId: string;
|
|
59
|
+
}): Promise<TGenericReturn<TTaskDownload>>;
|
|
27
60
|
}
|
|
28
61
|
export * from "./types";
|
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
import { TListContacts } from "./types";
|
|
2
2
|
export declare function listContacts({ listId, useImpersonationTree, ...options }: TListContacts): Promise<any>;
|
|
3
|
+
export declare function deleteContact({ contactId, listId }: {
|
|
4
|
+
contactId: number;
|
|
5
|
+
listId: number;
|
|
6
|
+
}): Promise<any>;
|
|
7
|
+
export declare function unsubscribeContact({ contactId, listId }: {
|
|
8
|
+
contactId: number;
|
|
9
|
+
listId: number;
|
|
10
|
+
}): Promise<any>;
|
|
11
|
+
export declare function tagContact({ contactId, listId, tags }: {
|
|
12
|
+
contactId: number;
|
|
13
|
+
listId: number;
|
|
14
|
+
tags: string[];
|
|
15
|
+
}): Promise<any>;
|
|
16
|
+
export declare function untagContact({ contactId, listId, tags }: {
|
|
17
|
+
contactId: number;
|
|
18
|
+
listId: number;
|
|
19
|
+
tags: string[];
|
|
20
|
+
}): Promise<any>;
|
|
3
21
|
export * from "./types";
|
|
@@ -27,11 +27,46 @@ export declare function listListAttributes({ id, ...options }: TGenericListParam
|
|
|
27
27
|
export declare function listListInterests({ id, ...options }: TGenericListParams & {
|
|
28
28
|
id: number;
|
|
29
29
|
}): Promise<any>;
|
|
30
|
-
export declare function
|
|
30
|
+
export declare function downloadListLogExport({ listId, exportId }: {
|
|
31
31
|
listId: number;
|
|
32
32
|
exportId: string;
|
|
33
33
|
}): Promise<any>;
|
|
34
|
-
export declare function
|
|
34
|
+
export declare function tagsContactsOfList({ tags, contactIds, json, listId }: {
|
|
35
|
+
tags: string[];
|
|
36
|
+
contactIds?: number[];
|
|
37
|
+
json?: boolean;
|
|
38
|
+
listId: number;
|
|
39
|
+
}): Promise<any>;
|
|
40
|
+
export declare function untagContactsOfList({ tags, contactIds, json, listId }: {
|
|
41
|
+
tags: string[];
|
|
42
|
+
contactIds?: number[];
|
|
43
|
+
json?: boolean;
|
|
44
|
+
listId: number;
|
|
45
|
+
}): Promise<any>;
|
|
46
|
+
export declare function addInterestsToContactsOfList({ interests, contactIds, json, listId }: {
|
|
47
|
+
interests: string[];
|
|
48
|
+
contactIds?: number[];
|
|
49
|
+
json?: boolean;
|
|
50
|
+
listId: number;
|
|
51
|
+
}): Promise<any>;
|
|
52
|
+
export declare function removeInterestsFromContactsOfList({ interests, contactIds, json, listId }: {
|
|
53
|
+
interests: string[];
|
|
54
|
+
contactIds?: number[];
|
|
55
|
+
json?: boolean;
|
|
56
|
+
listId: number;
|
|
57
|
+
}): Promise<any>;
|
|
58
|
+
export declare function createContactsExport({ listId, description, json, segmentId, filter }: {
|
|
59
|
+
listId: number;
|
|
60
|
+
description?: string;
|
|
61
|
+
json?: boolean;
|
|
62
|
+
segmentId?: number;
|
|
63
|
+
filter?: string;
|
|
64
|
+
}): Promise<any>;
|
|
65
|
+
export declare function getContactsExport({ listId, exportId }: {
|
|
66
|
+
listId: number;
|
|
67
|
+
exportId: string;
|
|
68
|
+
}): Promise<any>;
|
|
69
|
+
export declare function downloadContactsExport({ listId, exportId }: {
|
|
35
70
|
listId: number;
|
|
36
71
|
exportId: string;
|
|
37
72
|
}): Promise<any>;
|
|
@@ -112,6 +112,11 @@ export type TCreateApiResource<T> = {
|
|
|
112
112
|
object: string;
|
|
113
113
|
data: T;
|
|
114
114
|
};
|
|
115
|
+
export type TUnsubscribeApiResource<T> = {
|
|
116
|
+
subscribed: boolean;
|
|
117
|
+
object: string;
|
|
118
|
+
data: T;
|
|
119
|
+
};
|
|
115
120
|
export type TRenderResponse = {
|
|
116
121
|
data: string;
|
|
117
122
|
};
|
|
@@ -66,9 +66,13 @@ export declare enum EEvents {
|
|
|
66
66
|
CONTACT_EXPORT = "Contact.Export",
|
|
67
67
|
CONTACT_EXPORT_DOWNLOAD = "Contact.Export.Download",
|
|
68
68
|
CONTACT_TAGGED = "Contact.Tagged",
|
|
69
|
+
CONTACTS_TAGGED = "Contacts.Tagged",
|
|
69
70
|
CONTACT_UNTAGGED = "Contact.Untagged",
|
|
71
|
+
CONTACTS_UNTAGGED = "Contacts.Untagged",
|
|
70
72
|
CONTACT_INTERESTED = "Contact.Interested",
|
|
73
|
+
CONTACTS_INTERESTED = "Contacts.Interested",
|
|
71
74
|
CONTACT_UNINTERESTED = "Contact.Uninterested",
|
|
75
|
+
CONTACTS_UNINTERESTED = "Contacts.Uninterested",
|
|
72
76
|
SUPPRESSED_EMAIL_EXPORT_CREATED = "SuppressedEmail.Export.Created",
|
|
73
77
|
SUPPRESSED_EMAIL_EXPORT_DOWNLOAD = "SuppressedEmail.Export.Download",
|
|
74
78
|
SUPPRESSED_EMAIL_DELETED = "SuppressedEmail.Deleted",
|