@15gifts/sdk 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -15,7 +15,10 @@ interface paths$1 {
15
15
  };
16
16
  get?: never;
17
17
  put?: never;
18
- /** Generate Conversation Json Response */
18
+ /**
19
+ * Generate Conversation Json Response
20
+ * @deprecated
21
+ */
19
22
  post: operations['generate_conversation_json_response_api_conversation_v2_post'];
20
23
  delete?: never;
21
24
  options?: never;
@@ -23,6 +26,23 @@ interface paths$1 {
23
26
  patch?: never;
24
27
  trace?: never;
25
28
  };
29
+ '/api/conversation/v3': {
30
+ parameters: {
31
+ query?: never;
32
+ header?: never;
33
+ path?: never;
34
+ cookie?: never;
35
+ };
36
+ get?: never;
37
+ put?: never;
38
+ /** Generate Conversation Json Response With Jwt */
39
+ post: operations['generate_conversation_json_response_with_jwt_api_conversation_v3_post'];
40
+ delete?: never;
41
+ options?: never;
42
+ head?: never;
43
+ patch?: never;
44
+ trace?: never;
45
+ };
26
46
  '/api/v1/conversation/': {
27
47
  parameters: {
28
48
  query?: never;
@@ -97,6 +117,16 @@ interface components {
97
117
  /** Data */
98
118
  data: components['schemas']['ProductInformationChunkQueryResult'][];
99
119
  };
120
+ /** ConversationContext */
121
+ ConversationContext: {
122
+ /**
123
+ * Availableproductids
124
+ * @description What product IDs are available to recommend?
125
+ */
126
+ availableProductIds?: string[] | null;
127
+ } & {
128
+ [key: string]: unknown;
129
+ };
100
130
  /**
101
131
  * ConversationHistoryRequest
102
132
  * @description A request to retrieve the conversation history
@@ -113,87 +143,30 @@ interface components {
113
143
  */
114
144
  end_date: string | null;
115
145
  };
116
- /** ConversationRequest */
117
- ConversationRequest: {
118
- /**
119
- * Customerid
120
- * @description The customer id
121
- */
122
- customerId: string;
123
- /**
124
- * Conversationid
125
- * @description The conversation id
126
- */
127
- conversationId?: string | null;
128
- /**
129
- * Usermessage
130
- * @description The user message
131
- */
132
- userMessage: string;
133
- /**
134
- * Openingmessage
135
- * @description The opening message of the conversation
136
- */
137
- openingMessage?: string | null;
138
- /**
139
- * Userid
140
- * @description Id to identify the user, this should be unified across the entire product.
141
- */
142
- userId?: string | null;
143
- /**
144
- * Sessionid
145
- * Format: uuid
146
- * @description Id to identify the session that the conversation is in, this should be unified across the product
147
- */
148
- sessionId: string;
149
- };
150
146
  /**
151
- * ConversationResponseDebugChunk
152
- * @description Model for the debug chunk returned in the streaming response by the conversation endpoint.
147
+ * ConversationIdChunk
148
+ * @description We're giving the caller a new Conversation ID
153
149
  */
154
- ConversationResponseDebugChunk: {
150
+ ConversationIdChunk: {
155
151
  /**
156
152
  * Type
157
- * @default DEBUG
153
+ * @default CONVERSATION_ID
158
154
  * @constant
159
155
  * @enum {string}
160
156
  */
161
- type: 'DEBUG';
157
+ type: 'CONVERSATION_ID';
162
158
  /**
163
159
  * Conversationid
164
- * Format: uuid
165
- * @description Unique identifier for the conversation. If an id is given in the request, the same id is returned in the response.
160
+ * @description Unique identifier for the conversation. This will be generated once, at the start of a conversation.
166
161
  */
167
- conversationId: string;
168
- /**
169
- * Records
170
- * @description List of debug records.
171
- */
172
- 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'])[];
162
+ conversationId: string | null;
173
163
  };
174
- /**
175
- * ConversationResponseMessageChunk
176
- * @description Model for the message chunk returned in the streaming response by the conversation endpoint.
177
- */
178
- ConversationResponseMessageChunk: {
179
- /**
180
- * Type
181
- * @default MESSAGE
182
- * @constant
183
- * @enum {string}
184
- */
185
- type: 'MESSAGE';
186
- /**
187
- * Conversationid
188
- * Format: uuid
189
- * @description Unique identifier for the conversation. If an id is given in the request, the same id is returned in the response.
190
- */
191
- conversationId: string;
192
- /**
193
- * Message
194
- * @description Message for the conversation.
195
- */
196
- message: string;
164
+ /** ConversationOption */
165
+ ConversationOption: {
166
+ /** Label */
167
+ label: string;
168
+ /** Value */
169
+ value: string;
197
170
  };
198
171
  /** ConversationTurnIDRecord */
199
172
  ConversationTurnIDRecord: {
@@ -235,6 +208,24 @@ interface components {
235
208
  */
236
209
  db_version: string;
237
210
  };
211
+ /**
212
+ * DebugChunk
213
+ * @description Model for the debug chunk returned in the streaming response by the conversation endpoint.
214
+ */
215
+ DebugChunk: {
216
+ /**
217
+ * Type
218
+ * @default DEBUG
219
+ * @constant
220
+ * @enum {string}
221
+ */
222
+ type: 'DEBUG';
223
+ /**
224
+ * Records
225
+ * @description List of debug records.
226
+ */
227
+ 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'])[];
228
+ };
238
229
  /** EmbeddingTokenCountRecord */
239
230
  EmbeddingTokenCountRecord: {
240
231
  /**
@@ -251,6 +242,56 @@ interface components {
251
242
  timestamp?: string;
252
243
  data: components['schemas']['app__debug_stash__types__EmbeddingTokenCountRecord__Data'];
253
244
  };
245
+ /**
246
+ * ExitToChatChunk
247
+ * @description The conversation has reached a point where we heed to pass it to human involvement
248
+ */
249
+ ExitToChatChunk: {
250
+ /**
251
+ * Type
252
+ * @default EXIT_TO_CHAT
253
+ * @constant
254
+ * @enum {string}
255
+ */
256
+ type: 'EXIT_TO_CHAT';
257
+ /**
258
+ * Fallbackmessage
259
+ * @description What should a client render if they do not have a native renderer for this message type?
260
+ */
261
+ fallbackMessage: string;
262
+ /**
263
+ * Conversationsummary
264
+ * @description A summary of the conversation so far
265
+ */
266
+ conversationSummary: string;
267
+ /** @description Why have we been exited to chat? */
268
+ reason: components['schemas']['ExitToChatReason'];
269
+ };
270
+ /**
271
+ * ExitToChatReason
272
+ * @enum {string}
273
+ */
274
+ ExitToChatReason: 'WANT_TO_TALK_TO_HUMAN' | 'OUT_OF_SCOPE_QUESTIONS' | 'NOT_BEHAVING_CORRECTLY';
275
+ /**
276
+ * ExitToPurchaseChunk
277
+ * @description The customer wants to buy something
278
+ */
279
+ ExitToPurchaseChunk: {
280
+ /**
281
+ * Type
282
+ * @default EXIT_TO_PURCHASE
283
+ * @constant
284
+ * @enum {string}
285
+ */
286
+ type: 'EXIT_TO_PURCHASE';
287
+ /**
288
+ * Fallbackmessage
289
+ * @description What should a client render if they do not have a native renderer for this message type?
290
+ */
291
+ fallbackMessage: string;
292
+ /** Products */
293
+ products: components['schemas']['Product'][];
294
+ };
254
295
  /** HTTPValidationError */
255
296
  HTTPValidationError: {
256
297
  /** Detail */
@@ -297,6 +338,52 @@ interface components {
297
338
  [key: string]: number;
298
339
  };
299
340
  };
341
+ /**
342
+ * MessageChunk
343
+ * @description A text-based item for clients to render
344
+ */
345
+ MessageChunk: {
346
+ /**
347
+ * Type
348
+ * @default MESSAGE
349
+ * @constant
350
+ * @enum {string}
351
+ */
352
+ type: 'MESSAGE';
353
+ /**
354
+ * Message
355
+ * @description Message for the conversation.
356
+ */
357
+ message: string;
358
+ };
359
+ /**
360
+ * MultiSelectChunk
361
+ * @description A multi-select renderer - given a list of options, pick one or more
362
+ */
363
+ MultiSelectChunk: {
364
+ /**
365
+ * Type
366
+ * @default MULTI_SELECT
367
+ * @constant
368
+ * @enum {string}
369
+ */
370
+ type: 'MULTI_SELECT';
371
+ /**
372
+ * Fallbackmessage
373
+ * @description What should a client render if they do not have a native renderer for this message type?
374
+ */
375
+ fallbackMessage: string;
376
+ /**
377
+ * Options
378
+ * @description What selectable options should be available?
379
+ */
380
+ options: components['schemas']['ConversationOption'][];
381
+ /**
382
+ * Allowfreetext
383
+ * @description Should we expect a free text response to this message?
384
+ */
385
+ allowFreeText: boolean;
386
+ };
300
387
  /** PhraseTokenProbabilitiesRecord */
301
388
  PhraseTokenProbabilitiesRecord: {
302
389
  /**
@@ -314,6 +401,23 @@ interface components {
314
401
  /** Phrase Token Probabilities */
315
402
  phrase_token_probabilities: components['schemas']['RootModel_list_TokenProbabilityRecord__'][];
316
403
  };
404
+ /** Product */
405
+ Product: {
406
+ /** Id */
407
+ id: string;
408
+ /** Name */
409
+ name: string;
410
+ /**
411
+ * Descriptiveprice
412
+ * @description A user-readable form of the price of this item.
413
+ */
414
+ descriptivePrice: string;
415
+ /**
416
+ * Url
417
+ * @description Where can we find this product?
418
+ */
419
+ url: string;
420
+ };
317
421
  /** ProductInformationChunkMetadata */
318
422
  ProductInformationChunkMetadata: {
319
423
  /** Model */
@@ -332,6 +436,39 @@ interface components {
332
436
  /** Similarity Score */
333
437
  similarity_score: number;
334
438
  };
439
+ /** Recommendation */
440
+ Recommendation: {
441
+ /**
442
+ * Explanation
443
+ * @description Why was this recommendation made?
444
+ */
445
+ explanation: string;
446
+ /**
447
+ * Products
448
+ * @description The IDs of the products that make up this recommendation
449
+ */
450
+ products: components['schemas']['Product'][];
451
+ };
452
+ /**
453
+ * RecommendationChunk
454
+ * @description The conversation has reached a point where we can make one or more recommendations
455
+ */
456
+ RecommendationChunk: {
457
+ /**
458
+ * Type
459
+ * @default RECOMMENDATION
460
+ * @constant
461
+ * @enum {string}
462
+ */
463
+ type: 'RECOMMENDATION';
464
+ /**
465
+ * Fallbackmessage
466
+ * @description What should a client render if they do not have a native renderer for this message type?
467
+ */
468
+ fallbackMessage: string;
469
+ /** Recommendations */
470
+ recommendations: components['schemas']['Recommendation'][];
471
+ };
335
472
  /** RootModel[list[TokenProbabilityRecord]] */
336
473
  RootModel_list_TokenProbabilityRecord__: components['schemas']['TokenProbabilityRecord'][];
337
474
  /** RunActionDetailsRecord */
@@ -350,6 +487,49 @@ interface components {
350
487
  timestamp?: string;
351
488
  data: components['schemas']['app__debug_stash__types__RunActionDetailsRecord__Data'];
352
489
  };
490
+ /**
491
+ * SingleSelectChunk
492
+ * @description A single-select renderer - given a list of options, pick one
493
+ */
494
+ SingleSelectChunk: {
495
+ /**
496
+ * Type
497
+ * @default SINGLE_SELECT
498
+ * @constant
499
+ * @enum {string}
500
+ */
501
+ type: 'SINGLE_SELECT';
502
+ /**
503
+ * Fallbackmessage
504
+ * @description What should a client render if they do not have a native renderer for this message type?
505
+ */
506
+ fallbackMessage: string;
507
+ /**
508
+ * Options
509
+ * @description What selectable options should be available?
510
+ */
511
+ options: components['schemas']['ConversationOption'][];
512
+ /**
513
+ * Allowfreetext
514
+ * @description Should we expect a free text response to this message?
515
+ */
516
+ allowFreeText: boolean;
517
+ };
518
+ /**
519
+ * StartConversationRequest
520
+ * @description We are starting a new conversation, please give us a conversation ID back
521
+ */
522
+ StartConversationRequest: {
523
+ /**
524
+ * Type
525
+ * @default START_CONVERSATION
526
+ * @constant
527
+ * @enum {string}
528
+ */
529
+ type: 'START_CONVERSATION';
530
+ /** @description Context information we'll be getting with the request */
531
+ conversationContext: components['schemas']['ConversationContext'];
532
+ };
353
533
  /** SystemPromptRecord */
354
534
  SystemPromptRecord: {
355
535
  /**
@@ -402,6 +582,232 @@ interface components {
402
582
  /** Error Type */
403
583
  type: string;
404
584
  };
585
+ /**
586
+ * MessageRequest
587
+ * @description A standard, text-based message from an end-user
588
+ */
589
+ app__conversation__models__input__MessageRequest: {
590
+ /**
591
+ * Type
592
+ * @default MESSAGE
593
+ * @constant
594
+ * @enum {string}
595
+ */
596
+ type: 'MESSAGE';
597
+ /**
598
+ * Conversationid
599
+ * @description The conversation id
600
+ */
601
+ conversationId?: string | null;
602
+ /**
603
+ * Usermessage
604
+ * @description The user message
605
+ */
606
+ userMessage: string;
607
+ };
608
+ /**
609
+ * MultiSelectRequest
610
+ * @description A message from the end user that picks multiple select items
611
+ */
612
+ app__conversation__models__input__MultiSelectRequest: {
613
+ /**
614
+ * Type
615
+ * @default MULTI_SELECT
616
+ * @constant
617
+ * @enum {string}
618
+ */
619
+ type: 'MULTI_SELECT';
620
+ /**
621
+ * Conversationid
622
+ * @description The conversation id
623
+ */
624
+ conversationId?: string | null;
625
+ /**
626
+ * Usermessage
627
+ * @description The user message
628
+ */
629
+ userMessage?: string | null;
630
+ /**
631
+ * Options
632
+ * @description Which select options were picked?
633
+ */
634
+ options: string[];
635
+ };
636
+ /**
637
+ * SingleSelectRequest
638
+ * @description A message from the end user that picks a single select item
639
+ */
640
+ app__conversation__models__input__SingleSelectRequest: {
641
+ /**
642
+ * Type
643
+ * @default SINGLE_SELECT
644
+ * @constant
645
+ * @enum {string}
646
+ */
647
+ type: 'SINGLE_SELECT';
648
+ /**
649
+ * Conversationid
650
+ * @description The conversation id
651
+ */
652
+ conversationId?: string | null;
653
+ /**
654
+ * Usermessage
655
+ * @description The user message
656
+ */
657
+ userMessage?: string | null;
658
+ /**
659
+ * Option
660
+ * @description Which select option was picked?
661
+ */
662
+ option: string;
663
+ };
664
+ /** ConversationRequest */
665
+ app__conversation__models__v1__input__ConversationRequest: {
666
+ /**
667
+ * Conversationid
668
+ * @description The conversation id
669
+ */
670
+ conversationId?: string | null;
671
+ /**
672
+ * Usermessage
673
+ * @description The user message
674
+ */
675
+ userMessage: string;
676
+ /**
677
+ * Openingmessage
678
+ * @description The opening message of the conversation
679
+ */
680
+ openingMessage?: string | null;
681
+ /**
682
+ * Customerid
683
+ * @description The customer id
684
+ */
685
+ customerId: string;
686
+ /**
687
+ * Userid
688
+ * @description Id to identify the user, this should be unified across the entire product.
689
+ */
690
+ userId?: string | null;
691
+ /**
692
+ * Sessionid
693
+ * Format: uuid
694
+ * @description Id to identify the session that the conversation is in, this should be unified across the product
695
+ */
696
+ sessionId: string;
697
+ };
698
+ /** ConversationRequest */
699
+ 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'];
700
+ /**
701
+ * MessageRequest
702
+ * @description A standard, text-based message from an end-user
703
+ */
704
+ app__conversation__models__v2__input__MessageRequest: {
705
+ /**
706
+ * Conversationid
707
+ * @description The conversation id
708
+ */
709
+ conversationId?: string | null;
710
+ /**
711
+ * Customerid
712
+ * @description The customer id
713
+ */
714
+ customerId: string;
715
+ /**
716
+ * Userid
717
+ * @description Id to identify the user, this should be unified across the entire product.
718
+ */
719
+ userId?: string | null;
720
+ /**
721
+ * Sessionid
722
+ * Format: uuid
723
+ * @description Id to identify the session that the conversation is in, this should be unified across the product
724
+ */
725
+ sessionId: string;
726
+ /**
727
+ * Usermessage
728
+ * @description The user message
729
+ */
730
+ userMessage: string;
731
+ /**
732
+ * Openingmessage
733
+ * @description The opening message of the conversation
734
+ */
735
+ openingMessage?: string | null;
736
+ };
737
+ /**
738
+ * MultiSelectRequest
739
+ * @description A message from the end user that picks multiple select items
740
+ */
741
+ app__conversation__models__v2__input__MultiSelectRequest: {
742
+ /**
743
+ * Conversationid
744
+ * @description The conversation id
745
+ */
746
+ conversationId?: string | null;
747
+ /**
748
+ * Customerid
749
+ * @description The customer id
750
+ */
751
+ customerId: string;
752
+ /**
753
+ * Userid
754
+ * @description Id to identify the user, this should be unified across the entire product.
755
+ */
756
+ userId?: string | null;
757
+ /**
758
+ * Sessionid
759
+ * Format: uuid
760
+ * @description Id to identify the session that the conversation is in, this should be unified across the product
761
+ */
762
+ sessionId: string;
763
+ /**
764
+ * Usermessage
765
+ * @description The user message
766
+ */
767
+ userMessage?: string | null;
768
+ /**
769
+ * Option
770
+ * @description Which select options were picked?
771
+ */
772
+ option: string[];
773
+ };
774
+ /**
775
+ * SingleSelectRequest
776
+ * @description A message from the end user that picks a single select item
777
+ */
778
+ app__conversation__models__v2__input__SingleSelectRequest: {
779
+ /**
780
+ * Conversationid
781
+ * @description The conversation id
782
+ */
783
+ conversationId?: string | null;
784
+ /**
785
+ * Customerid
786
+ * @description The customer id
787
+ */
788
+ customerId: string;
789
+ /**
790
+ * Userid
791
+ * @description Id to identify the user, this should be unified across the entire product.
792
+ */
793
+ userId?: string | null;
794
+ /**
795
+ * Sessionid
796
+ * Format: uuid
797
+ * @description Id to identify the session that the conversation is in, this should be unified across the product
798
+ */
799
+ sessionId: string;
800
+ /**
801
+ * Usermessage
802
+ * @description The user message
803
+ */
804
+ userMessage?: string | null;
805
+ /**
806
+ * Option
807
+ * @description Which select option was picked?
808
+ */
809
+ option: string;
810
+ };
405
811
  /** Data */
406
812
  app__debug_stash__types__EmbeddingTokenCountRecord__Data: {
407
813
  /** Token Count */
@@ -450,7 +856,79 @@ interface operations {
450
856
  */
451
857
  'x-feature-flags'?: string | null;
452
858
  /**
453
- * @description the version of the sdk version that is being used
859
+ * @description The version of the SDK version that is being used
860
+ * @example 1.0.0
861
+ */
862
+ 'x-sdk-version'?: string | null;
863
+ };
864
+ path?: never;
865
+ cookie?: never;
866
+ };
867
+ requestBody: {
868
+ content: {
869
+ 'application/json': components['schemas']['app__conversation__models__v2__input__ConversationRequest'];
870
+ };
871
+ };
872
+ responses: {
873
+ /** @description A successful response from the conversation service */
874
+ 200: {
875
+ headers: {
876
+ [name: string]: unknown;
877
+ };
878
+ content: {
879
+ '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'])[];
880
+ };
881
+ };
882
+ /** @description The user is not authorized to access the requested data */
883
+ 401: {
884
+ headers: {
885
+ [name: string]: unknown;
886
+ };
887
+ content: {
888
+ 'application/json': unknown;
889
+ };
890
+ };
891
+ /** @description The user does not have permission to access the requested data */
892
+ 403: {
893
+ headers: {
894
+ [name: string]: unknown;
895
+ };
896
+ content: {
897
+ 'application/json': unknown;
898
+ };
899
+ };
900
+ /** @description The customer config was not found */
901
+ 404: {
902
+ headers: {
903
+ [name: string]: unknown;
904
+ };
905
+ content: {
906
+ 'application/json': unknown;
907
+ };
908
+ };
909
+ /** @description Validation Error */
910
+ 422: {
911
+ headers: {
912
+ [name: string]: unknown;
913
+ };
914
+ content: {
915
+ 'application/json': components['schemas']['HTTPValidationError'];
916
+ };
917
+ };
918
+ };
919
+ };
920
+ generate_conversation_json_response_with_jwt_api_conversation_v3_post: {
921
+ parameters: {
922
+ query?: never;
923
+ header?: {
924
+ 'user-agent'?: string;
925
+ /**
926
+ * @description Comma-separated list of feature flags (flags might require elevated permissions)
927
+ * @example debug,no-decision-forest
928
+ */
929
+ 'x-feature-flags'?: string | null;
930
+ /**
931
+ * @description The version of the SDK version that is being used
454
932
  * @example 1.0.0
455
933
  */
456
934
  'x-sdk-version'?: string | null;
@@ -460,7 +938,7 @@ interface operations {
460
938
  };
461
939
  requestBody: {
462
940
  content: {
463
- 'application/json': components['schemas']['ConversationRequest'];
941
+ 'application/json': components['schemas']['app__conversation__models__input__MessageRequest'] | components['schemas']['app__conversation__models__input__SingleSelectRequest'] | components['schemas']['app__conversation__models__input__MultiSelectRequest'] | components['schemas']['StartConversationRequest'];
464
942
  };
465
943
  };
466
944
  responses: {
@@ -470,7 +948,34 @@ interface operations {
470
948
  [name: string]: unknown;
471
949
  };
472
950
  content: {
473
- 'application/json': (components['schemas']['ConversationResponseMessageChunk'] | components['schemas']['ConversationResponseDebugChunk'])[];
951
+ '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'];
952
+ };
953
+ };
954
+ /** @description The user is not authorized to access the requested data */
955
+ 401: {
956
+ headers: {
957
+ [name: string]: unknown;
958
+ };
959
+ content: {
960
+ 'application/json': unknown;
961
+ };
962
+ };
963
+ /** @description The user does not have permission to access the requested data */
964
+ 403: {
965
+ headers: {
966
+ [name: string]: unknown;
967
+ };
968
+ content: {
969
+ 'application/json': unknown;
970
+ };
971
+ };
972
+ /** @description The customer config was not found */
973
+ 404: {
974
+ headers: {
975
+ [name: string]: unknown;
976
+ };
977
+ content: {
978
+ 'application/json': unknown;
474
979
  };
475
980
  };
476
981
  /** @description Validation Error */
@@ -505,7 +1010,7 @@ interface operations {
505
1010
  };
506
1011
  requestBody: {
507
1012
  content: {
508
- 'application/json': components['schemas']['ConversationRequest'];
1013
+ 'application/json': components['schemas']['app__conversation__models__v1__input__ConversationRequest'];
509
1014
  };
510
1015
  };
511
1016
  responses: {
@@ -518,6 +1023,15 @@ interface operations {
518
1023
  'text/event-stream': string;
519
1024
  };
520
1025
  };
1026
+ /** @description The user is not authorized to access the requested data */
1027
+ 401: {
1028
+ headers: {
1029
+ [name: string]: unknown;
1030
+ };
1031
+ content: {
1032
+ 'application/json': unknown;
1033
+ };
1034
+ };
521
1035
  /** @description The user does not have permission to access the requested data */
522
1036
  403: {
523
1037
  headers: {
@@ -1052,9 +1566,15 @@ interface paths {
1052
1566
  * These are the types as defined in the OpenAPI schema.
1053
1567
  * We don't use them directly, or export them here because of how they appear in the documentation site.
1054
1568
  */
1055
- type ApiConversationRequest = components['schemas']['ConversationRequest'];
1056
- type ApiDebug = components['schemas']['ConversationResponseDebugChunk'];
1057
- type ApiMessage = components['schemas']['ConversationResponseMessageChunk'];
1569
+ type ApiConversationRequest = components['schemas']['app__conversation__models__v2__input__MessageRequest'];
1570
+ type ApiConversationResponse = operations['generate_conversation_json_response_api_conversation_v2_post']['responses']['200']['content']['application/json'];
1571
+ type ApiDebug = components['schemas']['DebugChunk'];
1572
+ type ApiBasicMessage = components['schemas']['MessageChunk'];
1573
+ type ApiMultiSelectMessage = components['schemas']['MultiSelectChunk'];
1574
+ type ApiSingleSelectMessage = components['schemas']['SingleSelectChunk'];
1575
+ type ApiExitToChatMessage = components['schemas']['ExitToChatChunk'];
1576
+ type ApiExitToPurchaseMessage = components['schemas']['ExitToPurchaseChunk'];
1577
+ type ApiRecomendationMessage = components['schemas']['RecommendationChunk'];
1058
1578
  type ApiTrackingUserRequest = paths['/api/tracking/user/v2']['post']['requestBody']['content']['application/json'];
1059
1579
  /**
1060
1580
  * Configuration options for initializing the client.
@@ -1112,42 +1632,23 @@ interface Identity {
1112
1632
  */
1113
1633
  userId?: string;
1114
1634
  }
1635
+ interface DebugResponse extends ApiDebug {
1636
+ }
1115
1637
  /**
1116
- * Message within a conversation.
1638
+ * The message types that the SDK returns.
1639
+ * Note that the API response may contain additional types that the SDK does not return.
1117
1640
  */
1118
- interface Message extends ApiMessage {
1119
- /**
1120
- * The conversation ID to which the message belongs.
1121
- */
1122
- conversationId: ApiMessage['conversationId'];
1123
- /**
1124
- * The message content.
1125
- */
1126
- message: ApiMessage['message'];
1127
- /**
1128
- * The message type.
1129
- */
1130
- type: ApiMessage['type'];
1131
- }
1132
- interface DebugResponse {
1133
- /**
1134
- * The conversation ID to which the message belongs.
1135
- */
1136
- conversationId: ApiDebug['conversationId'];
1137
- /**
1138
- * The debug records.
1139
- */
1140
- records: ApiDebug['records'];
1141
- /**
1142
- * The message type.
1143
- */
1144
- type: ApiDebug['type'];
1145
- }
1641
+ type Message = ApiBasicMessage | ApiMultiSelectMessage | ApiSingleSelectMessage | ApiExitToChatMessage | ApiExitToPurchaseMessage | ApiRecomendationMessage;
1146
1642
  /**
1147
1643
  * The request to the conversation API.
1148
1644
  */
1149
1645
  interface ConversationApiRequest extends ApiConversationRequest {
1150
1646
  }
1647
+ /**
1648
+ * The response from the conversation API.
1649
+ */
1650
+ interface ConversationApiResponse extends ApiConversationResponse {
1651
+ }
1151
1652
  interface TrackingEvent extends ApiTrackingUserRequest {
1152
1653
  }
1153
1654
 
@@ -1422,4 +1923,4 @@ declare const setUserId: (userId: string) => void;
1422
1923
  */
1423
1924
  declare const authMiddleware: (accessToken: string) => Middleware;
1424
1925
 
1425
- export { CONVERSATION_ID, Client, type Config, type ConversationApiRequest, type DebugResponse, type Endpoint, type Identity, type Message, SESSION_ID, TTL, type TrackingEvent, USER_ID, authMiddleware, deleteConversationId, getConversationId, getSessionId, getUserId, setConversationId, setSessionId, setUserId };
1926
+ export { CONVERSATION_ID, Client, type Config, type ConversationApiRequest, type ConversationApiResponse, type DebugResponse, type Endpoint, type Identity, type Message, SESSION_ID, TTL, type TrackingEvent, USER_ID, authMiddleware, deleteConversationId, getConversationId, getSessionId, getUserId, setConversationId, setSessionId, setUserId };