monday-sdk-js 0.4.6 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/constants.js
CHANGED
|
@@ -2,12 +2,12 @@ function isNodeEnv() {
|
|
|
2
2
|
return typeof process !== "undefined";
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
function
|
|
6
|
-
return isNodeEnv() && process.env.NODE_ENV === "development";
|
|
5
|
+
function isNodeDevStageEnv() {
|
|
6
|
+
return isNodeEnv() && (process.env.NODE_ENV === "development" || process.env.NODE_ENV === "staging");
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const getEnvOrDefault = (key, defaultVal) => {
|
|
10
|
-
return
|
|
10
|
+
return isNodeDevStageEnv() && process.env[key] !== "undefined" ? process.env[key] : defaultVal;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
const MONDAY_PROTOCOL = () => getEnvOrDefault("MONDAY_COM_PROTOCOL", "https");
|
|
@@ -7,11 +7,10 @@ type BlockTypes = 'normal text' | 'large title' | 'medium title' | 'small title'
|
|
|
7
7
|
* Block content in delta format
|
|
8
8
|
*/
|
|
9
9
|
interface BlockContent { deltaFormat: Array<object> };
|
|
10
|
-
|
|
11
10
|
export interface ClientExecute {
|
|
12
11
|
/**
|
|
13
|
-
* Type fallback to account for new execute methods during the AI hackathon.
|
|
14
|
-
* This will be removed when the 0.4.0 version goes out of beta.
|
|
12
|
+
* Type fallback to account for new execute methods during the AI hackathon.
|
|
13
|
+
* This will be removed when the 0.4.0 version goes out of beta.
|
|
15
14
|
*/
|
|
16
15
|
execute (type: any, params?: any): Promise<any>;
|
|
17
16
|
|
|
@@ -205,6 +204,40 @@ export interface ClientExecute {
|
|
|
205
204
|
},
|
|
206
205
|
): Promise<{ data: Record<string, any> }>;
|
|
207
206
|
/**
|
|
207
|
+
* Doc command, This method adds multiple blocks to the beginning of a workdoc using HTML..
|
|
208
|
+
* @param type Which action to perform
|
|
209
|
+
*/
|
|
210
|
+
execute(type: 'addMultiBlocksFromHtml'): Promise<{ html: string }>; /**
|
|
211
|
+
/**
|
|
212
|
+
* Doc command, This method opens the app modal on the first selected block when multiple are open.
|
|
213
|
+
* @param type Which action to perform
|
|
214
|
+
*/
|
|
215
|
+
execute(type: 'openAppOnFirstTextualSelectedBlock'): Promise<{ data: any }>; /**
|
|
216
|
+
/**
|
|
217
|
+
* Doc command This method opens the app on the next block when multiple are selected. This is only available after calling the "openAppOnFirstTextualBlock" function.
|
|
218
|
+
* @param type Which action to perform
|
|
219
|
+
*/
|
|
220
|
+
execute(type: 'moveToNextSelectedTextualBlock'): Promise<{ data: any }>; /**
|
|
221
|
+
/**
|
|
222
|
+
* Doc command This method opens the app on the next block when multiple are selected. This is only available after calling the "openAppOnFirstTextualBlock" function.
|
|
223
|
+
* @param type Which action to perform
|
|
224
|
+
*/
|
|
225
|
+
execute(type: 'moveToPrevSelectedTextualBlock'): Promise<{ data: any }>; /**
|
|
226
|
+
/**
|
|
227
|
+
* Doc command, This method replaces the highlighted text with text of your choosing at the beginning of the block.
|
|
228
|
+
* @param type Which action to perform
|
|
229
|
+
*/
|
|
230
|
+
execute(type: 'replaceHighlightText'): Promise<{ text: string }>; /**
|
|
231
|
+
/**
|
|
232
|
+
* Item Update section, This method creates or changes the content of an item's update.
|
|
233
|
+
* @param type Which action to perform
|
|
234
|
+
*/
|
|
235
|
+
execute(type: 'updatePostContentAction'): Promise<{ suggestedRephrase: string }>; /**
|
|
236
|
+
/**
|
|
237
|
+
* This method closes the AI assistant's dialog.
|
|
238
|
+
* @param type Which action to perform
|
|
239
|
+
*/
|
|
240
|
+
execute(type: 'closeDialog'): Promise<{ data: any }>; /**
|
|
208
241
|
* Closes the modal window.
|
|
209
242
|
* @param type Which action to perform
|
|
210
243
|
*/
|