microsoft-graph-client 1.0.52 → 1.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/calendar.d.ts.map +1 -1
- package/dist/api/calendar.js +6 -1
- package/dist/api/calendar.js.map +1 -1
- package/dist/api/chats.d.ts.map +1 -1
- package/dist/api/chats.js +17 -18
- package/dist/api/chats.js.map +1 -1
- package/dist/api/mail.d.ts.map +1 -1
- package/dist/api/mail.js +21 -6
- package/dist/api/mail.js.map +1 -1
- package/dist/api/mailFolders.d.ts +5 -1
- package/dist/api/mailFolders.d.ts.map +1 -1
- package/dist/api/mailFolders.js +48 -4
- package/dist/api/mailFolders.js.map +1 -1
- package/dist/api/messages.d.ts +1 -1
- package/dist/api/messages.d.ts.map +1 -1
- package/dist/api/messages.js +3 -2
- package/dist/api/messages.js.map +1 -1
- package/dist/api/transcripts.d.ts.map +1 -1
- package/dist/api/transcripts.js +7 -1
- package/dist/api/transcripts.js.map +1 -1
- package/dist/api/users.d.ts.map +1 -1
- package/dist/api/users.js +5 -1
- package/dist/api/users.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/mail.d.ts +3 -2
- package/dist/types/mail.d.ts.map +1 -1
- package/dist/types/mailFolder.d.ts +39 -1
- package/dist/types/mailFolder.d.ts.map +1 -1
- package/dist/utils/index.d.ts +4 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/odata.d.ts +118 -19
- package/dist/utils/odata.d.ts.map +1 -1
- package/dist/utils/odata.js +136 -20
- package/dist/utils/odata.js.map +1 -1
- package/dist/utils/retention.d.ts +59 -0
- package/dist/utils/retention.d.ts.map +1 -0
- package/dist/utils/retention.js +132 -0
- package/dist/utils/retention.js.map +1 -0
- package/package.json +1 -1
package/dist/api/users.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/api/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,GAUpB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/api/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,GAUpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,OAAO;IACnC;;;OAGG;IACI,KAAK,CAAC,cAAc,CAAC,SAA+B,EAAE;QAC3D,OAAO,IAAI,CAAC,MAAM;aACf,GAAG,CAAC,KAAK,CAAC;aACV,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,mBAAmB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACxD,GAAG,EAAmB,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,GAAG,CAAC,MAAqB;QACpC,OAAO,IAAI,CAAC,MAAM;aACf,GAAG,CAAC,UAAU,MAAM,CAAC,MAAM,EAAE,CAAC;aAC9B,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,mBAAmB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACxD,GAAG,EAAmB,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM,CAAC,MAAyB;QAC3C,+DAA+D;QAC/D,oEAAoE;QACpE,2DAA2D;QAC3D,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM;aAChC,GAAG,CAAC,kCAAkC,CAAC;aACvC,MAAM,CAAC,WA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AAyB,CAAC;YAC3C,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,IAAI,EAAE,GAAG,CAAC,kBAAkB,CAAC;SAC9B,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACI,KAAK,CAAC,oBAAoB,CAAC,MAAkC;QAClE,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC,IAAI,CAAC;YAClE,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,YAAY;YAChD,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;SAC9C,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,WAAW,CAAC,MAAyB;QAChD,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,MAAM,CAAC,MAAM,uBAAuB,CAAC,CAAC,IAAI,CAAC;YACzE,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,YAAY;YAChD,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;SAC9C,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { GraphClient } from './client.js';
|
|
2
2
|
export { BaseApi, CalendarApi, ChatsApi, FilesApi, MailApi, MailFoldersApi, MailRulesApi, MessagesApi, PlacesApi, TranscriptsApi, UsersApi, } from './api/index.js';
|
|
3
3
|
export { Authenticator } from './auth/index.js';
|
|
4
|
-
export { encodeSharePointUrl,
|
|
5
|
-
export type { MeetingInfo } from './utils/index.js';
|
|
4
|
+
export { RETENTION_FLAGS_PROPERTY, RETENTION_PERIOD_PROPERTY, RETENTION_PROPERTY_FILTER, RETENTION_TAG_PROPERTY, buildRetentionProperties, decodeRetentionTag, encodeRetentionTag, encodeSharePointUrl, escapeODataLiteral, extractChatIdFromJoinUrl, extractMeetingInfoFromJoinUrl, markdownToHtml, odataAnyOf, odataFilter, odataFilterValue, odataRaw, odataSearch, odataSearchValue, parseRetentionPolicy, sanitizeHtml, } from './utils/index.js';
|
|
5
|
+
export type { MeetingInfo, ODataRaw, ODataTemplateValue, RetentionPolicy, RetentionPropertyPayload, SingleValueExtendedProperty, } from './utils/index.js';
|
|
6
6
|
export type { GraphApiResponse, GraphClientConfig, GraphError, GetUserParams, GetUserPhotoMetadataParams, GetUserPhotoParams, GetUserPhotoResult, SearchUsersParams, User, UserPhotoMetadata, UserPhotoSize, PreferredPresenceAvailability, PresenceAvailability, SetPreferredPresenceParams, SetPresenceParams, Chat, ChatType, ConversationMember, CreateChatParams, GetChatParams, ListChatsParams, ListChatsResult, ChatMessage, ChatMessageAttachment, ChatMessageImportance, ChatMessageInfo, ChatMessageMention, DownloadHostedContentParams, DownloadHostedContentResult, GetChatMessagesParams, ItemBody, SearchHit, SearchHitsContainer, SearchMessagesParams, SearchRequest, SearchResponse, SearchResult, SendChatMessageParams, SetMessageReactionParams, UnsetMessageReactionParams, UpdateChatMessageParams, CopyMailParams, EmailAddress, FileAttachment, ListMailsParams, Message, MoveMailParams, SendMailParams, CreateMailFolderParams, DeleteMailFolderParams, GetMailFolderParams, ListChildMailFoldersParams, ListMailFoldersParams, MailFolder, MoveMailFolderParams, UpdateMailFolderParams, CreateMailRuleParams, DeleteMailRuleParams, GetMailRuleParams, ListMailRulesParams, MessageRule, MessageRuleActions, MessageRulePredicates, UpdateMailRuleParams, Attendee, CancelCalendarEventParams, CreateCalendarEventParams, DateTimeTimeZone, Event, FindMeetingTimesParams, GetCalendarEventsParams, Location, MeetingTimeSuggestion, MeetingTimeSuggestionsResult, NullableOption, DownloadSharePointFileParams, DownloadSharePointFileResult, DriveItem, DriveItemMeetingSource, GetDriveItemParams, GrantFilePermissionParams, SearchFilesParams, UpdateSharePointFileParams, UpdateSharePointFileResult, UploadToSharePointParams, UploadToSharePointResult, CallTranscript, GetMeetingByJoinUrlParams, GetTranscriptContentParams, ListTranscriptsParams, OnlineMeeting, GetScheduleParams, Room, ScheduleItem, } from './types/index.js';
|
|
7
7
|
export { DEFAULT_SCOPES, USER_PHOTO_SIZES } from './types/index.js';
|
|
8
8
|
export type { Client as GraphSDKClient, ResponseType } from '@microsoft/microsoft-graph-client';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EACL,OAAO,EACP,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,cAAc,EACd,QAAQ,GACT,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,EACL,mBAAmB,EACnB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EACL,OAAO,EACP,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,cAAc,EACd,QAAQ,GACT,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,6BAA6B,EAC7B,cAAc,EACd,UAAU,EACV,WAAW,E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,cAAc,EAEd,4BAA4B,EAC5B,4BAA4B,EAC5B,SAAS,EACT,sBAAsB,EACtB,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,0BAA0B,EAC1B,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EAExB,cAAc,EACd,yBAAyB,EACzB,0BAA0B,EAC1B,qBAAqB,EACrB,aAAa,EAEb,iBAAiB,EACjB,IAAI,EACJ,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpE,YAAY,EAAE,MAAM,IAAI,cAAc,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,6 @@ export { BaseApi, CalendarApi, ChatsApi, FilesApi, MailApi, MailFoldersApi, Mail
|
|
|
5
5
|
// Auth exports
|
|
6
6
|
export { Authenticator } from './auth/index.js';
|
|
7
7
|
// Utility exports
|
|
8
|
-
export { encodeSharePointUrl,
|
|
8
|
+
export { RETENTION_FLAGS_PROPERTY, RETENTION_PERIOD_PROPERTY, RETENTION_PROPERTY_FILTER, RETENTION_TAG_PROPERTY, buildRetentionProperties, decodeRetentionTag, encodeRetentionTag, encodeSharePointUrl, escapeODataLiteral, extractChatIdFromJoinUrl, extractMeetingInfoFromJoinUrl, markdownToHtml, odataAnyOf, odataFilter, odataFilterValue, odataRaw, odataSearch, odataSearchValue, parseRetentionPolicy, sanitizeHtml, } from './utils/index.js';
|
|
9
9
|
export { DEFAULT_SCOPES, USER_PHOTO_SIZES } from './types/index.js';
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,qBAAqB;AACrB,OAAO,EACL,OAAO,EACP,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,cAAc,EACd,QAAQ,GACT,MAAM,gBAAgB,CAAC;AAExB,eAAe;AACf,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,kBAAkB;AAClB,OAAO,EACL,mBAAmB,EACnB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,qBAAqB;AACrB,OAAO,EACL,OAAO,EACP,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,cAAc,EACd,QAAQ,GACT,MAAM,gBAAgB,CAAC;AAExB,eAAe;AACf,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,kBAAkB;AAClB,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,6BAA6B,EAC7B,cAAc,EACd,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAwH1B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/types/mail.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { Message, EmailAddress } from '@microsoft/microsoft-graph-types';
|
|
2
2
|
export interface ListMailsParams {
|
|
3
|
+
/** Page size (default: 20). Graph clamps `$top` on `/me/messages` at 1000. */
|
|
3
4
|
limit?: number;
|
|
4
5
|
/** Well-known folder name or folder ID. Defaults to inbox. Well-known names: inbox, sentitems, drafts, deleteditems, junkemail, archive */
|
|
5
6
|
folder?: string;
|
|
@@ -9,8 +10,8 @@ export interface ListMailsParams {
|
|
|
9
10
|
until?: string;
|
|
10
11
|
unreadOnly?: boolean;
|
|
11
12
|
hasAttachments?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
from?: string;
|
|
13
|
+
/** Sender email addresses. A message matches if it came from any of them. */
|
|
14
|
+
from?: string[];
|
|
14
15
|
/** Include full message body in response */
|
|
15
16
|
includeBody?: boolean;
|
|
16
17
|
/** Format for the body: 'text' or 'html' (default: 'html') */
|
package/dist/types/mail.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail.d.ts","sourceRoot":"","sources":["../../src/types/mail.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAM9E,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2IAA2I;IAC3I,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,
|
|
1
|
+
{"version":3,"file":"mail.d.ts","sourceRoot":"","sources":["../../src/types/mail.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAM9E,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2IAA2I;IAC3I,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,KAAK,C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EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,gCAAgC;IAChC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,sEAAsE;IACtE,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mFAAmF;IACnF,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,aAAa,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -2,8 +2,22 @@ export type { MailFolder } from '@microsoft/microsoft-graph-types';
|
|
|
2
2
|
export interface ListMailFoldersParams {
|
|
3
3
|
/** Page size (default: 50, max: 250). */
|
|
4
4
|
limit?: number;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Expand child folders one level deep — useful for tree rendering.
|
|
7
|
+
*
|
|
8
|
+
* One level is the limit Graph enforces. A nested
|
|
9
|
+
* `childFolders($expand=childFolders)` is accepted and returns 200, but the
|
|
10
|
+
* grandchildren are silently absent, so a caller that needs the whole tree
|
|
11
|
+
* has to walk it.
|
|
12
|
+
*/
|
|
6
13
|
includeChildFolders?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Expand each folder's retention policy (Outlook's "Assign Policy").
|
|
16
|
+
*
|
|
17
|
+
* Rides the same request at no extra round-trip and composes with
|
|
18
|
+
* `includeChildFolders`, which also carries the policy for each child.
|
|
19
|
+
*/
|
|
20
|
+
includeRetentionPolicy?: boolean;
|
|
7
21
|
/** Include hidden folders (default: false). Hidden folders are system-managed. */
|
|
8
22
|
includeHidden?: boolean;
|
|
9
23
|
/** Opaque `@odata.nextLink` from a previous response — when set, all other params are ignored. */
|
|
@@ -14,6 +28,8 @@ export interface ListChildMailFoldersParams {
|
|
|
14
28
|
folderId: string;
|
|
15
29
|
/** Page size (default: 50, max: 250). */
|
|
16
30
|
limit?: number;
|
|
31
|
+
/** Expand each folder's retention policy. See {@link ListMailFoldersParams.includeRetentionPolicy}. */
|
|
32
|
+
includeRetentionPolicy?: boolean;
|
|
17
33
|
/** Include hidden folders (default: false). */
|
|
18
34
|
includeHidden?: boolean;
|
|
19
35
|
/** Opaque `@odata.nextLink` from a previous response — when set, all other params are ignored. */
|
|
@@ -22,6 +38,8 @@ export interface ListChildMailFoldersParams {
|
|
|
22
38
|
export interface GetMailFolderParams {
|
|
23
39
|
/** Folder id, or a well-known name (`inbox`, `drafts`, `sentitems`, `deleteditems`, `junkemail`, `archive`). */
|
|
24
40
|
folderId: string;
|
|
41
|
+
/** Expand the folder's retention policy. See {@link ListMailFoldersParams.includeRetentionPolicy}. */
|
|
42
|
+
includeRetentionPolicy?: boolean;
|
|
25
43
|
}
|
|
26
44
|
export interface CreateMailFolderParams {
|
|
27
45
|
displayName: string;
|
|
@@ -36,6 +54,26 @@ export interface UpdateMailFolderParams {
|
|
|
36
54
|
displayName?: string;
|
|
37
55
|
/** Toggle visibility from system folders perspective. */
|
|
38
56
|
isHidden?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Retention tag GUID to assign (Outlook's "Assign Policy").
|
|
59
|
+
*
|
|
60
|
+
* **Graph accepts a tag that does not exist**, stores it, and reads it back
|
|
61
|
+
* perfectly; the Managed Folder Assistant then ignores it forever. Nothing
|
|
62
|
+
* here can tell the difference, so validate the GUID against the tags a
|
|
63
|
+
* mailbox actually uses before calling this.
|
|
64
|
+
*/
|
|
65
|
+
retentionTag?: string;
|
|
66
|
+
/** Days before the tag's action applies. Only meaningful alongside `retentionTag`. */
|
|
67
|
+
retentionPeriodDays?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Remove the folder's retention policy.
|
|
70
|
+
*
|
|
71
|
+
* Sends `value: null` for all three properties, which is the only spelling
|
|
72
|
+
* that deletes them — an empty string stores an empty string and the folder
|
|
73
|
+
* still looks policed. Exchange leaves `PR_RETENTION_FLAGS` behind as 128
|
|
74
|
+
* afterwards; a folder is policed when it has a tag, not when it has flags.
|
|
75
|
+
*/
|
|
76
|
+
clearRetention?: boolean;
|
|
39
77
|
}
|
|
40
78
|
export interface DeleteMailFolderParams {
|
|
41
79
|
folderId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mailFolder.d.ts","sourceRoot":"","sources":["../../src/types/mailFolder.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAMnE,MAAM,WAAW,qBAAqB;IACpC,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf
|
|
1
|
+
{"version":3,"file":"mailFolder.d.ts","sourceRoot":"","sources":["../../src/types/mailFolder.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAMnE,MAAM,WAAW,qBAAqB;IACpC,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM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EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,aAAa,EAAE,MAAM,CAAC;CACvB"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { markdownToHtml, sanitizeHtml } from './markdown.js';
|
|
2
|
-
export { escapeODataLiteral,
|
|
2
|
+
export { escapeODataLiteral, odataAnyOf, odataFilter, odataFilterValue, odataRaw, odataSearch, odataSearchValue, } from './odata.js';
|
|
3
|
+
export type { ODataRaw, ODataTemplateValue } from './odata.js';
|
|
4
|
+
export { RETENTION_FLAGS_PROPERTY, RETENTION_PERIOD_PROPERTY, RETENTION_PROPERTY_FILTER, RETENTION_TAG_PROPERTY, buildRetentionProperties, decodeRetentionTag, encodeRetentionTag, parseRetentionPolicy, } from './retention.js';
|
|
5
|
+
export type { RetentionPolicy, RetentionPropertyPayload, SingleValueExtendedProperty } from './retention.js';
|
|
3
6
|
export { encodeSharePointUrl } from './sharepoint.js';
|
|
4
7
|
export { extractChatIdFromJoinUrl, extractMeetingInfoFromJoinUrl } from './teams.js';
|
|
5
8
|
export type { MeetingInfo } from './teams.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,eAAe,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7G,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AACrF,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { markdownToHtml, sanitizeHtml } from './markdown.js';
|
|
2
|
-
export { escapeODataLiteral,
|
|
2
|
+
export { escapeODataLiteral, odataAnyOf, odataFilter, odataFilterValue, odataRaw, odataSearch, odataSearchValue, } from './odata.js';
|
|
3
|
+
export { RETENTION_FLAGS_PROPERTY, RETENTION_PERIOD_PROPERTY, RETENTION_PROPERTY_FILTER, RETENTION_TAG_PROPERTY, buildRetentionProperties, decodeRetentionTag, encodeRetentionTag, parseRetentionPolicy, } from './retention.js';
|
|
3
4
|
export { encodeSharePointUrl } from './sharepoint.js';
|
|
4
5
|
export { extractChatIdFromJoinUrl, extractMeetingInfoFromJoinUrl } from './teams.js';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/utils/odata.d.ts
CHANGED
|
@@ -19,9 +19,21 @@
|
|
|
19
19
|
* `?$filter=...'fm & fd'...` and the server parsed the `&` as a query
|
|
20
20
|
* param separator. See test/probe-encoding.mts for the verification.
|
|
21
21
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
22
|
+
* **Build filter and search strings with the `odataFilter` / `odataSearch`
|
|
23
|
+
* tagged templates.** The tag applies the right layers to every interpolation,
|
|
24
|
+
* so the safe form is the default form instead of something each call site has
|
|
25
|
+
* to remember:
|
|
26
|
+
*
|
|
27
|
+
* filters.push(odataFilter`from/emailAddress/address eq '${params.from}'`);
|
|
28
|
+
*
|
|
29
|
+
* Remembering to apply `odataFilterValue` by hand is exactly what let five call
|
|
30
|
+
* sites interpolate raw values for months. An untagged template
|
|
31
|
+
* literal that opens an OData string literal, or that reaches `.filter()` /
|
|
32
|
+
* `.search()` / `.query()` directly, is therefore an eslint error inside
|
|
33
|
+
* `src/api`.
|
|
34
|
+
*
|
|
35
|
+
* The value helpers below stay exported: they are what the tags are built from,
|
|
36
|
+
* and consumers of this package building their own queries need them.
|
|
25
37
|
*
|
|
26
38
|
* @see https://learn.microsoft.com/en-us/graph/filter-query-parameter
|
|
27
39
|
*/
|
|
@@ -29,8 +41,8 @@
|
|
|
29
41
|
* Escapes single quotes in an OData string literal.
|
|
30
42
|
*
|
|
31
43
|
* Use this only if you are constructing a fully-formed URL yourself and your
|
|
32
|
-
* URL builder will handle URL encoding separately. In most cases, prefer
|
|
33
|
-
* `
|
|
44
|
+
* URL builder will handle URL encoding separately. In most cases, prefer the
|
|
45
|
+
* `odataFilter` tag, which combines both layers.
|
|
34
46
|
*
|
|
35
47
|
* @example
|
|
36
48
|
* escapeODataLiteral("Let's Talk") // → "Let''s Talk"
|
|
@@ -44,25 +56,112 @@ export declare function escapeODataLiteral(value: string): string;
|
|
|
44
56
|
* 1. OData literal escape (`'` → `''`)
|
|
45
57
|
* 2. URL-encode the result so reserved characters don't break the request URL
|
|
46
58
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* const value = odataFilterValue("FM & FD");
|
|
50
|
-
* client.api('/me/chats').filter(`contains(tolower(topic), '${value}')`).get();
|
|
51
|
-
* // The SDK sends: ?$filter=contains(tolower(topic), 'fm%20%26%20fd')
|
|
59
|
+
* Prefer the `odataFilter` tag inside this package; reach for this directly
|
|
60
|
+
* only when you are assembling a value away from the string it lands in.
|
|
52
61
|
*
|
|
53
62
|
* @example
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* //
|
|
63
|
+
* odataFilterValue('invoice+statements@example.com');
|
|
64
|
+
* // → 'invoice%2Bstatements%40example.com'
|
|
65
|
+
* // Without the encoding, the SDK sends a raw `+`, which the server reads as
|
|
66
|
+
* // a space and the filter matches nobody.
|
|
58
67
|
*/
|
|
59
68
|
export declare function odataFilterValue(value: string): string;
|
|
60
69
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
70
|
+
* Prepares a string for safe use as a `$search` value passed through the
|
|
71
|
+
* Microsoft Graph SDK's `.search()` builder.
|
|
72
|
+
*
|
|
73
|
+
* The SDK's `.search()` builder has the exact same non-encoding behavior as
|
|
74
|
+
* `.filter()` (see the module doc above) — it writes the value straight into
|
|
75
|
+
* `$search=...` on the request URL with no URL-encoding. `$search` values are
|
|
76
|
+
* plain quoted phrases, not OData string literals, so there's no literal
|
|
77
|
+
* layer to apply here (unlike `odataFilterValue`) — this is URL-encoding
|
|
78
|
+
* only.
|
|
79
|
+
*
|
|
80
|
+
* **It does not neutralize a literal `"` in the value.** The server percent-
|
|
81
|
+
* decodes `$search` before parsing it as KQL, so an embedded quote is restored
|
|
82
|
+
* and closes the phrase the caller wrapped around it. Verified against Graph:
|
|
83
|
+
* searching `Anthropic" OR from:someone@example.com` comes back as
|
|
84
|
+
* `Syntax error: character ':' is not valid at position 19 in
|
|
85
|
+
* '"Anthropic" OR from:someone@example.com"'` — the server quoting back the
|
|
86
|
+
* decoded string. That fails loud rather than mis-parsing silently, but a
|
|
87
|
+
* caller needing to search for a literal quote cannot express it here. What
|
|
88
|
+
* the encoding does buy is `+`, `&` and `#` surviving the URL.
|
|
89
|
+
*
|
|
90
|
+
* Prefer the `odataSearch` tag inside this package.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* odataSearchValue('from:invoice+statements@example.com');
|
|
94
|
+
* // → 'from%3Ainvoice%2Bstatements%40example.com'
|
|
95
|
+
*/
|
|
96
|
+
export declare function odataSearchValue(value: string): string;
|
|
97
|
+
/**
|
|
98
|
+
* An already-built OData fragment, interpolated into a tag verbatim.
|
|
99
|
+
*
|
|
100
|
+
* Produced only by {@link odataRaw}. Carrying a nominal type rather than a bare
|
|
101
|
+
* string is the point: the tags encode anything they are handed, and the only
|
|
102
|
+
* way past that is to say so explicitly at the call site.
|
|
103
|
+
*/
|
|
104
|
+
export declare class ODataRaw {
|
|
105
|
+
readonly fragment: string;
|
|
106
|
+
constructor(fragment: string);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Marks an interpolation as OData *syntax* rather than a *value*, so the tags
|
|
110
|
+
* pass it through unencoded.
|
|
111
|
+
*
|
|
112
|
+
* This is the escape hatch, and it exists for one legitimate shape: composing
|
|
113
|
+
* clauses that the tags already built, where the parentheses, quotes and
|
|
114
|
+
* operators are structure and encoding them would destroy the expression.
|
|
115
|
+
*
|
|
116
|
+
* Never hand it something a caller supplied. If a value reaches `odataRaw`,
|
|
117
|
+
* the encoding is gone and nothing else will catch it.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* const clauses = addresses.map((a) => odataFilter`from/emailAddress/address eq '${a}'`);
|
|
121
|
+
* const anyOf = odataFilter`(${odataRaw(clauses.join(' or '))})`;
|
|
122
|
+
*/
|
|
123
|
+
export declare function odataRaw(fragment: string): ODataRaw;
|
|
124
|
+
/** What a tag accepts in an interpolation slot. */
|
|
125
|
+
export type ODataTemplateValue = string | number | boolean | ODataRaw;
|
|
126
|
+
/**
|
|
127
|
+
* Builds an OData `$filter` expression, escaping and URL-encoding every
|
|
128
|
+
* interpolated value (see {@link odataFilterValue}).
|
|
129
|
+
*
|
|
130
|
+
* Write the OData syntax — including the quotes around a string literal — in
|
|
131
|
+
* the template; interpolate only values. Numbers, booleans and unquoted
|
|
132
|
+
* datetime literals are safe to interpolate as-is: encoding leaves them intact
|
|
133
|
+
* apart from characters that genuinely have to be encoded, such as the `+` in a
|
|
134
|
+
* timezone offset.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* odataFilter`from/emailAddress/address eq '${'invoice+statements@example.com'}'`;
|
|
138
|
+
* // → "from/emailAddress/address eq 'invoice%2Bstatements%40example.com'"
|
|
139
|
+
*/
|
|
140
|
+
export declare function odataFilter(strings: TemplateStringsArray, ...values: ODataTemplateValue[]): string;
|
|
141
|
+
/**
|
|
142
|
+
* Builds an OData `$search` expression, URL-encoding every interpolated value
|
|
143
|
+
* (see {@link odataSearchValue}).
|
|
144
|
+
*
|
|
145
|
+
* Write the phrase quotes and any KQL operators in the template; interpolate
|
|
146
|
+
* only values.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* odataSearch`"mail:${'a+b@example.com'}" OR "displayName:${'a+b@example.com'}"`;
|
|
150
|
+
* // → '"mail:a%2Bb%40example.com" OR "displayName:a%2Bb%40example.com"'
|
|
151
|
+
*/
|
|
152
|
+
export declare function odataSearch(strings: TemplateStringsArray, ...values: ODataTemplateValue[]): string;
|
|
153
|
+
/**
|
|
154
|
+
* Joins already-built clauses into an any-of group, parenthesised only when
|
|
155
|
+
* there is more than one.
|
|
64
156
|
*
|
|
65
|
-
*
|
|
157
|
+
* The parentheses matter: an `or` group spliced into a filter that also has
|
|
158
|
+
* `and` clauses would otherwise bind wrongly and widen the query instead of
|
|
159
|
+
* narrowing it. This exists so that composing clauses — the one legitimate use
|
|
160
|
+
* of {@link odataRaw} — has a name, rather than each new any-of filter reaching
|
|
161
|
+
* for the escape hatch and copying the last call site that did.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* odataAnyOf(addresses.map((a) => odataFilter`from/emailAddress/address eq '${a}'`));
|
|
66
165
|
*/
|
|
67
|
-
export declare function
|
|
166
|
+
export declare function odataAnyOf(clauses: string[]): string;
|
|
68
167
|
//# sourceMappingURL=odata.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odata.d.ts","sourceRoot":"","sources":["../../src/utils/odata.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"odata.d.ts","sourceRoot":"","sources":["../../src/utils/odata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;;;GAMG;AACH,qBAAa,QAAQ;aACgB,QAAQ,EAAE,MAAM;gBAAhB,QAAQ,EAAE,MAAM;CACpD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAEnD;AAED,mDAAmD;AACnD,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAgBtE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAElG;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAElG;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAEpD"}
|
package/dist/utils/odata.js
CHANGED
|
@@ -19,9 +19,21 @@
|
|
|
19
19
|
* `?$filter=...'fm & fd'...` and the server parsed the `&` as a query
|
|
20
20
|
* param separator. See test/probe-encoding.mts for the verification.
|
|
21
21
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
22
|
+
* **Build filter and search strings with the `odataFilter` / `odataSearch`
|
|
23
|
+
* tagged templates.** The tag applies the right layers to every interpolation,
|
|
24
|
+
* so the safe form is the default form instead of something each call site has
|
|
25
|
+
* to remember:
|
|
26
|
+
*
|
|
27
|
+
* filters.push(odataFilter`from/emailAddress/address eq '${params.from}'`);
|
|
28
|
+
*
|
|
29
|
+
* Remembering to apply `odataFilterValue` by hand is exactly what let five call
|
|
30
|
+
* sites interpolate raw values for months. An untagged template
|
|
31
|
+
* literal that opens an OData string literal, or that reaches `.filter()` /
|
|
32
|
+
* `.search()` / `.query()` directly, is therefore an eslint error inside
|
|
33
|
+
* `src/api`.
|
|
34
|
+
*
|
|
35
|
+
* The value helpers below stay exported: they are what the tags are built from,
|
|
36
|
+
* and consumers of this package building their own queries need them.
|
|
25
37
|
*
|
|
26
38
|
* @see https://learn.microsoft.com/en-us/graph/filter-query-parameter
|
|
27
39
|
*/
|
|
@@ -29,8 +41,8 @@
|
|
|
29
41
|
* Escapes single quotes in an OData string literal.
|
|
30
42
|
*
|
|
31
43
|
* Use this only if you are constructing a fully-formed URL yourself and your
|
|
32
|
-
* URL builder will handle URL encoding separately. In most cases, prefer
|
|
33
|
-
* `
|
|
44
|
+
* URL builder will handle URL encoding separately. In most cases, prefer the
|
|
45
|
+
* `odataFilter` tag, which combines both layers.
|
|
34
46
|
*
|
|
35
47
|
* @example
|
|
36
48
|
* escapeODataLiteral("Let's Talk") // → "Let''s Talk"
|
|
@@ -46,29 +58,133 @@ export function escapeODataLiteral(value) {
|
|
|
46
58
|
* 1. OData literal escape (`'` → `''`)
|
|
47
59
|
* 2. URL-encode the result so reserved characters don't break the request URL
|
|
48
60
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* const value = odataFilterValue("FM & FD");
|
|
52
|
-
* client.api('/me/chats').filter(`contains(tolower(topic), '${value}')`).get();
|
|
53
|
-
* // The SDK sends: ?$filter=contains(tolower(topic), 'fm%20%26%20fd')
|
|
61
|
+
* Prefer the `odataFilter` tag inside this package; reach for this directly
|
|
62
|
+
* only when you are assembling a value away from the string it lands in.
|
|
54
63
|
*
|
|
55
64
|
* @example
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* //
|
|
65
|
+
* odataFilterValue('invoice+statements@example.com');
|
|
66
|
+
* // → 'invoice%2Bstatements%40example.com'
|
|
67
|
+
* // Without the encoding, the SDK sends a raw `+`, which the server reads as
|
|
68
|
+
* // a space and the filter matches nobody.
|
|
60
69
|
*/
|
|
61
70
|
export function odataFilterValue(value) {
|
|
62
71
|
return encodeURIComponent(escapeODataLiteral(value));
|
|
63
72
|
}
|
|
64
73
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
74
|
+
* Prepares a string for safe use as a `$search` value passed through the
|
|
75
|
+
* Microsoft Graph SDK's `.search()` builder.
|
|
76
|
+
*
|
|
77
|
+
* The SDK's `.search()` builder has the exact same non-encoding behavior as
|
|
78
|
+
* `.filter()` (see the module doc above) — it writes the value straight into
|
|
79
|
+
* `$search=...` on the request URL with no URL-encoding. `$search` values are
|
|
80
|
+
* plain quoted phrases, not OData string literals, so there's no literal
|
|
81
|
+
* layer to apply here (unlike `odataFilterValue`) — this is URL-encoding
|
|
82
|
+
* only.
|
|
83
|
+
*
|
|
84
|
+
* **It does not neutralize a literal `"` in the value.** The server percent-
|
|
85
|
+
* decodes `$search` before parsing it as KQL, so an embedded quote is restored
|
|
86
|
+
* and closes the phrase the caller wrapped around it. Verified against Graph:
|
|
87
|
+
* searching `Anthropic" OR from:someone@example.com` comes back as
|
|
88
|
+
* `Syntax error: character ':' is not valid at position 19 in
|
|
89
|
+
* '"Anthropic" OR from:someone@example.com"'` — the server quoting back the
|
|
90
|
+
* decoded string. That fails loud rather than mis-parsing silently, but a
|
|
91
|
+
* caller needing to search for a literal quote cannot express it here. What
|
|
92
|
+
* the encoding does buy is `+`, `&` and `#` surviving the URL.
|
|
93
|
+
*
|
|
94
|
+
* Prefer the `odataSearch` tag inside this package.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* odataSearchValue('from:invoice+statements@example.com');
|
|
98
|
+
* // → 'from%3Ainvoice%2Bstatements%40example.com'
|
|
99
|
+
*/
|
|
100
|
+
export function odataSearchValue(value) {
|
|
101
|
+
return encodeURIComponent(value);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* An already-built OData fragment, interpolated into a tag verbatim.
|
|
105
|
+
*
|
|
106
|
+
* Produced only by {@link odataRaw}. Carrying a nominal type rather than a bare
|
|
107
|
+
* string is the point: the tags encode anything they are handed, and the only
|
|
108
|
+
* way past that is to say so explicitly at the call site.
|
|
109
|
+
*/
|
|
110
|
+
export class ODataRaw {
|
|
111
|
+
fragment;
|
|
112
|
+
constructor(fragment) {
|
|
113
|
+
this.fragment = fragment;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Marks an interpolation as OData *syntax* rather than a *value*, so the tags
|
|
118
|
+
* pass it through unencoded.
|
|
119
|
+
*
|
|
120
|
+
* This is the escape hatch, and it exists for one legitimate shape: composing
|
|
121
|
+
* clauses that the tags already built, where the parentheses, quotes and
|
|
122
|
+
* operators are structure and encoding them would destroy the expression.
|
|
123
|
+
*
|
|
124
|
+
* Never hand it something a caller supplied. If a value reaches `odataRaw`,
|
|
125
|
+
* the encoding is gone and nothing else will catch it.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* const clauses = addresses.map((a) => odataFilter`from/emailAddress/address eq '${a}'`);
|
|
129
|
+
* const anyOf = odataFilter`(${odataRaw(clauses.join(' or '))})`;
|
|
130
|
+
*/
|
|
131
|
+
export function odataRaw(fragment) {
|
|
132
|
+
return new ODataRaw(fragment);
|
|
133
|
+
}
|
|
134
|
+
function interpolate(strings, values, encode) {
|
|
135
|
+
let out = strings[0];
|
|
136
|
+
for (let i = 0; i < values.length; i++) {
|
|
137
|
+
const value = values[i];
|
|
138
|
+
out += value instanceof ODataRaw ? value.fragment : encode(String(value));
|
|
139
|
+
out += strings[i + 1];
|
|
140
|
+
}
|
|
141
|
+
return out;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Builds an OData `$filter` expression, escaping and URL-encoding every
|
|
145
|
+
* interpolated value (see {@link odataFilterValue}).
|
|
68
146
|
*
|
|
69
|
-
*
|
|
147
|
+
* Write the OData syntax — including the quotes around a string literal — in
|
|
148
|
+
* the template; interpolate only values. Numbers, booleans and unquoted
|
|
149
|
+
* datetime literals are safe to interpolate as-is: encoding leaves them intact
|
|
150
|
+
* apart from characters that genuinely have to be encoded, such as the `+` in a
|
|
151
|
+
* timezone offset.
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* odataFilter`from/emailAddress/address eq '${'invoice+statements@example.com'}'`;
|
|
155
|
+
* // → "from/emailAddress/address eq 'invoice%2Bstatements%40example.com'"
|
|
156
|
+
*/
|
|
157
|
+
export function odataFilter(strings, ...values) {
|
|
158
|
+
return interpolate(strings, values, odataFilterValue);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Builds an OData `$search` expression, URL-encoding every interpolated value
|
|
162
|
+
* (see {@link odataSearchValue}).
|
|
163
|
+
*
|
|
164
|
+
* Write the phrase quotes and any KQL operators in the template; interpolate
|
|
165
|
+
* only values.
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* odataSearch`"mail:${'a+b@example.com'}" OR "displayName:${'a+b@example.com'}"`;
|
|
169
|
+
* // → '"mail:a%2Bb%40example.com" OR "displayName:a%2Bb%40example.com"'
|
|
170
|
+
*/
|
|
171
|
+
export function odataSearch(strings, ...values) {
|
|
172
|
+
return interpolate(strings, values, odataSearchValue);
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Joins already-built clauses into an any-of group, parenthesised only when
|
|
176
|
+
* there is more than one.
|
|
177
|
+
*
|
|
178
|
+
* The parentheses matter: an `or` group spliced into a filter that also has
|
|
179
|
+
* `and` clauses would otherwise bind wrongly and widen the query instead of
|
|
180
|
+
* narrowing it. This exists so that composing clauses — the one legitimate use
|
|
181
|
+
* of {@link odataRaw} — has a name, rather than each new any-of filter reaching
|
|
182
|
+
* for the escape hatch and copying the last call site that did.
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* odataAnyOf(addresses.map((a) => odataFilter`from/emailAddress/address eq '${a}'`));
|
|
70
186
|
*/
|
|
71
|
-
export function
|
|
72
|
-
return
|
|
187
|
+
export function odataAnyOf(clauses) {
|
|
188
|
+
return clauses.length === 1 ? clauses[0] : odataFilter `(${odataRaw(clauses.join(' or '))})`;
|
|
73
189
|
}
|
|
74
190
|
//# sourceMappingURL=odata.js.map
|
package/dist/utils/odata.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odata.js","sourceRoot":"","sources":["../../src/utils/odata.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"odata.js","sourceRoot":"","sources":["../../src/utils/odata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACnC,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,OAAO,kBAAkB,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;AACvD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,OAAO,QAAQ;IACgB;IAAnC,YAAmC,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;IAAG,CAAC;CACxD;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAgB;IACvC,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC;AAKD,SAAS,WAAW,CAClB,OAA6B,EAC7B,MAA4B,EAC5B,MAAiC;IAEjC,IAAI,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACxB,GAAG,IAAI,KAAK,YAAY,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC1E,GAAG,IAAI,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,OAA6B,EAAE,GAAG,MAA4B;IACxF,OAAO,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;AACxD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAC,OAA6B,EAAE,GAAG,MAA4B;IACxF,OAAO,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;AACxD,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,UAAU,CAAC,OAAiB;IAC1C,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAA,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC;AAC9F,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/** MAPI id of PR_POLICY_TAG — the retention tag GUID, stored as bytes. */
|
|
2
|
+
export declare const RETENTION_TAG_PROPERTY = "Binary 0x3019";
|
|
3
|
+
/** MAPI id of PR_RETENTION_PERIOD — days before the tag's action applies. */
|
|
4
|
+
export declare const RETENTION_PERIOD_PROPERTY = "Integer 0x301A";
|
|
5
|
+
/** MAPI id of PR_RETENTION_FLAGS — Exchange bookkeeping; read-only in practice. */
|
|
6
|
+
export declare const RETENTION_FLAGS_PROPERTY = "Integer 0x301D";
|
|
7
|
+
/** `$filter` selecting exactly the three retention properties in an `$expand`. */
|
|
8
|
+
export declare const RETENTION_PROPERTY_FILTER: string;
|
|
9
|
+
/** One entry of a `mailFolder`'s `singleValueExtendedProperties` collection, as Graph returns it. */
|
|
10
|
+
export interface SingleValueExtendedProperty {
|
|
11
|
+
id?: string | null;
|
|
12
|
+
value?: string | null;
|
|
13
|
+
}
|
|
14
|
+
/** One entry as it is *sent* — a `null` value is the delete, so it is not optional. */
|
|
15
|
+
export interface RetentionPropertyPayload {
|
|
16
|
+
id: string;
|
|
17
|
+
value: string | null;
|
|
18
|
+
}
|
|
19
|
+
/** A folder's retention policy, in the terms a person set it in. */
|
|
20
|
+
export interface RetentionPolicy {
|
|
21
|
+
/** Retention tag GUID, in the form Exchange shows it. */
|
|
22
|
+
tag: string;
|
|
23
|
+
/** Days before the tag's action applies, when the folder carries one. */
|
|
24
|
+
periodDays: number | null;
|
|
25
|
+
/** Raw PR_RETENTION_FLAGS. Reported because it is there, not because it means anything. */
|
|
26
|
+
flags: number | null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Decodes PR_POLICY_TAG's bytes into a GUID string.
|
|
30
|
+
*
|
|
31
|
+
* The bytes are in .NET `Guid` layout — the first three fields little-endian,
|
|
32
|
+
* the last two big-endian — not a flat big-endian read. Reading them flat
|
|
33
|
+
* produces a string that looks like a GUID and is not one: tags read off a real
|
|
34
|
+
* mailbox decode to a valid version-4 GUID under this layout, and to an
|
|
35
|
+
* impossible version nibble when the bytes are read straight through.
|
|
36
|
+
*/
|
|
37
|
+
export declare function decodeRetentionTag(base64Value: string): string | null;
|
|
38
|
+
/** Encodes a GUID string back into PR_POLICY_TAG's bytes. Inverse of {@link decodeRetentionTag}. */
|
|
39
|
+
export declare function encodeRetentionTag(guid: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Reads a folder's retention policy out of its expanded extended properties.
|
|
42
|
+
*
|
|
43
|
+
* Returns `null` when the folder carries no tag. A folder whose policy has been
|
|
44
|
+
* cleared keeps a `PR_RETENTION_FLAGS` of 128, so presence of the properties is
|
|
45
|
+
* not the test — presence of a tag is.
|
|
46
|
+
*/
|
|
47
|
+
export declare function parseRetentionPolicy(properties: SingleValueExtendedProperty[] | null | undefined): RetentionPolicy | null;
|
|
48
|
+
/**
|
|
49
|
+
* Builds the `singleValueExtendedProperties` payload for a PATCH.
|
|
50
|
+
*
|
|
51
|
+
* Pass a tag and period to assign a policy, or `null` for both to clear one.
|
|
52
|
+
* `PR_RETENTION_FLAGS` is only ever sent as `null`, on a clear: Exchange owns
|
|
53
|
+
* that value and rewrites whatever is sent.
|
|
54
|
+
*/
|
|
55
|
+
export declare function buildRetentionProperties(policy: {
|
|
56
|
+
tag: string | null;
|
|
57
|
+
periodDays: number | null;
|
|
58
|
+
}): RetentionPropertyPayload[];
|
|
59
|
+
//# sourceMappingURL=retention.d.ts.map
|