@particle-academy/google-sheets-ui 0.4.0 → 0.6.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 CHANGED
@@ -8,6 +8,52 @@ 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.6.0] — 2026-11-08
12
+
13
+ ### Added
14
+
15
+ - **One Google consent grant, shared by every Google connector** (`oauth.grant:
16
+ "google"`), for an org-level Google connection: one OAuth client, one consent
17
+ and one refresh token per person, with each feature's scopes asked for when it
18
+ is first used. Declared in the manifest, the `-ui` package's OAuth constant,
19
+ the README and the registry index:
20
+ - `authorizeParams`: `access_type=offline` and `include_granted_scopes=true`.
21
+ A refresh token comes back only on the FIRST code exchange, so keep the stored
22
+ one when an exchange returns none.
23
+ - `revoke`: POST `https://oauth2.googleapis.com/revoke` with `token`, and
24
+ `scope: "grant"`. **Revoking removes the person's WHOLE Google grant, every
25
+ Google connector**, so a per-feature disconnect stops using that feature's
26
+ scopes locally and only a full Google disconnect revokes.
27
+ - `identity`: identify the account by the id_token's `sub` (request `openid`;
28
+ issuer `https://accounts.google.com` or `accounts.google.com`; audience is
29
+ the `clientId`), never by email, which Google says is neither unique nor
30
+ permanent.
31
+ `restrictedScopes` is empty: none of this connector's scopes is restricted.
32
+
33
+ Nothing a request sends has changed; this is what a host needs to run the
34
+ connection.
35
+
36
+ ## [0.5.0] — 2026-11-08
37
+
38
+ ### Added
39
+
40
+ - **Laravel integration, in this package** (`src/Laravel/`), auto-discovered
41
+ through composer's `extra.laravel`. Laravel is SUGGESTED, never required:
42
+ outside a Laravel app none of it loads.
43
+ - a service provider that merges `config/google-sheets.php` under
44
+ `connectors.google-sheets` (credentials from the environment, or per call for a
45
+ multi-account app);
46
+ - the `GoogleSheets` facade: `GoogleSheets::call('<operation>', [...])` runs any action;
47
+ - `GoogleSheets::fake()`, answered from the connector's faker, with
48
+ `assertSent` / `assertNotSent` / `assertNothingSent` / `assertSentCount`;
49
+ - its own Pest test of all of it against a booted Laravel app.
50
+
51
+ ### Changed
52
+
53
+ - **Tests: Pest `^5`**, and `laravel/framework` `^13` as a DEV-ONLY test
54
+ dependency (the framework this package integrates with; nothing ships in
55
+ `require`).
56
+
11
57
  ## [0.4.0] — 2026-10-01
12
58
 
13
59
  ### Added
package/README.md CHANGED
@@ -55,6 +55,13 @@ Google Sheets uses OAuth2 (authorization_code). The package DECLARES the exchang
55
55
  - **Scopes** — `https://www.googleapis.com/auth/spreadsheets`
56
56
  - **Access token lifetime** — 3600 seconds (1 hours). A host that never refreshes works all afternoon and is broken by morning.
57
57
 
58
+ **One consent grant, shared** (`grant: "google"`). Every connector declaring the same grant can run on ONE OAuth client, with one consent and one refresh token per person.
59
+
60
+ - **Authorize with** `access_type=offline`, `include_granted_scopes=true`. Ask for a feature's scopes when it is first used; the new token covers every scope granted before. A refresh token comes back only on the FIRST exchange, so keep the stored one when an exchange returns none.
61
+ - **Revoke** — POST https://oauth2.googleapis.com/revoke with `token`. **It removes the WHOLE grant**: every connector sharing it, not only this one. A per-feature disconnect stops using that feature's scopes locally; only a full disconnect revokes.
62
+ - **Identify the account by `sub`**: request `openid`, then verify the token response's id_token (issuer `https://accounts.google.com` or `accounts.google.com`, keys at https://www.googleapis.com/oauth2/v3/certs, audience = `clientId`). Never key a connection by email.
63
+ - **No restricted scopes** in this connector.
64
+
58
65
  The refresh tokens do **not** rotate: the same one is reusable, so a refresh may safely be retried and may run concurrently. Stated rather than assumed, because the opposite — a provider that spends the token and revokes the grant on a replay — looks identical until it happens.
59
66
 
60
67
  ### The estate
