@beefree.io/sdk
Version:
wrapper of BeefreeSDK
1,520 lines • 73.1 kB
TypeScript
import * as CSS from 'csstype';
import { KebabKeys, RecursivePartial, RequireAtLeastOne, valueof, ValueOf } from './utils';
export interface IUrlConfig {
beePluginUrl?: string;
authUrl?: string;
}
export interface IBeeOptions {
shared?: boolean;
}
export interface TemplateLanguage {
label: string;
value: string;
twoCharsCode: string;
isMain: boolean;
}
export interface BeeSaveOptions {
language?: string;
}
export interface IGetTokenPayload {
clientId: string;
clientSecret: string;
}
export declare enum StageModeOptions {
DESKTOP = "desktop",
MOBILE = "mobile"
}
export declare enum StageDisplayOptions {
BLUR = "blur",
HIDE = "hide"
}
export interface ILoadStageMode {
mode: StageModeOptions;
display: StageDisplayOptions;
}
export type ILoadConfig = ILoadableProps;
export interface ILanguage {
language: string;
}
export interface IExecCommandReturnValue {
status: 'success' | 'error';
data?: Record<string, unknown>;
}
export declare enum SidebarTabs {
CONTENT = "content",
SETTINGS = "settings",
ROWS = "rows"
}
export type ExecCommand = Promise<IExecCommandReturnValue>;
export declare enum ExecCommands {
SELECT = "select",
SCROLL = "scroll",
HIGHLIGHT = "highlight",
FOCUS = "focus",
TAB = "tab"
}
export interface IExecCommandOptions {
target?: {
uuid?: string;
row?: number;
column?: number;
module?: number;
key?: string;
selector?: string;
} | SidebarTabs;
}
export declare enum LoadWorkspaceOptions {
DEFAULT = "default",
MIXED = "mixed",
AMP_ONLY = "amp_only",
HTML_ONLY = "html_only"
}
export declare enum BeePluginErrorCodes {
SAVE_UNAVAILABLE = 1000,
AMP_CONTENT_DETECTED = 1001,
INVALID_TEMPLATES = 1100,
TEMPLATE_CANNOT_SAVED = 1200,
LOCKED_ROW_CLICKED = 1300,
LOCKED_MODULE_CLICKED = 1310,
WORKSPACE_NOT_AVAILABLE = 1002,
FEATURE_NOT_AVAILABLE_FOR_PLAN = 1704,
GENERIC_BUMP_ERROR = 2000,
INVALID_TARGET_VERSION = 2100,
VALIDATION_ERROR_DETAIL = 2200,
MISSING_TEMPLATE_VERSION = 2300,
INVALID_TEMPLATE_VERSION = 2400,
TRASFORMATION_ERROR = 2500,
BACKWARD_TRASFORMATION_ERROR = 2600,
SERVICE_ERROR = 3000,
API_GENERIC_ERROR = 9900,
GENERIC_ERROR = 9999,
FSP_GENERIC_ERROR = 3001,
FSP_BE_GENERIC_ERROR = 3100,
FSP_RESOURCE_NOT_FOUND = 3200,
FSP_PERMISSION_DENIED = 3300,
FSP_RESOURCE_ALREADY_EXIST = 3400,
FSP_FILE_NOT_UPLOADED = 3450,
FSP_REQUEST_ERROR = 3500,
FSP_USER_ERROR = 3600,
FSP_WRONG_CREDENTIALS = 3650,
AUTH_HEADER_MISSING = 4001,
AUTH_BEARER_INVALID = 4005,
AUTH_TOKEN_EXPIRED = 4010,
BUMP_SERVICE_ERROR = 4015,
JSON_GENERIC_ERROR = 4101,
JSON_CODE_TAG_ERROR = 4105,
JSON_HTML_BLOCK_ERROR = 4110,
JSON_CONDITIONAL_STATEMENT_ERROR = 4115,
JSON_ADD_ROW_CONDITIONAL_STATEMENT_ERROR = 4120,
JSON_ADD_ROW_STYLE_ERROR = 4125,
JSON_ADD_ROW_CLASS_ERROR = 4130,
JSON_ADD_ROW_COMPUTED_STYLE_ERROR = 4135,
JSON_CELL_WIDTH_ERROR = 4140,
JSON_ADD_COLUMN_BACKGROUND_ERROR = 4145,
JSON_MAIN_CSS_ERROR = 4190,
JSON_MAIN_CSS_MEDIA_ERROR = 4191,
JSON_SPECIFIC_CSS_ERROR = 4192,
JSON_CSS_RULE_ERROR = 4501,
JSON_CSS_GENERALE_PAGE_ERROR = 4502,
JSON_BODY_CSS_ERROR = 4503,
JSON_COVERTING_CSS_ERROR = 4504,
HTML_TO_JSON_CONVERT_ERROR = 4201,
HTML_COMMUNICATION_TO_JSON__ERROR = 4202,
HTML_COMMUNICATION_WORKER_TEXT_ERROR = 4210,
HTML_TEXT_ERROR = 4211,
HTML_COMMUNICATION_WORKER_BUTTON_ERROR = 4220,
HTML_BUTTON_ERROR = 4221,
HTML_COMMUNICATION_WORKER_VIDEO_ERROR = 4230,
HTML_VIDEO_ERROR = 4231,
HTML_COMMUNICATION_WORKER_SOCIAL_ERROR = 4240,
HTML_SOCIAL_ERROR = 4241,
HTML_COMMUNICATION_WORKER_ICON_ERROR = 4242,
HTML_ICON_ERROR = 4243,
HTML_COMMUNICATION_WORKER_MENU_ERROR = 4244,
HTML_MENU_ERROR = 4245,
HTML_COMMUNICATION_WORKER_IMAGE_ERROR = 4250,
HTML_IMAGE_ERROR = 4251,
HTML_COMMUNICATION_WORKER_MG_ERROR = 4260,
HTML_CUSTOM_ADDON_ERROR = 4270,
HTML_POST_GENERIC_ERROR = 4301,
HTML_POST_IMAGE_URI_ERROR = 4310,
HTML_POST_CUSTOM_HTML_ERROR = 4320,
HTML_POST_CUSTOM_CODE_TAG_ERROR = 4330,
HTML_POST_DISPLAY_CONDITION = 4340,
RENDER_GENERIC_ERROR = 4600,
RENDER_CLEAN_HTML_ERROR = 4601,
RENDER_CLEAN_TEXT_ERROR = 4602,
RENDER_CHECK_FORM_ERROR = 4603,
RENDER_VALIDATION_ERROR = 4604,
RENDER_VIDEO_FORMAT_NOT_SUPPORTED_ERROR = 4605,
POST_PROCESSING_FINAL_PAGE_ERROR = 4700,
EXPIRED_TOKEN_CANNOT_REFRESHED = 5101,
EXPIRED_TOKEN_MUST_REFRESHED = 5102,
WEBHOOK_CALL_FAILED = 5250,
FE_API_GENERIC_ERROR = 7000,
FE_API_INVALID_COMMAND = 7005,
FE_API_INVALID_COMMAND_OPTIONS = 7010,
FE_API_ENTITY_LOCKED = 7020,
FE_API_ENTITY_NOT_FOUND = 7030,
FE_API_ELEMENT_NOT_FOUND = 7040,
FE_API_FORBIDDEN_COMMAND = 7050
}
export type BeePluginError = {
code?: BeePluginErrorCodes;
detail?: string;
message: string;
data?: BeePluginErrorData;
};
export declare enum OnInfoDetailHandle {
AI_INTEGRATION = "ai-integration",
AI_ALT_TEXT = "ai-alt-text",
AI_IMAGE_GENERATION = "ai-image-generation"
}
export type AiIntegrationErrorDetail = {
handle: OnInfoDetailHandle.AI_INTEGRATION;
promptId: string;
usage: {
prompt_tokens: number;
completion_tokens: number;
total_tokens: number;
prompt_tokens_details: {
cached_tokens: number;
};
completion_tokens_details: {
reasoning_tokens: number;
};
};
};
export type AiAltTextErrorDetail = {
handle: OnInfoDetailHandle.AI_ALT_TEXT;
uid: string;
consumedImages: number;
};
export type AiImageGenerationErrorDetail = {
handle: OnInfoDetailHandle.AI_IMAGE_GENERATION;
uid: string;
consumedImages: number;
};
export type BeePluginInfo = {
code: BeePluginErrorCodes;
message: string;
detail: AiIntegrationErrorDetail | AiAltTextErrorDetail | AiImageGenerationErrorDetail;
};
type KebabCSSProperties = KebabKeys<CSS.Properties>;
export type BeePluginErrorData = {
uuid: string;
config: IPluginRow | IPluginModule;
};
export declare const ModuleTypes: {
readonly DIVIDER: "mailup-bee-newsletter-modules-divider";
readonly TEXT: "mailup-bee-newsletter-modules-text";
readonly IMAGE: "mailup-bee-newsletter-modules-image";
readonly BUTTON: "mailup-bee-newsletter-modules-button";
readonly HTML: "mailup-bee-newsletter-modules-html";
readonly SOCIAL: "mailup-bee-newsletter-modules-social";
readonly EMPTY: "mailup-bee-newsletter-modules-empty";
readonly VIDEO: "mailup-bee-newsletter-modules-video";
readonly ADDON: "mailup-bee-newsletter-modules-addon";
readonly FORM: "mailup-bee-newsletter-modules-form";
readonly MERGE_CONTENT: "mailup-bee-newsletter-modules-merge-content";
readonly CAROUSEL: "mailup-bee-newsletter-modules-carousel";
readonly MENU: "mailup-bee-newsletter-modules-menu";
readonly ICONS: "mailup-bee-newsletter-modules-icons";
readonly HEADING: "mailup-bee-newsletter-modules-heading";
readonly SPACER: "mailup-bee-newsletter-modules-spacer";
readonly PARAGRAPH: "mailup-bee-newsletter-modules-paragraph";
readonly LIST: "mailup-bee-newsletter-modules-list";
readonly TABLE: "mailup-bee-newsletter-modules-table";
};
export declare const ModuleDescriptorNames: {
readonly DIVIDER: "divider";
readonly TEXT: "text";
readonly IMAGE: "image";
readonly BUTTON: "button";
readonly HTML: "html";
readonly SOCIAL: "social";
readonly VIDEO: "video";
readonly ADDON: "addon";
readonly FORM: "form";
readonly MERGE_CONTENT: "mergeContent";
readonly CAROUSEL: "carousel";
readonly MENU: "menu";
readonly ICONS: "icons";
readonly HEADING: "heading";
readonly SPACER: "spacer";
readonly PARAGRAPH: "paragraph";
readonly LIST: "list";
};
export declare const ModuleDescriptorOrderNames: {
readonly DIVIDER: "Divider";
readonly TEXT: "Text";
readonly IMAGE: "Image";
readonly BUTTON: "Button";
readonly HTML: "Html";
readonly SOCIAL: "Social";
readonly VIDEO: "Video";
readonly FORM: "Form";
readonly MERGE_CONTENT: "MergeContent";
readonly CAROUSEL: "Carousel";
readonly MENU: "Menu";
readonly ICONS: "Icons";
readonly HEADING: "Heading";
readonly SPACER: "Spacer";
readonly PARAGRAPH: "Paragraph";
readonly LIST: "List";
};
export interface IModulesGroups {
label: string;
collapsable: boolean;
collapsedOnLoad: boolean;
modulesNames: ValueOf<typeof ModuleDescriptorOrderNames>[] | string[];
}
export interface IPluginModuleHeading {
type: typeof ModuleTypes.HEADING;
locked?: boolean;
uuid: string;
descriptor: {
id?: string;
computedStyle: {
height: number;
width: number;
};
style: {
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
'text-align': string;
width: string;
};
heading: {
style: {
color: string;
direction: string;
'font-family': string;
'font-size': string;
'font-weight': string;
'letter-spacing': string;
'line-height': string;
'link-color': string;
'text-align': string;
};
text: string;
title: 'h1' | 'h2' | 'h3';
};
};
}
export interface IPluginModuleParagraph {
type: typeof ModuleTypes.PARAGRAPH;
locked?: boolean;
uuid: string;
descriptor: {
id?: string;
style: Partial<{
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
}>;
computedStyle: Partial<{
hideContentOnAmp: boolean;
hideContentOnDesktop: boolean;
hideContentOnHtml: boolean;
hideContentOnMobile: boolean;
}>;
paragraph: {
computedStyle: Partial<{
linkColor: string;
paragraphSpacing: string;
}>;
html: string;
style: Partial<{
color: string;
direction: string;
'font-family': string;
'font-size': string;
'font-weight': string;
'letter-spacing': string;
'line-height': string;
'text-align': string;
}>;
};
};
}
export interface IPluginModuleButton {
type: typeof ModuleTypes.BUTTON;
locked?: boolean;
uuid: string;
descriptor: {
id?: string;
style: {
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
'text-align': string;
};
computedStyle: {
height: number;
hideContentOnMobile: boolean;
width: number;
};
hoverStyle: {
"background-color": string;
"color": string;
"border-top": string;
"border-right": string;
"border-bottom": string;
"border-left": string;
};
button: {
href: string;
label: string;
style: {
'background-color': string;
'border-bottom': string;
'border-left': string;
'border-radius': string;
'border-right': string;
'border-top': string;
'color': string;
'font-family': string;
'font-weight': string;
'line-height': string;
'max-width': string;
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
'width': string;
};
};
};
}
export interface IPluginModuleList {
type: typeof ModuleTypes.LIST;
locked?: boolean;
uuid: string;
descriptor: {
id?: string;
style: {
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
};
computedStyle: {
hideContentOnAmp: boolean;
hideContentOnDesktop: boolean;
hideContentOnHtml: boolean;
hideContentOnMobile: boolean;
};
list: {
html: string;
tag: string;
style: {
color: string;
direction: string;
'font-family': string;
'font-size': string;
'font-weight': string;
'letter-spacing': string;
'line-height': string;
'text-align': string;
};
computedStyle: {
liIndent: string;
liSpacing: string;
linkColor: string;
listStylePosition: string;
listStyleType: string;
startList: string;
startListFrom: string;
};
};
};
}
export interface IPluginModuleDivider {
type: typeof ModuleTypes.DIVIDER;
locked?: boolean;
uuid: string;
descriptor: {
id?: string;
style: {
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
};
computedStyle: {
align: string;
hideContentOnMobile: boolean;
};
divider: {
style: {
'border-top': string;
width: string;
};
};
};
}
export interface IPluginModuleForm {
type: typeof ModuleTypes.FORM;
locked?: boolean;
uuid: string;
descriptor: {
id?: string;
computedStyle: {
class: string;
hideContentOnDesktop: boolean;
hideContentOnMobile: boolean;
};
style: {
'background-color': string;
'font-family': string;
'font-size': string;
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
'text-align': string;
width: string;
};
form: {
attributes: unknown;
structure: unknown;
style: {
buttons: {
backgroundColor: string;
'border-bottom': string;
'border-left': string;
'border-radius': string;
'border-right': string;
'border-top': string;
color: string;
'line-height': string;
'max-width': string;
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
'text-align': string;
'font-weight': string;
'font-style': string;
'letter-spacing': string;
width: string;
outer: {
flexGrow: number;
display: string;
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
};
};
fields: {
backgroundColor: string;
'border-bottom': string;
'border-left': string;
'border-radius': string;
'border-right': string;
'border-top': string;
color: string;
outlineColor: string;
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
};
labels: {
color: string;
'font-style': string;
'font-weight': string;
'label-position': string;
'line-height': string;
'text-align': string;
'min-width': string;
'letter-spacing': string;
};
};
};
};
}
export interface IPluginModuleSocialIcon {
id: string;
image: {
alt: string;
href: string;
prefix: string;
src: string;
title: string;
};
name: string;
text: string;
type: string;
}
export interface IPluginModuleSocial {
type: typeof ModuleTypes.SOCIAL;
locked?: boolean;
uuid: string;
descriptor: {
id?: string;
style: {
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
'text-align': string;
};
computedStyle: {
height: number;
hideContentOnMobile: boolean;
iconsDefaultWidth: number;
padding: string;
width: number;
};
iconsList: {
icons: IPluginModuleSocialIcon[];
};
};
}
export interface IPluginModuleMenuItem {
link: {
href: string;
target: string;
title: string;
};
text: string;
}
export interface IPluginModuleMenu {
type: typeof ModuleTypes.MENU;
locked?: boolean;
uuid: string;
descriptor: {
id?: string;
computedStyle: {
hideContentOnDesktop: boolean;
hideContentOnMobile: boolean;
layout: string;
linkColor: string;
hamburger: {
backgroundColor: string;
foregroundColor: string;
iconSize: string;
iconType: string;
mobile: boolean;
};
menuItemsSpacing: {
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
};
};
style: {
color: string;
'font-family': string;
'font-size': string;
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
'text-align': string;
};
menuItemsList: {
items: IPluginModuleMenuItem[];
};
};
}
export interface IPluginModuleTable {
type: typeof ModuleTypes.TABLE;
uuid: string;
descriptor: {
id?: string;
style: {
'padding-top': string;
'padding-right': string;
'padding-bottom': string;
'padding-left': string;
};
table: {
content: {
headers: {
cells: {
html: string;
}[];
}[];
rows: {
cells: {
html: string;
}[];
}[];
};
style: {
color: string;
'font-size': string;
'font-family': string;
'font-weight': string;
'line-height': string;
'text-align': string;
direction: string;
'letter-spacing': string;
'background-color': string;
'border-top': string;
'border-right': string;
'border-bottom': string;
'border-left': string;
};
computedStyle: {
alternateRowBackgroundColor: string;
linkColor: string;
headersFontSize: string;
headersFontWeight: string;
headersTextAlign: string;
headersBackgroundColor: string;
headersColor: string;
};
};
};
}
export interface IPluginModuleSpacer {
type: typeof ModuleTypes.SPACER;
locked?: boolean;
uuid: string;
descriptor: {
id?: string;
spacer: {
style: {
height: string;
};
};
computedStyle: {
hideContentOnMobile: boolean;
};
};
}
export type IPluginModuleIcons = {
descriptor: {
computedStyle: {
hideContentOnDesktop: boolean;
hideContentOnMobile: boolean;
iconHeight: string;
iconSpacing: {
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
};
itemsSpacing: string;
};
id: 'iconsList';
iconsList: {
icons: {
height: string;
href: string;
id: string;
image: string;
target: string;
text: string;
textPosition: string;
width: string;
}[];
};
style: {
color: string;
'font-family': string;
'font-size': string;
'font-weight': string;
'padding-bottom': string;
'padding-left': string;
'padding-right': string;
'padding-top': string;
'text-align': string;
};
};
locked: boolean;
type: string;
uuid: string;
};
export type IPluginModule = IPluginModuleHeading | IPluginModuleParagraph | IPluginModuleButton | IPluginModuleList | IPluginModuleDivider | IPluginModuleForm | IPluginModuleIcons | IPluginModuleSocial | IPluginModuleMenu | IPluginModuleSpacer | IPluginModuleTable;
export interface IPluginColumn {
'grid-columns': number;
modules: IPluginModule[];
style: KebabCSSProperties;
uuid: string;
}
export interface IPluginDisplayCondition {
after?: string;
before?: string;
className?: string;
description?: string;
isActive: boolean;
label?: string;
type?: string;
name?: string;
}
export type IPluginComputedStyle = Partial<{
class: string;
height: number | string;
width: number | string;
hideContentOnAmp: boolean;
hideContentOnHtml: boolean;
hideContentOnMobile: boolean;
hideContentOnDesktop: boolean;
linkColor: string;
messageBackgroundColor: string;
messageWidth: string;
rowColStackOnMobile: boolean;
rowReverseColStackOnMobile: boolean;
iconsDefaultWidth: number;
padding: string;
align: string;
paragraphSpacing: string;
liIndent: string;
liSpacing: string;
listStylePosition: string;
listStyleType: string;
startList: string;
startListFrom: string;
itemsSpacing: string;
iconHeight: string;
layout: string;
menuItemsSpacing: {
[x: string]: string;
};
iconSpacing: {
[x: string]: string;
};
hamburger: {
[x: string]: unknown;
};
}>;
export interface IPluginContent {
style?: KebabCSSProperties;
computedStyle?: IPluginComputedStyle;
}
export interface IPluginRowContent {
computedStyle?: IPluginComputedStyle;
style: KebabCSSProperties;
}
export interface IPluginRowContainer {
style: KebabCSSProperties;
displayCondition?: IPluginDisplayCondition;
}
export type RowsConfiguration = {
emptyRows?: boolean;
defaultRows?: boolean;
externalContentURLs?: CustomRowConfiguration[];
maxRowsDisplayed?: number;
selectedRowType?: string;
};
export type CustomRowBehaviors = {
canEdit?: boolean;
canDelete?: boolean;
canDeleteSyncedRows?: boolean;
canEditSyncedRows?: boolean;
};
export type CustomRowConfiguration = {
name?: string;
value?: string;
handle?: string;
isLocal?: boolean;
behaviors?: CustomRowBehaviors;
};
export type MergeContentsHandler = {
name: string;
value: string;
};
export type RowDisplayConditionsHandler = {
after: string;
before: string;
type: string;
label: string;
description: string;
};
export type IUpsellConfiguration = Partial<IBeeConfig>;
export declare const RowLayoutType: {
readonly ONE_COLUMNS_EMPTY: "one-column-empty";
readonly TWO_COLUMNS_EMPTY: "two-columns-empty";
readonly TWO_COLUMNS_4_8_EMPTY: "two-columns-4-8-empty";
readonly TWO_COLUMNS_8_4_EMPTY: "two-columns-8-4-empty";
readonly TWO_COLUMNS_3_9_EMPTY: "two-columns-3-9-empty";
readonly TWO_COLUMNS_9_3_EMPTY: "two-columns-9-3-empty";
readonly THREE_COLUMNS_EMPTY: "three-columns-empty";
readonly THREE_COLUMNS_3_3_6_EMPTY: "three-columns-3-3-6-empty";
readonly THREE_COLUMNS_3_6_3_EMPTY: "three-columns-3-6-3-empty";
readonly THREE_COLUMNS_6_3_3_EMPTY: "three-columns-6-3-3-empty";
readonly FOUR_COLUMNS_EMPTY: "four-columns-empty";
readonly SIX_COLUMNS_EMPTY: "six-columns-empty";
};
export interface IPluginRow {
columns: IPluginColumn[];
container: IPluginRowContainer;
content: IPluginContent;
type: ValueOf<typeof RowLayoutType>;
uuid: string;
locked?: boolean;
synced?: boolean;
metadata?: Record<string, unknown>;
empty?: boolean;
name?: string;
}
export interface IPluginEditDeleteRow {
handle: string;
label: string;
row: Partial<IPluginRow>;
value: string;
}
export interface IInvitedMention {
username: string;
value: string;
uid: string | number;
userColor?: string;
}
export interface IPluginForm {
structure: {
attributes: Record<string, unknown>;
fields: Record<string, unknown>;
layout: unknown[];
title: string;
description: string;
};
}
export interface IPluginFilePicker {
url: string;
}
export declare enum EngageHandle {
MDM = "mdm"
}
export type BeePluginContentDialogHandler<K, T = undefined, A = K> = (resolve: (data: K, options?: Record<string, unknown>) => void, reject: () => void, args: A, handle?: T) => Promise<void>;
export type BeePluginConfigurationsHooks = {
getMentions?: {
handler: BeePluginContentDialogHandler<IInvitedMention[], undefined, string>;
};
getRows?: {
handler: BeePluginContentDialogHandler<IPluginRow[], undefined, {
handle: string;
value: string;
}>;
};
};
export declare enum OnCommentChangeEnum {
NEWCOMMENT = "NEW_COMMENT",
DELETECOMMENT = "COMMENT_DELETED",
CHANGECOMMENT = "COMMENT_EDITED",
THREADRESOLVED = "COMMENT_THREAD_RESOLVED",
THREADREOPENED = "COMMENT_THREAD_REOPENED"
}
export type IAuthor = {
userHandle: string;
username: string;
userColor: string;
};
export type BeePluginCommentPayload = {
author: IAuthor;
content: string;
elementId: string;
mentions: string[];
parentCommentId: string;
responses: string[];
timestamp: string;
};
export type BeePluginUpdatePayload = {
content: string;
mentions: string[];
};
export type BeePluginOnCommentChangePayloadWithComment = {
type: OnCommentChangeEnum.NEWCOMMENT | OnCommentChangeEnum.THREADRESOLVED | OnCommentChangeEnum.THREADREOPENED;
payload: {
commentId: string;
comment: BeePluginCommentPayload;
};
};
export type BeePluginOnCommentChangePayloadForWithUpdate = {
type: OnCommentChangeEnum.CHANGECOMMENT;
payload: {
commentId: string;
update: BeePluginUpdatePayload;
};
};
export type BeePluginOnCommentChangePayloadForWithDeletedComment = {
type: OnCommentChangeEnum.DELETECOMMENT;
payload: {
commentId: string;
deletedComment: BeePluginCommentPayload;
deletedResponses: {
[commentId: string]: BeePluginCommentPayload;
};
};
};
export type BeePluginOnCommentChangePayload = (BeePluginOnCommentChangePayloadWithComment | BeePluginOnCommentChangePayloadForWithUpdate | BeePluginOnCommentChangePayloadForWithDeletedComment);
export type BeePluginOnCommentPayload = {
change: BeePluginOnCommentChangePayload;
comments: {
[commentId: string]: BeePluginCommentPayload;
};
threadUsers: {
contributors: IAuthor[];
};
collaboration?: boolean;
};
export interface IMergeTag {
name: string;
value: string;
previewValue?: string;
}
export interface IMergeContent {
name: string;
value: string;
id?: number;
}
export interface ISpecialLink {
label: string;
link: string;
type: string;
id?: number;
}
export type BeePluginAdvancedPermissionStageToggle = {
locked: boolean;
engage: {
enabled: boolean;
handle: EngageHandle.MDM;
tooltip?: string;
};
};
export type AdvancedSettingsBehaviours = {
canSelect: boolean;
canAdd: boolean;
canViewSidebar: boolean;
canClone: boolean;
canMove: boolean;
canDelete: boolean;
};
export type AdvancedSettingsShowLocked = {
show: boolean;
locked: boolean;
};
export type AdvancedSettingsTextEditor = {
toolbar: string[];
fontSizes: string;
};
export type CustomAttribute = {
key: string;
name?: string;
value?: string | boolean | null | string[];
target: string;
required?: boolean;
};
export type CustomAttributes = {
attributes?: CustomAttribute[];
enableOpenFields?: boolean;
};
export type BeePluginAdvancedPermission = RecursivePartial<{
components: {
colorPicker?: {
canViewColorInput: boolean;
canViewSliders: boolean;
canSetAlpha: boolean;
canViewSwatches: boolean;
canChangeTextEditorColor: boolean;
};
filePicker?: {
canApplyEffects: boolean;
canChangeImage: boolean;
canChangeVideo: boolean;
canCreateFolder: boolean;
canDeleteFile: boolean;
canDeleteFolder: boolean;
canImportFile: boolean;
canSearchFreePhotos: boolean;
canSearchFreeVideos: boolean;
canUpload: boolean;
maxUploadFileSize: number;
};
linkTypes?: {
webAddress: {
show: boolean;
};
emailAddress: {
show: boolean;
};
telephone: {
show: boolean;
};
text: {
show: boolean;
};
anchor: {
show: boolean;
};
};
advancedPreview?: {
showTitle: boolean;
showCloseBox: boolean;
devicePresetSizes?: DevicePresetSizes;
};
};
workspace: {
stageToggle: BeePluginAdvancedPermissionStageToggle;
};
tabs: {
rows: AdvancedSettingsShowLocked;
settings: AdvancedSettingsShowLocked;
content: AdvancedSettingsShowLocked;
};
rows: {
behaviors: AdvancedSettingsBehaviours;
backgroundColorRow: AdvancedSettingsShowLocked;
backgroundColorContent: AdvancedSettingsShowLocked;
doNotStackOnMobile: AdvancedSettingsShowLocked;
backgroundImage: AdvancedSettingsShowLocked;
backgroundVideo: AdvancedSettingsShowLocked;
displayConditions: AdvancedSettingsShowLocked;
columnTabs: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
rowLayout: AdvancedSettingsShowLocked;
contentBorder: AdvancedSettingsShowLocked;
padding: AdvancedSettingsShowLocked;
roundedCorners: AdvancedSettingsShowLocked;
toolbar: {
close: AdvancedSettingsShowLocked;
save: AdvancedSettingsShowLocked;
editSyncedRow: AdvancedSettingsShowLocked;
};
verticalAlign: AdvancedSettingsShowLocked;
columnsSpacing: AdvancedSettingsShowLocked;
columnsBorderRadius: AdvancedSettingsShowLocked;
addon: {
[uuid: string]: {
behaviors: AdvancedSettingsBehaviours;
};
};
};
settings: {
title: AdvancedSettingsShowLocked;
description: AdvancedSettingsShowLocked;
language: AdvancedSettingsShowLocked;
favicon: AdvancedSettingsShowLocked;
contentAreaWidth: AdvancedSettingsShowLocked;
contentAreaAlign: AdvancedSettingsShowLocked;
containerBackgroundColor: AdvancedSettingsShowLocked;
contentBackgroundColor: AdvancedSettingsShowLocked;
defaultFontFamily: AdvancedSettingsShowLocked;
linkColor: AdvancedSettingsShowLocked;
containerBackgroundImage: AdvancedSettingsShowLocked;
};
columns: {
behaviors: {
canResize: boolean;
canAdd: boolean;
canDelete: boolean;
};
};
content: {
title: {
textEditor: AdvancedSettingsTextEditor;
behaviors: AdvancedSettingsBehaviours;
properties: {
fontWeight: AdvancedSettingsShowLocked;
fontSize: AdvancedSettingsShowLocked;
title: AdvancedSettingsShowLocked;
fontFamily: AdvancedSettingsShowLocked;
textColor: AdvancedSettingsShowLocked;
linkColor: AdvancedSettingsShowLocked;
textAlign: AdvancedSettingsShowLocked;
lineHeight: AdvancedSettingsShowLocked;
letterSpacing: AdvancedSettingsShowLocked;
direction: AdvancedSettingsShowLocked;
padding: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
aiIntegration: AdvancedSettingsShowLocked;
};
};
viwed: {
behaviors: AdvancedSettingsBehaviours;
properties: {
id: AdvancedSettingsShowLocked;
};
};
spacer: {
behaviors: AdvancedSettingsBehaviours;
properties: {
height: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
};
};
text: {
textEditor: AdvancedSettingsTextEditor;
behaviors: AdvancedSettingsBehaviours;
properties: {
letterSpacing: AdvancedSettingsShowLocked;
textColor: AdvancedSettingsShowLocked;
linkColor: AdvancedSettingsShowLocked;
lineHeight: AdvancedSettingsShowLocked;
padding: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
};
};
button: {
textEditor: AdvancedSettingsTextEditor;
behaviors: AdvancedSettingsBehaviours;
properties: {
link: AdvancedSettingsShowLocked;
buttonWidth: AdvancedSettingsShowLocked;
padding: AdvancedSettingsShowLocked;
backgroundColor: AdvancedSettingsShowLocked;
textColor: AdvancedSettingsShowLocked;
textAlign: AdvancedSettingsShowLocked;
buttonLineHeight: AdvancedSettingsShowLocked;
borderRadius: AdvancedSettingsShowLocked;
contentPadding: AdvancedSettingsShowLocked;
border: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
fontWeight: AdvancedSettingsShowLocked;
fontFamily: AdvancedSettingsShowLocked;
letterSpacing: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
aiIntegration: AdvancedSettingsShowLocked;
hoverStyles: AdvancedSettingsShowLocked;
};
};
image: {
behaviors: AdvancedSettingsBehaviours;
properties: {
imageWidth: AdvancedSettingsShowLocked;
textAlign: AdvancedSettingsShowLocked;
dynamicImage: AdvancedSettingsShowLocked;
imageSelector: AdvancedSettingsShowLocked;
inputText: AdvancedSettingsShowLocked;
link: AdvancedSettingsShowLocked;
padding: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
};
};
divider: {
behaviors: AdvancedSettingsBehaviours;
properties: {
dividerMode: AdvancedSettingsShowLocked;
textColor: AdvancedSettingsShowLocked;
linkColor: AdvancedSettingsShowLocked;
lineHeight: AdvancedSettingsShowLocked;
padding: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
};
};
social: {
behaviors: AdvancedSettingsBehaviours;
properties: {
iconsMode: AdvancedSettingsShowLocked;
icons: AdvancedSettingsShowLocked;
align: AdvancedSettingsShowLocked;
iconSpacing: AdvancedSettingsShowLocked;
padding: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
};
};
dynamic: {
behaviors: AdvancedSettingsBehaviours;
properties: {
mergeContent: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
};
};
html: {
behaviors: AdvancedSettingsBehaviours;
properties: {
htmlEditor: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
};
};
video: {
behaviors: AdvancedSettingsBehaviours;
properties: {
videoUrl: AdvancedSettingsShowLocked;
videoIcon: AdvancedSettingsShowLocked;
padding: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
};
};
form: {
behaviors: AdvancedSettingsBehaviours;
properties: {
width: AdvancedSettingsShowLocked;
textAlign: AdvancedSettingsShowLocked;
fontFamily: AdvancedSettingsShowLocked;
fontSize: AdvancedSettingsShowLocked;
padding: AdvancedSettingsShowLocked;
labelTextColor: AdvancedSettingsShowLocked;
labelLineHeight: AdvancedSettingsShowLocked;
labelTextAlign: AdvancedSettingsShowLocked;
labelStyle: AdvancedSettingsShowLocked;
labelPosition: AdvancedSettingsShowLocked;
labelMinWidth: AdvancedSettingsShowLocked;
labelLetterSpacing: AdvancedSettingsShowLocked;
fieldTextColor: AdvancedSettingsShowLocked;
fieldBackgroundColor: AdvancedSettingsShowLocked;
fieldPadding: AdvancedSettingsShowLocked;
fieldBorder: AdvancedSettingsShowLocked;
fieldBorderRadius: AdvancedSettingsShowLocked;
fieldOutline: AdvancedSettingsShowLocked;
buttonWidth: AdvancedSettingsShowLocked;
buttonTextColor: AdvancedSettingsShowLocked;
buttonBackgroundColor: AdvancedSettingsShowLocked;
buttonAlign: AdvancedSettingsShowLocked;
buttonPadding: AdvancedSettingsShowLocked;
buttonOuterPadding: AdvancedSettingsShowLocked;
buttonBorder: AdvancedSettingsShowLocked;
buttonBorderRadius: AdvancedSettingsShowLocked;
buttonLetterSpacing: AdvancedSettingsShowLocked;
buttonStyle: AdvancedSettingsShowLocked;
layOutFields: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
};
};
icons: {
behaviors: AdvancedSettingsBehaviours;
properties: {
icons: AdvancedSettingsShowLocked;
fontWeight: AdvancedSettingsShowLocked;
fontFamily: AdvancedSettingsShowLocked;
fontSize: AdvancedSettingsShowLocked;
textColor: AdvancedSettingsShowLocked;
align: AdvancedSettingsShowLocked;
letterSpacing: AdvancedSettingsShowLocked;
iconSize: AdvancedSettingsShowLocked;
itemsSpacing: AdvancedSettingsShowLocked;
iconSpacing: AdvancedSettingsShowLocked;
padding: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
};
};
paragraph: {
behaviors: AdvancedSettingsBehaviours;
textEditor: AdvancedSettingsTextEditor;
properties: {
fontFamily: AdvancedSettingsShowLocked;
fontSize: AdvancedSettingsShowLocked;
fontWeight: AdvancedSettingsShowLocked;
textColor: AdvancedSettingsShowLocked;
linkColor: AdvancedSettingsShowLocked;
padding: AdvancedSettingsShowLocked;
lineHeight: AdvancedSettingsShowLocked;
textAlign: AdvancedSettingsShowLocked;
direction: AdvancedSettingsShowLocked;
letterSpacing: AdvancedSettingsShowLocked;
paragraphSpacing: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
aiIntegration: AdvancedSettingsShowLocked;
};
};
list: {
behaviors: AdvancedSettingsBehaviours;
textEditor: AdvancedSettingsTextEditor;
properties: {
tag: AdvancedSettingsShowLocked;
listStyleType: AdvancedSettingsShowLocked;
fontFamily: AdvancedSettingsShowLocked;
fontSize: AdvancedSettingsShowLocked;
fontWeight: AdvancedSettingsShowLocked;
textColor: AdvancedSettingsShowLocked;
linkColor: AdvancedSettingsShowLocked;
padding: AdvancedSettingsShowLocked;
lineHeight: AdvancedSettingsShowLocked;
textAlign: AdvancedSettingsShowLocked;
direction: AdvancedSettingsShowLocked;
letterSpacing: AdvancedSettingsShowLocked;
startListFrom: AdvancedSettingsShowLocked;
liSpacing: AdvancedSettingsShowLocked;
liIndent: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
aiIntegration: AdvancedSettingsShowLocked;
};
};
menu: {
behaviors: AdvancedSettingsBehaviours;
properties: {
fontFamily: AdvancedSettingsShowLocked;
fontSize: AdvancedSettingsShowLocked;
textColor: AdvancedSettingsShowLocked;
linkColor: AdvancedSettingsShowLocked;
align: AdvancedSettingsShowLocked;
letterSpacing: AdvancedSettingsShowLocked;
layout: AdvancedSettingsShowLocked;
separator: AdvancedSettingsShowLocked;
padding: AdvancedSettingsShowLocked;
hamburger: AdvancedSettingsShowLocked;
itemSpacing: AdvancedSettingsShowLocked;
menuItems: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
};
};
table: {
behaviors: AdvancedSettingsBehaviours;
textEditor: AdvancedSettingsTextEditor;
properties: {
columns: AdvancedSettingsShowLocked;
rows: AdvancedSettingsShowLocked;
backgroundColor: AdvancedSettingsShowLocked;
border: AdvancedSettingsShowLocked;
textColor: AdvancedSettingsShowLocked;
linkColor: AdvancedSettingsShowLocked;
fontFamily: AdvancedSettingsShowLocked;
fontWeight: AdvancedSettingsShowLocked;
fontSize: AdvancedSettingsShowLocked;
textAlign: AdvancedSettingsShowLocked;
lineHeight: AdvancedSettingsShowLocked;
letterSpacing: AdvancedSettingsShowLocked;
direction: AdvancedSettingsShowLocked;
padding: AdvancedSettingsShowLocked;
hideOnMobile: AdvancedSettingsShowLocked;
hideOnAmp: AdvancedSettingsShowLocked;
id: AdvancedSettingsShowLocked;
alternateRowBackgroundColor: AdvancedSettingsShowLocked;
headers: AdvancedSettingsShowLocked;
};
};
addon: {
[uuid: string]: {
behaviors: AdvancedSettingsBehaviours;
};
};
};
}>;
export declare enum WorkspaceStage {
desktop = "desktop",
mobile = "mobile",
global = "global"
}
export type BeePluginWorkspace = {
type?: LoadWorkspaceOptions;
stage?: WorkspaceStage;
displayHidden?: StageDisplayOptions;
hideStageToggle?: boolean;
editSingleRow?: boolean;
};
export type IPluginSessionInfo = {
sessionId: string;
};
export type FontElement = {
fontFamily: string;
name: string;
url?: string;
};
export type EntityBody = {
type: string;
webFonts: FontElement[];
container: {
style: {
"background-color": string;
};
};
content: {
style: {
"font-family": string;
color: string;
};
computedStyle: {
align: string;
linkColor: string;
messageBackgroundColor: string;
messageWidth: string;
};
};
};
export interface IEntityJson {
body: EntityBody;
description: string;
rows: IPluginRow[];
template: {
name: string;
type: string;
version: string;
};
title: string;
}
export interface IEntityContentJson {
page: IEntityJson;
comments: {
[commentId: string]: BeePluginCommentPayload;
};
}
export interface ITemplateJson {
data: {
json: IEntityContentJson;
version: number;
};
}
export declare const ContentCodes: {
readonly TEXT_BLOCK: "01";
readonly IMAGE_BLOCK: "02";
readonly BUTTON_BLOCK: "03";
readonly DIVIDER_BLOCK: "04";
readonly SOCIAL_BLOCK: "05";
readonly DYNAMIC_CONTENT_BLOCK: "06";
readonly HTML_BLOCK: "07";
readonly VIDEO_BLOCK: "08";
readonly FORM: "09";
readonly ICONS: "10";
readonly MENU: "11";
readonly ROW: "14";
readonly MESSAGE: "16";
readonly SPACER: "18";
readonly PARAGRAPH: "22";
readonly LIST: "23";
readonly TABLE: "26";
};
export declare const ActionCodes: {
readonly DROPPED: "00";
readonly DRAGGED: "01";
readonly DELETED: "02";
readonly DUPLICATED: "03";
readonly CHANGED: "04";
readonly OPENED: "05";
readonly CLOSED: "06";
readonly LOCKED: "07";
readonly SAVED: "08";
readonly RESTORED: "09";
readonly CONTENT_AREA_BACKGROUND_COLOR: "10";
readonly DO_NOT_STACK_ON_MOBILE: "11";
readonly ROW_BACKGROUND_IMAGE: "12";
readonly BACKGROUND_CENTER: "13";
readonly BACKGROUND_REPEAT: "14";
readonly BACKGROUND_FULL_WIDTH: "15";
readonly ROW_DISPLAY_CONDITION: "16";
readonly REVERSE_STACK_ORDER_ON_MOBILE: "17";
readonly TEXT_COLOR: "20";
readonly LINK_COLOR: "21";
readonly TEXT_EDITED: "23";
readonly LINE_HEIGHT: "24";
readonly CONTENT_AREA_WIDTH: "25";
readonly BACKGROUND_COLOR: "27";
readonly DEFAULT_FONT: "