Skip to content

Commit 8fd662f

Browse files
release: 0.1.0-alpha.2 (#7)
* chore: do not install brew dependencies in ./scripts/bootstrap by default * perf: faster formatting * chore(internal): remove deprecated `compilerOptions.baseUrl` from tsconfig.json This allows sdks to be built using tsgo - see microsoft/typescript-go#474 * chore(internal): fix incremental formatting in some cases * chore(internal): codegen related update * chore(internal): ignore .eslintcache * chore(internal): remove .eslintcache * feat(api): Images generations * chore(jsdoc): fix @link annotations to refer only to parts of the package‘s public interface * chore(internal): use npm pack for build uploads * feat(api): Images generations - openai * feat(api): manual updates * feat(api): manual updates * release: 0.1.0-alpha.2 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent d678611 commit 8fd662f

File tree

80 files changed

+962
-421
lines changed

Some content is hidden

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

80 files changed

+962
-421
lines changed

.github/workflows/release-doctor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ jobs:
1919
bash ./bin/check-release-environment
2020
env:
2121
NPM_TOKEN: ${{ secrets.GRADIENT_NPM_TOKEN || secrets.NPM_TOKEN }}
22+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ dist
77
dist-deno
88
/*.tgz
99
.idea/
10+
.eslintcache
1011

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.1"
2+
".": "0.1.0-alpha.2"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 173
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-621c3ebf5011c5ca508f78fccbea17de4ca6b35bfe99578c1ae2265021578d6f.yml
3-
openapi_spec_hash: e29d14e3e4679fcf22b3e760e49931b1
4-
config_hash: 3d425c415b7f7ab581418b43eb521cb3
1+
configured_endpoints: 175
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-cb3bf9b21459cad24410206c27a32fd31ef6cf86711700597549dbbd0d634002.yml
3+
openapi_spec_hash: 6a9149a81ba15e7c5c5c1f4d77daad92
4+
config_hash: bad49c3bf949d5168ec3896bedff253a

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Changelog
22

3+
## 0.1.0-alpha.2 (2025-10-16)
4+
5+
Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/digitalocean/gradient-typescript/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
6+
7+
### Features
8+
9+
* **api:** Images generations ([2b2dc1a](https://github.com/digitalocean/gradient-typescript/commit/2b2dc1ab761524a9a4e80d92f627e0777bc72828))
10+
* **api:** Images generations - openai ([6c3d87c](https://github.com/digitalocean/gradient-typescript/commit/6c3d87c4587799d95634709e10d05398a5b5efea))
11+
* **api:** manual updates ([e428407](https://github.com/digitalocean/gradient-typescript/commit/e428407732f68c3958a7a4aefebb16d6fc993ffe))
12+
* **api:** manual updates ([54e9764](https://github.com/digitalocean/gradient-typescript/commit/54e97647408b0713f2788163c8e62950d0978779))
13+
14+
15+
### Performance Improvements
16+
17+
* faster formatting ([8368269](https://github.com/digitalocean/gradient-typescript/commit/83682693c05b0923eda90f309323e79be81f0959))
18+
19+
20+
### Chores
21+
22+
* clean up LICENSING after legal review ([#3](https://github.com/digitalocean/gradient-typescript/issues/3)) ([da51ba0](https://github.com/digitalocean/gradient-typescript/commit/da51ba0ea90a8a938747e1f5500fe78e388046c6))
23+
* do not install brew dependencies in ./scripts/bootstrap by default ([58a58de](https://github.com/digitalocean/gradient-typescript/commit/58a58dee9cef281da36da118e2ac979cd0d755b7))
24+
* **internal:** codegen related update ([caea2ff](https://github.com/digitalocean/gradient-typescript/commit/caea2ff2b2b44b543ede7b06829fbb5a8d0b2694))
25+
* **internal:** fix incremental formatting in some cases ([353630a](https://github.com/digitalocean/gradient-typescript/commit/353630aa9fe2b61a4d4fb04b581e628fe9e5fd3f))
26+
* **internal:** ignore .eslintcache ([49808e2](https://github.com/digitalocean/gradient-typescript/commit/49808e27fd3936c7aaa21c194fc005f7944380b4))
27+
* **internal:** remove .eslintcache ([b318cc0](https://github.com/digitalocean/gradient-typescript/commit/b318cc0a5b59b443357621de22714cf9e893d4a6))
28+
* **internal:** remove deprecated `compilerOptions.baseUrl` from tsconfig.json ([3c74bff](https://github.com/digitalocean/gradient-typescript/commit/3c74bff79b6e18426e0bc6cb4e586a5996f4640f))
29+
* **internal:** use npm pack for build uploads ([2b378fc](https://github.com/digitalocean/gradient-typescript/commit/2b378fc6255fb2753373564871d0e8442b54497b))
30+
* **jsdoc:** fix [@link](https://github.com/link) annotations to refer only to parts of the package‘s public interface ([ffed53e](https://github.com/digitalocean/gradient-typescript/commit/ffed53e3f10f4cf70ce61c65623fc13298200aa8))
31+
* update author ([3dd3c2d](https://github.com/digitalocean/gradient-typescript/commit/3dd3c2d23f3896305077104a7793d7702371843b))
32+
* update github actions ([d678611](https://github.com/digitalocean/gradient-typescript/commit/d6786115dfe34fde95a8317d7f79a8d6aa579a01))
33+
334
## 0.1.0-alpha.1 (2025-09-12)
435

536
Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/digitalocean/gradient-typescript/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The full API of this library can be found in [api.md](api.md).
2323
import Gradient from '@digitalocean/gradient';
2424

2525
const client = new Gradient({
26-
accessToken: process.env['DIGITALOCEAN_ACCESS_TOKEN'], // This is the default and can be omitted
26+
modelAccessKey: process.env['GRADIENT_MODEL_ACCESS_KEY'], // This is the default and can be omitted
2727
});
2828

2929
const completion = await client.chat.completions.create({
@@ -65,7 +65,7 @@ This library includes TypeScript definitions for all request params and response
6565
import Gradient from '@digitalocean/gradient';
6666

6767
const client = new Gradient({
68-
accessToken: process.env['DIGITALOCEAN_ACCESS_TOKEN'], // This is the default and can be omitted
68+
modelAccessKey: process.env['GRADIENT_MODEL_ACCESS_KEY'], // This is the default and can be omitted
6969
});
7070

7171
const params: Gradient.Chat.CompletionCreateParams = {

api.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Types:
1818
- <code><a href="./src/resources/shared.ts">GarbageCollection</a></code>
1919
- <code><a href="./src/resources/shared.ts">GPUInfo</a></code>
2020
- <code><a href="./src/resources/shared.ts">Image</a></code>
21+
- <code><a href="./src/resources/shared.ts">ImageGenCompletedEvent</a></code>
22+
- <code><a href="./src/resources/shared.ts">ImageGenPartialImageEvent</a></code>
23+
- <code><a href="./src/resources/shared.ts">ImageGenStreamEvent</a></code>
2124
- <code><a href="./src/resources/shared.ts">Kernel</a></code>
2225
- <code><a href="./src/resources/shared.ts">MetaProperties</a></code>
2326
- <code><a href="./src/resources/shared.ts">NetworkV4</a></code>
@@ -327,6 +330,16 @@ Methods:
327330

328331
- <code title="post /chat/completions">client.chat.completions.<a href="./src/resources/chat/completions.ts">create</a>({ ...params }) -> CompletionCreateResponse</code>
329332

333+
# Images
334+
335+
Types:
336+
337+
- <code><a href="./src/resources/images.ts">ImageGenerateResponse</a></code>
338+
339+
Methods:
340+
341+
- <code title="post /images/generations">client.images.<a href="./src/resources/images.ts">generate</a>({ ...params }) -> ImageGenerateResponse</code>
342+
330343
# GPUDroplets
331344

332345
Types:
@@ -642,6 +655,7 @@ Methods:
642655

643656
Types:
644657

658+
- <code><a href="./src/resources/gpu-droplets/account/keys.ts">SSHKeys</a></code>
645659
- <code><a href="./src/resources/gpu-droplets/account/keys.ts">KeyCreateResponse</a></code>
646660
- <code><a href="./src/resources/gpu-droplets/account/keys.ts">KeyRetrieveResponse</a></code>
647661
- <code><a href="./src/resources/gpu-droplets/account/keys.ts">KeyUpdateResponse</a></code>
@@ -707,12 +721,14 @@ Types:
707721
- <code><a href="./src/resources/knowledge-bases/data-sources.ts">DataSourceCreateResponse</a></code>
708722
- <code><a href="./src/resources/knowledge-bases/data-sources.ts">DataSourceListResponse</a></code>
709723
- <code><a href="./src/resources/knowledge-bases/data-sources.ts">DataSourceDeleteResponse</a></code>
724+
- <code><a href="./src/resources/knowledge-bases/data-sources.ts">DataSourceCreatePresignedURLsResponse</a></code>
710725

711726
Methods:
712727

713728
- <code title="post /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources">client.knowledgeBases.dataSources.<a href="./src/resources/knowledge-bases/data-sources.ts">create</a>(knowledgeBaseUuid, { ...params }) -> DataSourceCreateResponse</code>
714729
- <code title="get /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources">client.knowledgeBases.dataSources.<a href="./src/resources/knowledge-bases/data-sources.ts">list</a>(knowledgeBaseUuid, { ...params }) -> DataSourceListResponse</code>
715730
- <code title="delete /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}">client.knowledgeBases.dataSources.<a href="./src/resources/knowledge-bases/data-sources.ts">delete</a>(dataSourceUuid, { ...params }) -> DataSourceDeleteResponse</code>
731+
- <code title="post /v2/gen-ai/knowledge_bases/data_sources/file_upload_presigned_urls">client.knowledgeBases.dataSources.<a href="./src/resources/knowledge-bases/data-sources.ts">createPresignedURLs</a>({ ...params }) -> DataSourceCreatePresignedURLsResponse</code>
716732

717733
## IndexingJobs
718734

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@digitalocean/gradient",
3-
"version": "0.1.0-alpha.1",
3+
"version": "0.1.0-alpha.2",
44
"description": "The official TypeScript library for the Gradient API",
55
"author": "DigitalOcean, LLC <dev@digitalocean.com>",
66
"types": "dist/index.d.ts",

scripts/bootstrap

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ set -e
44

55
cd "$(dirname "$0")/.."
66

7-
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ]; then
7+
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
88
brew bundle check >/dev/null 2>&1 || {
9-
echo "==> Installing Homebrew dependencies…"
10-
brew bundle
9+
echo -n "==> Install Homebrew dependencies? (y/N): "
10+
read -r response
11+
case "$response" in
12+
[yY][eE][sS]|[yY])
13+
brew bundle
14+
;;
15+
*)
16+
;;
17+
esac
18+
echo
1119
}
1220
fi
1321

scripts/fast-format

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
echo "Script started with $# arguments"
6+
echo "Arguments: $*"
7+
echo "Script location: $(dirname "$0")"
8+
9+
cd "$(dirname "$0")/.."
10+
echo "Changed to directory: $(pwd)"
11+
12+
if [ $# -eq 0 ]; then
13+
echo "Usage: $0 <file-with-paths> [additional-formatter-args...]"
14+
echo "The file should contain one file path per line"
15+
exit 1
16+
fi
17+
18+
FILE_LIST="$1"
19+
20+
echo "Looking for file: $FILE_LIST"
21+
22+
if [ ! -f "$FILE_LIST" ]; then
23+
echo "Error: File '$FILE_LIST' not found"
24+
exit 1
25+
fi
26+
27+
echo "==> Running eslint --fix"
28+
ESLINT_FILES="$(grep '\.ts$' "$FILE_LIST" || true)"
29+
if ! [ -z "$ESLINT_FILES" ]; then
30+
echo "$ESLINT_FILES" | xargs ./node_modules/.bin/eslint --cache --fix
31+
fi
32+
33+
echo "==> Running prettier --write"
34+
# format things eslint didn't
35+
PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)"
36+
if ! [ -z "$PRETTIER_FILES" ]; then
37+
echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \
38+
--write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \
39+
'!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs'
40+
fi

0 commit comments

Comments
 (0)