@thoughtspot/visual-embed-sdk 1.20.0 → 1.20.2

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.
Files changed (73) hide show
  1. package/dist/src/auth.d.ts +38 -4
  2. package/dist/src/auth.d.ts.map +1 -1
  3. package/dist/src/embed/app.d.ts +2 -2
  4. package/dist/src/embed/base.d.ts +25 -14
  5. package/dist/src/embed/base.d.ts.map +1 -1
  6. package/dist/src/embed/liveboard.d.ts +13 -3
  7. package/dist/src/embed/liveboard.d.ts.map +1 -1
  8. package/dist/src/embed/search-bar.d.ts +4 -1
  9. package/dist/src/embed/search-bar.d.ts.map +1 -1
  10. package/dist/src/embed/search.d.ts +2 -2
  11. package/dist/src/embed/ts-embed.d.ts +35 -1
  12. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  13. package/dist/src/index.d.ts +3 -3
  14. package/dist/src/index.d.ts.map +1 -1
  15. package/dist/src/react/index.d.ts.map +1 -1
  16. package/dist/src/types.d.ts +201 -27
  17. package/dist/src/types.d.ts.map +1 -1
  18. package/dist/tsembed.es.js +247 -38
  19. package/dist/tsembed.js +228 -38
  20. package/lib/package.json +2 -3
  21. package/lib/src/auth.d.ts +38 -4
  22. package/lib/src/auth.d.ts.map +1 -1
  23. package/lib/src/auth.js +17 -2
  24. package/lib/src/auth.js.map +1 -1
  25. package/lib/src/embed/app.d.ts +2 -2
  26. package/lib/src/embed/app.js +1 -1
  27. package/lib/src/embed/base.d.ts +25 -14
  28. package/lib/src/embed/base.d.ts.map +1 -1
  29. package/lib/src/embed/base.js +24 -4
  30. package/lib/src/embed/base.js.map +1 -1
  31. package/lib/src/embed/base.spec.js +2 -2
  32. package/lib/src/embed/base.spec.js.map +1 -1
  33. package/lib/src/embed/liveboard.d.ts +13 -3
  34. package/lib/src/embed/liveboard.d.ts.map +1 -1
  35. package/lib/src/embed/liveboard.js +12 -2
  36. package/lib/src/embed/liveboard.js.map +1 -1
  37. package/lib/src/embed/search-bar.d.ts +4 -1
  38. package/lib/src/embed/search-bar.d.ts.map +1 -1
  39. package/lib/src/embed/search-bar.js +1 -1
  40. package/lib/src/embed/search-bar.js.map +1 -1
  41. package/lib/src/embed/search.d.ts +2 -2
  42. package/lib/src/embed/search.js +1 -1
  43. package/lib/src/embed/ts-embed.d.ts +35 -1
  44. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  45. package/lib/src/embed/ts-embed.js +35 -2
  46. package/lib/src/embed/ts-embed.js.map +1 -1
  47. package/lib/src/index.d.ts +3 -3
  48. package/lib/src/index.d.ts.map +1 -1
  49. package/lib/src/index.js +1 -1
  50. package/lib/src/index.js.map +1 -1
  51. package/lib/src/react/index.d.ts.map +1 -1
  52. package/lib/src/react/index.js +4 -2
  53. package/lib/src/react/index.js.map +1 -1
  54. package/lib/src/react/index.spec.js +14 -2
  55. package/lib/src/react/index.spec.js.map +1 -1
  56. package/lib/src/types.d.ts +201 -27
  57. package/lib/src/types.d.ts.map +1 -1
  58. package/lib/src/types.js +155 -24
  59. package/lib/src/types.js.map +1 -1
  60. package/lib/src/visual-embed-sdk.d.ts +323 -57
  61. package/package.json +2 -3
  62. package/src/auth.ts +51 -5
  63. package/src/embed/app.ts +2 -2
  64. package/src/embed/base.spec.ts +3 -3
  65. package/src/embed/base.ts +30 -9
  66. package/src/embed/liveboard.ts +13 -3
  67. package/src/embed/search-bar.tsx +4 -1
  68. package/src/embed/search.ts +2 -2
  69. package/src/embed/ts-embed.ts +35 -2
  70. package/src/index.ts +24 -2
  71. package/src/react/index.spec.tsx +35 -2
  72. package/src/react/index.tsx +10 -2
  73. package/src/types.ts +202 -26
