@15gifts/sdk 0.7.0 → 0.8.1
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/dist/index.d.mts +302 -582
- package/dist/index.d.ts +302 -582
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -6,26 +6,6 @@ import { ClientOptions, Client as Client$1, Middleware } from 'openapi-fetch';
|
|
|
6
6
|
* Do not make direct changes to the file.
|
|
7
7
|
*/
|
|
8
8
|
interface paths$1 {
|
|
9
|
-
'/api/conversation/v2': {
|
|
10
|
-
parameters: {
|
|
11
|
-
query?: never;
|
|
12
|
-
header?: never;
|
|
13
|
-
path?: never;
|
|
14
|
-
cookie?: never;
|
|
15
|
-
};
|
|
16
|
-
get?: never;
|
|
17
|
-
put?: never;
|
|
18
|
-
/**
|
|
19
|
-
* Generate Conversation Json Response
|
|
20
|
-
* @deprecated
|
|
21
|
-
*/
|
|
22
|
-
post: operations['generate_conversation_json_response_api_conversation_v2_post'];
|
|
23
|
-
delete?: never;
|
|
24
|
-
options?: never;
|
|
25
|
-
head?: never;
|
|
26
|
-
patch?: never;
|
|
27
|
-
trace?: never;
|
|
28
|
-
};
|
|
29
9
|
'/api/conversation/v3': {
|
|
30
10
|
parameters: {
|
|
31
11
|
query?: never;
|
|
@@ -43,26 +23,6 @@ interface paths$1 {
|
|
|
43
23
|
patch?: never;
|
|
44
24
|
trace?: never;
|
|
45
25
|
};
|
|
46
|
-
'/api/v1/conversation/': {
|
|
47
|
-
parameters: {
|
|
48
|
-
query?: never;
|
|
49
|
-
header?: never;
|
|
50
|
-
path?: never;
|
|
51
|
-
cookie?: never;
|
|
52
|
-
};
|
|
53
|
-
get?: never;
|
|
54
|
-
put?: never;
|
|
55
|
-
/**
|
|
56
|
-
* Generate Conversation Streaming Response
|
|
57
|
-
* @deprecated
|
|
58
|
-
*/
|
|
59
|
-
post: operations['generate_conversation_streaming_response_api_v1_conversation__post'];
|
|
60
|
-
delete?: never;
|
|
61
|
-
options?: never;
|
|
62
|
-
head?: never;
|
|
63
|
-
patch?: never;
|
|
64
|
-
trace?: never;
|
|
65
|
-
};
|
|
66
26
|
}
|
|
67
27
|
interface components {
|
|
68
28
|
schemas: {
|
|
@@ -72,7 +32,6 @@ interface components {
|
|
|
72
32
|
* Id
|
|
73
33
|
* @default actions_matched_by_triggered_branches
|
|
74
34
|
* @constant
|
|
75
|
-
* @enum {string}
|
|
76
35
|
*/
|
|
77
36
|
id: 'actions_matched_by_triggered_branches';
|
|
78
37
|
/**
|
|
@@ -89,7 +48,6 @@ interface components {
|
|
|
89
48
|
* Id
|
|
90
49
|
* @default application_version
|
|
91
50
|
* @constant
|
|
92
|
-
* @enum {string}
|
|
93
51
|
*/
|
|
94
52
|
id: 'application_version';
|
|
95
53
|
/**
|
|
@@ -100,13 +58,213 @@ interface components {
|
|
|
100
58
|
/** Data */
|
|
101
59
|
data: string;
|
|
102
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* AssistantConversationIdMessage
|
|
63
|
+
* @description We're giving the caller a new Conversation ID
|
|
64
|
+
*/
|
|
65
|
+
AssistantConversationIdMessage: {
|
|
66
|
+
/**
|
|
67
|
+
* Type
|
|
68
|
+
* @default CONVERSATION_ID
|
|
69
|
+
* @constant
|
|
70
|
+
*/
|
|
71
|
+
type: 'CONVERSATION_ID';
|
|
72
|
+
/**
|
|
73
|
+
* Conversationid
|
|
74
|
+
* @description Unique identifier for the conversation. This will be generated once, at the start of a conversation.
|
|
75
|
+
*/
|
|
76
|
+
conversationId: string | null;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* AssistantDebugMessage
|
|
80
|
+
* @description Model for the debug chunk returned in the streaming response by the conversation endpoint.
|
|
81
|
+
*/
|
|
82
|
+
AssistantDebugMessage: {
|
|
83
|
+
/**
|
|
84
|
+
* Type
|
|
85
|
+
* @default DEBUG
|
|
86
|
+
* @constant
|
|
87
|
+
*/
|
|
88
|
+
type: 'DEBUG';
|
|
89
|
+
/**
|
|
90
|
+
* Records
|
|
91
|
+
* @description List of debug records.
|
|
92
|
+
*/
|
|
93
|
+
records: (components['schemas']['EmbeddingTokenCountRecord'] | components['schemas']['SystemPromptRecord'] | components['schemas']['TriggeredBranchesRecord'] | components['schemas']['ActionsMatchedByTriggeredBranchesRecord'] | components['schemas']['RunActionDetailsRecord'] | components['schemas']['MaxCosineSimilarityScoresRecord'] | components['schemas']['LLMTokenCountRecord'] | components['schemas']['ContextChunksRecord'] | components['schemas']['ApplicationVersionRecord'] | components['schemas']['DBVersionRecord'] | components['schemas']['PhraseTokenProbabilitiesRecord'] | components['schemas']['ConversationTurnIDRecord'] | components['schemas']['ConversationStageTransitionRecord'] | components['schemas']['MaxProgressScoreRecord'])[];
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* AssistantExitToChatMessage
|
|
97
|
+
* @description The conversation has reached a point where we heed to pass it to human involvement
|
|
98
|
+
*/
|
|
99
|
+
AssistantExitToChatMessage: {
|
|
100
|
+
/**
|
|
101
|
+
* Type
|
|
102
|
+
* @default EXIT_TO_CHAT
|
|
103
|
+
* @constant
|
|
104
|
+
*/
|
|
105
|
+
type: 'EXIT_TO_CHAT';
|
|
106
|
+
/**
|
|
107
|
+
* Fallbackmessage
|
|
108
|
+
* @description What should a client render if they do not have a native renderer for this message type?
|
|
109
|
+
*/
|
|
110
|
+
fallbackMessage: string;
|
|
111
|
+
/**
|
|
112
|
+
* Conversationsummary
|
|
113
|
+
* @description A summary of the conversation so far
|
|
114
|
+
*/
|
|
115
|
+
conversationSummary: string;
|
|
116
|
+
/** @description Why have we been exited to chat? */
|
|
117
|
+
reason: components['schemas']['ExitToChatReason'];
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* AssistantExitToPurchaseMessage
|
|
121
|
+
* @description The customer wants to buy something
|
|
122
|
+
*/
|
|
123
|
+
AssistantExitToPurchaseMessage: {
|
|
124
|
+
/**
|
|
125
|
+
* Type
|
|
126
|
+
* @default EXIT_TO_PURCHASE
|
|
127
|
+
* @constant
|
|
128
|
+
*/
|
|
129
|
+
type: 'EXIT_TO_PURCHASE';
|
|
130
|
+
/**
|
|
131
|
+
* Fallbackmessage
|
|
132
|
+
* @description What should a client render if they do not have a native renderer for this message type?
|
|
133
|
+
*/
|
|
134
|
+
fallbackMessage: string;
|
|
135
|
+
/** Products */
|
|
136
|
+
products: components['schemas']['Product'][];
|
|
137
|
+
/**
|
|
138
|
+
* Bundles
|
|
139
|
+
* @description The bundles that were recommended
|
|
140
|
+
* @default []
|
|
141
|
+
*/
|
|
142
|
+
bundles: components['schemas']['Bundle'][];
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* AssistantMultiSelectMessage
|
|
146
|
+
* @description A multi-select renderer - given a list of options, pick one or more
|
|
147
|
+
*/
|
|
148
|
+
AssistantMultiSelectMessage: {
|
|
149
|
+
/**
|
|
150
|
+
* Type
|
|
151
|
+
* @default MULTI_SELECT
|
|
152
|
+
* @constant
|
|
153
|
+
*/
|
|
154
|
+
type: 'MULTI_SELECT';
|
|
155
|
+
/**
|
|
156
|
+
* Fallbackmessage
|
|
157
|
+
* @description What should a client render if they do not have a native renderer for this message type?
|
|
158
|
+
*/
|
|
159
|
+
fallbackMessage: string;
|
|
160
|
+
/**
|
|
161
|
+
* Options
|
|
162
|
+
* @description What selectable options should be available?
|
|
163
|
+
*/
|
|
164
|
+
options: components['schemas']['ConversationOption'][];
|
|
165
|
+
/**
|
|
166
|
+
* Allowfreetext
|
|
167
|
+
* @description Should we expect a free text response to this message?
|
|
168
|
+
*/
|
|
169
|
+
allowFreeText: boolean;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* AssistantRecommendationMessage
|
|
173
|
+
* @description The conversation has reached a point where we can make one or more recommendations
|
|
174
|
+
*/
|
|
175
|
+
AssistantRecommendationMessage: {
|
|
176
|
+
/**
|
|
177
|
+
* Type
|
|
178
|
+
* @default RECOMMENDATION
|
|
179
|
+
* @constant
|
|
180
|
+
*/
|
|
181
|
+
type: 'RECOMMENDATION';
|
|
182
|
+
/**
|
|
183
|
+
* Fallbackmessage
|
|
184
|
+
* @description What should a client render if they do not have a native renderer for this message type?
|
|
185
|
+
*/
|
|
186
|
+
fallbackMessage: string;
|
|
187
|
+
/** Recommendations */
|
|
188
|
+
recommendations: components['schemas']['Recommendation-Output'][];
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* AssistantSingleSelectMessage
|
|
192
|
+
* @description A single-select renderer - given a list of options, pick one
|
|
193
|
+
*/
|
|
194
|
+
AssistantSingleSelectMessage: {
|
|
195
|
+
/**
|
|
196
|
+
* Type
|
|
197
|
+
* @default SINGLE_SELECT
|
|
198
|
+
* @constant
|
|
199
|
+
*/
|
|
200
|
+
type: 'SINGLE_SELECT';
|
|
201
|
+
/**
|
|
202
|
+
* Fallbackmessage
|
|
203
|
+
* @description What should a client render if they do not have a native renderer for this message type?
|
|
204
|
+
*/
|
|
205
|
+
fallbackMessage: string;
|
|
206
|
+
/**
|
|
207
|
+
* Options
|
|
208
|
+
* @description What selectable options should be available?
|
|
209
|
+
*/
|
|
210
|
+
options: components['schemas']['ConversationOption'][];
|
|
211
|
+
/**
|
|
212
|
+
* Allowfreetext
|
|
213
|
+
* @description Should we expect a free text response to this message?
|
|
214
|
+
*/
|
|
215
|
+
allowFreeText: boolean;
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* AssistantTextMessage
|
|
219
|
+
* @description A text-based item for clients to render
|
|
220
|
+
*/
|
|
221
|
+
AssistantTextMessage: {
|
|
222
|
+
/**
|
|
223
|
+
* Type
|
|
224
|
+
* @default MESSAGE
|
|
225
|
+
* @constant
|
|
226
|
+
*/
|
|
227
|
+
type: 'MESSAGE';
|
|
228
|
+
/**
|
|
229
|
+
* Message
|
|
230
|
+
* @description Message for the conversation.
|
|
231
|
+
*/
|
|
232
|
+
message: string;
|
|
233
|
+
};
|
|
234
|
+
/** Bundle */
|
|
235
|
+
Bundle: {
|
|
236
|
+
/**
|
|
237
|
+
* Id
|
|
238
|
+
* @description The ID of the bundle.
|
|
239
|
+
*/
|
|
240
|
+
id: string;
|
|
241
|
+
/**
|
|
242
|
+
* Name
|
|
243
|
+
* @description The name of the bundle.
|
|
244
|
+
*/
|
|
245
|
+
name: string;
|
|
246
|
+
/**
|
|
247
|
+
* Price
|
|
248
|
+
* @description The final price of the bundle.
|
|
249
|
+
*/
|
|
250
|
+
price: string;
|
|
251
|
+
/**
|
|
252
|
+
* Previousprice
|
|
253
|
+
* @description If the bundle is discounted, what was the original price?
|
|
254
|
+
*/
|
|
255
|
+
previousPrice?: string | null;
|
|
256
|
+
/**
|
|
257
|
+
* Products
|
|
258
|
+
* @description The products that make up this bundle.
|
|
259
|
+
*/
|
|
260
|
+
products: components['schemas']['Product'][];
|
|
261
|
+
};
|
|
103
262
|
/** ContextChunksRecord */
|
|
104
263
|
ContextChunksRecord: {
|
|
105
264
|
/**
|
|
106
265
|
* Id
|
|
107
266
|
* @default context_chunks
|
|
108
267
|
* @constant
|
|
109
|
-
* @enum {string}
|
|
110
268
|
*/
|
|
111
269
|
id: 'context_chunks';
|
|
112
270
|
/**
|
|
@@ -134,6 +292,7 @@ interface components {
|
|
|
134
292
|
ConversationHistoryRequest: {
|
|
135
293
|
/**
|
|
136
294
|
* Start Date
|
|
295
|
+
* Format: date-time
|
|
137
296
|
* @description The start date of the conversation history in YYYY-MM-DD HH:MM:SS format
|
|
138
297
|
*/
|
|
139
298
|
start_date: string;
|
|
@@ -141,25 +300,7 @@ interface components {
|
|
|
141
300
|
* End Date
|
|
142
301
|
* @description The end date of the conversation history in YYYY-MM-DD HH:MM:SS format
|
|
143
302
|
*/
|
|
144
|
-
end_date
|
|
145
|
-
};
|
|
146
|
-
/**
|
|
147
|
-
* ConversationIdChunk
|
|
148
|
-
* @description We're giving the caller a new Conversation ID
|
|
149
|
-
*/
|
|
150
|
-
ConversationIdChunk: {
|
|
151
|
-
/**
|
|
152
|
-
* Type
|
|
153
|
-
* @default CONVERSATION_ID
|
|
154
|
-
* @constant
|
|
155
|
-
* @enum {string}
|
|
156
|
-
*/
|
|
157
|
-
type: 'CONVERSATION_ID';
|
|
158
|
-
/**
|
|
159
|
-
* Conversationid
|
|
160
|
-
* @description Unique identifier for the conversation. This will be generated once, at the start of a conversation.
|
|
161
|
-
*/
|
|
162
|
-
conversationId: string | null;
|
|
303
|
+
end_date?: string | null;
|
|
163
304
|
};
|
|
164
305
|
/** ConversationOption */
|
|
165
306
|
ConversationOption: {
|
|
@@ -174,7 +315,6 @@ interface components {
|
|
|
174
315
|
* Id
|
|
175
316
|
* @default conversation_stage_transition
|
|
176
317
|
* @constant
|
|
177
|
-
* @enum {string}
|
|
178
318
|
*/
|
|
179
319
|
id: 'conversation_stage_transition';
|
|
180
320
|
/**
|
|
@@ -191,7 +331,6 @@ interface components {
|
|
|
191
331
|
* Id
|
|
192
332
|
* @default conversation_turn_id
|
|
193
333
|
* @constant
|
|
194
|
-
* @enum {string}
|
|
195
334
|
*/
|
|
196
335
|
id: 'conversation_turn_id';
|
|
197
336
|
/**
|
|
@@ -211,7 +350,6 @@ interface components {
|
|
|
211
350
|
* Id
|
|
212
351
|
* @default db_version
|
|
213
352
|
* @constant
|
|
214
|
-
* @enum {string}
|
|
215
353
|
*/
|
|
216
354
|
id: 'db_version';
|
|
217
355
|
/**
|
|
@@ -225,31 +363,12 @@ interface components {
|
|
|
225
363
|
*/
|
|
226
364
|
db_version: string;
|
|
227
365
|
};
|
|
228
|
-
/**
|
|
229
|
-
* DebugChunk
|
|
230
|
-
* @description Model for the debug chunk returned in the streaming response by the conversation endpoint.
|
|
231
|
-
*/
|
|
232
|
-
DebugChunk: {
|
|
233
|
-
/**
|
|
234
|
-
* Type
|
|
235
|
-
* @default DEBUG
|
|
236
|
-
* @constant
|
|
237
|
-
* @enum {string}
|
|
238
|
-
*/
|
|
239
|
-
type: 'DEBUG';
|
|
240
|
-
/**
|
|
241
|
-
* Records
|
|
242
|
-
* @description List of debug records.
|
|
243
|
-
*/
|
|
244
|
-
records: (components['schemas']['EmbeddingTokenCountRecord'] | components['schemas']['SystemPromptRecord'] | components['schemas']['TriggeredBranchesRecord'] | components['schemas']['ActionsMatchedByTriggeredBranchesRecord'] | components['schemas']['RunActionDetailsRecord'] | components['schemas']['MaxCosineSimilarityScoresRecord'] | components['schemas']['LLMTokenCountRecord'] | components['schemas']['ContextChunksRecord'] | components['schemas']['ApplicationVersionRecord'] | components['schemas']['DBVersionRecord'] | components['schemas']['PhraseTokenProbabilitiesRecord'] | components['schemas']['ConversationTurnIDRecord'] | components['schemas']['ConversationStageTransitionRecord'])[];
|
|
245
|
-
};
|
|
246
366
|
/** EmbeddingTokenCountRecord */
|
|
247
367
|
EmbeddingTokenCountRecord: {
|
|
248
368
|
/**
|
|
249
369
|
* Id
|
|
250
370
|
* @default embedding_token_count
|
|
251
371
|
* @constant
|
|
252
|
-
* @enum {string}
|
|
253
372
|
*/
|
|
254
373
|
id: 'embedding_token_count';
|
|
255
374
|
/**
|
|
@@ -257,58 +376,13 @@ interface components {
|
|
|
257
376
|
* Format: date-time
|
|
258
377
|
*/
|
|
259
378
|
timestamp?: string;
|
|
260
|
-
data: components['schemas']['
|
|
261
|
-
};
|
|
262
|
-
/**
|
|
263
|
-
* ExitToChatChunk
|
|
264
|
-
* @description The conversation has reached a point where we heed to pass it to human involvement
|
|
265
|
-
*/
|
|
266
|
-
ExitToChatChunk: {
|
|
267
|
-
/**
|
|
268
|
-
* Type
|
|
269
|
-
* @default EXIT_TO_CHAT
|
|
270
|
-
* @constant
|
|
271
|
-
* @enum {string}
|
|
272
|
-
*/
|
|
273
|
-
type: 'EXIT_TO_CHAT';
|
|
274
|
-
/**
|
|
275
|
-
* Fallbackmessage
|
|
276
|
-
* @description What should a client render if they do not have a native renderer for this message type?
|
|
277
|
-
*/
|
|
278
|
-
fallbackMessage: string;
|
|
279
|
-
/**
|
|
280
|
-
* Conversationsummary
|
|
281
|
-
* @description A summary of the conversation so far
|
|
282
|
-
*/
|
|
283
|
-
conversationSummary: string;
|
|
284
|
-
/** @description Why have we been exited to chat? */
|
|
285
|
-
reason: components['schemas']['ExitToChatReason'];
|
|
379
|
+
data: components['schemas']['platform_py_contracts__models__debug_record_v1__EmbeddingTokenCountRecord__Data'];
|
|
286
380
|
};
|
|
287
381
|
/**
|
|
288
382
|
* ExitToChatReason
|
|
289
383
|
* @enum {string}
|
|
290
384
|
*/
|
|
291
385
|
ExitToChatReason: 'WANT_TO_TALK_TO_HUMAN' | 'OUT_OF_SCOPE_QUESTIONS' | 'NOT_BEHAVING_CORRECTLY';
|
|
292
|
-
/**
|
|
293
|
-
* ExitToPurchaseChunk
|
|
294
|
-
* @description The customer wants to buy something
|
|
295
|
-
*/
|
|
296
|
-
ExitToPurchaseChunk: {
|
|
297
|
-
/**
|
|
298
|
-
* Type
|
|
299
|
-
* @default EXIT_TO_PURCHASE
|
|
300
|
-
* @constant
|
|
301
|
-
* @enum {string}
|
|
302
|
-
*/
|
|
303
|
-
type: 'EXIT_TO_PURCHASE';
|
|
304
|
-
/**
|
|
305
|
-
* Fallbackmessage
|
|
306
|
-
* @description What should a client render if they do not have a native renderer for this message type?
|
|
307
|
-
*/
|
|
308
|
-
fallbackMessage: string;
|
|
309
|
-
/** Products */
|
|
310
|
-
products: components['schemas']['Product'][];
|
|
311
|
-
};
|
|
312
386
|
/** HTTPValidationError */
|
|
313
387
|
HTTPValidationError: {
|
|
314
388
|
/** Detail */
|
|
@@ -320,7 +394,6 @@ interface components {
|
|
|
320
394
|
* Id
|
|
321
395
|
* @default llm_token_count
|
|
322
396
|
* @constant
|
|
323
|
-
* @enum {string}
|
|
324
397
|
*/
|
|
325
398
|
id: 'llm_token_count';
|
|
326
399
|
/**
|
|
@@ -328,7 +401,7 @@ interface components {
|
|
|
328
401
|
* Format: date-time
|
|
329
402
|
*/
|
|
330
403
|
timestamp?: string;
|
|
331
|
-
data: components['schemas']['
|
|
404
|
+
data: components['schemas']['platform_py_contracts__models__debug_record_v1__LLMTokenCountRecord__Data'];
|
|
332
405
|
};
|
|
333
406
|
/** MaxCosineSimilarityScoresRecord */
|
|
334
407
|
MaxCosineSimilarityScoresRecord: {
|
|
@@ -336,7 +409,6 @@ interface components {
|
|
|
336
409
|
* Id
|
|
337
410
|
* @default max_cosine_similarity_scores
|
|
338
411
|
* @constant
|
|
339
|
-
* @enum {string}
|
|
340
412
|
*/
|
|
341
413
|
id: 'max_cosine_similarity_scores';
|
|
342
414
|
/**
|
|
@@ -349,51 +421,20 @@ interface components {
|
|
|
349
421
|
[key: string]: number;
|
|
350
422
|
};
|
|
351
423
|
};
|
|
352
|
-
/**
|
|
353
|
-
|
|
354
|
-
* @description A text-based item for clients to render
|
|
355
|
-
*/
|
|
356
|
-
MessageChunk: {
|
|
357
|
-
/**
|
|
358
|
-
* Type
|
|
359
|
-
* @default MESSAGE
|
|
360
|
-
* @constant
|
|
361
|
-
* @enum {string}
|
|
362
|
-
*/
|
|
363
|
-
type: 'MESSAGE';
|
|
364
|
-
/**
|
|
365
|
-
* Message
|
|
366
|
-
* @description Message for the conversation.
|
|
367
|
-
*/
|
|
368
|
-
message: string;
|
|
369
|
-
};
|
|
370
|
-
/**
|
|
371
|
-
* MultiSelectChunk
|
|
372
|
-
* @description A multi-select renderer - given a list of options, pick one or more
|
|
373
|
-
*/
|
|
374
|
-
MultiSelectChunk: {
|
|
424
|
+
/** MaxProgressScoreRecord */
|
|
425
|
+
MaxProgressScoreRecord: {
|
|
375
426
|
/**
|
|
376
|
-
*
|
|
377
|
-
* @default
|
|
427
|
+
* Id
|
|
428
|
+
* @default max_progress_score
|
|
378
429
|
* @constant
|
|
379
|
-
* @enum {string}
|
|
380
|
-
*/
|
|
381
|
-
type: 'MULTI_SELECT';
|
|
382
|
-
/**
|
|
383
|
-
* Fallbackmessage
|
|
384
|
-
* @description What should a client render if they do not have a native renderer for this message type?
|
|
385
|
-
*/
|
|
386
|
-
fallbackMessage: string;
|
|
387
|
-
/**
|
|
388
|
-
* Options
|
|
389
|
-
* @description What selectable options should be available?
|
|
390
430
|
*/
|
|
391
|
-
|
|
431
|
+
id: 'max_progress_score';
|
|
392
432
|
/**
|
|
393
|
-
*
|
|
394
|
-
*
|
|
433
|
+
* Timestamp
|
|
434
|
+
* Format: date-time
|
|
395
435
|
*/
|
|
396
|
-
|
|
436
|
+
timestamp?: string;
|
|
437
|
+
data: components['schemas']['ProgressScoreRecord'];
|
|
397
438
|
};
|
|
398
439
|
/** PhraseTokenProbabilitiesRecord */
|
|
399
440
|
PhraseTokenProbabilitiesRecord: {
|
|
@@ -401,7 +442,6 @@ interface components {
|
|
|
401
442
|
* Id
|
|
402
443
|
* @default phrase_token_probabilities
|
|
403
444
|
* @constant
|
|
404
|
-
* @enum {string}
|
|
405
445
|
*/
|
|
406
446
|
id: 'phrase_token_probabilities';
|
|
407
447
|
/**
|
|
@@ -438,8 +478,15 @@ interface components {
|
|
|
438
478
|
/** Similarity Score */
|
|
439
479
|
similarity_score: number;
|
|
440
480
|
};
|
|
481
|
+
/** ProgressScoreRecord */
|
|
482
|
+
ProgressScoreRecord: {
|
|
483
|
+
/** Max Progress Score */
|
|
484
|
+
max_progress_score: number;
|
|
485
|
+
/** Is Ready For Recommendation */
|
|
486
|
+
is_ready_for_recommendation: boolean;
|
|
487
|
+
};
|
|
441
488
|
/** Recommendation */
|
|
442
|
-
Recommendation: {
|
|
489
|
+
'Recommendation-Output': {
|
|
443
490
|
/**
|
|
444
491
|
* Explanation
|
|
445
492
|
* @description Why was this recommendation made?
|
|
@@ -450,26 +497,12 @@ interface components {
|
|
|
450
497
|
* @description The IDs of the products that make up this recommendation
|
|
451
498
|
*/
|
|
452
499
|
products: components['schemas']['Product'][];
|
|
453
|
-
};
|
|
454
|
-
/**
|
|
455
|
-
* RecommendationChunk
|
|
456
|
-
* @description The conversation has reached a point where we can make one or more recommendations
|
|
457
|
-
*/
|
|
458
|
-
RecommendationChunk: {
|
|
459
500
|
/**
|
|
460
|
-
*
|
|
461
|
-
* @
|
|
462
|
-
* @
|
|
463
|
-
* @enum {string}
|
|
501
|
+
* Bundles
|
|
502
|
+
* @description The bundles that make up this recommendation
|
|
503
|
+
* @default []
|
|
464
504
|
*/
|
|
465
|
-
|
|
466
|
-
/**
|
|
467
|
-
* Fallbackmessage
|
|
468
|
-
* @description What should a client render if they do not have a native renderer for this message type?
|
|
469
|
-
*/
|
|
470
|
-
fallbackMessage: string;
|
|
471
|
-
/** Recommendations */
|
|
472
|
-
recommendations: components['schemas']['Recommendation'][];
|
|
505
|
+
bundles: components['schemas']['Bundle'][];
|
|
473
506
|
};
|
|
474
507
|
/** RootModel[list[TokenProbabilityRecord]] */
|
|
475
508
|
RootModel_list_TokenProbabilityRecord__: components['schemas']['TokenProbabilityRecord'][];
|
|
@@ -479,7 +512,6 @@ interface components {
|
|
|
479
512
|
* Id
|
|
480
513
|
* @default run_action_details
|
|
481
514
|
* @constant
|
|
482
|
-
* @enum {string}
|
|
483
515
|
*/
|
|
484
516
|
id: 'run_action_details';
|
|
485
517
|
/**
|
|
@@ -487,50 +519,7 @@ interface components {
|
|
|
487
519
|
* Format: date-time
|
|
488
520
|
*/
|
|
489
521
|
timestamp?: string;
|
|
490
|
-
data: components['schemas']['
|
|
491
|
-
};
|
|
492
|
-
/**
|
|
493
|
-
* SingleSelectChunk
|
|
494
|
-
* @description A single-select renderer - given a list of options, pick one
|
|
495
|
-
*/
|
|
496
|
-
SingleSelectChunk: {
|
|
497
|
-
/**
|
|
498
|
-
* Type
|
|
499
|
-
* @default SINGLE_SELECT
|
|
500
|
-
* @constant
|
|
501
|
-
* @enum {string}
|
|
502
|
-
*/
|
|
503
|
-
type: 'SINGLE_SELECT';
|
|
504
|
-
/**
|
|
505
|
-
* Fallbackmessage
|
|
506
|
-
* @description What should a client render if they do not have a native renderer for this message type?
|
|
507
|
-
*/
|
|
508
|
-
fallbackMessage: string;
|
|
509
|
-
/**
|
|
510
|
-
* Options
|
|
511
|
-
* @description What selectable options should be available?
|
|
512
|
-
*/
|
|
513
|
-
options: components['schemas']['ConversationOption'][];
|
|
514
|
-
/**
|
|
515
|
-
* Allowfreetext
|
|
516
|
-
* @description Should we expect a free text response to this message?
|
|
517
|
-
*/
|
|
518
|
-
allowFreeText: boolean;
|
|
519
|
-
};
|
|
520
|
-
/**
|
|
521
|
-
* StartConversationRequest
|
|
522
|
-
* @description We are starting a new conversation, please give us a conversation ID back
|
|
523
|
-
*/
|
|
524
|
-
StartConversationRequest: {
|
|
525
|
-
/**
|
|
526
|
-
* Type
|
|
527
|
-
* @default START_CONVERSATION
|
|
528
|
-
* @constant
|
|
529
|
-
* @enum {string}
|
|
530
|
-
*/
|
|
531
|
-
type: 'START_CONVERSATION';
|
|
532
|
-
/** @description Context information we'll be getting with the request */
|
|
533
|
-
conversationContext: components['schemas']['ConversationContext'];
|
|
522
|
+
data: components['schemas']['platform_py_contracts__models__debug_record_v1__RunActionDetailsRecord__Data'];
|
|
534
523
|
};
|
|
535
524
|
/** SystemPromptRecord */
|
|
536
525
|
SystemPromptRecord: {
|
|
@@ -555,67 +544,33 @@ interface components {
|
|
|
555
544
|
/** Probability */
|
|
556
545
|
probability: number;
|
|
557
546
|
/** Log Probability */
|
|
558
|
-
log_probability: number;
|
|
559
|
-
};
|
|
560
|
-
/** TriggeredBranchesRecord */
|
|
561
|
-
TriggeredBranchesRecord: {
|
|
562
|
-
/**
|
|
563
|
-
* Id
|
|
564
|
-
* @default triggered_branches
|
|
565
|
-
* @constant
|
|
566
|
-
* @enum {string}
|
|
567
|
-
*/
|
|
568
|
-
id: 'triggered_branches';
|
|
569
|
-
/**
|
|
570
|
-
* Timestamp
|
|
571
|
-
* Format: date-time
|
|
572
|
-
*/
|
|
573
|
-
timestamp?: string;
|
|
574
|
-
/** Data */
|
|
575
|
-
data: string[];
|
|
576
|
-
};
|
|
577
|
-
/** ValidationError */
|
|
578
|
-
ValidationError: {
|
|
579
|
-
/** Location */
|
|
580
|
-
loc: (string | number)[];
|
|
581
|
-
/** Message */
|
|
582
|
-
msg: string;
|
|
583
|
-
/** Error Type */
|
|
584
|
-
type: string;
|
|
585
|
-
};
|
|
586
|
-
/**
|
|
587
|
-
* MessageRequest
|
|
588
|
-
* @description A standard, text-based message from an end-user
|
|
589
|
-
*/
|
|
590
|
-
app__conversation__models__input__MessageRequest: {
|
|
591
|
-
/**
|
|
592
|
-
* Type
|
|
593
|
-
* @default MESSAGE
|
|
594
|
-
* @constant
|
|
595
|
-
* @enum {string}
|
|
596
|
-
*/
|
|
597
|
-
type: 'MESSAGE';
|
|
547
|
+
log_probability: number;
|
|
548
|
+
};
|
|
549
|
+
/** TriggeredBranchesRecord */
|
|
550
|
+
TriggeredBranchesRecord: {
|
|
598
551
|
/**
|
|
599
|
-
*
|
|
600
|
-
* @
|
|
552
|
+
* Id
|
|
553
|
+
* @default triggered_branches
|
|
554
|
+
* @constant
|
|
601
555
|
*/
|
|
602
|
-
|
|
556
|
+
id: 'triggered_branches';
|
|
603
557
|
/**
|
|
604
|
-
*
|
|
605
|
-
*
|
|
558
|
+
* Timestamp
|
|
559
|
+
* Format: date-time
|
|
606
560
|
*/
|
|
607
|
-
|
|
561
|
+
timestamp?: string;
|
|
562
|
+
/** Data */
|
|
563
|
+
data: string[];
|
|
608
564
|
};
|
|
609
565
|
/**
|
|
610
|
-
*
|
|
566
|
+
* UserMultiSelectMessage
|
|
611
567
|
* @description A message from the end user that picks multiple select items
|
|
612
568
|
*/
|
|
613
|
-
|
|
569
|
+
UserMultiSelectMessage: {
|
|
614
570
|
/**
|
|
615
571
|
* Type
|
|
616
572
|
* @default MULTI_SELECT
|
|
617
573
|
* @constant
|
|
618
|
-
* @enum {string}
|
|
619
574
|
*/
|
|
620
575
|
type: 'MULTI_SELECT';
|
|
621
576
|
/**
|
|
@@ -635,15 +590,14 @@ interface components {
|
|
|
635
590
|
options: string[];
|
|
636
591
|
};
|
|
637
592
|
/**
|
|
638
|
-
*
|
|
593
|
+
* UserSingleSelectMessage
|
|
639
594
|
* @description A message from the end user that picks a single select item
|
|
640
595
|
*/
|
|
641
|
-
|
|
596
|
+
UserSingleSelectMessage: {
|
|
642
597
|
/**
|
|
643
598
|
* Type
|
|
644
599
|
* @default SINGLE_SELECT
|
|
645
600
|
* @constant
|
|
646
|
-
* @enum {string}
|
|
647
601
|
*/
|
|
648
602
|
type: 'SINGLE_SELECT';
|
|
649
603
|
/**
|
|
@@ -662,155 +616,53 @@ interface components {
|
|
|
662
616
|
*/
|
|
663
617
|
option: string;
|
|
664
618
|
};
|
|
665
|
-
/** ConversationRequest */
|
|
666
|
-
app__conversation__models__v1__input__ConversationRequest: {
|
|
667
|
-
/**
|
|
668
|
-
* Conversationid
|
|
669
|
-
* @description The conversation id
|
|
670
|
-
*/
|
|
671
|
-
conversationId?: string | null;
|
|
672
|
-
/**
|
|
673
|
-
* Usermessage
|
|
674
|
-
* @description The user message
|
|
675
|
-
*/
|
|
676
|
-
userMessage: string;
|
|
677
|
-
/**
|
|
678
|
-
* Openingmessage
|
|
679
|
-
* @description The opening message of the conversation
|
|
680
|
-
*/
|
|
681
|
-
openingMessage?: string | null;
|
|
682
|
-
/**
|
|
683
|
-
* Customerid
|
|
684
|
-
* @description The customer id
|
|
685
|
-
*/
|
|
686
|
-
customerId: string;
|
|
687
|
-
/**
|
|
688
|
-
* Userid
|
|
689
|
-
* @description Id to identify the user, this should be unified across the entire product.
|
|
690
|
-
*/
|
|
691
|
-
userId?: string | null;
|
|
692
|
-
/**
|
|
693
|
-
* Sessionid
|
|
694
|
-
* Format: uuid
|
|
695
|
-
* @description Id to identify the session that the conversation is in, this should be unified across the product
|
|
696
|
-
*/
|
|
697
|
-
sessionId: string;
|
|
698
|
-
};
|
|
699
|
-
/** ConversationRequest */
|
|
700
|
-
app__conversation__models__v2__input__ConversationRequest: components['schemas']['app__conversation__models__v2__input__MessageRequest'] | components['schemas']['app__conversation__models__v2__input__SingleSelectRequest'] | components['schemas']['app__conversation__models__v2__input__MultiSelectRequest'];
|
|
701
619
|
/**
|
|
702
|
-
*
|
|
703
|
-
* @description
|
|
620
|
+
* UserStartConversationMessage
|
|
621
|
+
* @description We are starting a new conversation, please give us a conversation ID back
|
|
704
622
|
*/
|
|
705
|
-
|
|
706
|
-
/**
|
|
707
|
-
* Conversationid
|
|
708
|
-
* @description The conversation id
|
|
709
|
-
*/
|
|
710
|
-
conversationId?: string | null;
|
|
623
|
+
UserStartConversationMessage: {
|
|
711
624
|
/**
|
|
712
|
-
*
|
|
713
|
-
* @
|
|
714
|
-
|
|
715
|
-
customerId: string;
|
|
716
|
-
/**
|
|
717
|
-
* Userid
|
|
718
|
-
* @description Id to identify the user, this should be unified across the entire product.
|
|
719
|
-
*/
|
|
720
|
-
userId?: string | null;
|
|
721
|
-
/**
|
|
722
|
-
* Sessionid
|
|
723
|
-
* Format: uuid
|
|
724
|
-
* @description Id to identify the session that the conversation is in, this should be unified across the product
|
|
725
|
-
*/
|
|
726
|
-
sessionId: string;
|
|
727
|
-
/**
|
|
728
|
-
* Usermessage
|
|
729
|
-
* @description The user message
|
|
730
|
-
*/
|
|
731
|
-
userMessage: string;
|
|
732
|
-
/**
|
|
733
|
-
* Openingmessage
|
|
734
|
-
* @description The opening message of the conversation
|
|
625
|
+
* Type
|
|
626
|
+
* @default START_CONVERSATION
|
|
627
|
+
* @constant
|
|
735
628
|
*/
|
|
736
|
-
|
|
629
|
+
type: 'START_CONVERSATION';
|
|
630
|
+
/** @description Context information we'll be getting with the request */
|
|
631
|
+
conversationContext: components['schemas']['ConversationContext'];
|
|
737
632
|
};
|
|
738
633
|
/**
|
|
739
|
-
*
|
|
740
|
-
* @description A message from
|
|
634
|
+
* UserTextMessage
|
|
635
|
+
* @description A standard, text-based message from an end-user
|
|
741
636
|
*/
|
|
742
|
-
|
|
743
|
-
/**
|
|
744
|
-
* Conversationid
|
|
745
|
-
* @description The conversation id
|
|
746
|
-
*/
|
|
747
|
-
conversationId?: string | null;
|
|
748
|
-
/**
|
|
749
|
-
* Customerid
|
|
750
|
-
* @description The customer id
|
|
751
|
-
*/
|
|
752
|
-
customerId: string;
|
|
753
|
-
/**
|
|
754
|
-
* Userid
|
|
755
|
-
* @description Id to identify the user, this should be unified across the entire product.
|
|
756
|
-
*/
|
|
757
|
-
userId?: string | null;
|
|
758
|
-
/**
|
|
759
|
-
* Sessionid
|
|
760
|
-
* Format: uuid
|
|
761
|
-
* @description Id to identify the session that the conversation is in, this should be unified across the product
|
|
762
|
-
*/
|
|
763
|
-
sessionId: string;
|
|
637
|
+
UserTextMessage: {
|
|
764
638
|
/**
|
|
765
|
-
*
|
|
766
|
-
* @
|
|
767
|
-
|
|
768
|
-
userMessage?: string | null;
|
|
769
|
-
/**
|
|
770
|
-
* Option
|
|
771
|
-
* @description Which select options were picked?
|
|
639
|
+
* Type
|
|
640
|
+
* @default MESSAGE
|
|
641
|
+
* @constant
|
|
772
642
|
*/
|
|
773
|
-
|
|
774
|
-
};
|
|
775
|
-
/**
|
|
776
|
-
* SingleSelectRequest
|
|
777
|
-
* @description A message from the end user that picks a single select item
|
|
778
|
-
*/
|
|
779
|
-
app__conversation__models__v2__input__SingleSelectRequest: {
|
|
643
|
+
type: 'MESSAGE';
|
|
780
644
|
/**
|
|
781
645
|
* Conversationid
|
|
782
646
|
* @description The conversation id
|
|
783
647
|
*/
|
|
784
648
|
conversationId?: string | null;
|
|
785
|
-
/**
|
|
786
|
-
* Customerid
|
|
787
|
-
* @description The customer id
|
|
788
|
-
*/
|
|
789
|
-
customerId: string;
|
|
790
|
-
/**
|
|
791
|
-
* Userid
|
|
792
|
-
* @description Id to identify the user, this should be unified across the entire product.
|
|
793
|
-
*/
|
|
794
|
-
userId?: string | null;
|
|
795
|
-
/**
|
|
796
|
-
* Sessionid
|
|
797
|
-
* Format: uuid
|
|
798
|
-
* @description Id to identify the session that the conversation is in, this should be unified across the product
|
|
799
|
-
*/
|
|
800
|
-
sessionId: string;
|
|
801
649
|
/**
|
|
802
650
|
* Usermessage
|
|
803
651
|
* @description The user message
|
|
804
652
|
*/
|
|
805
|
-
userMessage
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
653
|
+
userMessage: string;
|
|
654
|
+
};
|
|
655
|
+
/** ValidationError */
|
|
656
|
+
ValidationError: {
|
|
657
|
+
/** Location */
|
|
658
|
+
loc: (string | number)[];
|
|
659
|
+
/** Message */
|
|
660
|
+
msg: string;
|
|
661
|
+
/** Error Type */
|
|
662
|
+
type: string;
|
|
811
663
|
};
|
|
812
664
|
/** Data */
|
|
813
|
-
|
|
665
|
+
platform_py_contracts__models__debug_record_v1__EmbeddingTokenCountRecord__Data: {
|
|
814
666
|
/** Token Count */
|
|
815
667
|
token_count: number;
|
|
816
668
|
/** Model */
|
|
@@ -819,7 +671,7 @@ interface components {
|
|
|
819
671
|
embedded_text: string;
|
|
820
672
|
};
|
|
821
673
|
/** Data */
|
|
822
|
-
|
|
674
|
+
platform_py_contracts__models__debug_record_v1__LLMTokenCountRecord__Data: {
|
|
823
675
|
/** Input Token Count */
|
|
824
676
|
input_token_count: number;
|
|
825
677
|
/** Output Token Count */
|
|
@@ -832,7 +684,7 @@ interface components {
|
|
|
832
684
|
model: string;
|
|
833
685
|
};
|
|
834
686
|
/** Data */
|
|
835
|
-
|
|
687
|
+
platform_py_contracts__models__debug_record_v1__RunActionDetailsRecord__Data: {
|
|
836
688
|
/** Action Type */
|
|
837
689
|
action_type: string;
|
|
838
690
|
/** Branch Type */
|
|
@@ -846,78 +698,6 @@ interface components {
|
|
|
846
698
|
pathItems: never;
|
|
847
699
|
}
|
|
848
700
|
interface operations {
|
|
849
|
-
generate_conversation_json_response_api_conversation_v2_post: {
|
|
850
|
-
parameters: {
|
|
851
|
-
query?: never;
|
|
852
|
-
header?: {
|
|
853
|
-
'user-agent'?: string;
|
|
854
|
-
/**
|
|
855
|
-
* @description Comma-separated list of feature flags (flags might require elevated permissions)
|
|
856
|
-
* @example debug,no-decision-forest,use-sales-framework
|
|
857
|
-
*/
|
|
858
|
-
'x-feature-flags'?: string | null;
|
|
859
|
-
/**
|
|
860
|
-
* @description The version of the SDK version that is being used
|
|
861
|
-
* @example 1.0.0
|
|
862
|
-
*/
|
|
863
|
-
'x-sdk-version'?: string | null;
|
|
864
|
-
};
|
|
865
|
-
path?: never;
|
|
866
|
-
cookie?: never;
|
|
867
|
-
};
|
|
868
|
-
requestBody: {
|
|
869
|
-
content: {
|
|
870
|
-
'application/json': components['schemas']['app__conversation__models__v2__input__ConversationRequest'];
|
|
871
|
-
};
|
|
872
|
-
};
|
|
873
|
-
responses: {
|
|
874
|
-
/** @description A successful response from the conversation service */
|
|
875
|
-
200: {
|
|
876
|
-
headers: {
|
|
877
|
-
[name: string]: unknown;
|
|
878
|
-
};
|
|
879
|
-
content: {
|
|
880
|
-
'application/json': (components['schemas']['MessageChunk'] | components['schemas']['DebugChunk'] | components['schemas']['SingleSelectChunk'] | components['schemas']['MultiSelectChunk'] | components['schemas']['ExitToChatChunk'] | components['schemas']['RecommendationChunk'] | components['schemas']['ConversationIdChunk'] | components['schemas']['ExitToPurchaseChunk'])[];
|
|
881
|
-
};
|
|
882
|
-
};
|
|
883
|
-
/** @description The user is not authorized to access the requested data */
|
|
884
|
-
401: {
|
|
885
|
-
headers: {
|
|
886
|
-
[name: string]: unknown;
|
|
887
|
-
};
|
|
888
|
-
content: {
|
|
889
|
-
'application/json': unknown;
|
|
890
|
-
};
|
|
891
|
-
};
|
|
892
|
-
/** @description The user does not have permission to access the requested data */
|
|
893
|
-
403: {
|
|
894
|
-
headers: {
|
|
895
|
-
[name: string]: unknown;
|
|
896
|
-
};
|
|
897
|
-
content: {
|
|
898
|
-
'application/json': unknown;
|
|
899
|
-
};
|
|
900
|
-
};
|
|
901
|
-
/** @description The customer config was not found */
|
|
902
|
-
404: {
|
|
903
|
-
headers: {
|
|
904
|
-
[name: string]: unknown;
|
|
905
|
-
};
|
|
906
|
-
content: {
|
|
907
|
-
'application/json': unknown;
|
|
908
|
-
};
|
|
909
|
-
};
|
|
910
|
-
/** @description Validation Error */
|
|
911
|
-
422: {
|
|
912
|
-
headers: {
|
|
913
|
-
[name: string]: unknown;
|
|
914
|
-
};
|
|
915
|
-
content: {
|
|
916
|
-
'application/json': components['schemas']['HTTPValidationError'];
|
|
917
|
-
};
|
|
918
|
-
};
|
|
919
|
-
};
|
|
920
|
-
};
|
|
921
701
|
generate_conversation_json_response_with_jwt_api_conversation_v3_post: {
|
|
922
702
|
parameters: {
|
|
923
703
|
query?: never;
|
|
@@ -925,7 +705,7 @@ interface operations {
|
|
|
925
705
|
'user-agent'?: string;
|
|
926
706
|
/**
|
|
927
707
|
* @description Comma-separated list of feature flags (flags might require elevated permissions)
|
|
928
|
-
* @example debug,
|
|
708
|
+
* @example debug,use-output-guardrails,recommend-mock-bundle
|
|
929
709
|
*/
|
|
930
710
|
'x-feature-flags'?: string | null;
|
|
931
711
|
/**
|
|
@@ -939,7 +719,7 @@ interface operations {
|
|
|
939
719
|
};
|
|
940
720
|
requestBody: {
|
|
941
721
|
content: {
|
|
942
|
-
'application/json': components['schemas']['
|
|
722
|
+
'application/json': components['schemas']['UserTextMessage'] | components['schemas']['UserSingleSelectMessage'] | components['schemas']['UserMultiSelectMessage'] | components['schemas']['UserStartConversationMessage'];
|
|
943
723
|
};
|
|
944
724
|
};
|
|
945
725
|
responses: {
|
|
@@ -949,7 +729,7 @@ interface operations {
|
|
|
949
729
|
[name: string]: unknown;
|
|
950
730
|
};
|
|
951
731
|
content: {
|
|
952
|
-
'application/json': (components['schemas']['
|
|
732
|
+
'application/json': (components['schemas']['AssistantTextMessage'] | components['schemas']['AssistantSingleSelectMessage'] | components['schemas']['AssistantMultiSelectMessage'] | components['schemas']['AssistantExitToChatMessage'] | components['schemas']['AssistantRecommendationMessage'] | components['schemas']['AssistantConversationIdMessage'] | components['schemas']['AssistantExitToPurchaseMessage'] | components['schemas']['AssistantDebugMessage'])[];
|
|
953
733
|
};
|
|
954
734
|
};
|
|
955
735
|
/** @description The user is not authorized to access the requested data */
|
|
@@ -981,69 +761,6 @@ interface operations {
|
|
|
981
761
|
};
|
|
982
762
|
/** @description Validation Error */
|
|
983
763
|
422: {
|
|
984
|
-
headers: {
|
|
985
|
-
[name: string]: unknown;
|
|
986
|
-
};
|
|
987
|
-
content: {
|
|
988
|
-
'application/json': components['schemas']['HTTPValidationError'];
|
|
989
|
-
};
|
|
990
|
-
};
|
|
991
|
-
};
|
|
992
|
-
};
|
|
993
|
-
generate_conversation_streaming_response_api_v1_conversation__post: {
|
|
994
|
-
parameters: {
|
|
995
|
-
query?: never;
|
|
996
|
-
header?: {
|
|
997
|
-
'user-agent'?: string;
|
|
998
|
-
/**
|
|
999
|
-
* @description Comma-separated list of feature flags (flags might require elevated permissions)
|
|
1000
|
-
* @example debug,no-decision-forest,use-sales-framework
|
|
1001
|
-
*/
|
|
1002
|
-
'x-feature-flags'?: string | null;
|
|
1003
|
-
/**
|
|
1004
|
-
* @description The version of the SDK version that is being used
|
|
1005
|
-
* @example 1.0.0
|
|
1006
|
-
*/
|
|
1007
|
-
'x-sdk-version'?: string | null;
|
|
1008
|
-
};
|
|
1009
|
-
path?: never;
|
|
1010
|
-
cookie?: never;
|
|
1011
|
-
};
|
|
1012
|
-
requestBody: {
|
|
1013
|
-
content: {
|
|
1014
|
-
'application/json': components['schemas']['app__conversation__models__v1__input__ConversationRequest'];
|
|
1015
|
-
};
|
|
1016
|
-
};
|
|
1017
|
-
responses: {
|
|
1018
|
-
/** @description A successful response from the conversation service */
|
|
1019
|
-
200: {
|
|
1020
|
-
headers: {
|
|
1021
|
-
[name: string]: unknown;
|
|
1022
|
-
};
|
|
1023
|
-
content: {
|
|
1024
|
-
'text/event-stream': string;
|
|
1025
|
-
};
|
|
1026
|
-
};
|
|
1027
|
-
/** @description The user is not authorized to access the requested data */
|
|
1028
|
-
401: {
|
|
1029
|
-
headers: {
|
|
1030
|
-
[name: string]: unknown;
|
|
1031
|
-
};
|
|
1032
|
-
content: {
|
|
1033
|
-
'application/json': unknown;
|
|
1034
|
-
};
|
|
1035
|
-
};
|
|
1036
|
-
/** @description The user does not have permission to access the requested data */
|
|
1037
|
-
403: {
|
|
1038
|
-
headers: {
|
|
1039
|
-
[name: string]: unknown;
|
|
1040
|
-
};
|
|
1041
|
-
content: {
|
|
1042
|
-
'application/json': unknown;
|
|
1043
|
-
};
|
|
1044
|
-
};
|
|
1045
|
-
/** @description The customer config was not found */
|
|
1046
|
-
404: {
|
|
1047
764
|
headers: {
|
|
1048
765
|
[name: string]: unknown;
|
|
1049
766
|
};
|
|
@@ -1051,15 +768,6 @@ interface operations {
|
|
|
1051
768
|
'application/json': unknown;
|
|
1052
769
|
};
|
|
1053
770
|
};
|
|
1054
|
-
/** @description Validation Error */
|
|
1055
|
-
422: {
|
|
1056
|
-
headers: {
|
|
1057
|
-
[name: string]: unknown;
|
|
1058
|
-
};
|
|
1059
|
-
content: {
|
|
1060
|
-
'application/json': components['schemas']['HTTPValidationError'];
|
|
1061
|
-
};
|
|
1062
|
-
};
|
|
1063
771
|
};
|
|
1064
772
|
};
|
|
1065
773
|
}
|
|
@@ -1327,7 +1035,7 @@ interface paths {
|
|
|
1327
1035
|
message_select_options?: unknown[];
|
|
1328
1036
|
/** @description true or false depending on whether the users message caused the assistant to provide a guardrail response */
|
|
1329
1037
|
is_user_message_guardrailed?: boolean;
|
|
1330
|
-
/** @description A list of products sent in a
|
|
1038
|
+
/** @description A list of products sent in a recommendation message */
|
|
1331
1039
|
recommendation_products?: unknown[];
|
|
1332
1040
|
/** @description Contains the fallback text provided by the conversation api to a frontend that non 'text' (single_select/multi_select etc) messages could revert to if they needed to. Described in the conversation api docs as: \"What should a client render if they do not have a native renderer for this message type?\". */
|
|
1333
1041
|
fallback_text?: string;
|
|
@@ -1350,6 +1058,15 @@ interface paths {
|
|
|
1350
1058
|
eventName: 'entry_point-shown' | 'feedback_submit-clicked' | 'page-shown' | 'tool_ui-closed' | 'user_message-submitted' | 'user_message-submitted message' | 'user_message-submitted single_select' | 'user_message-submitted multi_select' | 'assistant_message-submitted' | 'assistant_message-submitted recommendation' | 'assistant_message-submitted message' | 'assistant_message-submitted single_select' | 'assistant_message-submitted multi_select' | 'assistant_message-submitted exit_to_chat' | 'assistant_message-submitted exit_to_purchase' | 'feedback-shown' | 'feedback_skip-clicked' | 'sale-completed' | 'entry_point-clicked' | 'tool_close-clicked' | 'exit_to_purchase-completed' | 'exit_to_chat-completed';
|
|
1351
1059
|
/** @description Pageview ID */
|
|
1352
1060
|
pageviewId?: string;
|
|
1061
|
+
/** @description Screen Width */
|
|
1062
|
+
screenWidth?: number;
|
|
1063
|
+
/** @description Screen Height */
|
|
1064
|
+
screenHeight?: number;
|
|
1065
|
+
/**
|
|
1066
|
+
* @description Screen Size
|
|
1067
|
+
* @enum {string}
|
|
1068
|
+
*/
|
|
1069
|
+
screenSize?: 'mobile' | 'large';
|
|
1353
1070
|
/** @description URL */
|
|
1354
1071
|
url?: string;
|
|
1355
1072
|
/** @description User Agent */
|
|
@@ -1386,14 +1103,14 @@ interface paths {
|
|
|
1386
1103
|
* These are the types as defined in the OpenAPI schema.
|
|
1387
1104
|
* We don't use them directly, or export them here because of how they appear in the documentation site.
|
|
1388
1105
|
*/
|
|
1389
|
-
type
|
|
1390
|
-
type
|
|
1391
|
-
type
|
|
1392
|
-
type
|
|
1393
|
-
type
|
|
1394
|
-
type
|
|
1395
|
-
type
|
|
1396
|
-
type
|
|
1106
|
+
type ApiConversationIdMessage = components['schemas']['AssistantConversationIdMessage'];
|
|
1107
|
+
type ApiDebugMessage = components['schemas']['AssistantDebugMessage'];
|
|
1108
|
+
type ApiExitToChatMessage = components['schemas']['AssistantExitToChatMessage'];
|
|
1109
|
+
type ApiExitToPurchaseMessage = components['schemas']['AssistantExitToPurchaseMessage'];
|
|
1110
|
+
type ApiMultiSelectMessage = components['schemas']['AssistantMultiSelectMessage'];
|
|
1111
|
+
type ApiRecommendationMessage = components['schemas']['AssistantRecommendationMessage'];
|
|
1112
|
+
type ApiSingleSelectMessage = components['schemas']['AssistantSingleSelectMessage'];
|
|
1113
|
+
type ApiTextMessage = components['schemas']['AssistantTextMessage'];
|
|
1397
1114
|
type ApiIdentityRequest = paths['/api/tracking/identity/v2']['post']['requestBody']['content']['application/json'];
|
|
1398
1115
|
type ApiTrackingUserRequest = paths['/api/tracking/user/v2']['post']['requestBody']['content']['application/json'];
|
|
1399
1116
|
/**
|
|
@@ -1464,9 +1181,7 @@ interface Identity {
|
|
|
1464
1181
|
* The message types that the SDK returns.
|
|
1465
1182
|
* Note that the API response may contain additional types that the SDK does not return.
|
|
1466
1183
|
*/
|
|
1467
|
-
type Message =
|
|
1468
|
-
interface BasicMessage extends ApiBasicMessage {
|
|
1469
|
-
}
|
|
1184
|
+
type Message = ConversationIdMessage | DebugMessage | ExitToChatMessage | ExitToPurchaseMessage | MultiSelectMessage | RecommendationMessage | SingleSelectMessage | TextMessage;
|
|
1470
1185
|
interface ConversationIdMessage extends ApiConversationIdMessage {
|
|
1471
1186
|
}
|
|
1472
1187
|
interface DebugMessage extends ApiDebugMessage {
|
|
@@ -1481,6 +1196,8 @@ interface RecommendationMessage extends ApiRecommendationMessage {
|
|
|
1481
1196
|
}
|
|
1482
1197
|
interface SingleSelectMessage extends ApiSingleSelectMessage {
|
|
1483
1198
|
}
|
|
1199
|
+
interface TextMessage extends ApiTextMessage {
|
|
1200
|
+
}
|
|
1484
1201
|
interface TrackingEvent extends ApiTrackingUserRequest {
|
|
1485
1202
|
}
|
|
1486
1203
|
|
|
@@ -1566,7 +1283,7 @@ declare class Client {
|
|
|
1566
1283
|
minSpeed?: number;
|
|
1567
1284
|
maxSpeed?: number;
|
|
1568
1285
|
}>;
|
|
1569
|
-
}): Promise<
|
|
1286
|
+
}): Promise<TextMessage | undefined>;
|
|
1570
1287
|
/**
|
|
1571
1288
|
* Sends a message in the conversation.
|
|
1572
1289
|
*
|
|
@@ -1645,6 +1362,9 @@ declare class Client {
|
|
|
1645
1362
|
deviceType?: "desktop" | "mobile" | "tablet";
|
|
1646
1363
|
eventName: "entry_point-shown" | "feedback_submit-clicked" | "page-shown" | "tool_ui-closed" | "user_message-submitted" | "user_message-submitted message" | "user_message-submitted single_select" | "user_message-submitted multi_select" | "assistant_message-submitted" | "assistant_message-submitted recommendation" | "assistant_message-submitted message" | "assistant_message-submitted single_select" | "assistant_message-submitted multi_select" | "assistant_message-submitted exit_to_chat" | "assistant_message-submitted exit_to_purchase" | "feedback-shown" | "feedback_skip-clicked" | "sale-completed" | "entry_point-clicked" | "tool_close-clicked" | "exit_to_purchase-completed" | "exit_to_chat-completed";
|
|
1647
1364
|
pageviewId?: string;
|
|
1365
|
+
screenWidth?: number;
|
|
1366
|
+
screenHeight?: number;
|
|
1367
|
+
screenSize?: "mobile" | "large";
|
|
1648
1368
|
url?: string;
|
|
1649
1369
|
userAgent?: string;
|
|
1650
1370
|
};
|
|
@@ -1811,4 +1531,4 @@ declare const setUserId: (userId: string) => void;
|
|
|
1811
1531
|
*/
|
|
1812
1532
|
declare const authMiddleware: (accessToken: string) => Middleware;
|
|
1813
1533
|
|
|
1814
|
-
export {
|
|
1534
|
+
export { CONVERSATION_ID, Client, type Config, type ConversationIdMessage, type DebugMessage, type Endpoint, type ExitToChatMessage, type ExitToPurchaseMessage, type Identity, type Message, type MultiSelectMessage, type RecommendationMessage, SESSION_ID, type SingleSelectMessage, TTL, type TextMessage, type TrackingEvent, USER_ID, authMiddleware, deleteConversationId, getConversationId, getSessionId, getUserId, setConversationId, setSessionId, setUserId };
|