@particle-academy/google-sheets-ui 0.3.4 → 0.5.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.
- package/CHANGELOG.md +33 -0
- package/README.md +28 -0
- package/art/fancified.svg +26 -0
- package/dist/index.cjs +196 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +187 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,39 @@ The four packages share one version, because they are generated from one
|
|
|
8
8
|
`provider/` definition and a version that meant something different in each
|
|
9
9
|
would be a version nobody could reason about.
|
|
10
10
|
|
|
11
|
+
## [0.5.0] — 2026-11-08
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Laravel integration, in this package** (`src/Laravel/`), auto-discovered
|
|
16
|
+
through composer's `extra.laravel`. Laravel is SUGGESTED, never required:
|
|
17
|
+
outside a Laravel app none of it loads.
|
|
18
|
+
- a service provider that merges `config/google-sheets.php` under
|
|
19
|
+
`connectors.google-sheets` (credentials from the environment, or per call for a
|
|
20
|
+
multi-account app);
|
|
21
|
+
- the `GoogleSheets` facade: `GoogleSheets::call('<operation>', [...])` runs any action;
|
|
22
|
+
- `GoogleSheets::fake()`, answered from the connector's faker, with
|
|
23
|
+
`assertSent` / `assertNotSent` / `assertNothingSent` / `assertSentCount`;
|
|
24
|
+
- its own Pest test of all of it against a booted Laravel app.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- **Tests: Pest `^5`**, and `laravel/framework` `^13` as a DEV-ONLY test
|
|
29
|
+
dependency (the framework this package integrates with; nothing ships in
|
|
30
|
+
`require`).
|
|
31
|
+
|
|
32
|
+
## [0.4.0] — 2026-10-01
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
- **`values_get`** and **`values_update`** — read a range, and overwrite
|
|
37
|
+
one. No scope change: this connector already holds the full
|
|
38
|
+
`spreadsheets` scope `row_append` needed. `values_update` OVERWRITES
|
|
39
|
+
the cells inside the given range; it does not push existing rows down
|
|
40
|
+
or search for the next empty row the way `row_append` (`values.append`)
|
|
41
|
+
does — the two sound alike and behave differently on data already
|
|
42
|
+
there, said plainly in both actions' own descriptions.
|
|
43
|
+
|
|
11
44
|
## [0.3.4] — 2026-09-12
|
|
12
45
|
|
|
13
46
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Google Sheets
|
|
2
2
|
|
|
3
|
+
[](https://particle.academy)
|
|
4
|
+
|
|
3
5
|
Google Sheets for [fancy-flow][flow] — as **four imported, versioned packages**, one
|
|
4
6
|
per runtime. Not vendored source: a copy cannot be upgraded, and third-party APIs
|
|
5
7
|
change.
|
|
@@ -79,6 +81,32 @@ Append a row to a Google Sheet.
|
|
|
79
81
|
| `valueInputOption` | no | USER_ENTERED parses the cells the way typing them would -- so =SUM(A1:A2) becomes a formula and 1/2/26 becomes a date. RAW stores exactly the characters given. |
|
|
80
82
|
| `insertDataOption` | no | INSERT_ROWS pushes existing rows down. OVERWRITE writes into them. |
|
|
81
83
|
|
|
84
|
+
#### `values_get` — Read Google Sheets values
|
|
85
|
+
|
|
86
|
+
Read the cell values of a range.
|
|
87
|
+
|
|
88
|
+
`GET /v4/spreadsheets/{spreadsheetId}/values/{range}` · reads only — safe to replay
|
|
89
|
+
|
|
90
|
+
| Input | Required | What it is |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| `spreadsheetId` | yes | The long id from the sheet's URL: docs.google.com/spreadsheets/d/THIS_PART/edit. |
|
|
93
|
+
| `range` | yes | In A1 notation, the same shape row_append accepts. |
|
|
94
|
+
| `valueRenderOption` | no | How to render values |
|
|
95
|
+
| `majorDimension` | no | Whether the outer array of the result is rows or columns. |
|
|
96
|
+
|
|
97
|
+
#### `values_update` — Write Google Sheets values
|
|
98
|
+
|
|
99
|
+
Overwrite the cell values of a range. Existing values in that range are replaced, not pushed down.
|
|
100
|
+
|
|
101
|
+
`PUT /v4/spreadsheets/{spreadsheetId}/values/{range}` · idempotent — safe to replay
|
|
102
|
+
|
|
103
|
+
| Input | Required | What it is |
|
|
104
|
+
|---|---|---|
|
|
105
|
+
| `spreadsheetId` | yes | Spreadsheet ID |
|
|
106
|
+
| `range` | yes | In A1 notation. The values written fill this range from its top-left cell -- more rows or columns than the range covers are written anyway, following Google's own documented behavior; fewer leave the rest of the range untouched. |
|
|
107
|
+
| `values` | yes | The cells to write, comma separated, left to right, one row. For more than one row, call this action once per row. |
|
|
108
|
+
| `valueInputOption` | yes | USER_ENTERED parses the cells the way typing them would -- so =SUM(A1:A2) becomes a formula. RAW stores exactly the characters given. |
|
|
109
|
+
|
|
82
110
|
## Run it before you have credentials
|
|
83
111
|
|
|
84
112
|
Every operation ships a **faker**, whether or not Google Sheets has a sandbox. Set a
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="28" role="img" aria-label="Fancified — built with Fancy UI">
|
|
2
|
+
<title>Fancified · built with Fancy UI</title>
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="fcdBg" x1="0" y1="0" x2="1" y2="1">
|
|
5
|
+
<stop offset="0" stop-color="#6d28d9"/>
|
|
6
|
+
<stop offset=".5" stop-color="#9333ea"/>
|
|
7
|
+
<stop offset="1" stop-color="#d946ef"/>
|
|
8
|
+
</linearGradient>
|
|
9
|
+
<linearGradient id="fcdGloss" x1="0" y1="0" x2="0" y2="1">
|
|
10
|
+
<stop offset="0" stop-color="#ffffff" stop-opacity=".30"/>
|
|
11
|
+
<stop offset=".55" stop-color="#ffffff" stop-opacity="0"/>
|
|
12
|
+
</linearGradient>
|
|
13
|
+
<clipPath id="fcdClip"><rect width="128" height="28" rx="7"/></clipPath>
|
|
14
|
+
</defs>
|
|
15
|
+
<g clip-path="url(#fcdClip)">
|
|
16
|
+
<rect width="128" height="28" fill="url(#fcdBg)"/>
|
|
17
|
+
<rect width="34" height="28" fill="#3b0764" fill-opacity=".5"/>
|
|
18
|
+
<rect width="128" height="13" fill="url(#fcdGloss)"/>
|
|
19
|
+
<g fill="#fff">
|
|
20
|
+
<path transform="translate(17 14)" d="M0 -7 C.6 -2.2 2.2 -.6 7 0 C2.2 .6 .6 2.2 0 7 C-.6 2.2 -2.2 .6 -7 0 C-2.2 -.6 -.6 -2.2 0 -7 Z"/>
|
|
21
|
+
<path transform="translate(25.5 7.5) scale(.34)" fill-opacity=".85" d="M0 -7 C.6 -2.2 2.2 -.6 7 0 C2.2 .6 .6 2.2 0 7 C-.6 2.2 -2.2 .6 -7 0 C-2.2 -.6 -.6 -2.2 0 -7 Z"/>
|
|
22
|
+
</g>
|
|
23
|
+
<text x="81" y="18.5" fill="#ffffff" text-anchor="middle" font-family="'Segoe UI',Verdana,'DejaVu Sans',sans-serif" font-size="12" font-weight="700" letter-spacing=".3">Fancified</text>
|
|
24
|
+
</g>
|
|
25
|
+
<rect x=".5" y=".5" width="127" height="27" rx="6.5" fill="none" stroke="#ffffff" stroke-opacity=".22"/>
|
|
26
|
+
</svg>
|
package/dist/index.cjs
CHANGED
|
@@ -152,10 +152,195 @@ var googleSheetsRowKind = connectors.defineConnectorKind(GOOGLE_SHEETS_ROW_META,
|
|
|
152
152
|
},
|
|
153
153
|
renderBody: ({ config }) => connectors.summarize(GOOGLE_SHEETS_ROW_META, config, "append a row")
|
|
154
154
|
});
|
|
155
|
+
var GOOGLE_SHEETS_VALUES_GET_KIND = "@particle-academy/google_sheets_values_get";
|
|
156
|
+
var GOOGLE_SHEETS_VALUES_GET_OPERATION = "values_get";
|
|
157
|
+
var GOOGLE_SHEETS_VALUES_GET_META = googleSheetsMeta("action", "read a range", "https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/get");
|
|
158
|
+
var GOOGLE_SHEETS_VALUES_GET_OUTPUT = [
|
|
159
|
+
{
|
|
160
|
+
"path": "data.range",
|
|
161
|
+
"type": "string",
|
|
162
|
+
"description": "The range actually covered -- may be smaller than what was asked for; Google excludes empty trailing rows and columns."
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"path": "data.majorDimension",
|
|
166
|
+
"type": "string",
|
|
167
|
+
"description": "Echoes what was asked, or ROWS by default."
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"path": "data.values",
|
|
171
|
+
"type": "array",
|
|
172
|
+
"description": "Rows of cells -- an array of arrays. One row is [[a, b, c]], the same shape row_append sends. Absent entirely when the range is empty."
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"path": "mode",
|
|
176
|
+
"type": "string",
|
|
177
|
+
"description": "Which estate this ran against. Google has no sandbox, so: fake or live."
|
|
178
|
+
}
|
|
179
|
+
];
|
|
180
|
+
var googleSheetsValuesGetKind = connectors.defineConnectorKind(GOOGLE_SHEETS_VALUES_GET_META, {
|
|
181
|
+
name: GOOGLE_SHEETS_VALUES_GET_KIND,
|
|
182
|
+
aliases: ["google_sheets_values_get"],
|
|
183
|
+
label: "Read Google Sheets values",
|
|
184
|
+
description: "Read the cell values of a range.",
|
|
185
|
+
inputs: [{ id: "in" }],
|
|
186
|
+
outputs: [{ id: "out" }],
|
|
187
|
+
sideEffects: "none",
|
|
188
|
+
outputShape: GOOGLE_SHEETS_VALUES_GET_OUTPUT,
|
|
189
|
+
configSchema: [
|
|
190
|
+
{
|
|
191
|
+
"type": "text",
|
|
192
|
+
"key": "spreadsheetId",
|
|
193
|
+
"label": "Spreadsheet ID",
|
|
194
|
+
"required": true,
|
|
195
|
+
"description": "The long id from the sheet's URL: docs.google.com/spreadsheets/d/THIS_PART/edit."
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"type": "text",
|
|
199
|
+
"key": "range",
|
|
200
|
+
"label": "Range",
|
|
201
|
+
"required": true,
|
|
202
|
+
"default": "Sheet1!A:Z",
|
|
203
|
+
"description": "In A1 notation, the same shape row_append accepts."
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"type": "select",
|
|
207
|
+
"key": "valueRenderOption",
|
|
208
|
+
"label": "How to render values",
|
|
209
|
+
"default": "FORMATTED_VALUE",
|
|
210
|
+
"options": [
|
|
211
|
+
{
|
|
212
|
+
"value": "FORMATTED_VALUE",
|
|
213
|
+
"label": 'Formatted, as shown in the sheet (e.g. "$1.50", "10/1/2026")'
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"value": "UNFORMATTED_VALUE",
|
|
217
|
+
"label": "The underlying number or string, no formatting applied"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"value": "FORMULA",
|
|
221
|
+
"label": "The formula text itself, for a cell that has one"
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"type": "select",
|
|
227
|
+
"key": "majorDimension",
|
|
228
|
+
"label": "Rows or columns",
|
|
229
|
+
"default": "ROWS",
|
|
230
|
+
"description": "Whether the outer array of the result is rows or columns.",
|
|
231
|
+
"options": [
|
|
232
|
+
{
|
|
233
|
+
"value": "ROWS",
|
|
234
|
+
"label": "Rows"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"value": "COLUMNS",
|
|
238
|
+
"label": "Columns"
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
defaultConfig: {
|
|
244
|
+
"mode": "auto"
|
|
245
|
+
},
|
|
246
|
+
renderBody: ({ config }) => connectors.summarize(GOOGLE_SHEETS_VALUES_GET_META, config, "read a range")
|
|
247
|
+
});
|
|
248
|
+
var GOOGLE_SHEETS_VALUES_UPDATE_KIND = "@particle-academy/google_sheets_values_update";
|
|
249
|
+
var GOOGLE_SHEETS_VALUES_UPDATE_OPERATION = "values_update";
|
|
250
|
+
var GOOGLE_SHEETS_VALUES_UPDATE_META = googleSheetsMeta("action", "write a range", "https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/update");
|
|
251
|
+
var GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT = [
|
|
252
|
+
{
|
|
253
|
+
"path": "data.spreadsheetId",
|
|
254
|
+
"type": "string",
|
|
255
|
+
"description": "The spreadsheet that was written to."
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"path": "data.updatedRange",
|
|
259
|
+
"type": "string",
|
|
260
|
+
"description": "The range Google actually wrote, in A1 notation."
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"path": "data.updatedRows",
|
|
264
|
+
"type": "number",
|
|
265
|
+
"description": "How many rows had at least one cell updated."
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"path": "data.updatedColumns",
|
|
269
|
+
"type": "number",
|
|
270
|
+
"description": "How many columns had at least one cell updated."
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"path": "data.updatedCells",
|
|
274
|
+
"type": "number",
|
|
275
|
+
"description": "How many cells were written."
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"path": "mode",
|
|
279
|
+
"type": "string",
|
|
280
|
+
"description": "Which estate this ran against. Google has no sandbox, so: fake or live."
|
|
281
|
+
}
|
|
282
|
+
];
|
|
283
|
+
var googleSheetsValuesUpdateKind = connectors.defineConnectorKind(GOOGLE_SHEETS_VALUES_UPDATE_META, {
|
|
284
|
+
name: GOOGLE_SHEETS_VALUES_UPDATE_KIND,
|
|
285
|
+
aliases: ["google_sheets_values_update"],
|
|
286
|
+
label: "Write Google Sheets values",
|
|
287
|
+
description: "Overwrite the cell values of a range. Existing values in that range are replaced, not pushed down.",
|
|
288
|
+
inputs: [{ id: "in" }],
|
|
289
|
+
outputs: [{ id: "out" }],
|
|
290
|
+
sideEffects: "idempotent",
|
|
291
|
+
outputShape: GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT,
|
|
292
|
+
configSchema: [
|
|
293
|
+
{
|
|
294
|
+
"type": "text",
|
|
295
|
+
"key": "spreadsheetId",
|
|
296
|
+
"label": "Spreadsheet ID",
|
|
297
|
+
"required": true
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"type": "text",
|
|
301
|
+
"key": "range",
|
|
302
|
+
"label": "Range",
|
|
303
|
+
"required": true,
|
|
304
|
+
"default": "Sheet1!A1",
|
|
305
|
+
"description": "In A1 notation. The values written fill this range from its top-left cell -- more rows or columns than the range covers are written anyway, following Google's own documented behavior; fewer leave the rest of the range untouched."
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"type": "text",
|
|
309
|
+
"key": "values",
|
|
310
|
+
"label": "Row values",
|
|
311
|
+
"required": true,
|
|
312
|
+
"description": "The cells to write, comma separated, left to right, one row. For more than one row, call this action once per row."
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"type": "select",
|
|
316
|
+
"key": "valueInputOption",
|
|
317
|
+
"label": "How to interpret the values",
|
|
318
|
+
"required": true,
|
|
319
|
+
"default": "USER_ENTERED",
|
|
320
|
+
"description": "USER_ENTERED parses the cells the way typing them would -- so =SUM(A1:A2) becomes a formula. RAW stores exactly the characters given.",
|
|
321
|
+
"options": [
|
|
322
|
+
{
|
|
323
|
+
"value": "USER_ENTERED",
|
|
324
|
+
"label": "As if typed (formulas and dates parsed)"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"value": "RAW",
|
|
328
|
+
"label": "Exactly as given"
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
defaultConfig: {
|
|
334
|
+
"mode": "auto"
|
|
335
|
+
},
|
|
336
|
+
renderBody: ({ config }) => connectors.summarize(GOOGLE_SHEETS_VALUES_UPDATE_META, config, "write a range")
|
|
337
|
+
});
|
|
155
338
|
|
|
156
339
|
// src/index.ts
|
|
157
340
|
var GOOGLE_SHEETS_KINDS = [
|
|
158
|
-
googleSheetsRowKind
|
|
341
|
+
googleSheetsRowKind,
|
|
342
|
+
googleSheetsValuesGetKind,
|
|
343
|
+
googleSheetsValuesUpdateKind
|
|
159
344
|
];
|
|
160
345
|
|
|
161
346
|
exports.CONNECTOR_API_VERSION = CONNECTOR_API_VERSION;
|
|
@@ -167,7 +352,17 @@ exports.GOOGLE_SHEETS_ROW_META = GOOGLE_SHEETS_ROW_META;
|
|
|
167
352
|
exports.GOOGLE_SHEETS_ROW_OPERATION = GOOGLE_SHEETS_ROW_OPERATION;
|
|
168
353
|
exports.GOOGLE_SHEETS_ROW_OUTPUT = GOOGLE_SHEETS_ROW_OUTPUT;
|
|
169
354
|
exports.GOOGLE_SHEETS_SERVICE = GOOGLE_SHEETS_SERVICE;
|
|
355
|
+
exports.GOOGLE_SHEETS_VALUES_GET_KIND = GOOGLE_SHEETS_VALUES_GET_KIND;
|
|
356
|
+
exports.GOOGLE_SHEETS_VALUES_GET_META = GOOGLE_SHEETS_VALUES_GET_META;
|
|
357
|
+
exports.GOOGLE_SHEETS_VALUES_GET_OPERATION = GOOGLE_SHEETS_VALUES_GET_OPERATION;
|
|
358
|
+
exports.GOOGLE_SHEETS_VALUES_GET_OUTPUT = GOOGLE_SHEETS_VALUES_GET_OUTPUT;
|
|
359
|
+
exports.GOOGLE_SHEETS_VALUES_UPDATE_KIND = GOOGLE_SHEETS_VALUES_UPDATE_KIND;
|
|
360
|
+
exports.GOOGLE_SHEETS_VALUES_UPDATE_META = GOOGLE_SHEETS_VALUES_UPDATE_META;
|
|
361
|
+
exports.GOOGLE_SHEETS_VALUES_UPDATE_OPERATION = GOOGLE_SHEETS_VALUES_UPDATE_OPERATION;
|
|
362
|
+
exports.GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT = GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT;
|
|
170
363
|
exports.googleSheetsMeta = googleSheetsMeta;
|
|
171
364
|
exports.googleSheetsRowKind = googleSheetsRowKind;
|
|
365
|
+
exports.googleSheetsValuesGetKind = googleSheetsValuesGetKind;
|
|
366
|
+
exports.googleSheetsValuesUpdateKind = googleSheetsValuesUpdateKind;
|
|
172
367
|
//# sourceMappingURL=index.cjs.map
|
|
173
368
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/service.ts","../src/kinds/row-append.ts","../src/index.ts"],"names":["defineConnectorKind","summarize"],"mappings":";;;;;AAmCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,qBAAA,GAAwB;AAAA,EACnC,OAAA,EAAS,eAAA;AAAA,EACT,YAAA,EAAc,eAAA;AAAA,EACd,MAAA,EAAQ,cAAA;AAAA,EACR,OAAA,EAAS;AACX;AA+BO,IAAM,yBAAA,GAA4B;AAAA,EACvC;AAAA,IACE,KAAA,EAAO,UAAA;AAAA,IACP,OAAA,EAAS,iBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,KAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,cAAA;AAAA,IACP,OAAA,EAAS,qBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,aAAA;AAAA,IACP,OAAA,EAAS,cAAA;AAAA,IACT,OAAA,EAAS,SAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,cAAA;AAAA,IACP,OAAA,EAAS,eAAA;AAAA,IACT,OAAA,EAAS,SAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA;AAEZ;AAoBO,IAAM,mBAAA,GAAsB;AAAA,EACjC,MAAA,EAAQ,oBAAA;AAAA,EACR,cAAA,EAAgB,8CAAA;AAAA,EAChB,UAAA,EAAY,qCAAA;AAAA,EACZ,QAAA,EAAU;AA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;AACF,GACF;AAAA,EACA,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,UAAA,EAAY,CAAC,EAAE,MAAA,OACbC,oBAAA,CAAU,sBAAA,EAAwB,QAAmC,cAAc;AACvF,CAAC;;;ACzGM,IAAM,mBAAA,GAA4C;AAAA,EACvD;AACF","file":"index.cjs","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Google Sheets's identity on the authoring surface, shared by every Google\n * Sheets node.\n *\n * This file must import nothing from the js package: a PHP or Python project\n * installs the ui package and never that one, and the import would be a\n * dangling module the moment it did.\n *\n * ## The sandbox trap\n *\n * Google has no sandbox for Sheets. A test spreadsheet is a real one in a real\n * Drive, so every append is real -- point this at a scratch sheet, not a\n * production one. The faker is the only way to develop against it without\n * touching a document.\n */\n\nimport type { ConnectorDomain, ConnectorMeta } from \"@particle-academy/fancy-flow/connectors\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported — an imported constant lets an upgrade rewrite the\n * very claim it exists to detect.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\n/** The parts of a connector's identity that belong to the SERVICE, not the node. */\nexport const GOOGLE_SHEETS_SERVICE = {\n service: \"google_sheets\",\n serviceTitle: \"Google Sheets\",\n domain: \"productivity\",\n sandbox: \"none\",\n} as const satisfies Pick<ConnectorMeta, \"service\" | \"serviceTitle\" | \"domain\" | \"sandbox\">;\n\n/**\n * Every connector domain weaver knows, pinned against fancy-flow's union.\n *\n * A closed set copied into three codebases stays correct only while something\n * MAKES it: this line fails to compile the moment weaver carries a value\n * fancy-flow does not, including the values no provider uses yet.\n */\nconst WEAVER_DOMAINS: readonly ConnectorDomain[] = [\n \"payments\",\n \"commerce\",\n \"messaging\",\n \"email\",\n \"crm\",\n \"support\",\n \"storage\",\n \"calendar\",\n \"productivity\",\n \"database\",\n \"devtools\",\n \"analytics\",\n \"marketing\",\n \"ai\",\n \"forms\",\n \"hr\",\n \"geo\"\n];\nvoid WEAVER_DOMAINS;\n\n/** The credentials a Google Sheets connection holds. */\nexport const GOOGLE_SHEETS_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The client secret for the same OAuth app. One value for the whole installation.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Google Sheets requires — DECLARED here, performed by the\n * host.\n *\n * A consent screen needs a browser, a redirect URI and somewhere to persist\n * the result, and all three belong to the host; a package that ran the dance\n * itself would have to own a web server. So this says precisely enough for a\n * host to do it.\n *\n * The access token lasts 3600 seconds. A host that never refreshes will work\n * all afternoon and be broken by morning, which is why the lifetime is stated\n * rather than left to be discovered.\n *\n * Its refresh tokens do NOT rotate: the same one is reusable, so a refresh may\n * safely be retried and may run concurrently. That is stated rather than\n * assumed because the opposite — a provider that spends the token and revokes\n * the grant on a replay — looks identical until it happens.\n */\nexport const GOOGLE_SHEETS_OAUTH = {\n \"flow\": \"authorization_code\",\n \"authorizeUrl\": \"https://accounts.google.com/o/oauth2/v2/auth\",\n \"tokenUrl\": \"https://oauth2.googleapis.com/token\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/spreadsheets\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"refreshTokenRotates\": false,\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Google Sheets node's connector metadata from the operation it performs. */\nexport function googleSheetsMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GOOGLE_SHEETS_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/row-append.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/row-append.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Google Sheets row — Append a row to a Google Sheet.\n *\n * https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append\n *\n * `unsafe-to-replay`.\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleSheetsMeta } from \"../service.js\";\n\nexport const GOOGLE_SHEETS_ROW_KIND = \"@particle-academy/google_sheets_row\";\nexport const GOOGLE_SHEETS_ROW_OPERATION = \"row_append\";\n\nexport const GOOGLE_SHEETS_ROW_META = googleSheetsMeta(\"action\", \"append a row\", \"https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GOOGLE_SHEETS_ROW_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.spreadsheetId\",\n \"type\": \"string\",\n \"description\": \"The spreadsheet that was written to.\"\n },\n {\n \"path\": \"data.updates.updatedRange\",\n \"type\": \"string\",\n \"description\": \"The range Google actually wrote, in A1 notation. NOT the range that was asked for -- append finds the first empty row below it.\"\n },\n {\n \"path\": \"data.updates.updatedRows\",\n \"type\": \"number\",\n \"description\": \"How many rows were added.\"\n },\n {\n \"path\": \"data.updates.updatedCells\",\n \"type\": \"number\",\n \"description\": \"How many cells were written.\"\n }\n];\n\nexport const googleSheetsRowKind: NodeKindDefinition = defineConnectorKind(GOOGLE_SHEETS_ROW_META, {\n name: GOOGLE_SHEETS_ROW_KIND,\n aliases: [\"google_sheets_row\"],\n label: \"Google Sheets row\",\n description: \"Append a row to a Google Sheet.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"unsafe-to-replay\",\n outputShape: GOOGLE_SHEETS_ROW_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"spreadsheetId\",\n \"label\": \"Spreadsheet ID\",\n \"required\": true,\n \"description\": \"The long id from the sheet's URL: docs.google.com/spreadsheets/d/THIS_PART/edit.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"range\",\n \"label\": \"Range\",\n \"required\": true,\n \"default\": \"Sheet1!A:Z\",\n \"description\": \"Where to append, in A1 notation. Google finds the last row of this range and writes below it.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"values\",\n \"label\": \"Row values\",\n \"required\": true,\n \"description\": \"The cells of the row, comma separated. Left to right from the start of the range.\"\n },\n {\n \"type\": \"select\",\n \"key\": \"valueInputOption\",\n \"label\": \"How to interpret the values\",\n \"default\": \"USER_ENTERED\",\n \"description\": \"USER_ENTERED parses the cells the way typing them would -- so =SUM(A1:A2) becomes a formula and 1/2/26 becomes a date. RAW stores exactly the characters given.\",\n \"options\": [\n {\n \"value\": \"USER_ENTERED\",\n \"label\": \"As if typed (formulas and dates parsed)\"\n },\n {\n \"value\": \"RAW\",\n \"label\": \"Exactly as given\"\n }\n ]\n },\n {\n \"type\": \"select\",\n \"key\": \"insertDataOption\",\n \"label\": \"When the range already has data below\",\n \"default\": \"INSERT_ROWS\",\n \"description\": \"INSERT_ROWS pushes existing rows down. OVERWRITE writes into them.\",\n \"options\": [\n {\n \"value\": \"INSERT_ROWS\",\n \"label\": \"Insert new rows\"\n },\n {\n \"value\": \"OVERWRITE\",\n \"label\": \"Overwrite what is there\"\n }\n ]\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_SHEETS_ROW_META, config as Record<string, unknown>, \"append a row\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Google Sheets's node kinds for fancy-flow.\n *\n * Install this on every host. The TypeScript executors live in the js\n * package's `./flow` subpath; PHP and Python hosts run their own and need only\n * this.\n */\n\nexport * from \"./service.js\";\nexport * from \"./kinds/row-append.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { googleSheetsRowKind } from \"./kinds/row-append.js\";\n\n/** Every Google Sheets kind, for a host that registers the lot. */\nexport const GOOGLE_SHEETS_KINDS: NodeKindDefinition[] = [\n googleSheetsRowKind,\n];\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/service.ts","../src/kinds/row-append.ts","../src/kinds/values-get.ts","../src/kinds/values-update.ts","../src/index.ts"],"names":["defineConnectorKind","summarize"],"mappings":";;;;;AAmCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,qBAAA,GAAwB;AAAA,EACnC,OAAA,EAAS,eAAA;AAAA,EACT,YAAA,EAAc,eAAA;AAAA,EACd,MAAA,EAAQ,cAAA;AAAA,EACR,OAAA,EAAS;AACX;AA+BO,IAAM,yBAAA,GAA4B;AAAA,EACvC;AAAA,IACE,KAAA,EAAO,UAAA;AAAA,IACP,OAAA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MACT,UAAA,EAAY,IAAA;AAAA,MACZ,SAAA,EAAW,cAAA;AAAA,MACX,aAAA,EAAe,uIAAA;AAAA,MACf,SAAA,EAAW;AAAA,QACT;AAAA,UACE,OAAA,EAAS,cAAA;AAAA,UACT,OAAA,EAAS;AAAA,SACX;AAAA,QACA;AAAA,UACE,OAAA,EAAS,KAAA;AAAA,UACT,OAAA,EAAS;AAAA;AACX;AACF;AACF,GACF;AAAA,EACA,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,UAAA,EAAY,CAAC,EAAE,MAAA,OACbC,oBAAAA,CAAU,gCAAA,EAAkC,QAAmC,eAAe;AAClG,CAAC;;;AC7FM,IAAM,mBAAA,GAA4C;AAAA,EACvD,mBAAA;AAAA,EACA,yBAAA;AAAA,EACA;AACF","file":"index.cjs","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Google Sheets's identity on the authoring surface, shared by every Google\n * Sheets node.\n *\n * This file must import nothing from the js package: a PHP or Python project\n * installs the ui package and never that one, and the import would be a\n * dangling module the moment it did.\n *\n * ## The sandbox trap\n *\n * Google has no sandbox for Sheets. A test spreadsheet is a real one in a real\n * Drive, so every append is real -- point this at a scratch sheet, not a\n * production one. The faker is the only way to develop against it without\n * touching a document.\n */\n\nimport type { ConnectorDomain, ConnectorMeta } from \"@particle-academy/fancy-flow/connectors\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported — an imported constant lets an upgrade rewrite the\n * very claim it exists to detect.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\n/** The parts of a connector's identity that belong to the SERVICE, not the node. */\nexport const GOOGLE_SHEETS_SERVICE = {\n service: \"google_sheets\",\n serviceTitle: \"Google Sheets\",\n domain: \"productivity\",\n sandbox: \"none\",\n} as const satisfies Pick<ConnectorMeta, \"service\" | \"serviceTitle\" | \"domain\" | \"sandbox\">;\n\n/**\n * Every connector domain weaver knows, pinned against fancy-flow's union.\n *\n * A closed set copied into three codebases stays correct only while something\n * MAKES it: this line fails to compile the moment weaver carries a value\n * fancy-flow does not, including the values no provider uses yet.\n */\nconst WEAVER_DOMAINS: readonly ConnectorDomain[] = [\n \"payments\",\n \"commerce\",\n \"messaging\",\n \"email\",\n \"crm\",\n \"support\",\n \"storage\",\n \"calendar\",\n \"productivity\",\n \"database\",\n \"devtools\",\n \"analytics\",\n \"marketing\",\n \"ai\",\n \"forms\",\n \"hr\",\n \"geo\"\n];\nvoid WEAVER_DOMAINS;\n\n/** The credentials a Google Sheets connection holds. */\nexport const GOOGLE_SHEETS_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The client secret for the same OAuth app. One value for the whole installation.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Google Sheets requires — DECLARED here, performed by the\n * host.\n *\n * A consent screen needs a browser, a redirect URI and somewhere to persist\n * the result, and all three belong to the host; a package that ran the dance\n * itself would have to own a web server. So this says precisely enough for a\n * host to do it.\n *\n * The access token lasts 3600 seconds. A host that never refreshes will work\n * all afternoon and be broken by morning, which is why the lifetime is stated\n * rather than left to be discovered.\n *\n * Its refresh tokens do NOT rotate: the same one is reusable, so a refresh may\n * safely be retried and may run concurrently. That is stated rather than\n * assumed because the opposite — a provider that spends the token and revokes\n * the grant on a replay — looks identical until it happens.\n */\nexport const GOOGLE_SHEETS_OAUTH = {\n \"flow\": \"authorization_code\",\n \"authorizeUrl\": \"https://accounts.google.com/o/oauth2/v2/auth\",\n \"tokenUrl\": \"https://oauth2.googleapis.com/token\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/spreadsheets\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"refreshTokenRotates\": false,\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Google Sheets node's connector metadata from the operation it performs. */\nexport function googleSheetsMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GOOGLE_SHEETS_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/row-append.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/row-append.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Google Sheets row — Append a row to a Google Sheet.\n *\n * https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append\n *\n * `unsafe-to-replay`.\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleSheetsMeta } from \"../service.js\";\n\nexport const GOOGLE_SHEETS_ROW_KIND = \"@particle-academy/google_sheets_row\";\nexport const GOOGLE_SHEETS_ROW_OPERATION = \"row_append\";\n\nexport const GOOGLE_SHEETS_ROW_META = googleSheetsMeta(\"action\", \"append a row\", \"https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GOOGLE_SHEETS_ROW_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.spreadsheetId\",\n \"type\": \"string\",\n \"description\": \"The spreadsheet that was written to.\"\n },\n {\n \"path\": \"data.updates.updatedRange\",\n \"type\": \"string\",\n \"description\": \"The range Google actually wrote, in A1 notation. NOT the range that was asked for -- append finds the first empty row below it.\"\n },\n {\n \"path\": \"data.updates.updatedRows\",\n \"type\": \"number\",\n \"description\": \"How many rows were added.\"\n },\n {\n \"path\": \"data.updates.updatedCells\",\n \"type\": \"number\",\n \"description\": \"How many cells were written.\"\n }\n];\n\nexport const googleSheetsRowKind: NodeKindDefinition = defineConnectorKind(GOOGLE_SHEETS_ROW_META, {\n name: GOOGLE_SHEETS_ROW_KIND,\n aliases: [\"google_sheets_row\"],\n label: \"Google Sheets row\",\n description: \"Append a row to a Google Sheet.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"unsafe-to-replay\",\n outputShape: GOOGLE_SHEETS_ROW_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"spreadsheetId\",\n \"label\": \"Spreadsheet ID\",\n \"required\": true,\n \"description\": \"The long id from the sheet's URL: docs.google.com/spreadsheets/d/THIS_PART/edit.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"range\",\n \"label\": \"Range\",\n \"required\": true,\n \"default\": \"Sheet1!A:Z\",\n \"description\": \"Where to append, in A1 notation. Google finds the last row of this range and writes below it.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"values\",\n \"label\": \"Row values\",\n \"required\": true,\n \"description\": \"The cells of the row, comma separated. Left to right from the start of the range.\"\n },\n {\n \"type\": \"select\",\n \"key\": \"valueInputOption\",\n \"label\": \"How to interpret the values\",\n \"default\": \"USER_ENTERED\",\n \"description\": \"USER_ENTERED parses the cells the way typing them would -- so =SUM(A1:A2) becomes a formula and 1/2/26 becomes a date. RAW stores exactly the characters given.\",\n \"options\": [\n {\n \"value\": \"USER_ENTERED\",\n \"label\": \"As if typed (formulas and dates parsed)\"\n },\n {\n \"value\": \"RAW\",\n \"label\": \"Exactly as given\"\n }\n ]\n },\n {\n \"type\": \"select\",\n \"key\": \"insertDataOption\",\n \"label\": \"When the range already has data below\",\n \"default\": \"INSERT_ROWS\",\n \"description\": \"INSERT_ROWS pushes existing rows down. OVERWRITE writes into them.\",\n \"options\": [\n {\n \"value\": \"INSERT_ROWS\",\n \"label\": \"Insert new rows\"\n },\n {\n \"value\": \"OVERWRITE\",\n \"label\": \"Overwrite what is there\"\n }\n ]\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_SHEETS_ROW_META, config as Record<string, unknown>, \"append a row\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/values-get.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/values-get.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Read Google Sheets values — Read the cell values of a range.\n *\n * https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/get\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleSheetsMeta } from \"../service.js\";\n\nexport const GOOGLE_SHEETS_VALUES_GET_KIND = \"@particle-academy/google_sheets_values_get\";\nexport const GOOGLE_SHEETS_VALUES_GET_OPERATION = \"values_get\";\n\nexport const GOOGLE_SHEETS_VALUES_GET_META = googleSheetsMeta(\"action\", \"read a range\", \"https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/get\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GOOGLE_SHEETS_VALUES_GET_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.range\",\n \"type\": \"string\",\n \"description\": \"The range actually covered -- may be smaller than what was asked for; Google excludes empty trailing rows and columns.\"\n },\n {\n \"path\": \"data.majorDimension\",\n \"type\": \"string\",\n \"description\": \"Echoes what was asked, or ROWS by default.\"\n },\n {\n \"path\": \"data.values\",\n \"type\": \"array\",\n \"description\": \"Rows of cells -- an array of arrays. One row is [[a, b, c]], the same shape row_append sends. Absent entirely when the range is empty.\"\n },\n {\n \"path\": \"mode\",\n \"type\": \"string\",\n \"description\": \"Which estate this ran against. Google has no sandbox, so: fake or live.\"\n }\n];\n\nexport const googleSheetsValuesGetKind: NodeKindDefinition = defineConnectorKind(GOOGLE_SHEETS_VALUES_GET_META, {\n name: GOOGLE_SHEETS_VALUES_GET_KIND,\n aliases: [\"google_sheets_values_get\"],\n label: \"Read Google Sheets values\",\n description: \"Read the cell values of a range.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"none\",\n outputShape: GOOGLE_SHEETS_VALUES_GET_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"spreadsheetId\",\n \"label\": \"Spreadsheet ID\",\n \"required\": true,\n \"description\": \"The long id from the sheet's URL: docs.google.com/spreadsheets/d/THIS_PART/edit.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"range\",\n \"label\": \"Range\",\n \"required\": true,\n \"default\": \"Sheet1!A:Z\",\n \"description\": \"In A1 notation, the same shape row_append accepts.\"\n },\n {\n \"type\": \"select\",\n \"key\": \"valueRenderOption\",\n \"label\": \"How to render values\",\n \"default\": \"FORMATTED_VALUE\",\n \"options\": [\n {\n \"value\": \"FORMATTED_VALUE\",\n \"label\": \"Formatted, as shown in the sheet (e.g. \\\"$1.50\\\", \\\"10/1/2026\\\")\"\n },\n {\n \"value\": \"UNFORMATTED_VALUE\",\n \"label\": \"The underlying number or string, no formatting applied\"\n },\n {\n \"value\": \"FORMULA\",\n \"label\": \"The formula text itself, for a cell that has one\"\n }\n ]\n },\n {\n \"type\": \"select\",\n \"key\": \"majorDimension\",\n \"label\": \"Rows or columns\",\n \"default\": \"ROWS\",\n \"description\": \"Whether the outer array of the result is rows or columns.\",\n \"options\": [\n {\n \"value\": \"ROWS\",\n \"label\": \"Rows\"\n },\n {\n \"value\": \"COLUMNS\",\n \"label\": \"Columns\"\n }\n ]\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_SHEETS_VALUES_GET_META, config as Record<string, unknown>, \"read a range\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/values-update.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/values-update.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Write Google Sheets values — Overwrite the cell values of a range. Existing\n * values in that range are replaced, not pushed down.\n *\n * https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/update\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleSheetsMeta } from \"../service.js\";\n\nexport const GOOGLE_SHEETS_VALUES_UPDATE_KIND = \"@particle-academy/google_sheets_values_update\";\nexport const GOOGLE_SHEETS_VALUES_UPDATE_OPERATION = \"values_update\";\n\nexport const GOOGLE_SHEETS_VALUES_UPDATE_META = googleSheetsMeta(\"action\", \"write a range\", \"https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/update\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.spreadsheetId\",\n \"type\": \"string\",\n \"description\": \"The spreadsheet that was written to.\"\n },\n {\n \"path\": \"data.updatedRange\",\n \"type\": \"string\",\n \"description\": \"The range Google actually wrote, in A1 notation.\"\n },\n {\n \"path\": \"data.updatedRows\",\n \"type\": \"number\",\n \"description\": \"How many rows had at least one cell updated.\"\n },\n {\n \"path\": \"data.updatedColumns\",\n \"type\": \"number\",\n \"description\": \"How many columns had at least one cell updated.\"\n },\n {\n \"path\": \"data.updatedCells\",\n \"type\": \"number\",\n \"description\": \"How many cells were written.\"\n },\n {\n \"path\": \"mode\",\n \"type\": \"string\",\n \"description\": \"Which estate this ran against. Google has no sandbox, so: fake or live.\"\n }\n];\n\nexport const googleSheetsValuesUpdateKind: NodeKindDefinition = defineConnectorKind(GOOGLE_SHEETS_VALUES_UPDATE_META, {\n name: GOOGLE_SHEETS_VALUES_UPDATE_KIND,\n aliases: [\"google_sheets_values_update\"],\n label: \"Write Google Sheets values\",\n description: \"Overwrite the cell values of a range. Existing values in that range are replaced, not pushed down.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"idempotent\",\n outputShape: GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"spreadsheetId\",\n \"label\": \"Spreadsheet ID\",\n \"required\": true\n },\n {\n \"type\": \"text\",\n \"key\": \"range\",\n \"label\": \"Range\",\n \"required\": true,\n \"default\": \"Sheet1!A1\",\n \"description\": \"In A1 notation. The values written fill this range from its top-left cell -- more rows or columns than the range covers are written anyway, following Google's own documented behavior; fewer leave the rest of the range untouched.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"values\",\n \"label\": \"Row values\",\n \"required\": true,\n \"description\": \"The cells to write, comma separated, left to right, one row. For more than one row, call this action once per row.\"\n },\n {\n \"type\": \"select\",\n \"key\": \"valueInputOption\",\n \"label\": \"How to interpret the values\",\n \"required\": true,\n \"default\": \"USER_ENTERED\",\n \"description\": \"USER_ENTERED parses the cells the way typing them would -- so =SUM(A1:A2) becomes a formula. RAW stores exactly the characters given.\",\n \"options\": [\n {\n \"value\": \"USER_ENTERED\",\n \"label\": \"As if typed (formulas and dates parsed)\"\n },\n {\n \"value\": \"RAW\",\n \"label\": \"Exactly as given\"\n }\n ]\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_SHEETS_VALUES_UPDATE_META, config as Record<string, unknown>, \"write a range\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Google Sheets's node kinds for fancy-flow.\n *\n * Install this on every host. The TypeScript executors live in the js\n * package's `./flow` subpath; PHP and Python hosts run their own and need only\n * this.\n */\n\nexport * from \"./service.js\";\nexport * from \"./kinds/row-append.js\";\nexport * from \"./kinds/values-get.js\";\nexport * from \"./kinds/values-update.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { googleSheetsRowKind } from \"./kinds/row-append.js\";\nimport { googleSheetsValuesGetKind } from \"./kinds/values-get.js\";\nimport { googleSheetsValuesUpdateKind } from \"./kinds/values-update.js\";\n\n/** Every Google Sheets kind, for a host that registers the lot. */\nexport const GOOGLE_SHEETS_KINDS: NodeKindDefinition[] = [\n googleSheetsRowKind,\n googleSheetsValuesGetKind,\n googleSheetsValuesUpdateKind,\n];\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -113,6 +113,34 @@ declare const GOOGLE_SHEETS_ROW_META: _particle_academy_fancy_flow_connectors.Co
|
|
|
113
113
|
declare const GOOGLE_SHEETS_ROW_OUTPUT: OutputField[];
|
|
114
114
|
declare const googleSheetsRowKind: NodeKindDefinition;
|
|
115
115
|
|
|
116
|
+
declare const GOOGLE_SHEETS_VALUES_GET_KIND = "@particle-academy/google_sheets_values_get";
|
|
117
|
+
declare const GOOGLE_SHEETS_VALUES_GET_OPERATION = "values_get";
|
|
118
|
+
declare const GOOGLE_SHEETS_VALUES_GET_META: _particle_academy_fancy_flow_connectors.ConnectorMeta;
|
|
119
|
+
/**
|
|
120
|
+
* What this node emits — the "ingredients" a downstream node can reference.
|
|
121
|
+
*
|
|
122
|
+
* fancy-flow reads `outputShape` off the kind and offers it in the variable
|
|
123
|
+
* picker, so declaring it is the whole of the work: an author configuring the
|
|
124
|
+
* next node picks `{{ $json.data.id }}` off a list instead of typing a path
|
|
125
|
+
* and hoping.
|
|
126
|
+
*/
|
|
127
|
+
declare const GOOGLE_SHEETS_VALUES_GET_OUTPUT: OutputField[];
|
|
128
|
+
declare const googleSheetsValuesGetKind: NodeKindDefinition;
|
|
129
|
+
|
|
130
|
+
declare const GOOGLE_SHEETS_VALUES_UPDATE_KIND = "@particle-academy/google_sheets_values_update";
|
|
131
|
+
declare const GOOGLE_SHEETS_VALUES_UPDATE_OPERATION = "values_update";
|
|
132
|
+
declare const GOOGLE_SHEETS_VALUES_UPDATE_META: _particle_academy_fancy_flow_connectors.ConnectorMeta;
|
|
133
|
+
/**
|
|
134
|
+
* What this node emits — the "ingredients" a downstream node can reference.
|
|
135
|
+
*
|
|
136
|
+
* fancy-flow reads `outputShape` off the kind and offers it in the variable
|
|
137
|
+
* picker, so declaring it is the whole of the work: an author configuring the
|
|
138
|
+
* next node picks `{{ $json.data.id }}` off a list instead of typing a path
|
|
139
|
+
* and hoping.
|
|
140
|
+
*/
|
|
141
|
+
declare const GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT: OutputField[];
|
|
142
|
+
declare const googleSheetsValuesUpdateKind: NodeKindDefinition;
|
|
143
|
+
|
|
116
144
|
/**
|
|
117
145
|
* GENERATED FILE — do not edit.
|
|
118
146
|
*
|
|
@@ -134,4 +162,4 @@ declare const googleSheetsRowKind: NodeKindDefinition;
|
|
|
134
162
|
/** Every Google Sheets kind, for a host that registers the lot. */
|
|
135
163
|
declare const GOOGLE_SHEETS_KINDS: NodeKindDefinition[];
|
|
136
164
|
|
|
137
|
-
export { CONNECTOR_API_VERSION, GOOGLE_SHEETS_CREDENTIALS, GOOGLE_SHEETS_KINDS, GOOGLE_SHEETS_OAUTH, GOOGLE_SHEETS_ROW_KIND, GOOGLE_SHEETS_ROW_META, GOOGLE_SHEETS_ROW_OPERATION, GOOGLE_SHEETS_ROW_OUTPUT, GOOGLE_SHEETS_SERVICE, googleSheetsMeta, googleSheetsRowKind };
|
|
165
|
+
export { CONNECTOR_API_VERSION, GOOGLE_SHEETS_CREDENTIALS, GOOGLE_SHEETS_KINDS, GOOGLE_SHEETS_OAUTH, GOOGLE_SHEETS_ROW_KIND, GOOGLE_SHEETS_ROW_META, GOOGLE_SHEETS_ROW_OPERATION, GOOGLE_SHEETS_ROW_OUTPUT, GOOGLE_SHEETS_SERVICE, GOOGLE_SHEETS_VALUES_GET_KIND, GOOGLE_SHEETS_VALUES_GET_META, GOOGLE_SHEETS_VALUES_GET_OPERATION, GOOGLE_SHEETS_VALUES_GET_OUTPUT, GOOGLE_SHEETS_VALUES_UPDATE_KIND, GOOGLE_SHEETS_VALUES_UPDATE_META, GOOGLE_SHEETS_VALUES_UPDATE_OPERATION, GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT, googleSheetsMeta, googleSheetsRowKind, googleSheetsValuesGetKind, googleSheetsValuesUpdateKind };
|
package/dist/index.d.ts
CHANGED
|
@@ -113,6 +113,34 @@ declare const GOOGLE_SHEETS_ROW_META: _particle_academy_fancy_flow_connectors.Co
|
|
|
113
113
|
declare const GOOGLE_SHEETS_ROW_OUTPUT: OutputField[];
|
|
114
114
|
declare const googleSheetsRowKind: NodeKindDefinition;
|
|
115
115
|
|
|
116
|
+
declare const GOOGLE_SHEETS_VALUES_GET_KIND = "@particle-academy/google_sheets_values_get";
|
|
117
|
+
declare const GOOGLE_SHEETS_VALUES_GET_OPERATION = "values_get";
|
|
118
|
+
declare const GOOGLE_SHEETS_VALUES_GET_META: _particle_academy_fancy_flow_connectors.ConnectorMeta;
|
|
119
|
+
/**
|
|
120
|
+
* What this node emits — the "ingredients" a downstream node can reference.
|
|
121
|
+
*
|
|
122
|
+
* fancy-flow reads `outputShape` off the kind and offers it in the variable
|
|
123
|
+
* picker, so declaring it is the whole of the work: an author configuring the
|
|
124
|
+
* next node picks `{{ $json.data.id }}` off a list instead of typing a path
|
|
125
|
+
* and hoping.
|
|
126
|
+
*/
|
|
127
|
+
declare const GOOGLE_SHEETS_VALUES_GET_OUTPUT: OutputField[];
|
|
128
|
+
declare const googleSheetsValuesGetKind: NodeKindDefinition;
|
|
129
|
+
|
|
130
|
+
declare const GOOGLE_SHEETS_VALUES_UPDATE_KIND = "@particle-academy/google_sheets_values_update";
|
|
131
|
+
declare const GOOGLE_SHEETS_VALUES_UPDATE_OPERATION = "values_update";
|
|
132
|
+
declare const GOOGLE_SHEETS_VALUES_UPDATE_META: _particle_academy_fancy_flow_connectors.ConnectorMeta;
|
|
133
|
+
/**
|
|
134
|
+
* What this node emits — the "ingredients" a downstream node can reference.
|
|
135
|
+
*
|
|
136
|
+
* fancy-flow reads `outputShape` off the kind and offers it in the variable
|
|
137
|
+
* picker, so declaring it is the whole of the work: an author configuring the
|
|
138
|
+
* next node picks `{{ $json.data.id }}` off a list instead of typing a path
|
|
139
|
+
* and hoping.
|
|
140
|
+
*/
|
|
141
|
+
declare const GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT: OutputField[];
|
|
142
|
+
declare const googleSheetsValuesUpdateKind: NodeKindDefinition;
|
|
143
|
+
|
|
116
144
|
/**
|
|
117
145
|
* GENERATED FILE — do not edit.
|
|
118
146
|
*
|
|
@@ -134,4 +162,4 @@ declare const googleSheetsRowKind: NodeKindDefinition;
|
|
|
134
162
|
/** Every Google Sheets kind, for a host that registers the lot. */
|
|
135
163
|
declare const GOOGLE_SHEETS_KINDS: NodeKindDefinition[];
|
|
136
164
|
|
|
137
|
-
export { CONNECTOR_API_VERSION, GOOGLE_SHEETS_CREDENTIALS, GOOGLE_SHEETS_KINDS, GOOGLE_SHEETS_OAUTH, GOOGLE_SHEETS_ROW_KIND, GOOGLE_SHEETS_ROW_META, GOOGLE_SHEETS_ROW_OPERATION, GOOGLE_SHEETS_ROW_OUTPUT, GOOGLE_SHEETS_SERVICE, googleSheetsMeta, googleSheetsRowKind };
|
|
165
|
+
export { CONNECTOR_API_VERSION, GOOGLE_SHEETS_CREDENTIALS, GOOGLE_SHEETS_KINDS, GOOGLE_SHEETS_OAUTH, GOOGLE_SHEETS_ROW_KIND, GOOGLE_SHEETS_ROW_META, GOOGLE_SHEETS_ROW_OPERATION, GOOGLE_SHEETS_ROW_OUTPUT, GOOGLE_SHEETS_SERVICE, GOOGLE_SHEETS_VALUES_GET_KIND, GOOGLE_SHEETS_VALUES_GET_META, GOOGLE_SHEETS_VALUES_GET_OPERATION, GOOGLE_SHEETS_VALUES_GET_OUTPUT, GOOGLE_SHEETS_VALUES_UPDATE_KIND, GOOGLE_SHEETS_VALUES_UPDATE_META, GOOGLE_SHEETS_VALUES_UPDATE_OPERATION, GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT, googleSheetsMeta, googleSheetsRowKind, googleSheetsValuesGetKind, googleSheetsValuesUpdateKind };
|
package/dist/index.js
CHANGED
|
@@ -150,12 +150,197 @@ var googleSheetsRowKind = defineConnectorKind(GOOGLE_SHEETS_ROW_META, {
|
|
|
150
150
|
},
|
|
151
151
|
renderBody: ({ config }) => summarize(GOOGLE_SHEETS_ROW_META, config, "append a row")
|
|
152
152
|
});
|
|
153
|
+
var GOOGLE_SHEETS_VALUES_GET_KIND = "@particle-academy/google_sheets_values_get";
|
|
154
|
+
var GOOGLE_SHEETS_VALUES_GET_OPERATION = "values_get";
|
|
155
|
+
var GOOGLE_SHEETS_VALUES_GET_META = googleSheetsMeta("action", "read a range", "https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/get");
|
|
156
|
+
var GOOGLE_SHEETS_VALUES_GET_OUTPUT = [
|
|
157
|
+
{
|
|
158
|
+
"path": "data.range",
|
|
159
|
+
"type": "string",
|
|
160
|
+
"description": "The range actually covered -- may be smaller than what was asked for; Google excludes empty trailing rows and columns."
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"path": "data.majorDimension",
|
|
164
|
+
"type": "string",
|
|
165
|
+
"description": "Echoes what was asked, or ROWS by default."
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"path": "data.values",
|
|
169
|
+
"type": "array",
|
|
170
|
+
"description": "Rows of cells -- an array of arrays. One row is [[a, b, c]], the same shape row_append sends. Absent entirely when the range is empty."
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"path": "mode",
|
|
174
|
+
"type": "string",
|
|
175
|
+
"description": "Which estate this ran against. Google has no sandbox, so: fake or live."
|
|
176
|
+
}
|
|
177
|
+
];
|
|
178
|
+
var googleSheetsValuesGetKind = defineConnectorKind(GOOGLE_SHEETS_VALUES_GET_META, {
|
|
179
|
+
name: GOOGLE_SHEETS_VALUES_GET_KIND,
|
|
180
|
+
aliases: ["google_sheets_values_get"],
|
|
181
|
+
label: "Read Google Sheets values",
|
|
182
|
+
description: "Read the cell values of a range.",
|
|
183
|
+
inputs: [{ id: "in" }],
|
|
184
|
+
outputs: [{ id: "out" }],
|
|
185
|
+
sideEffects: "none",
|
|
186
|
+
outputShape: GOOGLE_SHEETS_VALUES_GET_OUTPUT,
|
|
187
|
+
configSchema: [
|
|
188
|
+
{
|
|
189
|
+
"type": "text",
|
|
190
|
+
"key": "spreadsheetId",
|
|
191
|
+
"label": "Spreadsheet ID",
|
|
192
|
+
"required": true,
|
|
193
|
+
"description": "The long id from the sheet's URL: docs.google.com/spreadsheets/d/THIS_PART/edit."
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"type": "text",
|
|
197
|
+
"key": "range",
|
|
198
|
+
"label": "Range",
|
|
199
|
+
"required": true,
|
|
200
|
+
"default": "Sheet1!A:Z",
|
|
201
|
+
"description": "In A1 notation, the same shape row_append accepts."
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"type": "select",
|
|
205
|
+
"key": "valueRenderOption",
|
|
206
|
+
"label": "How to render values",
|
|
207
|
+
"default": "FORMATTED_VALUE",
|
|
208
|
+
"options": [
|
|
209
|
+
{
|
|
210
|
+
"value": "FORMATTED_VALUE",
|
|
211
|
+
"label": 'Formatted, as shown in the sheet (e.g. "$1.50", "10/1/2026")'
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"value": "UNFORMATTED_VALUE",
|
|
215
|
+
"label": "The underlying number or string, no formatting applied"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"value": "FORMULA",
|
|
219
|
+
"label": "The formula text itself, for a cell that has one"
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"type": "select",
|
|
225
|
+
"key": "majorDimension",
|
|
226
|
+
"label": "Rows or columns",
|
|
227
|
+
"default": "ROWS",
|
|
228
|
+
"description": "Whether the outer array of the result is rows or columns.",
|
|
229
|
+
"options": [
|
|
230
|
+
{
|
|
231
|
+
"value": "ROWS",
|
|
232
|
+
"label": "Rows"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"value": "COLUMNS",
|
|
236
|
+
"label": "Columns"
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
defaultConfig: {
|
|
242
|
+
"mode": "auto"
|
|
243
|
+
},
|
|
244
|
+
renderBody: ({ config }) => summarize(GOOGLE_SHEETS_VALUES_GET_META, config, "read a range")
|
|
245
|
+
});
|
|
246
|
+
var GOOGLE_SHEETS_VALUES_UPDATE_KIND = "@particle-academy/google_sheets_values_update";
|
|
247
|
+
var GOOGLE_SHEETS_VALUES_UPDATE_OPERATION = "values_update";
|
|
248
|
+
var GOOGLE_SHEETS_VALUES_UPDATE_META = googleSheetsMeta("action", "write a range", "https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/update");
|
|
249
|
+
var GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT = [
|
|
250
|
+
{
|
|
251
|
+
"path": "data.spreadsheetId",
|
|
252
|
+
"type": "string",
|
|
253
|
+
"description": "The spreadsheet that was written to."
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"path": "data.updatedRange",
|
|
257
|
+
"type": "string",
|
|
258
|
+
"description": "The range Google actually wrote, in A1 notation."
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"path": "data.updatedRows",
|
|
262
|
+
"type": "number",
|
|
263
|
+
"description": "How many rows had at least one cell updated."
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"path": "data.updatedColumns",
|
|
267
|
+
"type": "number",
|
|
268
|
+
"description": "How many columns had at least one cell updated."
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"path": "data.updatedCells",
|
|
272
|
+
"type": "number",
|
|
273
|
+
"description": "How many cells were written."
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"path": "mode",
|
|
277
|
+
"type": "string",
|
|
278
|
+
"description": "Which estate this ran against. Google has no sandbox, so: fake or live."
|
|
279
|
+
}
|
|
280
|
+
];
|
|
281
|
+
var googleSheetsValuesUpdateKind = defineConnectorKind(GOOGLE_SHEETS_VALUES_UPDATE_META, {
|
|
282
|
+
name: GOOGLE_SHEETS_VALUES_UPDATE_KIND,
|
|
283
|
+
aliases: ["google_sheets_values_update"],
|
|
284
|
+
label: "Write Google Sheets values",
|
|
285
|
+
description: "Overwrite the cell values of a range. Existing values in that range are replaced, not pushed down.",
|
|
286
|
+
inputs: [{ id: "in" }],
|
|
287
|
+
outputs: [{ id: "out" }],
|
|
288
|
+
sideEffects: "idempotent",
|
|
289
|
+
outputShape: GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT,
|
|
290
|
+
configSchema: [
|
|
291
|
+
{
|
|
292
|
+
"type": "text",
|
|
293
|
+
"key": "spreadsheetId",
|
|
294
|
+
"label": "Spreadsheet ID",
|
|
295
|
+
"required": true
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"type": "text",
|
|
299
|
+
"key": "range",
|
|
300
|
+
"label": "Range",
|
|
301
|
+
"required": true,
|
|
302
|
+
"default": "Sheet1!A1",
|
|
303
|
+
"description": "In A1 notation. The values written fill this range from its top-left cell -- more rows or columns than the range covers are written anyway, following Google's own documented behavior; fewer leave the rest of the range untouched."
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"type": "text",
|
|
307
|
+
"key": "values",
|
|
308
|
+
"label": "Row values",
|
|
309
|
+
"required": true,
|
|
310
|
+
"description": "The cells to write, comma separated, left to right, one row. For more than one row, call this action once per row."
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"type": "select",
|
|
314
|
+
"key": "valueInputOption",
|
|
315
|
+
"label": "How to interpret the values",
|
|
316
|
+
"required": true,
|
|
317
|
+
"default": "USER_ENTERED",
|
|
318
|
+
"description": "USER_ENTERED parses the cells the way typing them would -- so =SUM(A1:A2) becomes a formula. RAW stores exactly the characters given.",
|
|
319
|
+
"options": [
|
|
320
|
+
{
|
|
321
|
+
"value": "USER_ENTERED",
|
|
322
|
+
"label": "As if typed (formulas and dates parsed)"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"value": "RAW",
|
|
326
|
+
"label": "Exactly as given"
|
|
327
|
+
}
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
defaultConfig: {
|
|
332
|
+
"mode": "auto"
|
|
333
|
+
},
|
|
334
|
+
renderBody: ({ config }) => summarize(GOOGLE_SHEETS_VALUES_UPDATE_META, config, "write a range")
|
|
335
|
+
});
|
|
153
336
|
|
|
154
337
|
// src/index.ts
|
|
155
338
|
var GOOGLE_SHEETS_KINDS = [
|
|
156
|
-
googleSheetsRowKind
|
|
339
|
+
googleSheetsRowKind,
|
|
340
|
+
googleSheetsValuesGetKind,
|
|
341
|
+
googleSheetsValuesUpdateKind
|
|
157
342
|
];
|
|
158
343
|
|
|
159
|
-
export { CONNECTOR_API_VERSION, GOOGLE_SHEETS_CREDENTIALS, GOOGLE_SHEETS_KINDS, GOOGLE_SHEETS_OAUTH, GOOGLE_SHEETS_ROW_KIND, GOOGLE_SHEETS_ROW_META, GOOGLE_SHEETS_ROW_OPERATION, GOOGLE_SHEETS_ROW_OUTPUT, GOOGLE_SHEETS_SERVICE, googleSheetsMeta, googleSheetsRowKind };
|
|
344
|
+
export { CONNECTOR_API_VERSION, GOOGLE_SHEETS_CREDENTIALS, GOOGLE_SHEETS_KINDS, GOOGLE_SHEETS_OAUTH, GOOGLE_SHEETS_ROW_KIND, GOOGLE_SHEETS_ROW_META, GOOGLE_SHEETS_ROW_OPERATION, GOOGLE_SHEETS_ROW_OUTPUT, GOOGLE_SHEETS_SERVICE, GOOGLE_SHEETS_VALUES_GET_KIND, GOOGLE_SHEETS_VALUES_GET_META, GOOGLE_SHEETS_VALUES_GET_OPERATION, GOOGLE_SHEETS_VALUES_GET_OUTPUT, GOOGLE_SHEETS_VALUES_UPDATE_KIND, GOOGLE_SHEETS_VALUES_UPDATE_META, GOOGLE_SHEETS_VALUES_UPDATE_OPERATION, GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT, googleSheetsMeta, googleSheetsRowKind, googleSheetsValuesGetKind, googleSheetsValuesUpdateKind };
|
|
160
345
|
//# sourceMappingURL=index.js.map
|
|
161
346
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/service.ts","../src/kinds/row-append.ts","../src/index.ts"],"names":[],"mappings":";;;AAmCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,qBAAA,GAAwB;AAAA,EACnC,OAAA,EAAS,eAAA;AAAA,EACT,YAAA,EAAc,eAAA;AAAA,EACd,MAAA,EAAQ,cAAA;AAAA,EACR,OAAA,EAAS;AACX;AA+BO,IAAM,yBAAA,GAA4B;AAAA,EACvC;AAAA,IACE,KAAA,EAAO,UAAA;AAAA,IACP,OAAA,EAAS,iBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,KAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,cAAA;AAAA,IACP,OAAA,EAAS,qBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,aAAA;AAAA,IACP,OAAA,EAAS,cAAA;AAAA,IACT,OAAA,EAAS,SAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,cAAA;AAAA,IACP,OAAA,EAAS,eAAA;AAAA,IACT,OAAA,EAAS,SAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA;AAEZ;AAoBO,IAAM,mBAAA,GAAsB;AAAA,EACjC,MAAA,EAAQ,oBAAA;AAAA,EACR,cAAA,EAAgB,8CAAA;AAAA,EAChB,UAAA,EAAY,qCAAA;AAAA,EACZ,QAAA,EAAU;AAAA,IACR;AAAA,GACF;AAAA,EACA,uBAAA,EAAyB,aAAA;AAAA,EACzB,wBAAA,EAA0B,cAAA;AAAA,EAC1B,qBAAA,EAAuB,KA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SAAA,CAAU,sBAAA,EAAwB,QAAmC,cAAc;AACvF,CAAC;;;ACzGM,IAAM,mBAAA,GAA4C;AAAA,EACvD;AACF","file":"index.js","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Google Sheets's identity on the authoring surface, shared by every Google\n * Sheets node.\n *\n * This file must import nothing from the js package: a PHP or Python project\n * installs the ui package and never that one, and the import would be a\n * dangling module the moment it did.\n *\n * ## The sandbox trap\n *\n * Google has no sandbox for Sheets. A test spreadsheet is a real one in a real\n * Drive, so every append is real -- point this at a scratch sheet, not a\n * production one. The faker is the only way to develop against it without\n * touching a document.\n */\n\nimport type { ConnectorDomain, ConnectorMeta } from \"@particle-academy/fancy-flow/connectors\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported — an imported constant lets an upgrade rewrite the\n * very claim it exists to detect.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\n/** The parts of a connector's identity that belong to the SERVICE, not the node. */\nexport const GOOGLE_SHEETS_SERVICE = {\n service: \"google_sheets\",\n serviceTitle: \"Google Sheets\",\n domain: \"productivity\",\n sandbox: \"none\",\n} as const satisfies Pick<ConnectorMeta, \"service\" | \"serviceTitle\" | \"domain\" | \"sandbox\">;\n\n/**\n * Every connector domain weaver knows, pinned against fancy-flow's union.\n *\n * A closed set copied into three codebases stays correct only while something\n * MAKES it: this line fails to compile the moment weaver carries a value\n * fancy-flow does not, including the values no provider uses yet.\n */\nconst WEAVER_DOMAINS: readonly ConnectorDomain[] = [\n \"payments\",\n \"commerce\",\n \"messaging\",\n \"email\",\n \"crm\",\n \"support\",\n \"storage\",\n \"calendar\",\n \"productivity\",\n \"database\",\n \"devtools\",\n \"analytics\",\n \"marketing\",\n \"ai\",\n \"forms\",\n \"hr\",\n \"geo\"\n];\nvoid WEAVER_DOMAINS;\n\n/** The credentials a Google Sheets connection holds. */\nexport const GOOGLE_SHEETS_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The client secret for the same OAuth app. One value for the whole installation.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Google Sheets requires — DECLARED here, performed by the\n * host.\n *\n * A consent screen needs a browser, a redirect URI and somewhere to persist\n * the result, and all three belong to the host; a package that ran the dance\n * itself would have to own a web server. So this says precisely enough for a\n * host to do it.\n *\n * The access token lasts 3600 seconds. A host that never refreshes will work\n * all afternoon and be broken by morning, which is why the lifetime is stated\n * rather than left to be discovered.\n *\n * Its refresh tokens do NOT rotate: the same one is reusable, so a refresh may\n * safely be retried and may run concurrently. That is stated rather than\n * assumed because the opposite — a provider that spends the token and revokes\n * the grant on a replay — looks identical until it happens.\n */\nexport const GOOGLE_SHEETS_OAUTH = {\n \"flow\": \"authorization_code\",\n \"authorizeUrl\": \"https://accounts.google.com/o/oauth2/v2/auth\",\n \"tokenUrl\": \"https://oauth2.googleapis.com/token\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/spreadsheets\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"refreshTokenRotates\": false,\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Google Sheets node's connector metadata from the operation it performs. */\nexport function googleSheetsMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GOOGLE_SHEETS_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/row-append.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/row-append.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Google Sheets row — Append a row to a Google Sheet.\n *\n * https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append\n *\n * `unsafe-to-replay`.\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleSheetsMeta } from \"../service.js\";\n\nexport const GOOGLE_SHEETS_ROW_KIND = \"@particle-academy/google_sheets_row\";\nexport const GOOGLE_SHEETS_ROW_OPERATION = \"row_append\";\n\nexport const GOOGLE_SHEETS_ROW_META = googleSheetsMeta(\"action\", \"append a row\", \"https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GOOGLE_SHEETS_ROW_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.spreadsheetId\",\n \"type\": \"string\",\n \"description\": \"The spreadsheet that was written to.\"\n },\n {\n \"path\": \"data.updates.updatedRange\",\n \"type\": \"string\",\n \"description\": \"The range Google actually wrote, in A1 notation. NOT the range that was asked for -- append finds the first empty row below it.\"\n },\n {\n \"path\": \"data.updates.updatedRows\",\n \"type\": \"number\",\n \"description\": \"How many rows were added.\"\n },\n {\n \"path\": \"data.updates.updatedCells\",\n \"type\": \"number\",\n \"description\": \"How many cells were written.\"\n }\n];\n\nexport const googleSheetsRowKind: NodeKindDefinition = defineConnectorKind(GOOGLE_SHEETS_ROW_META, {\n name: GOOGLE_SHEETS_ROW_KIND,\n aliases: [\"google_sheets_row\"],\n label: \"Google Sheets row\",\n description: \"Append a row to a Google Sheet.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"unsafe-to-replay\",\n outputShape: GOOGLE_SHEETS_ROW_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"spreadsheetId\",\n \"label\": \"Spreadsheet ID\",\n \"required\": true,\n \"description\": \"The long id from the sheet's URL: docs.google.com/spreadsheets/d/THIS_PART/edit.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"range\",\n \"label\": \"Range\",\n \"required\": true,\n \"default\": \"Sheet1!A:Z\",\n \"description\": \"Where to append, in A1 notation. Google finds the last row of this range and writes below it.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"values\",\n \"label\": \"Row values\",\n \"required\": true,\n \"description\": \"The cells of the row, comma separated. Left to right from the start of the range.\"\n },\n {\n \"type\": \"select\",\n \"key\": \"valueInputOption\",\n \"label\": \"How to interpret the values\",\n \"default\": \"USER_ENTERED\",\n \"description\": \"USER_ENTERED parses the cells the way typing them would -- so =SUM(A1:A2) becomes a formula and 1/2/26 becomes a date. RAW stores exactly the characters given.\",\n \"options\": [\n {\n \"value\": \"USER_ENTERED\",\n \"label\": \"As if typed (formulas and dates parsed)\"\n },\n {\n \"value\": \"RAW\",\n \"label\": \"Exactly as given\"\n }\n ]\n },\n {\n \"type\": \"select\",\n \"key\": \"insertDataOption\",\n \"label\": \"When the range already has data below\",\n \"default\": \"INSERT_ROWS\",\n \"description\": \"INSERT_ROWS pushes existing rows down. OVERWRITE writes into them.\",\n \"options\": [\n {\n \"value\": \"INSERT_ROWS\",\n \"label\": \"Insert new rows\"\n },\n {\n \"value\": \"OVERWRITE\",\n \"label\": \"Overwrite what is there\"\n }\n ]\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_SHEETS_ROW_META, config as Record<string, unknown>, \"append a row\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Google Sheets's node kinds for fancy-flow.\n *\n * Install this on every host. The TypeScript executors live in the js\n * package's `./flow` subpath; PHP and Python hosts run their own and need only\n * this.\n */\n\nexport * from \"./service.js\";\nexport * from \"./kinds/row-append.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { googleSheetsRowKind } from \"./kinds/row-append.js\";\n\n/** Every Google Sheets kind, for a host that registers the lot. */\nexport const GOOGLE_SHEETS_KINDS: NodeKindDefinition[] = [\n googleSheetsRowKind,\n];\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/service.ts","../src/kinds/row-append.ts","../src/kinds/values-get.ts","../src/kinds/values-update.ts","../src/index.ts"],"names":["defineConnectorKind","summarize"],"mappings":";;;AAmCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,qBAAA,GAAwB;AAAA,EACnC,OAAA,EAAS,eAAA;AAAA,EACT,YAAA,EAAc,eAAA;AAAA,EACd,MAAA,EAAQ,cAAA;AAAA,EACR,OAAA,EAAS;AACX;AA+BO,IAAM,yBAAA,GAA4B;AAAA,EACvC;AAAA,IACE,KAAA,EAAO,UAAA;AAAA,IACP,OAAA,EAAS,iBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,KAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAA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,OAAA,EAAS,cAAA;AAAA,UACT,OAAA,EAAS;AAAA,SACX;AAAA,QACA;AAAA,UACE,OAAA,EAAS,KAAA;AAAA,UACT,OAAA,EAAS;AAAA;AACX;AACF;AACF,GACF;AAAA,EACA,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,UAAA,EAAY,CAAC,EAAE,MAAA,OACbC,SAAAA,CAAU,gCAAA,EAAkC,QAAmC,eAAe;AAClG,CAAC;;;AC7FM,IAAM,mBAAA,GAA4C;AAAA,EACvD,mBAAA;AAAA,EACA,yBAAA;AAAA,EACA;AACF","file":"index.js","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Google Sheets's identity on the authoring surface, shared by every Google\n * Sheets node.\n *\n * This file must import nothing from the js package: a PHP or Python project\n * installs the ui package and never that one, and the import would be a\n * dangling module the moment it did.\n *\n * ## The sandbox trap\n *\n * Google has no sandbox for Sheets. A test spreadsheet is a real one in a real\n * Drive, so every append is real -- point this at a scratch sheet, not a\n * production one. The faker is the only way to develop against it without\n * touching a document.\n */\n\nimport type { ConnectorDomain, ConnectorMeta } from \"@particle-academy/fancy-flow/connectors\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported — an imported constant lets an upgrade rewrite the\n * very claim it exists to detect.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\n/** The parts of a connector's identity that belong to the SERVICE, not the node. */\nexport const GOOGLE_SHEETS_SERVICE = {\n service: \"google_sheets\",\n serviceTitle: \"Google Sheets\",\n domain: \"productivity\",\n sandbox: \"none\",\n} as const satisfies Pick<ConnectorMeta, \"service\" | \"serviceTitle\" | \"domain\" | \"sandbox\">;\n\n/**\n * Every connector domain weaver knows, pinned against fancy-flow's union.\n *\n * A closed set copied into three codebases stays correct only while something\n * MAKES it: this line fails to compile the moment weaver carries a value\n * fancy-flow does not, including the values no provider uses yet.\n */\nconst WEAVER_DOMAINS: readonly ConnectorDomain[] = [\n \"payments\",\n \"commerce\",\n \"messaging\",\n \"email\",\n \"crm\",\n \"support\",\n \"storage\",\n \"calendar\",\n \"productivity\",\n \"database\",\n \"devtools\",\n \"analytics\",\n \"marketing\",\n \"ai\",\n \"forms\",\n \"hr\",\n \"geo\"\n];\nvoid WEAVER_DOMAINS;\n\n/** The credentials a Google Sheets connection holds. */\nexport const GOOGLE_SHEETS_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The client secret for the same OAuth app. One value for the whole installation.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Google Sheets requires — DECLARED here, performed by the\n * host.\n *\n * A consent screen needs a browser, a redirect URI and somewhere to persist\n * the result, and all three belong to the host; a package that ran the dance\n * itself would have to own a web server. So this says precisely enough for a\n * host to do it.\n *\n * The access token lasts 3600 seconds. A host that never refreshes will work\n * all afternoon and be broken by morning, which is why the lifetime is stated\n * rather than left to be discovered.\n *\n * Its refresh tokens do NOT rotate: the same one is reusable, so a refresh may\n * safely be retried and may run concurrently. That is stated rather than\n * assumed because the opposite — a provider that spends the token and revokes\n * the grant on a replay — looks identical until it happens.\n */\nexport const GOOGLE_SHEETS_OAUTH = {\n \"flow\": \"authorization_code\",\n \"authorizeUrl\": \"https://accounts.google.com/o/oauth2/v2/auth\",\n \"tokenUrl\": \"https://oauth2.googleapis.com/token\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/spreadsheets\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"refreshTokenRotates\": false,\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Google Sheets node's connector metadata from the operation it performs. */\nexport function googleSheetsMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GOOGLE_SHEETS_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/row-append.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/row-append.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Google Sheets row — Append a row to a Google Sheet.\n *\n * https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append\n *\n * `unsafe-to-replay`.\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleSheetsMeta } from \"../service.js\";\n\nexport const GOOGLE_SHEETS_ROW_KIND = \"@particle-academy/google_sheets_row\";\nexport const GOOGLE_SHEETS_ROW_OPERATION = \"row_append\";\n\nexport const GOOGLE_SHEETS_ROW_META = googleSheetsMeta(\"action\", \"append a row\", \"https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GOOGLE_SHEETS_ROW_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.spreadsheetId\",\n \"type\": \"string\",\n \"description\": \"The spreadsheet that was written to.\"\n },\n {\n \"path\": \"data.updates.updatedRange\",\n \"type\": \"string\",\n \"description\": \"The range Google actually wrote, in A1 notation. NOT the range that was asked for -- append finds the first empty row below it.\"\n },\n {\n \"path\": \"data.updates.updatedRows\",\n \"type\": \"number\",\n \"description\": \"How many rows were added.\"\n },\n {\n \"path\": \"data.updates.updatedCells\",\n \"type\": \"number\",\n \"description\": \"How many cells were written.\"\n }\n];\n\nexport const googleSheetsRowKind: NodeKindDefinition = defineConnectorKind(GOOGLE_SHEETS_ROW_META, {\n name: GOOGLE_SHEETS_ROW_KIND,\n aliases: [\"google_sheets_row\"],\n label: \"Google Sheets row\",\n description: \"Append a row to a Google Sheet.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"unsafe-to-replay\",\n outputShape: GOOGLE_SHEETS_ROW_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"spreadsheetId\",\n \"label\": \"Spreadsheet ID\",\n \"required\": true,\n \"description\": \"The long id from the sheet's URL: docs.google.com/spreadsheets/d/THIS_PART/edit.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"range\",\n \"label\": \"Range\",\n \"required\": true,\n \"default\": \"Sheet1!A:Z\",\n \"description\": \"Where to append, in A1 notation. Google finds the last row of this range and writes below it.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"values\",\n \"label\": \"Row values\",\n \"required\": true,\n \"description\": \"The cells of the row, comma separated. Left to right from the start of the range.\"\n },\n {\n \"type\": \"select\",\n \"key\": \"valueInputOption\",\n \"label\": \"How to interpret the values\",\n \"default\": \"USER_ENTERED\",\n \"description\": \"USER_ENTERED parses the cells the way typing them would -- so =SUM(A1:A2) becomes a formula and 1/2/26 becomes a date. RAW stores exactly the characters given.\",\n \"options\": [\n {\n \"value\": \"USER_ENTERED\",\n \"label\": \"As if typed (formulas and dates parsed)\"\n },\n {\n \"value\": \"RAW\",\n \"label\": \"Exactly as given\"\n }\n ]\n },\n {\n \"type\": \"select\",\n \"key\": \"insertDataOption\",\n \"label\": \"When the range already has data below\",\n \"default\": \"INSERT_ROWS\",\n \"description\": \"INSERT_ROWS pushes existing rows down. OVERWRITE writes into them.\",\n \"options\": [\n {\n \"value\": \"INSERT_ROWS\",\n \"label\": \"Insert new rows\"\n },\n {\n \"value\": \"OVERWRITE\",\n \"label\": \"Overwrite what is there\"\n }\n ]\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_SHEETS_ROW_META, config as Record<string, unknown>, \"append a row\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/values-get.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/values-get.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Read Google Sheets values — Read the cell values of a range.\n *\n * https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/get\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleSheetsMeta } from \"../service.js\";\n\nexport const GOOGLE_SHEETS_VALUES_GET_KIND = \"@particle-academy/google_sheets_values_get\";\nexport const GOOGLE_SHEETS_VALUES_GET_OPERATION = \"values_get\";\n\nexport const GOOGLE_SHEETS_VALUES_GET_META = googleSheetsMeta(\"action\", \"read a range\", \"https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/get\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GOOGLE_SHEETS_VALUES_GET_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.range\",\n \"type\": \"string\",\n \"description\": \"The range actually covered -- may be smaller than what was asked for; Google excludes empty trailing rows and columns.\"\n },\n {\n \"path\": \"data.majorDimension\",\n \"type\": \"string\",\n \"description\": \"Echoes what was asked, or ROWS by default.\"\n },\n {\n \"path\": \"data.values\",\n \"type\": \"array\",\n \"description\": \"Rows of cells -- an array of arrays. One row is [[a, b, c]], the same shape row_append sends. Absent entirely when the range is empty.\"\n },\n {\n \"path\": \"mode\",\n \"type\": \"string\",\n \"description\": \"Which estate this ran against. Google has no sandbox, so: fake or live.\"\n }\n];\n\nexport const googleSheetsValuesGetKind: NodeKindDefinition = defineConnectorKind(GOOGLE_SHEETS_VALUES_GET_META, {\n name: GOOGLE_SHEETS_VALUES_GET_KIND,\n aliases: [\"google_sheets_values_get\"],\n label: \"Read Google Sheets values\",\n description: \"Read the cell values of a range.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"none\",\n outputShape: GOOGLE_SHEETS_VALUES_GET_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"spreadsheetId\",\n \"label\": \"Spreadsheet ID\",\n \"required\": true,\n \"description\": \"The long id from the sheet's URL: docs.google.com/spreadsheets/d/THIS_PART/edit.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"range\",\n \"label\": \"Range\",\n \"required\": true,\n \"default\": \"Sheet1!A:Z\",\n \"description\": \"In A1 notation, the same shape row_append accepts.\"\n },\n {\n \"type\": \"select\",\n \"key\": \"valueRenderOption\",\n \"label\": \"How to render values\",\n \"default\": \"FORMATTED_VALUE\",\n \"options\": [\n {\n \"value\": \"FORMATTED_VALUE\",\n \"label\": \"Formatted, as shown in the sheet (e.g. \\\"$1.50\\\", \\\"10/1/2026\\\")\"\n },\n {\n \"value\": \"UNFORMATTED_VALUE\",\n \"label\": \"The underlying number or string, no formatting applied\"\n },\n {\n \"value\": \"FORMULA\",\n \"label\": \"The formula text itself, for a cell that has one\"\n }\n ]\n },\n {\n \"type\": \"select\",\n \"key\": \"majorDimension\",\n \"label\": \"Rows or columns\",\n \"default\": \"ROWS\",\n \"description\": \"Whether the outer array of the result is rows or columns.\",\n \"options\": [\n {\n \"value\": \"ROWS\",\n \"label\": \"Rows\"\n },\n {\n \"value\": \"COLUMNS\",\n \"label\": \"Columns\"\n }\n ]\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_SHEETS_VALUES_GET_META, config as Record<string, unknown>, \"read a range\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/values-update.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/values-update.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Write Google Sheets values — Overwrite the cell values of a range. Existing\n * values in that range are replaced, not pushed down.\n *\n * https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/update\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleSheetsMeta } from \"../service.js\";\n\nexport const GOOGLE_SHEETS_VALUES_UPDATE_KIND = \"@particle-academy/google_sheets_values_update\";\nexport const GOOGLE_SHEETS_VALUES_UPDATE_OPERATION = \"values_update\";\n\nexport const GOOGLE_SHEETS_VALUES_UPDATE_META = googleSheetsMeta(\"action\", \"write a range\", \"https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/update\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.spreadsheetId\",\n \"type\": \"string\",\n \"description\": \"The spreadsheet that was written to.\"\n },\n {\n \"path\": \"data.updatedRange\",\n \"type\": \"string\",\n \"description\": \"The range Google actually wrote, in A1 notation.\"\n },\n {\n \"path\": \"data.updatedRows\",\n \"type\": \"number\",\n \"description\": \"How many rows had at least one cell updated.\"\n },\n {\n \"path\": \"data.updatedColumns\",\n \"type\": \"number\",\n \"description\": \"How many columns had at least one cell updated.\"\n },\n {\n \"path\": \"data.updatedCells\",\n \"type\": \"number\",\n \"description\": \"How many cells were written.\"\n },\n {\n \"path\": \"mode\",\n \"type\": \"string\",\n \"description\": \"Which estate this ran against. Google has no sandbox, so: fake or live.\"\n }\n];\n\nexport const googleSheetsValuesUpdateKind: NodeKindDefinition = defineConnectorKind(GOOGLE_SHEETS_VALUES_UPDATE_META, {\n name: GOOGLE_SHEETS_VALUES_UPDATE_KIND,\n aliases: [\"google_sheets_values_update\"],\n label: \"Write Google Sheets values\",\n description: \"Overwrite the cell values of a range. Existing values in that range are replaced, not pushed down.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"idempotent\",\n outputShape: GOOGLE_SHEETS_VALUES_UPDATE_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"spreadsheetId\",\n \"label\": \"Spreadsheet ID\",\n \"required\": true\n },\n {\n \"type\": \"text\",\n \"key\": \"range\",\n \"label\": \"Range\",\n \"required\": true,\n \"default\": \"Sheet1!A1\",\n \"description\": \"In A1 notation. The values written fill this range from its top-left cell -- more rows or columns than the range covers are written anyway, following Google's own documented behavior; fewer leave the rest of the range untouched.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"values\",\n \"label\": \"Row values\",\n \"required\": true,\n \"description\": \"The cells to write, comma separated, left to right, one row. For more than one row, call this action once per row.\"\n },\n {\n \"type\": \"select\",\n \"key\": \"valueInputOption\",\n \"label\": \"How to interpret the values\",\n \"required\": true,\n \"default\": \"USER_ENTERED\",\n \"description\": \"USER_ENTERED parses the cells the way typing them would -- so =SUM(A1:A2) becomes a formula. RAW stores exactly the characters given.\",\n \"options\": [\n {\n \"value\": \"USER_ENTERED\",\n \"label\": \"As if typed (formulas and dates parsed)\"\n },\n {\n \"value\": \"RAW\",\n \"label\": \"Exactly as given\"\n }\n ]\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_SHEETS_VALUES_UPDATE_META, config as Record<string, unknown>, \"write a range\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_sheets\n */\n\n/**\n * Google Sheets's node kinds for fancy-flow.\n *\n * Install this on every host. The TypeScript executors live in the js\n * package's `./flow` subpath; PHP and Python hosts run their own and need only\n * this.\n */\n\nexport * from \"./service.js\";\nexport * from \"./kinds/row-append.js\";\nexport * from \"./kinds/values-get.js\";\nexport * from \"./kinds/values-update.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { googleSheetsRowKind } from \"./kinds/row-append.js\";\nimport { googleSheetsValuesGetKind } from \"./kinds/values-get.js\";\nimport { googleSheetsValuesUpdateKind } from \"./kinds/values-update.js\";\n\n/** Every Google Sheets kind, for a host that registers the lot. */\nexport const GOOGLE_SHEETS_KINDS: NodeKindDefinition[] = [\n googleSheetsRowKind,\n googleSheetsValuesGetKind,\n googleSheetsValuesUpdateKind,\n];\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-academy/google-sheets-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Google Sheets's authoring surface for fancy-flow — the node kinds, their config schemas and their declared output shapes. React on every host; carries no executor.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"dist",
|
|
31
|
+
"art",
|
|
31
32
|
"README.md",
|
|
32
33
|
"CHANGELOG.md",
|
|
33
34
|
"LICENSE"
|