@cakemail-org/ui-components-v2 2.2.5 → 2.2.7

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
@@ -17658,19 +17658,41 @@ exports.EEmailAttachementTypes = void 0;
17658
17658
  EEmailAttachementTypes["xls"] = "xls";
17659
17659
  EEmailAttachementTypes["xlsx"] = "xlsx";
17660
17660
  })(exports.EEmailAttachementTypes || (exports.EEmailAttachementTypes = {}));
17661
+ exports.EEmailStatuses = void 0;
17662
+ (function (EEmailStatuses) {
17663
+ EEmailStatuses["submitted"] = "submitted";
17664
+ EEmailStatuses["delivered"] = "delivered";
17665
+ EEmailStatuses["queued"] = "queued";
17666
+ EEmailStatuses["rejected"] = "rejected";
17667
+ EEmailStatuses["error"] = "error";
17668
+ EEmailStatuses["bounced"] = "bounced";
17669
+ EEmailStatuses["spam"] = "spam";
17670
+ EEmailStatuses["unsubscribed"] = "unsubscribed";
17671
+ EEmailStatuses["global_unsubscribed"] = "global_unsubscribed";
17672
+ EEmailStatuses["other"] = "other";
17673
+ })(exports.EEmailStatuses || (exports.EEmailStatuses = {}));
17661
17674
 
