@stainless-api/docs-search 0.1.0-beta.23 → 0.1.0-beta.25
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/{algolia-gvZUkKkS.js → algolia-elwP_mmI.js} +3 -3
- package/dist/{context-BeqLpg4u.js → context-DIYY3XIj.js} +1 -1
- package/dist/context.d.ts +1 -1
- package/dist/context.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/{indexer-BDmIxFRi.js → indexer-CajKYSRj.js} +7 -6
- package/dist/indexer.d.ts +35 -0
- package/dist/indexer.js +3 -0
- package/dist/mcp.d.ts +2 -4
- package/dist/mcp.js +1 -1
- package/dist/providers/algolia.d.ts +2 -2
- package/dist/providers/algolia.js +2 -2
- package/dist/providers/fuse.d.ts +1 -1
- package/dist/providers/fuse.js +1 -1
- package/dist/providers/pagefind.d.ts +1 -1
- package/dist/providers/walker.d.ts +1 -1
- package/dist/providers/walker.js +1 -1
- package/dist/{types-fPzO2V0p.d.ts → types-CvCRt8tg.d.ts} +47 -32
- package/dist/types.d.ts +1 -1
- package/package.json +7 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as generateIndex, t as generateChatIndex } from "./indexer-
|
|
1
|
+
import { n as generateIndex, t as generateChatIndex } from "./indexer-CajKYSRj.js";
|
|
2
2
|
import { i as SearchableAttributesProse, n as SearchableAttributes, r as SearchableAttributesChat } from "./types-DyGUPDP0.js";
|
|
3
3
|
import { searchClient } from "@algolia/client-search";
|
|
4
4
|
|
|
5
5
|
//#region src/providers/algolia.ts
|
|
6
|
-
async function buildIndex(appId, indexName, writeKey,
|
|
6
|
+
async function buildIndex(appId, indexName, writeKey, content, renderMarkdown) {
|
|
7
7
|
if (!appId || !indexName || !writeKey) return;
|
|
8
|
-
const objects = Array.from(generateIndex(
|
|
8
|
+
const objects = Array.isArray(content) ? content : Array.from(generateIndex(content, renderMarkdown));
|
|
9
9
|
const client = searchClient(appId, writeKey);
|
|
10
10
|
await client.setSettings({
|
|
11
11
|
indexName,
|
package/dist/context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as ResultType, g as SearchSettings, h as SearchParams } from "./types-
|
|
1
|
+
import { f as ResultType, g as SearchSettings, h as SearchParams } from "./types-CvCRt8tg.js";
|
|
2
2
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/context.d.ts
|
package/dist/context.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./indexer-
|
|
2
|
-
import "./algolia-
|
|
3
|
-
import { n as useSearch, r as useSearchContext, t as SearchProvider } from "./context-
|
|
1
|
+
import "./indexer-CajKYSRj.js";
|
|
2
|
+
import "./algolia-elwP_mmI.js";
|
|
3
|
+
import { n as useSearch, r as useSearchContext, t as SearchProvider } from "./context-DIYY3XIj.js";
|
|
4
4
|
|
|
5
5
|
export { SearchProvider, useSearch, useSearchContext };
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./indexer-
|
|
1
|
+
import "./indexer-CajKYSRj.js";
|
|
2
2
|
import { t as QueryKinds } from "./types-DyGUPDP0.js";
|
|
3
|
-
import "./algolia-
|
|
4
|
-
import { n as useSearch, r as useSearchContext } from "./context-
|
|
3
|
+
import "./algolia-elwP_mmI.js";
|
|
4
|
+
import { n as useSearch, r as useSearchContext } from "./context-DIYY3XIj.js";
|
|
5
5
|
import { t as guideSearch } from "./pagefind-DCvI8YmZ.js";
|
|
6
6
|
import { createElement, useEffect, useRef, useState } from "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -72,8 +72,9 @@ function* generateChatIndex(spec) {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
function* generateIndex(spec, renderMarkdownFn, includeTypes) {
|
|
75
|
+
function* generateIndex(spec, renderMarkdownFn, includeTypes, languages) {
|
|
76
76
|
const parentCrumbs = {};
|
|
77
|
+
const targetLangs = languages ?? Languages;
|
|
77
78
|
for (const { data } of walkTree(spec, true)) {
|
|
78
79
|
const { kind, name, title, stainlessPath } = data;
|
|
79
80
|
const common = {
|
|
@@ -84,7 +85,7 @@ function* generateIndex(spec, renderMarkdownFn, includeTypes) {
|
|
|
84
85
|
const crumbs = getResourceNames(parseStainlessPath(stainlessPath).resource, spec.resources);
|
|
85
86
|
switch (kind) {
|
|
86
87
|
case "resource":
|
|
87
|
-
for (const language of
|
|
88
|
+
for (const language of targetLangs) {
|
|
88
89
|
if (!data[language]) continue;
|
|
89
90
|
parentCrumbs[stainlessPath] = crumbs;
|
|
90
91
|
const { Name, QualifiedName } = data[language];
|
|
@@ -101,7 +102,7 @@ function* generateIndex(spec, renderMarkdownFn, includeTypes) {
|
|
|
101
102
|
break;
|
|
102
103
|
case "http_method": {
|
|
103
104
|
const { summary, endpoint, httpMethod } = data;
|
|
104
|
-
for (const language of
|
|
105
|
+
for (const language of targetLangs) {
|
|
105
106
|
const found = spec.decls[language]?.[stainlessPath];
|
|
106
107
|
if (!found) continue;
|
|
107
108
|
parentCrumbs[stainlessPath] = [...crumbs, title];
|
|
@@ -123,7 +124,7 @@ function* generateIndex(spec, renderMarkdownFn, includeTypes) {
|
|
|
123
124
|
}
|
|
124
125
|
break;
|
|
125
126
|
}
|
|
126
|
-
case "model": for (const language of
|
|
127
|
+
case "model": for (const language of targetLangs) {
|
|
127
128
|
if (!spec.decls[language]) continue;
|
|
128
129
|
parentCrumbs[stainlessPath] = [...crumbs, title];
|
|
129
130
|
const schema = spec.decls[language]?.[`${stainlessPath} > (schema)`];
|
|
@@ -143,7 +144,7 @@ function* generateIndex(spec, renderMarkdownFn, includeTypes) {
|
|
|
143
144
|
}
|
|
144
145
|
}
|
|
145
146
|
}
|
|
146
|
-
for (const language of
|
|
147
|
+
for (const language of targetLangs) {
|
|
147
148
|
const decls = spec.decls?.[language];
|
|
148
149
|
if (!decls) continue;
|
|
149
150
|
for (const decl of Object.values(decls)) switch (decl.kind) {
|
|
@@ -178,4 +179,4 @@ function* generateIndex(spec, renderMarkdownFn, includeTypes) {
|
|
|
178
179
|
}
|
|
179
180
|
|
|
180
181
|
//#endregion
|
|
181
|
-
export { generateIndex as n, generateChatIndex as t };
|
|
182
|
+
export { generateIndex as n, getResourceNames as r, generateChatIndex as t };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { b as Resource, n as IndexEntry, x as Spec } from "./types-CvCRt8tg.js";
|
|
2
|
+
import { DocsLanguage } from "@stainless-api/docs-ui/routing";
|
|
3
|
+
|
|
4
|
+
//#region src/indexer.d.ts
|
|
5
|
+
declare function getResourceNames(resourceIds: string[], topResources?: Record<string, Resource>): string[];
|
|
6
|
+
declare function generateChatIndex(spec: Spec): Generator<{
|
|
7
|
+
language: string;
|
|
8
|
+
title: string;
|
|
9
|
+
content: string;
|
|
10
|
+
url: string;
|
|
11
|
+
name?: undefined;
|
|
12
|
+
endpoint?: undefined;
|
|
13
|
+
httpMethod?: undefined;
|
|
14
|
+
summary?: undefined;
|
|
15
|
+
description?: undefined;
|
|
16
|
+
stainlessPath?: undefined;
|
|
17
|
+
qualified?: undefined;
|
|
18
|
+
ident?: undefined;
|
|
19
|
+
} | {
|
|
20
|
+
language: "cli" | "csharp" | "go" | "http" | "java" | "kotlin" | "node" | "php" | "python" | "ruby" | "terraform" | "typescript";
|
|
21
|
+
title: string;
|
|
22
|
+
name: string;
|
|
23
|
+
endpoint: string;
|
|
24
|
+
httpMethod: string;
|
|
25
|
+
summary: string | undefined;
|
|
26
|
+
description: string | undefined;
|
|
27
|
+
stainlessPath: string;
|
|
28
|
+
qualified: string | undefined;
|
|
29
|
+
ident: string | undefined;
|
|
30
|
+
content: string;
|
|
31
|
+
url: string | null;
|
|
32
|
+
}, void, unknown>;
|
|
33
|
+
declare function generateIndex(spec: Spec, renderMarkdownFn?: (_: string) => string | null, includeTypes?: boolean, languages?: DocsLanguage[]): Generator<IndexEntry>;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { generateChatIndex, generateIndex, getResourceNames };
|
package/dist/indexer.js
ADDED
package/dist/mcp.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as IndexEntry, r as IndexMethod, x as Spec } from "./types-CvCRt8tg.js";
|
|
2
|
+
import { generateIndex } from "./indexer.js";
|
|
2
3
|
import { DocsLanguage } from "@stainless-api/docs-ui/routing";
|
|
3
4
|
|
|
4
|
-
//#region src/indexer.d.ts
|
|
5
|
-
declare function generateIndex(spec: Spec, renderMarkdownFn?: (_: string) => string | null, includeTypes?: boolean): Generator<IndexEntry>;
|
|
6
|
-
//#endregion
|
|
7
5
|
//#region src/mcp.d.ts
|
|
8
6
|
type Item = IndexEntry & IndexMethod;
|
|
9
7
|
declare function render(spec: Spec, language: DocsLanguage, items: Item[], includeModelProperties: boolean): any;
|
package/dist/mcp.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as generateIndex } from "./indexer-
|
|
1
|
+
import { n as generateIndex } from "./indexer-CajKYSRj.js";
|
|
2
2
|
import { parseStainlessPath } from "@stainless-api/docs-ui/routing";
|
|
3
3
|
import { renderMarkdown } from "@stainless-api/docs-ui/markdown";
|
|
4
4
|
import { getResourceFromSpec } from "@stainless-api/docs-ui/utils";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as ResultType, g as SearchSettings, h as SearchParams, n as IndexEntry, s as ProseIndexEntry, x as Spec } from "../types-CvCRt8tg.js";
|
|
2
2
|
|
|
3
3
|
//#region src/providers/algolia.d.ts
|
|
4
|
-
declare function buildIndex(appId: string, indexName: string, writeKey: string,
|
|
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
6
|
declare function buildProseIndex(appId: string, indexName: string, writeKey: string, objects: ProseIndexEntry[]): Promise<void>;
|
|
7
7
|
declare function search({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../indexer-
|
|
2
|
-
import { i as search, n as buildIndex, r as buildProseIndex, t as buildChatIndex } from "../algolia-
|
|
1
|
+
import "../indexer-CajKYSRj.js";
|
|
2
|
+
import { i as search, n as buildIndex, r as buildProseIndex, t as buildChatIndex } from "../algolia-elwP_mmI.js";
|
|
3
3
|
|
|
4
4
|
export { buildChatIndex, buildIndex, buildProseIndex, search };
|
package/dist/providers/fuse.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as IndexEntry, x as Spec } from "../types-CvCRt8tg.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";
|
package/dist/providers/fuse.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as GuideResultType } from "../types-
|
|
1
|
+
import { t as GuideResultType } from "../types-CvCRt8tg.js";
|
|
2
2
|
|
|
3
3
|
//#region src/providers/pagefind.d.ts
|
|
4
4
|
declare function guideSearch(loadPath: string, query: string, limit?: number): Promise<GuideResultType[]>;
|
package/dist/providers/walker.js
CHANGED
|
@@ -111,7 +111,7 @@ type DiscriminatorObject = {
|
|
|
111
111
|
type ExampleObject = {
|
|
112
112
|
summary?: string;
|
|
113
113
|
description?: string;
|
|
114
|
-
value?:
|
|
114
|
+
value?: unknown;
|
|
115
115
|
externalValue?: string;
|
|
116
116
|
};
|
|
117
117
|
type EncodingsObject = {
|
|
@@ -139,7 +139,7 @@ type ResponseContentObject = {
|
|
|
139
139
|
type HeadersObject = {
|
|
140
140
|
[key: string]: HeaderObject;
|
|
141
141
|
};
|
|
142
|
-
type SupportedLanguage = 'node' | 'typescript' | 'python' | 'go' | 'java' | 'kotlin' | 'ruby' | 'terraform' | 'cli' | 'php' | 'csharp' | 'http';
|
|
142
|
+
type SupportedLanguage = 'node' | 'typescript' | 'python' | 'go' | 'java' | 'kotlin' | 'ruby' | 'terraform' | 'cli' | 'php' | 'csharp' | 'sql' | 'http' | 'openapi';
|
|
143
143
|
interface Config {
|
|
144
144
|
docs: {
|
|
145
145
|
title?: string | undefined;
|
|
@@ -160,22 +160,7 @@ interface Config {
|
|
|
160
160
|
show_security?: boolean | undefined;
|
|
161
161
|
show_readme?: boolean | undefined;
|
|
162
162
|
base_path?: string | undefined;
|
|
163
|
-
navigation?:
|
|
164
|
-
menubar?: {
|
|
165
|
-
title: string;
|
|
166
|
-
icon?: 'Github' | 'BookOpen' | 'Code' | 'Folder' | 'Mail' | 'NPM' | 'Search' | 'Package' | 'User' | 'Pen' | 'Pencil' | 'Wrench' | 'Bot' | 'FileText' | 'Lightbulb' | 'Sparkles' | 'Menu' | 'History' | undefined;
|
|
167
|
-
variant?: 'ghost-muted' | 'outline-muted' | 'outline' | undefined;
|
|
168
|
-
href?: string | undefined;
|
|
169
|
-
page?: string | undefined;
|
|
170
|
-
}[] | undefined;
|
|
171
|
-
sidebar?: {
|
|
172
|
-
title: string;
|
|
173
|
-
icon?: 'Github' | 'BookOpen' | 'Code' | 'Folder' | 'Mail' | 'NPM' | 'Search' | 'Package' | 'User' | 'Pen' | 'Pencil' | 'Wrench' | 'Bot' | 'FileText' | 'Lightbulb' | 'Sparkles' | 'Menu' | 'History' | undefined;
|
|
174
|
-
variant?: 'ghost-muted' | 'outline-muted' | 'outline' | undefined;
|
|
175
|
-
href?: string | undefined;
|
|
176
|
-
page?: string | undefined;
|
|
177
|
-
}[] | undefined;
|
|
178
|
-
} | undefined;
|
|
163
|
+
navigation?: unknown;
|
|
179
164
|
pages?: Record<string, string> | undefined;
|
|
180
165
|
resources?: {
|
|
181
166
|
title: string;
|
|
@@ -225,7 +210,8 @@ type HttpDeclProperty = BaseDeclaration & {
|
|
|
225
210
|
location?: string;
|
|
226
211
|
type: HttpType;
|
|
227
212
|
constraints?: Constraints;
|
|
228
|
-
default?:
|
|
213
|
+
default?: unknown;
|
|
214
|
+
examples?: unknown[];
|
|
229
215
|
optional?: boolean;
|
|
230
216
|
nullable?: boolean;
|
|
231
217
|
declare?: boolean;
|
|
@@ -333,6 +319,7 @@ type RubyDeclProperty = BaseDeclaration & {
|
|
|
333
319
|
type: RubyType;
|
|
334
320
|
constraints?: Constraints;
|
|
335
321
|
optional?: boolean;
|
|
322
|
+
examples?: unknown[];
|
|
336
323
|
schemaType?: SchemaType;
|
|
337
324
|
modelPath?: string;
|
|
338
325
|
childrenParentSchema?: SchemaType;
|
|
@@ -430,7 +417,7 @@ type RubyTypeUnknown = BaseType & {
|
|
|
430
417
|
kind: 'RubyTypeUnknown';
|
|
431
418
|
};
|
|
432
419
|
type SDKSchemaReference = never;
|
|
433
|
-
type SDKSchemaType =
|
|
420
|
+
type SDKSchemaType = string;
|
|
434
421
|
type SDKPropertySchemaReference<T = never> = never;
|
|
435
422
|
/**
|
|
436
423
|
* Base declaration types for CLI command AST
|
|
@@ -455,7 +442,7 @@ type CLICommand = BaseDeclaration & {
|
|
|
455
442
|
ident: string;
|
|
456
443
|
qualified?: string;
|
|
457
444
|
docstring?: string;
|
|
458
|
-
parameters?:
|
|
445
|
+
parameters?: unknown[];
|
|
459
446
|
responseType?: HttpType;
|
|
460
447
|
};
|
|
461
448
|
/**
|
|
@@ -483,10 +470,10 @@ type CLIFlag = BaseDeclaration & {
|
|
|
483
470
|
docstring?: string;
|
|
484
471
|
optional?: boolean;
|
|
485
472
|
type?: HttpType;
|
|
486
|
-
constraints?:
|
|
473
|
+
constraints?: unknown;
|
|
487
474
|
schemaType?: string;
|
|
488
475
|
modelPath?: string;
|
|
489
|
-
childrenParentSchema?:
|
|
476
|
+
childrenParentSchema?: unknown;
|
|
490
477
|
children?: ID[];
|
|
491
478
|
};
|
|
492
479
|
/**
|
|
@@ -499,10 +486,10 @@ type CLISchemaProperty = BaseDeclaration & {
|
|
|
499
486
|
type?: HttpType;
|
|
500
487
|
docstring?: string;
|
|
501
488
|
optional?: boolean;
|
|
502
|
-
constraints?:
|
|
489
|
+
constraints?: unknown;
|
|
503
490
|
schemaType?: string;
|
|
504
491
|
children?: ID[];
|
|
505
|
-
childrenParentSchema?:
|
|
492
|
+
childrenParentSchema?: unknown;
|
|
506
493
|
};
|
|
507
494
|
/**
|
|
508
495
|
* Represents data piped in to stdin
|
|
@@ -557,6 +544,7 @@ type CSharpDeclProperty = BaseDeclaration & {
|
|
|
557
544
|
type: CSharpType;
|
|
558
545
|
optional?: boolean;
|
|
559
546
|
nullable?: boolean;
|
|
547
|
+
examples?: unknown[];
|
|
560
548
|
schemaType?: SchemaType;
|
|
561
549
|
modelPath?: string;
|
|
562
550
|
childrenParentSchema?: SchemaType;
|
|
@@ -648,6 +636,7 @@ type JavaDeclProperty = BaseDeclaration & {
|
|
|
648
636
|
ident: JavaIdentifier;
|
|
649
637
|
type: JavaType;
|
|
650
638
|
optional?: boolean;
|
|
639
|
+
examples?: unknown[];
|
|
651
640
|
schemaType?: SchemaType;
|
|
652
641
|
modelPath?: string;
|
|
653
642
|
childrenParentSchema?: SchemaType;
|
|
@@ -735,6 +724,7 @@ type PhpDeclParam = BaseDeclaration & {
|
|
|
735
724
|
optional: boolean;
|
|
736
725
|
isPositional: boolean;
|
|
737
726
|
default?: unknown;
|
|
727
|
+
examples?: unknown[];
|
|
738
728
|
oasRef?: string;
|
|
739
729
|
modelPath?: string;
|
|
740
730
|
docstring?: string;
|
|
@@ -760,6 +750,7 @@ type PhpDeclClassProperty = BaseDeclaration & {
|
|
|
760
750
|
nullable: boolean;
|
|
761
751
|
docstring?: string;
|
|
762
752
|
default?: string;
|
|
753
|
+
examples?: unknown[];
|
|
763
754
|
deprecated?: string | boolean;
|
|
764
755
|
modelPath?: string;
|
|
765
756
|
children?: ID[];
|
|
@@ -888,7 +879,8 @@ type PythonDeclProperty = BaseDeclaration & {
|
|
|
888
879
|
type: PythonType;
|
|
889
880
|
constraints?: Constraints;
|
|
890
881
|
optional?: boolean;
|
|
891
|
-
default?:
|
|
882
|
+
default?: unknown;
|
|
883
|
+
examples?: unknown[];
|
|
892
884
|
schemaType?: SchemaType;
|
|
893
885
|
modelPath?: string;
|
|
894
886
|
childrenParentSchema?: SchemaType;
|
|
@@ -1032,7 +1024,8 @@ type TerraformAttribute = {
|
|
|
1032
1024
|
isBodyRootParam?: boolean;
|
|
1033
1025
|
syntheticType?: 'id' | 'find-by' | 'max-items' | 'items' | 'timeout';
|
|
1034
1026
|
schemaType: TerraformSchemaType;
|
|
1035
|
-
pathExpr: PathExpression$1;
|
|
1027
|
+
pathExpr: PathExpression$1; /** whether this attribute is immediately nested inside a computed (or computed_optional) collection/object */
|
|
1028
|
+
nestedInComputedAttribute?: boolean;
|
|
1036
1029
|
};
|
|
1037
1030
|
declare const TerraformPathValidations: readonly ['requiredTogether', 'atLeastOneOf', 'exactlyOneOf', 'conflicting'];
|
|
1038
1031
|
type PathValidators = Record<(typeof TerraformPathValidations)[number], PathExpression$1[][]>;
|
|
@@ -1148,7 +1141,8 @@ type TSDeclProperty = BaseDeclaration & {
|
|
|
1148
1141
|
constraints?: Constraints;
|
|
1149
1142
|
optional?: boolean;
|
|
1150
1143
|
declare?: boolean;
|
|
1151
|
-
default?:
|
|
1144
|
+
default?: unknown;
|
|
1145
|
+
examples?: unknown[];
|
|
1152
1146
|
schemaType?: SchemaType;
|
|
1153
1147
|
modelPath?: string;
|
|
1154
1148
|
childrenParentSchema?: SchemaType;
|
|
@@ -1302,7 +1296,27 @@ type Spec = {
|
|
|
1302
1296
|
} };
|
|
1303
1297
|
readme: { [lang in SpecLanguage]?: string };
|
|
1304
1298
|
decls: { [lang in SpecLanguage]?: Record<string, LanguageDeclNodes[lang]> };
|
|
1305
|
-
snippets: { [key in SnippetLanguage]?: Record<string,
|
|
1299
|
+
snippets: { [key in SnippetLanguage]?: Record<string, {
|
|
1300
|
+
default: {
|
|
1301
|
+
content: string;
|
|
1302
|
+
};
|
|
1303
|
+
[key: `custom:${string}`]: {
|
|
1304
|
+
content: string;
|
|
1305
|
+
};
|
|
1306
|
+
}> };
|
|
1307
|
+
snippetResponses: {
|
|
1308
|
+
http: Record<string, {
|
|
1309
|
+
default?: {
|
|
1310
|
+
status: string;
|
|
1311
|
+
content: string;
|
|
1312
|
+
contentType?: string;
|
|
1313
|
+
}[];
|
|
1314
|
+
[key: `custom:${string}`]: {
|
|
1315
|
+
status?: string;
|
|
1316
|
+
content: string;
|
|
1317
|
+
}[];
|
|
1318
|
+
}>;
|
|
1319
|
+
};
|
|
1306
1320
|
};
|
|
1307
1321
|
type Resource = (HasConfigRef & HasStainlessPath) & {
|
|
1308
1322
|
kind: 'resource';
|
|
@@ -1326,7 +1340,7 @@ type Method = (HasStainlessPath & HasOASRef) & {
|
|
|
1326
1340
|
summary?: string;
|
|
1327
1341
|
httpMethod: string;
|
|
1328
1342
|
endpoint: string;
|
|
1329
|
-
deprecated?: string | boolean;
|
|
1343
|
+
deprecated?: string | boolean; /** @deprecated - use snippetResponses at the top level */
|
|
1330
1344
|
exampleResponses?: Record<string, ResponseContentObject>;
|
|
1331
1345
|
security: Record<string, string[]>[] | undefined;
|
|
1332
1346
|
'x-api-token-group'?: string[];
|
|
@@ -1430,7 +1444,8 @@ type GoDeclProperty = BaseDeclaration & {
|
|
|
1430
1444
|
type: GoType;
|
|
1431
1445
|
constraints?: Constraints;
|
|
1432
1446
|
optional?: boolean;
|
|
1433
|
-
default?:
|
|
1447
|
+
default?: unknown;
|
|
1448
|
+
examples?: unknown[];
|
|
1434
1449
|
schemaType?: SchemaType;
|
|
1435
1450
|
modelPath?: string;
|
|
1436
1451
|
childrenParentSchema?: SchemaType;
|
|
@@ -1582,4 +1597,4 @@ type ProseIndexEntry = {
|
|
|
1582
1597
|
[additional: string]: unknown;
|
|
1583
1598
|
};
|
|
1584
1599
|
//#endregion
|
|
1585
|
-
export { SearchableAttributes as _, IndexProperty as a,
|
|
1600
|
+
export { SearchableAttributes as _, IndexProperty as a, Resource as b, QueryKinds as c, ResultRecordType as d, ResultType as f, SearchSettings as g, SearchParams as h, IndexModel as i, QueryKindsType as l, SearchAttributeNames as m, IndexEntry as n, IndexResource as o, RoutableJsonNode as p, IndexMethod as r, ProseIndexEntry as s, GuideResultType as t, ResultData as u, SearchableAttributesChat as v, Spec as x, SearchableAttributesProse as y };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as SearchableAttributes, a as IndexProperty, c as QueryKinds, d as ResultRecordType, f as ResultType, g as SearchSettings, h as SearchParams, i as IndexModel, l as QueryKindsType, m as SearchAttributeNames, n as IndexEntry, o as IndexResource, p as RoutableJsonNode, r as IndexMethod, s as ProseIndexEntry, t as GuideResultType, u as ResultData, v as SearchableAttributesChat, y as SearchableAttributesProse } from "./types-
|
|
1
|
+
import { _ as SearchableAttributes, a as IndexProperty, c as QueryKinds, d as ResultRecordType, f as ResultType, g as SearchSettings, h as SearchParams, i as IndexModel, l as QueryKindsType, m as SearchAttributeNames, n as IndexEntry, o as IndexResource, p as RoutableJsonNode, r as IndexMethod, s as ProseIndexEntry, t as GuideResultType, u as ResultData, v as SearchableAttributesChat, y as SearchableAttributesProse } from "./types-CvCRt8tg.js";
|
|
2
2
|
export { GuideResultType, IndexEntry, IndexMethod, IndexModel, IndexProperty, IndexResource, ProseIndexEntry, QueryKinds, QueryKindsType, ResultData, ResultRecordType, ResultType, RoutableJsonNode, SearchAttributeNames, SearchParams, SearchSettings, SearchableAttributes, SearchableAttributesChat, SearchableAttributesProse };
|
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.25",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"fuse.js": "^7.1.0",
|
|
20
20
|
"htmlparser2": "^10.1.0",
|
|
21
21
|
"lucide-react": "^0.562.0",
|
|
22
|
-
"@stainless-api/docs-ui": "0.1.0-beta.
|
|
22
|
+
"@stainless-api/docs-ui": "0.1.0-beta.72",
|
|
23
23
|
"@stainless-api/ui-primitives": "0.1.0-beta.47"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
@@ -31,13 +31,16 @@
|
|
|
31
31
|
"react-dom": "^19.2.4",
|
|
32
32
|
"tsdown": "^0.20.0",
|
|
33
33
|
"typescript": "5.9.3",
|
|
34
|
-
"@stainless/
|
|
35
|
-
"@stainless/
|
|
34
|
+
"@stainless/eslint-config": "0.1.0-beta.1",
|
|
35
|
+
"@stainless/sdk-json": "^0.1.0-beta.5"
|
|
36
36
|
},
|
|
37
37
|
"exports": {
|
|
38
38
|
".": {
|
|
39
39
|
"default": "./dist/index.js"
|
|
40
40
|
},
|
|
41
|
+
"./indexer": {
|
|
42
|
+
"default": "./dist/indexer.js"
|
|
43
|
+
},
|
|
41
44
|
"./context": {
|
|
42
45
|
"default": "./dist/context.js"
|
|
43
46
|
},
|