@thoughtspot/visual-embed-sdk 1.32.4-dc.3 → 1.32.4-dc.5
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/cjs/package.json +1 -1
- package/cjs/src/embed/conversation.js +1 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/index.d.ts +2 -1
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +3 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/utils/graphql/spotterService/conversation-queries.d.ts +3 -0
- package/cjs/src/utils/graphql/spotterService/conversation-queries.d.ts.map +1 -0
- package/cjs/src/utils/graphql/spotterService/conversation-queries.js +318 -0
- package/cjs/src/utils/graphql/spotterService/conversation-queries.js.map +1 -0
- package/cjs/src/utils/graphql/spotterService/conversation-service.d.ts +12 -0
- package/cjs/src/utils/graphql/spotterService/conversation-service.d.ts.map +1 -0
- package/cjs/src/utils/graphql/spotterService/conversation-service.js +89 -0
- package/cjs/src/utils/graphql/spotterService/conversation-service.js.map +1 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-queries.d.ts +2 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-queries.d.ts.map +1 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-queries.js +403 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-queries.js.map +1 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-service.d.ts +9 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-service.d.ts.map +1 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-service.js +52 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-service.js.map +1 -0
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/utils/graphql/spotterService/conversation-queries.d.ts +3 -0
- package/dist/src/utils/graphql/spotterService/conversation-queries.d.ts.map +1 -0
- package/dist/src/utils/graphql/spotterService/conversation-service.d.ts +12 -0
- package/dist/src/utils/graphql/spotterService/conversation-service.d.ts.map +1 -0
- package/dist/src/utils/graphql/spotterService/nls-answer-queries.d.ts +2 -0
- package/dist/src/utils/graphql/spotterService/nls-answer-queries.d.ts.map +1 -0
- package/dist/src/utils/graphql/spotterService/nls-answer-service.d.ts +9 -0
- package/dist/src/utils/graphql/spotterService/nls-answer-service.d.ts.map +1 -0
- package/dist/tsembed-react.es.js +1 -1
- package/dist/tsembed-react.js +1 -1
- package/dist/tsembed.es.js +445 -2
- package/dist/tsembed.js +445 -1
- package/dist/visual-embed-sdk-react-full.d.ts +9 -1
- package/dist/visual-embed-sdk-react.d.ts +9 -1
- package/dist/visual-embed-sdk.d.ts +9 -1
- package/lib/package.json +1 -1
- package/lib/src/embed/conversation.js +1 -1
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/index.d.ts +2 -1
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -1
- package/lib/src/index.js.map +1 -1
- package/lib/src/utils/graphql/spotterService/conversation-queries.d.ts +3 -0
- package/lib/src/utils/graphql/spotterService/conversation-queries.d.ts.map +1 -0
- package/lib/src/utils/graphql/spotterService/conversation-queries.js +315 -0
- package/lib/src/utils/graphql/spotterService/conversation-queries.js.map +1 -0
- package/lib/src/utils/graphql/spotterService/conversation-service.d.ts +12 -0
- package/lib/src/utils/graphql/spotterService/conversation-service.d.ts.map +1 -0
- package/lib/src/utils/graphql/spotterService/conversation-service.js +84 -0
- package/lib/src/utils/graphql/spotterService/conversation-service.js.map +1 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-queries.d.ts +2 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-queries.d.ts.map +1 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-queries.js +400 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-queries.js.map +1 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-service.d.ts +9 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-service.d.ts.map +1 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-service.js +47 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-service.js.map +1 -0
- package/lib/src/visual-embed-sdk.d.ts +13 -1
- package/package.json +1 -1
- package/src/embed/conversation.ts +1 -1
- package/src/index.ts +2 -0
- package/src/utils/graphql/spotterService/nls-answer-queries.ts +399 -0
- package/src/utils/graphql/spotterService/nls-answer-service.ts +55 -0
- /package/src/utils/graphql/{conversationService → spotterService}/conversation-queries.ts +0 -0
- /package/src/utils/graphql/{conversationService → spotterService}/conversation-service.ts +0 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
export const getAnswerSessionFromQuery = `
|
|
2
|
+
query GetEurekaResults($params: Input_eureka_SearchRequest) {
|
|
3
|
+
queryRequest(request: $params) {
|
|
4
|
+
...eurekaResults
|
|
5
|
+
__typename
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
fragment eurekaResults on eureka_SearchResponse {
|
|
10
|
+
facets {
|
|
11
|
+
facetType
|
|
12
|
+
facetValue
|
|
13
|
+
facetValues {
|
|
14
|
+
id
|
|
15
|
+
resultCount
|
|
16
|
+
name
|
|
17
|
+
__typename
|
|
18
|
+
}
|
|
19
|
+
__typename
|
|
20
|
+
}
|
|
21
|
+
requestIdentifiers {
|
|
22
|
+
apiRequestId
|
|
23
|
+
appActivityId
|
|
24
|
+
__typename
|
|
25
|
+
}
|
|
26
|
+
sageQuerySuggestions {
|
|
27
|
+
llmReasoning {
|
|
28
|
+
assumptions
|
|
29
|
+
clarifications
|
|
30
|
+
interpretation
|
|
31
|
+
__typename
|
|
32
|
+
}
|
|
33
|
+
tokens
|
|
34
|
+
tmlTokens
|
|
35
|
+
worksheetId
|
|
36
|
+
description
|
|
37
|
+
title
|
|
38
|
+
tmlTokens
|
|
39
|
+
formulaInfo {
|
|
40
|
+
name
|
|
41
|
+
expression
|
|
42
|
+
__typename
|
|
43
|
+
}
|
|
44
|
+
tmlPhrases
|
|
45
|
+
ambiguousPhrases {
|
|
46
|
+
alternativePhrases {
|
|
47
|
+
phraseType
|
|
48
|
+
token {
|
|
49
|
+
token
|
|
50
|
+
dataType
|
|
51
|
+
typeEnum
|
|
52
|
+
guid
|
|
53
|
+
tokenMetadata {
|
|
54
|
+
name
|
|
55
|
+
__typename
|
|
56
|
+
}
|
|
57
|
+
__typename
|
|
58
|
+
}
|
|
59
|
+
__typename
|
|
60
|
+
}
|
|
61
|
+
ambiguityType
|
|
62
|
+
token {
|
|
63
|
+
token
|
|
64
|
+
dataType
|
|
65
|
+
typeEnum
|
|
66
|
+
guid
|
|
67
|
+
tokenMetadata {
|
|
68
|
+
name
|
|
69
|
+
__typename
|
|
70
|
+
}
|
|
71
|
+
__typename
|
|
72
|
+
}
|
|
73
|
+
__typename
|
|
74
|
+
}
|
|
75
|
+
ambiguousTokens {
|
|
76
|
+
alternativeTokens {
|
|
77
|
+
token
|
|
78
|
+
dataType
|
|
79
|
+
typeEnum
|
|
80
|
+
guid
|
|
81
|
+
tokenMetadata {
|
|
82
|
+
name
|
|
83
|
+
deprecatedTableGuid
|
|
84
|
+
deprecatedTableName
|
|
85
|
+
isFormula
|
|
86
|
+
rootTables {
|
|
87
|
+
created
|
|
88
|
+
description
|
|
89
|
+
guid
|
|
90
|
+
indexVersion
|
|
91
|
+
modified
|
|
92
|
+
name
|
|
93
|
+
__typename
|
|
94
|
+
}
|
|
95
|
+
schemaTableUserDefinedName
|
|
96
|
+
table {
|
|
97
|
+
created
|
|
98
|
+
description
|
|
99
|
+
guid
|
|
100
|
+
indexVersion
|
|
101
|
+
modified
|
|
102
|
+
name
|
|
103
|
+
__typename
|
|
104
|
+
}
|
|
105
|
+
__typename
|
|
106
|
+
}
|
|
107
|
+
__typename
|
|
108
|
+
}
|
|
109
|
+
ambiguityType
|
|
110
|
+
token {
|
|
111
|
+
token
|
|
112
|
+
dataType
|
|
113
|
+
typeEnum
|
|
114
|
+
guid
|
|
115
|
+
tokenMetadata {
|
|
116
|
+
name
|
|
117
|
+
__typename
|
|
118
|
+
}
|
|
119
|
+
__typename
|
|
120
|
+
}
|
|
121
|
+
__typename
|
|
122
|
+
}
|
|
123
|
+
sessionId
|
|
124
|
+
genNo
|
|
125
|
+
stateKey {
|
|
126
|
+
generationNumber
|
|
127
|
+
transactionId
|
|
128
|
+
__typename
|
|
129
|
+
}
|
|
130
|
+
subQueries {
|
|
131
|
+
tokens
|
|
132
|
+
cohortConfig {
|
|
133
|
+
anchorColumnId
|
|
134
|
+
cohortAnswerGuid
|
|
135
|
+
cohortGroupingType
|
|
136
|
+
cohortGuid
|
|
137
|
+
cohortType
|
|
138
|
+
combineNonGroupValues
|
|
139
|
+
description
|
|
140
|
+
groupExcludedQueryValues
|
|
141
|
+
hideExcludedQueryValues
|
|
142
|
+
isEditable
|
|
143
|
+
name
|
|
144
|
+
nullOutputValue
|
|
145
|
+
returnColumnId
|
|
146
|
+
__typename
|
|
147
|
+
}
|
|
148
|
+
formulas {
|
|
149
|
+
name
|
|
150
|
+
expression
|
|
151
|
+
__typename
|
|
152
|
+
}
|
|
153
|
+
__typename
|
|
154
|
+
}
|
|
155
|
+
visualizationSuggestion {
|
|
156
|
+
chartType
|
|
157
|
+
displayMode
|
|
158
|
+
axisConfigs {
|
|
159
|
+
category
|
|
160
|
+
color
|
|
161
|
+
hidden
|
|
162
|
+
size
|
|
163
|
+
sort
|
|
164
|
+
x
|
|
165
|
+
y
|
|
166
|
+
__typename
|
|
167
|
+
}
|
|
168
|
+
usersVizIntentApplied
|
|
169
|
+
customChartConfigs {
|
|
170
|
+
dimensions {
|
|
171
|
+
columns
|
|
172
|
+
key
|
|
173
|
+
__typename
|
|
174
|
+
}
|
|
175
|
+
key
|
|
176
|
+
__typename
|
|
177
|
+
}
|
|
178
|
+
customChartGuid
|
|
179
|
+
__typename
|
|
180
|
+
}
|
|
181
|
+
tableData {
|
|
182
|
+
columnDataLite {
|
|
183
|
+
columnId
|
|
184
|
+
columnDataType
|
|
185
|
+
dataValue
|
|
186
|
+
columnName
|
|
187
|
+
__typename
|
|
188
|
+
}
|
|
189
|
+
__typename
|
|
190
|
+
}
|
|
191
|
+
warningType
|
|
192
|
+
cached
|
|
193
|
+
warningDetails {
|
|
194
|
+
warningType
|
|
195
|
+
__typename
|
|
196
|
+
}
|
|
197
|
+
__typename
|
|
198
|
+
}
|
|
199
|
+
results {
|
|
200
|
+
objectSecurityInfo {
|
|
201
|
+
objectType
|
|
202
|
+
objectId
|
|
203
|
+
objectIdForDeletionCheck
|
|
204
|
+
objectTypeForDeletionCheck
|
|
205
|
+
isD13ySourced
|
|
206
|
+
offset
|
|
207
|
+
__typename
|
|
208
|
+
}
|
|
209
|
+
searchAnswer {
|
|
210
|
+
...eurekaAnswer
|
|
211
|
+
__typename
|
|
212
|
+
}
|
|
213
|
+
searchPinboardViz {
|
|
214
|
+
answer {
|
|
215
|
+
...eurekaAnswer
|
|
216
|
+
__typename
|
|
217
|
+
}
|
|
218
|
+
pinboardHeader {
|
|
219
|
+
id
|
|
220
|
+
title
|
|
221
|
+
__typename
|
|
222
|
+
}
|
|
223
|
+
__typename
|
|
224
|
+
}
|
|
225
|
+
searchPinboard {
|
|
226
|
+
header {
|
|
227
|
+
...header
|
|
228
|
+
__typename
|
|
229
|
+
}
|
|
230
|
+
usageInfo {
|
|
231
|
+
...usageInfo
|
|
232
|
+
__typename
|
|
233
|
+
}
|
|
234
|
+
answers {
|
|
235
|
+
...eurekaAnswer
|
|
236
|
+
__typename
|
|
237
|
+
}
|
|
238
|
+
vizCount {
|
|
239
|
+
charts
|
|
240
|
+
metrics
|
|
241
|
+
tables
|
|
242
|
+
__typename
|
|
243
|
+
}
|
|
244
|
+
__typename
|
|
245
|
+
}
|
|
246
|
+
snippetInfo {
|
|
247
|
+
titleSnippet {
|
|
248
|
+
snippetString
|
|
249
|
+
highlights {
|
|
250
|
+
start
|
|
251
|
+
end
|
|
252
|
+
__typename
|
|
253
|
+
}
|
|
254
|
+
__typename
|
|
255
|
+
}
|
|
256
|
+
descriptionSnippet {
|
|
257
|
+
snippetString
|
|
258
|
+
highlights {
|
|
259
|
+
start
|
|
260
|
+
end
|
|
261
|
+
__typename
|
|
262
|
+
}
|
|
263
|
+
__typename
|
|
264
|
+
}
|
|
265
|
+
sageQuerySnippet {
|
|
266
|
+
phrase {
|
|
267
|
+
isCompletePhrase
|
|
268
|
+
numTokens
|
|
269
|
+
phraseType
|
|
270
|
+
startIndex
|
|
271
|
+
__typename
|
|
272
|
+
}
|
|
273
|
+
token {
|
|
274
|
+
token
|
|
275
|
+
dataType
|
|
276
|
+
typeEnum
|
|
277
|
+
__typename
|
|
278
|
+
}
|
|
279
|
+
__typename
|
|
280
|
+
}
|
|
281
|
+
sageQuerySnippetWithHighlights {
|
|
282
|
+
highlights {
|
|
283
|
+
start
|
|
284
|
+
end
|
|
285
|
+
__typename
|
|
286
|
+
}
|
|
287
|
+
phraseType
|
|
288
|
+
phraseValue
|
|
289
|
+
__typename
|
|
290
|
+
}
|
|
291
|
+
__typename
|
|
292
|
+
}
|
|
293
|
+
score
|
|
294
|
+
debugInfo
|
|
295
|
+
resultType
|
|
296
|
+
sageQuery
|
|
297
|
+
__typename
|
|
298
|
+
}
|
|
299
|
+
version
|
|
300
|
+
nextPageOffset
|
|
301
|
+
batchSizeRequired
|
|
302
|
+
isFinalPage
|
|
303
|
+
totalResults
|
|
304
|
+
totalFacetResultCount
|
|
305
|
+
errorCode
|
|
306
|
+
debugInfo {
|
|
307
|
+
fewShotExamples {
|
|
308
|
+
chartType
|
|
309
|
+
formulas {
|
|
310
|
+
name
|
|
311
|
+
expression
|
|
312
|
+
__typename
|
|
313
|
+
}
|
|
314
|
+
id
|
|
315
|
+
mappingId
|
|
316
|
+
nlQuery
|
|
317
|
+
nlQueryConcepts
|
|
318
|
+
sageQuery
|
|
319
|
+
scope
|
|
320
|
+
sql
|
|
321
|
+
tml
|
|
322
|
+
feedbackType
|
|
323
|
+
__typename
|
|
324
|
+
}
|
|
325
|
+
__typename
|
|
326
|
+
}
|
|
327
|
+
__typename
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
fragment eurekaAnswer on eureka_AnswerResult {
|
|
331
|
+
header {
|
|
332
|
+
...header
|
|
333
|
+
__typename
|
|
334
|
+
}
|
|
335
|
+
usageInfo {
|
|
336
|
+
...usageInfo
|
|
337
|
+
__typename
|
|
338
|
+
}
|
|
339
|
+
preferredViz {
|
|
340
|
+
...visualizationMetadata
|
|
341
|
+
__typename
|
|
342
|
+
}
|
|
343
|
+
worksheetInfo {
|
|
344
|
+
...worksheetInfo
|
|
345
|
+
__typename
|
|
346
|
+
}
|
|
347
|
+
formatted {
|
|
348
|
+
phrase {
|
|
349
|
+
isCompletePhrase
|
|
350
|
+
numTokens
|
|
351
|
+
phraseType
|
|
352
|
+
startIndex
|
|
353
|
+
__typename
|
|
354
|
+
}
|
|
355
|
+
token {
|
|
356
|
+
token
|
|
357
|
+
typeEnum
|
|
358
|
+
__typename
|
|
359
|
+
}
|
|
360
|
+
__typename
|
|
361
|
+
}
|
|
362
|
+
__typename
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
fragment header on eureka_Header {
|
|
366
|
+
id
|
|
367
|
+
title
|
|
368
|
+
description
|
|
369
|
+
authorGuid
|
|
370
|
+
authorName
|
|
371
|
+
createdOn
|
|
372
|
+
tagIds
|
|
373
|
+
__typename
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
fragment usageInfo on eureka_UsageInfo {
|
|
377
|
+
favouriteCount
|
|
378
|
+
viewCount
|
|
379
|
+
__typename
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
fragment visualizationMetadata on eureka_VisualizationMetadata {
|
|
383
|
+
vizType
|
|
384
|
+
chartType
|
|
385
|
+
vizSnapshotRequestData {
|
|
386
|
+
parentReportbookGuid
|
|
387
|
+
parentType
|
|
388
|
+
version
|
|
389
|
+
vizGuid
|
|
390
|
+
__typename
|
|
391
|
+
}
|
|
392
|
+
__typename
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
fragment worksheetInfo on eureka_WorksheetInfo {
|
|
396
|
+
id
|
|
397
|
+
name
|
|
398
|
+
__typename
|
|
399
|
+
}`;
|
|
400
|
+
//# sourceMappingURL=nls-answer-queries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nls-answer-queries.js","sourceRoot":"","sources":["../../../../../src/utils/graphql/spotterService/nls-answer-queries.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA8Y/B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AnswerService } from '../answerService/answerService';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param query string
|
|
5
|
+
* @param worksheetId string
|
|
6
|
+
* @returns answerService AnswerService
|
|
7
|
+
*/
|
|
8
|
+
export declare const getAnswerFromQuery: (query: string, worksheetId: string) => Promise<AnswerService>;
|
|
9
|
+
//# sourceMappingURL=nls-answer-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nls-answer-service.d.ts","sourceRoot":"","sources":["../../../../../src/utils/graphql/spotterService/nls-answer-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAIjF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,UACpB,MAAM,eACA,MAAM,KACpB,QAAQ,aAAa,CAwCvB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getEmbedConfig } from '../../../embed/embedConfig';
|
|
2
|
+
import { AnswerService } from '../answerService/answerService';
|
|
3
|
+
import { graphqlQuery } from '../graphql-request';
|
|
4
|
+
import * as queries from './nls-answer-queries';
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param query string
|
|
8
|
+
* @param worksheetId string
|
|
9
|
+
* @returns answerService AnswerService
|
|
10
|
+
*/
|
|
11
|
+
export const getAnswerFromQuery = async (query, worksheetId) => {
|
|
12
|
+
const embedConfig = getEmbedConfig();
|
|
13
|
+
const resp = await graphqlQuery({
|
|
14
|
+
query: queries.getAnswerSessionFromQuery,
|
|
15
|
+
variables: {
|
|
16
|
+
params: {
|
|
17
|
+
facetSelections: [],
|
|
18
|
+
filterSelections: [
|
|
19
|
+
{
|
|
20
|
+
facetType: 'WORKSHEETS',
|
|
21
|
+
facetValue: [
|
|
22
|
+
worksheetId,
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
query,
|
|
27
|
+
worksheetFacetPayload: {
|
|
28
|
+
worksheetId,
|
|
29
|
+
},
|
|
30
|
+
searchOption: 'AI_ANSWER',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
thoughtSpotHost: embedConfig.thoughtSpotHost,
|
|
34
|
+
isCompositeQuery: false,
|
|
35
|
+
});
|
|
36
|
+
const suggestion = resp.sageQuerySuggestions[0];
|
|
37
|
+
const answerSession = {
|
|
38
|
+
sessionId: suggestion.sessionId,
|
|
39
|
+
genNo: suggestion.genNo,
|
|
40
|
+
acSession: {
|
|
41
|
+
sessionId: suggestion.stateKey.transactionId,
|
|
42
|
+
genNo: suggestion.stateKey.generationNumber,
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
return new AnswerService(answerSession, null, embedConfig.thoughtSpotHost);
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=nls-answer-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nls-answer-service.js","sourceRoot":"","sources":["../../../../../src/utils/graphql/spotterService/nls-answer-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAoB,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACnC,KAAa,EACb,WAAmB,EACG,EAAE;IACxB,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC;QAC5B,KAAK,EAAE,OAAO,CAAC,yBAAyB;QACxC,SAAS,EAAE;YACP,MAAM,EAAE;gBACJ,eAAe,EAAE,EAAE;gBACnB,gBAAgB,EAAE;oBACd;wBACI,SAAS,EAAE,YAAY;wBACvB,UAAU,EAAE;4BACR,WAAW;yBACd;qBACJ;iBACJ;gBACD,KAAK;gBACL,qBAAqB,EAAE;oBACnB,WAAW;iBACd;gBACD,YAAY,EAAE,WAAW;aAC5B;SACJ;QACD,eAAe,EAAE,WAAW,CAAC,eAAe;QAC5C,gBAAgB,EAAE,KAAK;KAC1B,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAChD,MAAM,aAAa,GAAqB;QACpC,SAAS,EAAE,UAAU,CAAC,SAAS;QAC/B,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,SAAS,EAAE;YACP,SAAS,EAAE,UAAU,CAAC,QAAQ,CAAC,aAAa;YAC5C,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC,gBAAgB;SAC9C;KACJ,CAAC;IACF,OAAO,IAAI,aAAa,CACpB,aAAa,EACb,IAAI,EACJ,WAAW,CAAC,eAAe,CAC9B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -26,7 +26,8 @@ declare module '@thoughtspot/visual-embed-sdk' {
|
|
|
26
26
|
import { getEmbedConfig } from '@thoughtspot/visual-embed-sdk/embed/embedConfig';
|
|
27
27
|
import { uploadMixpanelEvent, MIXPANEL_EVENT } from '@thoughtspot/visual-embed-sdk/mixpanel-service';
|
|
28
28
|
import { tokenizedFetch } from '@thoughtspot/visual-embed-sdk/tokenizedFetch';
|
|
29
|
-
|
|
29
|
+
import { getAnswerFromQuery } from '@thoughtspot/visual-embed-sdk/utils/graphql/spotterService/nls-answer-service';
|
|
30
|
+
export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, Conversation, ConversationViewConfig, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, VizPoint, CustomActionPayload, };
|
|
30
31
|
export { resetCachedAuthToken } from '@thoughtspot/visual-embed-sdk/authToken';
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -6541,6 +6542,17 @@ declare module '@thoughtspot/visual-embed-sdk/tokenizedFetch' {
|
|
|
6541
6542
|
export const tokenizedFetch: typeof fetch;
|
|
6542
6543
|
}
|
|
6543
6544
|
|
|
6545
|
+
declare module '@thoughtspot/visual-embed-sdk/utils/graphql/spotterService/nls-answer-service' {
|
|
6546
|
+
import { AnswerService } from '@thoughtspot/visual-embed-sdk/utils/graphql/answerService/answerService';
|
|
6547
|
+
/**
|
|
6548
|
+
*
|
|
6549
|
+
* @param query string
|
|
6550
|
+
* @param worksheetId string
|
|
6551
|
+
* @returns answerService AnswerService
|
|
6552
|
+
*/
|
|
6553
|
+
export const getAnswerFromQuery: (query: string, worksheetId: string) => Promise<AnswerService>;
|
|
6554
|
+
}
|
|
6555
|
+
|
|
6544
6556
|
declare module '@thoughtspot/visual-embed-sdk/authToken' {
|
|
6545
6557
|
import { EmbedConfig } from '@thoughtspot/visual-embed-sdk/types';
|
|
6546
6558
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ViewConfig, Param } from '../types';
|
|
2
2
|
import { TsEmbed } from './ts-embed';
|
|
3
|
-
import { Conversation as ConversationService } from '../utils/graphql/
|
|
3
|
+
import { Conversation as ConversationService } from '../utils/graphql/spotterService/conversation-service';
|
|
4
4
|
import { getEmbedConfig } from './embedConfig';
|
|
5
5
|
import { getQueryParamString } from '../utils';
|
|
6
6
|
|
package/src/index.ts
CHANGED
|
@@ -56,6 +56,7 @@ import { AnswerService, SessionInterface, UnderlyingDataPoint } from './utils/gr
|
|
|
56
56
|
import { getEmbedConfig } from './embed/embedConfig';
|
|
57
57
|
import { uploadMixpanelEvent, MIXPANEL_EVENT } from './mixpanel-service';
|
|
58
58
|
import { tokenizedFetch } from './tokenizedFetch';
|
|
59
|
+
import { getAnswerFromQuery } from './utils/graphql/spotterService/nls-answer-service';
|
|
59
60
|
|
|
60
61
|
export {
|
|
61
62
|
init,
|
|
@@ -68,6 +69,7 @@ export {
|
|
|
68
69
|
getEmbedConfig as getInitConfig,
|
|
69
70
|
getSessionInfo,
|
|
70
71
|
tokenizedFetch,
|
|
72
|
+
getAnswerFromQuery,
|
|
71
73
|
SearchEmbed,
|
|
72
74
|
SearchBarEmbed,
|
|
73
75
|
PinboardEmbed,
|