@15gifts/sdk 0.11.7 → 0.11.9

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.ts CHANGED
@@ -15,8 +15,13 @@ interface paths$1 {
15
15
  };
16
16
  get?: never;
17
17
  put?: never;
18
- /** Generate Conversation Json Response With Jwt */
19
- post: operations["generate_conversation_json_response_with_jwt_api_conversation_v3_post"];
18
+ /**
19
+ * Generate Conversation Response
20
+ * @description Generates a response based on the users last message and the conversation id.
21
+ * The opening message should be the message that is displayed to the user when the engine is first opened, this is currently generated by the frontend,
22
+ * this message forms part of the conversation history, not that if the conversation id is not null then the opening message is ignored.
23
+ */
24
+ post: operations["generate_conversation_response_api_conversation_v3_post"];
20
25
  delete?: never;
21
26
  options?: never;
22
27
  head?: never;
@@ -26,41 +31,6 @@ interface paths$1 {
26
31
  }
27
32
  interface components {
28
33
  schemas: {
29
- /** ActionsMatchedByTriggeredBranchesRecord */
30
- ActionsMatchedByTriggeredBranchesRecord: {
31
- /**
32
- * Id
33
- * @default actions_matched_by_triggered_branches
34
- * @constant
35
- */
36
- id: "actions_matched_by_triggered_branches";
37
- /**
38
- * Timestamp
39
- * Format: date-time
40
- */
41
- timestamp?: string;
42
- /** Data */
43
- data: [
44
- string,
45
- string[]
46
- ][];
47
- };
48
- /** ApplicationVersionRecord */
49
- ApplicationVersionRecord: {
50
- /**
51
- * Id
52
- * @default application_version
53
- * @constant
54
- */
55
- id: "application_version";
56
- /**
57
- * Timestamp
58
- * Format: date-time
59
- */
60
- timestamp?: string;
61
- /** Data */
62
- data: string;
63
- };
64
34
  /**
65
35
  * AssistantConversationIdMessage
66
36
  * @description We're giving the caller a new Conversation ID
@@ -78,23 +48,6 @@ interface components {
78
48
  */
79
49
  conversationId: string | null;
80
50
  };
81
- /**
82
- * AssistantDebugMessage
83
- * @description Model for the debug chunk returned in the streaming response by the conversation endpoint.
84
- */
85
- AssistantDebugMessage: {
86
- /**
87
- * Type
88
- * @default DEBUG
89
- * @constant
90
- */
91
- type: "DEBUG";
92
- /**
93
- * Records
94
- * @description List of debug records.
95
- */
96
- 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"] | components["schemas"]["EligibilityRecord"])[];
97
- };
98
51
  /**
99
52
  * AssistantExitToChatMessage
100
53
  * @description The conversation has reached a point where we heed to pass it to human involvement
@@ -117,7 +70,36 @@ interface components {
117
70
  */
118
71
  conversationSummary: string;
119
72
  /** @description Why have we been exited to chat? */
120
- reason: components["schemas"]["ExitToChatReason"];
73
+ reason: components["schemas"]["ExitToHumanReason"];
74
+ };
75
+ /**
76
+ * AssistantExitToPhoneMessage
77
+ * @description The conversation has reached a point where the user wants to speak to a human
78
+ */
79
+ AssistantExitToPhoneMessage: {
80
+ /**
81
+ * Type
82
+ * @default EXIT_TO_PHONE
83
+ * @constant
84
+ */
85
+ type: "EXIT_TO_PHONE";
86
+ /**
87
+ * Fallbackmessage
88
+ * @description What should a client render if they do not have a native renderer for this message type?
89
+ */
90
+ fallbackMessage: string;
91
+ /** @description Why have we been exited to phone? */
92
+ reason: components["schemas"]["ExitToHumanReason"];
93
+ /**
94
+ * Linktext
95
+ * @description The text to display to the user
96
+ */
97
+ linkText: string;
98
+ /**
99
+ * Linkphone
100
+ * @description The phone number to dial
101
+ */
102
+ linkPhone: string;
121
103
  };
122
104
  /**
123
105
  * AssistantExitToPurchaseMessage
@@ -135,6 +117,8 @@ interface components {
135
117
  * @description What should a client render if they do not have a native renderer for this message type?
136
118
  */
137
119
  fallbackMessage: string;
120
+ /** Recommendationidforexit */
121
+ recommendationIdForExit?: string | null;
138
122
  /** Products */
139
123
  products: components["schemas"]["Product"][];
140
124
  /**
@@ -190,6 +174,25 @@ interface components {
190
174
  /** Recommendations */
