UNPKG

3.84 kBTypeScriptView Raw
1import { FilteringParameters } from "../client/FilteringParameters";
2import { Hash } from "../client/SupportingTypes";
3import { Attachment, Header, LinkTrackingOptions } from "../message/SupportingTypes";
4export declare class UpdateTemplateRequest {
5 TemplateType?: TemplateTypes;
6 Name?: string;
7 Subject?: string;
8 HtmlBody?: string;
9 TextBody?: string;
10 Alias?: string | null;
11 LayoutTemplate?: string;
12 constructor(Name?: string, Subject?: string, HtmlBody?: string, TextBody?: string, Alias?: string | null, TemplateType?: TemplateTypes, LayoutTemplate?: string);
13}
14export declare class CreateTemplateRequest extends UpdateTemplateRequest {
15 constructor(Name: string, Subject?: string, HtmlBody?: string, TextBody?: string, Alias?: string | null, TemplateType?: TemplateTypes, LayoutTemplate?: string);
16}
17export declare class TemplateValidationOptions {
18 Subject?: string;
19 HtmlBody?: string;
20 TextBody?: string;
21 TestRenderModel?: object;
22 TemplateType?: TemplateTypes;
23 LayoutTemplate?: string;
24 InlineCssForHtmlTestRender?: boolean;
25 constructor(Subject?: string, HtmlBody?: string, TextBody?: string, TestRenderModel?: object, TemplateType?: TemplateTypes, LayoutTemplate?: string, InlineCssForHtmlTestRender?: boolean);
26}
27export declare enum TemplateTypes {
28 Standard = "Standard",
29 Layout = "Layout"
30}
31export interface Template {
32 TemplateType: TemplateTypes;
33 Name: string;
34 TemplateId: number;
35 Alias: string | null;
36 Subject: string;
37 HtmlBody: string | null;
38 TextBody: string | null;
39 Active: boolean;
40 AssociatedServerId: number;
41 LayoutTemplate: string | null;
42}
43export interface TemplateInList {
44 TemplateType: TemplateTypes;
45 Active: boolean;
46 TemplateId: number;
47 Name: string;
48 Alias: string | null;
49 LayoutTemplate: string | null;
50}
51export interface Templates {
52 TotalCount: number;
53 Templates: TemplateInList[];
54}
55export declare class TemplatesPushRequest {
56 SourceServerID: number;
57 DestinationServerID: number;
58 PerformChanges: boolean;
59 constructor(SourceServerID: number, DestinationServerID: number, PerformChanges: boolean);
60}
61export interface TemplatePushAction {
62 Action: string;
63 TemplateId?: number;
64 Alias: string;
65 Name: string;
66}
67export interface TemplatesPush {
68 TotalCount: number;
69 Templates: TemplatePushAction[];
70}
71export interface ValidationSection {
72 ContentIsValid: boolean;
73 ValidationErrors: object;
74 RenderedContent: string;
75}
76export interface TemplateValidation {
77 AllContentIsValid: boolean;
78 HtmlBody: ValidationSection;
79 TextBody: ValidationSection;
80 Subject: ValidationSection;
81 SuggestedTemplateModel: object;
82}
83export declare class TemplatedMessage {
84 TemplateId?: number;
85 TemplateAlias?: string;
86 TemplateModel: object;
87 InlineCss?: boolean;
88 From: string;
89 To?: string;
90 Cc?: string;
91 Bcc?: string;
92 ReplyTo?: string;
93 MessageStream?: string;
94 Tag?: string;
95 TrackOpens?: boolean;
96 TrackLinks?: LinkTrackingOptions;
97 Headers?: Header[];
98 Metadata?: Hash<string>;
99 Attachments?: Attachment[];
100 constructor(from: string, templateIdOrAlias: (number | string), templateModel: object, to?: string, cc?: string, bcc?: string, replyTo?: string, tag?: string, trackOpens?: boolean, trackLinks?: LinkTrackingOptions, headers?: Header[], attachments?: Attachment[]);
101}
102/**
103 * Describes filtering parameters that can be used when retrieving templates.
104 * When pagination parameters are not specified, default values are set.
105 */
106export declare class TemplateFilteringParameters extends FilteringParameters {
107 templateType?: TemplateTypes;
108 layoutTemplate?: string;
109 constructor(count?: number, offset?: number, templateType?: TemplateTypes, layoutTemplate?: string);
110}