Skip to content

Commit

Permalink
smart compose comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mrashed-dev committed Oct 16, 2023
1 parent bdba82e commit 504330a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/resources/smartCompose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,33 @@ import {
import { Overrides } from '../config.js';
import { NylasResponse } from '../models/response.js';

/**
* The parameters for the {@link SmartCompose.composeMessage} method
* @property identifier The identifier of the grant to act upon
* @property requestBody The prompt that smart compose will use to generate a message suggestion
*/
export interface ComposeMessageParams {
identifier: string;
requestBody: ComposeMessageRequest;
}

/**
* The parameters for the {@link SmartCompose.composeMessageReply} method
* @property identifier The identifier of the grant to act upon
* @property messageId The id of the message to reply to
* @property requestBody The prompt that smart compose will use to generate a reply suggestion
*/
export interface ComposeMessageReplyParams {
identifier: string;
messageId: string;
requestBody: ComposeMessageReplyParams;
}

export class SmartCompose extends Resource {
/**
* Compose a message
* @return The generated message
*/
public composeMessage({
identifier,
requestBody,
Expand All @@ -32,6 +47,10 @@ export class SmartCompose extends Resource {
});
}

/**
* Compose a message reply
* @return The generated message reply
*/
public composeMessageReply({
identifier,
messageId,
Expand Down

0 comments on commit 504330a

Please sign in to comment.