@docsearch/js 4.5.0-beta.2 → 4.5.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.
- package/dist/esm/index.d.ts +35 -15
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/umd/index.js +2 -2
- package/dist/umd/index.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.d.ts
CHANGED
|
@@ -8405,8 +8405,9 @@ type AskAiSearchParameters = {
|
|
|
8405
8405
|
filters?: string;
|
|
8406
8406
|
attributesToRetrieve?: string[];
|
|
8407
8407
|
restrictSearchableAttributes?: string[];
|
|
8408
|
-
distinct?: boolean;
|
|
8408
|
+
distinct?: boolean | number | string;
|
|
8409
8409
|
};
|
|
8410
|
+
type AgentStudioSearchParameters = Record<string, Omit<AskAiSearchParameters, 'facetFilters'>>;
|
|
8410
8411
|
type DocSearchAskAi = {
|
|
8411
8412
|
/**
|
|
8412
8413
|
* The index name to use for the ask AI feature. Your assistant will search this index for relevant documents.
|
|
@@ -8427,10 +8428,6 @@ type DocSearchAskAi = {
|
|
|
8427
8428
|
* The assistant ID to use for the ask AI feature.
|
|
8428
8429
|
*/
|
|
8429
8430
|
assistantId: string;
|
|
8430
|
-
/**
|
|
8431
|
-
* The search parameters to use for the ask AI feature.
|
|
8432
|
-
*/
|
|
8433
|
-
searchParameters?: AskAiSearchParameters;
|
|
8434
8431
|
/**
|
|
8435
8432
|
* Enables displaying suggested questions on Ask AI's new conversation screen.
|
|
8436
8433
|
*
|
|
@@ -8438,7 +8435,39 @@ type DocSearchAskAi = {
|
|
|
8438
8435
|
*/
|
|
8439
8436
|
suggestedQuestions?: boolean;
|
|
8440
8437
|
useStagingEnv?: boolean;
|
|
8441
|
-
}
|
|
8438
|
+
} & ({
|
|
8439
|
+
/**
|
|
8440
|
+
* **Experimental:** Whether to use Agent Studio as the chat backend.
|
|
8441
|
+
*
|
|
8442
|
+
* This is an experimental feature and its API may change without notice in future releases.
|
|
8443
|
+
* Use with caution in production environments.
|
|
8444
|
+
*
|
|
8445
|
+
* @default false
|
|
8446
|
+
*/
|
|
8447
|
+
agentStudio?: never;
|
|
8448
|
+
/**
|
|
8449
|
+
* The search parameters to use for the ask AI feature.
|
|
8450
|
+
*
|
|
8451
|
+
* **NOTE**: If using `agentStudio = true`, the `searchParameters` object is
|
|
8452
|
+
* keyed by the index name.
|
|
8453
|
+
*/
|
|
8454
|
+
searchParameters?: AskAiSearchParameters;
|
|
8455
|
+
} | {
|
|
8456
|
+
agentStudio: false;
|
|
8457
|
+
searchParameters?: AskAiSearchParameters;
|
|
8458
|
+
} | {
|
|
8459
|
+
agentStudio: true;
|
|
8460
|
+
/**
|
|
8461
|
+
* The search parameters to use for the ask AI feature.
|
|
8462
|
+
* Keyed by the index name.
|
|
8463
|
+
*
|
|
8464
|
+
* @example
|
|
8465
|
+
* {
|
|
8466
|
+
* "INDEX_NAME": { distinct: false }
|
|
8467
|
+
* }
|
|
8468
|
+
*/
|
|
8469
|
+
searchParameters?: AgentStudioSearchParameters;
|
|
8470
|
+
});
|
|
8442
8471
|
interface DocSearchIndex {
|
|
8443
8472
|
name: string;
|
|
8444
8473
|
searchParameters?: SearchParamsObject;
|
|
@@ -8475,15 +8504,6 @@ interface DocSearchProps$1 {
|
|
|
8475
8504
|
* Useful to route Ask AI into a different UI (e.g. `@docsearch/sidepanel-js`) without flicker.
|
|
8476
8505
|
*/
|
|
8477
8506
|
interceptAskAiEvent?: (initialMessage: InitialAskAiMessage) => boolean | void;
|
|
8478
|
-
/**
|
|
8479
|
-
* **Experimental:** Whether to use Agent Studio as the chat backend.
|
|
8480
|
-
*
|
|
8481
|
-
* This is an experimental feature and its API may change without notice in future releases.
|
|
8482
|
-
* Use with caution in production environments.
|
|
8483
|
-
*
|
|
8484
|
-
* @default false
|
|
8485
|
-
*/
|
|
8486
|
-
agentStudio?: boolean;
|
|
8487
8507
|
/**
|
|
8488
8508
|
* Theme overrides applied to the modal and related components.
|
|
8489
8509
|
*/
|