UNPKG

@bs-plugins/o365

Version:

Bamboo Shell plugin for Office 365

35 lines (32 loc) 1.01 kB
import { BSPlugin } from '@bs-core/shell'; type O365Config = { appId: string; clientSecret: string; tenantId: string; grantType?: string; resource?: string; tokenGracePeriod?: number; }; type MessageAttachment = { name: string; contentType: string; contentB64: string; }; declare class O365 extends BSPlugin { private _appId; private _clientSecret; private _tenantId; private _grantType; private _resource; private _tokenGracePeriod; private _tokenTimeout; private _token; constructor(name: string, o365Config: O365Config); login(): Promise<void>; logout(): Promise<void>; stop(): Promise<void>; loggedIn(): Promise<boolean>; sendOutlookMessage(toRecipients: string[], ccRecipients: string[], bccRecipients: string[], fromUser: string, subject: string, content: string, contentType: "text" | "html", refCode?: string, attachments?: MessageAttachment[]): Promise<boolean>; } export { O365 }; export type { O365Config };