Skip to content

Commit f979217

Browse files
Docs update (#21)
1 parent 83b49f0 commit f979217

File tree

3 files changed

+2013
-1601
lines changed

3 files changed

+2013
-1601
lines changed

src/embed/base.ts

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -259,21 +259,22 @@ export const renderInQueue = (fn: (next?: (val?: any) => void) => Promise<any>):
259259
/**
260260
* Imports TML representation of the metadata objects into ThoughtSpot.
261261
* @param data
262+
* @returns imports TML data into ThoughtSpot
262263
* @example
263264
* ```js
264-
* executeTML({
265-
* //Array of metadata Tmls
266-
metadata_tmls: [
267-
"'\''{\"guid\":\"9bd202f5-d431-44bf-9a07-b4f7be372125\",
268-
\"liveboard\":{\"name\":\"Parameters Liveboard\"}}'\''"
269-
],
270-
import_policy: 'PARTIAL', // Specifies the import policy for the TML import.
271-
create_new: false, // If selected, creates TML objects with new GUIDs.
272-
}).then(result => {
273-
console.log(result);
274-
}).catch(error => {
275-
console.error(error);
276-
});
265+
* executeTML({
266+
* //Array of metadata Tmls in string format
267+
* metadata_tmls: [
268+
* "'\''{\"guid\":\"9bd202f5-d431-44bf-9a07-b4f7be372125\",
269+
* \"liveboard\":{\"name\":\"Parameters Liveboard\"}}'\''"
270+
* ],
271+
* import_policy: 'PARTIAL', // Specifies the import policy for the TML import.
272+
* create_new: false, // If selected, creates TML objects with new GUIDs.
273+
* }).then(result => {
274+
* console.log(result);
275+
* }).catch(error => {
276+
* console.error(error);
277+
* });
277278
*```
278279
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
279280
* @group Global methods
@@ -319,27 +320,28 @@ export const executeTML = async (data: executeTMLInput): Promise<any> => {
319320
* Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML
320321
* format.
321322
* @param data
323+
* @returns exports TML data
322324
* @example
323325
* ```js
324-
exportTML({
325-
metadata: [
326-
{
327-
type: "LIVEBOARD", //Metadata Type
328-
identifier: "9bd202f5-d431-44bf-9a07-b4f7be372125" //Metadata Id
329-
}
330-
],
331-
export_associated: false,//indicates whether to export associated metadata objects
332-
export_fqn: false, //Adds FQNs of the referenced objects.For example, if you are
333-
//exporting a Liveboard and its associated objects, the API
334-
//returns the Liveboard TML data with the FQNs of the referenced
335-
//worksheet. If the exported TML data includes FQNs, you don't need
336-
//to manually add FQNs of the referenced objects during TML import.
337-
edoc_format: "JSON" //It takes JSON or YAML value
338-
}).then(result => {
339-
console.log(result);
340-
}).catch(error => {
341-
console.error(error);
342-
});
326+
* exportTML({
327+
* metadata: [
328+
* {
329+
* type: "LIVEBOARD", //Metadata Type
330+
* identifier: "9bd202f5-d431-44bf-9a07-b4f7be372125" //Metadata Id
331+
* }
332+
* ],
333+
* export_associated: false,//indicates whether to export associated metadata objects
334+
* export_fqn: false, //Adds FQNs of the referenced objects.For example, if you are
335+
* //exporting a Liveboard and its associated objects, the API
336+
* //returns the Liveboard TML data with the FQNs of the referenced
337+
* //worksheet. If the exported TML data includes FQNs, you don't need
338+
* //to manually add FQNs of the referenced objects during TML import.
339+
* edoc_format: "JSON" //It takes JSON or YAML value
340+
* }).then(result => {
341+
* console.log(result);
342+
* }).catch(error => {
343+
* console.error(error);
344+
* });
343345
* ```
344346
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
345347
* @group Global methods

src/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,8 +2139,8 @@ export enum EmbedEvent {
21392139
* Prerequisite: Set isOnBeforeGetVizDataInterceptEnabled : true
21402140
* for this embed event to get emitted.
21412141
*
2142-
* Parameter: payload
2143-
* Parameter: responder
2142+
* @param: payload
2143+
* @param: responder
21442144
* Contains elements that lets developers define whether ThoughtSpot
21452145
* will run the search or not, and if not, which error message to provide.
21462146
*
@@ -2152,6 +2152,7 @@ export enum EmbedEvent {
21522152
*
21532153
* @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
21542154
*
2155+
* @example
21552156
*```js
21562157
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
21572158
* (payload, responder) => {
@@ -2187,7 +2188,6 @@ export enum EmbedEvent {
21872188
* }})
21882189
* })
21892190
*```
2190-
*
21912191
*/
21922192
OnBeforeGetVizDataIntercept = 'onBeforeGetVizDataIntercept',
21932193
/**

0 commit comments

Comments
 (0)