@15gifts/sdk 0.11.8 → 0.11.10

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
@@ -76,24 +46,7 @@ interface components {
76
46
  * Conversationid
77
47
  * @description Unique identifier for the conversation. This will be generated once, at the start of a conversation.
78
48
  */
79
- conversationId: string | null;
80
- };
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"])[];
49
+ conversationId?: string | null;
97
50
  };
98
51
  /**
99
52
  * AssistantExitToChatMessage
@@ -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
  /**
@@ -143,6 +127,45 @@ interface components {
143
127
  * @default []
144
128
  */
145
129
  bundles: components["schemas"]["Bundle"][];
130
+ /**
131
+ * Offers
132
+ * @description The offers that were part of the recommendation
133
+ * @default []
134
+ */
135
+ offers: components["schemas"]["Offer"][];
136
+ };
137
+ /**
138
+ * AssistantExitToPurchaseMessageV2
139
+ * @description The customer wants to buy something
140
+ */
141
+ AssistantExitToPurchaseMessageV2: {
142
+ /**
143
+ * Type
144
+ * @default EXIT_TO_PURCHASE_V2
145
+ * @constant
146
+ */
147
+ type: "EXIT_TO_PURCHASE_V2";
148
+ /**
149
+ * Fallbackmessage
150
+ * @description What should a client render if they do not have a native renderer for this message type?
151
+ */
152
+ fallbackMessage: string;
153
+ /** Recommendationidforexit */
154
+ recommendationIdForExit?: string | null;
155
+ /** Products */
156
+ products: components["schemas"]["ProductV2"][];
157
+ /**
158
+ * Bundles
159
+ * @description The bundles that were recommended
160
+ * @default []
161
+ */
162
+ bundles: components["schemas"]["BundleV2"][];
163
+ /**
164
+ * Offers
165
+ * @description The offers that were part of the recommendation
166
+ * @default []
167
+ */
168
+ offers: components["schemas"]["OfferV2"][];
146
169
  };
147
170
  /**
148
171
  * AssistantMultiSelectMessage
@@ -190,6 +213,25 @@ interface components {
190
213
  /** Recommendations */
191
214
  recommendations: components["schemas"]["Recommendation"][];
192
215
  };
216
+ /**
217
+ * AssistantRecommendationMessageV2
218
+ * @description Recommendation message with more detailed information for each product and bundle
219
+ */
220
+ AssistantRecommendationMessageV2: {
221
+ /**
222
+ * Type
223
+ * @default RECOMMENDATION_V2
224
+ * @constant
225
+ */
226
+ type: "RECOMMENDATION_V2";
227
+ /**
228
+ * Fallbackmessage
229
+ * @description What should a client render if they do not have a native renderer for this message type?
230
+ */
231
+ fallbackMessage: string;
232
+ /** Recommendations */
233
+ recommendations: components["schemas"]["RecommendationV2"][];
234
+ };
193
235
  /**
194
236
  * AssistantSingleSelectMessage
195
237
  * @description A single-select renderer - given a list of options, pick one
@@ -262,34 +304,57 @@ interface components {
262
304
  */
263
305
  products: components["schemas"]["Product"][];
264
306
  };
