google-mcp-suite 1.12.0 → 1.13.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/ADOPTING.md +2 -2
- package/README.md +5 -5
- package/dist/sheets/entities/BooleanCondition.d.ts +56 -0
- package/dist/sheets/entities/BooleanCondition.d.ts.map +1 -0
- package/dist/sheets/entities/BooleanCondition.js +51 -0
- package/dist/sheets/entities/BooleanCondition.js.map +1 -0
- package/dist/sheets/entities/BooleanRule.d.ts +99 -0
- package/dist/sheets/entities/BooleanRule.d.ts.map +1 -0
- package/dist/sheets/entities/BooleanRule.js +34 -0
- package/dist/sheets/entities/BooleanRule.js.map +1 -0
- package/dist/sheets/entities/CellData.d.ts +131 -0
- package/dist/sheets/entities/CellData.d.ts.map +1 -0
- package/dist/sheets/entities/CellData.js +23 -0
- package/dist/sheets/entities/CellData.js.map +1 -0
- package/dist/sheets/entities/CellFormat.d.ts +3 -0
- package/dist/sheets/entities/CellFormat.d.ts.map +1 -1
- package/dist/sheets/entities/ConditionValue.d.ts +21 -0
- package/dist/sheets/entities/ConditionValue.d.ts.map +1 -0
- package/dist/sheets/entities/ConditionValue.js +19 -0
- package/dist/sheets/entities/ConditionValue.js.map +1 -0
- package/dist/sheets/entities/ConditionalFormatRule.d.ts +196 -0
- package/dist/sheets/entities/ConditionalFormatRule.d.ts.map +1 -0
- package/dist/sheets/entities/ConditionalFormatRule.js +22 -0
- package/dist/sheets/entities/ConditionalFormatRule.js.map +1 -0
- package/dist/sheets/entities/ConditionalFormatRuleReadout.d.ts +83 -0
- package/dist/sheets/entities/ConditionalFormatRuleReadout.d.ts.map +1 -0
- package/dist/sheets/entities/ConditionalFormatRuleReadout.js +84 -0
- package/dist/sheets/entities/ConditionalFormatRuleReadout.js.map +1 -0
- package/dist/sheets/entities/DataValidationRule.d.ts +59 -0
- package/dist/sheets/entities/DataValidationRule.d.ts.map +1 -0
- package/dist/sheets/entities/DataValidationRule.js +22 -0
- package/dist/sheets/entities/DataValidationRule.js.map +1 -0
- package/dist/sheets/entities/Editors.d.ts +14 -0
- package/dist/sheets/entities/Editors.d.ts.map +1 -0
- package/dist/sheets/entities/Editors.js +22 -0
- package/dist/sheets/entities/Editors.js.map +1 -0
- package/dist/sheets/entities/ExtendedValue.d.ts +17 -0
- package/dist/sheets/entities/ExtendedValue.d.ts.map +1 -0
- package/dist/sheets/entities/ExtendedValue.js +25 -0
- package/dist/sheets/entities/ExtendedValue.js.map +1 -0
- package/dist/sheets/entities/GradientRule.d.ts +96 -0
- package/dist/sheets/entities/GradientRule.d.ts.map +1 -0
- package/dist/sheets/entities/GradientRule.js +15 -0
- package/dist/sheets/entities/GradientRule.js.map +1 -0
- package/dist/sheets/entities/InterpolationPoint.d.ts +37 -0
- package/dist/sheets/entities/InterpolationPoint.d.ts.map +1 -0
- package/dist/sheets/entities/InterpolationPoint.js +19 -0
- package/dist/sheets/entities/InterpolationPoint.js.map +1 -0
- package/dist/sheets/entities/ProtectedRange.d.ts +38 -0
- package/dist/sheets/entities/ProtectedRange.d.ts.map +1 -0
- package/dist/sheets/entities/ProtectedRange.js +35 -0
- package/dist/sheets/entities/ProtectedRange.js.map +1 -0
- package/dist/sheets/entities/Spreadsheet.d.ts +117 -4
- package/dist/sheets/entities/Spreadsheet.d.ts.map +1 -1
- package/dist/sheets/entities/Spreadsheet.js +29 -6
- package/dist/sheets/entities/Spreadsheet.js.map +1 -1
- package/dist/sheets/entities/TextFormat.d.ts +5 -2
- package/dist/sheets/entities/TextFormat.d.ts.map +1 -1
- package/dist/sheets/entities/TextFormat.js +10 -2
- package/dist/sheets/entities/TextFormat.js.map +1 -1
- package/dist/sheets/entities/TextFormatRun.d.ts +43 -0
- package/dist/sheets/entities/TextFormatRun.d.ts.map +1 -0
- package/dist/sheets/entities/TextFormatRun.js +19 -0
- package/dist/sheets/entities/TextFormatRun.js.map +1 -0
- package/dist/sheets/instructions.d.ts.map +1 -1
- package/dist/sheets/instructions.js +27 -8
- package/dist/sheets/instructions.js.map +1 -1
- package/dist/sheets/lib/cells.d.ts +20 -0
- package/dist/sheets/lib/cells.d.ts.map +1 -0
- package/dist/sheets/lib/cells.js +41 -0
- package/dist/sheets/lib/cells.js.map +1 -0
- package/dist/sheets/lib/formats.d.ts.map +1 -1
- package/dist/sheets/lib/formats.js +1 -0
- package/dist/sheets/lib/formats.js.map +1 -1
- package/dist/sheets/lib/requests.d.ts +13 -0
- package/dist/sheets/lib/requests.d.ts.map +1 -1
- package/dist/sheets/lib/requests.js +38 -0
- package/dist/sheets/lib/requests.js.map +1 -1
- package/dist/sheets/lib/rules.d.ts +37 -0
- package/dist/sheets/lib/rules.d.ts.map +1 -0
- package/dist/sheets/lib/rules.js +116 -0
- package/dist/sheets/lib/rules.js.map +1 -0
- package/dist/sheets/lib/spreadsheet.d.ts +12 -3
- package/dist/sheets/lib/spreadsheet.d.ts.map +1 -1
- package/dist/sheets/lib/spreadsheet.js +110 -4
- package/dist/sheets/lib/spreadsheet.js.map +1 -1
- package/dist/sheets/methods/add_conditional_format_rule/handler.d.ts +5 -0
- package/dist/sheets/methods/add_conditional_format_rule/handler.d.ts.map +1 -0
- package/dist/sheets/methods/add_conditional_format_rule/handler.js +13 -0
- package/dist/sheets/methods/add_conditional_format_rule/handler.js.map +1 -0
- package/dist/sheets/methods/add_conditional_format_rule/index.d.ts +198 -0
- package/dist/sheets/methods/add_conditional_format_rule/index.d.ts.map +1 -0
- package/dist/sheets/methods/add_conditional_format_rule/index.js +22 -0
- package/dist/sheets/methods/add_conditional_format_rule/index.js.map +1 -0
- package/dist/sheets/methods/add_conditional_format_rule/schema.d.ts +197 -0
- package/dist/sheets/methods/add_conditional_format_rule/schema.d.ts.map +1 -0
- package/dist/sheets/methods/add_conditional_format_rule/schema.js +22 -0
- package/dist/sheets/methods/add_conditional_format_rule/schema.js.map +1 -0
- package/dist/sheets/methods/add_named_range/handler.d.ts.map +1 -1
- package/dist/sheets/methods/add_named_range/handler.js +5 -1
- package/dist/sheets/methods/add_named_range/handler.js.map +1 -1
- package/dist/sheets/methods/add_protected_range/handler.d.ts +5 -0
- package/dist/sheets/methods/add_protected_range/handler.d.ts.map +1 -0
- package/dist/sheets/methods/add_protected_range/handler.js +29 -0
- package/dist/sheets/methods/add_protected_range/handler.js.map +1 -0
- package/dist/sheets/methods/add_protected_range/index.d.ts +61 -0
- package/dist/sheets/methods/add_protected_range/index.d.ts.map +1 -0
- package/dist/sheets/methods/add_protected_range/index.js +25 -0
- package/dist/sheets/methods/add_protected_range/index.js.map +1 -0
- package/dist/sheets/methods/add_protected_range/schema.d.ts +56 -0
- package/dist/sheets/methods/add_protected_range/schema.d.ts.map +1 -0
- package/dist/sheets/methods/add_protected_range/schema.js +31 -0
- package/dist/sheets/methods/add_protected_range/schema.js.map +1 -0
- package/dist/sheets/methods/clear_data_validation/handler.d.ts +5 -0
- package/dist/sheets/methods/clear_data_validation/handler.d.ts.map +1 -0
- package/dist/sheets/methods/clear_data_validation/handler.js +12 -0
- package/dist/sheets/methods/clear_data_validation/handler.js.map +1 -0
- package/dist/sheets/methods/clear_data_validation/index.d.ts +19 -0
- package/dist/sheets/methods/clear_data_validation/index.d.ts.map +1 -0
- package/dist/sheets/methods/clear_data_validation/index.js +21 -0
- package/dist/sheets/methods/clear_data_validation/index.js.map +1 -0
- package/dist/sheets/methods/clear_data_validation/schema.d.ts +19 -0
- package/dist/sheets/methods/clear_data_validation/schema.d.ts.map +1 -0
- package/dist/sheets/methods/clear_data_validation/schema.js +17 -0
- package/dist/sheets/methods/clear_data_validation/schema.js.map +1 -0
- package/dist/sheets/methods/create_spreadsheet/index.d.ts +112 -0
- package/dist/sheets/methods/create_spreadsheet/index.d.ts.map +1 -1
- package/dist/sheets/methods/create_spreadsheet/schema.d.ts +112 -0
- package/dist/sheets/methods/create_spreadsheet/schema.d.ts.map +1 -1
- package/dist/sheets/methods/delete_conditional_format_rule/handler.d.ts +5 -0
- package/dist/sheets/methods/delete_conditional_format_rule/handler.d.ts.map +1 -0
- package/dist/sheets/methods/delete_conditional_format_rule/handler.js +8 -0
- package/dist/sheets/methods/delete_conditional_format_rule/handler.js.map +1 -0
- package/dist/sheets/methods/delete_conditional_format_rule/index.d.ts +16 -0
- package/dist/sheets/methods/delete_conditional_format_rule/index.d.ts.map +1 -0
- package/dist/sheets/methods/delete_conditional_format_rule/index.js +23 -0
- package/dist/sheets/methods/delete_conditional_format_rule/index.js.map +1 -0
- package/dist/sheets/methods/delete_conditional_format_rule/schema.d.ts +14 -0
- package/dist/sheets/methods/delete_conditional_format_rule/schema.d.ts.map +1 -0
- package/dist/sheets/methods/delete_conditional_format_rule/schema.js +16 -0
- package/dist/sheets/methods/delete_conditional_format_rule/schema.js.map +1 -0
- package/dist/sheets/methods/delete_protected_range/handler.d.ts +5 -0
- package/dist/sheets/methods/delete_protected_range/handler.d.ts.map +1 -0
- package/dist/sheets/methods/delete_protected_range/handler.js +8 -0
- package/dist/sheets/methods/delete_protected_range/handler.js.map +1 -0
- package/dist/sheets/methods/delete_protected_range/index.d.ts +13 -0
- package/dist/sheets/methods/delete_protected_range/index.d.ts.map +1 -0
- package/dist/sheets/methods/delete_protected_range/index.js +21 -0
- package/dist/sheets/methods/delete_protected_range/index.js.map +1 -0
- package/dist/sheets/methods/delete_protected_range/schema.d.ts +13 -0
- package/dist/sheets/methods/delete_protected_range/schema.d.ts.map +1 -0
- package/dist/sheets/methods/delete_protected_range/schema.js +15 -0
- package/dist/sheets/methods/delete_protected_range/schema.js.map +1 -0
- package/dist/sheets/methods/get_spreadsheet/index.d.ts +119 -4
- package/dist/sheets/methods/get_spreadsheet/index.d.ts.map +1 -1
- package/dist/sheets/methods/get_spreadsheet/index.js +8 -5
- package/dist/sheets/methods/get_spreadsheet/index.js.map +1 -1
- package/dist/sheets/methods/get_spreadsheet/schema.d.ts +112 -0
- package/dist/sheets/methods/get_spreadsheet/schema.d.ts.map +1 -1
- package/dist/sheets/methods/merge_cells/handler.d.ts +5 -0
- package/dist/sheets/methods/merge_cells/handler.d.ts.map +1 -0
- package/dist/sheets/methods/merge_cells/handler.js +12 -0
- package/dist/sheets/methods/merge_cells/handler.js.map +1 -0
- package/dist/sheets/methods/merge_cells/index.d.ts +23 -0
- package/dist/sheets/methods/merge_cells/index.d.ts.map +1 -0
- package/dist/sheets/methods/merge_cells/index.js +21 -0
- package/dist/sheets/methods/merge_cells/index.js.map +1 -0
- package/dist/sheets/methods/merge_cells/schema.d.ts +23 -0
- package/dist/sheets/methods/merge_cells/schema.d.ts.map +1 -0
- package/dist/sheets/methods/merge_cells/schema.js +16 -0
- package/dist/sheets/methods/merge_cells/schema.js.map +1 -0
- package/dist/sheets/methods/move_conditional_format_rule/handler.d.ts +5 -0
- package/dist/sheets/methods/move_conditional_format_rule/handler.d.ts.map +1 -0
- package/dist/sheets/methods/move_conditional_format_rule/handler.js +18 -0
- package/dist/sheets/methods/move_conditional_format_rule/handler.js.map +1 -0
- package/dist/sheets/methods/move_conditional_format_rule/index.d.ts +17 -0
- package/dist/sheets/methods/move_conditional_format_rule/index.d.ts.map +1 -0
- package/dist/sheets/methods/move_conditional_format_rule/index.js +22 -0
- package/dist/sheets/methods/move_conditional_format_rule/index.js.map +1 -0
- package/dist/sheets/methods/move_conditional_format_rule/schema.d.ts +16 -0
- package/dist/sheets/methods/move_conditional_format_rule/schema.d.ts.map +1 -0
- package/dist/sheets/methods/move_conditional_format_rule/schema.js +24 -0
- package/dist/sheets/methods/move_conditional_format_rule/schema.js.map +1 -0
- package/dist/sheets/methods/registry.d.ts +958 -0
- package/dist/sheets/methods/registry.d.ts.map +1 -1
- package/dist/sheets/methods/registry.js +28 -0
- package/dist/sheets/methods/registry.js.map +1 -1
- package/dist/sheets/methods/repeat_cell/index.d.ts +6 -1
- package/dist/sheets/methods/repeat_cell/index.d.ts.map +1 -1
- package/dist/sheets/methods/repeat_cell/index.js +3 -1
- package/dist/sheets/methods/repeat_cell/index.js.map +1 -1
- package/dist/sheets/methods/repeat_cell/schema.d.ts +3 -0
- package/dist/sheets/methods/repeat_cell/schema.d.ts.map +1 -1
- package/dist/sheets/methods/set_data_validation/handler.d.ts +5 -0
- package/dist/sheets/methods/set_data_validation/handler.d.ts.map +1 -0
- package/dist/sheets/methods/set_data_validation/handler.js +14 -0
- package/dist/sheets/methods/set_data_validation/handler.js.map +1 -0
- package/dist/sheets/methods/set_data_validation/index.d.ts +69 -0
- package/dist/sheets/methods/set_data_validation/index.d.ts.map +1 -0
- package/dist/sheets/methods/set_data_validation/index.js +22 -0
- package/dist/sheets/methods/set_data_validation/index.js.map +1 -0
- package/dist/sheets/methods/set_data_validation/schema.d.ts +68 -0
- package/dist/sheets/methods/set_data_validation/schema.d.ts.map +1 -0
- package/dist/sheets/methods/set_data_validation/schema.js +19 -0
- package/dist/sheets/methods/set_data_validation/schema.js.map +1 -0
- package/dist/sheets/methods/unmerge_cells/handler.d.ts +5 -0
- package/dist/sheets/methods/unmerge_cells/handler.d.ts.map +1 -0
- package/dist/sheets/methods/unmerge_cells/handler.js +9 -0
- package/dist/sheets/methods/unmerge_cells/handler.js.map +1 -0
- package/dist/sheets/methods/unmerge_cells/index.d.ts +17 -0
- package/dist/sheets/methods/unmerge_cells/index.d.ts.map +1 -0
- package/dist/sheets/methods/unmerge_cells/index.js +20 -0
- package/dist/sheets/methods/unmerge_cells/index.js.map +1 -0
- package/dist/sheets/methods/unmerge_cells/schema.d.ts +18 -0
- package/dist/sheets/methods/unmerge_cells/schema.d.ts.map +1 -0
- package/dist/sheets/methods/unmerge_cells/schema.js +13 -0
- package/dist/sheets/methods/unmerge_cells/schema.js.map +1 -0
- package/dist/sheets/methods/update_cells/handler.d.ts +5 -0
- package/dist/sheets/methods/update_cells/handler.d.ts.map +1 -0
- package/dist/sheets/methods/update_cells/handler.js +22 -0
- package/dist/sheets/methods/update_cells/handler.js.map +1 -0
- package/dist/sheets/methods/update_cells/index.d.ts +148 -0
- package/dist/sheets/methods/update_cells/index.d.ts.map +1 -0
- package/dist/sheets/methods/update_cells/index.js +24 -0
- package/dist/sheets/methods/update_cells/index.js.map +1 -0
- package/dist/sheets/methods/update_cells/schema.d.ts +145 -0
- package/dist/sheets/methods/update_cells/schema.d.ts.map +1 -0
- package/dist/sheets/methods/update_cells/schema.js +25 -0
- package/dist/sheets/methods/update_cells/schema.js.map +1 -0
- package/dist/sheets/methods/update_conditional_format_rule/handler.d.ts +5 -0
- package/dist/sheets/methods/update_conditional_format_rule/handler.d.ts.map +1 -0
- package/dist/sheets/methods/update_conditional_format_rule/handler.js +17 -0
- package/dist/sheets/methods/update_conditional_format_rule/handler.js.map +1 -0
- package/dist/sheets/methods/update_conditional_format_rule/index.d.ts +200 -0
- package/dist/sheets/methods/update_conditional_format_rule/index.d.ts.map +1 -0
- package/dist/sheets/methods/update_conditional_format_rule/index.js +24 -0
- package/dist/sheets/methods/update_conditional_format_rule/index.js.map +1 -0
- package/dist/sheets/methods/update_conditional_format_rule/schema.d.ts +197 -0
- package/dist/sheets/methods/update_conditional_format_rule/schema.d.ts.map +1 -0
- package/dist/sheets/methods/update_conditional_format_rule/schema.js +19 -0
- package/dist/sheets/methods/update_conditional_format_rule/schema.js.map +1 -0
- package/dist/sheets/methods/update_protected_range/handler.d.ts +5 -0
- package/dist/sheets/methods/update_protected_range/handler.d.ts.map +1 -0
- package/dist/sheets/methods/update_protected_range/handler.js +31 -0
- package/dist/sheets/methods/update_protected_range/handler.js.map +1 -0
- package/dist/sheets/methods/update_protected_range/index.d.ts +38 -0
- package/dist/sheets/methods/update_protected_range/index.d.ts.map +1 -0
- package/dist/sheets/methods/update_protected_range/index.js +23 -0
- package/dist/sheets/methods/update_protected_range/index.js.map +1 -0
- package/dist/sheets/methods/update_protected_range/schema.d.ts +36 -0
- package/dist/sheets/methods/update_protected_range/schema.d.ts.map +1 -0
- package/dist/sheets/methods/update_protected_range/schema.js +33 -0
- package/dist/sheets/methods/update_protected_range/schema.js.map +1 -0
- package/package.json +1 -1
package/ADOPTING.md
CHANGED
|
@@ -19,8 +19,8 @@ the differences are concrete:
|
|
|
19
19
|
|
|
20
20
|
- **MCP and then some.** The Gmail, Calendar, and Drive servers expose
|
|
21
21
|
Google's curated MCP toolset *plus* the broader REST method surface;
|
|
22
|
-
Sheets and Docs are REST-sourced throughout: [
|
|
23
|
-
across Gmail (33), Calendar (25), Drive (35), Sheets (
|
|
22
|
+
Sheets and Docs are REST-sourced throughout: [144 operations](./README.md#services)
|
|
23
|
+
across Gmail (33), Calendar (25), Drive (35), Sheets (42), and Docs (9). Each
|
|
24
24
|
service's `CAPABILITIES.md` enumerates its operations with provenance.
|
|
25
25
|
Built-in connectors document a narrower surface; as of this writing,
|
|
26
26
|
Anthropic documents its claude.ai Gmail connector as searching, reading,
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
16
16
|
<strong>Google Workspace MCP servers you can read in an afternoon, one per service.</strong><br />
|
|
17
|
-
The curated <a href="https://modelcontextprotocol.io/">MCP</a> toolset plus the broader REST surface for Gmail, Google Calendar, Google Drive, Google Docs, and Google Sheets, one server per service per account: <strong>
|
|
17
|
+
The curated <a href="https://modelcontextprotocol.io/">MCP</a> toolset plus the broader REST surface for Gmail, Google Calendar, Google Drive, Google Docs, and Google Sheets, one server per service per account: <strong>144 self-describing operations</strong> across five Google services, so an AI agent (Claude, Cursor, or any MCP client) can do (nearly) anything your accounts can, on several accounts at once, and never on the wrong one. Every operation cites its Google reference page and validates input and output; test coverage is pinned at 100%.
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
20
|
<p align="center">
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
</p>
|
|
31
31
|
|
|
32
32
|
<p align="center">
|
|
33
|
-
<sub><strong>
|
|
33
|
+
<sub><strong>144 operations</strong> ship today: <strong>Gmail</strong> (<a href="./src/gmail/CAPABILITIES.md">33</a>), <strong>Calendar</strong> (<a href="./src/calendar/CAPABILITIES.md">25</a>), <strong>Sheets</strong> (<a href="./src/sheets/CAPABILITIES.md">42</a>), <strong>Docs</strong> (<a href="./src/docs/CAPABILITIES.md">9</a>), and <strong>Drive</strong> (<a href="./src/drive/CAPABILITIES.md">35</a>).</sub>
|
|
34
34
|
</p>
|
|
35
35
|
|
|
36
36
|
<p align="center"><sub><strong>Replacing a built-in connector?</strong> Hand your agent <a href="./ADOPTING.md">ADOPTING.md</a>: the playbook to adopt, supersede, verify, and decommission.</sub></p>
|
|
@@ -46,7 +46,7 @@ The design has two internal concepts and nothing else:
|
|
|
46
46
|
|
|
47
47
|
That is the whole surface. Read one operation folder and you understand all of them.
|
|
48
48
|
|
|
49
|
-
- **REST plus MCP in one surface.** Each server exposes the curated MCP toolset *and* the broader REST method set of its Google API, so an agent gets far more than a thin slice. Gmail ships with [33 operations](./src/gmail/CAPABILITIES.md) (10 curated MCP tools plus 23 REST methods), Calendar with [25](./src/calendar/CAPABILITIES.md) (8 plus 17), Drive with [35](./src/drive/CAPABILITIES.md) (8 plus 27), Sheets with [
|
|
49
|
+
- **REST plus MCP in one surface.** Each server exposes the curated MCP toolset *and* the broader REST method set of its Google API, so an agent gets far more than a thin slice. Gmail ships with [33 operations](./src/gmail/CAPABILITIES.md) (10 curated MCP tools plus 23 REST methods), Calendar with [25](./src/calendar/CAPABILITIES.md) (8 plus 17), Drive with [35](./src/drive/CAPABILITIES.md) (8 plus 27), Sheets with [42](./src/sheets/CAPABILITIES.md), and Docs with [9](./src/docs/CAPABILITIES.md) (Sheets and Docs are REST-sourced throughout; Google published no MCP toolset for either when they shipped, though previews now exist); the split is explained in [MCP, and then some](#mcp-and-then-some).
|
|
50
50
|
- **The folder tree mirrors Google's docs.** A Google tools-list reference page becomes a `tools/` folder; a Google REST method reference page becomes a `methods/` folder. If you can find the operation in Google's docs, you can find it in this repo.
|
|
51
51
|
|
|
52
52
|
| Google's reference page | This repo's folder |
|
|
@@ -67,7 +67,7 @@ This is an MCP server, and deliberately more than one. Google publishes an MCP t
|
|
|
67
67
|
- **`tools/`** mirrors Google's **MCP toolset** reference, verbatim.
|
|
68
68
|
- **`methods/`** covers the broader **REST** reference, the operations the MCP toolset omits.
|
|
69
69
|
|
|
70
|
-
The split is Google's own (its MCP reference and its REST reference are separate trees); we keep it on disk on purpose and unify it operationally (one `Operation` type, one merged wire surface where everything is an MCP tool). The breadth of [the operation list](./src/gmail/CAPABILITIES.md) is the evidence that MCP alone is not enough for real work. Sheets and Docs are the limit case: Google published no MCP toolset for either when they shipped (developer previews have since appeared), so those servers are methods-only ([
|
|
70
|
+
The split is Google's own (its MCP reference and its REST reference are separate trees); we keep it on disk on purpose and unify it operationally (one `Operation` type, one merged wire surface where everything is an MCP tool). The breadth of [the operation list](./src/gmail/CAPABILITIES.md) is the evidence that MCP alone is not enough for real work. Sheets and Docs are the limit case: Google published no MCP toolset for either when they shipped (developer previews have since appeared), so those servers are methods-only ([42](./src/sheets/CAPABILITIES.md) and [9](./src/docs/CAPABILITIES.md) operations sourced entirely from the REST reference). Keeping the two sourced surfaces separate also makes each new operation a bounded, documentation-driven unit of work; the recipe is in [EXTENDING.md](./EXTENDING.md).
|
|
71
71
|
|
|
72
72
|
## Quickstart
|
|
73
73
|
|
|
@@ -187,7 +187,7 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full task list, [AGENTS.md](./A
|
|
|
187
187
|
|---|---|---|
|
|
188
188
|
| **Gmail** | ✅ Implemented | [33 operations](./src/gmail/CAPABILITIES.md): threads, messages, drafts, labels, filters, attachments |
|
|
189
189
|
| **Calendar** | ✅ Implemented | [25 operations](./src/calendar/CAPABILITIES.md): events, calendars, free/busy, meeting-time suggestions |
|
|
190
|
-
| **Sheets** | ✅ Implemented | [
|
|
190
|
+
| **Sheets** | ✅ Implemented | [42 operations](./src/sheets/CAPABILITIES.md): spreadsheets, values, batch and data-filter reads/writes, developer metadata, sheet management, dimensions, named ranges, formatting and borders, cell content and merges, conditional format rules, data validation, protected ranges, charts |
|
|
191
191
|
| **Docs** | ✅ Implemented | [9 operations](./src/docs/CAPABILITIES.md): document reads and creation, curated text editing and styling |
|
|
192
192
|
| **Drive** | ✅ Implemented | [35 operations](./src/drive/CAPABILITIES.md): files, search, content, comments, revisions, shared drives |
|
|
193
193
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A condition that can evaluate to true or false, the shared predicate
|
|
4
|
+
* vocabulary of data validation, conditional formatting, and filters. How
|
|
5
|
+
* many values a type takes depends on the type: the comparisons take one,
|
|
6
|
+
* the BETWEEN family exactly two, ONE_OF_LIST any number, and the
|
|
7
|
+
* emptiness and validity checks none.
|
|
8
|
+
*
|
|
9
|
+
* @see https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#BooleanCondition
|
|
10
|
+
*/
|
|
11
|
+
export declare const BooleanCondition: z.ZodObject<{
|
|
12
|
+
type: z.ZodEnum<{
|
|
13
|
+
BLANK: "BLANK";
|
|
14
|
+
BOOLEAN: "BOOLEAN";
|
|
15
|
+
CUSTOM_FORMULA: "CUSTOM_FORMULA";
|
|
16
|
+
DATE_AFTER: "DATE_AFTER";
|
|
17
|
+
DATE_BEFORE: "DATE_BEFORE";
|
|
18
|
+
DATE_BETWEEN: "DATE_BETWEEN";
|
|
19
|
+
DATE_EQ: "DATE_EQ";
|
|
20
|
+
DATE_IS_VALID: "DATE_IS_VALID";
|
|
21
|
+
DATE_NOT_BETWEEN: "DATE_NOT_BETWEEN";
|
|
22
|
+
DATE_ON_OR_AFTER: "DATE_ON_OR_AFTER";
|
|
23
|
+
DATE_ON_OR_BEFORE: "DATE_ON_OR_BEFORE";
|
|
24
|
+
NOT_BLANK: "NOT_BLANK";
|
|
25
|
+
NUMBER_BETWEEN: "NUMBER_BETWEEN";
|
|
26
|
+
NUMBER_EQ: "NUMBER_EQ";
|
|
27
|
+
NUMBER_GREATER: "NUMBER_GREATER";
|
|
28
|
+
NUMBER_GREATER_THAN_EQ: "NUMBER_GREATER_THAN_EQ";
|
|
29
|
+
NUMBER_LESS: "NUMBER_LESS";
|
|
30
|
+
NUMBER_LESS_THAN_EQ: "NUMBER_LESS_THAN_EQ";
|
|
31
|
+
NUMBER_NOT_BETWEEN: "NUMBER_NOT_BETWEEN";
|
|
32
|
+
NUMBER_NOT_EQ: "NUMBER_NOT_EQ";
|
|
33
|
+
ONE_OF_LIST: "ONE_OF_LIST";
|
|
34
|
+
ONE_OF_RANGE: "ONE_OF_RANGE";
|
|
35
|
+
TEXT_CONTAINS: "TEXT_CONTAINS";
|
|
36
|
+
TEXT_ENDS_WITH: "TEXT_ENDS_WITH";
|
|
37
|
+
TEXT_EQ: "TEXT_EQ";
|
|
38
|
+
TEXT_IS_EMAIL: "TEXT_IS_EMAIL";
|
|
39
|
+
TEXT_IS_URL: "TEXT_IS_URL";
|
|
40
|
+
TEXT_NOT_CONTAINS: "TEXT_NOT_CONTAINS";
|
|
41
|
+
TEXT_STARTS_WITH: "TEXT_STARTS_WITH";
|
|
42
|
+
}>;
|
|
43
|
+
values: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
44
|
+
relativeDate: z.ZodOptional<z.ZodEnum<{
|
|
45
|
+
PAST_MONTH: "PAST_MONTH";
|
|
46
|
+
PAST_WEEK: "PAST_WEEK";
|
|
47
|
+
PAST_YEAR: "PAST_YEAR";
|
|
48
|
+
TODAY: "TODAY";
|
|
49
|
+
TOMORROW: "TOMORROW";
|
|
50
|
+
YESTERDAY: "YESTERDAY";
|
|
51
|
+
}>>;
|
|
52
|
+
userEnteredValue: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$strict>>>;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
export type BooleanCondition = z.infer<typeof BooleanCondition>;
|
|
56
|
+
//# sourceMappingURL=BooleanCondition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BooleanCondition.d.ts","sourceRoot":"","sources":["../../../src/sheets/entities/BooleanCondition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0C3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ConditionValue } from './ConditionValue.js';
|
|
3
|
+
/**
|
|
4
|
+
* A condition that can evaluate to true or false, the shared predicate
|
|
5
|
+
* vocabulary of data validation, conditional formatting, and filters. How
|
|
6
|
+
* many values a type takes depends on the type: the comparisons take one,
|
|
7
|
+
* the BETWEEN family exactly two, ONE_OF_LIST any number, and the
|
|
8
|
+
* emptiness and validity checks none.
|
|
9
|
+
*
|
|
10
|
+
* @see https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#BooleanCondition
|
|
11
|
+
*/
|
|
12
|
+
export const BooleanCondition = z.strictObject({
|
|
13
|
+
type: z
|
|
14
|
+
.enum([
|
|
15
|
+
'NUMBER_GREATER',
|
|
16
|
+
'NUMBER_GREATER_THAN_EQ',
|
|
17
|
+
'NUMBER_LESS',
|
|
18
|
+
'NUMBER_LESS_THAN_EQ',
|
|
19
|
+
'NUMBER_EQ',
|
|
20
|
+
'NUMBER_NOT_EQ',
|
|
21
|
+
'NUMBER_BETWEEN',
|
|
22
|
+
'NUMBER_NOT_BETWEEN',
|
|
23
|
+
'TEXT_CONTAINS',
|
|
24
|
+
'TEXT_NOT_CONTAINS',
|
|
25
|
+
'TEXT_STARTS_WITH',
|
|
26
|
+
'TEXT_ENDS_WITH',
|
|
27
|
+
'TEXT_EQ',
|
|
28
|
+
'TEXT_IS_EMAIL',
|
|
29
|
+
'TEXT_IS_URL',
|
|
30
|
+
'DATE_EQ',
|
|
31
|
+
'DATE_BEFORE',
|
|
32
|
+
'DATE_AFTER',
|
|
33
|
+
'DATE_ON_OR_BEFORE',
|
|
34
|
+
'DATE_ON_OR_AFTER',
|
|
35
|
+
'DATE_BETWEEN',
|
|
36
|
+
'DATE_NOT_BETWEEN',
|
|
37
|
+
'DATE_IS_VALID',
|
|
38
|
+
'ONE_OF_RANGE',
|
|
39
|
+
'ONE_OF_LIST',
|
|
40
|
+
'BLANK',
|
|
41
|
+
'NOT_BLANK',
|
|
42
|
+
'CUSTOM_FORMULA',
|
|
43
|
+
'BOOLEAN',
|
|
44
|
+
])
|
|
45
|
+
.describe('The type of condition. Support varies by context: TEXT_IS_EMAIL, TEXT_IS_URL, DATE_ON_OR_BEFORE, DATE_ON_OR_AFTER, DATE_BETWEEN, DATE_NOT_BETWEEN, DATE_IS_VALID, ONE_OF_RANGE, ONE_OF_LIST, and BOOLEAN apply only to data validation; TEXT_STARTS_WITH, TEXT_ENDS_WITH, BLANK, and NOT_BLANK apply only to conditional formatting and filters.'),
|
|
46
|
+
values: z
|
|
47
|
+
.array(ConditionValue)
|
|
48
|
+
.optional()
|
|
49
|
+
.describe('The values of the condition; how many are required depends on the type (comparisons take one, the BETWEEN family exactly two, ONE_OF_LIST any number, the no-argument checks none, and BOOLEAN zero, one, or two).'),
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=BooleanCondition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BooleanCondition.js","sourceRoot":"","sources":["../../../src/sheets/entities/BooleanCondition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7C,IAAI,EAAE,CAAC;SACJ,IAAI,CAAC;QACJ,gBAAgB;QAChB,wBAAwB;QACxB,aAAa;QACb,qBAAqB;QACrB,WAAW;QACX,eAAe;QACf,gBAAgB;QAChB,oBAAoB;QACpB,eAAe;QACf,mBAAmB;QACnB,kBAAkB;QAClB,gBAAgB;QAChB,SAAS;QACT,eAAe;QACf,aAAa;QACb,SAAS;QACT,aAAa;QACb,YAAY;QACZ,mBAAmB;QACnB,kBAAkB;QAClB,cAAc;QACd,kBAAkB;QAClB,eAAe;QACf,cAAc;QACd,aAAa;QACb,OAAO;QACP,WAAW;QACX,gBAAgB;QAChB,SAAS;KACV,CAAC;SACD,QAAQ,CACP,kVAAkV,CACnV;IACH,MAAM,EAAE,CAAC;SACN,KAAK,CAAC,cAAc,CAAC;SACrB,QAAQ,EAAE;SACV,QAAQ,CACP,oNAAoN,CACrN;CACJ,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { ConditionValue } from './ConditionValue.js';\n\n/**\n * A condition that can evaluate to true or false, the shared predicate\n * vocabulary of data validation, conditional formatting, and filters. How\n * many values a type takes depends on the type: the comparisons take one,\n * the BETWEEN family exactly two, ONE_OF_LIST any number, and the\n * emptiness and validity checks none.\n *\n * @see https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#BooleanCondition\n */\nexport const BooleanCondition = z.strictObject({\n type: z\n .enum([\n 'NUMBER_GREATER',\n 'NUMBER_GREATER_THAN_EQ',\n 'NUMBER_LESS',\n 'NUMBER_LESS_THAN_EQ',\n 'NUMBER_EQ',\n 'NUMBER_NOT_EQ',\n 'NUMBER_BETWEEN',\n 'NUMBER_NOT_BETWEEN',\n 'TEXT_CONTAINS',\n 'TEXT_NOT_CONTAINS',\n 'TEXT_STARTS_WITH',\n 'TEXT_ENDS_WITH',\n 'TEXT_EQ',\n 'TEXT_IS_EMAIL',\n 'TEXT_IS_URL',\n 'DATE_EQ',\n 'DATE_BEFORE',\n 'DATE_AFTER',\n 'DATE_ON_OR_BEFORE',\n 'DATE_ON_OR_AFTER',\n 'DATE_BETWEEN',\n 'DATE_NOT_BETWEEN',\n 'DATE_IS_VALID',\n 'ONE_OF_RANGE',\n 'ONE_OF_LIST',\n 'BLANK',\n 'NOT_BLANK',\n 'CUSTOM_FORMULA',\n 'BOOLEAN',\n ])\n .describe(\n 'The type of condition. Support varies by context: TEXT_IS_EMAIL, TEXT_IS_URL, DATE_ON_OR_BEFORE, DATE_ON_OR_AFTER, DATE_BETWEEN, DATE_NOT_BETWEEN, DATE_IS_VALID, ONE_OF_RANGE, ONE_OF_LIST, and BOOLEAN apply only to data validation; TEXT_STARTS_WITH, TEXT_ENDS_WITH, BLANK, and NOT_BLANK apply only to conditional formatting and filters.',\n ),\n values: z\n .array(ConditionValue)\n .optional()\n .describe(\n 'The values of the condition; how many are required depends on the type (comparisons take one, the BETWEEN family exactly two, ONE_OF_LIST any number, the no-argument checks none, and BOOLEAN zero, one, or two).',\n ),\n});\n\nexport type BooleanCondition = z.infer<typeof BooleanCondition>;\n"]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* An on/off conditional format: cells matching the condition get the format,
|
|
4
|
+
* cells that stop matching lose it, with no further calls. The format is the
|
|
5
|
+
* documented conditional-formatting subset, not the full CellFormat.
|
|
6
|
+
*
|
|
7
|
+
* @see https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#BooleanRule
|
|
8
|
+
*/
|
|
9
|
+
export declare const BooleanRule: z.ZodObject<{
|
|
10
|
+
condition: z.ZodObject<{
|
|
11
|
+
type: z.ZodEnum<{
|
|
12
|
+
BLANK: "BLANK";
|
|
13
|
+
BOOLEAN: "BOOLEAN";
|
|
14
|
+
CUSTOM_FORMULA: "CUSTOM_FORMULA";
|
|
15
|
+
DATE_AFTER: "DATE_AFTER";
|
|
16
|
+
DATE_BEFORE: "DATE_BEFORE";
|
|
17
|
+
DATE_BETWEEN: "DATE_BETWEEN";
|
|
18
|
+
DATE_EQ: "DATE_EQ";
|
|
19
|
+
DATE_IS_VALID: "DATE_IS_VALID";
|
|
20
|
+
DATE_NOT_BETWEEN: "DATE_NOT_BETWEEN";
|
|
21
|
+
DATE_ON_OR_AFTER: "DATE_ON_OR_AFTER";
|
|
22
|
+
DATE_ON_OR_BEFORE: "DATE_ON_OR_BEFORE";
|
|
23
|
+
NOT_BLANK: "NOT_BLANK";
|
|
24
|
+
NUMBER_BETWEEN: "NUMBER_BETWEEN";
|
|
25
|
+
NUMBER_EQ: "NUMBER_EQ";
|
|
26
|
+
NUMBER_GREATER: "NUMBER_GREATER";
|
|
27
|
+
NUMBER_GREATER_THAN_EQ: "NUMBER_GREATER_THAN_EQ";
|
|
28
|
+
NUMBER_LESS: "NUMBER_LESS";
|
|
29
|
+
NUMBER_LESS_THAN_EQ: "NUMBER_LESS_THAN_EQ";
|
|
30
|
+
NUMBER_NOT_BETWEEN: "NUMBER_NOT_BETWEEN";
|
|
31
|
+
NUMBER_NOT_EQ: "NUMBER_NOT_EQ";
|
|
32
|
+
ONE_OF_LIST: "ONE_OF_LIST";
|
|
33
|
+
ONE_OF_RANGE: "ONE_OF_RANGE";
|
|
34
|
+
TEXT_CONTAINS: "TEXT_CONTAINS";
|
|
35
|
+
TEXT_ENDS_WITH: "TEXT_ENDS_WITH";
|
|
36
|
+
TEXT_EQ: "TEXT_EQ";
|
|
37
|
+
TEXT_IS_EMAIL: "TEXT_IS_EMAIL";
|
|
38
|
+
TEXT_IS_URL: "TEXT_IS_URL";
|
|
39
|
+
TEXT_NOT_CONTAINS: "TEXT_NOT_CONTAINS";
|
|
40
|
+
TEXT_STARTS_WITH: "TEXT_STARTS_WITH";
|
|
41
|
+
}>;
|
|
42
|
+
values: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
43
|
+
relativeDate: z.ZodOptional<z.ZodEnum<{
|
|
44
|
+
PAST_MONTH: "PAST_MONTH";
|
|
45
|
+
PAST_WEEK: "PAST_WEEK";
|
|
46
|
+
PAST_YEAR: "PAST_YEAR";
|
|
47
|
+
TODAY: "TODAY";
|
|
48
|
+
TOMORROW: "TOMORROW";
|
|
49
|
+
YESTERDAY: "YESTERDAY";
|
|
50
|
+
}>>;
|
|
51
|
+
userEnteredValue: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, z.core.$strict>>>;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
format: z.ZodObject<{
|
|
55
|
+
backgroundColorStyle: z.ZodOptional<z.ZodObject<{
|
|
56
|
+
rgbColor: z.ZodOptional<z.ZodObject<{
|
|
57
|
+
red: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
green: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
blue: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
}, z.core.$strict>>;
|
|
61
|
+
themeColor: z.ZodOptional<z.ZodEnum<{
|
|
62
|
+
ACCENT1: "ACCENT1";
|
|
63
|
+
ACCENT2: "ACCENT2";
|
|
64
|
+
ACCENT3: "ACCENT3";
|
|
65
|
+
ACCENT4: "ACCENT4";
|
|
66
|
+
ACCENT5: "ACCENT5";
|
|
67
|
+
ACCENT6: "ACCENT6";
|
|
68
|
+
BACKGROUND: "BACKGROUND";
|
|
69
|
+
LINK: "LINK";
|
|
70
|
+
TEXT: "TEXT";
|
|
71
|
+
}>>;
|
|
72
|
+
}, z.core.$strict>>;
|
|
73
|
+
textFormat: z.ZodOptional<z.ZodObject<{
|
|
74
|
+
foregroundColorStyle: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
rgbColor: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
red: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
green: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
blue: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
}, z.core.$strict>>;
|
|
80
|
+
themeColor: z.ZodOptional<z.ZodEnum<{
|
|
81
|
+
ACCENT1: "ACCENT1";
|
|
82
|
+
ACCENT2: "ACCENT2";
|
|
83
|
+
ACCENT3: "ACCENT3";
|
|
84
|
+
ACCENT4: "ACCENT4";
|
|
85
|
+
ACCENT5: "ACCENT5";
|
|
86
|
+
ACCENT6: "ACCENT6";
|
|
87
|
+
BACKGROUND: "BACKGROUND";
|
|
88
|
+
LINK: "LINK";
|
|
89
|
+
TEXT: "TEXT";
|
|
90
|
+
}>>;
|
|
91
|
+
}, z.core.$strict>>;
|
|
92
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
strikethrough: z.ZodOptional<z.ZodBoolean>;
|
|
95
|
+
}, z.core.$strict>>;
|
|
96
|
+
}, z.core.$strict>;
|
|
97
|
+
}, z.core.$strict>;
|
|
98
|
+
export type BooleanRule = z.infer<typeof BooleanRule>;
|
|
99
|
+
//# sourceMappingURL=BooleanRule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BooleanRule.d.ts","sourceRoot":"","sources":["../../../src/sheets/entities/BooleanRule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2BxB;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAOtB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BooleanCondition } from './BooleanCondition.js';
|
|
3
|
+
import { ColorStyle } from './ColorStyle.js';
|
|
4
|
+
/**
|
|
5
|
+
* The text format subset a conditional format can apply: bold, italic,
|
|
6
|
+
* strikethrough, and foreground color, per BooleanRule's documented limits.
|
|
7
|
+
*/
|
|
8
|
+
const BooleanRuleTextFormat = z.strictObject({
|
|
9
|
+
foregroundColorStyle: ColorStyle.optional().describe('The foreground color of the text.'),
|
|
10
|
+
bold: z.boolean().optional().describe('True if the text is bold.'),
|
|
11
|
+
italic: z.boolean().optional().describe('True if the text is italicized.'),
|
|
12
|
+
strikethrough: z.boolean().optional().describe('True if the text has a strikethrough.'),
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* The format subset a conditional format can apply, narrowed from CellFormat
|
|
16
|
+
* to the five properties BooleanRule documents: bold, italic, strikethrough,
|
|
17
|
+
* foreground color, and background color.
|
|
18
|
+
*/
|
|
19
|
+
const BooleanRuleFormat = z.strictObject({
|
|
20
|
+
backgroundColorStyle: ColorStyle.optional().describe('The background color of the cell.'),
|
|
21
|
+
textFormat: BooleanRuleTextFormat.optional().describe('The bold, italic, strikethrough, and foreground color of the text.'),
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* An on/off conditional format: cells matching the condition get the format,
|
|
25
|
+
* cells that stop matching lose it, with no further calls. The format is the
|
|
26
|
+
* documented conditional-formatting subset, not the full CellFormat.
|
|
27
|
+
*
|
|
28
|
+
* @see https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#BooleanRule
|
|
29
|
+
*/
|
|
30
|
+
export const BooleanRule = z.strictObject({
|
|
31
|
+
condition: BooleanCondition.describe('The condition of the rule; cells matching it get the format.'),
|
|
32
|
+
format: BooleanRuleFormat.describe('The format to apply. Conditional formatting can apply only a subset of formatting: bold, italic, strikethrough, foreground color, and background color.'),
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=BooleanRule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BooleanRule.js","sourceRoot":"","sources":["../../../src/sheets/entities/BooleanRule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,MAAM,qBAAqB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3C,oBAAoB,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACzF,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAClE,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC1E,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;CACxF,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,iBAAiB,GAAG,CAAC,CAAC,YAAY,CAAC;IACvC,oBAAoB,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACzF,UAAU,EAAE,qBAAqB,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACnD,oEAAoE,CACrE;CACF,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,YAAY,CAAC;IACxC,SAAS,EAAE,gBAAgB,CAAC,QAAQ,CAClC,8DAA8D,CAC/D;IACD,MAAM,EAAE,iBAAiB,CAAC,QAAQ,CAChC,yJAAyJ,CAC1J;CACF,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { BooleanCondition } from './BooleanCondition.js';\nimport { ColorStyle } from './ColorStyle.js';\n\n/**\n * The text format subset a conditional format can apply: bold, italic,\n * strikethrough, and foreground color, per BooleanRule's documented limits.\n */\nconst BooleanRuleTextFormat = z.strictObject({\n foregroundColorStyle: ColorStyle.optional().describe('The foreground color of the text.'),\n bold: z.boolean().optional().describe('True if the text is bold.'),\n italic: z.boolean().optional().describe('True if the text is italicized.'),\n strikethrough: z.boolean().optional().describe('True if the text has a strikethrough.'),\n});\n\n/**\n * The format subset a conditional format can apply, narrowed from CellFormat\n * to the five properties BooleanRule documents: bold, italic, strikethrough,\n * foreground color, and background color.\n */\nconst BooleanRuleFormat = z.strictObject({\n backgroundColorStyle: ColorStyle.optional().describe('The background color of the cell.'),\n textFormat: BooleanRuleTextFormat.optional().describe(\n 'The bold, italic, strikethrough, and foreground color of the text.',\n ),\n});\n\n/**\n * An on/off conditional format: cells matching the condition get the format,\n * cells that stop matching lose it, with no further calls. The format is the\n * documented conditional-formatting subset, not the full CellFormat.\n *\n * @see https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#BooleanRule\n */\nexport const BooleanRule = z.strictObject({\n condition: BooleanCondition.describe(\n 'The condition of the rule; cells matching it get the format.',\n ),\n format: BooleanRuleFormat.describe(\n 'The format to apply. Conditional formatting can apply only a subset of formatting: bold, italic, strikethrough, foreground color, and background color.',\n ),\n});\n\nexport type BooleanRule = z.infer<typeof BooleanRule>;\n"]}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* One cell's writable content: its value, note, format, and rich text runs.
|
|
4
|
+
* A curated projection of the REST `CellData`: the read-only fields
|
|
5
|
+
* (effective value and format, formatted value, hyperlink), data validation
|
|
6
|
+
* (which travels through `set_data_validation`), and pivot tables, chip
|
|
7
|
+
* runs, and data-source fields are not carried.
|
|
8
|
+
*
|
|
9
|
+
* @see https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#CellData
|
|
10
|
+
*/
|
|
11
|
+
export declare const CellData: z.ZodObject<{
|
|
12
|
+
userEnteredValue: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
stringValue: z.ZodOptional<z.ZodString>;
|
|
14
|
+
numberValue: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
boolValue: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
formulaValue: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, z.core.$strict>>;
|
|
18
|
+
note: z.ZodOptional<z.ZodString>;
|
|
19
|
+
userEnteredFormat: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
numberFormat: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
type: z.ZodEnum<{
|
|
22
|
+
CURRENCY: "CURRENCY";
|
|
23
|
+
DATE: "DATE";
|
|
24
|
+
DATE_TIME: "DATE_TIME";
|
|
25
|
+
NUMBER: "NUMBER";
|
|
26
|
+
PERCENT: "PERCENT";
|
|
27
|
+
SCIENTIFIC: "SCIENTIFIC";
|
|
28
|
+
TEXT: "TEXT";
|
|
29
|
+
TIME: "TIME";
|
|
30
|
+
}>;
|
|
31
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strict>>;
|
|
33
|
+
backgroundColorStyle: z.ZodOptional<z.ZodObject<{
|
|
34
|
+
rgbColor: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
red: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
green: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
blue: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
}, z.core.$strict>>;
|
|
39
|
+
themeColor: z.ZodOptional<z.ZodEnum<{
|
|
40
|
+
ACCENT1: "ACCENT1";
|
|
41
|
+
ACCENT2: "ACCENT2";
|
|
42
|
+
ACCENT3: "ACCENT3";
|
|
43
|
+
ACCENT4: "ACCENT4";
|
|
44
|
+
ACCENT5: "ACCENT5";
|
|
45
|
+
ACCENT6: "ACCENT6";
|
|
46
|
+
BACKGROUND: "BACKGROUND";
|
|
47
|
+
LINK: "LINK";
|
|
48
|
+
TEXT: "TEXT";
|
|
49
|
+
}>>;
|
|
50
|
+
}, z.core.$strict>>;
|
|
51
|
+
textFormat: z.ZodOptional<z.ZodObject<{
|
|
52
|
+
foregroundColorStyle: z.ZodOptional<z.ZodObject<{
|
|
53
|
+
rgbColor: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
red: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
green: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
blue: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
}, z.core.$strict>>;
|
|
58
|
+
themeColor: z.ZodOptional<z.ZodEnum<{
|
|
59
|
+
ACCENT1: "ACCENT1";
|
|
60
|
+
ACCENT2: "ACCENT2";
|
|
61
|
+
ACCENT3: "ACCENT3";
|
|
62
|
+
ACCENT4: "ACCENT4";
|
|
63
|
+
ACCENT5: "ACCENT5";
|
|
64
|
+
ACCENT6: "ACCENT6";
|
|
65
|
+
BACKGROUND: "BACKGROUND";
|
|
66
|
+
LINK: "LINK";
|
|
67
|
+
TEXT: "TEXT";
|
|
68
|
+
}>>;
|
|
69
|
+
}, z.core.$strict>>;
|
|
70
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
71
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
73
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
strikethrough: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
77
|
+
uri: z.ZodString;
|
|
78
|
+
}, z.core.$strict>>;
|
|
79
|
+
}, z.core.$strict>>;
|
|
80
|
+
horizontalAlignment: z.ZodOptional<z.ZodEnum<{
|
|
81
|
+
CENTER: "CENTER";
|
|
82
|
+
LEFT: "LEFT";
|
|
83
|
+
RIGHT: "RIGHT";
|
|
84
|
+
}>>;
|
|
85
|
+
verticalAlignment: z.ZodOptional<z.ZodEnum<{
|
|
86
|
+
BOTTOM: "BOTTOM";
|
|
87
|
+
MIDDLE: "MIDDLE";
|
|
88
|
+
TOP: "TOP";
|
|
89
|
+
}>>;
|
|
90
|
+
wrapStrategy: z.ZodOptional<z.ZodEnum<{
|
|
91
|
+
CLIP: "CLIP";
|
|
92
|
+
LEGACY_WRAP: "LEGACY_WRAP";
|
|
93
|
+
OVERFLOW_CELL: "OVERFLOW_CELL";
|
|
94
|
+
WRAP: "WRAP";
|
|
95
|
+
}>>;
|
|
96
|
+
}, z.core.$strict>>;
|
|
97
|
+
textFormatRuns: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
98
|
+
startIndex: z.ZodNumber;
|
|
99
|
+
format: z.ZodObject<{
|
|
100
|
+
foregroundColorStyle: z.ZodOptional<z.ZodObject<{
|
|
101
|
+
rgbColor: z.ZodOptional<z.ZodObject<{
|
|
102
|
+
red: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
green: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
blue: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
}, z.core.$strict>>;
|
|
106
|
+
themeColor: z.ZodOptional<z.ZodEnum<{
|
|
107
|
+
ACCENT1: "ACCENT1";
|
|
108
|
+
ACCENT2: "ACCENT2";
|
|
109
|
+
ACCENT3: "ACCENT3";
|
|
110
|
+
ACCENT4: "ACCENT4";
|
|
111
|
+
ACCENT5: "ACCENT5";
|
|
112
|
+
ACCENT6: "ACCENT6";
|
|
113
|
+
BACKGROUND: "BACKGROUND";
|
|
114
|
+
LINK: "LINK";
|
|
115
|
+
TEXT: "TEXT";
|
|
116
|
+
}>>;
|
|
117
|
+
}, z.core.$strict>>;
|
|
118
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
119
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
121
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
122
|
+
strikethrough: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
125
|
+
uri: z.ZodString;
|
|
126
|
+
}, z.core.$strict>>;
|
|
127
|
+
}, z.core.$strict>;
|
|
128
|
+
}, z.core.$strict>>>;
|
|
129
|
+
}, z.core.$strict>;
|
|
130
|
+
export type CellData = z.infer<typeof CellData>;
|
|
131
|
+
//# sourceMappingURL=CellData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CellData.d.ts","sourceRoot":"","sources":["../../../src/sheets/entities/CellData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAcnB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CellFormat } from './CellFormat.js';
|
|
3
|
+
import { ExtendedValue } from './ExtendedValue.js';
|
|
4
|
+
import { TextFormatRun } from './TextFormatRun.js';
|
|
5
|
+
/**
|
|
6
|
+
* One cell's writable content: its value, note, format, and rich text runs.
|
|
7
|
+
* A curated projection of the REST `CellData`: the read-only fields
|
|
8
|
+
* (effective value and format, formatted value, hyperlink), data validation
|
|
9
|
+
* (which travels through `set_data_validation`), and pivot tables, chip
|
|
10
|
+
* runs, and data-source fields are not carried.
|
|
11
|
+
*
|
|
12
|
+
* @see https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#CellData
|
|
13
|
+
*/
|
|
14
|
+
export const CellData = z.strictObject({
|
|
15
|
+
userEnteredValue: ExtendedValue.optional().describe('The value of the cell: at most one of stringValue, numberValue, boolValue, or formulaValue, or empty to clear the value. Writing a new value erases any previous text format runs.'),
|
|
16
|
+
note: z.string().optional().describe('A note on the cell.'),
|
|
17
|
+
userEnteredFormat: CellFormat.optional().describe('The format of the cell; only the format fields provided somewhere in the write are changed, and an untouched format field is never reset.'),
|
|
18
|
+
textFormatRuns: z
|
|
19
|
+
.array(TextFormatRun)
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("Runs of rich text over the cell's string value (per-run bold, color, font, or link, so one cell can mix formats or carry a hyperlink); new runs replace all prior runs."),
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=CellData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CellData.js","sourceRoot":"","sources":["../../../src/sheets/entities/CellData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,YAAY,CAAC;IACrC,gBAAgB,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD,oLAAoL,CACrL;IACD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IAC3D,iBAAiB,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC/C,2IAA2I,CAC5I;IACD,cAAc,EAAE,CAAC;SACd,KAAK,CAAC,aAAa,CAAC;SACpB,QAAQ,EAAE;SACV,QAAQ,CACP,yKAAyK,CAC1K;CACJ,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { CellFormat } from './CellFormat.js';\nimport { ExtendedValue } from './ExtendedValue.js';\nimport { TextFormatRun } from './TextFormatRun.js';\n\n/**\n * One cell's writable content: its value, note, format, and rich text runs.\n * A curated projection of the REST `CellData`: the read-only fields\n * (effective value and format, formatted value, hyperlink), data validation\n * (which travels through `set_data_validation`), and pivot tables, chip\n * runs, and data-source fields are not carried.\n *\n * @see https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/cells#CellData\n */\nexport const CellData = z.strictObject({\n userEnteredValue: ExtendedValue.optional().describe(\n 'The value of the cell: at most one of stringValue, numberValue, boolValue, or formulaValue, or empty to clear the value. Writing a new value erases any previous text format runs.',\n ),\n note: z.string().optional().describe('A note on the cell.'),\n userEnteredFormat: CellFormat.optional().describe(\n 'The format of the cell; only the format fields provided somewhere in the write are changed, and an untouched format field is never reset.',\n ),\n textFormatRuns: z\n .array(TextFormatRun)\n .optional()\n .describe(\n \"Runs of rich text over the cell's string value (per-run bold, color, font, or link, so one cell can mix formats or carry a hyperlink); new runs replace all prior runs.\",\n ),\n});\n\nexport type CellData = z.infer<typeof CellData>;\n"]}
|
|
@@ -64,6 +64,9 @@ export declare const CellFormat: z.ZodObject<{
|
|
|
64
64
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
65
65
|
strikethrough: z.ZodOptional<z.ZodBoolean>;
|
|
66
66
|
underline: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
68
|
+
uri: z.ZodString;
|
|
69
|
+
}, z.core.$strict>>;
|
|
67
70
|
}, z.core.$strict>>;
|
|
68
71
|
horizontalAlignment: z.ZodOptional<z.ZodEnum<{
|
|
69
72
|
CENTER: "CENTER";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CellFormat.d.ts","sourceRoot":"","sources":["../../../src/sheets/entities/CellFormat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"CellFormat.d.ts","sourceRoot":"","sources":["../../../src/sheets/entities/CellFormat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoBrB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* One value of a condition: either a literal (parsed as if typed into a
|
|
4
|
+
* cell, so formulas work) or a date relative to the current date. Provide
|
|
5
|
+
* exactly one of the two fields.
|
|
6
|
+
*
|
|
7
|
+
* @see https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#ConditionValue
|
|
8
|
+
*/
|
|
9
|
+
export declare const ConditionValue: z.ZodObject<{
|
|
10
|
+
relativeDate: z.ZodOptional<z.ZodEnum<{
|
|
11
|
+
PAST_MONTH: "PAST_MONTH";
|
|
12
|
+
PAST_WEEK: "PAST_WEEK";
|
|
13
|
+
PAST_YEAR: "PAST_YEAR";
|
|
14
|
+
TODAY: "TODAY";
|
|
15
|
+
TOMORROW: "TOMORROW";
|
|
16
|
+
YESTERDAY: "YESTERDAY";
|
|
17
|
+
}>>;
|
|
18
|
+
userEnteredValue: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
export type ConditionValue = z.infer<typeof ConditionValue>;
|
|
21
|
+
//# sourceMappingURL=ConditionValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionValue.d.ts","sourceRoot":"","sources":["../../../src/sheets/entities/ConditionValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;kBAazB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* One value of a condition: either a literal (parsed as if typed into a
|
|
4
|
+
* cell, so formulas work) or a date relative to the current date. Provide
|
|
5
|
+
* exactly one of the two fields.
|
|
6
|
+
*
|
|
7
|
+
* @see https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#ConditionValue
|
|
8
|
+
*/
|
|
9
|
+
export const ConditionValue = z.strictObject({
|
|
10
|
+
relativeDate: z
|
|
11
|
+
.enum(['PAST_YEAR', 'PAST_MONTH', 'PAST_WEEK', 'YESTERDAY', 'TODAY', 'TOMORROW'])
|
|
12
|
+
.optional()
|
|
13
|
+
.describe('A date relative to the current date; provide this or userEnteredValue, not both. Valid only with date-comparison condition types in conditional formatting and filters, never in data validation; in practice that pairs it with DATE_BEFORE and DATE_AFTER (Google documents the ON_OR variants as data-validation types).'),
|
|
14
|
+
userEnteredValue: z
|
|
15
|
+
.string()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe('A value the condition is based on; provide this or relativeDate, not both. Parsed as if the user typed it into a cell, so a value beginning with = or + becomes a live formula that executes in the sheet; do not pass untrusted text that starts with either. ONE_OF_LIST values do not support formulas.'),
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=ConditionValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionValue.js","sourceRoot":"","sources":["../../../src/sheets/entities/ConditionValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3C,YAAY,EAAE,CAAC;SACZ,IAAI,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;SAChF,QAAQ,EAAE;SACV,QAAQ,CACP,6TAA6T,CAC9T;IACH,gBAAgB,EAAE,CAAC;SAChB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,4SAA4S,CAC7S;CACJ,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * One value of a condition: either a literal (parsed as if typed into a\n * cell, so formulas work) or a date relative to the current date. Provide\n * exactly one of the two fields.\n *\n * @see https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#ConditionValue\n */\nexport const ConditionValue = z.strictObject({\n relativeDate: z\n .enum(['PAST_YEAR', 'PAST_MONTH', 'PAST_WEEK', 'YESTERDAY', 'TODAY', 'TOMORROW'])\n .optional()\n .describe(\n 'A date relative to the current date; provide this or userEnteredValue, not both. Valid only with date-comparison condition types in conditional formatting and filters, never in data validation; in practice that pairs it with DATE_BEFORE and DATE_AFTER (Google documents the ON_OR variants as data-validation types).',\n ),\n userEnteredValue: z\n .string()\n .optional()\n .describe(\n 'A value the condition is based on; provide this or relativeDate, not both. Parsed as if the user typed it into a cell, so a value beginning with = or + becomes a live formula that executes in the sheet; do not pass untrusted text that starts with either. ONE_OF_LIST values do not support formulas.',\n ),\n});\n\nexport type ConditionValue = z.infer<typeof ConditionValue>;\n"]}
|