diff --git a/packages/graph/messages/users.ts b/packages/graph/messages/users.ts index 0712770bd..fba861a72 100644 --- a/packages/graph/messages/users.ts +++ b/packages/graph/messages/users.ts @@ -1,20 +1,21 @@ import { addProp, body } from "@pnp/queryable"; import { _User, User } from "../users/types.js"; -import { IMessages, Messages, IMailboxSettings, MailboxSettings, IMailFolders, MailFolders, IMessage } from "./types.js"; +import { IMessages, Messages, IMailboxSettings, MailboxSettings, IMailFolders, MailFolders } from "./types.js"; import { graphPost } from "../operations.js"; +import { Message } from "@microsoft/microsoft-graph-types"; declare module "../users/types" { interface _User { readonly messages: IMessages; readonly mailboxSettings: IMailboxSettings; readonly mailFolders: IMailFolders; - sendMail(message: IMessage): Promise; + sendMail(message: Message): Promise; } interface IUser { readonly messages: IMessages; readonly mailboxSettings: IMailboxSettings; readonly mailFolders: IMailFolders; - sendMail(message: IMessage): Promise; + sendMail(message: Message): Promise; } } @@ -22,6 +23,6 @@ addProp(_User, "messages", Messages); addProp(_User, "mailboxSettings", MailboxSettings); addProp(_User, "mailFolders", MailFolders); -_User.prototype.sendMail = function (this: _User, message: IMessage): Promise { +_User.prototype.sendMail = function (message: Message): Promise { return graphPost(User(this, "sendMail"), body(message)); };