17662
17675
  var Email = /** @class */ (function () {
17663
17676
  function Email(params) {
17664
- this.id = params.id;
17677
+ this.email_id = params.email_id;
17665
17678
  this.email = params.email;
17679
+ this.status = params.status;
17680
+ this.provider = params.provider;
17681
+ this.submitted_time = params.submitted_time;
17682
+ this.unsubscribed = params.unsubscribed;
17683
+ this.global_unsubscribed = params.global_unsubscribed;
17684
+ this.soft_bounced = params.soft_bounced;
17685
+ this.hard_bounced = params.hard_bounced;
17686
+ this.reported_as_spam = params.reported_as_spam;
17687
+ this.open = params.open;
17688
+ this.click = params.click;
17689
+ this.list_id = params.list_id;
17666
17690
  this.sender = params.sender;
17667
17691
  this.content = params.content;
17668
17692
  this.tracking = params.tracking;
17669
17693
  this.additional_headers = params.additional_headers;
17670
- this.group_id = params.group_id;
17671
17694
  this.tags = params.tags;
17672
- this.queue_id = params.queue_id;
17673
- this.attachments = params.attachments;
17695
+ this.thumbnail_url = params.thumbnail_url;
17674
17696
  }
17675
17697
  Email.prototype.toJson = function () {
17676
17698
  return modelToJson(this);
@@ -17683,10 +17705,10 @@ var Email = /** @class */ (function () {
17683
17705
  var options = __rest(_a, []);
17684
17706
  return __generator(this, function (_b) {
17685
17707
  if (options.filter) {
17686
- options.filter += ";email_id==" + this.id;
17708
+ options.filter += ";email_id==" + this.email_id;
17687
17709
  }
17688
17710
  else {
17689
- options.filter = "email_id==" + this.id;
17711
+ options.filter = "email_id==" + this.email_id;
17690
17712
  }
17691
17713
  return [2 /*return*/, listEmailLogs(options)];
17692
17714
  });
@@ -17705,7 +17727,7 @@ var Email = /** @class */ (function () {
17705
17727
  Email.prototype.render = function () {
17706
17728
  return __awaiter(this, void 0, void 0, function () {
17707
17729
  return __generator(this, function (_a) {
17708
- return [2 /*return*/, renderEmail({ id: this.id.toString() })];
17730
+ return [2 /*return*/, renderEmail({ id: this.email_id.toString() })];
17709
17731
  });
17710
17732
  });
17711
17733
  };
@@ -1,31 +1,35 @@
1
1
  import { TEmailLog, TEmailReport } from "../../factories";
2
2
  import { TGetEmailReport, TListEmailLogs } from "../../services/emailAPI";
3
3
  import { TGenericListReturn } from "../../types";
4
- import { TEmail, TEmailAttachement } from "./types";
4
+ import { EEmailStatuses, TEmail, TEmailContent } from "./types";
5
5
  export declare class Email {
6
- readonly id: number;
6
+ readonly email_id: number;
7
7
  readonly email: string;
8
8
  readonly sender: {
9
9
  id: string;
10
10
  name: string;
11
11
  email: string;
12
12
  };
13
- readonly content: {
14
- subject: string;
15
- template_id: number;
16
- html: string;
17
- text: string;
18
- };
13
+ readonly content: TEmailContent;
19
14
  readonly tracking: {
20
15
  opens: boolean;
21
16
  clicks_html: boolean;
22
17
  clicks_text: boolean;
23
18
  };
24
19
  readonly additional_headers: any[];
25
- readonly group_id: number;
26
20
  readonly tags: string[];
27
- readonly queue_id: number;
28
- readonly attachments: TEmailAttachement[];
21
+ readonly status: EEmailStatuses;
22
+ readonly provider: string;
23
+ readonly submitted_time: number;
24
+ readonly unsubscribed: boolean;
25
+ readonly global_unsubscribed: boolean;
26
+ readonly soft_bounced: boolean;
27
+ readonly hard_bounced: boolean;
28
+ readonly reported_as_spam: boolean;
29
+ readonly open: number;
30
+ readonly click: number;
31
+ readonly list_id: number;
32
+ readonly thumbnail_url: string;
29
33
  constructor(params: TEmail);
30
34
  toJson(): any;
31
35
  set<T extends keyof this>(property: T, value: this[T]): void;
@@ -1,27 +1,31 @@
1
1
  export type TEmail = {
2
- id: number;
2
+ email_id: number;
3
3
  email: string;
4
+ status: EEmailStatuses;
5
+ provider: string;
6
+ submitted_time: number;
7
+ unsubscribed: boolean;
8
+ global_unsubscribed: boolean;
9
+ soft_bounced: boolean;
10
+ hard_bounced: boolean;
11
+ reported_as_spam: boolean;
12
+ open: number;
13
+ click: number;
14
+ list_id: number;
4
15
  sender: {
5
16
  id: string;
6
17
  name: string;
7
18
  email: string;
8
19
  };
9
- content: {
10
- subject: string;
11
- template_id: number;
12
- html: string;
13
- text: string;
14
- };
20
+ content: TEmailContent;
15
21
  tracking: {
16
22
  opens: boolean;
17
23
  clicks_html: boolean;
18
24
  clicks_text: boolean;
19
25
  };
20
- additional_headers: any[];
21
- group_id: number;
26
+ additional_headers: TEmailCustomAttribute[];
22
27
  tags: string[];
23
- queue_id: number;
24
- attachments: TEmailAttachement[];
28
+ thumbnail_url: string;
25
29
  };
26
30
  export type TEmailAttachement = {
27
31
  filename: string;
@@ -39,3 +43,25 @@ export declare enum EEmailAttachementTypes {
39
43
  "xls" = "xls",
40
44
  "xlsx" = "xlsx"
41
45
  }
46
+ export declare enum EEmailStatuses {
47
+ "submitted" = "submitted",
48
+ "delivered" = "delivered",
49
+ "queued" = "queued",
50
+ "rejected" = "rejected",
51
+ "error" = "error",
52
+ "bounced" = "bounced",
53
+ "spam" = "spam",
54
+ "unsubscribed" = "unsubscribed",
55
+ "global_unsubscribed" = "global_unsubscribed",
56
+ "other" = "other"
57
+ }
58
+ export type TEmailCustomAttribute = {
59
+ name: string;
60
+ value: string;
61
+ };
62
+ export type TEmailContent = {
63
+ subject: string;
64
+ template_id: number;
65
+ custom_attributes: TEmailCustomAttribute[];
66
+ type: "marketing" | "transactional";
67
+ };
package/dist/esm/index.js CHANGED
@@ -17638,19 +17638,41 @@ var EEmailAttachementTypes;
17638
17638
  EEmailAttachementTypes["xls"] = "xls";
17639
17639
  EEmailAttachementTypes["xlsx"] = "xlsx";
17640
17640
  })(EEmailAttachementTypes || (EEmailAttachementTypes = {}));
17641
+ var EEmailStatuses;
17642
+ (function (EEmailStatuses) {
17643
+ EEmailStatuses["submitted"] = "submitted";
17644
+ EEmailStatuses["delivered"] = "delivered";
17645
+ EEmailStatuses["queued"] = "queued";
17646
+ EEmailStatuses["rejected"] = "rejected";
17647
+ EEmailStatuses["error"] = "error";
17648
+ EEmailStatuses["bounced"] = "bounced";
17649
+ EEmailStatuses["spam"] = "spam";
17650
+ EEmailStatuses["unsubscribed"] = "unsubscribed";
17651
+ EEmailStatuses["global_unsubscribed"] = "global_unsubscribed";
17652
+ EEmailStatuses["other"] = "other";
17653
+ })(EEmailStatuses || (EEmailStatuses = {}));
17641
17654
 
17642
17655
  var Email = /** @class */ (function () {
17643
17656
  function Email(params) {
17644
- this.id = params.id;
17657
+ this.email_id = params.email_id;
17645
17658
  this.email = params.email;
17659
+ this.status = params.status;
17660
+ this.provider = params.provider;
17661
+ this.submitted_time = params.submitted_time;
17662
+ this.unsubscribed = params.unsubscribed;
17663
+ this.global_unsubscribed = params.global_unsubscribed;
17664
+ this.soft_bounced = params.soft_bounced;
17665
+ this.hard_bounced = params.hard_bounced;
17666
+ this.reported_as_spam = params.reported_as_spam;
17667
+ this.open = params.open;
17668
+ this.click = params.click;
17669
+ this.list_id = params.list_id;
17646
17670
  this.sender = params.sender;
17647
17671
  this.content = params.content;
17648
17672
  this.tracking = params.tracking;
17649
17673
  this.additional_headers = params.additional_headers;
17650
- this.group_id = params.group_id;
17651
17674
  this.tags = params.tags;
17652
- this.queue_id = params.queue_id;
17653
- this.attachments = params.attachments;
17675
+ this.thumbnail_url = params.thumbnail_url;
17654
17676
  }
17655
17677
  Email.prototype.toJson = function () {
17656
17678
  return modelToJson(this);
@@ -17663,10 +17685,10 @@ var Email = /** @class */ (function () {
17663
17685
  var options = __rest(_a, []);
17664
17686
  return __generator(this, function (_b) {
17665
17687
  if (options.filter) {
17666
- options.filter += ";email_id==" + this.id;
17688
+ options.filter += ";email_id==" + this.email_id;
17667
17689
  }
17668
17690
  else {
17669
- options.filter = "email_id==" + this.id;
17691
+ options.filter = "email_id==" + this.email_id;
17670
17692
  }
17671
17693
  return [2 /*return*/, listEmailLogs(options)];
17672
17694
  });
@@ -17685,7 +17707,7 @@ var Email = /** @class */ (function () {
17685
17707
  Email.prototype.render = function () {
17686
17708
  return __awaiter(this, void 0, void 0, function () {
17687
17709
  return __generator(this, function (_a) {
17688
- return [2 /*return*/, renderEmail({ id: this.id.toString() })];
17710
+ return [2 /*return*/, renderEmail({ id: this.email_id.toString() })];
17689
17711
  });
17690
17712
  });
17691
17713
  };
@@ -18917,4 +18939,4 @@ var UsersFactory = /** @class */ (function () {
18917
18939
  return UsersFactory;
18918
18940
  }());
18919
18941
 
18920
- 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, EEmailSummaryEngagement, EEvents, EListAttributeType, EMethods, EOperatorTypes, 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, ListPopupModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, OverlayHandler, 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, createPopup, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteAnyAutomation, deleteAutomation, deleteCampaign, deleteCampaignsReportsExport, deleteForm, deleteList, deletePartialInformation, deletePopup, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteUser, deleteWorkflow, descendingComparator, disableForm, disablePopup, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, 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, 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, listPopups, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, listWorkflows, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchForm, popImpersonificationTree, postMessage, publishForm, publishPopup, reScheduleCampaign, removeEmptyProperties, removeQueryParams, removeTrailingChar, renderCampaign, renderEmail, renderForm, renderPopup, renderPublicHtmlForm, renderTemplate, requestSupportService, resendVerificationEmail, resumeCampaign, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendCampaign, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unshareTemplate, updateAccount, updateAndClearUrlParams, updateAnyAutomation, updateAutomation, updateCampaign, updatePopup, updateSystemEmails, updateTemplate, updateUser, updateWorkflow, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
18942
+ 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, 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, ListPopupModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, OverlayHandler, 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, createPopup, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteAnyAutomation, deleteAutomation, deleteCampaign, deleteCampaignsReportsExport, deleteForm, deleteList, deletePartialInformation, deletePopup, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteUser, deleteWorkflow, descendingComparator, disableForm, disablePopup, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, 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, 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, listPopups, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, listWorkflows, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchForm, popImpersonificationTree, postMessage, publishForm, publishPopup, reScheduleCampaign, removeEmptyProperties, removeQueryParams, removeTrailingChar, renderCampaign, renderEmail, renderForm, renderPopup, renderPublicHtmlForm, renderTemplate, requestSupportService, resendVerificationEmail, resumeCampaign, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendCampaign, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unshareTemplate, updateAccount, updateAndClearUrlParams, updateAnyAutomation, updateAutomation, updateCampaign, updatePopup, updateSystemEmails, updateTemplate, updateUser, updateWorkflow, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
@@ -1,31 +1,35 @@
1
1
  import { TEmailLog, TEmailReport } from "../../factories";
2
2
  import { TGetEmailReport, TListEmailLogs } from "../../services/emailAPI";
3
3
  import { TGenericListReturn } from "../../types";
4
- import { TEmail, TEmailAttachement } from "./types";
4
+ import { EEmailStatuses, TEmail, TEmailContent } from "./types";
5
5
  export declare class Email {
6
- readonly id: number;
6
+ readonly email_id: number;
7
7
  readonly email: string;
8
8
  readonly sender: {
9
9
  id: string;
10
10
  name: string;
11
11
  email: string;
12
12
  };
13
- readonly content: {
14
- subject: string;
15
- template_id: number;
16
- html: string;
17
- text: string;
18
- };
13
+ readonly content: TEmailContent;
19
14
  readonly tracking: {
20
15
  opens: boolean;
21
16
  clicks_html: boolean;
22
17
  clicks_text: boolean;
23
18
  };
24
19
  readonly additional_headers: any[];
25
- readonly group_id: number;
26
20
  readonly tags: string[];
27
- readonly queue_id: number;
28
- readonly attachments: TEmailAttachement[];
21
+ readonly status: EEmailStatuses;
22
+ readonly provider: string;
23
+ readonly submitted_time: number;
24
+ readonly unsubscribed: boolean;
25
+ readonly global_unsubscribed: boolean;
26
+ readonly soft_bounced: boolean;
27
+ readonly hard_bounced: boolean;
28
+ readonly reported_as_spam: boolean;
29
+ readonly open: number;
30
+ readonly click: number;
31
+ readonly list_id: number;
32
+ readonly thumbnail_url: string;
29
33
  constructor(params: TEmail);
30
34
  toJson(): any;
31
35
  set<T extends keyof this>(property: T, value: this[T]): void;
@@ -1,27 +1,31 @@
1
1
  export type TEmail = {
2
- id: number;
2
+ email_id: number;
3
3
  email: string;
4
+ status: EEmailStatuses;
5
+ provider: string;
6
+ submitted_time: number;
7
+ unsubscribed: boolean;
8
+ global_unsubscribed: boolean;
9
+ soft_bounced: boolean;
10
+ hard_bounced: boolean;
11
+ reported_as_spam: boolean;
12
+ open: number;
13
+ click: number;
14
+ list_id: number;
4
15
  sender: {
5
16
  id: string;
6
17
  name: string;
7
18
  email: string;
8
19
  };
9
- content: {
10
- subject: string;
11
- template_id: number;
12
- html: string;
13
- text: string;
14
- };
20
+ content: TEmailContent;
15
21
  tracking: {
16
22
  opens: boolean;
17
23
  clicks_html: boolean;
18
24
  clicks_text: boolean;
19
25
  };
20
- additional_headers: any[];
21
- group_id: number;
26
+ additional_headers: TEmailCustomAttribute[];
22
27
  tags: string[];
23
- queue_id: number;
24
- attachments: TEmailAttachement[];
28
+ thumbnail_url: string;
25
29
  };
26
30
  export type TEmailAttachement = {
27
31
  filename: string;
@@ -39,3 +43,25 @@ export declare enum EEmailAttachementTypes {
39
43
  "xls" = "xls",
40
44
  "xlsx" = "xlsx"
41
45
  }
46
+ export declare enum EEmailStatuses {
47
+ "submitted" = "submitted",
48
+ "delivered" = "delivered",
49
+ "queued" = "queued",
50
+ "rejected" = "rejected",
51
+ "error" = "error",
52
+ "bounced" = "bounced",
53
+ "spam" = "spam",
54
+ "unsubscribed" = "unsubscribed",
55
+ "global_unsubscribed" = "global_unsubscribed",
56
+ "other" = "other"
57
+ }
58
+ export type TEmailCustomAttribute = {
59
+ name: string;
60
+ value: string;
61
+ };
62
+ export type TEmailContent = {
63
+ subject: string;
64
+ template_id: number;
65
+ custom_attributes: TEmailCustomAttribute[];
66
+ type: "marketing" | "transactional";
67
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakemail-org/ui-components-v2",
3
- "version": "2.2.5",
3
+ "version": "2.2.7",
4
4
  "description": "ui library kit made with material UI",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",