@stainless-api/docs 0.1.0-beta.93 → 0.1.0-beta.95
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/CHANGELOG.md +25 -0
- package/eslint-suppressions.json +0 -5
- package/package.json +4 -4
- package/plugin/buildAlgoliaIndex.ts +12 -43
- package/plugin/components/SDKSelect.astro +3 -6
- package/plugin/globalJs/code-snippets.ts +25 -3
- package/plugin/globalJs/copy.ts +2 -1
- package/plugin/globalJs/navigation.ts +8 -9
- package/plugin/helpers/generateDocsRoutes.ts +32 -0
- package/plugin/helpers/multiSpec.ts +8 -0
- package/plugin/index.ts +53 -46
- package/plugin/loadPluginConfig.ts +131 -62
- package/plugin/react/Routing.tsx +6 -9
- package/plugin/routes/Docs.astro +5 -2
- package/plugin/routes/DocsStatic.astro +2 -4
- package/plugin/routes/Overview.astro +21 -7
- package/plugin/routes/markdown.ts +4 -4
- package/plugin/specs/FileCache.ts +99 -0
- package/plugin/specs/fetchSpecSSR.ts +16 -10
- package/plugin/specs/generateSpec.ts +88 -26
- package/plugin/specs/index.ts +88 -195
- package/plugin/specs/inputResolver.ts +146 -0
- package/plugin/vendor/preview.worker.docs.js +5408 -5201
- package/plugin/vendor/templates/cli.md +1 -0
- package/plugin/vendor/templates/go.md +3 -1
- package/plugin/vendor/templates/java.md +3 -1
- package/plugin/vendor/templates/kotlin.md +3 -1
- package/plugin/vendor/templates/node.md +4 -2
- package/plugin/vendor/templates/python.md +3 -1
- package/plugin/vendor/templates/ruby.md +4 -2
- package/plugin/vendor/templates/terraform.md +1 -1
- package/plugin/vendor/templates/typescript.md +3 -1
- package/virtual-module.d.ts +19 -3
- package/plugin/helpers/getDocsLanguages.ts +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
SDK_Readme
|
|
@@ -7,6 +7,8 @@ from applications written in Go.
|
|
|
7
7
|
|
|
8
8
|
SDK_GeneratedByStainless
|
|
9
9
|
|
|
10
|
+
SDK_MCPReadmeSection
|
|
11
|
+
|
|
10
12
|
## Installation
|
|
11
13
|
|
|
12
14
|
SDK_ReleasePleaseMarkdownBlockStart
|
|
@@ -307,7 +309,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
|
|
|
307
309
|
|
|
308
310
|
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
309
311
|
|
|
310
|
-
We are keen for your feedback; please open an [issue](
|
|
312
|
+
We are keen for your feedback; please open an [issue](SDK_RepoURL/issues) with questions, bugs, or suggestions.
|
|
311
313
|
|
|
312
314
|
## Contributing
|
|
313
315
|
|
|
@@ -11,6 +11,8 @@ SDK_SectionSimilarToOtherSDK
|
|
|
11
11
|
|
|
12
12
|
SDK_GeneratedByStainless
|
|
13
13
|
|
|
14
|
+
SDK_MCPReadmeSection
|
|
15
|
+
|
|
14
16
|
SDK_SectionDocumentationReference
|
|
15
17
|
|
|
16
18
|
SDK_SectionInstallation
|
|
@@ -84,4 +86,4 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
|
|
|
84
86
|
|
|
85
87
|
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
86
88
|
|
|
87
|
-
We are keen for your feedback; please open an [issue](
|
|
89
|
+
We are keen for your feedback; please open an [issue](SDK_RepoURL/issues) with questions, bugs, or suggestions.
|
|
@@ -11,6 +11,8 @@ SDK_SectionSimilarToOtherSDK
|
|
|
11
11
|
|
|
12
12
|
SDK_GeneratedByStainless
|
|
13
13
|
|
|
14
|
+
SDK_MCPReadmeSection
|
|
15
|
+
|
|
14
16
|
SDK_SectionDocumentationReference
|
|
15
17
|
|
|
16
18
|
SDK_SectionInstallation
|
|
@@ -84,4 +86,4 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
|
|
|
84
86
|
|
|
85
87
|
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
86
88
|
|
|
87
|
-
We are keen for your feedback; please open an [issue](
|
|
89
|
+
We are keen for your feedback; please open an [issue](SDK_RepoURL/issues) with questions, bugs, or suggestions.
|
|
@@ -10,6 +10,8 @@ SDK_DocumentationReference
|
|
|
10
10
|
|
|
11
11
|
SDK_GeneratedByStainless
|
|
12
12
|
|
|
13
|
+
SDK_MCPReadmeSection
|
|
14
|
+
|
|
13
15
|
## Installation
|
|
14
16
|
|
|
15
17
|
SDK_NPMInstallInstructions
|
|
@@ -169,7 +171,7 @@ import SDK_PackageName from 'SDK_NPMPackage';
|
|
|
169
171
|
```
|
|
170
172
|
|
|
171
173
|
To do the inverse, add `import "SDK_NPMPackage/shims/node"` (which does import polyfills).
|
|
172
|
-
This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](
|
|
174
|
+
This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](SDK_RepoCodeURL/src/_shims#readme)).
|
|
173
175
|
|
|
174
176
|
### Logging and middleware
|
|
175
177
|
|
|
@@ -214,7 +216,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
|
|
|
214
216
|
|
|
215
217
|
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
216
218
|
|
|
217
|
-
We are keen for your feedback; please open an [issue](
|
|
219
|
+
We are keen for your feedback; please open an [issue](SDK_RepoURL/issues) with questions, bugs, or suggestions.
|
|
218
220
|
|
|
219
221
|
## Requirements
|
|
220
222
|
|
|
@@ -9,6 +9,8 @@ SDK_ScreencastURL
|
|
|
9
9
|
|
|
10
10
|
SDK_GeneratedByStainless
|
|
11
11
|
|
|
12
|
+
SDK_MCPReadmeSection
|
|
13
|
+
|
|
12
14
|
## Documentation
|
|
13
15
|
|
|
14
16
|
SDK_DocumentationCallout SDK_APIReferenceCallout
|
|
@@ -227,7 +229,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
|
|
|
227
229
|
|
|
228
230
|
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
229
231
|
|
|
230
|
-
We are keen for your feedback; please open an [issue](
|
|
232
|
+
We are keen for your feedback; please open an [issue](SDK_RepoURL/issues) with questions, bugs, or suggestions.
|
|
231
233
|
|
|
232
234
|
### Determining the installed version
|
|
233
235
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# SDK_PackageTitle API library
|
|
2
2
|
|
|
3
|
-
SDK_ReadmeOpening It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](
|
|
3
|
+
SDK_ReadmeOpening It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](SDK_RepoURL#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.
|
|
4
4
|
|
|
5
5
|
SDK_ScreencastURL
|
|
6
6
|
|
|
7
7
|
SDK_GeneratedByStainless
|
|
8
8
|
|
|
9
|
+
SDK_MCPReadmeSection
|
|
10
|
+
|
|
9
11
|
## Documentation
|
|
10
12
|
|
|
11
13
|
Documentation for releases of this gem can be found [on RubyDoc](SDK_RubyDocInfoURL).
|
|
@@ -142,4 +144,4 @@ Ruby SDK_RubyMinVersion or higher.
|
|
|
142
144
|
|
|
143
145
|
## Contributing
|
|
144
146
|
|
|
145
|
-
See [the contributing documentation](
|
|
147
|
+
See [the contributing documentation](SDK_RepoAssetURL/CONTRIBUTING.md).
|
|
@@ -53,7 +53,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
|
|
|
53
53
|
|
|
54
54
|
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
55
55
|
|
|
56
|
-
We are keen for your feedback; please open an [issue](
|
|
56
|
+
We are keen for your feedback; please open an [issue](SDK_RepoURL/issues) with questions, bugs, or suggestions.
|
|
57
57
|
|
|
58
58
|
## Contributing
|
|
59
59
|
|
|
@@ -10,6 +10,8 @@ SDK_DocumentationReference
|
|
|
10
10
|
|
|
11
11
|
SDK_GeneratedByStainless
|
|
12
12
|
|
|
13
|
+
SDK_MCPReadmeSection
|
|
14
|
+
|
|
13
15
|
## Installation
|
|
14
16
|
|
|
15
17
|
SDK_NPMInstallInstructions
|
|
@@ -298,7 +300,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
|
|
|
298
300
|
|
|
299
301
|
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
300
302
|
|
|
301
|
-
We are keen for your feedback; please open an [issue](
|
|
303
|
+
We are keen for your feedback; please open an [issue](SDK_RepoURL/issues) with questions, bugs, or suggestions.
|
|
302
304
|
|
|
303
305
|
## Requirements
|
|
304
306
|
|
package/virtual-module.d.ts
CHANGED
|
@@ -73,12 +73,28 @@ declare module 'virtual:stl-docs/components/AiChat.tsx' {
|
|
|
73
73
|
export const STAINLESS_PROJECT: string | undefined;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
declare module 'virtual:stainless-
|
|
77
|
-
|
|
76
|
+
declare module 'virtual:stainless-apis-manifest' {
|
|
77
|
+
import type { DocsLanguage } from '@stainless-api/docs-ui/routing';
|
|
78
|
+
|
|
79
|
+
export type APIManifestEntry = {
|
|
80
|
+
languages: {
|
|
81
|
+
sdkJSONFilePath: string;
|
|
82
|
+
language: DocsLanguage;
|
|
83
|
+
}[];
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const api: APIManifestEntry;
|
|
78
87
|
}
|
|
79
88
|
|
|
80
89
|
declare module 'virtual:stl-starlight-reference-sidebars' {
|
|
81
90
|
import type { DocsLanguage } from '@stainless-api/docs-ui/routing';
|
|
82
91
|
import type { StarlightRouteData } from '@astrojs/starlight/route-data';
|
|
83
|
-
|
|
92
|
+
|
|
93
|
+
export type GeneratedSidebarDef = {
|
|
94
|
+
id: number;
|
|
95
|
+
language: DocsLanguage;
|
|
96
|
+
entries: StarlightRouteData['sidebar'];
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const sidebars: GeneratedSidebarDef[];
|
|
84
100
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DocsLanguage } from '@stainless-api/docs-ui/routing';
|
|
2
|
-
import type * as SDKJSON from '@stainless/sdk-json';
|
|
3
|
-
|
|
4
|
-
export function getDocsLanguages(spec: SDKJSON.Spec, excludeLanguages: DocsLanguage[]) {
|
|
5
|
-
// TODO: should not force unwrap this
|
|
6
|
-
const languages: DocsLanguage[] = spec.docs!.languages ?? ['http'];
|
|
7
|
-
|
|
8
|
-
return languages.filter((language) => !excludeLanguages.includes(language));
|
|
9
|
-
}
|