google-mcp-suite 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/README.md +14 -9
  2. package/dist/docs/capabilities.d.ts +3 -0
  3. package/dist/docs/capabilities.d.ts.map +1 -0
  4. package/dist/docs/capabilities.js +15 -0
  5. package/dist/docs/capabilities.js.map +1 -0
  6. package/dist/docs/entities/BatchUpdateReceipt.d.ts +14 -0
  7. package/dist/docs/entities/BatchUpdateReceipt.d.ts.map +1 -0
  8. package/dist/docs/entities/BatchUpdateReceipt.js +16 -0
  9. package/dist/docs/entities/BatchUpdateReceipt.js.map +1 -0
  10. package/dist/docs/entities/Document.d.ts +31 -0
  11. package/dist/docs/entities/Document.d.ts.map +1 -0
  12. package/dist/docs/entities/Document.js +25 -0
  13. package/dist/docs/entities/Document.js.map +1 -0
  14. package/dist/docs/entities/Range.d.ts +14 -0
  15. package/dist/docs/entities/Range.d.ts.map +1 -0
  16. package/dist/docs/entities/Range.js +21 -0
  17. package/dist/docs/entities/Range.js.map +1 -0
  18. package/dist/docs/entities/StructuralElement.d.ts +25 -0
  19. package/dist/docs/entities/StructuralElement.d.ts.map +1 -0
  20. package/dist/docs/entities/StructuralElement.js +37 -0
  21. package/dist/docs/entities/StructuralElement.js.map +1 -0
  22. package/dist/docs/entities/SubstringMatchCriteria.d.ts +13 -0
  23. package/dist/docs/entities/SubstringMatchCriteria.d.ts.map +1 -0
  24. package/dist/docs/entities/SubstringMatchCriteria.js +15 -0
  25. package/dist/docs/entities/SubstringMatchCriteria.js.map +1 -0
  26. package/dist/docs/index.d.ts +3 -0
  27. package/dist/docs/index.d.ts.map +1 -0
  28. package/dist/docs/index.js +26 -0
  29. package/dist/docs/index.js.map +1 -0
  30. package/dist/docs/instructions.d.ts +2 -0
  31. package/dist/docs/instructions.d.ts.map +1 -0
  32. package/dist/docs/instructions.js +23 -0
  33. package/dist/docs/instructions.js.map +1 -0
  34. package/dist/docs/lib/batch.d.ts +16 -0
  35. package/dist/docs/lib/batch.d.ts.map +1 -0
  36. package/dist/docs/lib/batch.js +21 -0
  37. package/dist/docs/lib/batch.js.map +1 -0
  38. package/dist/docs/lib/document.d.ts +13 -0
  39. package/dist/docs/lib/document.d.ts.map +1 -0
  40. package/dist/docs/lib/document.js +58 -0
  41. package/dist/docs/lib/document.js.map +1 -0
  42. package/dist/docs/methods/create_document/handler.d.ts +5 -0
  43. package/dist/docs/methods/create_document/handler.d.ts.map +1 -0
  44. package/dist/docs/methods/create_document/handler.js +6 -0
  45. package/dist/docs/methods/create_document/handler.js.map +1 -0
  46. package/dist/docs/methods/create_document/index.d.ts +26 -0
  47. package/dist/docs/methods/create_document/index.d.ts.map +1 -0
  48. package/dist/docs/methods/create_document/index.js +21 -0
  49. package/dist/docs/methods/create_document/index.js.map +1 -0
  50. package/dist/docs/methods/create_document/schema.d.ts +30 -0
  51. package/dist/docs/methods/create_document/schema.d.ts.map +1 -0
  52. package/dist/docs/methods/create_document/schema.js +16 -0
  53. package/dist/docs/methods/create_document/schema.js.map +1 -0
  54. package/dist/docs/methods/delete_content_range/handler.d.ts +5 -0
  55. package/dist/docs/methods/delete_content_range/handler.d.ts.map +1 -0
  56. package/dist/docs/methods/delete_content_range/handler.js +8 -0
  57. package/dist/docs/methods/delete_content_range/handler.js.map +1 -0
  58. package/dist/docs/methods/delete_content_range/index.d.ts +17 -0
  59. package/dist/docs/methods/delete_content_range/index.d.ts.map +1 -0
  60. package/dist/docs/methods/delete_content_range/index.js +22 -0
  61. package/dist/docs/methods/delete_content_range/index.js.map +1 -0
  62. package/dist/docs/methods/delete_content_range/schema.d.ts +15 -0
  63. package/dist/docs/methods/delete_content_range/schema.d.ts.map +1 -0
  64. package/dist/docs/methods/delete_content_range/schema.js +11 -0
  65. package/dist/docs/methods/delete_content_range/schema.js.map +1 -0
  66. package/dist/docs/methods/get_document/handler.d.ts +5 -0
  67. package/dist/docs/methods/get_document/handler.d.ts.map +1 -0
  68. package/dist/docs/methods/get_document/handler.js +6 -0
  69. package/dist/docs/methods/get_document/handler.js.map +1 -0
  70. package/dist/docs/methods/get_document/index.d.ts +27 -0
  71. package/dist/docs/methods/get_document/index.d.ts.map +1 -0
  72. package/dist/docs/methods/get_document/index.js +22 -0
  73. package/dist/docs/methods/get_document/index.js.map +1 -0
  74. package/dist/docs/methods/get_document/schema.d.ts +25 -0
  75. package/dist/docs/methods/get_document/schema.d.ts.map +1 -0
  76. package/dist/docs/methods/get_document/schema.js +9 -0
  77. package/dist/docs/methods/get_document/schema.js.map +1 -0
  78. package/dist/docs/methods/insert_text/handler.d.ts +5 -0
  79. package/dist/docs/methods/insert_text/handler.d.ts.map +1 -0
  80. package/dist/docs/methods/insert_text/handler.js +8 -0
  81. package/dist/docs/methods/insert_text/handler.js.map +1 -0
  82. package/dist/docs/methods/insert_text/index.d.ts +10 -0
  83. package/dist/docs/methods/insert_text/index.d.ts.map +1 -0
  84. package/dist/docs/methods/insert_text/index.js +17 -0
  85. package/dist/docs/methods/insert_text/index.js.map +1 -0
  86. package/dist/docs/methods/insert_text/schema.d.ts +13 -0
  87. package/dist/docs/methods/insert_text/schema.d.ts.map +1 -0
  88. package/dist/docs/methods/insert_text/schema.js +19 -0
  89. package/dist/docs/methods/insert_text/schema.js.map +1 -0
  90. package/dist/docs/methods/registry.d.ts +82 -0
  91. package/dist/docs/methods/registry.d.ts.map +1 -0
  92. package/dist/docs/methods/registry.js +23 -0
  93. package/dist/docs/methods/registry.js.map +1 -0
  94. package/dist/docs/methods/replace_all_text/handler.d.ts +5 -0
  95. package/dist/docs/methods/replace_all_text/handler.d.ts.map +1 -0
  96. package/dist/docs/methods/replace_all_text/handler.js +16 -0
  97. package/dist/docs/methods/replace_all_text/handler.js.map +1 -0
  98. package/dist/docs/methods/replace_all_text/index.d.ts +20 -0
  99. package/dist/docs/methods/replace_all_text/index.d.ts.map +1 -0
  100. package/dist/docs/methods/replace_all_text/index.js +23 -0
  101. package/dist/docs/methods/replace_all_text/index.js.map +1 -0
  102. package/dist/docs/methods/replace_all_text/schema.d.ts +17 -0
  103. package/dist/docs/methods/replace_all_text/schema.d.ts.map +1 -0
  104. package/dist/docs/methods/replace_all_text/schema.js +19 -0
  105. package/dist/docs/methods/replace_all_text/schema.js.map +1 -0
  106. package/dist/docs/operation.d.ts +12 -0
  107. package/dist/docs/operation.d.ts.map +1 -0
  108. package/dist/docs/operation.js +10 -0
  109. package/dist/docs/operation.js.map +1 -0
  110. package/dist/doctor/services.d.ts.map +1 -1
  111. package/dist/doctor/services.js +32 -1
  112. package/dist/doctor/services.js.map +1 -1
  113. package/package.json +8 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.js","sourceRoot":"","sources":["../../../src/docs/lib/document.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,SAAS,aAAa,CAAC,SAAmC;IACxD,OAAO,CAAC,SAAS,CAAC,QAAQ,IAAI,EAAE,CAAC;SAC9B,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QACf,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;QACvC,CAAC;QACD,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC;QACjE,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/C,CAAC,CAAC;SACD,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CACtC,OAAyC;IAEzC,MAAM,IAAI,GAAG;QACX,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,SAAS;QAC3C,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,SAAS;KACxC,CAAC;IACF,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACtB,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;IAChF,CAAC;IACD,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClB,OAAO;YACL,GAAG,IAAI;YACP,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,SAAS;YACrC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,IAAI,SAAS;SAC5C,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;QACzB,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;IAC3C,CAAC;IACD,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;QAC5B,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC9C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,eAAe,CAAC,IAA6B;IAC3D,OAAO;QACL,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE;QACjC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,SAAS;QAC9B,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,SAAS;QACxC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,SAAS;KAC1F,CAAC;AACJ,CAAC","sourcesContent":["import type { docs_v1 } from '@googleapis/docs';\nimport type { Document } from '../entities/Document.js';\nimport type { StructuralElement } from '../entities/StructuralElement.js';\n\n/**\n * Concatenate a paragraph's elements into index-faithful text: text runs\n * verbatim, and every non-text element (inline object, footnote reference,\n * chip, rule, ...) as one U+FFFC placeholder per UTF-16 unit it occupies, so\n * `text.length` always equals `endIndex - startIndex` and offsets into the\n * text can be added to `startIndex` to target edits.\n */\nfunction paragraphText(paragraph: docs_v1.Schema$Paragraph): string {\n return (paragraph.elements ?? [])\n .map((element) => {\n if (element.textRun) {\n return element.textRun.content ?? '';\n }\n const span = (element.endIndex ?? 0) - (element.startIndex ?? 0);\n return span > 0 ? '\\uFFFC'.repeat(span) : '';\n })\n .join('');\n}\n\n/**\n * Project one REST structural element: indices plus kind, paragraph text, and\n * table dimensions. An element of a kind this server does not know keeps its\n * indices and drops the rest (the enum-or-drop policy applied to a\n * discriminator), so edits can still be targeted around it.\n */\nexport function projectStructuralElement(\n element: docs_v1.Schema$StructuralElement,\n): StructuralElement {\n const base = {\n startIndex: element.startIndex ?? undefined,\n endIndex: element.endIndex ?? undefined,\n };\n if (element.paragraph) {\n return { ...base, type: 'paragraph', text: paragraphText(element.paragraph) };\n }\n if (element.table) {\n return {\n ...base,\n type: 'table',\n rows: element.table.rows ?? undefined,\n columns: element.table.columns ?? undefined,\n };\n }\n if (element.sectionBreak) {\n return { ...base, type: 'sectionBreak' };\n }\n if (element.tableOfContents) {\n return { ...base, type: 'tableOfContents' };\n }\n return base;\n}\n\n/** Project a REST document onto the text-with-indices Document shape, cleaning nulls. */\nexport function projectDocument(data: docs_v1.Schema$Document): Document {\n return {\n documentId: data.documentId ?? '',\n title: data.title ?? undefined,\n revisionId: data.revisionId ?? undefined,\n content: data.body?.content ? data.body.content.map(projectStructuralElement) : undefined,\n };\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import type { docs_v1 } from '@googleapis/docs';
2
+ import type { z } from 'zod';
3
+ import type { schema } from './schema.js';
4
+ export declare function handler(docs: docs_v1.Docs, args: z.infer<typeof schema.input>): Promise<z.infer<typeof schema.output>>;
5
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/docs/methods/create_document/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,wBAAsB,OAAO,CAC3B,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,KAAK,CAAC,GACjC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAGxC"}
@@ -0,0 +1,6 @@
1
+ import { projectDocument } from '../../lib/document.js';
2
+ export async function handler(docs, args) {
3
+ const { data } = await docs.documents.create({ requestBody: { title: args.title } });
4
+ return projectDocument(data);
5
+ }
6
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/docs/methods/create_document/handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,IAAkB,EAClB,IAAkC;IAElC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACrF,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC","sourcesContent":["import type { docs_v1 } from '@googleapis/docs';\nimport type { z } from 'zod';\nimport { projectDocument } from '../../lib/document.js';\nimport type { schema } from './schema.js';\n\nexport async function handler(\n docs: docs_v1.Docs,\n args: z.infer<typeof schema.input>,\n): Promise<z.infer<typeof schema.output>> {\n const { data } = await docs.documents.create({ requestBody: { title: args.title } });\n return projectDocument(data);\n}\n"]}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The new document lands in the account's Drive root. The Docs API has no
3
+ * delete or list: removing a document is Drive's `files.delete`, outside this
4
+ * server's surface.
5
+ */
6
+ export declare const create_document: import("../../../lib/operation.js").Operation<import("@googleapis/docs").docs_v1.Docs, import("zod").ZodObject<{
7
+ title: import("zod").ZodString;
8
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
9
+ documentId: import("zod").ZodString;
10
+ title: import("zod").ZodOptional<import("zod").ZodString>;
11
+ revisionId: import("zod").ZodOptional<import("zod").ZodString>;
12
+ content: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
13
+ startIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
14
+ endIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
15
+ type: import("zod").ZodOptional<import("zod").ZodEnum<{
16
+ paragraph: "paragraph";
17
+ sectionBreak: "sectionBreak";
18
+ table: "table";
19
+ tableOfContents: "tableOfContents";
20
+ }>>;
21
+ text: import("zod").ZodOptional<import("zod").ZodString>;
22
+ rows: import("zod").ZodOptional<import("zod").ZodNumber>;
23
+ columns: import("zod").ZodOptional<import("zod").ZodNumber>;
24
+ }, import("zod/v4/core").$strip>>>;
25
+ }, import("zod/v4/core").$strip>>;
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/docs/methods/create_document/index.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;iCAY1B,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { docsOperation } from '../../operation.js';
2
+ import { handler } from './handler.js';
3
+ import { schema } from './schema.js';
4
+ /**
5
+ * The new document lands in the account's Drive root. The Docs API has no
6
+ * delete or list: removing a document is Drive's `files.delete`, outside this
7
+ * server's surface.
8
+ */
9
+ export const create_document = docsOperation({
10
+ description: 'Create a blank document with a title; returns the new document and its id. Body content is added with the editing operations.',
11
+ annotations: {
12
+ readOnlyHint: false,
13
+ destructiveHint: false,
14
+ idempotentHint: false,
15
+ openWorldHint: false,
16
+ },
17
+ source: 'https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/create',
18
+ schema,
19
+ handler,
20
+ });
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/docs/methods/create_document/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;IAC3C,WAAW,EACT,+HAA+H;IACjI,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,KAAK;QACrB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM,EAAE,qFAAqF;IAC7F,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { docsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * The new document lands in the account's Drive root. The Docs API has no\n * delete or list: removing a document is Drive's `files.delete`, outside this\n * server's surface.\n */\nexport const create_document = docsOperation({\n description:\n 'Create a blank document with a title; returns the new document and its id. Body content is added with the editing operations.',\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: false,\n },\n source: 'https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/create',\n schema,\n handler,\n});\n"]}
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * The REST body is a full Document resource, but `documents.create` uses only
4
+ * `title` and ignores everything else, including content; the input says so
5
+ * rather than accepting fields the API would drop.
6
+ */
7
+ export declare const schema: {
8
+ input: z.ZodObject<{
9
+ title: z.ZodString;
10
+ }, z.core.$strip>;
11
+ output: z.ZodObject<{
12
+ documentId: z.ZodString;
13
+ title: z.ZodOptional<z.ZodString>;
14
+ revisionId: z.ZodOptional<z.ZodString>;
15
+ content: z.ZodOptional<z.ZodArray<z.ZodObject<{
16
+ startIndex: z.ZodOptional<z.ZodNumber>;
17
+ endIndex: z.ZodOptional<z.ZodNumber>;
18
+ type: z.ZodOptional<z.ZodEnum<{
19
+ paragraph: "paragraph";
20
+ sectionBreak: "sectionBreak";
21
+ table: "table";
22
+ tableOfContents: "tableOfContents";
23
+ }>>;
24
+ text: z.ZodOptional<z.ZodString>;
25
+ rows: z.ZodOptional<z.ZodNumber>;
26
+ columns: z.ZodOptional<z.ZodNumber>;
27
+ }, z.core.$strip>>>;
28
+ }, z.core.$strip>;
29
+ };
30
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/docs/methods/create_document/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;GAIG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;CASlB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { Document } from '../../entities/Document.js';
3
+ /**
4
+ * The REST body is a full Document resource, but `documents.create` uses only
5
+ * `title` and ignores everything else, including content; the input says so
6
+ * rather than accepting fields the API would drop.
7
+ */
8
+ export const schema = {
9
+ input: z.object({
10
+ title: z
11
+ .string()
12
+ .describe('The title of the document. The API ignores any other creation fields, including content; populate the body with the editing operations.'),
13
+ }),
14
+ output: Document,
15
+ };
16
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/docs/methods/create_document/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,CACP,yIAAyI,CAC1I;KACJ,CAAC;IACF,MAAM,EAAE,QAAQ;CACjB,CAAC","sourcesContent":["import { z } from 'zod';\nimport { Document } from '../../entities/Document.js';\n\n/**\n * The REST body is a full Document resource, but `documents.create` uses only\n * `title` and ignores everything else, including content; the input says so\n * rather than accepting fields the API would drop.\n */\nexport const schema = {\n input: z.object({\n title: z\n .string()\n .describe(\n 'The title of the document. The API ignores any other creation fields, including content; populate the body with the editing operations.',\n ),\n }),\n output: Document,\n};\n"]}
@@ -0,0 +1,5 @@
1
+ import type { docs_v1 } from '@googleapis/docs';
2
+ import type { z } from 'zod';
3
+ import type { schema } from './schema.js';
4
+ export declare function handler(docs: docs_v1.Docs, args: z.infer<typeof schema.input>): Promise<z.infer<typeof schema.output>>;
5
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/docs/methods/delete_content_range/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,wBAAsB,OAAO,CAC3B,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,KAAK,CAAC,GACjC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAKxC"}
@@ -0,0 +1,8 @@
1
+ import { applyUpdate } from '../../lib/batch.js';
2
+ export async function handler(docs, args) {
3
+ const { documentId, revisionId } = await applyUpdate(docs, args.documentId, {
4
+ deleteContentRange: { range: args.range },
5
+ });
6
+ return { documentId, revisionId };
7
+ }
8
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/docs/methods/delete_content_range/handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,IAAkB,EAClB,IAAkC;IAElC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE;QAC1E,kBAAkB,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;KAC1C,CAAC,CAAC;IACH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AACpC,CAAC","sourcesContent":["import type { docs_v1 } from '@googleapis/docs';\nimport type { z } from 'zod';\nimport { applyUpdate } from '../../lib/batch.js';\nimport type { schema } from './schema.js';\n\nexport async function handler(\n docs: docs_v1.Docs,\n args: z.infer<typeof schema.input>,\n): Promise<z.infer<typeof schema.output>> {\n const { documentId, revisionId } = await applyUpdate(docs, args.documentId, {\n deleteContentRange: { range: args.range },\n });\n return { documentId, revisionId };\n}\n"]}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * One DeleteContentRangeRequest applied via `documents.batchUpdate` (the
3
+ * curated subset; issue #35). Destructive and not idempotent: indices shift
4
+ * after every edit, so repeating the same range deletes different content.
5
+ * Deleting across a paragraph boundary merges the paragraphs.
6
+ */
7
+ export declare const delete_content_range: import("../../../lib/operation.js").Operation<import("@googleapis/docs").docs_v1.Docs, import("zod").ZodObject<{
8
+ documentId: import("zod").ZodString;
9
+ range: import("zod").ZodObject<{
10
+ startIndex: import("zod").ZodNumber;
11
+ endIndex: import("zod").ZodNumber;
12
+ }, import("zod/v4/core").$strip>;
13
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
14
+ documentId: import("zod").ZodString;
15
+ revisionId: import("zod").ZodOptional<import("zod").ZodString>;
16
+ }, import("zod/v4/core").$strip>>;
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/docs/methods/delete_content_range/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;iCAa/B,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { docsOperation } from '../../operation.js';
2
+ import { handler } from './handler.js';
3
+ import { schema } from './schema.js';
4
+ /**
5
+ * One DeleteContentRangeRequest applied via `documents.batchUpdate` (the
6
+ * curated subset; issue #35). Destructive and not idempotent: indices shift
7
+ * after every edit, so repeating the same range deletes different content.
8
+ * Deleting across a paragraph boundary merges the paragraphs.
9
+ */
10
+ export const delete_content_range = docsOperation({
11
+ description: 'Delete a UTF-16 index range of document content, irreversibly; indices shift afterward, so re-read before further edits.',
12
+ annotations: {
13
+ readOnlyHint: false,
14
+ destructiveHint: true,
15
+ idempotentHint: false,
16
+ openWorldHint: false,
17
+ },
18
+ source: 'https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteContentRangeRequest',
19
+ schema,
20
+ handler,
21
+ });
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/docs/methods/delete_content_range/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAC;IAChD,WAAW,EACT,0HAA0H;IAC5H,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,IAAI;QACrB,cAAc,EAAE,KAAK;QACrB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM,EACJ,gHAAgH;IAClH,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { docsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * One DeleteContentRangeRequest applied via `documents.batchUpdate` (the\n * curated subset; issue #35). Destructive and not idempotent: indices shift\n * after every edit, so repeating the same range deletes different content.\n * Deleting across a paragraph boundary merges the paragraphs.\n */\nexport const delete_content_range = docsOperation({\n description:\n 'Delete a UTF-16 index range of document content, irreversibly; indices shift afterward, so re-read before further edits.',\n annotations: {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: false,\n },\n source:\n 'https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteContentRangeRequest',\n schema,\n handler,\n});\n"]}
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ export declare const schema: {
3
+ input: z.ZodObject<{
4
+ documentId: z.ZodString;
5
+ range: z.ZodObject<{
6
+ startIndex: z.ZodNumber;
7
+ endIndex: z.ZodNumber;
8
+ }, z.core.$strip>;
9
+ }, z.core.$strip>;
10
+ output: z.ZodObject<{
11
+ documentId: z.ZodString;
12
+ revisionId: z.ZodOptional<z.ZodString>;
13
+ }, z.core.$strip>;
14
+ };
15
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/docs/methods/delete_content_range/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,MAAM;;;;;;;;;;;;CAMlB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { BatchUpdateReceipt } from '../../entities/BatchUpdateReceipt.js';
3
+ import { Range } from '../../entities/Range.js';
4
+ export const schema = {
5
+ input: z.object({
6
+ documentId: z.string().describe('The ID of the document to update.'),
7
+ range: Range.describe('The range of content to delete.'),
8
+ }),
9
+ output: BatchUpdateReceipt,
10
+ };
11
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/docs/methods/delete_content_range/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;QACpE,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,iCAAiC,CAAC;KACzD,CAAC;IACF,MAAM,EAAE,kBAAkB;CAC3B,CAAC","sourcesContent":["import { z } from 'zod';\nimport { BatchUpdateReceipt } from '../../entities/BatchUpdateReceipt.js';\nimport { Range } from '../../entities/Range.js';\n\nexport const schema = {\n input: z.object({\n documentId: z.string().describe('The ID of the document to update.'),\n range: Range.describe('The range of content to delete.'),\n }),\n output: BatchUpdateReceipt,\n};\n"]}
@@ -0,0 +1,5 @@
1
+ import type { docs_v1 } from '@googleapis/docs';
2
+ import type { z } from 'zod';
3
+ import type { schema } from './schema.js';
4
+ export declare function handler(docs: docs_v1.Docs, args: z.infer<typeof schema.input>): Promise<z.infer<typeof schema.output>>;
5
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/docs/methods/get_document/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,wBAAsB,OAAO,CAC3B,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,KAAK,CAAC,GACjC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAGxC"}
@@ -0,0 +1,6 @@
1
+ import { projectDocument } from '../../lib/document.js';
2
+ export async function handler(docs, args) {
3
+ const { data } = await docs.documents.get({ documentId: args.documentId });
4
+ return projectDocument(data);
5
+ }
6
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/docs/methods/get_document/handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,IAAkB,EAClB,IAAkC;IAElC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IAC3E,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC","sourcesContent":["import type { docs_v1 } from '@googleapis/docs';\nimport type { z } from 'zod';\nimport { projectDocument } from '../../lib/document.js';\nimport type { schema } from './schema.js';\n\nexport async function handler(\n docs: docs_v1.Docs,\n args: z.infer<typeof schema.input>,\n): Promise<z.infer<typeof schema.output>> {\n const { data } = await docs.documents.get({ documentId: args.documentId });\n return projectDocument(data);\n}\n"]}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Text-with-indices by design: the projection carries the body's blocks as
3
+ * text plus UTF-16 index ranges, which is what edit targeting needs; the
4
+ * recursive tree (tabs, table cells, styles, suggestions) is issue #36. The
5
+ * legacy single-tab body view is served (`includeTabsContent` not exposed).
6
+ */
7
+ export declare const get_document: import("../../../lib/operation.js").Operation<import("@googleapis/docs").docs_v1.Docs, import("zod").ZodObject<{
8
+ documentId: import("zod").ZodString;
9
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
10
+ documentId: import("zod").ZodString;
11
+ title: import("zod").ZodOptional<import("zod").ZodString>;
12
+ revisionId: import("zod").ZodOptional<import("zod").ZodString>;
13
+ content: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
14
+ startIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
15
+ endIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
16
+ type: import("zod").ZodOptional<import("zod").ZodEnum<{
17
+ paragraph: "paragraph";
18
+ sectionBreak: "sectionBreak";
19
+ table: "table";
20
+ tableOfContents: "tableOfContents";
21
+ }>>;
22
+ text: import("zod").ZodOptional<import("zod").ZodString>;
23
+ rows: import("zod").ZodOptional<import("zod").ZodNumber>;
24
+ columns: import("zod").ZodOptional<import("zod").ZodNumber>;
25
+ }, import("zod/v4/core").$strip>>>;
26
+ }, import("zod/v4/core").$strip>>;
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/docs/methods/get_document/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;iCAYvB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { docsOperation } from '../../operation.js';
2
+ import { handler } from './handler.js';
3
+ import { schema } from './schema.js';
4
+ /**
5
+ * Text-with-indices by design: the projection carries the body's blocks as
6
+ * text plus UTF-16 index ranges, which is what edit targeting needs; the
7
+ * recursive tree (tabs, table cells, styles, suggestions) is issue #36. The
8
+ * legacy single-tab body view is served (`includeTabsContent` not exposed).
9
+ */
10
+ export const get_document = docsOperation({
11
+ description: 'Get a document by id: its title, revision, and body as text blocks with UTF-16 index ranges (the ranges that edits target).',
12
+ annotations: {
13
+ readOnlyHint: true,
14
+ destructiveHint: false,
15
+ idempotentHint: true,
16
+ openWorldHint: false,
17
+ },
18
+ source: 'https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get',
19
+ schema,
20
+ handler,
21
+ });
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/docs/methods/get_document/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;IACxC,WAAW,EACT,6HAA6H;IAC/H,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM,EAAE,kFAAkF;IAC1F,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { docsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Text-with-indices by design: the projection carries the body's blocks as\n * text plus UTF-16 index ranges, which is what edit targeting needs; the\n * recursive tree (tabs, table cells, styles, suggestions) is issue #36. The\n * legacy single-tab body view is served (`includeTabsContent` not exposed).\n */\nexport const get_document = docsOperation({\n description:\n 'Get a document by id: its title, revision, and body as text blocks with UTF-16 index ranges (the ranges that edits target).',\n annotations: {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n source: 'https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get',\n schema,\n handler,\n});\n"]}
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ export declare const schema: {
3
+ input: z.ZodObject<{
4
+ documentId: z.ZodString;
5
+ }, z.core.$strip>;
6
+ output: z.ZodObject<{
7
+ documentId: z.ZodString;
8
+ title: z.ZodOptional<z.ZodString>;
9
+ revisionId: z.ZodOptional<z.ZodString>;
10
+ content: z.ZodOptional<z.ZodArray<z.ZodObject<{
11
+ startIndex: z.ZodOptional<z.ZodNumber>;
12
+ endIndex: z.ZodOptional<z.ZodNumber>;
13
+ type: z.ZodOptional<z.ZodEnum<{
14
+ paragraph: "paragraph";
15
+ sectionBreak: "sectionBreak";
16
+ table: "table";
17
+ tableOfContents: "tableOfContents";
18
+ }>>;
19
+ text: z.ZodOptional<z.ZodString>;
20
+ rows: z.ZodOptional<z.ZodNumber>;
21
+ columns: z.ZodOptional<z.ZodNumber>;
22
+ }, z.core.$strip>>>;
23
+ }, z.core.$strip>;
24
+ };
25
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/docs/methods/get_document/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;CAKlB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ import { Document } from '../../entities/Document.js';
3
+ export const schema = {
4
+ input: z.object({
5
+ documentId: z.string().describe('The ID of the document to retrieve.'),
6
+ }),
7
+ output: Document,
8
+ };
9
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/docs/methods/get_document/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;KACvE,CAAC;IACF,MAAM,EAAE,QAAQ;CACjB,CAAC","sourcesContent":["import { z } from 'zod';\nimport { Document } from '../../entities/Document.js';\n\nexport const schema = {\n input: z.object({\n documentId: z.string().describe('The ID of the document to retrieve.'),\n }),\n output: Document,\n};\n"]}
@@ -0,0 +1,5 @@
1
+ import type { docs_v1 } from '@googleapis/docs';
2
+ import type { z } from 'zod';
3
+ import type { schema } from './schema.js';
4
+ export declare function handler(docs: docs_v1.Docs, args: z.infer<typeof schema.input>): Promise<z.infer<typeof schema.output>>;
5
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/docs/methods/insert_text/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,wBAAsB,OAAO,CAC3B,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,KAAK,CAAC,GACjC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CASxC"}
@@ -0,0 +1,8 @@
1
+ import { applyUpdate } from '../../lib/batch.js';
2
+ export async function handler(docs, args) {
3
+ const { documentId, revisionId } = await applyUpdate(docs, args.documentId, args.index === undefined
4
+ ? { insertText: { endOfSegmentLocation: {}, text: args.text } }
5
+ : { insertText: { location: { index: args.index }, text: args.text } });
6
+ return { documentId, revisionId };
7
+ }
8
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/docs/methods/insert_text/handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,IAAkB,EAClB,IAAkC;IAElC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,MAAM,WAAW,CAClD,IAAI,EACJ,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,KAAK,KAAK,SAAS;QACtB,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,oBAAoB,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE;QAC/D,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,CACzE,CAAC;IACF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AACpC,CAAC","sourcesContent":["import type { docs_v1 } from '@googleapis/docs';\nimport type { z } from 'zod';\nimport { applyUpdate } from '../../lib/batch.js';\nimport type { schema } from './schema.js';\n\nexport async function handler(\n docs: docs_v1.Docs,\n args: z.infer<typeof schema.input>,\n): Promise<z.infer<typeof schema.output>> {\n const { documentId, revisionId } = await applyUpdate(\n docs,\n args.documentId,\n args.index === undefined\n ? { insertText: { endOfSegmentLocation: {}, text: args.text } }\n : { insertText: { location: { index: args.index }, text: args.text } },\n );\n return { documentId, revisionId };\n}\n"]}
@@ -0,0 +1,10 @@
1
+ /** One InsertTextRequest applied via `documents.batchUpdate` (the curated subset; issue #35). */
2
+ export declare const insert_text: import("../../../lib/operation.js").Operation<import("@googleapis/docs").docs_v1.Docs, import("zod").ZodObject<{
3
+ documentId: import("zod").ZodString;
4
+ text: import("zod").ZodString;
5
+ index: import("zod").ZodOptional<import("zod").ZodNumber>;
6
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
7
+ documentId: import("zod").ZodString;
8
+ revisionId: import("zod").ZodOptional<import("zod").ZodString>;
9
+ }, import("zod/v4/core").$strip>>;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/docs/methods/insert_text/index.ts"],"names":[],"mappings":"AAIA,iGAAiG;AACjG,eAAO,MAAM,WAAW;;;;;;;iCAatB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { docsOperation } from '../../operation.js';
2
+ import { handler } from './handler.js';
3
+ import { schema } from './schema.js';
4
+ /** One InsertTextRequest applied via `documents.batchUpdate` (the curated subset; issue #35). */
5
+ export const insert_text = docsOperation({
6
+ description: 'Insert text into a document body, at a UTF-16 index or (omitted) appended at the end.',
7
+ annotations: {
8
+ readOnlyHint: false,
9
+ destructiveHint: false,
10
+ idempotentHint: false,
11
+ openWorldHint: false,
12
+ },
13
+ source: 'https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertTextRequest',
14
+ schema,
15
+ handler,
16
+ });
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/docs/methods/insert_text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,iGAAiG;AACjG,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;IACvC,WAAW,EACT,uFAAuF;IACzF,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,KAAK;QACrB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM,EACJ,wGAAwG;IAC1G,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { docsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/** One InsertTextRequest applied via `documents.batchUpdate` (the curated subset; issue #35). */\nexport const insert_text = docsOperation({\n description:\n 'Insert text into a document body, at a UTF-16 index or (omitted) appended at the end.',\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: false,\n },\n source:\n 'https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertTextRequest',\n schema,\n handler,\n});\n"]}
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ export declare const schema: {
3
+ input: z.ZodObject<{
4
+ documentId: z.ZodString;
5
+ text: z.ZodString;
6
+ index: z.ZodOptional<z.ZodNumber>;
7
+ }, z.core.$strip>;
8
+ output: z.ZodObject<{
9
+ documentId: z.ZodString;
10
+ revisionId: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strip>;
12
+ };
13
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/docs/methods/insert_text/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;;;;;;;;;;CAmBlB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ import { BatchUpdateReceipt } from '../../entities/BatchUpdateReceipt.js';
3
+ export const schema = {
4
+ input: z.object({
5
+ documentId: z.string().describe('The ID of the document to update.'),
6
+ text: z
7
+ .string()
8
+ .min(1)
9
+ .describe('The text to insert. A newline character implicitly creates a new paragraph at that position.'),
10
+ index: z
11
+ .number()
12
+ .int()
13
+ .min(1)
14
+ .optional()
15
+ .describe("The zero-based UTF-16 index to insert at, inside an existing paragraph's bounds (body content starts at index 1). Omitted, the text is appended at the end of the body. Indices shift on every edit; re-read the document before computing them."),
16
+ }),
17
+ output: BatchUpdateReceipt,
18
+ };
19
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/docs/methods/insert_text/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;QACpE,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CACP,8FAA8F,CAC/F;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CACP,kPAAkP,CACnP;KACJ,CAAC;IACF,MAAM,EAAE,kBAAkB;CAC3B,CAAC","sourcesContent":["import { z } from 'zod';\nimport { BatchUpdateReceipt } from '../../entities/BatchUpdateReceipt.js';\n\nexport const schema = {\n input: z.object({\n documentId: z.string().describe('The ID of the document to update.'),\n text: z\n .string()\n .min(1)\n .describe(\n 'The text to insert. A newline character implicitly creates a new paragraph at that position.',\n ),\n index: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\n \"The zero-based UTF-16 index to insert at, inside an existing paragraph's bounds (body content starts at index 1). Omitted, the text is appended at the end of the body. Indices shift on every edit; re-read the document before computing them.\",\n ),\n }),\n output: BatchUpdateReceipt,\n};\n"]}
@@ -0,0 +1,82 @@
1
+ import type { docs_v1 } from '@googleapis/docs';
2
+ /**
3
+ * REST-sourced operations, from
4
+ * `developers.google.com/workspace/docs/api/reference/rest`. Google publishes
5
+ * no MCP toolset for Docs, so there is no `tools/` folder and this registry is
6
+ * the service's whole wire surface. The three text-editing operations each
7
+ * wrap `documents.batchUpdate` with exactly one request type; the rest of the
8
+ * 40-variant union is issue #35.
9
+ */
10
+ export declare const methods: {
11
+ get_document: import("../../lib/operation.js").Operation<docs_v1.Docs, import("zod").ZodObject<{
12
+ documentId: import("zod").ZodString;
13
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
14
+ documentId: import("zod").ZodString;
15
+ title: import("zod").ZodOptional<import("zod").ZodString>;
16
+ revisionId: import("zod").ZodOptional<import("zod").ZodString>;
17
+ content: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
18
+ startIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
19
+ endIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
20
+ type: import("zod").ZodOptional<import("zod").ZodEnum<{
21
+ paragraph: "paragraph";
22
+ sectionBreak: "sectionBreak";
23
+ table: "table";
24
+ tableOfContents: "tableOfContents";
25
+ }>>;
26
+ text: import("zod").ZodOptional<import("zod").ZodString>;
27
+ rows: import("zod").ZodOptional<import("zod").ZodNumber>;
28
+ columns: import("zod").ZodOptional<import("zod").ZodNumber>;
29
+ }, import("zod/v4/core").$strip>>>;
30
+ }, import("zod/v4/core").$strip>>;
31
+ create_document: import("../../lib/operation.js").Operation<docs_v1.Docs, import("zod").ZodObject<{
32
+ title: import("zod").ZodString;
33
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
34
+ documentId: import("zod").ZodString;
35
+ title: import("zod").ZodOptional<import("zod").ZodString>;
36
+ revisionId: import("zod").ZodOptional<import("zod").ZodString>;
37
+ content: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
38
+ startIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
39
+ endIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
40
+ type: import("zod").ZodOptional<import("zod").ZodEnum<{
41
+ paragraph: "paragraph";
42
+ sectionBreak: "sectionBreak";
43
+ table: "table";
44
+ tableOfContents: "tableOfContents";
45
+ }>>;
46
+ text: import("zod").ZodOptional<import("zod").ZodString>;
47
+ rows: import("zod").ZodOptional<import("zod").ZodNumber>;
48
+ columns: import("zod").ZodOptional<import("zod").ZodNumber>;
49
+ }, import("zod/v4/core").$strip>>>;
50
+ }, import("zod/v4/core").$strip>>;
51
+ insert_text: import("../../lib/operation.js").Operation<docs_v1.Docs, import("zod").ZodObject<{
52
+ documentId: import("zod").ZodString;
53
+ text: import("zod").ZodString;
54
+ index: import("zod").ZodOptional<import("zod").ZodNumber>;
55
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
56
+ documentId: import("zod").ZodString;
57
+ revisionId: import("zod").ZodOptional<import("zod").ZodString>;
58
+ }, import("zod/v4/core").$strip>>;
59
+ replace_all_text: import("../../lib/operation.js").Operation<docs_v1.Docs, import("zod").ZodObject<{
60
+ documentId: import("zod").ZodString;
61
+ containsText: import("zod").ZodObject<{
62
+ text: import("zod").ZodString;
63
+ matchCase: import("zod").ZodOptional<import("zod").ZodBoolean>;
64
+ }, import("zod/v4/core").$strip>;
65
+ replaceText: import("zod").ZodString;
66
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
67
+ documentId: import("zod").ZodString;
68
+ revisionId: import("zod").ZodOptional<import("zod").ZodString>;
69
+ occurrencesChanged: import("zod").ZodNumber;
70
+ }, import("zod/v4/core").$strip>>;
71
+ delete_content_range: import("../../lib/operation.js").Operation<docs_v1.Docs, import("zod").ZodObject<{
72
+ documentId: import("zod").ZodString;
73
+ range: import("zod").ZodObject<{
74
+ startIndex: import("zod").ZodNumber;
75
+ endIndex: import("zod").ZodNumber;
76
+ }, import("zod/v4/core").$strip>;
77
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
78
+ documentId: import("zod").ZodString;
79
+ revisionId: import("zod").ZodOptional<import("zod").ZodString>;
80
+ }, import("zod/v4/core").$strip>>;
81
+ };
82
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/docs/methods/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAQhD;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQkC,CAAC"}