w
This commit is contained in:
+23
-8
@@ -537,12 +537,16 @@ ${restriction}
|
||||
|
||||
const changesXml = itemIds.map((id) => {
|
||||
const updatesXml = updates.map((u) => {
|
||||
const val = typeof u.value === "boolean" ? (u.value ? "true" : "false") : u.value;
|
||||
const val = typeof u.value === "boolean"
|
||||
? (u.value ? "true" : "false")
|
||||
: u.value;
|
||||
return `\
|
||||
<t:SetItemField>
|
||||
<t:FieldURI FieldURI="${u.fieldUri}"/>
|
||||
<t:Message>
|
||||
<t:${propName(u.fieldUri)}>${String(val)}</t:${propName(u.fieldUri)}>
|
||||
<t:${propName(u.fieldUri)}>${String(val)}</t:${
|
||||
propName(u.fieldUri)
|
||||
}>
|
||||
</t:Message>
|
||||
</t:SetItemField>`;
|
||||
}).join("\n");
|
||||
@@ -573,7 +577,9 @@ ${changesXml}
|
||||
|
||||
// ── GetAttachment ───────────────────────────────────────────────────────
|
||||
|
||||
async getAttachment(attachmentId: string): Promise<{ content: Buffer; name: string; contentType: string }> {
|
||||
async getAttachment(
|
||||
attachmentId: string,
|
||||
): Promise<{ content: Buffer; name: string; contentType: string }> {
|
||||
const soap = buildSoapEnvelope(`\
|
||||
<m:GetAttachment>
|
||||
<m:AttachmentIds>
|
||||
@@ -645,13 +651,17 @@ ${changesXml}
|
||||
endDate: string,
|
||||
requestedView: string = "DetailedMerged",
|
||||
): Promise<any> {
|
||||
const mailboxDataXml = emails.map((email) => `\
|
||||
const mailboxDataXml = emails.map((email) =>
|
||||
`\
|
||||
<t:MailboxData>
|
||||
<t:Email>
|
||||
<t:Address>${email.replace(/&/g, "&").replace(/</g, "<")}</t:Address>
|
||||
<t:Address>${
|
||||
email.replace(/&/g, "&").replace(/</g, "<")
|
||||
}</t:Address>
|
||||
</t:Email>
|
||||
<t:AttendeeType>Required</t:AttendeeType>
|
||||
</t:MailboxData>`).join("\n");
|
||||
</t:MailboxData>`
|
||||
).join("\n");
|
||||
|
||||
const soap = `<?xml version="1.0" encoding="utf-8"?>
|
||||
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
|
||||
@@ -684,10 +694,15 @@ ${mailboxDataXml}
|
||||
|
||||
// ── ResolveNames (directory search) ─────────────────────────────────────
|
||||
|
||||
async resolveNames(query: string, fullContact: boolean = true): Promise<any[]> {
|
||||
async resolveNames(
|
||||
query: string,
|
||||
fullContact: boolean = true,
|
||||
): Promise<any[]> {
|
||||
const soap = buildSoapEnvelope(`\
|
||||
<m:ResolveNames ReturnFullContactData="${fullContact}" SearchScope="ActiveDirectoryContacts">
|
||||
<m:UnresolvedEntry>${query.replace(/&/g, "&").replace(/</g, "<")}</m:UnresolvedEntry>
|
||||
<m:UnresolvedEntry>${
|
||||
query.replace(/&/g, "&").replace(/</g, "<")
|
||||
}</m:UnresolvedEntry>
|
||||
</m:ResolveNames>`);
|
||||
|
||||
const data = await this.soapRequest(
|
||||
|
||||
Reference in New Issue
Block a user