UNPKG

@asposecloud/aspose-email-cloud

Version:
580 lines (576 loc) 19.4 kB
"use strict"; /* * MIT License * Copyright (c) 2018-2020 Aspose Pty Ltd * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.MapiMessageDtoBuilder = exports.MapiMessageDto = void 0; // @ts-ignore const model = __importStar(require("./index")); /** * Represents an Outlook Message format document. */ class MapiMessageDto extends model.MapiMessageItemBaseDto { /** * Represents an Outlook Message format document. * @param attachments Message item attachments. * @param billing Billing information associated with an item. * @param body Message text. * @param bodyHtml Gets the BodyRtf of the message converted to HTML, if present, otherwise an empty string. * @param bodyRtf RTF formatted message text. * @param bodyType The content type of message body. Enum, available values: PlainText, Html, Rtf * @param categories Contains keywords or categories for the message object. * @param companies Contains the names of the companies that are associated with an item. * @param itemId The item id, uses with a server. * @param messageClass Case-sensitive string that identifies the sender-defined message class, such as IPM.Note. The message class specifies the type, purpose, or content of the message. * @param mileage Contains the mileage information that is associated with an item. * @param recipients Recipients of the message. * @param sensitivity Contains values that indicate the message sensitivity. Enum, available values: None, Personal, Private, CompanyConfidential * @param subject Subject of the message. * @param subjectPrefix Subject prefix that typically indicates some action on a message, such as \"FW: \" for forwarding. * @param properties List of MAPI properties * @param messageBody Message text * @param clientSubmitTime Date and time the message sender submitted a message. * @param conversationTopic Topic of the first message in a conversation thread. * @param deliveryTime Date and time a message was delivered. * @param displayBcc List of the display names of any blind carbon copy (BCC) message recipients, separated by semicolons (;). * @param displayCc List of the display names of any carbon copy (CC) message recipients, separated by semicolons (;). * @param displayName Display name for the message. * @param displayNamePrefix Prefix of the display name. * @param displayTo List of the display names of the primary (To) message recipients, separated by semicolons (;). * @param flags Message flags. * @param headers Transport message headers * @param internetMessageId Internet message id of the message. * @param messageFormat Represents outlook message format. Enum, available values: Ascii, Unicode * @param normalizedSubject Normalized subject of the message. * @param readReceiptRequested Value indicating whether the read receipt is requested. * @param replyTo Reply to names. * @param senderAddressType Message sender's e-mail address type. * @param senderEmailAddress Message sender's e-mail address. * @param senderName Message sender's display name. * @param senderSmtpAddress Message sender's e-mail address. * @param sentRepresentingAddressType Address type for the messaging user represented by the sender. * @param sentRepresentingEmailAddress E-mail address for the messaging user represented by the sender. * @param sentRepresentingName Display name for the messaging user represented by the sender. * @param sentRepresentingSmtpAddress E-mail address for the messaging user represented by the sender. * @param transportMessageHeaders Transport-specific message envelope information. */ constructor(attachments, billing, body, bodyHtml, bodyRtf, bodyType, categories, companies, itemId, messageClass, mileage, recipients, sensitivity, subject, subjectPrefix, properties, messageBody, clientSubmitTime, conversationTopic, deliveryTime, displayBcc, displayCc, displayName, displayNamePrefix, displayTo, flags, headers, internetMessageId, messageFormat, normalizedSubject, readReceiptRequested, replyTo, senderAddressType, senderEmailAddress, senderName, senderSmtpAddress, sentRepresentingAddressType, sentRepresentingEmailAddress, sentRepresentingName, sentRepresentingSmtpAddress, transportMessageHeaders) { super(); this.attachments = attachments; this.billing = billing; this.body = body; this.bodyHtml = bodyHtml; this.bodyRtf = bodyRtf; this.bodyType = bodyType; this.categories = categories; this.companies = companies; this.itemId = itemId; this.messageClass = messageClass; this.mileage = mileage; this.recipients = recipients; this.sensitivity = sensitivity; this.subject = subject; this.subjectPrefix = subjectPrefix; this.properties = properties; this.messageBody = messageBody; this.clientSubmitTime = clientSubmitTime; this.conversationTopic = conversationTopic; this.deliveryTime = deliveryTime; this.displayBcc = displayBcc; this.displayCc = displayCc; this.displayName = displayName; this.displayNamePrefix = displayNamePrefix; this.displayTo = displayTo; this.flags = flags; this.headers = headers; this.internetMessageId = internetMessageId; this.messageFormat = messageFormat; this.normalizedSubject = normalizedSubject; this.readReceiptRequested = readReceiptRequested; this.replyTo = replyTo; this.senderAddressType = senderAddressType; this.senderEmailAddress = senderEmailAddress; this.senderName = senderName; this.senderSmtpAddress = senderSmtpAddress; this.sentRepresentingAddressType = sentRepresentingAddressType; this.sentRepresentingEmailAddress = sentRepresentingEmailAddress; this.sentRepresentingName = sentRepresentingName; this.sentRepresentingSmtpAddress = sentRepresentingSmtpAddress; this.transportMessageHeaders = transportMessageHeaders; } /** * Returns attribute type map */ static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(MapiMessageDto.attributeTypeMap); } } exports.MapiMessageDto = MapiMessageDto; /** * Attribute type map */ MapiMessageDto.attributeTypeMap = [ { name: "messageBody", baseName: "messageBody", type: "string", }, { name: "clientSubmitTime", baseName: "clientSubmitTime", type: "Date", }, { name: "conversationTopic", baseName: "conversationTopic", type: "string", }, { name: "deliveryTime", baseName: "deliveryTime", type: "Date", }, { name: "displayBcc", baseName: "displayBcc", type: "string", }, { name: "displayCc", baseName: "displayCc", type: "string", }, { name: "displayName", baseName: "displayName", type: "string", }, { name: "displayNamePrefix", baseName: "displayNamePrefix", type: "string", }, { name: "displayTo", baseName: "displayTo", type: "string", }, { name: "flags", baseName: "flags", type: "Array<string>", }, { name: "headers", baseName: "headers", type: "{ [key: string]: string; }", }, { name: "internetMessageId", baseName: "internetMessageId", type: "string", }, { name: "messageFormat", baseName: "messageFormat", type: "string", }, { name: "normalizedSubject", baseName: "normalizedSubject", type: "string", }, { name: "readReceiptRequested", baseName: "readReceiptRequested", type: "boolean", }, { name: "replyTo", baseName: "replyTo", type: "string", }, { name: "senderAddressType", baseName: "senderAddressType", type: "string", }, { name: "senderEmailAddress", baseName: "senderEmailAddress", type: "string", }, { name: "senderName", baseName: "senderName", type: "string", }, { name: "senderSmtpAddress", baseName: "senderSmtpAddress", type: "string", }, { name: "sentRepresentingAddressType", baseName: "sentRepresentingAddressType", type: "string", }, { name: "sentRepresentingEmailAddress", baseName: "sentRepresentingEmailAddress", type: "string", }, { name: "sentRepresentingName", baseName: "sentRepresentingName", type: "string", }, { name: "sentRepresentingSmtpAddress", baseName: "sentRepresentingSmtpAddress", type: "string", }, { name: "transportMessageHeaders", baseName: "transportMessageHeaders", type: "string", } ]; /** * MapiMessageDto model builder */ class MapiMessageDtoBuilder { constructor(model) { this.model = model; } /** * Build model. */ build() { return this.model; } /** * Message item attachments. */ attachments(attachments) { this.model.attachments = attachments; return this; } /** * Billing information associated with an item. */ billing(billing) { this.model.billing = billing; return this; } /** * Message text. */ body(body) { this.model.body = body; return this; } /** * Gets the BodyRtf of the message converted to HTML, if present, otherwise an empty string. */ bodyHtml(bodyHtml) { this.model.bodyHtml = bodyHtml; return this; } /** * RTF formatted message text. */ bodyRtf(bodyRtf) { this.model.bodyRtf = bodyRtf; return this; } /** * The content type of message body. Enum, available values: PlainText, Html, Rtf */ bodyType(bodyType) { this.model.bodyType = bodyType; return this; } /** * Contains keywords or categories for the message object. */ categories(categories) { this.model.categories = categories; return this; } /** * Contains the names of the companies that are associated with an item. */ companies(companies) { this.model.companies = companies; return this; } /** * The item id, uses with a server. */ itemId(itemId) { this.model.itemId = itemId; return this; } /** * Case-sensitive string that identifies the sender-defined message class, such as IPM.Note. The message class specifies the type, purpose, or content of the message. */ messageClass(messageClass) { this.model.messageClass = messageClass; return this; } /** * Contains the mileage information that is associated with an item. */ mileage(mileage) { this.model.mileage = mileage; return this; } /** * Recipients of the message. */ recipients(recipients) { this.model.recipients = recipients; return this; } /** * Contains values that indicate the message sensitivity. Enum, available values: None, Personal, Private, CompanyConfidential */ sensitivity(sensitivity) { this.model.sensitivity = sensitivity; return this; } /** * Subject of the message. */ subject(subject) { this.model.subject = subject; return this; } /** * Subject prefix that typically indicates some action on a message, such as \"FW: \" for forwarding. */ subjectPrefix(subjectPrefix) { this.model.subjectPrefix = subjectPrefix; return this; } /** * List of MAPI properties */ properties(properties) { this.model.properties = properties; return this; } /** * Message text */ messageBody(messageBody) { this.model.messageBody = messageBody; return this; } /** * Date and time the message sender submitted a message. */ clientSubmitTime(clientSubmitTime) { this.model.clientSubmitTime = clientSubmitTime; return this; } /** * Topic of the first message in a conversation thread. */ conversationTopic(conversationTopic) { this.model.conversationTopic = conversationTopic; return this; } /** * Date and time a message was delivered. */ deliveryTime(deliveryTime) { this.model.deliveryTime = deliveryTime; return this; } /** * List of the display names of any blind carbon copy (BCC) message recipients, separated by semicolons (;). */ displayBcc(displayBcc) { this.model.displayBcc = displayBcc; return this; } /** * List of the display names of any carbon copy (CC) message recipients, separated by semicolons (;). */ displayCc(displayCc) { this.model.displayCc = displayCc; return this; } /** * Display name for the message. */ displayName(displayName) { this.model.displayName = displayName; return this; } /** * Prefix of the display name. */ displayNamePrefix(displayNamePrefix) { this.model.displayNamePrefix = displayNamePrefix; return this; } /** * List of the display names of the primary (To) message recipients, separated by semicolons (;). */ displayTo(displayTo) { this.model.displayTo = displayTo; return this; } /** * Message flags. Items: Mapi message flags. Enum, available values: MsgFlagZero, MsgFlagRead, MsgFlagUnmodified, MsgFlagSubmit, MsgFlagUnsent, MsgFlagHasAttach, MsgFlagFromMe, MsgFlagAssociated, MsgFlagResend, MsgFlagNotifyRead, MsgFlagNotifyUnread, MsgFlagEverRead, MsgFlagOriginX400, MsgFlagOriginInternet, MsgFlagOriginMiscExt */ flags(flags) { this.model.flags = flags; return this; } /** * Transport message headers */ headers(headers) { this.model.headers = headers; return this; } /** * Internet message id of the message. */ internetMessageId(internetMessageId) { this.model.internetMessageId = internetMessageId; return this; } /** * Represents outlook message format. Enum, available values: Ascii, Unicode */ messageFormat(messageFormat) { this.model.messageFormat = messageFormat; return this; } /** * Normalized subject of the message. */ normalizedSubject(normalizedSubject) { this.model.normalizedSubject = normalizedSubject; return this; } /** * Value indicating whether the read receipt is requested. */ readReceiptRequested(readReceiptRequested) { this.model.readReceiptRequested = readReceiptRequested; return this; } /** * Reply to names. */ replyTo(replyTo) { this.model.replyTo = replyTo; return this; } /** * Message sender's e-mail address type. */ senderAddressType(senderAddressType) { this.model.senderAddressType = senderAddressType; return this; } /** * Message sender's e-mail address. */ senderEmailAddress(senderEmailAddress) { this.model.senderEmailAddress = senderEmailAddress; return this; } /** * Message sender's display name. */ senderName(senderName) { this.model.senderName = senderName; return this; } /** * Message sender's e-mail address. */ senderSmtpAddress(senderSmtpAddress) { this.model.senderSmtpAddress = senderSmtpAddress; return this; } /** * Address type for the messaging user represented by the sender. */ sentRepresentingAddressType(sentRepresentingAddressType) { this.model.sentRepresentingAddressType = sentRepresentingAddressType; return this; } /** * E-mail address for the messaging user represented by the sender. */ sentRepresentingEmailAddress(sentRepresentingEmailAddress) { this.model.sentRepresentingEmailAddress = sentRepresentingEmailAddress; return this; } /** * Display name for the messaging user represented by the sender. */ sentRepresentingName(sentRepresentingName) { this.model.sentRepresentingName = sentRepresentingName; return this; } /** * E-mail address for the messaging user represented by the sender. */ sentRepresentingSmtpAddress(sentRepresentingSmtpAddress) { this.model.sentRepresentingSmtpAddress = sentRepresentingSmtpAddress; return this; } /** * Transport-specific message envelope information. */ transportMessageHeaders(transportMessageHeaders) { this.model.transportMessageHeaders = transportMessageHeaders; return this; } } exports.MapiMessageDtoBuilder = MapiMessageDtoBuilder; //# sourceMappingURL=mapi-message-dto.js.map