diff --git a/src/nylas.ts b/src/nylas.ts index 3452e3df..983f45d5 100644 --- a/src/nylas.ts +++ b/src/nylas.ts @@ -7,6 +7,7 @@ import { Webhooks } from './resources/webhooks.js'; import { Applications } from './resources/applications.js'; import { Messages } from './resources/messages.js'; import { Drafts } from './resources/drafts.js'; +import { Threads } from './resources/threads.js'; /** * The entry point to the Node SDK @@ -39,6 +40,10 @@ export default class Nylas { * Access the Messages API */ public messages: Messages; + /** + * Access the Threads API + */ + public threads: Threads; /** * Access the Webhooks API */ @@ -66,6 +71,7 @@ export default class Nylas { this.drafts = new Drafts(this.apiClient); this.events = new Events(this.apiClient); this.messages = new Messages(this.apiClient); + this.threads = new Threads(this.apiClient); this.webhooks = new Webhooks(this.apiClient); return this; diff --git a/src/resources/drafts.ts b/src/resources/drafts.ts index 2de46573..993643ff 100644 --- a/src/resources/drafts.ts +++ b/src/resources/drafts.ts @@ -65,6 +65,11 @@ export type DestroyDraftParams = FindDraftParams; */ export type SendDraftParams = FindDraftParams; +/** + * Nylas Drafts API + * + * The Nylas Drafts API allows you to list, find, update, delete, and send drafts on user accounts. + */ export class Drafts extends Resource { /** * Return all Drafts diff --git a/src/resources/messages.ts b/src/resources/messages.ts index d514e165..bd326c0f 100644 --- a/src/resources/messages.ts +++ b/src/resources/messages.ts @@ -100,6 +100,11 @@ export interface FindScheduledMessageParams { */ export type StopScheduledMessageParams = FindScheduledMessageParams; +/** + * Nylas Messages API + * + * The Nylas Messages API allows you to list, find, update, delete, schedule, and send messages on user accounts. + */ export class Messages extends Resource { public smartCompose: SmartCompose; diff --git a/src/resources/smartCompose.ts b/src/resources/smartCompose.ts index bc739b0a..3498e0de 100644 --- a/src/resources/smartCompose.ts +++ b/src/resources/smartCompose.ts @@ -28,6 +28,11 @@ export interface ComposeMessageReplyParams { requestBody: ComposeMessageReplyParams; } +/** + * A collection of Smart Compose related API endpoints. + * + * These endpoints allow for the generation of message suggestions. + */ export class SmartCompose extends Resource { /** * Compose a message