ews javascript api

Appointment

declaration
 Appointment 

Represents an appointment or a meeting. Properties available on appointments are defined in the AppointmentSchema class.

var Appointment = (function (_super) {
    __extends(Appointment, _super);
    function Appointment(svcOrAttachment, isNew) {
        if (isNew === void 0) { isNew = false; }
        _super.call(this, svcOrAttachment);
        if (svcOrAttachment instanceof ItemAttachment_1.ItemAttachment) {
            var parentAttachment = svcOrAttachment;
            if (parentAttachment.Service.RequestedServerVersion == ExchangeVersion_1.ExchangeVersion.Exchange2007_SP1) {
                if (isNew) {
                    this.StartTimeZone = parentAttachment.Service.TimeZone;
                }
            }
        }
    }
    Object.defineProperty(Appointment.prototype, "DefaultSendCancellationsMode", {
        //todo: attachable attribute missing.

get

method
 get() 

Gets the default setting for sending cancellations on Delete.

get: function () {
    return SendCancellationsMode_1.SendCancellationsMode.SendToAllAndSaveCopy;
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "DefaultSendInvitationsMode", {

get

method
 get() 

Gets the default settings for sending invitations on Save.

get: function () {
    return SendInvitationsMode_1.SendInvitationsMode.SendToAllAndSaveCopy;
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "DefaultSendInvitationsOrCancellationsMode", {

get

method
 get() 

Gets the default settings for sending invitations or cancellations on Update.

get: function () {
    return SendInvitationsOrCancellationsMode_1.SendInvitationsOrCancellationsMode.SendToAllAndSaveCopy;
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "Start", {

get

method
 get() 

Gets or sets the start time of the appointment.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.Start);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.Start, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "End", {

get

method
 get() 

Gets or sets the end time of the appointment.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.End);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.End, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "OriginalStart", {

get

method
 get() 

Gets the original start time of this appointment.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.OriginalStart);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "IsAllDayEvent", {

get

method
 get() 

Gets or sets a value indicating whether this appointment is an all day event.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.IsAllDayEvent);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.IsAllDayEvent, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "LegacyFreeBusyStatus", {

get

method
 get() 

Gets or sets a value indicating the free/busy status of the owner of this appointment.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.LegacyFreeBusyStatus);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.LegacyFreeBusyStatus, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "Location", {

get

method
 get() 

Gets or sets the location of this appointment.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.Location);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.Location, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "When", {

get

method
 get() 

Gets a text indicating when this appointment occurs. The text returned by When is localized using the Exchange Server culture or using the culture specified in the PreferredCulture property of the ExchangeService object this appointment is bound to.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.When);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "IsMeeting", {

get

method
 get() 

Gets a value indicating whether the appointment is a meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.IsMeeting);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "IsCancelled", {

get

method
 get() 

Gets a value indicating whether the appointment has been cancelled.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.IsCancelled);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "IsRecurring", {

get

method
 get() 

Gets a value indicating whether the appointment is recurring.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.IsRecurring);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "MeetingRequestWasSent", {

get

method
 get() 

Gets a value indicating whether the meeting request has already been sent.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.MeetingRequestWasSent);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "IsResponseRequested", {

get

method
 get() 

Gets or sets a value indicating whether responses are requested when invitations are sent for this meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.IsResponseRequested);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.IsResponseRequested, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "AppointmentType", {

get

method
 get() 

Gets a value indicating the type of this appointment.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.AppointmentType);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "MyResponseType", {

get

method
 get() 

Gets a value indicating what was the last response of the user that loaded this meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.MyResponseType);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "Organizer", {

get

method
 get() 

Gets the organizer of this meeting. The Organizer property is read-only and is only relevant for attendees.
The organizer of a meeting is automatically set to the user that created the meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.Organizer);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "RequiredAttendees", {

get

method
 get() 

Gets a list of required attendees for this meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.RequiredAttendees);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "OptionalAttendees", {

get

method
 get() 

Gets a list of optional attendeed for this meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.OptionalAttendees);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "Resources", {

get

method
 get() 

Gets a list of resources for this meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.Resources);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "ConflictingMeetingCount", {

get

method
 get() 

Gets the number of calendar entries that conflict with this appointment in the authenticated user's calendar.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.ConflictingMeetingCount);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "AdjacentMeetingCount", {

get

method
 get() 

Gets the number of calendar entries that are adjacent to this appointment in the authenticated user's calendar.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.AdjacentMeetingCount);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "ConflictingMeetings", {

get

method
 get() 

Gets a list of meetings that conflict with this appointment in the authenticated user's calendar.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.ConflictingMeetings);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "AdjacentMeetings", {

get

method
 get() 

Gets a list of meetings that is adjacent to this appointment in the authenticated user's calendar.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.AdjacentMeetings);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "Duration", {

get

method
 get() 

Gets the duration of this appointment.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.Duration);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "TimeZone", {

get

method
 get() 

Gets the name of the time zone this appointment is defined in.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.TimeZone);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "AppointmentReplyTime", {

get

method
 get() 

Gets the time when the attendee replied to the meeting request.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.AppointmentReplyTime);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "AppointmentSequenceNumber", {

get

method
 get() 

Gets the sequence number of this appointment.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.AppointmentSequenceNumber);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "AppointmentState", {

get

method
 get() 

Gets the state of this appointment.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.AppointmentState);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "Recurrence", {

get

method
 get() 

Gets or sets the recurrence pattern for this appointment. Available recurrence pattern classes include
Recurrence.DailyPattern, Recurrence.MonthlyPattern and Recurrence.YearlyPattern.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.Recurrence);
},
set: function (value) {
    if (value !== null && value.IsRegenerationPattern) {
        throw new ServiceLocalException_1.ServiceLocalException(Strings_1.Strings.RegenerationPatternsOnlyValidForTasks);
    }
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.Recurrence, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "FirstOccurrence", {

get

method
 get() 

Gets an OccurrenceInfo identifying the first occurrence of this meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.FirstOccurrence);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "LastOccurrence", {

get

method
 get() 

Gets an OccurrenceInfo identifying the last occurrence of this meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.LastOccurrence);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "ModifiedOccurrences", {

get

method
 get() 

Gets a list of modified occurrences for this meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.ModifiedOccurrences);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "DeletedOccurrences", {

get

method
 get() 

Gets a list of deleted occurrences for this meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.DeletedOccurrences);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "StartTimeZone", {

get

method
 get() 

Gets or sets time zone of the start property of this appointment.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.StartTimeZone);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.StartTimeZone, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "EndTimeZone", {

get

method
 get() 

Gets or sets time zone of the end property of this appointment.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.EndTimeZone);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.EndTimeZone, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "ConferenceType", {

get

method
 get() 

Gets or sets the type of conferencing that will be used during the meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.ConferenceType);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.ConferenceType, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "AllowNewTimeProposal", {

get

method
 get() 

Gets or sets a value indicating whether new time proposals are allowed for attendees of this meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.AllowNewTimeProposal);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.AllowNewTimeProposal, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "IsOnlineMeeting", {

get

method
 get() 

Gets or sets a value indicating whether this is an online meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.IsOnlineMeeting);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.IsOnlineMeeting, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "MeetingWorkspaceUrl", {

get

method
 get() 

Gets or sets the URL of the meeting workspace. A meeting workspace is a shared Web site for planning meetings and tracking results.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.MeetingWorkspaceUrl);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.MeetingWorkspaceUrl, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "NetShowUrl", {

get

method
 get() 

Gets or sets the URL of the Microsoft NetShow online meeting.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.NetShowUrl);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.NetShowUrl, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "ICalUid", {

get

method
 get() 

Gets or sets the ICalendar Uid.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.ICalUid);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.ICalUid, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "ICalRecurrenceId", {

get

method
 get() 

Gets the ICalendar RecurrenceId.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.ICalRecurrenceId);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "ICalDateTimeStamp", {

get

method
 get() 

Gets the ICalendar DateTimeStamp.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.ICalDateTimeStamp);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "EnhancedLocation", {

get

method
 get() 

Gets or sets the Enhanced location object.

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.EnhancedLocation);
},
set: function (value) {
    this.PropertyBag._setItem(AppointmentSchema_1.AppointmentSchema.Instance.EnhancedLocation, value);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "JoinOnlineMeetingUrl", {

get

method
 get() 

Gets the Url for joining an online meeting

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.JoinOnlineMeetingUrl);
},
enumerable: true,
configurable: true
    });
    Object.defineProperty(Appointment.prototype, "OnlineMeetingSettings", {

get

method
 get() 

Gets the Online Meeting Settings

get: function () {
    return this.PropertyBag._getItem(AppointmentSchema_1.AppointmentSchema.Instance.OnlineMeetingSettings);
},
enumerable: true,
configurable: true
    });

Accept

method
 Appointment.prototype.Accept() 

Option name Type Description
sendResponse boolean

Indicates whether to send a response to the organizer.

return CalendarActionResults

A CalendarActionResults object containing the various items that were created or modified as a results of this operation.

Accepts the meeting. Calling this method results in a call to EWS.

Appointment.prototype.Accept = function (sendResponse) { return this.InternalAccept(false, sendResponse); };

AcceptTentatively

method
 Appointment.prototype.AcceptTentatively() 

Option name Type Description
sendResponse boolean

Indicates whether to send a response to the organizer.

return CalendarActionResults

A CalendarActionResults object containing the various items that were created or modified as a results of this operation.

Tentatively accepts the meeting. Calling this method results in a call to EWS.

Appointment.prototype.AcceptTentatively = function (sendResponse) { return this.InternalAccept(true, sendResponse); };
Appointment.Bind = function (service, id, propertySet) {
    if (propertySet === void 0) { propertySet = PropertySet_1.PropertySet.FirstClassProperties; }
    return service.BindToItem(id, propertySet, Appointment);
};
Appointment.BindToOccurrence = function (service, recurringMasterId, occurenceIndex, propertySet) {
    if (propertySet === void 0) { propertySet = PropertySet_1.PropertySet.FirstClassProperties; }
    var occurenceId = new AppointmentOccurrenceId_1.AppointmentOccurrenceId(recurringMasterId.UniqueId, occurenceIndex);
    return Appointment.Bind(service, occurenceId, propertySet);
};
Appointment.BindToRecurringMaster = function (service, occurrenceId, propertySet) {
    if (propertySet === void 0) { propertySet = PropertySet_1.PropertySet.FirstClassProperties; }
    var recurringMasterId = new RecurringAppointmentMasterId_1.RecurringAppointmentMasterId(occurrenceId.UniqueId);
    return Appointment.Bind(service, recurringMasterId, propertySet);
};
Appointment.prototype.CancelMeeting = function (cancellationMessageText) {
    if (arguments.length === 0) {
        return this.CreateCancelMeetingMessage().SendAndSaveCopy();
    }
    var cancelMsg = this.CreateCancelMeetingMessage();
    cancelMsg.Body = new MessageBody_1.MessageBody(cancellationMessageText); //todo:fix - cant use implicit operator of c#, using explicit. Assumed HTML body used in c# implicit conversion
    return cancelMsg.SendAndSaveCopy();
};

CreateAcceptMessage

method
 Appointment.prototype.CreateAcceptMessage() 

Option name Type Description
tentative boolean

Specifies whether the meeting will be tentatively accepted.

return AcceptMeetingInvitationMessage

An AcceptMeetingInvitationMessage representing the meeting acceptance message.

Creates a local meeting acceptance message that can be customized and sent.

Appointment.prototype.CreateAcceptMessage = function (tentative) { return new AcceptMeetingInvitationMessage_1.AcceptMeetingInvitationMessage(this, tentative); };

CreateCancelMeetingMessage

method
 Appointment.prototype.CreateCancelMeetingMessage() 

Creates a local meeting cancellation message that can be customized and sent.

Appointment.prototype.CreateCancelMeetingMessage = function () { return new CancelMeetingMessage_1.CancelMeetingMessage(this); };

CreateDeclineMessage

method
 Appointment.prototype.CreateDeclineMessage() 

Creates a local meeting declination message that can be customized and sent.

Appointment.prototype.CreateDeclineMessage = function () { return new DeclineMeetingInvitationMessage_1.DeclineMeetingInvitationMessage(this); };

CreateForward

method
 Appointment.prototype.CreateForward() 

Creates a forward message from this appointment.

Appointment.prototype.CreateForward = function () {
    this.ThrowIfThisIsNew();
    return new ResponseMessage_1.ResponseMessage(this, ResponseMessageType_1.ResponseMessageType.Forward);
};

CreateReply

method
 Appointment.prototype.CreateReply() 

Option name Type Description
replyAll boolean

Indicates whether the reply should go to the organizer only or to all the attendees.

return ResponseMessage

A ResponseMessage representing the reply response that can subsequently be modified and sent.

Creates a reply response to the organizer and/or attendees of the meeting.

Appointment.prototype.CreateReply = function (replyAll) {
    this.ThrowIfThisIsNew();
    return new ResponseMessage_1.ResponseMessage(this, replyAll ? ResponseMessageType_1.ResponseMessageType.ReplyAll : ResponseMessageType_1.ResponseMessageType.Reply);
};

Decline

method
 Appointment.prototype.Decline() 

Option name Type Description
sendResponse boolean

Indicates whether to send a response to the organizer.

return CalendarActionResults

A CalendarActionResults object containing the various items that were created or modified as aresults of this operation.

Declines the meeting invitation. Calling this method results in a call to EWS.

Appointment.prototype.Decline = function (sendResponse) {
    var decline = this.CreateDeclineMessage();
    if (sendResponse) {
        return decline.SendAndSaveCopy();
    }
    else {
        return decline.Save();
    }
};

Delete

method
 Appointment.prototype.Delete() 

Option name Type Description
deleteMode DeleteMode

The deletion mode.

sendCancellationsMode SendCancellationsMode

Specifies if and how cancellations should be sent if this appointment is a meeting.

Deletes this appointment. Calling this method results in a call to EWS.

Appointment.prototype.Delete = function (deleteMode, sendCancellationsMode) {
    return this.InternalDelete(deleteMode, sendCancellationsMode, null);
};
Option name Type Description
bodyPrefix MessageBody

The prefix to prepend to the original body of the message.

toRecipients Array.<EmailAddress>

The recipients to forward the appointment to.

Forwards the appointment. Calling this method results in a call to EWS.

//Forward(bodyPrefix: MessageBody, toRecipients: System.Collections.Generic.IEnumerable<T>): void;
Appointment.prototype.Forward = function (bodyPrefix, toRecipients) {
    var responseMessage = this.CreateForward();
    responseMessage.BodyPrefix = bodyPrefix;
    responseMessage.ToRecipients.AddRange(toRecipients);
    return responseMessage.SendAndSaveCopy();
};
//@internal

GetIsCustomDateTimeScopingRequired

method
 Appointment.prototype.GetIsCustomDateTimeScopingRequired() 

Determines whether properties defined with ScopedDateTimePropertyDefinition require custom time zone scoping.

Appointment.prototype.GetIsCustomDateTimeScopingRequired = function () { return true; };

GetIsTimeZoneHeaderRequired

method
 Appointment.prototype.GetIsTimeZoneHeaderRequired() 

Option name Type Description
isUpdateOperation boolean

Indicates whether the operation being petrformed is an update operation.

return boolean

true if a time zone SOAP header should be emitted; otherwise, false.

Gets a value indicating whether a time zone SOAP header should be emitted in a CreateItem or UpdateItem request so this item can be property saved or updated.

Appointment.prototype.GetIsTimeZoneHeaderRequired = function (isUpdateOperation) {
    if (isUpdateOperation) {
        return false;
    }
    else {
        var isStartTimeZoneSetOrUpdated = this.PropertyBag.IsPropertyUpdated(AppointmentSchema_1.AppointmentSchema.Instance.StartTimeZone);
        var isEndTimeZoneSetOrUpdated = this.PropertyBag.IsPropertyUpdated(AppointmentSchema_1.AppointmentSchema.Instance.EndTimeZone);
        if (isStartTimeZoneSetOrUpdated && isEndTimeZoneSetOrUpdated) {
            // If both StartTimeZone and EndTimeZone have been set or updated and are the same as the service's
            // time zone, we emit the time zone header and StartTimeZone and EndTimeZone are not emitted.
            var startTimeZone = { outValue: null };
            var endTimeZone = { outValue: null };
            ;
            this.PropertyBag.TryGetPropertyAs(AppointmentSchema_1.AppointmentSchema.Instance.StartTimeZone, startTimeZone);
            this.PropertyBag.TryGetPropertyAs(AppointmentSchema_1.AppointmentSchema.Instance.EndTimeZone, endTimeZone);
            return startTimeZone.outValue == this.Service.TimeZone || endTimeZone.outValue == this.Service.TimeZone;
        }
        else {
            return true;
        }
    }
};

GetMinimumRequiredServerVersion

method
 Appointment.prototype.GetMinimumRequiredServerVersion() 

Gets the minimum required server version.

Appointment.prototype.GetMinimumRequiredServerVersion = function () { return ExchangeVersion_1.ExchangeVersion.Exchange2007_SP1; };

GetSchema

method
 Appointment.prototype.GetSchema() 

Internal method to return the schema associated with this type of object.

Appointment.prototype.GetSchema = function () { return AppointmentSchema_1.AppointmentSchema.Instance; };

GetXmlElementName

method
 Appointment.prototype.GetXmlElementName() 

Gets the element name of item in XML

Appointment.prototype.GetXmlElementName = function () { return XmlElementNames_1.XmlElementNames.CalendarItem; };

InternalAccept

method
 Appointment.prototype.InternalAccept() 

Option name Type Description
tentative boolean

True if tentative accept.

sendResponse boolean

Indicates whether to send a response to the organizer.

return CalendarActionResults

A CalendarActionResults object containing the various items that were created or modified as aresults of this operation.

Accepts the meeting.

Appointment.prototype.InternalAccept = function (tentative, sendResponse) {
    var accept = this.CreateAcceptMessage(tentative);
    if (sendResponse) {
        return accept.SendAndSaveCopy();
    }
    else {
        return accept.Save();
    }
};

Reply

method
 Appointment.prototype.Reply() 

Option name Type Description
bodyPrefix MessageBody

The prefix to prepend to the body of the meeting.

replyAll boolean

Indicates whether the reply should go to the organizer only or to all the attendees.

Replies to the organizer and/or the attendees of the meeting. Calling this method results in a call to EWS.

Appointment.prototype.Reply = function (bodyPrefix, replyAll) {
    var responseMessage = this.CreateReply(replyAll);
    responseMessage.BodyPrefix = bodyPrefix;
    return responseMessage.SendAndSaveCopy();
};
Appointment.prototype.Save = function (destinationFolderNameOrIdOrSendInvitationMode, sendInvitationsMode) {
    var argsLength = arguments.length;
    if (argsLength < 1 || argsLength > 2) {
        throw new Error("Appointment.ts - Save : Invalid number of arguments");
    }
    var simode = sendInvitationsMode;
    if (argsLength === 1) {
        simode = destinationFolderNameOrIdOrSendInvitationMode;
        return this.InternalCreate(null, null, simode);
    }
    var destinationFolderId = destinationFolderNameOrIdOrSendInvitationMode;
    if (argsLength === 2) {
        if (typeof destinationFolderNameOrIdOrSendInvitationMode === "number") {
            destinationFolderId = new FolderId_1.FolderId(destinationFolderNameOrIdOrSendInvitationMode);
        }
        return this.InternalCreate(destinationFolderId, null, sendInvitationsMode);
    }
};

Update

method
 Appointment.prototype.Update() 

Option name Type Description
conflictResolutionMode ConflictResolutionMode

Specifies how conflicts should be resolved.

sendInvitationsOrCancellationsMode SendInvitationsOrCancellationsMode

Specifies if and how invitations or cancellations should be sent if this appointment is a meeting.

Applies the local changes that have been made to this appointment. Calling this method results in at least one call to EWS. Mutliple calls to EWS might be made if attachments have been added or removed.

Appointment.prototype.Update = function (conflictResolutionMode, sendInvitationsOrCancellationsMode) {
    return this.InternalUpdate(null, conflictResolutionMode, null, sendInvitationsOrCancellationsMode);
};

Validate

method
 Appointment.prototype.Validate() 

Validates this instance.

Appointment.prototype.Validate = function () {
    _super.prototype.Validate.call(this);
    //  Make sure that if we're on the Exchange2007_SP1 schema version, if any of the following
    //  properties are set or updated:
    //      o   Start
    //      o   End
    //      o   IsAllDayEvent
    //      o   Recurrence
    //  ... then, we must send the MeetingTimeZone element (which is generated from StartTimeZone for
    //  Exchange2007_SP1 requests (see StartTimeZonePropertyDefinition.cs).  If the StartTimeZone isn't
    //  in the property bag, then throw, because clients must supply the proper time zone - either by
    //  loading it from a currently-existing appointment, or by setting it directly.  Otherwise, to dirty
    //  the StartTimeZone property, we just set it to its current value.
    if ((this.Service.RequestedServerVersion == ExchangeVersion_1.ExchangeVersion.Exchange2007_SP1) &&
        !this.Service.Exchange2007CompatibilityMode) {
        if (this.PropertyBag.IsPropertyUpdated(AppointmentSchema_1.AppointmentSchema.Instance.Start) ||
            this.PropertyBag.IsPropertyUpdated(AppointmentSchema_1.AppointmentSchema.Instance.End) ||
            this.PropertyBag.IsPropertyUpdated(AppointmentSchema_1.AppointmentSchema.Instance.IsAllDayEvent) ||
            this.PropertyBag.IsPropertyUpdated(AppointmentSchema_1.AppointmentSchema.Instance.Recurrence)) {
            //  If the property isn't in the property bag, throw....
            if (!this.PropertyBag.Contains(AppointmentSchema_1.AppointmentSchema.Instance.StartTimeZone)) {
                throw new ServiceLocalException_1.ServiceLocalException(Strings_1.Strings.StartTimeZoneRequired);
            }
            //  Otherwise, set the time zone to its current value to force it to be sent with the request.
            this.StartTimeZone = this.StartTimeZone;
        }
    }
};
return Appointment;
})(Item_1.Item);
exports.Appointment = Appointment;