@corsair-dev/googlesheets 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,661 @@
1
+ import type { BindEndpoints, BindWebhooks, CorsairEndpoint, CorsairPlugin, CorsairPluginContext, CorsairWebhook, KeyBuilderContext, PluginPermissionsConfig } from 'corsair/core';
2
+ import type { PickAuth } from 'corsair/core';
3
+ import type { GoogleSheetsEndpointInputs, GoogleSheetsEndpointOutputs } from './endpoints';
4
+ import { GoogleSheetsSchema } from './schema';
5
+ import type { GoogleSheetsWebhookOutputs, GoogleSheetsWebhookPayload, RangeUpdatedEvent } from './webhooks';
6
+ export type GoogleSheetsContext = CorsairPluginContext<typeof GoogleSheetsSchema, GoogleSheetsPluginOptions>;
7
+ type GoogleSheetsEndpoint<K extends keyof GoogleSheetsEndpointOutputs> = CorsairEndpoint<GoogleSheetsContext, GoogleSheetsEndpointInputs[K], GoogleSheetsEndpointOutputs[K]>;
8
+ export type GoogleSheetsEndpoints = {
9
+ spreadsheetsCreate: GoogleSheetsEndpoint<'spreadsheetsCreate'>;
10
+ spreadsheetsDelete: GoogleSheetsEndpoint<'spreadsheetsDelete'>;
11
+ sheetsAppendRow: GoogleSheetsEndpoint<'sheetsAppendRow'>;
12
+ sheetsAppendOrUpdateRow: GoogleSheetsEndpoint<'sheetsAppendOrUpdateRow'>;
13
+ sheetsGetRows: GoogleSheetsEndpoint<'sheetsGetRows'>;
14
+ sheetsUpdateRow: GoogleSheetsEndpoint<'sheetsUpdateRow'>;
15
+ sheetsClearSheet: GoogleSheetsEndpoint<'sheetsClearSheet'>;
16
+ sheetsCreateSheet: GoogleSheetsEndpoint<'sheetsCreateSheet'>;
17
+ sheetsDeleteSheet: GoogleSheetsEndpoint<'sheetsDeleteSheet'>;
18
+ sheetsDeleteRowsOrColumns: GoogleSheetsEndpoint<'sheetsDeleteRowsOrColumns'>;
19
+ };
20
+ export type GoogleSheetsBoundEndpoints = BindEndpoints<typeof googleSheetsEndpointsNested>;
21
+ type GoogleSheetsWebhook<K extends keyof GoogleSheetsWebhookOutputs, TEvent> = CorsairWebhook<GoogleSheetsContext, GoogleSheetsWebhookPayload<TEvent>, GoogleSheetsWebhookOutputs[K]>;
22
+ export type GoogleSheetsWebhooks = {
23
+ rangeUpdated: GoogleSheetsWebhook<'rangeUpdated', RangeUpdatedEvent>;
24
+ };
25
+ export type GoogleSheetsBoundWebhooks = BindWebhooks<typeof googleSheetsWebhooksNested>;
26
+ declare const googleSheetsEndpointsNested: {
27
+ readonly spreadsheets: {
28
+ readonly create: GoogleSheetsEndpoint<"spreadsheetsCreate">;
29
+ readonly delete: GoogleSheetsEndpoint<"spreadsheetsDelete">;
30
+ };
31
+ readonly sheets: {
32
+ readonly appendRow: GoogleSheetsEndpoint<"sheetsAppendRow">;
33
+ readonly appendOrUpdateRow: GoogleSheetsEndpoint<"sheetsAppendOrUpdateRow">;
34
+ readonly getRows: GoogleSheetsEndpoint<"sheetsGetRows">;
35
+ readonly updateRow: GoogleSheetsEndpoint<"sheetsUpdateRow">;
36
+ readonly clearSheet: GoogleSheetsEndpoint<"sheetsClearSheet">;
37
+ readonly createSheet: GoogleSheetsEndpoint<"sheetsCreateSheet">;
38
+ readonly deleteSheet: GoogleSheetsEndpoint<"sheetsDeleteSheet">;
39
+ readonly deleteRowsOrColumns: GoogleSheetsEndpoint<"sheetsDeleteRowsOrColumns">;
40
+ };
41
+ };
42
+ export declare const googlesheetsEndpointSchemas: {
43
+ readonly 'spreadsheets.create': {
44
+ readonly input: import("zod").ZodObject<{
45
+ properties: import("zod").ZodOptional<import("zod").ZodObject<{
46
+ title: import("zod").ZodOptional<import("zod").ZodString>;
47
+ locale: import("zod").ZodOptional<import("zod").ZodString>;
48
+ timeZone: import("zod").ZodOptional<import("zod").ZodString>;
49
+ }, "strip", import("zod").ZodTypeAny, {
50
+ title?: string | undefined;
51
+ locale?: string | undefined;
52
+ timeZone?: string | undefined;
53
+ }, {
54
+ title?: string | undefined;
55
+ locale?: string | undefined;
56
+ timeZone?: string | undefined;
57
+ }>>;
58
+ }, "strip", import("zod").ZodTypeAny, {
59
+ properties?: {
60
+ title?: string | undefined;
61
+ locale?: string | undefined;
62
+ timeZone?: string | undefined;
63
+ } | undefined;
64
+ }, {
65
+ properties?: {
66
+ title?: string | undefined;
67
+ locale?: string | undefined;
68
+ timeZone?: string | undefined;
69
+ } | undefined;
70
+ }>;
71
+ readonly output: import("zod").ZodObject<{
72
+ spreadsheetId: import("zod").ZodOptional<import("zod").ZodString>;
73
+ properties: import("zod").ZodOptional<import("zod").ZodObject<{
74
+ title: import("zod").ZodOptional<import("zod").ZodString>;
75
+ locale: import("zod").ZodOptional<import("zod").ZodString>;
76
+ autoRecalc: import("zod").ZodOptional<import("zod").ZodEnum<["ON_CHANGE", "ON_UPDATE", "HOUR", "MINUTE"]>>;
77
+ timeZone: import("zod").ZodOptional<import("zod").ZodString>;
78
+ }, "strip", import("zod").ZodTypeAny, {
79
+ title?: string | undefined;
80
+ locale?: string | undefined;
81
+ timeZone?: string | undefined;
82
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
83
+ }, {
84
+ title?: string | undefined;
85
+ locale?: string | undefined;
86
+ timeZone?: string | undefined;
87
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
88
+ }>>;
89
+ spreadsheetUrl: import("zod").ZodOptional<import("zod").ZodString>;
90
+ }, "strip", import("zod").ZodTypeAny, {
91
+ properties?: {
92
+ title?: string | undefined;
93
+ locale?: string | undefined;
94
+ timeZone?: string | undefined;
95
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
96
+ } | undefined;
97
+ spreadsheetId?: string | undefined;
98
+ spreadsheetUrl?: string | undefined;
99
+ }, {
100
+ properties?: {
101
+ title?: string | undefined;
102
+ locale?: string | undefined;
103
+ timeZone?: string | undefined;
104
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
105
+ } | undefined;
106
+ spreadsheetId?: string | undefined;
107
+ spreadsheetUrl?: string | undefined;
108
+ }>;
109
+ };
110
+ readonly 'spreadsheets.delete': {
111
+ readonly input: import("zod").ZodObject<{
112
+ spreadsheetId: import("zod").ZodString;
113
+ }, "strip", import("zod").ZodTypeAny, {
114
+ spreadsheetId: string;
115
+ }, {
116
+ spreadsheetId: string;
117
+ }>;
118
+ readonly output: import("zod").ZodVoid;
119
+ };
120
+ readonly 'sheets.appendRow': {
121
+ readonly input: import("zod").ZodObject<{
122
+ spreadsheetId: import("zod").ZodString;
123
+ sheetName: import("zod").ZodOptional<import("zod").ZodString>;
124
+ range: import("zod").ZodOptional<import("zod").ZodString>;
125
+ values: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodNull]>, "many">>;
126
+ valueInputOption: import("zod").ZodOptional<import("zod").ZodEnum<["RAW", "USER_ENTERED"]>>;
127
+ insertDataOption: import("zod").ZodOptional<import("zod").ZodEnum<["OVERWRITE", "INSERT_ROWS"]>>;
128
+ }, "strip", import("zod").ZodTypeAny, {
129
+ spreadsheetId: string;
130
+ range?: string | undefined;
131
+ values?: (string | number | boolean | null)[] | undefined;
132
+ sheetName?: string | undefined;
133
+ valueInputOption?: "RAW" | "USER_ENTERED" | undefined;
134
+ insertDataOption?: "OVERWRITE" | "INSERT_ROWS" | undefined;
135
+ }, {
136
+ spreadsheetId: string;
137
+ range?: string | undefined;
138
+ values?: (string | number | boolean | null)[] | undefined;
139
+ sheetName?: string | undefined;
140
+ valueInputOption?: "RAW" | "USER_ENTERED" | undefined;
141
+ insertDataOption?: "OVERWRITE" | "INSERT_ROWS" | undefined;
142
+ }>;
143
+ readonly output: import("zod").ZodObject<{
144
+ spreadsheetId: import("zod").ZodOptional<import("zod").ZodString>;
145
+ totalUpdatedRows: import("zod").ZodOptional<import("zod").ZodNumber>;
146
+ totalUpdatedColumns: import("zod").ZodOptional<import("zod").ZodNumber>;
147
+ totalUpdatedCells: import("zod").ZodOptional<import("zod").ZodNumber>;
148
+ totalUpdatedSheets: import("zod").ZodOptional<import("zod").ZodNumber>;
149
+ responses: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
150
+ range: import("zod").ZodOptional<import("zod").ZodString>;
151
+ majorDimension: import("zod").ZodOptional<import("zod").ZodEnum<["ROWS", "COLUMNS", "DIMENSION_UNSPECIFIED"]>>;
152
+ values: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodNull]>, "many">, "many">>;
153
+ }, "strip", import("zod").ZodTypeAny, {
154
+ range?: string | undefined;
155
+ values?: (string | number | boolean | null)[][] | undefined;
156
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS" | undefined;
157
+ }, {
158
+ range?: string | undefined;
159
+ values?: (string | number | boolean | null)[][] | undefined;
160
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS" | undefined;
161
+ }>, "many">>;
162
+ }, "strip", import("zod").ZodTypeAny, {
163
+ spreadsheetId?: string | undefined;
164
+ totalUpdatedRows?: number | undefined;
165
+ totalUpdatedColumns?: number | undefined;
166
+ totalUpdatedCells?: number | undefined;
167
+ totalUpdatedSheets?: number | undefined;
168
+ responses?: {
169
+ range?: string | undefined;
170
+ values?: (string | number | boolean | null)[][] | undefined;
171
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS" | undefined;
172
+ }[] | undefined;
173
+ }, {
174
+ spreadsheetId?: string | undefined;
175
+ totalUpdatedRows?: number | undefined;
176
+ totalUpdatedColumns?: number | undefined;
177
+ totalUpdatedCells?: number | undefined;
178
+ totalUpdatedSheets?: number | undefined;
179
+ responses?: {
180
+ range?: string | undefined;
181
+ values?: (string | number | boolean | null)[][] | undefined;
182
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS" | undefined;
183
+ }[] | undefined;
184
+ }>;
185
+ };
186
+ readonly 'sheets.appendOrUpdateRow': {
187
+ readonly input: import("zod").ZodObject<{
188
+ spreadsheetId: import("zod").ZodString;
189
+ sheetName: import("zod").ZodOptional<import("zod").ZodString>;
190
+ keyColumn: import("zod").ZodOptional<import("zod").ZodString>;
191
+ keyValue: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
192
+ values: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodNull]>, "many">>;
193
+ valueInputOption: import("zod").ZodOptional<import("zod").ZodEnum<["RAW", "USER_ENTERED"]>>;
194
+ insertDataOption: import("zod").ZodOptional<import("zod").ZodEnum<["OVERWRITE", "INSERT_ROWS"]>>;
195
+ }, "strip", import("zod").ZodTypeAny, {
196
+ spreadsheetId: string;
197
+ values?: (string | number | boolean | null)[] | undefined;
198
+ sheetName?: string | undefined;
199
+ valueInputOption?: "RAW" | "USER_ENTERED" | undefined;
200
+ insertDataOption?: "OVERWRITE" | "INSERT_ROWS" | undefined;
201
+ keyColumn?: string | undefined;
202
+ keyValue?: string | number | undefined;
203
+ }, {
204
+ spreadsheetId: string;
205
+ values?: (string | number | boolean | null)[] | undefined;
206
+ sheetName?: string | undefined;
207
+ valueInputOption?: "RAW" | "USER_ENTERED" | undefined;
208
+ insertDataOption?: "OVERWRITE" | "INSERT_ROWS" | undefined;
209
+ keyColumn?: string | undefined;
210
+ keyValue?: string | number | undefined;
211
+ }>;
212
+ readonly output: import("zod").ZodObject<{
213
+ spreadsheetId: import("zod").ZodOptional<import("zod").ZodString>;
214
+ totalUpdatedRows: import("zod").ZodOptional<import("zod").ZodNumber>;
215
+ totalUpdatedColumns: import("zod").ZodOptional<import("zod").ZodNumber>;
216
+ totalUpdatedCells: import("zod").ZodOptional<import("zod").ZodNumber>;
217
+ totalUpdatedSheets: import("zod").ZodOptional<import("zod").ZodNumber>;
218
+ responses: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
219
+ range: import("zod").ZodOptional<import("zod").ZodString>;
220
+ majorDimension: import("zod").ZodOptional<import("zod").ZodEnum<["ROWS", "COLUMNS", "DIMENSION_UNSPECIFIED"]>>;
221
+ values: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodNull]>, "many">, "many">>;
222
+ }, "strip", import("zod").ZodTypeAny, {
223
+ range?: string | undefined;
224
+ values?: (string | number | boolean | null)[][] | undefined;
225
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS" | undefined;
226
+ }, {
227
+ range?: string | undefined;
228
+ values?: (string | number | boolean | null)[][] | undefined;
229
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS" | undefined;
230
+ }>, "many">>;
231
+ }, "strip", import("zod").ZodTypeAny, {
232
+ spreadsheetId?: string | undefined;
233
+ totalUpdatedRows?: number | undefined;
234
+ totalUpdatedColumns?: number | undefined;
235
+ totalUpdatedCells?: number | undefined;
236
+ totalUpdatedSheets?: number | undefined;
237
+ responses?: {
238
+ range?: string | undefined;
239
+ values?: (string | number | boolean | null)[][] | undefined;
240
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS" | undefined;
241
+ }[] | undefined;
242
+ }, {
243
+ spreadsheetId?: string | undefined;
244
+ totalUpdatedRows?: number | undefined;
245
+ totalUpdatedColumns?: number | undefined;
246
+ totalUpdatedCells?: number | undefined;
247
+ totalUpdatedSheets?: number | undefined;
248
+ responses?: {
249
+ range?: string | undefined;
250
+ values?: (string | number | boolean | null)[][] | undefined;
251
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS" | undefined;
252
+ }[] | undefined;
253
+ }>;
254
+ };
255
+ readonly 'sheets.getRows': {
256
+ readonly input: import("zod").ZodObject<{
257
+ spreadsheetId: import("zod").ZodString;
258
+ sheetName: import("zod").ZodOptional<import("zod").ZodString>;
259
+ range: import("zod").ZodOptional<import("zod").ZodString>;
260
+ valueRenderOption: import("zod").ZodOptional<import("zod").ZodEnum<["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"]>>;
261
+ dateTimeRenderOption: import("zod").ZodOptional<import("zod").ZodEnum<["SERIAL_NUMBER", "FORMATTED_STRING"]>>;
262
+ }, "strip", import("zod").ZodTypeAny, {
263
+ spreadsheetId: string;
264
+ range?: string | undefined;
265
+ sheetName?: string | undefined;
266
+ valueRenderOption?: "FORMATTED_VALUE" | "UNFORMATTED_VALUE" | "FORMULA" | undefined;
267
+ dateTimeRenderOption?: "SERIAL_NUMBER" | "FORMATTED_STRING" | undefined;
268
+ }, {
269
+ spreadsheetId: string;
270
+ range?: string | undefined;
271
+ sheetName?: string | undefined;
272
+ valueRenderOption?: "FORMATTED_VALUE" | "UNFORMATTED_VALUE" | "FORMULA" | undefined;
273
+ dateTimeRenderOption?: "SERIAL_NUMBER" | "FORMATTED_STRING" | undefined;
274
+ }>;
275
+ readonly output: import("zod").ZodObject<{
276
+ range: import("zod").ZodOptional<import("zod").ZodString>;
277
+ majorDimension: import("zod").ZodOptional<import("zod").ZodEnum<["ROWS", "COLUMNS", "DIMENSION_UNSPECIFIED"]>>;
278
+ values: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodNull]>, "many">, "many">>;
279
+ }, "strip", import("zod").ZodTypeAny, {
280
+ range?: string | undefined;
281
+ values?: (string | number | boolean | null)[][] | undefined;
282
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS" | undefined;
283
+ }, {
284
+ range?: string | undefined;
285
+ values?: (string | number | boolean | null)[][] | undefined;
286
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS" | undefined;
287
+ }>;
288
+ };
289
+ readonly 'sheets.updateRow': {
290
+ readonly input: import("zod").ZodObject<{
291
+ spreadsheetId: import("zod").ZodString;
292
+ sheetName: import("zod").ZodOptional<import("zod").ZodString>;
293
+ range: import("zod").ZodOptional<import("zod").ZodString>;
294
+ rowIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
295
+ values: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodNull]>, "many">>;
296
+ valueInputOption: import("zod").ZodOptional<import("zod").ZodEnum<["RAW", "USER_ENTERED"]>>;
297
+ }, "strip", import("zod").ZodTypeAny, {
298
+ spreadsheetId: string;
299
+ range?: string | undefined;
300
+ values?: (string | number | boolean | null)[] | undefined;
301
+ sheetName?: string | undefined;
302
+ valueInputOption?: "RAW" | "USER_ENTERED" | undefined;
303
+ rowIndex?: number | undefined;
304
+ }, {
305
+ spreadsheetId: string;
306
+ range?: string | undefined;
307
+ values?: (string | number | boolean | null)[] | undefined;
308
+ sheetName?: string | undefined;
309
+ valueInputOption?: "RAW" | "USER_ENTERED" | undefined;
310
+ rowIndex?: number | undefined;
311
+ }>;
312
+ readonly output: import("zod").ZodObject<{
313
+ spreadsheetId: import("zod").ZodOptional<import("zod").ZodString>;
314
+ totalUpdatedRows: import("zod").ZodOptional<import("zod").ZodNumber>;
315
+ totalUpdatedColumns: import("zod").ZodOptional<import("zod").ZodNumber>;
316
+ totalUpdatedCells: import("zod").ZodOptional<import("zod").ZodNumber>;
317
+ totalUpdatedSheets: import("zod").ZodOptional<import("zod").ZodNumber>;
318
+ responses: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
319
+ range: import("zod").ZodOptional<import("zod").ZodString>;
320
+ majorDimension: import("zod").ZodOptional<import("zod").ZodEnum<["ROWS", "COLUMNS", "DIMENSION_UNSPECIFIED"]>>;
321
+ values: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodNull]>, "many">, "many">>;
322
+ }, "strip", import("zod").ZodTypeAny, {
323
+ range?: string | undefined;
324
+ values?: (string | number | boolean | null)[][] | undefined;
325
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS" | undefined;
326
+ }, {
327
+ range?: string | undefined;
328
+ values?: (string | number | boolean | null)[][] | undefined;
329
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS" | undefined;
330
+ }>, "many">>;
331
+ }, "strip", import("zod").ZodTypeAny, {
332
+ spreadsheetId?: string | undefined;
333
+ totalUpdatedRows?: number | undefined;
334
+ totalUpdatedColumns?: number | undefined;
335
+ totalUpdatedCells?: number | undefined;
336
+ totalUpdatedSheets?: number | undefined;
337
+ responses?: {
338
+ range?: string | undefined;
339
+ values?: (string | number | boolean | null)[][] | undefined;
340
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS" | undefined;
341
+ }[] | undefined;
342
+ }, {
343
+ spreadsheetId?: string | undefined;
344
+ totalUpdatedRows?: number | undefined;
345
+ totalUpdatedColumns?: number | undefined;
346
+ totalUpdatedCells?: number | undefined;
347
+ totalUpdatedSheets?: number | undefined;
348
+ responses?: {
349
+ range?: string | undefined;
350
+ values?: (string | number | boolean | null)[][] | undefined;
351
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS" | undefined;
352
+ }[] | undefined;
353
+ }>;
354
+ };
355
+ readonly 'sheets.clearSheet': {
356
+ readonly input: import("zod").ZodObject<{
357
+ spreadsheetId: import("zod").ZodString;
358
+ sheetName: import("zod").ZodOptional<import("zod").ZodString>;
359
+ range: import("zod").ZodOptional<import("zod").ZodString>;
360
+ }, "strip", import("zod").ZodTypeAny, {
361
+ spreadsheetId: string;
362
+ range?: string | undefined;
363
+ sheetName?: string | undefined;
364
+ }, {
365
+ spreadsheetId: string;
366
+ range?: string | undefined;
367
+ sheetName?: string | undefined;
368
+ }>;
369
+ readonly output: import("zod").ZodObject<{
370
+ spreadsheetId: import("zod").ZodOptional<import("zod").ZodString>;
371
+ clearedRange: import("zod").ZodOptional<import("zod").ZodString>;
372
+ }, "strip", import("zod").ZodTypeAny, {
373
+ spreadsheetId?: string | undefined;
374
+ clearedRange?: string | undefined;
375
+ }, {
376
+ spreadsheetId?: string | undefined;
377
+ clearedRange?: string | undefined;
378
+ }>;
379
+ };
380
+ readonly 'sheets.createSheet': {
381
+ readonly input: import("zod").ZodObject<{
382
+ spreadsheetId: import("zod").ZodString;
383
+ title: import("zod").ZodOptional<import("zod").ZodString>;
384
+ }, "strip", import("zod").ZodTypeAny, {
385
+ spreadsheetId: string;
386
+ title?: string | undefined;
387
+ }, {
388
+ spreadsheetId: string;
389
+ title?: string | undefined;
390
+ }>;
391
+ readonly output: import("zod").ZodObject<{
392
+ spreadsheetId: import("zod").ZodOptional<import("zod").ZodString>;
393
+ replies: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodAny, "many">>;
394
+ updatedSpreadsheet: import("zod").ZodOptional<import("zod").ZodObject<{
395
+ spreadsheetId: import("zod").ZodOptional<import("zod").ZodString>;
396
+ properties: import("zod").ZodOptional<import("zod").ZodObject<{
397
+ title: import("zod").ZodOptional<import("zod").ZodString>;
398
+ locale: import("zod").ZodOptional<import("zod").ZodString>;
399
+ autoRecalc: import("zod").ZodOptional<import("zod").ZodEnum<["ON_CHANGE", "ON_UPDATE", "HOUR", "MINUTE"]>>;
400
+ timeZone: import("zod").ZodOptional<import("zod").ZodString>;
401
+ }, "strip", import("zod").ZodTypeAny, {
402
+ title?: string | undefined;
403
+ locale?: string | undefined;
404
+ timeZone?: string | undefined;
405
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
406
+ }, {
407
+ title?: string | undefined;
408
+ locale?: string | undefined;
409
+ timeZone?: string | undefined;
410
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
411
+ }>>;
412
+ spreadsheetUrl: import("zod").ZodOptional<import("zod").ZodString>;
413
+ }, "strip", import("zod").ZodTypeAny, {
414
+ properties?: {
415
+ title?: string | undefined;
416
+ locale?: string | undefined;
417
+ timeZone?: string | undefined;
418
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
419
+ } | undefined;
420
+ spreadsheetId?: string | undefined;
421
+ spreadsheetUrl?: string | undefined;
422
+ }, {
423
+ properties?: {
424
+ title?: string | undefined;
425
+ locale?: string | undefined;
426
+ timeZone?: string | undefined;
427
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
428
+ } | undefined;
429
+ spreadsheetId?: string | undefined;
430
+ spreadsheetUrl?: string | undefined;
431
+ }>>;
432
+ }, "strip", import("zod").ZodTypeAny, {
433
+ spreadsheetId?: string | undefined;
434
+ replies?: any[] | undefined;
435
+ updatedSpreadsheet?: {
436
+ properties?: {
437
+ title?: string | undefined;
438
+ locale?: string | undefined;
439
+ timeZone?: string | undefined;
440
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
441
+ } | undefined;
442
+ spreadsheetId?: string | undefined;
443
+ spreadsheetUrl?: string | undefined;
444
+ } | undefined;
445
+ }, {
446
+ spreadsheetId?: string | undefined;
447
+ replies?: any[] | undefined;
448
+ updatedSpreadsheet?: {
449
+ properties?: {
450
+ title?: string | undefined;
451
+ locale?: string | undefined;
452
+ timeZone?: string | undefined;
453
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
454
+ } | undefined;
455
+ spreadsheetId?: string | undefined;
456
+ spreadsheetUrl?: string | undefined;
457
+ } | undefined;
458
+ }>;
459
+ };
460
+ readonly 'sheets.deleteSheet': {
461
+ readonly input: import("zod").ZodObject<{
462
+ spreadsheetId: import("zod").ZodString;
463
+ sheetId: import("zod").ZodNumber;
464
+ }, "strip", import("zod").ZodTypeAny, {
465
+ spreadsheetId: string;
466
+ sheetId: number;
467
+ }, {
468
+ spreadsheetId: string;
469
+ sheetId: number;
470
+ }>;
471
+ readonly output: import("zod").ZodObject<{
472
+ spreadsheetId: import("zod").ZodOptional<import("zod").ZodString>;
473
+ replies: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodAny, "many">>;
474
+ updatedSpreadsheet: import("zod").ZodOptional<import("zod").ZodObject<{
475
+ spreadsheetId: import("zod").ZodOptional<import("zod").ZodString>;
476
+ properties: import("zod").ZodOptional<import("zod").ZodObject<{
477
+ title: import("zod").ZodOptional<import("zod").ZodString>;
478
+ locale: import("zod").ZodOptional<import("zod").ZodString>;
479
+ autoRecalc: import("zod").ZodOptional<import("zod").ZodEnum<["ON_CHANGE", "ON_UPDATE", "HOUR", "MINUTE"]>>;
480
+ timeZone: import("zod").ZodOptional<import("zod").ZodString>;
481
+ }, "strip", import("zod").ZodTypeAny, {
482
+ title?: string | undefined;
483
+ locale?: string | undefined;
484
+ timeZone?: string | undefined;
485
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
486
+ }, {
487
+ title?: string | undefined;
488
+ locale?: string | undefined;
489
+ timeZone?: string | undefined;
490
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
491
+ }>>;
492
+ spreadsheetUrl: import("zod").ZodOptional<import("zod").ZodString>;
493
+ }, "strip", import("zod").ZodTypeAny, {
494
+ properties?: {
495
+ title?: string | undefined;
496
+ locale?: string | undefined;
497
+ timeZone?: string | undefined;
498
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
499
+ } | undefined;
500
+ spreadsheetId?: string | undefined;
501
+ spreadsheetUrl?: string | undefined;
502
+ }, {
503
+ properties?: {
504
+ title?: string | undefined;
505
+ locale?: string | undefined;
506
+ timeZone?: string | undefined;
507
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
508
+ } | undefined;
509
+ spreadsheetId?: string | undefined;
510
+ spreadsheetUrl?: string | undefined;
511
+ }>>;
512
+ }, "strip", import("zod").ZodTypeAny, {
513
+ spreadsheetId?: string | undefined;
514
+ replies?: any[] | undefined;
515
+ updatedSpreadsheet?: {
516
+ properties?: {
517
+ title?: string | undefined;
518
+ locale?: string | undefined;
519
+ timeZone?: string | undefined;
520
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
521
+ } | undefined;
522
+ spreadsheetId?: string | undefined;
523
+ spreadsheetUrl?: string | undefined;
524
+ } | undefined;
525
+ }, {
526
+ spreadsheetId?: string | undefined;
527
+ replies?: any[] | undefined;
528
+ updatedSpreadsheet?: {
529
+ properties?: {
530
+ title?: string | undefined;
531
+ locale?: string | undefined;
532
+ timeZone?: string | undefined;
533
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
534
+ } | undefined;
535
+ spreadsheetId?: string | undefined;
536
+ spreadsheetUrl?: string | undefined;
537
+ } | undefined;
538
+ }>;
539
+ };
540
+ readonly 'sheets.deleteRowsOrColumns': {
541
+ readonly input: import("zod").ZodObject<{
542
+ spreadsheetId: import("zod").ZodString;
543
+ sheetId: import("zod").ZodNumber;
544
+ dimension: import("zod").ZodOptional<import("zod").ZodEnum<["ROWS", "COLUMNS"]>>;
545
+ startIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
546
+ endIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
547
+ }, "strip", import("zod").ZodTypeAny, {
548
+ spreadsheetId: string;
549
+ sheetId: number;
550
+ dimension?: "ROWS" | "COLUMNS" | undefined;
551
+ startIndex?: number | undefined;
552
+ endIndex?: number | undefined;
553
+ }, {
554
+ spreadsheetId: string;
555
+ sheetId: number;
556
+ dimension?: "ROWS" | "COLUMNS" | undefined;
557
+ startIndex?: number | undefined;
558
+ endIndex?: number | undefined;
559
+ }>;
560
+ readonly output: import("zod").ZodObject<{
561
+ spreadsheetId: import("zod").ZodOptional<import("zod").ZodString>;
562
+ replies: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodAny, "many">>;
563
+ updatedSpreadsheet: import("zod").ZodOptional<import("zod").ZodObject<{
564
+ spreadsheetId: import("zod").ZodOptional<import("zod").ZodString>;
565
+ properties: import("zod").ZodOptional<import("zod").ZodObject<{
566
+ title: import("zod").ZodOptional<import("zod").ZodString>;
567
+ locale: import("zod").ZodOptional<import("zod").ZodString>;
568
+ autoRecalc: import("zod").ZodOptional<import("zod").ZodEnum<["ON_CHANGE", "ON_UPDATE", "HOUR", "MINUTE"]>>;
569
+ timeZone: import("zod").ZodOptional<import("zod").ZodString>;
570
+ }, "strip", import("zod").ZodTypeAny, {
571
+ title?: string | undefined;
572
+ locale?: string | undefined;
573
+ timeZone?: string | undefined;
574
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
575
+ }, {
576
+ title?: string | undefined;
577
+ locale?: string | undefined;
578
+ timeZone?: string | undefined;
579
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
580
+ }>>;
581
+ spreadsheetUrl: import("zod").ZodOptional<import("zod").ZodString>;
582
+ }, "strip", import("zod").ZodTypeAny, {
583
+ properties?: {
584
+ title?: string | undefined;
585
+ locale?: string | undefined;
586
+ timeZone?: string | undefined;
587
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
588
+ } | undefined;
589
+ spreadsheetId?: string | undefined;
590
+ spreadsheetUrl?: string | undefined;
591
+ }, {
592
+ properties?: {
593
+ title?: string | undefined;
594
+ locale?: string | undefined;
595
+ timeZone?: string | undefined;
596
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
597
+ } | undefined;
598
+ spreadsheetId?: string | undefined;
599
+ spreadsheetUrl?: string | undefined;
600
+ }>>;
601
+ }, "strip", import("zod").ZodTypeAny, {
602
+ spreadsheetId?: string | undefined;
603
+ replies?: any[] | undefined;
604
+ updatedSpreadsheet?: {
605
+ properties?: {
606
+ title?: string | undefined;
607
+ locale?: string | undefined;
608
+ timeZone?: string | undefined;
609
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
610
+ } | undefined;
611
+ spreadsheetId?: string | undefined;
612
+ spreadsheetUrl?: string | undefined;
613
+ } | undefined;
614
+ }, {
615
+ spreadsheetId?: string | undefined;
616
+ replies?: any[] | undefined;
617
+ updatedSpreadsheet?: {
618
+ properties?: {
619
+ title?: string | undefined;
620
+ locale?: string | undefined;
621
+ timeZone?: string | undefined;
622
+ autoRecalc?: "ON_CHANGE" | "ON_UPDATE" | "HOUR" | "MINUTE" | undefined;
623
+ } | undefined;
624
+ spreadsheetId?: string | undefined;
625
+ spreadsheetUrl?: string | undefined;
626
+ } | undefined;
627
+ }>;
628
+ };
629
+ };
630
+ declare const googleSheetsWebhooksNested: {
631
+ readonly rangeUpdated: GoogleSheetsWebhook<"rangeUpdated", {
632
+ range: string;
633
+ values: (string | number | boolean | null)[];
634
+ spreadsheetId: string;
635
+ sheetName: string;
636
+ eventType: "rangeUpdated";
637
+ timestamp: string;
638
+ }>;
639
+ };
640
+ export type GoogleSheetsPluginOptions = {
641
+ authType?: PickAuth<'oauth_2'>;
642
+ key?: string;
643
+ hooks?: InternalGoogleSheetsPlugin['hooks'];
644
+ webhookHooks?: InternalGoogleSheetsPlugin['webhookHooks'];
645
+ /**
646
+ * Permission configuration for the Google Sheets plugin.
647
+ * Controls what the AI agent is allowed to do.
648
+ * Overrides use dot-notation paths from the Google Sheets endpoint tree — invalid paths are type errors.
649
+ */
650
+ permissions?: PluginPermissionsConfig<typeof googleSheetsEndpointsNested>;
651
+ };
652
+ export type GoogleSheetsKeyBuilderContext = KeyBuilderContext<GoogleSheetsPluginOptions>;
653
+ declare const defaultAuthType: "oauth_2";
654
+ export type BaseGoogleSheetsPlugin<T extends GoogleSheetsPluginOptions> = CorsairPlugin<'googlesheets', typeof GoogleSheetsSchema, typeof googleSheetsEndpointsNested, typeof googleSheetsWebhooksNested, T, typeof defaultAuthType>;
655
+ export type InternalGoogleSheetsPlugin = BaseGoogleSheetsPlugin<GoogleSheetsPluginOptions>;
656
+ export type ExternalGoogleSheetsPlugin<T extends GoogleSheetsPluginOptions> = BaseGoogleSheetsPlugin<T>;
657
+ export declare function googlesheets<const T extends GoogleSheetsPluginOptions>(incomingOptions?: GoogleSheetsPluginOptions & T): ExternalGoogleSheetsPlugin<T>;
658
+ export type { GoogleAppsScriptWebhookPayload, GoogleSheetsEventName, GoogleSheetsWebhookEvent, GoogleSheetsWebhookOutputs, GoogleSheetsWebhookPayload, RangeUpdatedEvent, } from './webhooks/types';
659
+ export { createGoogleSheetsWebhookMatcher } from './webhooks/types';
660
+ export type { GoogleSheetsEndpointInputs, GoogleSheetsEndpointOutputs, } from './endpoints/types';
661
+ //# sourceMappingURL=index.d.ts.map