From bec3290c6356bdbd506dfc04eceb3c31a39a05cc Mon Sep 17 00:00:00 2001 From: ShayElkana <10776815+ShayElkana@users.noreply.github.com> Date: Wed, 26 Jul 2023 14:34:59 +0300 Subject: [PATCH] feature: Added AI supported execute functions (#116) * feature: Added AI supported execute functions * feature: Added AI supported execute functions * feature: Added AI supported execute functions --- package.json | 2 +- types/client-execute.interface.ts | 39 ++++++++++++++++++++++++++++--- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index a6808dea..7b73bf92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "monday-sdk-js", - "version": "0.4.7", + "version": "0.4.8", "private": false, "repository": "https://github.com/mondaycom/monday-sdk-js", "main": "src/index.js", diff --git a/types/client-execute.interface.ts b/types/client-execute.interface.ts index 5a8a6bec..d4c7b3a6 100644 --- a/types/client-execute.interface.ts +++ b/types/client-execute.interface.ts @@ -7,11 +7,10 @@ type BlockTypes = 'normal text' | 'large title' | 'medium title' | 'small title' * Block content in delta format */ interface BlockContent { deltaFormat: Array }; - export interface ClientExecute { /** - * Type fallback to account for new execute methods during the AI hackathon. - * This will be removed when the 0.4.0 version goes out of beta. + * Type fallback to account for new execute methods during the AI hackathon. + * This will be removed when the 0.4.0 version goes out of beta. */ execute (type: any, params?: any): Promise; @@ -205,6 +204,40 @@ export interface ClientExecute { }, ): Promise<{ data: Record }>; /** + * Doc command, This method adds multiple blocks to the beginning of a workdoc using HTML.. + * @param type Which action to perform + */ + execute(type: 'addMultiBlocksFromHtml'): Promise<{ html: string }>; /** + /** + * Doc command, This method opens the app modal on the first selected block when multiple are open. + * @param type Which action to perform + */ + execute(type: 'openAppOnFirstTextualSelectedBlock'): Promise<{ data: any }>; /** + /** + * Doc command This method opens the app on the next block when multiple are selected. This is only available after calling the "openAppOnFirstTextualBlock" function. + * @param type Which action to perform + */ + execute(type: 'moveToNextSelectedTextualBlock'): Promise<{ data: any }>; /** + /** + * Doc command This method opens the app on the next block when multiple are selected. This is only available after calling the "openAppOnFirstTextualBlock" function. + * @param type Which action to perform + */ + execute(type: 'moveToPrevSelectedTextualBlock'): Promise<{ data: any }>; /** + /** + * Doc command, This method replaces the highlighted text with text of your choosing at the beginning of the block. + * @param type Which action to perform + */ + execute(type: 'replaceHighlightText'): Promise<{ text: string }>; /** + /** + * Item Update section, This method creates or changes the content of an item's update. + * @param type Which action to perform + */ + execute(type: 'updatePostContentAction'): Promise<{ suggestedRephrase: string }>; /** + /** + * This method closes the AI assistant's dialog. + * @param type Which action to perform + */ + execute(type: 'closeDialog'): Promise<{ data: any }>; /** * Closes the modal window. * @param type Which action to perform */