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.6"
".": "1.0.0-rc.7"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/grid%2Fspreadsheet-api-f9fd5fb43d56001ea7d7f49e92bd55134347b198b2664fd76321cc02a75817c9.yml
openapi_spec_hash: 5130b5ebb7cbfe7a906716c5cf21764b
config_hash: f5d6b47b28c650e373afc0eb0396899e
config_hash: 3e61a9566953ce5dbd4bcea7ceb568a3
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 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)

### Features

* **api:** finish renaming of HTTPBearer to apiKey ([#41](https://github.com/GRID-is/api-sdk-ts/issues/41)) ([29a151d](https://github.com/GRID-is/api-sdk-ts/commit/29a151deedf3e7fc9fd062be0a531c3f2b60ed84))

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

Full Changelog: [v1.0.0-rc.5...v1.0.0-rc.6](https://github.com/GRID-is/api-sdk-ts/compare/v1.0.0-rc.5...v1.0.0-rc.6)
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ You can use the `maxRetries` option to configure or disable this:
// Configure the default for all requests:
const client = new Grid({
maxRetries: 0, // default is 2
apiKey: 'My API Key',
});

// Or, configure per-request:
Expand All @@ -156,7 +155,6 @@ Requests time out after one minute by default. You can configure this with a `ti
// Configure the default for all requests:
const client = new Grid({
timeout: 20 * 1000, // 20 seconds (default is 1 minute)
apiKey: 'My API Key',
});

// Override per-request:
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.6",
"version": "1.0.0-rc.7",
"description": "The official TypeScript library for the Grid API",
"author": "Grid <info@grid.is>",
"types": "dist/index.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ export class Grid {
return;
}

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

/**
* Basic re-implementation of `qs.stringify` for primitive types.
*/
Expand Down Expand Up @@ -636,6 +640,7 @@ export class Grid {
...getPlatformHeaders(),
'X-Client-Name': 'api-sdk',
},
this.authHeaders(options),
this._options.defaultHeaders,
bodyHeaders,
options.headers,
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.6'; // x-release-please-version
export const VERSION = '1.0.0-rc.7'; // x-release-please-version