Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.0.0-rc.7"
".": "1.0.0-rc.8"
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 1.0.0-rc.8 (2025-04-08)

Full Changelog: [v1.0.0-rc.7...v1.0.0-rc.8](https://github.com/GRID-is/api-sdk-ts/compare/v1.0.0-rc.7...v1.0.0-rc.8)

### Bug Fixes

* **api:** improve type resolution when importing as a package ([#47](https://github.com/GRID-is/api-sdk-ts/issues/47)) ([c344306](https://github.com/GRID-is/api-sdk-ts/commit/c344306e2f61fb6c4a2b830e184a7095e1c53093))
* **client:** send `X-Stainless-Timeout` in seconds ([#44](https://github.com/GRID-is/api-sdk-ts/issues/44)) ([7b4a5ab](https://github.com/GRID-is/api-sdk-ts/commit/7b4a5aba048bb1b20e8b897f12fab28fefdca15e))
* **client:** send all configured auth headers ([#49](https://github.com/GRID-is/api-sdk-ts/issues/49)) ([212b3ae](https://github.com/GRID-is/api-sdk-ts/commit/212b3ae5516f76b76592534be02defec7fd75e34))
* **mcp:** remove unused tools.ts ([#48](https://github.com/GRID-is/api-sdk-ts/issues/48)) ([d44b94a](https://github.com/GRID-is/api-sdk-ts/commit/d44b94a902a7d397a8c2b004e261a97dc3d59446))


### Chores

* **internal:** add aliases for Record and Array ([#46](https://github.com/GRID-is/api-sdk-ts/issues/46)) ([2462b10](https://github.com/GRID-is/api-sdk-ts/commit/2462b1024bf10be8395b931863355d874fefc0ce))

## 1.0.0-rc.7 (2025-03-27)

Full Changelog: [v1.0.0-rc.6...v1.0.0-rc.7](https://github.com/GRID-is/api-sdk-ts/compare/v1.0.0-rc.6...v1.0.0-rc.7)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@grid-is/api",
"version": "1.0.0-rc.7",
"version": "1.0.0-rc.8",
"description": "The official TypeScript library for the Grid API",
"author": "Grid <info@grid.is>",
"types": "dist/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ export class Grid {
return;
}

protected authHeaders(opts: FinalRequestOptions): Headers | undefined {
return new Headers({ Authorization: `Bearer ${this.apiKey}` });
protected authHeaders(opts: FinalRequestOptions): NullableHeaders | undefined {
return buildHeaders([{ Authorization: `Bearer ${this.apiKey}` }]);
}

/**
Expand Down Expand Up @@ -636,7 +636,7 @@ export class Grid {
Accept: 'application/json',
'User-Agent': this.getUserAgent(),
'X-Stainless-Retry-Count': String(retryCount),
...(options.timeout ? { 'X-Stainless-Timeout': String(options.timeout) } : {}),
...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),
...getPlatformHeaders(),
'X-Client-Name': 'api-sdk',
},
Expand Down
14 changes: 14 additions & 0 deletions src/internal/builtin-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,23 @@ type _HeadersInit = RequestInit['headers'];
*/
type _BodyInit = RequestInit['body'];

/**
* An alias to the builtin `Array<T>` type so we can
* easily alias it in import statements if there are name clashes.
*/
type _Array<T> = Array<T>;

/**
* An alias to the builtin `Record<K, T>` type so we can
* easily alias it in import statements if there are name clashes.
*/
type _Record<K extends keyof any, T> = Record<K, T>;

export type {
_Array as Array,
_BodyInit as BodyInit,
_HeadersInit as HeadersInit,
_Record as Record,
_RequestInfo as RequestInfo,
_RequestInit as RequestInit,
_Response as Response,
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '1.0.0-rc.7'; // x-release-please-version
export const VERSION = '1.0.0-rc.8'; // x-release-please-version