265
- /** ContextChunksRecord */
266
- ContextChunksRecord: {
307
+ /**
308
+ * BundleV2
309
+ * @description A bundle of products
310
+ */
311
+ BundleV2: {
267
312
  /**
268
313
  * Id
269
- * @default context_chunks
270
- * @constant
314
+ * @description The product id as defined by the customer
315
+ */
316
+ id: string;
317
+ /** Name */
318
+ name: string;
319
+ /**
320
+ * Description
321
+ * @description Description of the product or bundle from the feed data
322
+ */
323
+ description?: string | null;
324
+ /**
325
+ * Previousprice
326
+ * @description A fallback for headless builds that don't want to use previousPriceDetails. Should include the same info, but as a string.
271
327
  */
272
- id: "context_chunks";
328
+ previousPrice?: string | null;
329
+ /** @description The original price of the product or bundle, only set if it's currently discounted. */
330
+ previousPriceDetails?: components["schemas"]["ProductPriceDetails"] | null;
273
331
  /**
274
- * Timestamp
275
- * Format: date-time
332
+ * Price
333
+ * @description A fallback for headless builds that don't want to use priceDetails. Should include the same info, but as a string.
276
334
  */
277
- timestamp?: string;
278
- /** Data */
279
- data: components["schemas"]["ProductInformationChunkQueryResult"][];
335
+ price: string;
336
+ /** @description The current price details of the product or bundle. If the product or bundle is discounted, this will hold the discounted price. */
337
+ priceDetails: components["schemas"]["ProductPriceDetails"];
338
+ /** Products */
339
+ products: components["schemas"]["ProductV2"][];
280
340
  };
281
341
  /** ConversationContext */
282
342
  ConversationContext: {
283
343
  /**
284
344
  * Eligibleproducts
285
- * @description What product IDs is the user eligible to?
345
+ * @description What product IDs is the user eligible for?
286
346
  */
287
347
  eligibleProducts?: string[] | null;
288
348
  /**
289
349
  * Eligiblebundles
290
- * @description What bundle IDs is the user eligible to?
350
+ * @description What bundle IDs is the user eligible for?
291
351
  */
292
352
  eligibleBundles?: string[] | null;
353
+ /**
354
+ * Eligibleoffers
355
+ * @description What offer IDs is the user eligible for?
356
+ */
357
+ eligibleOffers?: string[] | null;
293
358
  /**
294
359
  * Productoverrides
295
360
  * @description The fields to override in the product specs as based on eligibility
@@ -308,25 +373,17 @@ interface components {
308
373
  [key: string]: string | number | Record<string, never> | unknown[];
309
374
  };
310
375
  } | null;
311
- } & {
312
- [key: string]: unknown;
313
- };
314
- /**
315
- * ConversationHistoryRequest
316
- * @description A request to retrieve the conversation history
317
- */
318
- ConversationHistoryRequest: {
319
376
  /**
320
- * Start Date
321
- * Format: date-time
322
- * @description The start date of the conversation history in YYYY-MM-DD HH:MM:SS format
377
+ * Offeroverrides
378
+ * @description The fields to override in the offer specs as based on eligibility
323
379
  */
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;
380
+ offerOverrides?: {
381
+ [key: string]: {
382
+ [key: string]: string | number | Record<string, never> | unknown[];
383
+ };
384
+ } | null;
385
+ } & {
386
+ [key: string]: unknown;
330
387
  };
331
388
  /** ConversationOption */
332
389
  ConversationOption: {
@@ -335,207 +392,130 @@ interface components {
335
392
  /** Value */
336
393
  value: string;
337
394
  };
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: {
395
+ /**
396
+ * ExitToHumanReason
397
+ * @enum {string}
398
+ */
399
+ ExitToHumanReason: "WANT_TO_TALK_TO_HUMAN" | "OUT_OF_SCOPE_QUESTIONS" | "NOT_BEHAVING_CORRECTLY";
400
+ /**
401
+ * Offer
402
+ * @description Offer details
403
+ */
404
+ Offer: {
386
405
  /**
387
406
  * Id
388
- * @default db_version
389
- * @constant
407
+ * @description The offer id as defined by the customer
390
408
  */
391
- id: "db_version";
392
- /**
393
- * Timestamp
394
- * Format: date-time
395
- */
396
- timestamp?: string;
409
+ id: string;
397
410
  /**
398
- * Db Version
399
- * Format: uuid
411
+ * Description
412
+ * @description Description of the offer from the feed data
400
413
  */
401
- db_version: string;
414
+ description?: string | null;
402
415
  };
403
- /** EligibilityRecord */
404
- EligibilityRecord: {
416
+ /**
417
+ * OfferV2
418
+ * @description Offer details
419
+ */
420
+ OfferV2: {
405
421
  /**
406
422
  * Id
407
- * @default eligibility
408
- * @constant
423
+ * @description The offer id as defined by the customer
409
424
  */
410
- id: "eligibility";
425
+ id: string;
411
426
  /**
412
- * Timestamp
413
- * Format: date-time
427
+ * Description
428
+ * @description Description of the offer from the feed data
414
429
  */
415
- timestamp?: string;
416
- context: components["schemas"]["ConversationContext"];
430
+ description?: string | null;
417
431
  };
418
- /** EmbeddingTokenCountRecord */
419
- EmbeddingTokenCountRecord: {
432
+ /** Product */
433
+ Product: {
434
+ /** Id */
435
+ id: string;
436
+ /** Name */
437
+ name: string;
420
438
  /**
421
- * Id
422
- * @default embedding_token_count
423
- * @constant
439
+ * Descriptiveprice
440
+ * @description A user-readable form of the price of this item.
424
441
  */
425
- id: "embedding_token_count";
442
+ descriptivePrice: string;
426
443
  /**
427
- * Timestamp
428
- * Format: date-time
444
+ * Url
445
+ * @description Where can we find this product?
429
446
  */
430
- timestamp?: string;
431
- data: components["schemas"]["platform_py_contracts__models__debug_record_v1__EmbeddingTokenCountRecord__Data"];
447
+ url: string;
432
448
  };
433
449
  /**
434
- * ExitToChatReason
435
- * @enum {string}
450
+ * ProductExtra
451
+ * @description An extra product that is bundled with the main product.
436
452
  */
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"][];
442
- };
443
- /** LLMTokenCountRecord */
444
- LLMTokenCountRecord: {
445
- /**
446
- * Id
447
- * @default llm_token_count
448
- * @constant
449
- */
450
- id: "llm_token_count";
451
- /**
452
- * Timestamp
453
- * Format: date-time
454
- */
455
- timestamp?: string;
456
- data: components["schemas"]["platform_py_contracts__models__debug_record_v1__LLMTokenCountRecord__Data"];
453
+ ProductExtra: {
454
+ /** Name */
455
+ name: string;
456
+ /** Price */
457
+ price: string;
457
458
  };
458
- /** MaxCosineSimilarityScoresRecord */
459
- MaxCosineSimilarityScoresRecord: {
459
+ /**
460
+ * ProductPriceDetails
461
+ * @description The price details for a product or a bundle
462
+ */
463
+ ProductPriceDetails: {
464
+ /** Price */
465
+ price: number;
460
466
  /**
461
- * Id
462
- * @default max_cosine_similarity_scores
463
- * @constant
467
+ * Currency
468
+ * @description ISO 4217 Currency code - `USD`, `GBP`, `EUR` etc
469
+ * @enum {string}
464
470
  */
465
- id: "max_cosine_similarity_scores";
471
+ 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";
466
472
  /**
467
- * Timestamp
468
- * Format: date-time
473
+ * Suffix
474
+ * @description e.g `/mo` or `per month for 12 months` or `including vat`
469
475
  */
470
- timestamp?: string;
471
- /** Data */
472
- data: {
473
- [key: string]: number;
474
- };
476
+ suffix?: string | null;
475
477
  };
476
- /** MaxProgressScoreRecord */
477
- MaxProgressScoreRecord: {
478
+ /**
479
+ * ProductV2
480
+ * @description A product
481
+ */
482
+ ProductV2: {
478
483
  /**
479
484
  * Id
480
- * @default max_progress_score
481
- * @constant
485
+ * @description The product id as defined by the customer
482
486
  */
483
- id: "max_progress_score";
487
+ id: string;
488
+ /** Name */
489
+ name: string;
484
490
  /**
485
- * Timestamp
486
- * Format: date-time
491
+ * Description
492
+ * @description Description of the product or bundle from the feed data
487
493
  */
488
- timestamp?: string;
489
- data: components["schemas"]["ProgressScoreRecord"];
490
- };
491
- /** PhraseTokenProbabilitiesRecord */
492
- PhraseTokenProbabilitiesRecord: {
494
+ description?: string | null;
493
495
  /**
494
- * Id
495
- * @default phrase_token_probabilities
496
- * @constant
496
+ * Previousprice
497
+ * @description A fallback for headless builds that don't want to use previousPriceDetails. Should include the same info, but as a string.
497
498
  */
498
- id: "phrase_token_probabilities";
499
+ previousPrice?: string | null;
500
+ /** @description The original price of the product or bundle, only set if it's currently discounted. */
501
+ previousPriceDetails?: components["schemas"]["ProductPriceDetails"] | null;
499
502
  /**
500
- * Timestamp
501
- * Format: date-time
503
+ * Price
504
+ * @description A fallback for headless builds that don't want to use priceDetails. Should include the same info, but as a string.
502
505
  */
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;
506
+ price?: string | null;
507
+ /** @description The current price details of the product or bundle. If the product or bundle is discounted, this will hold the discounted price. */
508
+ priceDetails?: components["schemas"]["ProductPriceDetails"] | null;
513
509
  /**
514
- * Descriptiveprice
515
- * @description A user-readable form of the price of this item.
510
+ * Category
511
+ * @description Foe example, `tv`, `internet`, `phone`. It can be used to show an icon in the UI.
516
512
  */
517
- descriptivePrice: string;
513
+ category?: string | null;
518
514
  /**
519
- * Url
520
- * @description Where can we find this product?
515
+ * Extras
516
+ * @description Extras are additional products that are bundled with the main product.
521
517
  */
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;
518
+ extras?: components["schemas"]["ProductExtra"][] | null;
539
519
  };
540
520
  /** Recommendation */
541
521
  Recommendation: {
@@ -544,9 +524,11 @@ interface components {
544
524
  * @description Why was this recommendation made?
545
525
  */
546
526
  explanation: string;
527
+ /** Recommendationid */
528
+ recommendationId?: string | null;
547
529
  /**
548
530
  * Products
549
- * @description The IDs of the products that make up this recommendation
531
+ * @description The products that make up this recommendation
550
532
  */
551
533
  products: components["schemas"]["Product"][];
552
534
  /**
@@ -555,64 +537,37 @@ interface components {
555
537
  * @default []
556
538
  */
557
539
  bundles: components["schemas"]["Bundle"][];
558
- };
559
- /** RootModel[list[TokenProbabilityRecord]] */
560
- RootModel_list_TokenProbabilityRecord__: components["schemas"]["TokenProbabilityRecord"][];
561
- /** RunActionDetailsRecord */
562
- RunActionDetailsRecord: {
563
540
  /**
564
- * Id
565
- * @default run_action_details
566
- * @constant
567
- */
568
- id: "run_action_details";
569
- /**
570
- * Timestamp
571
- * Format: date-time
541
+ * Offers
542
+ * @description The offers that make up this recommendation
543
+ * @default []
572
544
  */
573
- timestamp?: string;
574
- data: components["schemas"]["platform_py_contracts__models__debug_record_v1__RunActionDetailsRecord__Data"];
545
+ offers: components["schemas"]["Offer"][];
575
546
  };
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";
547
+ /**
548
+ * RecommendationV2
549
+ * @description A recommendation with more detailed information for each product and bundle
550
+ */
551
+ RecommendationV2: {
552
+ /** Recommendationid */
553
+ recommendationId?: string | null;
584
554
  /**
585
- * Timestamp
586
- * Format: date-time
555
+ * Products
556
+ * @description The products that make up this recommendation
587
557
  */
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: {
558
+ products: components["schemas"]["ProductV2"][];
603
559
  /**
604
- * Id
605
- * @default triggered_branches
606
- * @constant
560
+ * Bundles
561
+ * @description The bundles that make up this recommendation
562
+ * @default []
607
563
  */
608
- id: "triggered_branches";
564
+ bundles: components["schemas"]["BundleV2"][];
609
565
  /**
610
- * Timestamp
611
- * Format: date-time
566
+ * Offers
567
+ * @description The offers that make up this recommendation
568
+ * @default []
612
569
  */
613
- timestamp?: string;
614
- /** Data */
615
- data: string[];
570
+ offers: components["schemas"]["OfferV2"][];
616
571
  };
617
572
  /**
618
573
  * UserMultiSelectMessage
@@ -704,44 +659,6 @@ interface components {
704
659
  */
705
660
  userMessage: string;
706
661
  };
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
662
  };
746
663
  responses: never;
747
664
  parameters: never;
@@ -750,14 +667,14 @@ interface components {
750
667
  pathItems: never;
751
668
  }
752
669
  interface operations {
753
- generate_conversation_json_response_with_jwt_api_conversation_v3_post: {
670
+ generate_conversation_response_api_conversation_v3_post: {
754
671
  parameters: {
755
672
  query?: never;
756
673
  header?: {
757
674
  "user-agent"?: string;
758
675
  /**
759
676
  * @description Comma-separated list of feature flags (flags might require elevated permissions)
760
- * @example debug
677
+ * @example debug,rec-message-v2
761
678
  */
762
679
  "x-feature-flags"?: string | null;
763
680
  /**
@@ -767,9 +684,15 @@ interface operations {
767
684
  "x-sdk-version"?: string | null;
768
685
  /** @description A UUID marking the unique page view ID, if this request came from a web browser */
769
686
  "x-pageview-id"?: string | null;
687
+ /** @description The URL of the page that is sending requests to the conversation API */
688
+ "x-page-url"?: string | null;
689
+ /** @description The user id assigned to the user by a web analytics platform, for example our customers adobe analytics. */
690
+ "x-web-analytics-platform-user-id"?: string | null;
770
691
  };
771
692
  path?: never;
772
- cookie?: never;
693
+ cookie?: {
694
+ conversation_session_id?: string | null;
695
+ };
773
696
  };
774
697
  requestBody: {
775
698
  content: {
@@ -783,7 +706,7 @@ interface operations {
783
706
  [name: string]: unknown;
784
707
  };
785
708
  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"])[];
709
+ "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"] | components["schemas"]["AssistantExitToPurchaseMessageV2"])[];
787
710
  };
788
711
  };
789
712
  /** @description The user is not authorized to access the requested data */
@@ -1682,11 +1605,13 @@ interface paths {
1682
1605
  * We don't use them directly, or export them here because of how they appear in the documentation site.
1683
1606
  */
1684
1607
  type ApiConversationIdMessage = components['schemas']['AssistantConversationIdMessage'];
1685
- type ApiDebugMessage = components['schemas']['AssistantDebugMessage'];
1686
1608
  type ApiExitToChatMessage = components['schemas']['AssistantExitToChatMessage'];
1609
+ type ApiExitToPhoneMessage = components['schemas']['AssistantExitToPhoneMessage'];
1687
1610
  type ApiExitToPurchaseMessage = components['schemas']['AssistantExitToPurchaseMessage'];
1611
+ type ApiExitToPurchaseV2Message = components['schemas']['AssistantExitToPurchaseMessageV2'];
1688
1612
  type ApiMultiSelectMessage = components['schemas']['AssistantMultiSelectMessage'];
1689
1613
  type ApiRecommendationMessage = components['schemas']['AssistantRecommendationMessage'];
1614
+ type ApiRecommendationV2Message = components['schemas']['AssistantRecommendationMessageV2'];
1690
1615
  type ApiSingleSelectMessage = components['schemas']['AssistantSingleSelectMessage'];
1691
1616
  type ApiTextMessage = components['schemas']['AssistantTextMessage'];
1692
1617
  type ApiIdentityRequest = paths['/api/tracking/identity/v2']['post']['requestBody']['content']['application/json'];
@@ -1759,19 +1684,23 @@ interface Identity {
1759
1684
  * The message types that the SDK returns.
1760
1685
  * Note that the API response may contain additional types that the SDK does not return.
1761
1686
  */
1762
- type Message = ConversationIdMessage | DebugMessage | ExitToChatMessage | ExitToPurchaseMessage | MultiSelectMessage | RecommendationMessage | SingleSelectMessage | TextMessage;
1687
+ type Message = ConversationIdMessage | ExitToChatMessage | ExitToPhoneMessage | ExitToPurchaseMessage | ExitToPurchaseV2Message | MultiSelectMessage | RecommendationMessage | RecommendationV2Message | SingleSelectMessage | TextMessage;
1763
1688
  interface ConversationIdMessage extends ApiConversationIdMessage {
1764
1689
  }
1765
- interface DebugMessage extends ApiDebugMessage {
1766
- }
1767
1690
  interface ExitToChatMessage extends ApiExitToChatMessage {
1768
1691
  }
1692
+ interface ExitToPhoneMessage extends ApiExitToPhoneMessage {
1693
+ }
1769
1694
  interface ExitToPurchaseMessage extends ApiExitToPurchaseMessage {
1770
1695
  }
1696
+ interface ExitToPurchaseV2Message extends ApiExitToPurchaseV2Message {
1697
+ }
1771
1698
  interface MultiSelectMessage extends ApiMultiSelectMessage {
1772
1699
  }
1773
1700
  interface RecommendationMessage extends ApiRecommendationMessage {
1774
1701
  }
1702
+ interface RecommendationV2Message extends ApiRecommendationV2Message {
1703
+ }
1775
1704
  interface SingleSelectMessage extends ApiSingleSelectMessage {
1776
1705
  }
1777
1706
  interface TextMessage extends ApiTextMessage {
@@ -1877,7 +1806,7 @@ declare class Client {
1877
1806
  */
1878
1807
  sendMessage({ userMessage, }: {
1879
1808
  userMessage: string;
1880
- }): Promise<Exclude<Message, ConversationIdMessage | DebugMessage>[] | undefined>;
1809
+ }): Promise<Exclude<Message, ConversationIdMessage>[] | undefined>;
1881
1810
  /**
1882
1811
  * Sends an event to the tracking API, with the required properties already set.
1883
1812
  *
@@ -2217,4 +2146,4 @@ declare const errorMiddleware: Middleware;
2217
2146
  */
2218
2147
  declare const headerMiddleware: (identity: Identity, url: string) => Middleware;
2219
2148
 
2220
- 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 };
2149
+ export { CONVERSATION_ID, Client, type Config, type ConversationIdMessage, type Endpoint, type ExitToChatMessage, type ExitToPhoneMessage, type ExitToPurchaseMessage, type ExitToPurchaseV2Message, 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 };