191
175
  recommendations: components["schemas"]["Recommendation"][];
192
176
  };
177
+ /**
178
+ * AssistantRecommendationMessageV2
179
+ * @description Recommendation message with more detailed information for each product and bundle
180
+ */
181
+ AssistantRecommendationMessageV2: {
182
+ /**
183
+ * Type
184
+ * @default RECOMMENDATION_V2
185
+ * @constant
186
+ */
187
+ type: "RECOMMENDATION_V2";
188
+ /**
189
+ * Fallbackmessage
190
+ * @description What should a client render if they do not have a native renderer for this message type?
191
+ */
192
+ fallbackMessage: string;
193
+ /** Recommendations */
194
+ recommendations: components["schemas"]["RecommendationV2"][];
195
+ };
193
196
  /**
194
197
  * AssistantSingleSelectMessage
195
198
  * @description A single-select renderer - given a list of options, pick one
@@ -262,21 +265,39 @@ interface components {
262
265
  */
263
266
  products: components["schemas"]["Product"][];
264
267
  };
265
- /** ContextChunksRecord */
266
- ContextChunksRecord: {
268
+ /**
269
+ * BundleV2
270
+ * @description A bundle of products
271
+ */
272
+ BundleV2: {
267
273
  /**
268
274
  * Id
269
- * @default context_chunks
270
- * @constant
275
+ * @description The product id as defined by the customer
271
276
  */
272
- id: "context_chunks";
277
+ id: string;
278
+ /** Name */
279
+ name: string;
280
+ /**
281
+ * Description
282
+ * @description Description of the product or bundle from the feed data
283
+ */
284
+ description?: string | null;
285
+ /**
286
+ * Previousprice
287
+ * @description A fallback for headless builds that don't want to use previousPriceDetails. Should include the same info, but as a string.
288
+ */
289
+ previousPrice?: string | null;
290
+ /** @description The original price of the product or bundle, only set if it's currently discounted. */
291
+ previousPriceDetails?: components["schemas"]["ProductPriceDetails"] | null;
273
292
  /**
274
- * Timestamp
275
- * Format: date-time
293
+ * Price
294
+ * @description A fallback for headless builds that don't want to use priceDetails. Should include the same info, but as a string.
276
295
  */
277
- timestamp?: string;
278
- /** Data */
279
- data: components["schemas"]["ProductInformationChunkQueryResult"][];
296
+ price: string;
297
+ /** @description The current price details of the product or bundle. If the product or bundle is discounted, this will hold the discounted price. */
298
+ priceDetails: components["schemas"]["ProductPriceDetails"];
299
+ /** Products */
300
+ products: components["schemas"]["ProductV2"][];
280
301
  };
281
302
  /** ConversationContext */
282
303
  ConversationContext: {
@@ -311,23 +332,6 @@ interface components {
311
332
  } & {
312
333
  [key: string]: unknown;
313
334
  };
314
- /**
315
- * ConversationHistoryRequest
316
- * @description A request to retrieve the conversation history
317
- */
318
- ConversationHistoryRequest: {
319
- /**
320
- * Start Date
321
- * Format: date-time
322
- * @description The start date of the conversation history in YYYY-MM-DD HH:MM:SS format
323
- */
324
- start_date: string;
325
- /**
326
- * End Date
327
- * @description The end date of the conversation history in YYYY-MM-DD HH:MM:SS format
328
- */
329
- end_date?: string | null;
330
- };
331
335
  /** ConversationOption */
332
336
  ConversationOption: {
333
337
  /** Label */
@@ -335,207 +339,98 @@ interface components {
335
339
  /** Value */
336
340
  value: string;
337
341
  };
338
- /** ConversationStageTransitionRecord */
339
- ConversationStageTransitionRecord: {
340
- /**
341
- * Id
342
- * @default conversation_stage_transition
343
- * @constant
344
- */
345
- id: "conversation_stage_transition";
346
- /**
347
- * Timestamp
348
- * Format: date-time
349
- */
350
- timestamp?: string;
351
- data: components["schemas"]["CurrentConversationStageRecord"];
352
- };
353
- /** ConversationTurnIDRecord */
354
- ConversationTurnIDRecord: {
355
- /**
356
- * Id
357
- * @default conversation_turn_id
358
- * @constant
359
- */
360
- id: "conversation_turn_id";
361
- /**
362
- * Timestamp
363
- * Format: date-time
364
- */
365
- timestamp?: string;
366
- /**
367
- * Conversation Turn Id
368
- * Format: uuid
369
- */
370
- conversation_turn_id: string;
371
- };
372
- /** CurrentConversationStageRecord */
373
- CurrentConversationStageRecord: {
374
- /** Current Stage Name */
375
- current_stage_name: string;
376
- /** Llm Response */
377
- llm_response: string;
378
- /**
379
- * Reason
380
- * @enum {string}
381
- */
382
- reason: "NotApplicable" | "Success" | "Failure";
383
- };
384
- /** DBVersionRecord */
385
- DBVersionRecord: {
386
- /**
387
- * Id
388
- * @default db_version
389
- * @constant
390
- */
391
- id: "db_version";
392
- /**
393
- * Timestamp
394
- * Format: date-time
395
- */
396
- timestamp?: string;
397
- /**
398
- * Db Version
399
- * Format: uuid
400
- */
401
- db_version: string;
402
- };
403
- /** EligibilityRecord */
404
- EligibilityRecord: {
405
- /**
406
- * Id
407
- * @default eligibility
408
- * @constant
409
- */
410
- id: "eligibility";
411
- /**
412
- * Timestamp
413
- * Format: date-time
414
- */
415
- timestamp?: string;
416
- context: components["schemas"]["ConversationContext"];
417
- };
418
- /** EmbeddingTokenCountRecord */
419
- EmbeddingTokenCountRecord: {
342
+ /**
343
+ * ExitToHumanReason
344
+ * @enum {string}
345
+ */
346
+ ExitToHumanReason: "WANT_TO_TALK_TO_HUMAN" | "OUT_OF_SCOPE_QUESTIONS" | "NOT_BEHAVING_CORRECTLY";
347
+ /** Product */
348
+ Product: {
349
+ /** Id */
350
+ id: string;
351
+ /** Name */
352
+ name: string;
420
353
  /**
421
- * Id
422
- * @default embedding_token_count
423
- * @constant
354
+ * Descriptiveprice
355
+ * @description A user-readable form of the price of this item.
424
356
  */
425
- id: "embedding_token_count";
357
+ descriptivePrice: string;
426
358
  /**
427
- * Timestamp
428
- * Format: date-time
359
+ * Url
360
+ * @description Where can we find this product?
429
361
  */
430
- timestamp?: string;
431
- data: components["schemas"]["platform_py_contracts__models__debug_record_v1__EmbeddingTokenCountRecord__Data"];
362
+ url: string;
432
363
  };
433
364
  /**
434
- * ExitToChatReason
435
- * @enum {string}
365
+ * ProductExtra
366
+ * @description An extra product that is bundled with the main product.
436
367
  */
437
- ExitToChatReason: "WANT_TO_TALK_TO_HUMAN" | "OUT_OF_SCOPE_QUESTIONS" | "NOT_BEHAVING_CORRECTLY";
438
- /** HTTPValidationError */
439
- HTTPValidationError: {
440
- /** Detail */
441
- detail?: components["schemas"]["ValidationError"][];
368
+ ProductExtra: {
369
+ /** Name */
370
+ name: string;
371
+ /** Price */
372
+ price: string;
442
373
  };
443
- /** LLMTokenCountRecord */
444
- LLMTokenCountRecord: {
374
+ /**
375
+ * ProductPriceDetails
376
+ * @description The price details for a product or a bundle
377
+ */
378
+ ProductPriceDetails: {
379
+ /** Price */
380
+ price: number;
445
381
  /**
446
- * Id
447
- * @default llm_token_count
448
- * @constant
382
+ * Currency
383
+ * @description ISO 4217 Currency code - `USD`, `GBP`, `EUR` etc
384
+ * @enum {string}
449
385
  */
450
- id: "llm_token_count";
386
+ currency: "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHF" | "CLP" | "CNY" | "COP" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRO" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STD" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VEF" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL";
451
387
  /**
452
- * Timestamp
453
- * Format: date-time
388
+ * Suffix
389
+ * @description e.g `/mo` or `per month for 12 months` or `including vat`
454
390
  */
455
- timestamp?: string;
456
- data: components["schemas"]["platform_py_contracts__models__debug_record_v1__LLMTokenCountRecord__Data"];
391
+ suffix?: string | null;
457
392
  };
458
- /** MaxCosineSimilarityScoresRecord */
459
- MaxCosineSimilarityScoresRecord: {
393
+ /**
394
+ * ProductV2
395
+ * @description A product
396
+ */
397
+ ProductV2: {
460
398
  /**
461
399
  * Id
462
- * @default max_cosine_similarity_scores
463
- * @constant
400
+ * @description The product id as defined by the customer
464
401
  */
465
- id: "max_cosine_similarity_scores";
402
+ id: string;
403
+ /** Name */
404
+ name: string;
466
405
  /**
467
- * Timestamp
468
- * Format: date-time
406
+ * Description
407
+ * @description Description of the product or bundle from the feed data
469
408
  */
470
- timestamp?: string;
471
- /** Data */
472
- data: {
473
- [key: string]: number;
474
- };
475
- };
476
- /** MaxProgressScoreRecord */
477
- MaxProgressScoreRecord: {
409
+ description?: string | null;
478
410
  /**
479
- * Id
480
- * @default max_progress_score
481
- * @constant
411
+ * Previousprice
412
+ * @description A fallback for headless builds that don't want to use previousPriceDetails. Should include the same info, but as a string.
482
413
  */
483
- id: "max_progress_score";
414
+ previousPrice?: string | null;
415
+ /** @description The original price of the product or bundle, only set if it's currently discounted. */
416
+ previousPriceDetails?: components["schemas"]["ProductPriceDetails"] | null;
484
417
  /**
485
- * Timestamp
486
- * Format: date-time
418
+ * Price
419
+ * @description A fallback for headless builds that don't want to use priceDetails. Should include the same info, but as a string.
487
420
  */
488
- timestamp?: string;
489
- data: components["schemas"]["ProgressScoreRecord"];
490
- };
491
- /** PhraseTokenProbabilitiesRecord */
492
- PhraseTokenProbabilitiesRecord: {
421
+ price?: string | null;
422
+ /** @description The current price details of the product or bundle. If the product or bundle is discounted, this will hold the discounted price. */
423
+ priceDetails?: components["schemas"]["ProductPriceDetails"] | null;
493
424
  /**
494
- * Id
495
- * @default phrase_token_probabilities
496
- * @constant
425
+ * Category
426
+ * @description Foe example, `tv`, `internet`, `phone`. It can be used to show an icon in the UI.
497
427
  */
498
- id: "phrase_token_probabilities";
428
+ category?: string | null;
499
429
  /**
500
- * Timestamp
501
- * Format: date-time
430
+ * Extras
431
+ * @description Extras are additional products that are bundled with the main product.
502
432
  */
503
- timestamp?: string;
504
- /** Phrase Token Probabilities */
505
- phrase_token_probabilities: components["schemas"]["RootModel_list_TokenProbabilityRecord__"][];
506
- };
507
- /** Product */
508
- Product: {
509
- /** Id */
510
- id: string;
511
- /** Name */
512
- name: string;
513
- /**
514
- * Descriptiveprice
515
- * @description A user-readable form of the price of this item.
516
- */
517
- descriptivePrice: string;
518
- /**
519
- * Url
520
- * @description Where can we find this product?
521
- */
522
- url: string;
523
- };
524
- /** ProductInformationChunkQueryResult */
525
- ProductInformationChunkQueryResult: {
526
- /** Text */
527
- text: string;
528
- /** Customer Id */
529
- customer_id: string;
530
- /** Similarity Score */
531
- similarity_score: number;
532
- };
533
- /** ProgressScoreRecord */
534
- ProgressScoreRecord: {
535
- /** Max Progress Score */
536
- max_progress_score: number;
537
- /** Is Ready For Recommendation */
538
- is_ready_for_recommendation: boolean;
433
+ extras?: components["schemas"]["ProductExtra"][] | null;
539
434
  };
540
435
  /** Recommendation */
541
436
  Recommendation: {
@@ -544,6 +439,8 @@ interface components {
544
439
  * @description Why was this recommendation made?
545
440
  */
546
441
  explanation: string;
442
+ /** Recommendationid */
443
+ recommendationId?: string | null;
547
444
  /**
548
445
  * Products
549
446
  * @description The IDs of the products that make up this recommendation
@@ -556,63 +453,17 @@ interface components {
556
453
  */
557
454
  bundles: components["schemas"]["Bundle"][];
558
455
  };
559
- /** RootModel[list[TokenProbabilityRecord]] */
560
- RootModel_list_TokenProbabilityRecord__: components["schemas"]["TokenProbabilityRecord"][];
561
- /** RunActionDetailsRecord */
562
- RunActionDetailsRecord: {
563
- /**
564
- * Id
565
- * @default run_action_details
566
- * @constant
567
- */
568
- id: "run_action_details";
569
- /**
570
- * Timestamp
571
- * Format: date-time
572
- */
573
- timestamp?: string;
574
- data: components["schemas"]["platform_py_contracts__models__debug_record_v1__RunActionDetailsRecord__Data"];
575
- };
576
- /** SystemPromptRecord */
577
- SystemPromptRecord: {
578
- /**
579
- * Id
580
- * @default system_prompt
581
- * @enum {string}
582
- */
583
- id: "system_prompt" | "sales_framework_system_prompt" | "conversation_stage_transition_prompt";
584
- /**
585
- * Timestamp
586
- * Format: date-time
587
- */
588
- timestamp?: string;
589
- /** Data */
590
- data: string;
591
- };
592
- /** TokenProbabilityRecord */
593
- TokenProbabilityRecord: {
594
- /** Token */
595
- token: string;
596
- /** Probability */
597
- probability: number;
598
- /** Log Probability */
599
- log_probability: number;
600
- };
601
- /** TriggeredBranchesRecord */
602
- TriggeredBranchesRecord: {
603
- /**
604
- * Id
605
- * @default triggered_branches
606
- * @constant
607
- */
608
- id: "triggered_branches";
609
- /**
610
- * Timestamp
611
- * Format: date-time
612
- */
613
- timestamp?: string;
614
- /** Data */
615
- data: string[];
456
+ /**
457
+ * RecommendationV2
458
+ * @description A recommendation with more detailed information for each product and bundle
459
+ */
460
+ RecommendationV2: {
461
+ /** Recommendationid */
462
+ recommendationId?: string | null;
463
+ /** Products */
464
+ products: components["schemas"]["ProductV2"][];
465
+ /** Bundles */
466
+ bundles: components["schemas"]["BundleV2"][];
616
467
  };
617
468
  /**
618
469
  * UserMultiSelectMessage
@@ -704,44 +555,6 @@ interface components {
704
555
  */
705
556
  userMessage: string;
706
557
  };
707
- /** ValidationError */
708
- ValidationError: {
709
- /** Location */
710
- loc: (string | number)[];
711
- /** Message */
712
- msg: string;
713
- /** Error Type */
714
- type: string;
715
- };
716
- /** Data */
717
- platform_py_contracts__models__debug_record_v1__EmbeddingTokenCountRecord__Data: {
718
- /** Token Count */
719
- token_count: number;
720
- /** Model */
721
- model: string;
722
- /** Embedded Text */
723
- embedded_text: string;
724
- };
725
- /** Data */
726
- platform_py_contracts__models__debug_record_v1__LLMTokenCountRecord__Data: {
727
- /** Input Token Count */
728
- input_token_count: number;
729
- /** Output Token Count */
730
- output_token_count: number;
731
- /** Response Text */
732
- response_text: string;
733
- /** Input Messages */
734
- input_messages: string;
735
- /** Model */
736
- model: string;
737
- };
738
- /** Data */
739
- platform_py_contracts__models__debug_record_v1__RunActionDetailsRecord__Data: {
740
- /** Action Type */
741
- action_type: string;
742
- /** Branch Type */
743
- branch_type: string;
744
- };
745
558
  };
746
559
  responses: never;
747
560
  parameters: never;
@@ -750,14 +563,14 @@ interface components {
750
563
  pathItems: never;
751
564
  }
752
565
  interface operations {
753
- generate_conversation_json_response_with_jwt_api_conversation_v3_post: {
566
+ generate_conversation_response_api_conversation_v3_post: {
754
567
  parameters: {
755
568
  query?: never;
756
569
  header?: {
757
570
  "user-agent"?: string;
758
571
  /**
759
572
  * @description Comma-separated list of feature flags (flags might require elevated permissions)
760
- * @example debug
573
+ * @example debug,rec-message-v2
761
574
  */
762
575
  "x-feature-flags"?: string | null;
763
576
  /**
@@ -767,9 +580,13 @@ interface operations {
767
580
  "x-sdk-version"?: string | null;
768
581
  /** @description A UUID marking the unique page view ID, if this request came from a web browser */
769
582
  "x-pageview-id"?: string | null;
583
+ /** @description The URL of the page that is sending requests to the conversation API */
584
+ "x-page-url"?: string | null;
770
585
  };
771
586
  path?: never;
772
- cookie?: never;
587
+ cookie?: {
588
+ conversation_session_id?: string | null;
589
+ };
773
590
  };
774
591
  requestBody: {
775
592
  content: {
@@ -783,7 +600,7 @@ interface operations {
783
600
  [name: string]: unknown;
784
601
  };
785
602
  content: {
786
- "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"])[];
603
+ "application/json": (components["schemas"]["AssistantTextMessage"] | components["schemas"]["AssistantSingleSelectMessage"] | components["schemas"]["AssistantMultiSelectMessage"] | components["schemas"]["AssistantExitToChatMessage"] | components["schemas"]["AssistantExitToPhoneMessage"] | components["schemas"]["AssistantRecommendationMessage"] | components["schemas"]["AssistantRecommendationMessageV2"] | components["schemas"]["AssistantConversationIdMessage"] | components["schemas"]["AssistantExitToPurchaseMessage"])[];
787
604
  };
788
605
  };
789
606
  /** @description The user is not authorized to access the requested data */
@@ -1487,8 +1304,6 @@ interface paths {
1487
1304
  * screen_width <= 480px = 'mobile'
1488
1305
  * screen_width > 480px = 'large' */
1489
1306
  screen_size?: string;
1490
- /** @description The type of entry point the event refers to (tab, engagement bubble etc) */
1491
- entry_point_type?: string;
1492
1307
  /** @description This property is intended to replace session_id, but is being used in the meantime so that developers can switch over to using browser_session_id without different services needing to all update in sync.
1493
1308
  *
1494
1309
  * A 36 character alphanumeric hash that uniquely identifies a session.
@@ -1499,6 +1314,8 @@ interface paths {
1499
1314
  *
1500
1315
  * e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
1501
1316
  browser_session_id?: string | null;
1317
+ /** @description The type of entry point the event refers to, e.g. engagement_button (previously named tab), engagement popup (previously named engagement bubble) etc */
1318
+ entry_point_type?: string;
1502
1319
  /** @description The name of the system/service that the event originates from */
1503
1320
  service?: string;
1504
1321
  /** @description A JSON object containing the different versions of services directly used by the service that tracks an event. The version of the service that is firing any tracking event should ALWAYS be included, for example if the conversation_api is firing an event, service_versions should include conversation_api_version. It should also ideally include the version numbers of any other services used in the generation of the event that is being tracked. */
@@ -1547,14 +1364,16 @@ interface paths {
1547
1364
  is_pre_output_guardrail_checks?: boolean;
1548
1365
  /** @description Describes the stage that the conversation is currently at. A conversation stage is triggered in response to each user message, and according to the stage, the main LLM prompt is tweaked to apply specific instructions and steer the conversation. */
1549
1366
  conversation_stage?: string | null;
1550
- /** @description A list of products sent in a conversation api message, typically initially in a recommendation message, but then could also be in an exit_to_purchase message. */
1551
- recommendation_products?: unknown[];
1367
+ /** @description A list of ids that each relate to a single recommendation that was shown in a set of recs */
1368
+ recommendation_ids_recommended?: unknown[];
1552
1369
  /** @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?\". */
1553
1370
  fallback_text?: string;
1554
1371
  /** @description Specifies if a free text response can be provided to an assistant single/multi-select message */
1555
1372
  is_allow_free_text_message?: boolean;
1556
1373
  /** @description The reason an exit to chat response was provided by the conversation api */
1557
1374
  exit_to_chat_reason?: string;
1375
+ /** @description A list of ids that each correspond to their own recommendation, with all recs in the list being 'exit to purchase-able' or 'exit to chat-able' */
1376
+ recommendation_ids_for_exit?: unknown[];
1558
1377
  /** @description The type of destination the user will be sent to as a result of exiting to chat. E.g 'phone','chat','email' etc */
1559
1378
  exit_destination_type?: string;
1560
1379
  /** @description The ID for the sale, a unique, non-empty value we can correlate with customer records. */
@@ -1607,6 +1426,12 @@ interface paths {
1607
1426
  slots?: unknown[];
1608
1427
  /** @description Describes the reason the entry point was closed. When the value is 'customer_triggered' it's because it's been programmatically closed by the customer (by running window.axiom.integrations.hide()). When it's 'user_close_click' it's because the actual end user has closed it manually by clicking. */
1609
1428
  entry_point_closed_reason?: string;
1429
+ /** @description A list of objects for recommendations sent in a conversation api message. */
1430
+ recommendation_set?: unknown[];
1431
+ /** @description This is a score that evaluates how much progress has been made through the discovery phase of the conversation. A higher score means more information has been discovered. This value is generated by the recommender.
1432
+ *
1433
+ * https://github.com/15gifts/indy-contracts/blob/main/contracts/recommendation_v2_generate.json#L57 */
1434
+ discovery_progress_score?: number;
1610
1435
  };
1611
1436
  /**
1612
1437
  * @description A 36 character hash, 5 segments, separated by dashes that uniquely identifies a conversation
@@ -1617,7 +1442,7 @@ interface paths {
1617
1442
  * @description Event Name
1618
1443
  * @enum {string}
1619
1444
  */
1620
- 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" | "assistant_message-submitted exit_to_human" | "feedback-shown" | "feedback_skip-clicked" | "sale-completed" | "sale-completed spectrum" | "sale-completed aidem" | "sale-completed spectrum-us-media-consumer-en" | "entry_point-clicked" | "tool_close-clicked" | "exit_to_chat-completed" | "exit_to_purchase-completed" | "conversation-started" | "user_qualification-identified" | "experiment_variation-assigned" | "slot_filling-completed" | "entry_point-closed" | "entry_point-suppressed" | "user-created" | "exit_to_human-completed";
1445
+ 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" | "assistant_message-submitted exit_to_human" | "feedback-shown" | "feedback_skip-clicked" | "sale-completed" | "sale-completed spectrum" | "sale-completed aidem" | "sale-completed spectrum-us-media-consumer-en" | "entry_point-clicked" | "tool_close-clicked" | "exit_to_chat-completed" | "exit_to_purchase-completed" | "conversation-started" | "user_qualification-identified" | "experiment_variation-assigned" | "slot_filling-completed" | "entry_point-closed" | "entry_point-suppressed" | "user-created" | "exit_to_human-completed" | "recommendation_set-returned" | "ww_rag_context-used";
1621
1446
  /**
1622
1447
  * @description A 36 character hash, 5 segments, separated by dashes that uniquely identifies a page view (page-shown event)
1623
1448
  * @example 1a1a1a1a-1a1a-1a1a-1a1a-1a1a1a1a1a1a
@@ -1674,11 +1499,12 @@ interface paths {
1674
1499
  * We don't use them directly, or export them here because of how they appear in the documentation site.
1675
1500
  */
1676
1501
  type ApiConversationIdMessage = components['schemas']['AssistantConversationIdMessage'];
1677
- type ApiDebugMessage = components['schemas']['AssistantDebugMessage'];
1678
1502
  type ApiExitToChatMessage = components['schemas']['AssistantExitToChatMessage'];
1503
+ type ApiExitToPhoneMessage = components['schemas']['AssistantExitToPhoneMessage'];
1679
1504
  type ApiExitToPurchaseMessage = components['schemas']['AssistantExitToPurchaseMessage'];
1680
1505
  type ApiMultiSelectMessage = components['schemas']['AssistantMultiSelectMessage'];
1681
1506
  type ApiRecommendationMessage = components['schemas']['AssistantRecommendationMessage'];
1507
+ type ApiRecommendationV2Message = components['schemas']['AssistantRecommendationMessageV2'];
1682
1508
  type ApiSingleSelectMessage = components['schemas']['AssistantSingleSelectMessage'];
1683
1509
  type ApiTextMessage = components['schemas']['AssistantTextMessage'];
1684
1510
  type ApiIdentityRequest = paths['/api/tracking/identity/v2']['post']['requestBody']['content']['application/json'];
@@ -1751,19 +1577,21 @@ interface Identity {
1751
1577
  * The message types that the SDK returns.
1752
1578
  * Note that the API response may contain additional types that the SDK does not return.
1753
1579
  */
1754
- type Message = ConversationIdMessage | DebugMessage | ExitToChatMessage | ExitToPurchaseMessage | MultiSelectMessage | RecommendationMessage | SingleSelectMessage | TextMessage;
1580
+ type Message = ConversationIdMessage | ExitToChatMessage | ExitToPhoneMessage | ExitToPurchaseMessage | MultiSelectMessage | RecommendationMessage | RecommendationV2Message | SingleSelectMessage | TextMessage;
1755
1581
  interface ConversationIdMessage extends ApiConversationIdMessage {
1756
1582
  }
1757
- interface DebugMessage extends ApiDebugMessage {
1758
- }
1759
1583
  interface ExitToChatMessage extends ApiExitToChatMessage {
1760
1584
  }
1585
+ interface ExitToPhoneMessage extends ApiExitToPhoneMessage {
1586
+ }
1761
1587
  interface ExitToPurchaseMessage extends ApiExitToPurchaseMessage {
1762
1588
  }
1763
1589
  interface MultiSelectMessage extends ApiMultiSelectMessage {
1764
1590
  }
1765
1591
  interface RecommendationMessage extends ApiRecommendationMessage {
1766
1592
  }
1593
+ interface RecommendationV2Message extends ApiRecommendationV2Message {
1594
+ }
1767
1595
  interface SingleSelectMessage extends ApiSingleSelectMessage {
1768
1596
  }
1769
1597
  interface TextMessage extends ApiTextMessage {
@@ -1869,7 +1697,7 @@ declare class Client {
1869
1697
  */
1870
1698
  sendMessage({ userMessage, }: {
1871
1699
  userMessage: string;
1872
- }): Promise<Exclude<Message, ConversationIdMessage | DebugMessage>[] | undefined>;
1700
+ }): Promise<Exclude<Message, ConversationIdMessage>[] | undefined>;
1873
1701
  /**
1874
1702
  * Sends an event to the tracking API, with the required properties already set.
1875
1703
  *
@@ -1907,8 +1735,8 @@ declare class Client {
1907
1735
  screen_width?: number;
1908
1736
  screen_height?: number;
1909
1737
  screen_size?: string;
1910
- entry_point_type?: string;
1911
1738
  browser_session_id?: string | null;
1739
+ entry_point_type?: string;
1912
1740
  service?: string;
1913
1741
  service_versions?: Record<string, never>;
1914
1742
  environment?: string;
@@ -1925,10 +1753,11 @@ declare class Client {
1925
1753
  guardrails?: unknown[];
1926
1754
  is_pre_output_guardrail_checks?: boolean;
1927
1755
  conversation_stage?: string | null;
1928
- recommendation_products?: unknown[];
1756
+ recommendation_ids_recommended?: unknown[];
1929
1757
  fallback_text?: string;
1930
1758
  is_allow_free_text_message?: boolean;
1931
1759
  exit_to_chat_reason?: string;
1760
+ recommendation_ids_for_exit?: unknown[];
1932
1761
  exit_destination_type?: string;
1933
1762
  sale_id?: string;
1934
1763
  user_type?: string;
@@ -1950,9 +1779,11 @@ declare class Client {
1950
1779
  experiment_variation_name?: string;
1951
1780
  slots?: unknown[];
1952
1781
  entry_point_closed_reason?: string;
1782
+ recommendation_set?: unknown[];
1783
+ discovery_progress_score?: number;
1953
1784
  };
1954
1785
  conversationId?: string;
1955
- 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" | "assistant_message-submitted exit_to_human" | "feedback-shown" | "feedback_skip-clicked" | "sale-completed" | "sale-completed spectrum" | "sale-completed aidem" | "sale-completed spectrum-us-media-consumer-en" | "entry_point-clicked" | "tool_close-clicked" | "exit_to_chat-completed" | "exit_to_purchase-completed" | "conversation-started" | "user_qualification-identified" | "experiment_variation-assigned" | "slot_filling-completed" | "entry_point-closed" | "entry_point-suppressed" | "user-created" | "exit_to_human-completed";
1786
+ 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" | "assistant_message-submitted exit_to_human" | "feedback-shown" | "feedback_skip-clicked" | "sale-completed" | "sale-completed spectrum" | "sale-completed aidem" | "sale-completed spectrum-us-media-consumer-en" | "entry_point-clicked" | "tool_close-clicked" | "exit_to_chat-completed" | "exit_to_purchase-completed" | "conversation-started" | "user_qualification-identified" | "experiment_variation-assigned" | "slot_filling-completed" | "entry_point-closed" | "entry_point-suppressed" | "user-created" | "exit_to_human-completed" | "recommendation_set-returned" | "ww_rag_context-used";
1956
1787
  pageviewId: string;
1957
1788
  screenHeight?: number;
1958
1789
  screenSize?: "mobile" | "large";
@@ -2206,4 +2037,4 @@ declare const errorMiddleware: Middleware;
2206
2037
  */
2207
2038
  declare const headerMiddleware: (identity: Identity, url: string) => Middleware;
2208
2039
 
2209
- export { CONVERSATION_ID, Client, type Config, type ConversationIdMessage, type DebugMessage, type Endpoint, type ExitToChatMessage, type ExitToPurchaseMessage, type Identity, JWT_TOKEN, type Message, type MultiSelectMessage, type RecommendationMessage, SESSION_ID, type SingleSelectMessage, TTL, type TextMessage, type TrackingEvent, USER_ID, authMiddleware, deleteConversationId, errorMiddleware, getConversationId, getSessionId, getToken, getUserId, headerMiddleware, isTokenExpired, setConversationId, setSessionId, setToken, setUserId };
2040
+ export { CONVERSATION_ID, Client, type Config, type ConversationIdMessage, type Endpoint, type ExitToChatMessage, type ExitToPhoneMessage, type ExitToPurchaseMessage, type Identity, JWT_TOKEN, type Message, type MultiSelectMessage, type RecommendationMessage, type RecommendationV2Message, SESSION_ID, type SingleSelectMessage, TTL, type TextMessage, type TrackingEvent, USER_ID, authMiddleware, deleteConversationId, errorMiddleware, getConversationId, getSessionId, getToken, getUserId, headerMiddleware, isTokenExpired, setConversationId, setSessionId, setToken, setUserId };