Skip to content

Commit fbb8cd1

Browse files
feat(api): api update
1 parent 643f950 commit fbb8cd1

3 files changed

Lines changed: 38 additions & 7 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 10
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/grid%2Fspreadsheet-api-ae41932155230b865ddb20e28d874de8256f130bc59c0ba67125d52e2e43586a.yml
3-
openapi_spec_hash: a297de17280f9fbb7a85f72ac89dc9b1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/grid%2Fspreadsheet-api-b337c0f981b3b48777c64c32edd73eb2b7bd513a38e077d7b342b7b372bc271d.yml
3+
openapi_spec_hash: 1a4275d62efcaaa62594d2bb734cf4eb
44
config_hash: d3f4645d9a93970cbead53b83c49a2c4

src/resources/workbooks.ts

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,12 +442,25 @@ export interface WorkbookListParams extends CursorPaginationParams {}
442442
export interface WorkbookCalcParams {
443443
read: Array<string>;
444444

445+
/**
446+
* Map of cell references to values. The values are written to cells in the
447+
* spreadsheet before performing the read operation. You can write numbers,
448+
* strings, and booleans. Any updated values are discarded at the end of the
449+
* request.
450+
*
451+
* ```json
452+
* {
453+
* "apply": { "A1": 10, "A2": 2.718, "A3": "Total", "A4": true, "A5": null }
454+
* // ...
455+
* }
456+
* ```
457+
*/
445458
apply?: { [key: string]: number | string | boolean | null } | null;
446459
}
447460

448461
export interface WorkbookExportParams {
449462
/**
450-
* Cells to update before exporting
463+
* Cells to update before exporting.
451464
*/
452465
apply?: Array<WorkbookExportParams.Apply> | null;
453466

@@ -697,8 +710,7 @@ export interface WorkbookRenderChartParams {
697710
chart: WorkbookRenderChartParams.Chart;
698711

699712
/**
700-
* Cells to update before rendering the chart. Changes are discarded at the end of
701-
* the request
713+
* Cells to update before rendering the chart.
702714
*/
703715
apply?: Array<WorkbookRenderChartParams.Apply> | null;
704716

@@ -954,6 +966,19 @@ export interface WorkbookUploadParams {
954966
export interface WorkbookValuesParams {
955967
read: Array<string>;
956968

969+
/**
970+
* Map of cell references to values. The values are written to cells in the
971+
* spreadsheet before performing the read operation. You can write numbers,
972+
* strings, and booleans. Any updated values are discarded at the end of the
973+
* request.
974+
*
975+
* ```json
976+
* {
977+
* "apply": { "A1": 10, "A2": 2.718, "A3": "Total", "A4": true, "A5": null }
978+
* // ...
979+
* }
980+
* ```
981+
*/
957982
apply?: { [key: string]: number | string | boolean | null } | null;
958983
}
959984

tests/api-resources/workbooks.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ describe('resource workbooks', () => {
4242

4343
// Prism tests are disabled
4444
test.skip('calc: required and optional params', async () => {
45-
const response = await client.workbooks.calc('id', { read: ['A1'], apply: { foo: 1234 } });
45+
const response = await client.workbooks.calc('id', {
46+
read: ['A1'],
47+
apply: { A1: 100, A2: 2.718, A3: 'Total', A4: true },
48+
});
4649
});
4750

4851
// Prism tests are disabled
@@ -143,6 +146,9 @@ describe('resource workbooks', () => {
143146

144147
// Prism tests are disabled
145148
test.skip('values: required and optional params', async () => {
146-
const response = await client.workbooks.values('id', { read: ['A1'], apply: { foo: 1234 } });
149+
const response = await client.workbooks.values('id', {
150+
read: ['A1'],
151+
apply: { A1: 100, A2: 2.718, A3: 'Total', A4: true },
152+
});
147153
});
148154
});

0 commit comments

Comments
 (0)