@cakemail-org/ui-components-v2 2.1.42 → 2.1.44

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 CHANGED
@@ -10341,6 +10341,25 @@ function getList(_a) {
10341
10341
  }
10342
10342
  });
10343
10343
  }
10344
+ function deleteList(_a) {
10345
+ var id = _a.id;
10346
+ return callApi({
10347
+ url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(id),
10348
+ fetchOptions: {
10349
+ method: exports.EMethods.delete
10350
+ }
10351
+ });
10352
+ }
10353
+ function saveList(_a) {
10354
+ var id = _a.id, list = _a.list;
10355
+ return callApi({
10356
+ url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(id),
10357
+ fetchOptions: {
10358
+ method: exports.EMethods.put,
10359
+ body: list
10360
+ },
10361
+ });
10362
+ }
10344
10363
  function getListReport(_a) {
10345
10364
  var id = _a.id;
10346
10365
  return callApi({
@@ -17522,13 +17541,47 @@ var ListModel = /** @class */ (function () {
17522
17541
  modelSet(this, property, value);
17523
17542
  };
17524
17543
  ListModel.prototype.acceptPolicy = function () {
17525
- return acceptListPolicy({ id: this.id });
17544
+ return __awaiter(this, void 0, void 0, function () {
17545
+ return __generator(this, function (_a) {
17546
+ return [2 /*return*/, acceptListPolicy({ id: this.id })];
17547
+ });
17548
+ });
17549
+ };
17550
+ ListModel.prototype.save = function (list) {
17551
+ return __awaiter(this, void 0, void 0, function () {
17552
+ var _this = this;
17553
+ return __generator(this, function (_a) {
17554
+ return [2 /*return*/, saveList({ id: this.id, list: list }).then(function (data) {
17555
+ trackEvent(exports.EEvents.LIST_UPDATED, { id: _this.id });
17556
+ return data;
17557
+ })];
17558
+ });
17559
+ });
17560
+ };
17561
+ ListModel.prototype.delete = function () {
17562
+ return __awaiter(this, void 0, void 0, function () {
17563
+ var _this = this;
17564
+ return __generator(this, function (_a) {
17565
+ return [2 /*return*/, deleteList({ id: this.id }).then(function (data) {
17566
+ trackEvent(exports.EEvents.LIST_DELETED, { id: _this.id });
17567
+ return data;
17568
+ })];
17569
+ });
17570
+ });
17526
17571
  };
17527
17572
  ListModel.prototype.getAttributes = function (options) {
17528
- return listListAttributes(__assign({ id: this.id }, options));
17573
+ return __awaiter(this, void 0, void 0, function () {
17574
+ return __generator(this, function (_a) {
17575
+ return [2 /*return*/, listListAttributes(__assign({ id: this.id }, options))];
17576
+ });
17577
+ });
17529
17578
  };
17530
17579
  ListModel.prototype.getInterests = function (options) {
17531
- return listListInterests(__assign({ id: this.id }, options));
17580
+ return __awaiter(this, void 0, void 0, function () {
17581
+ return __generator(this, function (_a) {
17582
+ return [2 /*return*/, listListInterests(__assign({ id: this.id }, options))];
17583
+ });
17584
+ });
17532
17585
  };
17533
17586
  return ListModel;
17534
17587
  }());
@@ -18359,6 +18412,7 @@ exports.deepMergeObject = deepMergeObject;
18359
18412
  exports.deleteCampaign = deleteCampaign;
18360
18413
  exports.deleteCampaignsReportsExport = deleteCampaignsReportsExport;
18361
18414
  exports.deleteForm = deleteForm;
18415
+ exports.deleteList = deleteList;
18362
18416
  exports.deletePartialInformation = deletePartialInformation;
18363
18417
  exports.deleteStorageItem = deleteStorageItem;
18364
18418
  exports.deleteSuppressedEmail = deleteSuppressedEmail;
@@ -18477,6 +18531,7 @@ exports.renderPublicHtmlForm = renderPublicHtmlForm;
18477
18531
  exports.renderTemplate = renderTemplate;
18478
18532
  exports.requestSupportService = requestSupportService;
18479
18533
  exports.resumeCampaign = resumeCampaign;
18534
+ exports.saveList = saveList;
18480
18535
  exports.scheduleCampaign = scheduleCampaign;
18481
18536
  exports.searchCustomerProfiles = searchCustomerProfiles;
18482
18537
  exports.sendCampaignTest = sendCampaignTest;
@@ -1,4 +1,4 @@
1
- import { EApiLanguages, TGenericListParams, TGenericListReturn } from "../../types";
1
+ import { EApiLanguages, TDeleteApiResource, TGenericListParams, TGenericListReturn } from "../../types";
2
2
  import { TListCustomAttribute, TListInterest, TListModel, TListPages, TListRedirections, TListSender, TListWebhook } from "./types";
3
3
  export declare class ListModel {
4
4
  readonly id: number;
@@ -19,6 +19,8 @@ export declare class ListModel {
19
19
  object: string;
20
20
  policy_accepted: boolean;
21
21
  }>;
22
+ save(list: Partial<TListModel>): Promise<TListModel>;
23
+ delete(): Promise<TDeleteApiResource>;
22
24
  getAttributes(options?: TGenericListParams): Promise<TGenericListReturn<TListCustomAttribute>>;
23
25
  getInterests(options?: TGenericListParams): Promise<TGenericListReturn<TListInterest>>;
24
26
  }
@@ -1,8 +1,16 @@
1
+ import { TListModel } from "../../models/list";
1
2
  import { TGenericListLogsParams, TGenericListParams } from "../../types";
2
3
  export declare function listList({ ...options }: TGenericListParams): Promise<any>;
3
4
  export declare function getList({ id }: {
4
5
  id: number;
5
6
  }): Promise<any>;
7
+ export declare function deleteList({ id }: {
8
+ id: number;
9
+ }): Promise<any>;
10
+ export declare function saveList({ id, list }: {
11
+ id: number;
12
+ list: Partial<TListModel>;
13
+ }): Promise<any>;
6
14
  export declare function getListReport({ id }: {
7
15
  id: number;
8
16
  }): Promise<any>;
package/dist/esm/index.js CHANGED
@@ -10321,6 +10321,25 @@ function getList(_a) {
10321
10321
  }
10322
10322
  });
