Skip to content

Commit 17919d2

Browse files
release: 1.1.1 (#54)
* fix(api): Add label parameters endpoint * release: 1.1.1 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent aea7e10 commit 17919d2

10 files changed

Lines changed: 98 additions & 5 deletions

File tree

.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.1.0"
2+
".": "1.1.1"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 9
1+
configured_endpoints: 10
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/grid%2Fspreadsheet-api-c04aecbf881fa8800053188fa5d587605aa4238cf9d732ebd6c18d7b8c65e400.yml
33
openapi_spec_hash: ce7f54c0cb3e2baccca845c7e83d44fe
4-
config_hash: 30cb36a4b395dedfacaa0aad4fcc34c6
4+
config_hash: d3f4645d9a93970cbead53b83c49a2c4

CHANGELOG.md

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

3+
## 1.1.1 (2025-05-23)
4+
5+
Full Changelog: [v1.1.0...v1.1.1](https://github.com/GRID-is/api-sdk-ts/compare/v1.1.0...v1.1.1)
6+
7+
### Bug Fixes
8+
9+
* **api:** Add label parameters endpoint ([d091822](https://github.com/GRID-is/api-sdk-ts/commit/d091822794d0dccc1099e354a7c7b5ad749f54c6))
10+
311
## 1.1.0 (2025-05-23)
412

513
Full Changelog: [v1.0.1...v1.1.0](https://github.com/GRID-is/api-sdk-ts/compare/v1.0.1...v1.1.0)

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ Methods:
2323
Types:
2424

2525
- <code><a href="./src/resources/beta.ts">BetaGetWorkbookLabelsResponse</a></code>
26+
- <code><a href="./src/resources/beta.ts">BetaGetWorkbookParametersResponse</a></code>
2627
- <code><a href="./src/resources/beta.ts">BetaSearchLabelsResponse</a></code>
2728

2829
Methods:
2930

3031
- <code title="get /v1/workbooks/{id}/labels">client.beta.<a href="./src/resources/beta.ts">getWorkbookLabels</a>(id) -> BetaGetWorkbookLabelsResponse</code>
32+
- <code title="get /v1/workbooks/{id}/parameters">client.beta.<a href="./src/resources/beta.ts">getWorkbookParameters</a>(id) -> BetaGetWorkbookParametersResponse</code>
3133
- <code title="post /v1/workbooks/search/labels">client.beta.<a href="./src/resources/beta.ts">searchLabels</a>({ ...params }) -> BetaSearchLabelsResponse</code>

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.1.0",
3+
"version": "1.1.1",
44
"description": "The official TypeScript library for the Grid API",
55
"author": "Grid <info@grid.is>",
66
"types": "dist/index.d.ts",

src/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { FinalRequestOptions, RequestOptions } from './internal/request-options'
2525
import {
2626
Beta,
2727
BetaGetWorkbookLabelsResponse,
28+
BetaGetWorkbookParametersResponse,
2829
BetaSearchLabelsParams,
2930
BetaSearchLabelsResponse,
3031
} from './resources/beta';
@@ -768,6 +769,7 @@ export declare namespace Grid {
768769
export {
769770
Beta as Beta,
770771
type BetaGetWorkbookLabelsResponse as BetaGetWorkbookLabelsResponse,
772+
type BetaGetWorkbookParametersResponse as BetaGetWorkbookParametersResponse,
771773
type BetaSearchLabelsResponse as BetaSearchLabelsResponse,
772774
type BetaSearchLabelsParams as BetaSearchLabelsParams,
773775
};

src/resources/beta.ts

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ export class Beta extends APIResource {
1313
return this._client.get(path`/v1/workbooks/${id}/labels`, options);
1414
}
1515

16+
/**
17+
* Retrieve labels automatically detected for cells and ranges in the workbook.
18+
*/
19+
getWorkbookParameters(id: string, options?: RequestOptions): APIPromise<BetaGetWorkbookParametersResponse> {
20+
return this._client.get(path`/v1/workbooks/${id}/parameters`, options);
21+
}
22+
1623
/**
1724
* Search data labels across all spreadsheets uploaded to an account
1825
*/
@@ -67,6 +74,66 @@ export namespace BetaGetWorkbookLabelsResponse {
6774
}
6875
}
6976

77+
export interface BetaGetWorkbookParametersResponse {
78+
/**
79+
* The date/time the parameters were detected and stored
80+
*/
81+
created: string;
82+
83+
/**
84+
* The parameters associated with the workbook
85+
*/
86+
parameters: Array<BetaGetWorkbookParametersResponse.Parameter>;
87+
88+
/**
89+
* The id of the workbook the labels belong to
90+
*/
91+
workbook_id: string;
92+
93+
/**
94+
* The version of the workbook the labels belong to
95+
*/
96+
workbook_version: number;
97+
}
98+
99+
export namespace BetaGetWorkbookParametersResponse {
100+
export interface Parameter {
101+
/**
102+
* The labels associated with the parameter
103+
*/
104+
labels: Array<Parameter.Label>;
105+
106+
/**
107+
* The cell address/reference containing the parameter
108+
*/
109+
ref: string;
110+
111+
/**
112+
* The type of value found in the parameter cell
113+
*/
114+
type: 'blank' | 'date' | 'number' | 'string' | 'boolean' | 'error';
115+
116+
/**
117+
* The value in the parameter cell, type is determined by the type field
118+
*/
119+
value?: string | number | boolean | null;
120+
}
121+
122+
export namespace Parameter {
123+
export interface Label {
124+
/**
125+
* The cell address/reference which the label applies to
126+
*/
127+
at: string;
128+
129+
/**
130+
* The label string
131+
*/
132+
text: string;
133+
}
134+
}
135+
}
136+
70137
/**
71138
* The results of a spreadsheet data label search.
72139
*/
@@ -166,6 +233,7 @@ export interface BetaSearchLabelsParams {
166233
export declare namespace Beta {
167234
export {
168235
type BetaGetWorkbookLabelsResponse as BetaGetWorkbookLabelsResponse,
236+
type BetaGetWorkbookParametersResponse as BetaGetWorkbookParametersResponse,
169237
type BetaSearchLabelsResponse as BetaSearchLabelsResponse,
170238
type BetaSearchLabelsParams as BetaSearchLabelsParams,
171239
};

src/resources/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
export {
44
Beta,
55
type BetaGetWorkbookLabelsResponse,
6+
type BetaGetWorkbookParametersResponse,
67
type BetaSearchLabelsResponse,
78
type BetaSearchLabelsParams,
89
} from './beta';

src/version.ts

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

tests/api-resources/beta.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ describe('resource beta', () => {
2020
expect(dataAndResponse.response).toBe(rawResponse);
2121
});
2222

23+
// skipped: tests are disabled for the time being
24+
test.skip('getWorkbookParameters', async () => {
25+
const responsePromise = client.beta.getWorkbookParameters('id');
26+
const rawResponse = await responsePromise.asResponse();
27+
expect(rawResponse).toBeInstanceOf(Response);
28+
const response = await responsePromise;
29+
expect(response).not.toBeInstanceOf(Response);
30+
const dataAndResponse = await responsePromise.withResponse();
31+
expect(dataAndResponse.data).toBe(response);
32+
expect(dataAndResponse.response).toBe(rawResponse);
33+
});
34+
2335
// skipped: tests are disabled for the time being
2436
test.skip('searchLabels: only required params', async () => {
2537
const responsePromise = client.beta.searchLabels({ query: 'profit' });

0 commit comments

Comments
 (0)