Skip to content

Commit 1847d11

Browse files
SDK regeneration
1 parent 98adbce commit 1847d11

File tree

738 files changed

+26648
-10002
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

738 files changed

+26648
-10002
lines changed

.prettierrc.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Contributing
2+
3+
Thanks for your interest in contributing to this SDK! This document provides guidelines for contributing to the project.
4+
5+
## Getting Started
6+
7+
### Prerequisites
8+
9+
- Node.js 20 or higher
10+
- pnpm package manager
11+
12+
### Installation
13+
14+
Install the project dependencies:
15+
16+
```bash
17+
pnpm install
18+
```
19+
20+
### Building
21+
22+
Build the project:
23+
24+
```bash
25+
pnpm build
26+
```
27+
28+
### Testing
29+
30+
Run the test suite:
31+
32+
```bash
33+
pnpm test
34+
```
35+
36+
Run specific test types:
37+
- `pnpm test:unit` - Run unit tests
38+
- `pnpm test:wire` - Run wire/integration tests
39+
40+
### Linting and Formatting
41+
42+
Check code style:
43+
44+
```bash
45+
pnpm run lint
46+
pnpm run format:check
47+
```
48+
49+
Fix code style issues:
50+
51+
```bash
52+
pnpm run lint:fix
53+
pnpm run format:fix
54+
```
55+
56+
Or use the combined check command:
57+
58+
```bash
59+
pnpm run check:fix
60+
```
61+
62+
## About Generated Code
63+
64+
**Important**: Most files in this SDK are automatically generated by [Fern](https://buildwithfern.com) from the API definition. Direct modifications to generated files will be overwritten the next time the SDK is generated.
65+
66+
### Generated Files
67+
68+
The following directories contain generated code:
69+
- `src/api/` - API client classes and types
70+
- `src/serialization/` - Serialization/deserialization logic
71+
- Most TypeScript files in `src/`
72+
73+
### How to Customize
74+
75+
If you need to customize the SDK, you have two options:
76+
77+
#### Option 1: Use `.fernignore`
78+
79+
For custom code that should persist across SDK regenerations:
80+
81+
1. Create a `.fernignore` file in the project root
82+
2. Add file patterns for files you want to preserve (similar to `.gitignore` syntax)
83+
3. Add your custom code to those files
84+
85+
Files listed in `.fernignore` will not be overwritten when the SDK is regenerated.
86+
87+
For more information, see the [Fern documentation on custom code](https://buildwithfern.com/learn/sdks/overview/custom-code).
88+
89+
#### Option 2: Contribute to the Generator
90+
91+
If you want to change how code is generated for all users of this SDK:
92+
93+
1. The TypeScript SDK generator lives in the [Fern repository](https://github.com/fern-api/fern)
94+
2. Generator code is located at `generators/typescript/sdk/`
95+
3. Follow the [Fern contributing guidelines](https://github.com/fern-api/fern/blob/main/CONTRIBUTING.md)
96+
4. Submit a pull request with your changes to the generator
97+
98+
This approach is best for:
99+
- Bug fixes in generated code
100+
- New features that would benefit all users
101+
- Improvements to code generation patterns
102+
103+
## Making Changes
104+
105+
### Workflow
106+
107+
1. Create a new branch for your changes
108+
2. Make your modifications
109+
3. Run tests to ensure nothing breaks: `pnpm test`
110+
4. Run linting and formatting: `pnpm run check:fix`
111+
5. Build the project: `pnpm build`
112+
6. Commit your changes with a clear commit message
113+
7. Push your branch and create a pull request
114+
115+
### Commit Messages
116+
117+
Write clear, descriptive commit messages that explain what changed and why.
118+
119+
### Code Style
120+
121+
This project uses automated code formatting and linting. Run `pnpm run check:fix` before committing to ensure your code meets the project's style guidelines.
122+
123+
## Questions or Issues?
124+
125+
If you have questions or run into issues:
126+
127+
1. Check the [Fern documentation](https://buildwithfern.com)
128+
2. Search existing [GitHub issues](https://github.com/fern-api/fern/issues)
129+
3. Open a new issue if your question hasn't been addressed
130+
131+
## License
132+
133+
By contributing to this project, you agree that your contributions will be licensed under the same license as the project.

biome.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.3.1/schema.json",
3+
"root": true,
4+
"vcs": {
5+
"enabled": false
6+
},
7+
"files": {
8+
"ignoreUnknown": true,
9+
"includes": [
10+
"**",
11+
"!!dist",
12+
"!!**/dist",
13+
"!!lib",
14+
"!!**/lib",
15+
"!!_tmp_*",
16+
"!!**/_tmp_*",
17+
"!!*.tmp",
18+
"!!**/*.tmp",
19+
"!!.tmp/",
20+
"!!**/.tmp/",
21+
"!!*.log",
22+
"!!**/*.log",
23+
"!!**/.DS_Store",
24+
"!!**/Thumbs.db"
25+
]
26+
},
27+
"formatter": {
28+
"enabled": true,
29+
"indentStyle": "space",
30+
"indentWidth": 4,
31+
"lineWidth": 120
32+
},
33+
"javascript": {
34+
"formatter": {
35+
"quoteStyle": "double"
36+
}
37+
},
38+
"assist": {
39+
"enabled": true,
40+
"actions": {
41+
"source": {
42+
"organizeImports": "on"
43+
}
44+
}
45+
},
46+
"linter": {
47+
"rules": {
48+
"style": {
49+
"useNodejsImportProtocol": "off"
50+
},
51+
"suspicious": {
52+
"noAssignInExpressions": "warn",
53+
"noUselessEscapeInString": {
54+
"level": "warn",
55+
"fix": "none",
56+
"options": {}
57+
},
58+
"noThenProperty": "warn",
59+
"useIterableCallbackReturn": "warn",
60+
"noShadowRestrictedNames": "warn",
61+
"noTsIgnore": {
62+
"level": "warn",
63+
"fix": "none",
64+
"options": {}
65+
},
66+
"noConfusingVoidType": {
67+
"level": "warn",
68+
"fix": "none",
69+
"options": {}
70+
}
71+
}
72+
}
73+
}
74+
}

package.json

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,53 @@
11
{
22
"name": "cohere-ai",
3-
"version": "7.19.0",
3+
"version": "7.19.1",
44
"private": false,
5-
"repository": "https://github.com/cohere-ai/cohere-typescript",
5+
"repository": "github:cohere-ai/cohere-typescript",
66
"main": "./index.js",
77
"types": "./index.d.ts",
88
"scripts": {
9-
"format": "prettier . --write --ignore-unknown",
9+
"format": "biome format --write --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
10+
"format:check": "biome format --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
11+
"lint": "biome lint --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
12+
"lint:fix": "biome lint --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
13+
"check": "biome check --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
14+
"check:fix": "biome check --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
1015
"build": "tsc",
1116
"prepack": "cp -rv dist/. .",
12-
"test": "jest"
17+
"test": "vitest",
18+
"test:unit": "vitest --project unit",
19+
"test:wire": "vitest --project wire"
1320
},
1421
"dependencies": {
15-
"url-join": "4.0.1",
16-
"form-data": "^4.0.0",
17-
"formdata-node": "^6.0.3",
18-
"node-fetch": "^2.7.0",
19-
"qs": "^6.13.1",
2022
"readable-stream": "^4.5.2",
21-
"js-base64": "3.7.7",
22-
"form-data-encoder": "^4.0.2",
2323
"@aws-sdk/client-sagemaker": "^3.583.0",
2424
"@aws-sdk/credential-providers": "^3.583.0",
2525
"@smithy/protocol-http": "^5.1.2",
2626
"@smithy/signature-v4": "^5.1.2",
2727
"convict": "^6.2.4"
2828
},
2929
"devDependencies": {
30-
"@types/url-join": "4.0.1",
31-
"@types/qs": "^6.9.17",
32-
"@types/node-fetch": "^2.6.12",
33-
"@types/readable-stream": "^4.0.14",
3430
"webpack": "^5.91.0",
3531
"ts-loader": "^9.5.1",
36-
"jest": "^29.7.0",
37-
"@types/jest": "^29.5.14",
38-
"ts-jest": "^29.1.2",
39-
"jest-environment-jsdom": "^29.7.0",
32+
"vitest": "^3.2.4",
33+
"msw": "2.11.2",
4034
"@types/node": "^18.19.70",
41-
"prettier": "^3.4.2",
4235
"typescript": "~5.7.2",
36+
"@biomejs/biome": "2.3.1",
37+
"jest": "^29.7.0",
38+
"ts-jest": "^29.1.2",
39+
"@types/readable-stream": "^4.0.14",
4340
"@types/convict": "^6.1.6"
4441
},
4542
"browser": {
4643
"fs": false,
4744
"os": false,
48-
"path": false
45+
"path": false,
46+
"stream": false
47+
},
48+
"packageManager": "[email protected]",
49+
"engines": {
50+
"node": ">=18.0.0"
4951
},
50-
"packageManager": "[email protected]"
52+
"sideEffects": false
5153
}

0 commit comments

Comments
 (0)