package/src/types.ts CHANGED
@@ -10,6 +10,7 @@
10
10
  /**
11
11
  * The authentication mechanism for allowing access to the
12
12
  * the embedded app
13
+ * @group Authentication / Init
13
14
  */
14
15
  // eslint-disable-next-line no-shadow
15
16
  export enum AuthType {
@@ -37,7 +38,47 @@ export enum AuthType {
37
38
  SAML = 'SSO_SAML',
38
39
  /**
39
40
  * SSO using SAML
40
- * Will make the host application redirect to the SAML Idp.
41
+ * Will make the host application redirect to the SAML Idp. Use this
42
+ * when the idp does not allow itself to be embedded.
43
+ *
44
+ * This redirects the host application to the SAML Idp. The host application
45
+ * will be redirected back to the ThoughtSpot app after authentication.
46
+ * @example
47
+ * ```js
48
+ * init({
49
+ * // ...
50
+ * authType: AuthType.SAMLRedirect,
51
+ * });
52
+ * ```
53
+ *
54
+ * This opens the SAML Idp in a popup window. The popup is triggered
55
+ * when the user clicks the trigger button. The popup window will be
56
+ * closed automatically after authentication.
57
+ * @example
58
+ * ```js
59
+ * init({
60
+ * // ...
61
+ * authType: AuthType.SAMLRedirect,
62
+ * authTriggerText: 'Login with SAML',
63
+ * authTriggerContainer: '#embed-container',
64
+ * inPopup: true,
65
+ * });
66
+ * ```
67
+ *
68
+ * Can also use event to trigger the popup flow. Works the same
69
+ * as above example.
70
+ * @example
71
+ * ```js
72
+ * const authEE = init({
73
+ * // ...
74
+ * authType: AuthType.SAMLRedirect,
75
+ * inPopup: true,
76
+ * });
77
+ *
78
+ * someButtonOnYourPage.addEventListener('click', () => {
79
+ * authEE.emit(AuthEvent.TRIGGER_SSO_POPUP);
80
+ * });
81
+ * ```
41
82
  */
42
83
  SAMLRedirect = 'SSO_SAML',
43
84
  /**
@@ -49,6 +90,7 @@ export enum AuthType {
49
90
  /**
50
91
  * SSO using OIDC
51
92
  * Will make the host application redirect to the OIDC Idp.
93
+ * See code samples in {@link SAMLRedirect}.
52
94
  */
53
95
  OIDCRedirect = 'SSO_OIDC',
54
96
  /**
@@ -61,6 +103,18 @@ export enum AuthType {
61
103
  * Trusted authentication server, Use your own authentication server
62
104
  * which returns a bearer token, generated using the secret_key obtained from
63
105
  * ThoughtSpot.
106
+ *
107
+ * @example
108
+ * ```js
109
+ * init({
110
+ * // ...
111
+ * authType: AuthType.TrustedAuthToken,
112
+ * getAuthToken: () => {
113
+ * return fetch('https://my-backend.app/ts-token')
114
+ * .then((response) => response.json())
115
+ * .then((data) => data.token);
116
+ * }
117
+ * ```
64
118
  */
65
119
  TrustedAuthToken = 'AuthServer',
66
120
  /**
@@ -81,7 +135,10 @@ export enum AuthType {
81
135
 
82
136
  export type DOMSelector = string | HTMLElement;
83
137
 
84
- interface customCssInterface {
138
+ /**
139
+ * inline customCSS within the {@link CustomisationsInterface}.
140
+ */
141
+ export interface customCssInterface {
85
142
  variables?: {
86
143
  [variableName: string]: string;
87
144
  };
@@ -92,10 +149,39 @@ interface customCssInterface {
92
149
  };
93
150
  };
94
151
  }
95
- interface CustomStyles {
152
+ /**
153
+ * Styles within the {@link CustomisationsInterface}.
154
+ */
155
+ export interface CustomStyles {
96
156
  customCSSUrl?: string;
97
157
  customCSS?: customCssInterface;
98
158
  }
159
+
160
+ /**
161
+ * Configuration to define the customization on the Embedded
162
+ * Thoughtspot components.
163
+ *
164
+ * @example
165
+ * ```js
166
+ * init({
167
+ * // ...
168
+ * customizations: {
169
+ * style: {
170
+ * customCSS: {
171
+ * variables: {},
172
+ * rules_UNSTABLE: {}
173
+ * }
174
+ * },
175
+ * content: {
176
+ * strings: {
177
+ * 'LIVEBOARDS': 'Dashboards'
178
+ * }
179
+ * },
180
+ * iconSpriteUrl: 'https://my-custom-icon-sprite.svg'
181
+ * }
182
+ * })
183
+ * ```
184
+ */
99
185
  export interface CustomisationsInterface {
100
186
  style?: CustomStyles;
101
187
  content?: {
@@ -110,6 +196,8 @@ export interface CustomisationsInterface {
110
196
  * It includes the ThoughtSpot hostname or IP address,
111
197
  * the type of authentication, and the authentication endpoint
112
198
  * if a trusted authentication server is used.
199
+ *
200
+ * @group Authentication / Init
113
201
  */
114
202
  export interface EmbedConfig {
115
203
  /**
@@ -286,6 +374,8 @@ export interface LayoutConfig {}
286
374
 
287
375
  /**
288
376
  * Embedded iFrame configuration
377
+ *
378
+ * @group Embed components
289
379
  */
290
380
  export interface FrameParams {
291
381
  /**
@@ -296,6 +386,12 @@ export interface FrameParams {
296
386
  * The height of the iFrame (unit is pixels if numeric).
297
387
  */
298
388
  height?: number | string;
389
+ /**
390
+ * Set to 'lazy' to enable lazy loading of the embedded TS frame.
391
+ * This will defer loading of the frame until it comes into the
392
+ * viewport. This is useful for performance optimization.
393
+ */
394
+ loading?: 'lazy' | 'eager' | 'auto';
299
395
  /**
300
396
  * This parameters will be passed on the iframe
301
397
  * as is.
@@ -400,6 +496,7 @@ export interface ViewConfig {
400
496
 
401
497
  /**
402
498
  * MessagePayload: Embed event payload: message type, data and status (start/end)
499
+ * @group Events
403
500
  */
404
501
  export type MessagePayload = {
405
502
  /* type: message type eg: 'save' */
@@ -411,6 +508,7 @@ export type MessagePayload = {
411
508
  };
412
509
  /**
413
510
  * MessageOptions: By Providing options, getting specific event start / end based on option
511
+ * @group Events
414
512
  */
415
513
  export type MessageOptions = {
416
514
  /* A boolean value indicating that start status events of this type will be dispatched */
@@ -418,6 +516,7 @@ export type MessageOptions = {
418
516
  };
419
517
  /**
420
518
  * MessageCallback: Embed event message callback
519
+ * @group Events
421
520
  */
422
521
  export type MessageCallback = (
423
522
  /* payload: Message payload contain type, data and status */
@@ -526,6 +625,10 @@ export interface RuntimeFilter {
526
625
 
527
626
  /**
528
627
  * Event types emitted by the embedded ThoughtSpot application.
628
+ *
629
+ * To add an event listener use the corresponding
630
+ * {@link LiveboardEmbed.on} or {@link AppEmbed.on} or {@link SearchEmbed.on} method.
631
+ * @group Events
529
632
  */
530
633
  // eslint-disable-next-line no-shadow
531
634
  export enum EmbedEvent {
@@ -691,6 +794,12 @@ export enum EmbedEvent {
691
794
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
692
795
  */
693
796
  Download = 'download',
797
+ /**
798
+ * Emitted when the download action is triggered on an answer
799
+ *
800
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0-sw
801
+ */
802
+ DownloadAsPng='downloadAsPng',
694
803
  /**
695
804
  * Emitted when the Download as PDF action is triggered on an answer
696
805
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
@@ -854,6 +963,7 @@ export enum EmbedEvent {
854
963
  *
855
964
  * To trigger an event use the corresponding
856
965
  * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link SearchEmbed.trigger} method.
966
+ * @group Events
857
967
  */
858
968
  // eslint-disable-next-line no-shadow
859
969
  export enum HostEvent {
@@ -865,11 +975,13 @@ export enum HostEvent {
865
975
  * @param - searchQuery - The search query
866
976
  * @param - execute - execute the existing / updated query
867
977
  * @example
978
+ * ```js
868
979
  * searchEmbed.trigger(HostEvent.Search, {
869
- * searchQuery: "[sales] by [item type],
870
- * "dataSourceIds: ["cd252e5c-b552-49a8-821d-3eadaa049cca"]
871
- * "execute": true
980
+ * searchQuery: "[sales] by [item type],
981
+ * dataSourceIds: ["cd252e5c-b552-49a8-821d-3eadaa049cca"]
982
+ * execute: true
872
983
  * })
984
+ * ```
873
985
  */
874
986
  Search = 'search',
875
987
  /**
@@ -878,10 +990,14 @@ export enum HostEvent {
878
990
  * eg. { selectedPoints: []}
879
991
  * @param - columnGuid - a string guid of the column to drill by. This is optional,
880
992
  * if not provided it will auto drill by the configured column.
881
- * @example searchEmbed.trigger(HostEvent.DrillDown, {
882
- * points: clickedPointData,
883
- * autoDrillDown: true,
993
+ * @example
994
+ * ```js
995
+ * searchEmbed.trigger(HostEvent.DrillDown, {
996
+ * points: clickedPointData,
997
+ * autoDrillDown: true,
884
998
  * })
999
+ * ```
1000
+ *
885
1001
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
886
1002
  */
887
1003
  DrillDown = 'triggerDrillDown',
@@ -920,7 +1036,10 @@ export enum HostEvent {
920
1036
  * Navigate to a specific page in App embed without any reload.
921
1037
  * This is the same as calling `appEmbed.navigateToPage(path, true)`
922
1038
  * @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
923
- * @example appEmbed.navigateToPage(-1)
1039
+ * @example
1040
+ * ```js
1041
+ * appEmbed.navigateToPage(-1)
1042
+ * ```
924
1043
  * @version SDK: 1.12.0 | ThoughtSpot 8.4.0.cl, 8.4.1-sw
925
1044
  */
926
1045
  Navigate = 'Navigate',
@@ -928,27 +1047,39 @@ export enum HostEvent {
928
1047
  * Opens the filter panel for a particular column.
929
1048
  * Works with Search embed.
930
1049
  * @param - { columnId: string, name: string, type: INT64/CHAR/DATE, dataType: ATTRIBUTE/MEASURE }
931
- * @example searchEmbed.trigger(HostEvent.OpenFilter, { columnId: '123', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE' })
1050
+ * @example
1051
+ * ```js
1052
+ * searchEmbed.trigger(HostEvent.OpenFilter, { columnId: '123', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE' })
1053
+ * ```
932
1054
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
933
1055
  */
934
1056
  OpenFilter = 'openFilter',
935
1057
  /**
936
1058
  * Adds the columns to the current Search.
937
1059
  * @param - { columnIds: string[] }
938
- * @example searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['123', '456'] })
1060
+ * @example
1061
+ * ```js
1062
+ * searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['123', '456'] })
1063
+ * ```
939
1064
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
940
1065
  */
941
1066
  AddColumns = 'addColumns',
942
1067
  /**
943
1068
  * Removes a column from the current Search.
944
1069
  * @param - { columnId: string }
945
- * @example - searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '123' })
1070
+ * @example
1071
+ * ```js
1072
+ * searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '123' })
1073
+ * ```
946
1074
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
947
1075
  */
948
1076
  RemoveColumn = 'removeColumn',
949
1077
  /**
950
1078
  * Gets the current pinboard content.
951
- * @example liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
1079
+ * @example
1080
+ * ```js
1081
+ * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
1082
+ * ```
952
1083
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
953
1084
  */
954
1085
  getExportRequestForCurrentPinboard = 'getExportRequestForCurrentPinboard',
@@ -957,87 +1088,124 @@ export enum HostEvent {
957
1088
  * @param - incase of Liveboard embed, takes in an object with vizId as a key
958
1089
  * can be left empty for search and visualization embeds
959
1090
  * @example
1091
+ * ```js
960
1092
  * liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
961
1093
  * vizEmbed.trigger(HostEvent.Pin)
962
1094
  * searchEmbed.trigger(HostEvent.Pin)
1095
+ * ```
963
1096
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
964
1097
  */
965
1098
  Pin = 'pin',
966
1099
  /**
967
1100
  * Triggers the Show Liveboard details action on a Liveboard
968
- * @example liveboardEmbed.trigger(HostEvent.LiveboardInfo)
1101
+ * @example
1102
+ * ```js
1103
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
1104
+ * ```
969
1105
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
970
1106
  */
971
1107
  LiveboardInfo = 'pinboardInfo',
972
1108
  /**
973
1109
  * Triggers the Schedule action on a Liveboard
974
- * @example liveboardEmbed.trigger(HostEvent.Schedule)
1110
+ * @example
1111
+ * ```js
1112
+ * liveboardEmbed.trigger(HostEvent.Schedule)
1113
+ * ```
975
1114
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
976
1115
  */
977
1116
  Schedule = 'subscription',
978
1117
  /**
979
1118
  * Triggers the Manage schedule action on a Liveboard
980
- * @example liveboardEmbed.trigger(HostEvent.ScheduleList)
1119
+ * @example
1120
+ * ```js
1121
+ * liveboardEmbed.trigger(HostEvent.ScheduleList)
1122
+ * ```
981
1123
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
982
1124
  */
983
1125
  SchedulesList = 'schedule-list',
984
1126
  /**
985
1127
  * Triggers the Export TML action on a Liveboard
986
- * @example liveboardEmbed.trigger(HostEvent.ExportTML)
1128
+ * @example
1129
+ * ```js
1130
+ * liveboardEmbed.trigger(HostEvent.ExportTML)
1131
+ * ```
987
1132
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
988
1133
  */
989
1134
  ExportTML = 'exportTSL',
990
1135
  /**
991
1136
  * Triggers the Edit TML action on a Liveboard
992
- * @example liveboardEmbed.trigger(HostEvent.EditTML)
1137
+ * @example
1138
+ * ```js
1139
+ * liveboardEmbed.trigger(HostEvent.EditTML)
1140
+ * ```
993
1141
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
994
1142
  */
995
1143
  EditTML = 'editTSL',
996
1144
  /**
997
1145
  * Triggers the Update TML action on a Liveboard
998
- * @example liveboardEmbed.trigger(HostEvent.UpdateTML)
1146
+ * @example
1147
+ * ```js
1148
+ * liveboardEmbed.trigger(HostEvent.UpdateTML)
1149
+ * ```
999
1150
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1000
1151
  */
1001
1152
  UpdateTML = 'updateTSL',
1002
1153
  /**
1003
1154
  * Triggers the Download PDF action on a Liveboard
1004
- * @example liveboardEmbed.trigger(HostEvent.DownloadAsPDF)
1155
+ * @example
1156
+ * ```js
1157
+ * liveboardEmbed.trigger(HostEvent.DownloadAsPDF)
1158
+ * ```
1005
1159
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1006
1160
  */
1007
1161
  DownloadAsPdf = 'downloadAsPdf',
1008
1162
  /**
1009
1163
  * Triggers the Make a copy action on a Liveboard, search or visualization
1010
1164
  * @example
1165
+ * ```js
1011
1166
  * liveboardEmbed.trigger(HostEvent.MakeACopy, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1012
1167
  * vizEmbed.trigger(HostEvent.MakeACopy)
1013
1168
  * searchEmbed.trigger(HostEvent.MakeACopy)
1169
+ * ```
1014
1170
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1015
1171
  */
1016
1172
  MakeACopy = 'makeACopy',
1017
1173
  /**
1018
1174
  * Triggers the Delete action on a Liveboard
1019
- * @example appEmbed.trigger(HostEvent.Remove)
1175
+ * @example
1176
+ * ```js
1177
+ * appEmbed.trigger(HostEvent.Remove)
1178
+ * ```
1020
1179
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1021
1180
  */
1022
1181
  Remove = 'delete',
1023
1182
  /**
1024
1183
  * Triggers the Explore action on a visualization
1025
1184
  * @param - an object with vizId as a key
1026
- * @example liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1185
+ * @example
1186
+ * ```js
1187
+ * liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1188
+ * ```
1027
1189
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1028
1190
  */
1029
1191
  Explore = 'explore',
1030
1192
  /**
1031
1193
  * Triggers the Create alert action on a visualization
1032
1194
  * @param - an object with vizId as a key
1033
- * @example liveboardEmbed.trigger(HostEvent.CreateMonitor {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1195
+ * @example
1196
+ * ```js
1197
+ * liveboardEmbed.trigger(HostEvent.CreateMonitor {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1198
+ * ```
1034
1199
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1035
1200
  */
1036
1201
  CreateMonitor = 'createMonitor',
1037
1202
  /**
1038
1203
  * Triggers the Manage alert action on a visualization
1039
1204
  * @param - an object with vizId as a key
1040
- * @example liveboardEmbed.trigger(HostEvent.ManageMonitor, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1205
+ * @example
1206
+ * ```js
1207
+ * liveboardEmbed.trigger(HostEvent.ManageMonitor, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1208
+ * ```
1041
1209
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1042
1210
  */
1043
1211
  ManageMonitor = 'manageMonitor',
@@ -1055,9 +1223,11 @@ export enum HostEvent {
1055
1223
  * Triggers the Copy link action on a Liveboard or visualization
1056
1224
  * @param - object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key
1057
1225
  * @example
1226
+ * ```js
1058
1227
  * liveboardEmbed.trigger(HostEvent.CopyLink)
1059
1228
  * liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1060
1229
  * vizEmbed.trigger((HostEvent.CopyLink)
1230
+ * ```
1061
1231
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1062
1232
  */
1063
1233
  CopyLink = 'embedDocument',
@@ -1065,15 +1235,20 @@ export enum HostEvent {
1065
1235
  * Triggers the Present action on a Liveboard or visualization
1066
1236
  * @param - object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key
1067
1237
  * @example
1238
+ * ```js
1068
1239
  * liveboardEmbed.trigger(HostEvent.Present)
1069
1240
  * liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1070
1241
  * vizEmbed.trigger((HostEvent.Present)
1242
+ * ```
1071
1243
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1072
1244
  */
1073
1245
  Present = 'present',
1074
1246
  /**
1075
1247
  * Get TML for the current search.
1076
- * @example searchEmbed.trigger(HostEvent.GetTML)
1248
+ * @example
1249
+ * ```js
1250
+ * searchEmbed.trigger(HostEvent.GetTML)
1251
+ * ```
1077
1252
  * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
1078
1253
  */
1079
1254
  GetTML = 'getTML',
@@ -1308,6 +1483,7 @@ export enum Action {
1308
1483
  ReplaySearch = 'replaySearch',
1309
1484
  ShowUnderlyingData = 'showUnderlyingData',
1310
1485
  Download = 'download',
1486
+ DownloadAsPng='downloadAsPng',
1311
1487
  DownloadAsPdf = 'downloadAsPdf',
1312
1488
  DownloadAsCsv = 'downloadAsCSV',
1313
1489
  DownloadAsXlsx = 'downloadAsXLSX',