@docsearch/react 4.1.0 → 4.2.0

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.
@@ -115,6 +115,13 @@ type DocSearchTransformClient = {
115
115
  addAlgoliaAgent: LiteClient['addAlgoliaAgent'];
116
116
  transporter: Pick<LiteClient['transporter'], 'algoliaAgent'>;
117
117
  };
118
+ type AskAiSearchParameters = {
119
+ facetFilters?: string[];
120
+ filters?: string;
121
+ attributesToRetrieve?: string[];
122
+ restrictSearchableAttributes?: string[];
123
+ distinct?: boolean;
124
+ };
118
125
  type DocSearchAskAi = {
119
126
  /**
120
127
  * The index name to use for the ask AI feature. Your assistant will search this index for relevant documents.
@@ -138,9 +145,7 @@ type DocSearchAskAi = {
138
145
  /**
139
146
  * The search parameters to use for the ask AI feature.
140
147
  */
141
- searchParameters?: {
142
- facetFilters?: SearchParamsObject['facetFilters'];
143
- };
148
+ searchParameters?: AskAiSearchParameters;
144
149
  };
145
150
  interface DocSearchIndex {
146
151
  name: string;
@@ -271,6 +276,11 @@ type FooterTranslations = Partial<{
271
276
  poweredByText: string;
272
277
  }>;
273
278
 
279
+ type NewConversationTranslations = Partial<{
280
+ newConversationTitle: string;
281
+ newConversationDescription: string;
282
+ }>;
283
+
274
284
  type AskAiScreenTranslations = Partial<{
275
285
  disclaimerText: string;
276
286
  relatedSourcesText: string;
@@ -300,6 +310,10 @@ type AskAiScreenTranslations = Partial<{
300
310
  lastSeparator?: string;
301
311
  after?: string;
302
312
  };
313
+ /**
314
+ * Message that's shown when user has stopped the streaming of a message.
315
+ */
316
+ stoppedStreamingText: string;
303
317
  }>;
304
318
 
305
319
  type ErrorScreenTranslations = Partial<{
@@ -316,6 +330,7 @@ type NoResultsScreenTranslations = Partial<{
316
330
 
317
331
  type ResultsScreenTranslations = Partial<{
318
332
  askAiPlaceholder: string;
333
+ noResultsAskAiPlaceholder: string;
319
334
  }>;
320
335
 
321
336
  type StartScreenTranslations = Partial<{
@@ -335,6 +350,7 @@ type ScreenStateTranslations = Partial<{
335
350
  noResultsScreen: NoResultsScreenTranslations;
336
351
  resultsScreen: ResultsScreenTranslations;
337
352
  askAiScreen: AskAiScreenTranslations;
353
+ newConversation: NewConversationTranslations;
338
354
  }>;
339
355
 
340
356
  type SearchBoxTranslations = Partial<{
@@ -350,10 +366,15 @@ type SearchBoxTranslations = Partial<{
350
366
  searchInputLabel: string;
351
367
  backToKeywordSearchButtonText: string;
352
368
  backToKeywordSearchButtonAriaLabel: string;
369
+ newConversationPlaceholder: string;
370
+ conversationHistoryTitle: string;
371
+ startNewConversationText: string;
372
+ viewConversationHistoryText: string;
353
373
  }>;
354
374
 
355
375
  type ModalTranslations = Partial<{
356
376
  searchBox: SearchBoxTranslations;
377
+ newConversation: NewConversationTranslations;
357
378
  footer: FooterTranslations;
358
379
  }> & ScreenStateTranslations;
359
380
  type DocSearchModalProps = DocSearchProps & {