Skip to content

Commit a622e1f

Browse files
committed
v0.4
1 parent f175fdb commit a622e1f

25 files changed

+21377
-19781
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ Code sample from [EWS Managed API 2.1.](https://msdn.microsoft.com/en-us/library
2828
Api document generated using TypeDoc and is hosted at [ews-javascript-api.github.io/api](http://ews-javascript-api.github.io/api).
2929
Check [Wiki](https://github.com/gautamsi/ews-javascript-api/wiki) for more details
3030

31+
also track what is coming in [backlog](https://github.com/gautamsi/ews-javascript-api/milestones/backlog), keep eye on [milestones](https://github.com/gautamsi/ews-javascript-api/milestones) when I start working on it
32+
33+
# Whats new v0.4.0
34+
35+
* new: ***InboxRule Operations*** now works, `GetInboxRules` and `UpdateInboxRules` methods on ExchangeService now availbale [see MSDN: How to: Manage Inbox rules by using EWS in Exchange](https://msdn.microsoft.com/en-us/library/office/dn481313(v=exchg.150).aspx)
36+
* new: ***Delegate management operations*** now work [see MSDN: Delegate access and EWS in Exchange](https://msdn.microsoft.com/EN-US/library/office/dn641957(v=exchg.150).aspx)
37+
3138
# Whats new v0.3.0 (including 0.2.8)
3239

3340
* new: ***Mailbox synchronization*** now works, `SyncFolderItems` and `SyncFolderHierarchy` ExchangeService now availbale [see MSDN for example](https://msdn.microsoft.com/en-us/library/office/dn440952(v=exchg.150).aspx)
@@ -196,8 +203,12 @@ SyncFolderHierarchy
196203
SyncFolderItems
197204
UnpinTeamMailbox
198205
UpdateItems
199-
200-
206+
GetInboxRules
207+
UpdateInboxRules
208+
AddDelegates
209+
GetDelegates
210+
RemoveDelegates
211+
UpdateDelegates
201212

202213
## List of Folder object methods available
203214

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ews-javascript-api",
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"description": "EWS Managed api in JavaScript",
55
"main": "js/ExchangeWebService.js",
66
"scripts": {
Lines changed: 62 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,67 @@
1-
import {RuleOperation} from "./RuleOperation";
2-
import {Rule} from "./Rule";
1+
import {EwsServiceXmlWriter} from "../Core/EwsServiceXmlWriter";
2+
import {EwsUtilities} from "../Core/EwsUtilities";
33
import {ExchangeService} from "../Core/ExchangeService";
4-
import {EwsServiceXmlWriter} from "../Core/EwsServiceXmlWriter";
4+
import {Rule} from "./Rule";
5+
import {XmlElementNames} from "../Core/XmlElementNames";
6+
7+
import {RuleOperation} from "./RuleOperation";
8+
/**
9+
* Represents an operation to create a new rule.
10+
*
11+
* @sealed
12+
*/
513
export class CreateRuleOperation extends RuleOperation {
6-
Rule: Rule;
7-
XmlElementName: string;
14+
15+
/**
16+
* Inbox rule to be created.
17+
*/
818
private rule: Rule;
9-
InternalToJson(service: ExchangeService): any { throw new Error("CreateRuleOperation.ts - InternalToJson : Not implemented."); }
10-
InternalValidate(): any { throw new Error("CreateRuleOperation.ts - InternalValidate : Not implemented."); }
11-
WriteElementsToXml(writer: EwsServiceXmlWriter): any { throw new Error("CreateRuleOperation.ts - WriteElementsToXml : Not implemented."); }
12-
}
1319

20+
/**
21+
* Gets or sets the rule to be created.
22+
*/
23+
get Rule(): Rule {
24+
return this.rule;
25+
}
26+
set Rule(value: Rule) {
27+
this.SetFieldValue<Rule>({ getValue: () => this.rule, setValue: (updateValue) => { this.rule = updateValue } }, value);
28+
}
29+
30+
/**
31+
* @internal Gets the Xml element name of the CreateRuleOperation object.
32+
*/
33+
get XmlElementName(): string {
34+
return XmlElementNames.CreateRuleOperation;
35+
}
36+
37+
/**
38+
* Initializes a new instance of the **CreateRuleOperation** class.
39+
*/
40+
constructor();
41+
/**
42+
* Initializes a new instance of the **CreateRuleOperation** class.
43+
*
44+
* @param {Rule} rule The inbox rule to create.
45+
*/
46+
constructor(rule: Rule);
47+
constructor(rule: Rule = null) {
48+
super();
49+
this.rule = rule;
50+
}
51+
52+
/**
53+
* @internal Validates this instance.
54+
*/
55+
InternalValidate(): void {
56+
EwsUtilities.ValidateParam(this.rule, "Rule");
57+
}
1458

59+
/**
60+
* @internal Writes the elements to XML writer.
61+
*
62+
* @param {EwsServiceXmlWriter} writer The writer.
63+
*/
64+
WriteElementsToXml(writer: EwsServiceXmlWriter): void {
65+
this.Rule.WriteToXml(writer, XmlElementNames.Rule);
66+
}
67+
}
Lines changed: 63 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,67 @@
1-
import {RuleOperation} from "./RuleOperation";
1+
import {EwsServiceXmlWriter} from "../Core/EwsServiceXmlWriter";
2+
import {EwsUtilities} from "../Core/EwsUtilities";
23
import {ExchangeService} from "../Core/ExchangeService";
3-
import {EwsServiceXmlWriter} from "../Core/EwsServiceXmlWriter";
4+
import {XmlElementNames} from "../Core/XmlElementNames";
5+
import {XmlNamespace} from "../Enumerations/XmlNamespace";
6+
7+
import {RuleOperation} from "./RuleOperation";
8+
/**
9+
* Represents an operation to delete an existing rule.
10+
*
11+
* @sealed
12+
*/
413
export class DeleteRuleOperation extends RuleOperation {
5-
RuleId: string;
6-
XmlElementName: string;
14+
15+
/**
16+
* Id of the inbox rule to delete.
17+
*/
718
private ruleId: string;
8-
InternalToJson(service: ExchangeService): any { throw new Error("DeleteRuleOperation.ts - InternalToJson : Not implemented."); }
9-
InternalValidate(): any { throw new Error("DeleteRuleOperation.ts - InternalValidate : Not implemented."); }
10-
WriteElementsToXml(writer: EwsServiceXmlWriter): any { throw new Error("DeleteRuleOperation.ts - WriteElementsToXml : Not implemented."); }
11-
}
1219

20+
/**
21+
* Gets or sets the Id of the rule to delete.
22+
*/
23+
get RuleId(): string {
24+
return this.ruleId;
25+
}
26+
set RuleId(value: string) {
27+
this.SetFieldValue<string>({ getValue: () => this.ruleId, setValue: (updateValue) => { this.ruleId = updateValue } }, value);
28+
}
29+
30+
/**
31+
* @internal Gets the Xml element name of the DeleteRuleOperation object.
32+
*/
33+
get XmlElementName(): string {
34+
return XmlElementNames.DeleteRuleOperation;
35+
}
36+
37+
/**
38+
* Initializes a new instance of the **DeleteRuleOperation** class.
39+
*/
40+
constructor();
41+
/**
42+
* Initializes a new instance of the **DeleteRuleOperation** class.
43+
*
44+
* @param {string} ruleId The Id of the inbox rule to delete.
45+
*/
46+
constructor(ruleId: string);
47+
constructor(ruleId: string = null) {
48+
super();
49+
this.ruleId = ruleId;
50+
}
51+
52+
/**
53+
* @internal Validates this instance.
54+
*/
55+
InternalValidate(): void {
56+
EwsUtilities.ValidateParam(this.ruleId, "RuleId");
57+
}
58+
59+
/**
60+
* @internal Writes the elements to XML writer.
61+
*
62+
* @param {EwsServiceXmlWriter} writer The writer.
63+
*/
64+
WriteElementsToXml(writer: EwsServiceXmlWriter): void {
65+
writer.WriteElementValue(XmlNamespace.Types, XmlElementNames.RuleId, this.RuleId);
66+
}
67+
}

0 commit comments

Comments
 (0)