@cakemail-org/ui-components-v2 2.2.5 → 2.2.6
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 +28 -7
- package/dist/cjs/models/emailAPI/index.d.ts +14 -11
- package/dist/cjs/models/emailAPI/types.d.ts +36 -11
- package/dist/esm/index.js +29 -8
- package/dist/esm/models/emailAPI/index.d.ts +14 -11
- package/dist/esm/models/emailAPI/types.d.ts +36 -11
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -17658,19 +17658,40 @@ 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.
|
|
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;
|
|
17674
17695
|
}
|
|
17675
17696
|
Email.prototype.toJson = function () {
|
|
17676
17697
|
return modelToJson(this);
|
|
@@ -17683,10 +17704,10 @@ var Email = /** @class */ (function () {
|
|
|
17683
17704
|
var options = __rest(_a, []);
|
|
17684
17705
|
return __generator(this, function (_b) {
|
|
17685
17706
|
if (options.filter) {
|
|
17686
|
-
options.filter += ";email_id==" + this.
|
|
17707
|
+
options.filter += ";email_id==" + this.email_id;
|
|
17687
17708
|
}
|
|
17688
17709
|
else {
|
|
17689
|
-
options.filter = "email_id==" + this.
|
|
17710
|
+
options.filter = "email_id==" + this.email_id;
|
|
17690
17711
|
}
|
|
17691
17712
|
return [2 /*return*/, listEmailLogs(options)];
|
|
17692
17713
|
});
|
|
@@ -17705,7 +17726,7 @@ var Email = /** @class */ (function () {
|
|
|
17705
17726
|
Email.prototype.render = function () {
|
|
17706
17727
|
return __awaiter(this, void 0, void 0, function () {
|
|
17707
17728
|
return __generator(this, function (_a) {
|
|
17708
|
-
return [2 /*return*/, renderEmail({ id: this.
|
|
17729
|
+
return [2 /*return*/, renderEmail({ id: this.email_id.toString() })];
|
|
17709
17730
|
});
|
|
17710
17731
|
});
|
|
17711
17732
|
};
|
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
import { TEmailLog, TEmailReport } from "../../factories";
|
|
2
2
|
import { TGetEmailReport, TListEmailLogs } from "../../services/emailAPI";
|
|
3
3
|
import { TGenericListReturn } from "../../types";
|
|
4
|
-
import { TEmail,
|
|
4
|
+
import { EEmailStatuses, TEmail, TEmailContent } from "./types";
|
|
5
5
|
export declare class Email {
|
|
6
|
-
readonly
|
|
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
|
|
28
|
-
readonly
|
|
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;
|
|
29
32
|
constructor(params: TEmail);
|
|
30
33
|
toJson(): any;
|
|
31
34
|
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
export type TEmail = {
|
|
2
|
-
|
|
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:
|
|
21
|
-
group_id: number;
|
|
26
|
+
additional_headers: TEmailCustomAttribute[];
|
|
22
27
|
tags: string[];
|
|
23
|
-
queue_id: number;
|
|
24
|
-
attachments: TEmailAttachement[];
|
|
25
28
|
};
|
|
26
29
|
export type TEmailAttachement = {
|
|
27
30
|
filename: string;
|
|
@@ -39,3 +42,25 @@ export declare enum EEmailAttachementTypes {
|
|
|
39
42
|
"xls" = "xls",
|
|
40
43
|
"xlsx" = "xlsx"
|
|
41
44
|
}
|
|
45
|
+
export declare enum EEmailStatuses {
|
|
46
|
+
"submitted" = "submitted",
|
|
47
|
+
"delivered" = "delivered",
|
|
48
|
+
"queued" = "queued",
|
|
49
|
+
"rejected" = "rejected",
|
|
50
|
+
"error" = "error",
|
|
51
|
+
"bounced" = "bounced",
|
|
52
|
+
"spam" = "spam",
|
|
53
|
+
"unsubscribed" = "unsubscribed",
|
|
54
|
+
"global_unsubscribed" = "global_unsubscribed",
|
|
55
|
+
"other" = "other"
|
|
56
|
+
}
|
|
57
|
+
export type TEmailCustomAttribute = {
|
|
58
|
+
name: string;
|
|
59
|
+
value: string;
|
|
60
|
+
};
|
|
61
|
+
export type TEmailContent = {
|
|
62
|
+
subject: string;
|
|
63
|
+
template_id: number;
|
|
64
|
+
custom_attributes: TEmailCustomAttribute[];
|
|
65
|
+
type: "marketing" | "transactional";
|
|
66
|
+
};
|
package/dist/esm/index.js
CHANGED
|
@@ -17638,19 +17638,40 @@ 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.
|
|
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;
|
|
17654
17675
|
}
|
|
17655
17676
|
Email.prototype.toJson = function () {
|
|
17656
17677
|
return modelToJson(this);
|
|
@@ -17663,10 +17684,10 @@ var Email = /** @class */ (function () {
|
|
|
17663
17684
|
var options = __rest(_a, []);
|
|
17664
17685
|
return __generator(this, function (_b) {
|
|
17665
17686
|
if (options.filter) {
|
|
17666
|
-
options.filter += ";email_id==" + this.
|
|
17687
|
+
options.filter += ";email_id==" + this.email_id;
|
|
17667
17688
|
}
|
|
17668
17689
|
else {
|
|
17669
|
-
options.filter = "email_id==" + this.
|
|
17690
|
+
options.filter = "email_id==" + this.email_id;
|
|
17670
17691
|
}
|
|
17671
17692
|
return [2 /*return*/, listEmailLogs(options)];
|
|
17672
17693
|
});
|
|
@@ -17685,7 +17706,7 @@ var Email = /** @class */ (function () {
|
|
|
17685
17706
|
Email.prototype.render = function () {
|
|
17686
17707
|
return __awaiter(this, void 0, void 0, function () {
|
|
17687
17708
|
return __generator(this, function (_a) {
|
|
17688
|
-
return [2 /*return*/, renderEmail({ id: this.
|
|
17709
|
+
return [2 /*return*/, renderEmail({ id: this.email_id.toString() })];
|
|
17689
17710
|
});
|
|
17690
17711
|
});
|
|
17691
17712
|
};
|
|
@@ -18917,4 +18938,4 @@ var UsersFactory = /** @class */ (function () {
|
|
|
18917
18938
|
return UsersFactory;
|
|
18918
18939
|
}());
|
|
18919
18940
|
|
|
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 };
|
|
18941
|
+
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,34 @@
|
|
|
1
1
|
import { TEmailLog, TEmailReport } from "../../factories";
|
|
2
2
|
import { TGetEmailReport, TListEmailLogs } from "../../services/emailAPI";
|
|
3
3
|
import { TGenericListReturn } from "../../types";
|
|
4
|
-
import { TEmail,
|
|
4
|
+
import { EEmailStatuses, TEmail, TEmailContent } from "./types";
|
|
5
5
|
export declare class Email {
|
|
6
|
-
readonly
|
|
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
|
|
28
|
-
readonly
|
|
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;
|
|
29
32
|
constructor(params: TEmail);
|
|
30
33
|
toJson(): any;
|
|
31
34
|
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
export type TEmail = {
|
|
2
|
-
|
|
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:
|
|
21
|
-
group_id: number;
|
|
26
|
+
additional_headers: TEmailCustomAttribute[];
|
|
22
27
|
tags: string[];
|
|
23
|
-
queue_id: number;
|
|
24
|
-
attachments: TEmailAttachement[];
|
|
25
28
|
};
|
|
26
29
|
export type TEmailAttachement = {
|
|
27
30
|
filename: string;
|
|
@@ -39,3 +42,25 @@ export declare enum EEmailAttachementTypes {
|
|
|
39
42
|
"xls" = "xls",
|
|
40
43
|
"xlsx" = "xlsx"
|
|
41
44
|
}
|
|
45
|
+
export declare enum EEmailStatuses {
|
|
46
|
+
"submitted" = "submitted",
|
|
47
|
+
"delivered" = "delivered",
|
|
48
|
+
"queued" = "queued",
|
|
49
|
+
"rejected" = "rejected",
|
|
50
|
+
"error" = "error",
|
|
51
|
+
"bounced" = "bounced",
|
|
52
|
+
"spam" = "spam",
|
|
53
|
+
"unsubscribed" = "unsubscribed",
|
|
54
|
+
"global_unsubscribed" = "global_unsubscribed",
|
|
55
|
+
"other" = "other"
|
|
56
|
+
}
|
|
57
|
+
export type TEmailCustomAttribute = {
|
|
58
|
+
name: string;
|
|
59
|
+
value: string;
|
|
60
|
+
};
|
|
61
|
+
export type TEmailContent = {
|
|
62
|
+
subject: string;
|
|
63
|
+
template_id: number;
|
|
64
|
+
custom_attributes: TEmailCustomAttribute[];
|
|
65
|
+
type: "marketing" | "transactional";
|
|
66
|
+
};
|