diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5132993..8c84180 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.0.0-rc.6" + ".": "1.0.0-rc.7" } diff --git a/.stats.yml b/.stats.yml index ee93662..e8f71be 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index c3fecd7..8588b05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/README.md b/README.md index 1e8cfb7..c2e29d3 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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: diff --git a/package.json b/package.json index dbc310e..4a2f4ed 100644 --- a/package.json +++ b/package.json @@ -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 ", "types": "dist/index.d.ts", diff --git a/src/client.ts b/src/client.ts index 6bf6e0b..2e1826a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -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. */ @@ -636,6 +640,7 @@ export class Grid { ...getPlatformHeaders(), 'X-Client-Name': 'api-sdk', }, + this.authHeaders(options), this._options.defaultHeaders, bodyHeaders, options.headers, diff --git a/src/version.ts b/src/version.ts index f579ccc..e8b4372 100644 --- a/src/version.ts +++ b/src/version.ts @@ -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