@thoughtspot/visual-embed-sdk 1.43.1 → 1.44.1-test

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 (151) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/api-intercept.d.ts.map +1 -1
  3. package/cjs/src/api-intercept.js +8 -3
  4. package/cjs/src/api-intercept.js.map +1 -1
  5. package/cjs/src/api-intercept.spec.js +19 -3
  6. package/cjs/src/api-intercept.spec.js.map +1 -1
  7. package/cjs/src/embed/app.d.ts +32 -0
  8. package/cjs/src/embed/app.d.ts.map +1 -1
  9. package/cjs/src/embed/app.js +9 -4
  10. package/cjs/src/embed/app.js.map +1 -1
  11. package/cjs/src/embed/app.spec.js +104 -1
  12. package/cjs/src/embed/app.spec.js.map +1 -1
  13. package/cjs/src/embed/base.d.ts +7 -0
  14. package/cjs/src/embed/base.d.ts.map +1 -1
  15. package/cjs/src/embed/base.js +16 -1
  16. package/cjs/src/embed/base.js.map +1 -1
  17. package/cjs/src/embed/base.spec.js +21 -0
  18. package/cjs/src/embed/base.spec.js.map +1 -1
  19. package/cjs/src/embed/conversation.d.ts +15 -0
  20. package/cjs/src/embed/conversation.d.ts.map +1 -1
  21. package/cjs/src/embed/conversation.js +10 -2
  22. package/cjs/src/embed/conversation.js.map +1 -1
  23. package/cjs/src/embed/conversation.spec.js +30 -1
  24. package/cjs/src/embed/conversation.spec.js.map +1 -1
  25. package/cjs/src/embed/liveboard.d.ts +33 -0
  26. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  27. package/cjs/src/embed/liveboard.js +13 -5
  28. package/cjs/src/embed/liveboard.js.map +1 -1
  29. package/cjs/src/embed/liveboard.spec.js +108 -0
  30. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  31. package/cjs/src/embed/ts-embed.d.ts +3 -2
  32. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  33. package/cjs/src/embed/ts-embed.js +51 -17
  34. package/cjs/src/embed/ts-embed.js.map +1 -1
  35. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  36. package/cjs/src/embed/ts-embed.spec.js +93 -5
  37. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  38. package/cjs/src/errors.d.ts +7 -0
  39. package/cjs/src/errors.d.ts.map +1 -1
  40. package/cjs/src/errors.js +7 -0
  41. package/cjs/src/errors.js.map +1 -1
  42. package/cjs/src/index.d.ts +2 -2
  43. package/cjs/src/index.d.ts.map +1 -1
  44. package/cjs/src/index.js +2 -1
  45. package/cjs/src/index.js.map +1 -1
  46. package/cjs/src/react/all-types-export.d.ts +1 -1
  47. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  48. package/cjs/src/react/all-types-export.js +2 -1
  49. package/cjs/src/react/all-types-export.js.map +1 -1
  50. package/cjs/src/types.d.ts +250 -7
  51. package/cjs/src/types.d.ts.map +1 -1
  52. package/cjs/src/types.js +135 -2
  53. package/cjs/src/types.js.map +1 -1
  54. package/dist/{index-CpkMygsc.js → index-BXCUJ09L.js} +1 -1
  55. package/dist/src/api-intercept.d.ts.map +1 -1
  56. package/dist/src/embed/app.d.ts +32 -0
  57. package/dist/src/embed/app.d.ts.map +1 -1
  58. package/dist/src/embed/base.d.ts +7 -0
  59. package/dist/src/embed/base.d.ts.map +1 -1
  60. package/dist/src/embed/conversation.d.ts +15 -0
  61. package/dist/src/embed/conversation.d.ts.map +1 -1
  62. package/dist/src/embed/liveboard.d.ts +33 -0
  63. package/dist/src/embed/liveboard.d.ts.map +1 -1
  64. package/dist/src/embed/ts-embed.d.ts +3 -2
  65. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  66. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  67. package/dist/src/errors.d.ts +7 -0
  68. package/dist/src/errors.d.ts.map +1 -1
  69. package/dist/src/index.d.ts +2 -2
  70. package/dist/src/index.d.ts.map +1 -1
  71. package/dist/src/react/all-types-export.d.ts +1 -1
  72. package/dist/src/react/all-types-export.d.ts.map +1 -1
  73. package/dist/src/types.d.ts +250 -7
  74. package/dist/src/types.d.ts.map +1 -1
  75. package/dist/tsembed-react.es.js +304 -105
  76. package/dist/tsembed-react.js +303 -104
  77. package/dist/tsembed.es.js +318 -106
  78. package/dist/tsembed.js +317 -104
  79. package/dist/visual-embed-sdk-react-full.d.ts +290 -7
  80. package/dist/visual-embed-sdk-react.d.ts +283 -7
  81. package/dist/visual-embed-sdk.d.ts +290 -7
  82. package/lib/package.json +1 -1
  83. package/lib/src/api-intercept.d.ts.map +1 -1
  84. package/lib/src/api-intercept.js +9 -4
  85. package/lib/src/api-intercept.js.map +1 -1
  86. package/lib/src/api-intercept.spec.js +20 -4
  87. package/lib/src/api-intercept.spec.js.map +1 -1
  88. package/lib/src/embed/app.d.ts +32 -0
  89. package/lib/src/embed/app.d.ts.map +1 -1
  90. package/lib/src/embed/app.js +10 -5
  91. package/lib/src/embed/app.js.map +1 -1
  92. package/lib/src/embed/app.spec.js +104 -1
  93. package/lib/src/embed/app.spec.js.map +1 -1
  94. package/lib/src/embed/base.d.ts +7 -0
  95. package/lib/src/embed/base.d.ts.map +1 -1
  96. package/lib/src/embed/base.js +14 -0
  97. package/lib/src/embed/base.js.map +1 -1
  98. package/lib/src/embed/base.spec.js +21 -0
  99. package/lib/src/embed/base.spec.js.map +1 -1
  100. package/lib/src/embed/conversation.d.ts +15 -0
  101. package/lib/src/embed/conversation.d.ts.map +1 -1
  102. package/lib/src/embed/conversation.js +11 -3
  103. package/lib/src/embed/conversation.js.map +1 -1
  104. package/lib/src/embed/conversation.spec.js +31 -2
  105. package/lib/src/embed/conversation.spec.js.map +1 -1
  106. package/lib/src/embed/liveboard.d.ts +33 -0
  107. package/lib/src/embed/liveboard.d.ts.map +1 -1
  108. package/lib/src/embed/liveboard.js +14 -6
  109. package/lib/src/embed/liveboard.js.map +1 -1
  110. package/lib/src/embed/liveboard.spec.js +108 -0
  111. package/lib/src/embed/liveboard.spec.js.map +1 -1
  112. package/lib/src/embed/ts-embed.d.ts +3 -2
  113. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  114. package/lib/src/embed/ts-embed.js +52 -18
  115. package/lib/src/embed/ts-embed.js.map +1 -1
  116. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  117. package/lib/src/embed/ts-embed.spec.js +94 -6
  118. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  119. package/lib/src/errors.d.ts +7 -0
  120. package/lib/src/errors.d.ts.map +1 -1
  121. package/lib/src/errors.js +7 -0
  122. package/lib/src/errors.js.map +1 -1
  123. package/lib/src/index.d.ts +2 -2
  124. package/lib/src/index.d.ts.map +1 -1
  125. package/lib/src/index.js +2 -2
  126. package/lib/src/index.js.map +1 -1
  127. package/lib/src/react/all-types-export.d.ts +1 -1
  128. package/lib/src/react/all-types-export.d.ts.map +1 -1
  129. package/lib/src/react/all-types-export.js +1 -1
  130. package/lib/src/react/all-types-export.js.map +1 -1
  131. package/lib/src/types.d.ts +250 -7
  132. package/lib/src/types.d.ts.map +1 -1
  133. package/lib/src/types.js +134 -1
  134. package/lib/src/types.js.map +1 -1
  135. package/package.json +1 -1
  136. package/src/api-intercept.spec.ts +23 -10
  137. package/src/api-intercept.ts +9 -4
  138. package/src/embed/app.spec.ts +146 -4
  139. package/src/embed/app.ts +69 -24
  140. package/src/embed/base.spec.ts +28 -0
  141. package/src/embed/base.ts +15 -0
  142. package/src/embed/conversation.spec.ts +39 -2
  143. package/src/embed/conversation.ts +28 -2
  144. package/src/embed/liveboard.spec.ts +136 -0
  145. package/src/embed/liveboard.ts +51 -4
  146. package/src/embed/ts-embed.spec.ts +107 -15
  147. package/src/embed/ts-embed.ts +56 -19
  148. package/src/errors.ts +7 -0
  149. package/src/index.ts +2 -0
  150. package/src/react/all-types-export.ts +1 -0
  151. package/src/types.ts +260 -6
