Skip to content

Commit 717d17e

Browse files
release: 1.2.1 (#58)
* refactor(types): replace Record with mapped types * fix(ci): release-doctor — report correct token name * fix(client): get fetchOptions type more reliably * chore(ci): only run for pushes and fork pull requests * release: 1.2.1 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 9fb9bdd commit 717d17e

8 files changed

Lines changed: 43 additions & 20 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
timeout-minutes: 10
1818
name: lint
1919
runs-on: ${{ github.repository == 'stainless-sdks/spreadsheet-api-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
20+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
2021
steps:
2122
- uses: actions/checkout@v4
2223

@@ -35,6 +36,7 @@ jobs:
3536
timeout-minutes: 5
3637
name: build
3738
runs-on: ${{ github.repository == 'stainless-sdks/spreadsheet-api-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
39+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
3840
permissions:
3941
contents: read
4042
id-token: write
@@ -70,6 +72,7 @@ jobs:
7072
timeout-minutes: 10
7173
name: test
7274
runs-on: ${{ github.repository == 'stainless-sdks/spreadsheet-api-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
75+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
7376
steps:
7477
- uses: actions/checkout@v4
7578

.release-please-manifest.json

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

CHANGELOG.md

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

3+
## 1.2.1 (2025-06-28)
4+
5+
Full Changelog: [v1.2.0...v1.2.1](https://github.com/GRID-is/api-sdk-ts/compare/v1.2.0...v1.2.1)
6+
7+
### Bug Fixes
8+
9+
* **ci:** release-doctor — report correct token name ([ef2fa50](https://github.com/GRID-is/api-sdk-ts/commit/ef2fa505309c459eff5c323b714f40d1d109894b))
10+
* **client:** get fetchOptions type more reliably ([c80f6da](https://github.com/GRID-is/api-sdk-ts/commit/c80f6dafbcb834150242bf827a94f8bee8ad1d5e))
11+
12+
13+
### Chores
14+
15+
* **ci:** only run for pushes and fork pull requests ([dbd68a4](https://github.com/GRID-is/api-sdk-ts/commit/dbd68a415edbfbb5ab905aa37d0899d7dceec218))
16+
17+
18+
### Refactors
19+
20+
* **types:** replace Record with mapped types ([aea9777](https://github.com/GRID-is/api-sdk-ts/commit/aea97777e3a4b6e0839e5c7df0f3fa5ff1fea3c8))
21+
322
## 1.2.0 (2025-06-21)
423

524
Full Changelog: [v1.1.3...v1.2.0](https://github.com/GRID-is/api-sdk-ts/compare/v1.1.3...v1.2.0)

bin/check-release-environment

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
errors=()
44

55
if [ -z "${NPM_TOKEN}" ]; then
6-
errors+=("The GRID_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
6+
errors+=("The NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
77
fi
88

99
lenErrors=${#errors[@]}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@grid-is/api",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "The official TypeScript library for the Grid API",
55
"author": "Grid <info@grid.is>",
66
"types": "dist/index.d.ts",

src/internal/types.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export type KeysEnum<T> = { [P in keyof Required<T>]: true };
77

88
export type FinalizedRequestInit = RequestInit & { headers: Headers };
99

10-
type NotAny<T> = [unknown] extends [T] ? never : T;
10+
type NotAny<T> = [0] extends [1 & T] ? never : T;
1111

1212
/**
1313
* Some environments overload the global fetch function, and Parameters<T> only gets the last signature.
@@ -64,13 +64,15 @@ type OverloadedParameters<T> =
6464
* [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
6565
*/
6666
/** @ts-ignore For users with \@types/node */
67-
type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types').RequestInit> | NotAny<import('../../node_modules/undici-types').RequestInit> | NotAny<import('../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types').RequestInit>;
67+
type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit>;
6868
/** @ts-ignore For users with undici */
69-
type UndiciRequestInit = NotAny<import('../node_modules/undici').RequestInit> | NotAny<import('../../node_modules/undici').RequestInit> | NotAny<import('../../../node_modules/undici').RequestInit> | NotAny<import('../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici').RequestInit>;
69+
type UndiciRequestInit = NotAny<import('../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici/index.d.ts').RequestInit>;
7070
/** @ts-ignore For users with \@types/bun */
7171
type BunRequestInit = globalThis.FetchRequestInit;
72-
/** @ts-ignore For users with node-fetch */
73-
type NodeFetchRequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
72+
/** @ts-ignore For users with node-fetch@2 */
73+
type NodeFetch2RequestInit = NotAny<import('../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit>;
74+
/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */
75+
type NodeFetch3RequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
7476
/** @ts-ignore For users who use Deno */
7577
type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
7678
/* eslint-enable */
@@ -79,7 +81,8 @@ type RequestInits =
7981
| NotAny<UndiciTypesRequestInit>
8082
| NotAny<UndiciRequestInit>
8183
| NotAny<BunRequestInit>
82-
| NotAny<NodeFetchRequestInit>
84+
| NotAny<NodeFetch2RequestInit>
85+
| NotAny<NodeFetch3RequestInit>
8386
| NotAny<RequestInit>
8487
| NotAny<FetchRequestInit>;
8588

src/resources/workbooks.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,9 @@ export interface WorkbookListResponse {
203203
/**
204204
* Response type returned by the for /calc query endpoint.
205205
*/
206-
export type WorkbookCalcResponse = Record<
207-
string,
208-
WorkbookCalcResponse.ReadValue | Array<WorkbookCalcResponse.UnionMember1>
209-
>;
206+
export type WorkbookCalcResponse = {
207+
[key: string]: WorkbookCalcResponse.ReadValue | Array<WorkbookCalcResponse.UnionMember1>;
208+
};
210209

211210
export namespace WorkbookCalcResponse {
212211
export interface ReadValue {
@@ -434,17 +433,16 @@ export interface WorkbookUploadResponse {
434433
/**
435434
* Response type returned by the for /values query endpoint.
436435
*/
437-
export type WorkbookValuesResponse = Record<
438-
string,
439-
number | number | string | boolean | null | Array<number | string | boolean | null>
440-
>;
436+
export type WorkbookValuesResponse = {
437+
[key: string]: number | number | string | boolean | null | Array<number | string | boolean | null>;
438+
};
441439

442440
export interface WorkbookListParams extends CursorPaginationParams {}
443441

444442
export interface WorkbookCalcParams {
445443
read: Array<string>;
446444

447-
apply?: Record<string, number | string | boolean | null> | null;
445+
apply?: { [key: string]: number | string | boolean | null } | null;
448446
}
449447

450448
export interface WorkbookExportParams {
@@ -942,7 +940,7 @@ export interface WorkbookUploadParams {
942940
export interface WorkbookValuesParams {
943941
read: Array<string>;
944942

945-
apply?: Record<string, number | string | boolean | null> | null;
943+
apply?: { [key: string]: number | string | boolean | null } | null;
946944
}
947945

948946
export declare namespace Workbooks {

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '1.2.0'; // x-release-please-version
1+
export const VERSION = '1.2.1'; // x-release-please-version

0 commit comments

Comments
 (0)