Skip to content

Commit

Permalink
feature: Added AI supported execute functions (#116)
Browse files Browse the repository at this point in the history
* feature: Added AI supported execute functions

* feature: Added AI supported execute functions

* feature: Added AI supported execute functions
  • Loading branch information
ShayElkana authored Jul 26, 2023
1 parent c27a313 commit bec3290
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
39 changes: 36 additions & 3 deletions types/client-execute.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ type BlockTypes = 'normal text' | 'large title' | 'medium title' | 'small title'
* Block content in delta format
*/
interface BlockContent { deltaFormat: Array<object> };

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<any>;

Expand Down Expand Up @@ -205,6 +204,40 @@ export interface ClientExecute {
},
): Promise<{ data: Record<string, any> }>;
/**
* 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
*/
Expand Down

0 comments on commit bec3290

Please sign in to comment.