package/src/types.ts CHANGED
@@ -683,7 +683,7 @@ export interface EmbedConfig {
683
683
  * {
684
684
  * name: 'customAction',
685
685
  * id: 'customAction',
686
- * target: CustomActionTarget.VISUALIZATION,
686
+ * target: CustomActionTarget.VIZ,
687
687
  * position: CustomActionPosition.PRIMARY,
688
688
  * }
689
689
  * }
@@ -1079,8 +1079,12 @@ export interface BaseViewConfig extends ApiInterceptFlags {
1079
1079
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SageEmbed`, `SearchEmbed`, `SpotterEmbed`
1080
1080
  * @version SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl
1081
1081
  * @example
1082
- * ```js
1083
- * import { CustomActionPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
1082
+ * ```ts
1083
+ * import {
1084
+ * CustomActionPayload,
1085
+ * CustomActionPosition,
1086
+ * CustomActionTarget,
1087
+ * } from '@thoughtspot/visual-embed-sdk';
1084
1088
  * // Use supported embed types such as AppEmbed or LiveboardEmbed
1085
1089
  * const embed = new LiveboardEmbed('#tsEmbed', {
1086
1090
  * ... // other embed config options
@@ -1088,12 +1092,17 @@ export interface BaseViewConfig extends ApiInterceptFlags {
1088
1092
  * {
1089
1093
  * name: 'customAction',
1090
1094
  * id: 'customAction',
1091
- * target: CustomActionTarget.VISUALIZATION,
1095
+ * target: CustomActionTarget.VIZ,
1092
1096
  * position: CustomActionPosition.PRIMARY,
1093
1097
  * }
1094
1098
  * }
1095
1099
  * ]
1096
1100
  * })
1101
+ *
1102
+ * // to trigger a custom flow on custom action click listen to Custom action embed event
1103
+ * embed.on(EmbedEvent.CustomAction, (payload: CustomActionPayload) => {
1104
+ * console.log('Custom Action event:', payload);
1105
+ * })
1097
1106
  * ```
1098
1107
  */
1099
1108
  customActions?: CustomAction[];
@@ -1575,6 +1584,38 @@ export interface LiveboardAppEmbedViewConfig {
1575
1584
  * ```
1576
1585
  */
1577
1586
  isEnhancedFilterInteractivityEnabled?: boolean;
1587
+ /**
1588
+ * Show or hide masked filter chips
1589
+ *
1590
+ * Supported embed types: `AppEmbed`, `LiveboardEmbed`
1591
+ * @version SDK: 1.45.0 | Thoughtspot: 26.2.0.cl
1592
+ * @default false
1593
+ * @example
1594
+ * ```js
1595
+ * // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
1596
+ * const embed = new <EmbedComponent>('#tsEmbed', {
1597
+ * ... // other embed view config
1598
+ * showMaskedFilterChip: true,
1599
+ * })
1600
+ * ```
1601
+ */
1602
+ showMaskedFilterChip?: boolean;
1603
+ /**
1604
+ * Enable or disable Liveboard styling and grouping
1605
+ *
1606
+ * Supported embed types: `AppEmbed`, `LiveboardEmbed`
1607
+ * @version SDK: 1.45.0 | Thoughtspot: 26.2.0.cl
1608
+ * @default false
1609
+ * @example
1610
+ * ```js
1611
+ * // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
1612
+ * const embed = new <EmbedComponent>('#tsEmbed', {
1613
+ * ... // other embed view config
1614
+ * isLiveboardMasterpiecesEnabled: true,
1615
+ * })
1616
+ * ```
1617
+ */
1618
+ isLiveboardMasterpiecesEnabled?: boolean;
1578
1619
  }
1579
1620
 
1580
1621
  export interface AllEmbedViewConfig
@@ -2036,6 +2077,7 @@ export enum EmbedEvent {
2036
2077
  * SearchEmbed.on(EmbedEvent.Error, (error) => {
2037
2078
  * console.log(error);
2038
2079
  * // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
2080
+ * // { errorType: "API", message: '...', code: '...' } new format
2039
2081
  * });
2040
2082
  * ```
2041
2083
  * @example
@@ -2047,6 +2089,7 @@ export enum EmbedEvent {
2047
2089
  * // message: "Fullscreen API is not enabled",
2048
2090
  * // stack: "..."
2049
2091
  * // } }}
2092
+ * // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
2050
2093
  * })
2051
2094
  * ```
2052
2095
  */
@@ -2204,7 +2247,8 @@ export enum EmbedEvent {
2204
2247
  */
2205
2248
  ALL = '*',
2206
2249
  /**
2207
- * Emitted when an Answer is saved in the app
2250
+ * Emitted when an Answer is saved in the app.
2251
+ * Use start:true to subscribe to when save is initiated, or end:true to subscribe to when save is completed. Default is end:true.
2208
2252
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2209
2253
  * @example
2210
2254
  *```js
@@ -2239,6 +2283,7 @@ export enum EmbedEvent {
2239
2283
  Download = 'download',
2240
2284
  /**
2241
2285
  * Emitted when the download action is triggered on an Answer.
2286
+ * Use start:true to subscribe to when download is initiated, or end:true to subscribe to when download is completed. Default is end:true.
2242
2287
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
2243
2288
  * @example
2244
2289
  *```js
@@ -2253,6 +2298,7 @@ export enum EmbedEvent {
2253
2298
  DownloadAsPng = 'downloadAsPng',
2254
2299
  /**
2255
2300
  * Emitted when the Download as PDF action is triggered on an Answer
2301
+ * Use start:true to subscribe to when download as PDF is initiated, or end:true to subscribe to when download as PDF is completed. Default is end:true.
2256
2302
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2257
2303
  * @example
2258
2304
  *```js
@@ -2267,6 +2313,7 @@ export enum EmbedEvent {
2267
2313
  DownloadAsPdf = 'downloadAsPdf',
2268
2314
  /**
2269
2315
  * Emitted when the Download as CSV action is triggered on an Answer.
2316
+ * Use start:true to subscribe to when download as CSV is initiated, or end:true to subscribe to when download as CSV is completed. Default is end:true.
2270
2317
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2271
2318
  * @example
2272
2319
  *```js
@@ -2281,6 +2328,7 @@ export enum EmbedEvent {
2281
2328
  DownloadAsCsv = 'downloadAsCsv',
2282
2329
  /**
2283
2330
  * Emitted when the Download as XLSX action is triggered on an Answer.
2331
+ * Use start:true to subscribe to when download as XLSX is initiated, or end:true to subscribe to when download as XLSX is completed. Default is end:true.
2284
2332
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2285
2333
  * @example
2286
2334
  *```js
@@ -2295,6 +2343,7 @@ export enum EmbedEvent {
2295
2343
  DownloadAsXlsx = 'downloadAsXlsx',
2296
2344
  /**
2297
2345
  * Emitted when an Answer is deleted in the app
2346
+ * Use start:true to subscribe to when delete is initiated, or end:true to subscribe to when delete is completed. Default is end:true.
2298
2347
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2299
2348
  * @example
2300
2349
  *```js
@@ -2321,6 +2370,7 @@ export enum EmbedEvent {
2321
2370
  /**
2322
2371
  * Emitted when a user initiates the Pin action to
2323
2372
  * add an Answer to a Liveboard.
2373
+ * Use start:true to subscribe to when pin is initiated, or end:true to subscribe to when pin is completed. Default is end:true.
2324
2374
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2325
2375
  * @example
2326
2376
  *```js
@@ -2434,6 +2484,7 @@ export enum EmbedEvent {
2434
2484
  /**
2435
2485
  * Emitted when the **Export TML** action is triggered on an
2436
2486
  * an embedded object in the app
2487
+ * Use start:true to subscribe to when export is initiated, or end:true to subscribe to when export is completed. Default is end:true.
2437
2488
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2438
2489
  * @example
2439
2490
  *```js
@@ -2459,6 +2510,7 @@ export enum EmbedEvent {
2459
2510
  SaveAsView = 'saveAsView',
2460
2511
  /**
2461
2512
  * Emitted when the user creates a copy of an Answer.
2513
+ * Use start:true to subscribe to when copy and edit is initiated, or end:true to subscribe to when copy and edit is completed. Default is end:true.
2462
2514
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2463
2515
  * @example
2464
2516
  *```js
@@ -4534,6 +4586,8 @@ export enum Param {
4534
4586
  HideLiveboardHeader = 'hideLiveboardHeader',
4535
4587
  ShowLiveboardDescription = 'showLiveboardDescription',
4536
4588
  ShowLiveboardTitle = 'showLiveboardTitle',
4589
+ ShowMaskedFilterChip = 'showMaskedFilterChip',
4590
+ IsLiveboardMasterpiecesEnabled = 'isLiveboardMasterpiecesEnabled',
4537
4591
  HiddenTabs = 'hideTabs',
4538
4592
  VisibleTabs = 'visibleTabs',
4539
4593
  HideTabPanel = 'hideTabPanel',
@@ -4590,6 +4644,7 @@ export enum Param {
4590
4644
  isCentralizedLiveboardFilterUXEnabled = 'isCentralizedLiveboardFilterUXEnabled',
4591
4645
  isLinkParametersEnabled = 'isLinkParametersEnabled',
4592
4646
  EnablePastConversationsSidebar = 'enablePastConversationsSidebar',
4647
+ UpdatedSpotterChatPrompt = 'updatedSpotterChatPrompt',
4593
4648
  }
4594
4649
 
4595
4650
  /**
@@ -5922,8 +5977,47 @@ export enum Action {
5922
5977
  * @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.15.0.cl
5923
5978
  */
5924
5979
  LiveboardStylePanel = 'liveboardStylePanel',
5980
+ /**
5981
+ * The **Move to Group** menu action on a Liveboard.
5982
+ * Allows moving a visualization to a different group.
5983
+ * @example
5984
+ * ```js
5985
+ * disabledActions: [Action.MoveToGroup]
5986
+ * ```
5987
+ * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
5988
+ */
5989
+ MoveToGroup = 'moveToGroup',
5990
+ /**
5991
+ * The **Move out of Group** menu action on a Liveboard.
5992
+ * Allows moving a visualization out of a group.
5993
+ * @example
5994
+ * ```js
5995
+ * disabledActions: [Action.MoveOutOfGroup]
5996
+ * ```
5997
+ * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
5998
+ */
5999
+ MoveOutOfGroup = 'moveOutOfGroup',
6000
+ /**
6001
+ * The **Create Group** menu action on a Liveboard.
6002
+ * Allows creating a new group.
6003
+ * @example
6004
+ * ```js
6005
+ * disabledActions: [Action.CreateGroup]
6006
+ * ```
6007
+ * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
6008
+ */
6009
+ CreateGroup = 'createGroup',
6010
+ /**
6011
+ * The **Ungroup Liveboard Group** menu action on a Liveboard.
6012
+ * Allows ungrouping a liveboard group.
6013
+ * @example
6014
+ * ```js
6015
+ * disabledActions: [Action.UngroupLiveboardGroup]
6016
+ * ```
6017
+ * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
6018
+ */
6019
+ UngroupLiveboardGroup = 'ungroupLiveboardGroup',
5925
6020
  }
5926
-
5927
6021
  export interface AnswerServiceType {
5928
6022
  getAnswer?: (offset: number, batchSize: number) => any;
5929
6023
  }
@@ -6117,6 +6211,166 @@ export enum LogLevel {
6117
6211
  TRACE = 'TRACE',
6118
6212
  }
6119
6213
 
6214
+ /**
6215
+ * Error types emitted by embedded components.
6216
+ *
6217
+ * These enum values categorize different types of errors that can occur during
6218
+ * the lifecycle of an embedded ThoughtSpot component. Use these values to implement
6219
+ * specific error handling logic based on the error category.
6220
+ *
6221
+ * @see {@link EmbedErrorDetailsEvent} - The error event object structure
6222
+ * @see {@link EmbedEvent.Error} - The event that emits these errors
6223
+ * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
6224
+ * @group Error Handling
6225
+ */
6226
+ export enum ErrorDetailsTypes {
6227
+ /** API call failure */
6228
+ API = 'API',
6229
+ /** General validation error */
6230
+ VALIDATION_ERROR = 'VALIDATION_ERROR',
6231
+ /** Network connectivity or request error */
6232
+ NETWORK = 'NETWORK',
6233
+ }
6234
+
6235
+ /**
6236
+ * Specific error codes for embedded component errors.
6237
+ *
6238
+ * These codes provide granular identification of errors that occur in embedded components.
6239
+ * They are returned in the {@link EmbedErrorDetailsEvent.code} property and allow for
6240
+ * precise error handling and debugging.
6241
+ *
6242
+ * The codes are organized into categories:
6243
+ * - **Worksheet ID not found or does not exist**: Errors related to applying or updating filters
6244
+ * - **Liveboard ID missing**: Errors related to missing liveboard ID
6245
+ * - **Conflicting actions configuration**: Errors related to conflicting actions configuration
6246
+ * - **Conflicting tabs configuration**: Errors related to conflicting tabs configuration
6247
+ * - **Initialization error**: Errors related to initialization error
6248
+ * - **Network error**: Errors related to network error
6249
+ * - **Custom action validation**: Errors related to custom action validation
6250
+ * - **Login failed**: Errors related to login failed
6251
+ * - **Render not called**: Errors related to render not called
6252
+ * - **Host event type undefined or invalid**: Errors related to host event type undefined or invalid
6253
+ *
6254
+ * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
6255
+ * @group Error Handling
6256
+ * @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
6257
+ * @see {@link ErrorDetailsTypes} - General error type categories
6258
+ *
6259
+ * @example
6260
+ * Handle specific error codes
6261
+ *
6262
+ * embed.on(EmbedEvent.Error, (error) => {
6263
+ * if (error.code === EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND) {
6264
+ * console.error('Worksheet ID not found:', error.message);
6265
+ * }
6266
+ * });
6267
+ * */
6268
+ export enum EmbedErrorCodes {
6269
+ /** Worksheet ID not found or does not exist */
6270
+ WORKSHEET_ID_NOT_FOUND = 'WORKSHEET_ID_NOT_FOUND',
6271
+
6272
+ /** Required Liveboard ID is missing from configuration */
6273
+ LIVEBOARD_ID_MISSING = 'LIVEBOARD_ID_MISSING',
6274
+
6275
+ /** Conflicting action configuration detected (e.g., both hiddenActions and visibleActions specified) */
6276
+ CONFLICTING_ACTIONS_CONFIG = 'CONFLICTING_ACTIONS_CONFIG',
6277
+
6278
+ /** Conflicting tab configuration detected (e.g., both hiddenTabs and visibleTabs specified) */
6279
+ CONFLICTING_TABS_CONFIG = 'CONFLICTING_TABS_CONFIG',
6280
+
6281
+ /** Error during component initialization */
6282
+ INIT_ERROR = 'INIT_ERROR',
6283
+
6284
+ /** Network connectivity or request error */
6285
+ NETWORK_ERROR = 'NETWORK_ERROR',
6286
+
6287
+ /** Custom action validation failed */
6288
+ CUSTOM_ACTION_VALIDATION = 'CUSTOM_ACTION_VALIDATION',
6289
+
6290
+ /** Authentication/login failed */
6291
+ LOGIN_FAILED = 'LOGIN_FAILED',
6292
+
6293
+ /** Render method was not called before attempting to use the component */
6294
+ RENDER_NOT_CALLED = 'RENDER_NOT_CALLED',
6295
+
6296
+ /** Host event type is undefined or invalid */
6297
+ HOST_EVENT_TYPE_UNDEFINED = 'HOST_EVENT_TYPE_UNDEFINED',
6298
+
6299
+ /** Error parsing api intercept body */
6300
+ PARSING_API_INTERCEPT_BODY_ERROR = 'PARSING_API_INTERCEPT_BODY_ERROR',
6301
+ }
6302
+
6303
+ /**
6304
+ * Error event object emitted when an error occurs in an embedded component.
6305
+ *
6306
+ * This interface defines the structure of error objects returned by the {@link EmbedEvent.Error}
6307
+ * event. It provides detailed information about what went wrong, including the error type,
6308
+ * a human-readable message, and a machine-readable error code.
6309
+ *
6310
+ * ## Properties
6311
+ *
6312
+ * - **errorType**: One of the predefined {@link ErrorDetailsTypes} values
6313
+ * - **message**: Human-readable error description (string or array of strings for multiple errors)
6314
+ * - **code**: Machine-readable error identifier for programmatic handling
6315
+ * - **[key: string]**: Additional context-specific for backward compatibility
6316
+ *
6317
+ * ## Usage
6318
+ *
6319
+ * Listen to the {@link EmbedEvent.Error} event to receive instances of this object
6320
+ * and implement appropriate error handling logic based on the `errorType`.
6321
+ *
6322
+ * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
6323
+ * @group Error Handling
6324
+ * @see {@link ErrorDetailsTypes} - Available error type values
6325
+ * @see {@link EmbedEvent.Error} - The event that emits this object
6326
+ *
6327
+ * @example
6328
+ * Handle specific error types
6329
+ *
6330
+ * embed.on(EmbedEvent.Error, (error) => {
6331
+ * switch (error.code) {
6332
+ * case EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND:
6333
+ * console.error('Worksheet ID not found:', error.message, error.code);
6334
+ * break;
6335
+ * default:
6336
+ * console.error('Unknown error:', error);
6337
+ * }
6338
+ * });
6339
+ * *
6340
+ * @example
6341
+ * Handle multiple error messages
6342
+ *
6343
+ * embed.on(EmbedEvent.Error, (error) => {
6344
+ * const messages = Array.isArray(error.message)
6345
+ * ? error.message
6346
+ * : [error.message];
6347
+ *
6348
+ * messages.forEach(msg => console.error(msg));
6349
+ * });
6350
+ * *
6351
+ * @example
6352
+ * Access additional error context
6353
+ *
6354
+ * embed.on(EmbedEvent.Error, (error) => {
6355
+ * console.error('Error Details:', {
6356
+ * type: error.errorType,
6357
+ * message: error.message,
6358
+ * code: error.code,
6359
+ * // Additional context fields vary by error type
6360
+ * ...error
6361
+ * });
6362
+ * });
6363
+ * */
6364
+ export interface EmbedErrorDetailsEvent {
6365
+ /** The type of error that occurred */
6366
+ errorType: ErrorDetailsTypes;
6367
+ /** Human-readable error message(s) describing what went wrong */
6368
+ message: string | string[];
6369
+ /** Machine-readable error code for programmatic error handling */
6370
+ code: EmbedErrorCodes;
6371
+ /** Additional context-specific for backward compatibility */
6372
+ [key: string]: any;
6373
+ }
6120
6374
  export interface DefaultAppInitData {
6121
6375
  customisations: CustomisationsInterface;
6122
6376
  authToken: string;