package/dist/index.cjs CHANGED
@@ -50,7 +50,28 @@ var GOOGLE_SHEETS_OAUTH = {
50
50
  "accessTokenCredential": "accessToken",
51
51
  "refreshTokenCredential": "refreshToken",
52
52
  "refreshTokenRotates": false,
53
- "accessTokenTtlSeconds": 3600
53
+ "accessTokenTtlSeconds": 3600,
54
+ "grant": "google",
55
+ "authorizeParams": {
56
+ "access_type": "offline",
57
+ "include_granted_scopes": "true"
58
+ },
59
+ "revoke": {
60
+ "url": "https://oauth2.googleapis.com/revoke",
61
+ "param": "token",
62
+ "scope": "grant"
63
+ },
64
+ "identity": {
65
+ "scope": "openid",
66
+ "claim": "sub",
67
+ "issuers": [
68
+ "https://accounts.google.com",
69
+ "accounts.google.com"
70
+ ],
71
+ "jwksUrl": "https://www.googleapis.com/oauth2/v3/certs",
72
+ "audienceCredential": "clientId"
73
+ },
74
+ "restrictedScopes": []
54
75
  };
55
76
  function googleSheetsMeta(role, operation, docs) {
56
77
  return { ...GOOGLE_SHEETS_SERVICE, role, operation, docs };
@@ -1 +1 @@
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;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,MA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AAe;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"]}
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,O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,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,OAAA;AAAA,MACP,OAAA,EAAS,OAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,SAAA,EAAW,WAAA;AAAA,MACX,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,QAAA;AAAA,MACP,OAAA,EAAS,YAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,QAAA;AAAA,MACR,KAAA,EAAO,kBAAA;AAAA,MACP,OAAA,EAAS,6BAAA;AAAA,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 *\n * Its consent grant is SHARED with every connector declaring grant \"google\":\n * one OAuth client, one consent and one refresh token per person, scopes added\n * as features are first used (authorizeParams). Revoking removes the WHOLE\n * grant, so only a full disconnect revokes; a per-feature disconnect stops\n * using the scope locally. Identify the account by the id_token's sub, never\n * by email.\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 \"grant\": \"google\",\n \"authorizeParams\": {\n \"access_type\": \"offline\",\n \"include_granted_scopes\": \"true\"\n },\n \"revoke\": {\n \"url\": \"https://oauth2.googleapis.com/revoke\",\n \"param\": \"token\",\n \"scope\": \"grant\"\n },\n \"identity\": {\n \"scope\": \"openid\",\n \"claim\": \"sub\",\n \"issuers\": [\n \"https://accounts.google.com\",\n \"accounts.google.com\"\n ],\n \"jwksUrl\": \"https://www.googleapis.com/oauth2/v3/certs\",\n \"audienceCredential\": \"clientId\"\n },\n \"restrictedScopes\": []\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
@@ -85,6 +85,13 @@ declare const GOOGLE_SHEETS_CREDENTIALS: readonly [{
85
85
  * safely be retried and may run concurrently. That is stated rather than
86
86
  * assumed because the opposite — a provider that spends the token and revokes
87
87
  * the grant on a replay — looks identical until it happens.
88
+ *
89
+ * Its consent grant is SHARED with every connector declaring grant "google":
90
+ * one OAuth client, one consent and one refresh token per person, scopes added
91
+ * as features are first used (authorizeParams). Revoking removes the WHOLE
92
+ * grant, so only a full disconnect revokes; a per-feature disconnect stops
93
+ * using the scope locally. Identify the account by the id_token's sub, never
94
+ * by email.
88
95
  */
89
96
  declare const GOOGLE_SHEETS_OAUTH: {
90
97
  readonly flow: "authorization_code";
@@ -95,6 +102,24 @@ declare const GOOGLE_SHEETS_OAUTH: {
95
102
  readonly refreshTokenCredential: "refreshToken";
96
103
  readonly refreshTokenRotates: false;
97
104
  readonly accessTokenTtlSeconds: 3600;
105
+ readonly grant: "google";
106
+ readonly authorizeParams: {
107
+ readonly access_type: "offline";
108
+ readonly include_granted_scopes: "true";
109
+ };
110
+ readonly revoke: {
111
+ readonly url: "https://oauth2.googleapis.com/revoke";
112
+ readonly param: "token";
113
+ readonly scope: "grant";
114
+ };
115
+ readonly identity: {
116
+ readonly scope: "openid";
117
+ readonly claim: "sub";
118
+ readonly issuers: readonly ["https://accounts.google.com", "accounts.google.com"];
119
+ readonly jwksUrl: "https://www.googleapis.com/oauth2/v3/certs";
120
+ readonly audienceCredential: "clientId";
121
+ };
122
+ readonly restrictedScopes: readonly [];
98
123
  };
99
124
  /** Build a Google Sheets node's connector metadata from the operation it performs. */
100
125
  declare function googleSheetsMeta(role: ConnectorMeta["role"], operation: string, docs: string): ConnectorMeta;
package/dist/index.d.ts CHANGED
@@ -85,6 +85,13 @@ declare const GOOGLE_SHEETS_CREDENTIALS: readonly [{
85
85
  * safely be retried and may run concurrently. That is stated rather than
86
86
  * assumed because the opposite — a provider that spends the token and revokes
87
87
  * the grant on a replay — looks identical until it happens.
88
+ *
89
+ * Its consent grant is SHARED with every connector declaring grant "google":
90
+ * one OAuth client, one consent and one refresh token per person, scopes added
91
+ * as features are first used (authorizeParams). Revoking removes the WHOLE
92
+ * grant, so only a full disconnect revokes; a per-feature disconnect stops
93
+ * using the scope locally. Identify the account by the id_token's sub, never
94
+ * by email.
88
95
  */
89
96
  declare const GOOGLE_SHEETS_OAUTH: {
90
97
  readonly flow: "authorization_code";
@@ -95,6 +102,24 @@ declare const GOOGLE_SHEETS_OAUTH: {
95
102
  readonly refreshTokenCredential: "refreshToken";
96
103
  readonly refreshTokenRotates: false;
97
104
  readonly accessTokenTtlSeconds: 3600;
105
+ readonly grant: "google";
106
+ readonly authorizeParams: {
107
+ readonly access_type: "offline";
108
+ readonly include_granted_scopes: "true";
109
+ };
110
+ readonly revoke: {
111
+ readonly url: "https://oauth2.googleapis.com/revoke";
112
+ readonly param: "token";
113
+ readonly scope: "grant";
114
+ };
115
+ readonly identity: {
116
+ readonly scope: "openid";
117
+ readonly claim: "sub";
118
+ readonly issuers: readonly ["https://accounts.google.com", "accounts.google.com"];
119
+ readonly jwksUrl: "https://www.googleapis.com/oauth2/v3/certs";
120
+ readonly audienceCredential: "clientId";
121
+ };
122
+ readonly restrictedScopes: readonly [];
98
123
  };
99
124
  /** Build a Google Sheets node's connector metadata from the operation it performs. */
100
125
  declare function googleSheetsMeta(role: ConnectorMeta["role"], operation: string, docs: string): ConnectorMeta;
package/dist/index.js CHANGED
@@ -48,7 +48,28 @@ var GOOGLE_SHEETS_OAUTH = {
48
48
  "accessTokenCredential": "accessToken",
49
49
  "refreshTokenCredential": "refreshToken",
50
50
  "refreshTokenRotates": false,
51
- "accessTokenTtlSeconds": 3600
51
+ "accessTokenTtlSeconds": 3600,
52
+ "grant": "google",
53
+ "authorizeParams": {
54
+ "access_type": "offline",
55
+ "include_granted_scopes": "true"
56
+ },
57
+ "revoke": {
58
+ "url": "https://oauth2.googleapis.com/revoke",
59
+ "param": "token",
60
+ "scope": "grant"
61
+ },
62
+ "identity": {
63
+ "scope": "openid",
64
+ "claim": "sub",
65
+ "issuers": [
66
+ "https://accounts.google.com",
67
+ "accounts.google.com"
68
+ ],
69
+ "jwksUrl": "https://www.googleapis.com/oauth2/v3/certs",
70
+ "audienceCredential": "clientId"
71
+ },
72
+ "restrictedScopes": []
52
73
  };
53
74
  function googleSheetsMeta(role, operation, docs) {
54
75
  return { ...GOOGLE_SHEETS_SERVICE, role, operation, docs };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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;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,wBA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,MACR,KAAA,EAAO,OAAA;AAAA,MACP,OAAA,EAAS,OAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,SAAA,EAAW,WAAA;AAAA,MACX,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,QAAA;AAAA,MACP,OAAA,EAAS,YAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,QAAA;AAAA,MACR,KAAA,EAAO,kBAAA;AAAA,MACP,OAAA,EAAS,6BAAA;AAAA,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,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"]}
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;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,E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,MACP,OAAA,EAAS,6BAAA;AAAA,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,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 *\n * Its consent grant is SHARED with every connector declaring grant \"google\":\n * one OAuth client, one consent and one refresh token per person, scopes added\n * as features are first used (authorizeParams). Revoking removes the WHOLE\n * grant, so only a full disconnect revokes; a per-feature disconnect stops\n * using the scope locally. Identify the account by the id_token's sub, never\n * by email.\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 \"grant\": \"google\",\n \"authorizeParams\": {\n \"access_type\": \"offline\",\n \"include_granted_scopes\": \"true\"\n },\n \"revoke\": {\n \"url\": \"https://oauth2.googleapis.com/revoke\",\n \"param\": \"token\",\n \"scope\": \"grant\"\n },\n \"identity\": {\n \"scope\": \"openid\",\n \"claim\": \"sub\",\n \"issuers\": [\n \"https://accounts.google.com\",\n \"accounts.google.com\"\n ],\n \"jwksUrl\": \"https://www.googleapis.com/oauth2/v3/certs\",\n \"audienceCredential\": \"clientId\"\n },\n \"restrictedScopes\": []\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.4.0",
3
+ "version": "0.6.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",