@stainless-api/docs-search 0.1.0-beta.47 → 0.1.0-beta.49
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/context.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/indexer.d.ts +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/providers/algolia.d.ts +2 -3
- package/dist/providers/algolia.js +2 -14
- package/dist/providers/fuse.d.ts +1 -1
- package/dist/providers/pagefind.d.ts +1 -1
- package/dist/providers/pagefind.js +4 -1
- package/dist/providers/walker.d.ts +1 -1
- package/dist/{types-DH8q6hlw.d.ts → types-D0suCLuC.d.ts} +1 -9
- package/dist/types.d.ts +2 -2
- package/dist/types.js +1 -2
- package/package.json +9 -9
package/dist/context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as ResultType, h as SearchSettings, m as SearchParams } from "./types-D0suCLuC.js";
|
|
2
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/context.d.ts
|
package/dist/index.d.ts
CHANGED
package/dist/indexer.d.ts
CHANGED
package/dist/mcp.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as IndexEntry, r as IndexMethod,
|
|
1
|
+
import { n as IndexEntry, r as IndexMethod, y as Spec } from "./types-D0suCLuC.js";
|
|
2
2
|
import { generateIndex } from "./indexer.js";
|
|
3
3
|
import { DocsLanguage } from "@stainless-api/docs-ui/routing";
|
|
4
4
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as ResultType, h as SearchSettings, m as SearchParams, n as IndexEntry, y as Spec } from "../types-D0suCLuC.js";
|
|
2
2
|
|
|
3
3
|
//#region src/providers/algolia.d.ts
|
|
4
4
|
declare function buildIndex(appId: string, indexName: string, writeKey: string, content: Spec | IndexEntry[], renderMarkdown: (_: string) => string | null): Promise<void>;
|
|
5
5
|
declare function buildChatIndex(appId: string, indexName: string, writeKey: string, spec: Spec): Promise<void>;
|
|
6
|
-
declare function buildProseIndex(appId: string, indexName: string, writeKey: string, objects: ProseIndexEntry[]): Promise<void>;
|
|
7
6
|
declare function search({
|
|
8
7
|
settings: {
|
|
9
8
|
appId,
|
|
@@ -20,4 +19,4 @@ declare function search({
|
|
|
20
19
|
settings: SearchSettings;
|
|
21
20
|
}): Promise<ResultType | undefined>;
|
|
22
21
|
//#endregion
|
|
23
|
-
export { buildChatIndex, buildIndex,
|
|
22
|
+
export { buildChatIndex, buildIndex, search };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { generateChatIndex, generateIndex } from "../indexer.js";
|
|
2
|
-
import { SearchableAttributes, SearchableAttributesChat
|
|
2
|
+
import { SearchableAttributes, SearchableAttributesChat } from "../types.js";
|
|
3
3
|
import { searchClient } from "@algolia/client-search";
|
|
4
4
|
//#region src/providers/algolia.ts
|
|
5
5
|
async function buildIndex(appId, indexName, writeKey, content, renderMarkdown) {
|
|
@@ -38,18 +38,6 @@ async function buildChatIndex(appId, indexName, writeKey, spec) {
|
|
|
38
38
|
objects
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
async function buildProseIndex(appId, indexName, writeKey, objects) {
|
|
42
|
-
if (!appId || !indexName || !writeKey) return;
|
|
43
|
-
const client = searchClient(appId, writeKey);
|
|
44
|
-
await client.setSettings({
|
|
45
|
-
indexName,
|
|
46
|
-
indexSettings: { searchableAttributes: SearchableAttributesProse }
|
|
47
|
-
});
|
|
48
|
-
await client.replaceAllObjects({
|
|
49
|
-
indexName,
|
|
50
|
-
objects
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
41
|
async function search({ settings: { appId, indexName, searchKey }, params: { query, language, kind } }) {
|
|
54
42
|
const client = searchClient(appId, searchKey);
|
|
55
43
|
const filters = language ? `language:${language}` : void 0;
|
|
@@ -78,4 +66,4 @@ async function search({ settings: { appId, indexName, searchKey }, params: { que
|
|
|
78
66
|
}
|
|
79
67
|
}
|
|
80
68
|
//#endregion
|
|
81
|
-
export { buildChatIndex, buildIndex,
|
|
69
|
+
export { buildChatIndex, buildIndex, search };
|
package/dist/providers/fuse.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as IndexEntry,
|
|
1
|
+
import { n as IndexEntry, y as Spec } from "../types-D0suCLuC.js";
|
|
2
2
|
import { DocsLanguage } from "@stainless-api/docs-ui/routing";
|
|
3
3
|
import * as _$fuse_js0 from "fuse.js";
|
|
4
4
|
import { FuseIndex } from "fuse.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as GuideResultType } from "../types-
|
|
1
|
+
import { t as GuideResultType } from "../types-D0suCLuC.js";
|
|
2
2
|
|
|
3
3
|
//#region src/providers/pagefind.d.ts
|
|
4
4
|
declare function guideSearch(loadPath: string, query: string, limit?: number): Promise<GuideResultType[]>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
//#region src/providers/pagefind.ts
|
|
2
2
|
async function loadPagefind(path) {
|
|
3
|
-
return await import(
|
|
3
|
+
return await import(
|
|
4
|
+
/* @vite-ignore */
|
|
5
|
+
new URL(path, import.meta.url).href
|
|
6
|
+
);
|
|
4
7
|
}
|
|
5
8
|
async function guideSearch(loadPath, query, limit) {
|
|
6
9
|
try {
|
|
@@ -1554,7 +1554,6 @@ type IndexMethod = Pick<Method, 'kind' | 'summary' | 'description' | 'endpoint'
|
|
|
1554
1554
|
};
|
|
1555
1555
|
declare const SearchableAttributes: readonly ["name", "title", "ident", "Name", "qualified", "QualifiedName", "endpoint", "summary", "description", "docstring"];
|
|
1556
1556
|
declare const SearchableAttributesChat: string[];
|
|
1557
|
-
declare const SearchableAttributesProse: string[];
|
|
1558
1557
|
type SearchAttributeNames = (typeof SearchableAttributes)[number];
|
|
1559
1558
|
type RoutableJsonNode = Method | Model | Resource;
|
|
1560
1559
|
type IndexEntry = Pick<RoutableJsonNode, 'name' | 'stainlessPath'> & (IndexProperty | IndexModel | IndexResource | IndexMethod) & {
|
|
@@ -1595,12 +1594,5 @@ type ResultData = {
|
|
|
1595
1594
|
items: Array<ResultRecordType | GuideResultType>;
|
|
1596
1595
|
counts: Partial<Record<QueryKindsType, number>>;
|
|
1597
1596
|
};
|
|
1598
|
-
type ProseIndexEntry = {
|
|
1599
|
-
id?: string;
|
|
1600
|
-
tag: string;
|
|
1601
|
-
content: string;
|
|
1602
|
-
source?: string;
|
|
1603
|
-
[additional: string]: unknown;
|
|
1604
|
-
};
|
|
1605
1597
|
//#endregion
|
|
1606
|
-
export {
|
|
1598
|
+
export { SearchableAttributesChat as _, IndexProperty as a, QueryKindsType as c, ResultType as d, RoutableJsonNode as f, SearchableAttributes as g, SearchSettings as h, IndexModel as i, ResultData as l, SearchParams as m, IndexEntry as n, IndexResource as o, SearchAttributeNames as p, IndexMethod as r, QueryKinds as s, GuideResultType as t, ResultRecordType as u, Resource as v, Spec as y };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
export { GuideResultType, IndexEntry, IndexMethod, IndexModel, IndexProperty, IndexResource,
|
|
1
|
+
import { _ as SearchableAttributesChat, a as IndexProperty, c as QueryKindsType, d as ResultType, f as RoutableJsonNode, g as SearchableAttributes, h as SearchSettings, i as IndexModel, l as ResultData, m as SearchParams, n as IndexEntry, o as IndexResource, p as SearchAttributeNames, r as IndexMethod, s as QueryKinds, t as GuideResultType, u as ResultRecordType } from "./types-D0suCLuC.js";
|
|
2
|
+
export { GuideResultType, IndexEntry, IndexMethod, IndexModel, IndexProperty, IndexResource, QueryKinds, QueryKindsType, ResultData, ResultRecordType, ResultType, RoutableJsonNode, SearchAttributeNames, SearchParams, SearchSettings, SearchableAttributes, SearchableAttributesChat };
|
package/dist/types.js
CHANGED
|
@@ -29,6 +29,5 @@ const SearchableAttributesChat = [
|
|
|
29
29
|
"ident",
|
|
30
30
|
"content"
|
|
31
31
|
];
|
|
32
|
-
const SearchableAttributesProse = ["content"];
|
|
33
32
|
//#endregion
|
|
34
|
-
export { QueryKinds, SearchableAttributes, SearchableAttributesChat
|
|
33
|
+
export { QueryKinds, SearchableAttributes, SearchableAttributesChat };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stainless-api/docs-search",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.49",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -13,22 +13,22 @@
|
|
|
13
13
|
"react-dom": ">=19.0.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@algolia/client-search": "^5.
|
|
16
|
+
"@algolia/client-search": "^5.52.0",
|
|
17
17
|
"@markdoc/markdoc": "^0.5.7",
|
|
18
18
|
"fuse.js": "^7.3.0",
|
|
19
|
-
"lucide-react": "^
|
|
20
|
-
"@stainless-api/docs-ui": "0.1.0-beta.
|
|
19
|
+
"lucide-react": "^1.14.0",
|
|
20
|
+
"@stainless-api/docs-ui": "0.1.0-beta.95",
|
|
21
21
|
"@stainless-api/ui-primitives": "0.1.0-beta.53"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "24.12.2",
|
|
25
25
|
"@types/react": "19.2.14",
|
|
26
26
|
"@types/react-dom": "^19.2.3",
|
|
27
|
-
"dotenv": "17.4.
|
|
28
|
-
"react": "^19.2.
|
|
29
|
-
"react-dom": "^19.2.
|
|
30
|
-
"tsdown": "^0.21.
|
|
31
|
-
"typescript": "6.0.
|
|
27
|
+
"dotenv": "17.4.2",
|
|
28
|
+
"react": "^19.2.5",
|
|
29
|
+
"react-dom": "^19.2.5",
|
|
30
|
+
"tsdown": "^0.21.10",
|
|
31
|
+
"typescript": "6.0.3",
|
|
32
32
|
"@stainless/eslint-config": "0.1.0-beta.2",
|
|
33
33
|
"@stainless/sdk-json": "^0.1.0-beta.10"
|
|
34
34
|
},
|