@cakemail-org/ui-components-v2 2.2.26 → 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.
@@ -108,6 +108,7 @@ export declare enum EIconName {
108
108
  "NonProfits32" = "NonProfits32",
109
109
  "Sent32" = "Sent32",
110
110
  "Uptime32" = "Uptime32",
111
+ "CreateContacts44" = "CreateContacts44",
111
112
  "CreateWidget44" = "CreateWidget44",
112
113
  "EmptyABTest44" = "EmptyABTest44",
113
114
  "EmptyFolder44" = "EmptyFolder44",
@@ -0,0 +1,4 @@
1
+ import { SvgIconProps } from '@mui/material/SvgIcon';
2
+ import React from "react";
3
+ declare function CreateContacts44(props: SvgIconProps): React.JSX.Element;
4
+ export default CreateContacts44;
package/dist/cjs/index.js CHANGED
@@ -751,6 +751,11 @@ function Campaigns18(props) {
751
751
  React.createElement("path", { className: "noFill", d: "M12.5 1L12 1.5", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }));
752
752
  }
753
753
 
754
+ function AccountProfile18(props) {
755
+ return React.createElement(SvgIcon, __assign({}, props, { width: "18", height: "10", viewBox: "0 0 18 10" }),
756
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.292893 0.292893C0.683417 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L9 7.58579L16.2929 0.292893C16.6834 -0.0976311 17.3166 -0.0976311 17.7071 0.292893C18.0976 0.683418 18.0976 1.31658 17.7071 1.70711L9.70711 9.70711C9.31658 10.0976 8.68342 10.0976 8.29289 9.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683418 0.292893 0.292893Z" }));
757
+ }
758
+
754
759
  function Clicks18(props) {
755
760
  return React.createElement(SvgIcon, __assign({}, props, { width: "18", height: "18", viewBox: "0 0 18 18" }),
756
761
  React.createElement("path", { id: "Vector", d: "M3.37444 1.78352L1.78345 3.37451L4.50006 6.09113L6.09105 4.50014L3.37444 1.78352Z" }),
@@ -781,11 +786,6 @@ function Copy18(props) {
781
786
  React.createElement("path", { d: "M6 15H8C8 15.5523 8.44772 16 9 16H15C15.5523 16 16 15.5523 16 15V9C16 8.44772 15.5523 8 15 8V6C16.6569 6 18 7.34315 18 9V15C18 16.6569 16.6569 18 15 18H9C7.34315 18 6 16.6568 6 15Z" }));
782
787
  }
783
788
 
784
- function AccountProfile18(props) {
785
- return React.createElement(SvgIcon, __assign({}, props, { width: "18", height: "10", viewBox: "0 0 18 10" }),
786
- React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.292893 0.292893C0.683417 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L9 7.58579L16.2929 0.292893C16.6834 -0.0976311 17.3166 -0.0976311 17.7071 0.292893C18.0976 0.683418 18.0976 1.31658 17.7071 1.70711L9.70711 9.70711C9.31658 10.0976 8.68342 10.0976 8.29289 9.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683418 0.292893 0.292893Z" }));
787
- }
788
-
789
789
  function Dashboard18(props) {
790
790
  return React.createElement(SvgIcon, __assign({}, props, { width: "18", height: "18", viewBox: "0 0 18 18" }),
791
791
  React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.4 0H6.6C7.3732 0 8 0.626801 8 1.4V6.6C8 7.3732 7.3732 8 6.6 8H1.4C0.626801 8 0 7.3732 0 6.6V1.4C0 0.626801 0.626801 0 1.4 0ZM2 2V6H6V2H2Z" }),
@@ -1340,6 +1340,17 @@ function Uptime32(props) {
1340
1340
  React.createElement("path", { className: 'noFill', id: "Vector 119", d: "M13.2842 17.391L15.2591 19.0621L18.7153 13.631", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }));
1341
1341
  }
1342
1342
 
1343
+ function CreateContacts44(props) {
1344
+ return React.createElement(SvgIcon, __assign({}, props, { width: "44", height: "44", viewBox: "0 0 44 44" }),
1345
+ React.createElement("circle", { className: 'noFill', cx: "22.5", cy: "20.5", r: "8.5", strokeWidth: "2" }),
1346
+ React.createElement("path", { className: 'noFill', d: "M9 44V36.5C9 32.3579 12.3579 29 16.5 29H27.5C29.5427 29 31.3946 29.8166 32.7472 31.1412", strokeWidth: "2" }),
1347
+ React.createElement("circle", { className: 'noFill', cx: "35.5", cy: "6.5", r: "5.5", strokeWidth: "2" }),
1348
+ React.createElement("path", { className: 'noFill', d: "M36 12H37.375C40.4816 12 43 14.5184 43 17.625V25", strokeWidth: "2" }),
1349
+ React.createElement("circle", { className: 'noFill', cx: "8.5", cy: "6.5", r: "5.5", strokeWidth: "2" }),
1350
+ React.createElement("path", { className: 'noFill', d: "M8 12H6.625C3.5184 12 1 14.5184 1 17.625V25", strokeWidth: "2" }),
1351
+ React.createElement("path", { className: 'noFill', d: "M37 31V43M43 37H31", strokeWidth: "2", strokeLinecap: "round" }));
1352
+ }
1353
+
1343
1354
  function CreateForm44(props) {
1344
1355
  return React.createElement(SvgIcon, __assign({}, props, { width: "44", height: "44", viewBox: "0 0 44 44" }),
1345
1356
  React.createElement("path", { d: "M39 0C41.7614 0 44 2.23858 44 5V31.5459H42V5C42 3.34315 40.6569 2 39 2H5C3.34315 2 2 3.34315 2 5V39C2 40.6568 3.34315 42 5 42H30.5908V44H5C2.23858 44 0 41.7614 0 39V5C0 2.23858 2.23858 0 5 0H39Z" }),
@@ -1552,6 +1563,7 @@ function Icon(_a) {
1552
1563
  NonProfits32: NonProfits32,
1553
1564
  Sent32: Sent32,
1554
1565
  Uptime32: Uptime32,
1566
+ CreateContacts44: CreateContacts44,
1555
1567
  CreateWidget44: CreateWidget44,
1556
1568
  EmptyABTest44: EmptyABTest44,
1557
1569
  EmptyFolder44: EmptyFolder,
@@ -5366,9 +5378,13 @@ exports.EEvents = void 0;
5366
5378
  EEvents["CONTACT_EXPORT"] = "Contact.Export";
5367
5379
  EEvents["CONTACT_EXPORT_DOWNLOAD"] = "Contact.Export.Download";
5368
5380
  EEvents["CONTACT_TAGGED"] = "Contact.Tagged";
5381
+ EEvents["CONTACTS_TAGGED"] = "Contacts.Tagged";
5369
5382
  EEvents["CONTACT_UNTAGGED"] = "Contact.Untagged";
5383
+ EEvents["CONTACTS_UNTAGGED"] = "Contacts.Untagged";
5370
5384
  EEvents["CONTACT_INTERESTED"] = "Contact.Interested";
5385
+ EEvents["CONTACTS_INTERESTED"] = "Contacts.Interested";
5371
5386
  EEvents["CONTACT_UNINTERESTED"] = "Contact.Uninterested";
5387
+ EEvents["CONTACTS_UNINTERESTED"] = "Contacts.Uninterested";
5372
5388
  EEvents["SUPPRESSED_EMAIL_EXPORT_CREATED"] = "SuppressedEmail.Export.Created";
5373
5389
  EEvents["SUPPRESSED_EMAIL_EXPORT_DOWNLOAD"] = "SuppressedEmail.Export.Download";
5374
5390
  EEvents["SUPPRESSED_EMAIL_DELETED"] = "SuppressedEmail.Deleted";
@@ -10508,6 +10524,48 @@ function listContacts(_a) {
10508
10524
  useImpersonationTree: useImpersonationTree
10509
10525
  });
10510
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
+ }
10511
10569
 
10512
10570
  exports.EEmailLogTypeParam = void 0;
10513
10571
  (function (EEmailLogTypeParam) {
@@ -10847,19 +10905,99 @@ function listListInterests(_a) {
10847
10905
  },
10848
10906
  });
10849
10907
  }
10850
- function downloadContactsExport(_a) {
10908
+ function downloadListLogExport(_a) {
10851
10909
  var listId = _a.listId, exportId = _a.exportId;
10852
10910
  return callApi({
10853
- url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/exports/").concat(exportId, "/download"),
10911
+ url: uiKitConfig.GATEWAY_PROXY + "/logs/lists/".concat(listId, "/exports/").concat(exportId, "/download"),
10854
10912
  fetchOptions: {
10855
10913
  method: exports.EMethods.get,
10856
10914
  },
10857
10915
  });
10858
10916
  }
10859
- function downloadListLogExport(_a) {
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) {
10860
10989
  var listId = _a.listId, exportId = _a.exportId;
10861
10990
  return callApi({
10862
- url: uiKitConfig.GATEWAY_PROXY + "/logs/lists/".concat(listId, "/exports/").concat(exportId, "/download"),
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"),
10863
11001
  fetchOptions: {
10864
11002
  method: exports.EMethods.get,
10865
11003
  },
@@ -17887,6 +18025,7 @@ var ContactModel = /** @class */ (function () {
17887
18025
  this.custom_attributes = params.custom_attributes;
17888
18026
  this.tags = params.tags;
17889
18027
  this.interests = params.interests;
18028
+ this.listId = params.listId;
17890
18029
  }
17891
18030
  ContactModel.prototype.toJson = function () {
17892
18031
  return modelToJson(this);
@@ -17894,6 +18033,54 @@ var ContactModel = /** @class */ (function () {
17894
18033
  ContactModel.prototype.set = function (property, value) {
17895
18034
  modelSet(this, property, value);
17896
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
+ };
17897
18084
  return ContactModel;
17898
18085
  }());
17899
18086
 
@@ -17905,7 +18092,7 @@ var ContactsFactory = /** @class */ (function () {
17905
18092
  var options = __rest(_a, []);
17906
18093
  return __generator(this, function (_b) {
17907
18094
  return [2 /*return*/, listContacts(options).then(function (data) {
17908
- 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 })); });
17909
18096
  return data;
17910
18097
  })];
17911
18098
  });
@@ -18317,6 +18504,91 @@ var ListModel = /** @class */ (function () {
18317
18504
  });
18318
18505
  });
18319
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
+ };
18320
18592
  return ListModel;
18321
18593
  }());
18322
18594
 
@@ -19503,6 +19775,7 @@ exports.Typography = Typography;
19503
19775
  exports.UserModel = UserModel;
19504
19776
  exports.UsersFactory = UsersFactory;
19505
19777
  exports.acceptListPolicy = acceptListPolicy;
19778
+ exports.addInterestsToContactsOfList = addInterestsToContactsOfList;
19506
19779
  exports.addPartialInformation = addPartialInformation;
19507
19780
  exports.addSuppressedEmail = addSuppressedEmail;
19508
19781
  exports.addToImpersonificationTree = addToImpersonificationTree;
@@ -19526,6 +19799,7 @@ exports.createBrand = createBrand;
19526
19799
  exports.createCampaign = createCampaign;
19527
19800
  exports.createCampaignLogsExports = createCampaignLogsExports;
19528
19801
  exports.createCampaignsReportsExport = createCampaignsReportsExport;
19802
+ exports.createContactsExport = createContactsExport;
19529
19803
  exports.createForm = createForm;
19530
19804
  exports.createPage = createPage;
19531
19805
  exports.createPopup = createPopup;
@@ -19537,6 +19811,7 @@ exports.deleteAnyAutomation = deleteAnyAutomation;
19537
19811
  exports.deleteAutomation = deleteAutomation;
19538
19812
  exports.deleteCampaign = deleteCampaign;
19539
19813
  exports.deleteCampaignsReportsExport = deleteCampaignsReportsExport;
19814
+ exports.deleteContact = deleteContact;
19540
19815
  exports.deleteForm = deleteForm;
19541
19816
  exports.deleteList = deleteList;
19542
19817
  exports.deletePage = deletePage;
@@ -19595,6 +19870,7 @@ exports.getCampaignReport = getCampaignReport;
19595
19870
  exports.getCampaignRevisions = getCampaignRevisions;
19596
19871
  exports.getCampaignsReportsExport = getCampaignsReportsExport;
19597
19872
  exports.getComparator = getComparator;
19873
+ exports.getContactsExport = getContactsExport;
19598
19874
  exports.getCustomerProfile = getCustomerProfile;
19599
19875
  exports.getDate = getDate;
19600
19876
  exports.getDomainFromEmail = getDomainFromEmail;
@@ -19670,6 +19946,7 @@ exports.publishPage = publishPage;
19670
19946
  exports.publishPopup = publishPopup;
19671
19947
  exports.reScheduleCampaign = reScheduleCampaign;
19672
19948
  exports.removeEmptyProperties = removeEmptyProperties;
19949
+ exports.removeInterestsFromContactsOfList = removeInterestsFromContactsOfList;
19673
19950
  exports.removeQueryParams = removeQueryParams;
19674
19951
  exports.removeTrailingChar = removeTrailingChar;
19675
19952
  exports.renderCampaign = renderCampaign;
@@ -19695,6 +19972,8 @@ exports.stableSort = stableSort;
19695
19972
  exports.startPromisePool = startPromisePool;
19696
19973
  exports.suspendAccount = suspendAccount;
19697
19974
  exports.suspendCampaign = suspendCampaign;
19975
+ exports.tagContact = tagContact;
19976
+ exports.tagsContactsOfList = tagsContactsOfList;
19698
19977
  exports.trackEvent = trackEvent;
19699
19978
  exports.truncateEmail = truncateEmail;
19700
19979
  exports.truncateText = truncateText;
@@ -19703,6 +19982,9 @@ exports.unArchiveCampaign = unArchiveCampaign;
19703
19982
  exports.unScheduleCampaign = unScheduleCampaign;
19704
19983
  exports.unSuspendAccount = unSuspendAccount;
19705
19984
  exports.unshareTemplate = unshareTemplate;
19985
+ exports.unsubscribeContact = unsubscribeContact;
19986
+ exports.untagContact = untagContact;
19987
+ exports.untagContactsOfList = untagContactsOfList;
19706
19988
  exports.updateAccount = updateAccount;
19707
19989
  exports.updateAndClearUrlParams = updateAndClearUrlParams;
19708
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";
@@ -8,6 +8,7 @@ export type TContactModel = {
8
8
  custom_attributes: TContactCustomAttribute[];
9
9
  tags: string[];
10
10
  interests: string[];
11
+ listId: number;
11
12
  };
12
13
  export type TContactCustomAttribute = {
13
14
  name: string;
@@ -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 downloadContactsExport({ listId, exportId }: {
30
+ export declare function downloadListLogExport({ listId, exportId }: {
31
31
  listId: number;
32
32
  exportId: string;
33
33
  }): Promise<any>;
34
- export declare function downloadListLogExport({ listId, exportId }: {
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",
@@ -108,6 +108,7 @@ export declare enum EIconName {
108
108
  "NonProfits32" = "NonProfits32",
109
109
  "Sent32" = "Sent32",
110
110
  "Uptime32" = "Uptime32",
111
+ "CreateContacts44" = "CreateContacts44",
111
112
  "CreateWidget44" = "CreateWidget44",
112
113
  "EmptyABTest44" = "EmptyABTest44",
113
114
  "EmptyFolder44" = "EmptyFolder44",
@@ -0,0 +1,4 @@
1
+ import { SvgIconProps } from '@mui/material/SvgIcon';
2
+ import React from "react";
3
+ declare function CreateContacts44(props: SvgIconProps): React.JSX.Element;
4
+ export default CreateContacts44;
package/dist/esm/index.js CHANGED
@@ -731,6 +731,11 @@ function Campaigns18(props) {
731
731
  React__default.createElement("path", { className: "noFill", d: "M12.5 1L12 1.5", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }));
732
732
  }
733
733
 
734
+ function AccountProfile18(props) {
735
+ return React__default.createElement(SvgIcon, __assign({}, props, { width: "18", height: "10", viewBox: "0 0 18 10" }),
736
+ React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.292893 0.292893C0.683417 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L9 7.58579L16.2929 0.292893C16.6834 -0.0976311 17.3166 -0.0976311 17.7071 0.292893C18.0976 0.683418 18.0976 1.31658 17.7071 1.70711L9.70711 9.70711C9.31658 10.0976 8.68342 10.0976 8.29289 9.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683418 0.292893 0.292893Z" }));
737
+ }
738
+
734
739
  function Clicks18(props) {
735
740
  return React__default.createElement(SvgIcon, __assign({}, props, { width: "18", height: "18", viewBox: "0 0 18 18" }),
736
741
  React__default.createElement("path", { id: "Vector", d: "M3.37444 1.78352L1.78345 3.37451L4.50006 6.09113L6.09105 4.50014L3.37444 1.78352Z" }),
@@ -761,11 +766,6 @@ function Copy18(props) {
761
766
  React__default.createElement("path", { d: "M6 15H8C8 15.5523 8.44772 16 9 16H15C15.5523 16 16 15.5523 16 15V9C16 8.44772 15.5523 8 15 8V6C16.6569 6 18 7.34315 18 9V15C18 16.6569 16.6569 18 15 18H9C7.34315 18 6 16.6568 6 15Z" }));
762
767
  }
763
768
 
764
- function AccountProfile18(props) {
765
- return React__default.createElement(SvgIcon, __assign({}, props, { width: "18", height: "10", viewBox: "0 0 18 10" }),
766
- React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.292893 0.292893C0.683417 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L9 7.58579L16.2929 0.292893C16.6834 -0.0976311 17.3166 -0.0976311 17.7071 0.292893C18.0976 0.683418 18.0976 1.31658 17.7071 1.70711L9.70711 9.70711C9.31658 10.0976 8.68342 10.0976 8.29289 9.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683418 0.292893 0.292893Z" }));
767
- }
768
-
769
769
  function Dashboard18(props) {
770
770
  return React__default.createElement(SvgIcon, __assign({}, props, { width: "18", height: "18", viewBox: "0 0 18 18" }),
771
771
  React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.4 0H6.6C7.3732 0 8 0.626801 8 1.4V6.6C8 7.3732 7.3732 8 6.6 8H1.4C0.626801 8 0 7.3732 0 6.6V1.4C0 0.626801 0.626801 0 1.4 0ZM2 2V6H6V2H2Z" }),
@@ -1320,6 +1320,17 @@ function Uptime32(props) {
1320
1320
  React__default.createElement("path", { className: 'noFill', id: "Vector 119", d: "M13.2842 17.391L15.2591 19.0621L18.7153 13.631", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }));
1321
1321
  }
1322
1322
 
1323
+ function CreateContacts44(props) {
1324
+ return React__default.createElement(SvgIcon, __assign({}, props, { width: "44", height: "44", viewBox: "0 0 44 44" }),
1325
+ React__default.createElement("circle", { className: 'noFill', cx: "22.5", cy: "20.5", r: "8.5", strokeWidth: "2" }),
1326
+ React__default.createElement("path", { className: 'noFill', d: "M9 44V36.5C9 32.3579 12.3579 29 16.5 29H27.5C29.5427 29 31.3946 29.8166 32.7472 31.1412", strokeWidth: "2" }),
1327
+ React__default.createElement("circle", { className: 'noFill', cx: "35.5", cy: "6.5", r: "5.5", strokeWidth: "2" }),
1328
+ React__default.createElement("path", { className: 'noFill', d: "M36 12H37.375C40.4816 12 43 14.5184 43 17.625V25", strokeWidth: "2" }),
1329
+ React__default.createElement("circle", { className: 'noFill', cx: "8.5", cy: "6.5", r: "5.5", strokeWidth: "2" }),
1330
+ React__default.createElement("path", { className: 'noFill', d: "M8 12H6.625C3.5184 12 1 14.5184 1 17.625V25", strokeWidth: "2" }),
1331
+ React__default.createElement("path", { className: 'noFill', d: "M37 31V43M43 37H31", strokeWidth: "2", strokeLinecap: "round" }));
1332
+ }
1333
+
1323
1334
  function CreateForm44(props) {
1324
1335
  return React__default.createElement(SvgIcon, __assign({}, props, { width: "44", height: "44", viewBox: "0 0 44 44" }),
1325
1336
  React__default.createElement("path", { d: "M39 0C41.7614 0 44 2.23858 44 5V31.5459H42V5C42 3.34315 40.6569 2 39 2H5C3.34315 2 2 3.34315 2 5V39C2 40.6568 3.34315 42 5 42H30.5908V44H5C2.23858 44 0 41.7614 0 39V5C0 2.23858 2.23858 0 5 0H39Z" }),
@@ -1532,6 +1543,7 @@ function Icon(_a) {
1532
1543
  NonProfits32: NonProfits32,
1533
1544
  Sent32: Sent32,
1534
1545
  Uptime32: Uptime32,
1546
+ CreateContacts44: CreateContacts44,
1535
1547
  CreateWidget44: CreateWidget44,
1536
1548
  EmptyABTest44: EmptyABTest44,
1537
1549
  EmptyFolder44: EmptyFolder,
@@ -5346,9 +5358,13 @@ var EEvents;
5346
5358
  EEvents["CONTACT_EXPORT"] = "Contact.Export";
5347
5359
  EEvents["CONTACT_EXPORT_DOWNLOAD"] = "Contact.Export.Download";
5348
5360
  EEvents["CONTACT_TAGGED"] = "Contact.Tagged";
5361
+ EEvents["CONTACTS_TAGGED"] = "Contacts.Tagged";
5349
5362
  EEvents["CONTACT_UNTAGGED"] = "Contact.Untagged";
5363
+ EEvents["CONTACTS_UNTAGGED"] = "Contacts.Untagged";
5350
5364
  EEvents["CONTACT_INTERESTED"] = "Contact.Interested";
5365
+ EEvents["CONTACTS_INTERESTED"] = "Contacts.Interested";
5351
5366
  EEvents["CONTACT_UNINTERESTED"] = "Contact.Uninterested";
5367
+ EEvents["CONTACTS_UNINTERESTED"] = "Contacts.Uninterested";
5352
5368
  EEvents["SUPPRESSED_EMAIL_EXPORT_CREATED"] = "SuppressedEmail.Export.Created";
5353
5369
  EEvents["SUPPRESSED_EMAIL_EXPORT_DOWNLOAD"] = "SuppressedEmail.Export.Download";
5354
5370
  EEvents["SUPPRESSED_EMAIL_DELETED"] = "SuppressedEmail.Deleted";
@@ -10488,6 +10504,48 @@ function listContacts(_a) {
10488
10504
  useImpersonationTree: useImpersonationTree
10489
10505
  });
10490
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
+ }
10491
10549
 
10492
10550
  var EEmailLogTypeParam;
10493
10551
  (function (EEmailLogTypeParam) {
@@ -10827,19 +10885,99 @@ function listListInterests(_a) {
10827
10885
  },
10828
10886
  });
10829
10887
  }
10830
- function downloadContactsExport(_a) {
10888
+ function downloadListLogExport(_a) {
10831
10889
  var listId = _a.listId, exportId = _a.exportId;
10832
10890
  return callApi({
10833
- url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(listId, "/exports/").concat(exportId, "/download"),
10891
+ url: uiKitConfig.GATEWAY_PROXY + "/logs/lists/".concat(listId, "/exports/").concat(exportId, "/download"),
10834
10892
  fetchOptions: {
10835
10893
  method: EMethods.get,
10836
10894
  },
10837
10895
  });
10838
10896
  }
10839
- function downloadListLogExport(_a) {
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) {
10840
10969
  var listId = _a.listId, exportId = _a.exportId;
10841
10970
  return callApi({
10842
- url: uiKitConfig.GATEWAY_PROXY + "/logs/lists/".concat(listId, "/exports/").concat(exportId, "/download"),
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"),
10843
10981
  fetchOptions: {
10844
10982
  method: EMethods.get,
10845
10983
  },
@@ -17867,6 +18005,7 @@ var ContactModel = /** @class */ (function () {
17867
18005
  this.custom_attributes = params.custom_attributes;
17868
18006
  this.tags = params.tags;
17869
18007
  this.interests = params.interests;
18008
+ this.listId = params.listId;
17870
18009
  }
17871
18010
  ContactModel.prototype.toJson = function () {
17872
18011
  return modelToJson(this);
@@ -17874,6 +18013,54 @@ var ContactModel = /** @class */ (function () {
17874
18013
  ContactModel.prototype.set = function (property, value) {
17875
18014
  modelSet(this, property, value);
17876
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
+ };
17877
18064
  return ContactModel;
17878
18065
  }());
17879
18066
 
@@ -17885,7 +18072,7 @@ var ContactsFactory = /** @class */ (function () {
17885
18072
  var options = __rest(_a, []);
17886
18073
  return __generator(this, function (_b) {
17887
18074
  return [2 /*return*/, listContacts(options).then(function (data) {
17888
- 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 })); });
17889
18076
  return data;
17890
18077
  })];
17891
18078
  });
@@ -18297,6 +18484,91 @@ var ListModel = /** @class */ (function () {
18297
18484
  });
18298
18485
  });
18299
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
+ };
18300
18572
  return ListModel;
18301
18573
  }());
18302
18574
 
@@ -19371,4 +19643,4 @@ var UsersFactory = /** @class */ (function () {
19371
19643
  return UsersFactory;
19372
19644
  }());
19373
19645
 
19374
- 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";
@@ -8,6 +8,7 @@ export type TContactModel = {
8
8
  custom_attributes: TContactCustomAttribute[];
9
9
  tags: string[];
10
10
  interests: string[];
11
+ listId: number;
11
12
  };
12
13
  export type TContactCustomAttribute = {
13
14
  name: string;
@@ -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 downloadContactsExport({ listId, exportId }: {
30
+ export declare function downloadListLogExport({ listId, exportId }: {
31
31
  listId: number;
32
32
  exportId: string;
33
33
  }): Promise<any>;
34
- export declare function downloadListLogExport({ listId, exportId }: {
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakemail-org/ui-components-v2",
3
- "version": "2.2.26",
3
+ "version": "2.2.28",
4
4
  "description": "ui library kit made with material UI",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",