docs: Create JS/TS SDK reference page (#779)

* Create JS/TS SDK reference docs.

* Remove index.mts from typedoc entry point.
This commit is contained in:
Andrew Nguonly
2024-06-23 17:24:30 -07:00
committed by GitHub
parent 070b339b67
commit 20f84f2041
6 changed files with 4224 additions and 4 deletions
File diff suppressed because it is too large Load Diff
+1
View File
@@ -1,3 +1,4 @@
/docs
/client.cjs
/client.js
/client.d.ts
+17 -1
View File
@@ -45,4 +45,20 @@ const streamResponse = client.runs.stream(
for await (const chunk of streamResponse) {
console.log(chunk);
}
```
```
## Documentation
To generate documentation, run the following commands:
1. Generate docs.
yarn typedoc
1. Consolidate doc files into one markdown file.
npx concat-md --decrease-title-levels --ignore=js_ts_sdk_ref.md --start-title-level-at 2 docs > docs/js_ts_sdk_ref.md
1. Copy `js_ts_sdk_ref.md` to MkDocs directory.
cp docs/js_ts_sdk_ref.md ../../docs/docs/cloud/reference/sdk/js_ts_sdk_ref.md
+3
View File
@@ -26,7 +26,10 @@
"@tsconfig/recommended": "^1.0.2",
"@types/node": "^20.12.12",
"@types/uuid": "^9.0.1",
"concat-md": "^0.5.1",
"prettier": "^3.2.5",
"typedoc": "^0.26.1",
"typedoc-plugin-markdown": "^4.1.0",
"typescript": "^5.4.5"
},
"exports": {
+10 -1
View File
@@ -21,6 +21,15 @@
"exclude": ["node_modules", "dist", "coverage"],
"includeVersion": true,
"typedocOptions": {
"entryPoints": ["src/client.ts"]
"entryPoints": [
"src/client.mts",
"src/schema.ts",
"src/types.mts"
],
"readme": "none",
"out": "docs",
"plugin": [
"typedoc-plugin-markdown"
]
}
}
File diff suppressed because it is too large Load Diff