10323
10323
  }
10324
+ function deleteList(_a) {
10325
+ var id = _a.id;
10326
+ return callApi({
10327
+ url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(id),
10328
+ fetchOptions: {
10329
+ method: EMethods.delete
10330
+ }
10331
+ });
10332
+ }
10333
+ function saveList(_a) {
10334
+ var id = _a.id, list = _a.list;
10335
+ return callApi({
10336
+ url: uiKitConfig.GATEWAY_PROXY + "/lists/".concat(id),
10337
+ fetchOptions: {
10338
+ method: EMethods.put,
10339
+ body: list
10340
+ },
10341
+ });
10342
+ }
10324
10343
  function getListReport(_a) {
10325
10344
  var id = _a.id;
10326
10345
  return callApi({
@@ -17502,13 +17521,47 @@ var ListModel = /** @class */ (function () {
17502
17521
  modelSet(this, property, value);
17503
17522
  };
17504
17523
  ListModel.prototype.acceptPolicy = function () {
17505
- return acceptListPolicy({ id: this.id });
17524
+ return __awaiter(this, void 0, void 0, function () {
17525
+ return __generator(this, function (_a) {
17526
+ return [2 /*return*/, acceptListPolicy({ id: this.id })];
17527
+ });
17528
+ });
17529
+ };
17530
+ ListModel.prototype.save = function (list) {
17531
+ return __awaiter(this, void 0, void 0, function () {
17532
+ var _this = this;
17533
+ return __generator(this, function (_a) {
17534
+ return [2 /*return*/, saveList({ id: this.id, list: list }).then(function (data) {
17535
+ trackEvent(EEvents.LIST_UPDATED, { id: _this.id });
17536
+ return data;
17537
+ })];
17538
+ });
17539
+ });
17540
+ };
17541
+ ListModel.prototype.delete = function () {
17542
+ return __awaiter(this, void 0, void 0, function () {
17543
+ var _this = this;
17544
+ return __generator(this, function (_a) {
17545
+ return [2 /*return*/, deleteList({ id: this.id }).then(function (data) {
17546
+ trackEvent(EEvents.LIST_DELETED, { id: _this.id });
17547
+ return data;
17548
+ })];
17549
+ });
17550
+ });
17506
17551
  };
17507
17552
  ListModel.prototype.getAttributes = function (options) {
17508
- return listListAttributes(__assign({ id: this.id }, options));
17553
+ return __awaiter(this, void 0, void 0, function () {
17554
+ return __generator(this, function (_a) {
17555
+ return [2 /*return*/, listListAttributes(__assign({ id: this.id }, options))];
17556
+ });
17557
+ });
17509
17558
  };
17510
17559
  ListModel.prototype.getInterests = function (options) {
17511
- return listListInterests(__assign({ id: this.id }, options));
17560
+ return __awaiter(this, void 0, void 0, function () {
17561
+ return __generator(this, function (_a) {
17562
+ return [2 /*return*/, listListInterests(__assign({ id: this.id }, options))];
17563
+ });
17564
+ });
17512
17565
  };
17513
17566
  return ListModel;
17514
17567
  }());
@@ -18206,4 +18259,4 @@ var UsersFactory = /** @class */ (function () {
18206
18259
  return UsersFactory;
18207
18260
  }());
18208
18261
 
18209
- export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CopyToClipboard, 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, EEmailSummaryEngagement, EEvents, EListAttributeType, EMethods, EOperatorTypes, EPartialInfoPool, EStorageType, ETaskType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, OverlayHandler, PhoneTextField, 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, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createForm, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteCampaign, deleteCampaignsReportsExport, deleteForm, deletePartialInformation, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, descendingComparator, disableForm, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountReport, getAdjustedBillingCycle, 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, 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, listCampaigns, listCampaignsReportsExports, listContacts, listEmailLogs, listForms, listList, listListAttributes, listListInterests, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchForm, popImpersonificationTree, postMessage, publishForm, reScheduleCampaign, removeEmptyProperties, removeQueryParams, removeTrailingChar, renderCampaign, renderForm, renderPublicHtmlForm, renderTemplate, requestSupportService, resumeCampaign, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendCampaign, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unshareTemplate, updateAccount, updateAndClearUrlParams, updateCampaign, updateSystemEmails, updateTemplate, updateUser, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
18262
+ export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CopyToClipboard, 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, EEmailSummaryEngagement, EEvents, EListAttributeType, EMethods, EOperatorTypes, EPartialInfoPool, EStorageType, ETaskType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, OverlayHandler, PhoneTextField, 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, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createForm, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteCampaign, deleteCampaignsReportsExport, deleteForm, deleteList, deletePartialInformation, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, descendingComparator, disableForm, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountReport, getAdjustedBillingCycle, 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, 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, listCampaigns, listCampaignsReportsExports, listContacts, listEmailLogs, listForms, listList, listListAttributes, listListInterests, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchForm, popImpersonificationTree, postMessage, publishForm, reScheduleCampaign, removeEmptyProperties, removeQueryParams, removeTrailingChar, renderCampaign, renderForm, renderPublicHtmlForm, renderTemplate, requestSupportService, resumeCampaign, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendCampaign, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unshareTemplate, updateAccount, updateAndClearUrlParams, updateCampaign, updateSystemEmails, updateTemplate, updateUser, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
@@ -1,4 +1,4 @@
1
- import { EApiLanguages, TGenericListParams, TGenericListReturn } from "../../types";
1
+ import { EApiLanguages, TDeleteApiResource, TGenericListParams, TGenericListReturn } from "../../types";
2
2
  import { TListCustomAttribute, TListInterest, TListModel, TListPages, TListRedirections, TListSender, TListWebhook } from "./types";
3
3
  export declare class ListModel {
4
4
  readonly id: number;
@@ -19,6 +19,8 @@ export declare class ListModel {
19
19
  object: string;
20
20
  policy_accepted: boolean;
21
21
  }>;
22
+ save(list: Partial<TListModel>): Promise<TListModel>;
23
+ delete(): Promise<TDeleteApiResource>;
22
24
  getAttributes(options?: TGenericListParams): Promise<TGenericListReturn<TListCustomAttribute>>;
23
25
  getInterests(options?: TGenericListParams): Promise<TGenericListReturn<TListInterest>>;
24
26
  }
@@ -1,8 +1,16 @@
1
+ import { TListModel } from "../../models/list";
1
2
  import { TGenericListLogsParams, TGenericListParams } from "../../types";
2
3
  export declare function listList({ ...options }: TGenericListParams): Promise<any>;
3
4
  export declare function getList({ id }: {
4
5
  id: number;
5
6
  }): Promise<any>;
7
+ export declare function deleteList({ id }: {
8
+ id: number;
9
+ }): Promise<any>;
10
+ export declare function saveList({ id, list }: {
11
+ id: number;
12
+ list: Partial<TListModel>;
13
+ }): Promise<any>;
6
14
  export declare function getListReport({ id }: {
7
15
  id: number;
8
16
  }): Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakemail-org/ui-components-v2",
3
- "version": "2.1.42",
3
+ "version": "2.1.44",
4
4
  "description": "ui library kit made with material UI",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",