google-mcp-suite 1.4.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -9
- package/dist/docs/capabilities.d.ts +3 -0
- package/dist/docs/capabilities.d.ts.map +1 -0
- package/dist/docs/capabilities.js +15 -0
- package/dist/docs/capabilities.js.map +1 -0
- package/dist/docs/entities/BatchUpdateReceipt.d.ts +14 -0
- package/dist/docs/entities/BatchUpdateReceipt.d.ts.map +1 -0
- package/dist/docs/entities/BatchUpdateReceipt.js +16 -0
- package/dist/docs/entities/BatchUpdateReceipt.js.map +1 -0
- package/dist/docs/entities/Document.d.ts +31 -0
- package/dist/docs/entities/Document.d.ts.map +1 -0
- package/dist/docs/entities/Document.js +25 -0
- package/dist/docs/entities/Document.js.map +1 -0
- package/dist/docs/entities/ParagraphStyle.d.ts +33 -0
- package/dist/docs/entities/ParagraphStyle.d.ts.map +1 -0
- package/dist/docs/entities/ParagraphStyle.js +37 -0
- package/dist/docs/entities/ParagraphStyle.js.map +1 -0
- package/dist/docs/entities/Range.d.ts +14 -0
- package/dist/docs/entities/Range.d.ts.map +1 -0
- package/dist/docs/entities/Range.js +21 -0
- package/dist/docs/entities/Range.js.map +1 -0
- package/dist/docs/entities/StructuralElement.d.ts +25 -0
- package/dist/docs/entities/StructuralElement.d.ts.map +1 -0
- package/dist/docs/entities/StructuralElement.js +37 -0
- package/dist/docs/entities/StructuralElement.js.map +1 -0
- package/dist/docs/entities/SubstringMatchCriteria.d.ts +13 -0
- package/dist/docs/entities/SubstringMatchCriteria.d.ts.map +1 -0
- package/dist/docs/entities/SubstringMatchCriteria.js +15 -0
- package/dist/docs/entities/SubstringMatchCriteria.js.map +1 -0
- package/dist/docs/entities/TextStyle.d.ts +29 -0
- package/dist/docs/entities/TextStyle.d.ts.map +1 -0
- package/dist/docs/entities/TextStyle.js +32 -0
- package/dist/docs/entities/TextStyle.js.map +1 -0
- package/dist/docs/index.d.ts +3 -0
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +26 -0
- package/dist/docs/index.js.map +1 -0
- package/dist/docs/instructions.d.ts +2 -0
- package/dist/docs/instructions.d.ts.map +1 -0
- package/dist/docs/instructions.js +27 -0
- package/dist/docs/instructions.js.map +1 -0
- package/dist/docs/lib/batch.d.ts +16 -0
- package/dist/docs/lib/batch.d.ts.map +1 -0
- package/dist/docs/lib/batch.js +21 -0
- package/dist/docs/lib/batch.js.map +1 -0
- package/dist/docs/lib/document.d.ts +13 -0
- package/dist/docs/lib/document.d.ts.map +1 -0
- package/dist/docs/lib/document.js +58 -0
- package/dist/docs/lib/document.js.map +1 -0
- package/dist/docs/methods/create_document/handler.d.ts +5 -0
- package/dist/docs/methods/create_document/handler.d.ts.map +1 -0
- package/dist/docs/methods/create_document/handler.js +6 -0
- package/dist/docs/methods/create_document/handler.js.map +1 -0
- package/dist/docs/methods/create_document/index.d.ts +26 -0
- package/dist/docs/methods/create_document/index.d.ts.map +1 -0
- package/dist/docs/methods/create_document/index.js +21 -0
- package/dist/docs/methods/create_document/index.js.map +1 -0
- package/dist/docs/methods/create_document/schema.d.ts +30 -0
- package/dist/docs/methods/create_document/schema.d.ts.map +1 -0
- package/dist/docs/methods/create_document/schema.js +16 -0
- package/dist/docs/methods/create_document/schema.js.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/handler.d.ts +5 -0
- package/dist/docs/methods/create_paragraph_bullets/handler.d.ts.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/handler.js +8 -0
- package/dist/docs/methods/create_paragraph_bullets/handler.js.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/index.d.ts +35 -0
- package/dist/docs/methods/create_paragraph_bullets/index.d.ts.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/index.js +23 -0
- package/dist/docs/methods/create_paragraph_bullets/index.js.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/schema.d.ts +32 -0
- package/dist/docs/methods/create_paragraph_bullets/schema.d.ts.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/schema.js +30 -0
- package/dist/docs/methods/create_paragraph_bullets/schema.js.map +1 -0
- package/dist/docs/methods/delete_content_range/handler.d.ts +5 -0
- package/dist/docs/methods/delete_content_range/handler.d.ts.map +1 -0
- package/dist/docs/methods/delete_content_range/handler.js +8 -0
- package/dist/docs/methods/delete_content_range/handler.js.map +1 -0
- package/dist/docs/methods/delete_content_range/index.d.ts +17 -0
- package/dist/docs/methods/delete_content_range/index.d.ts.map +1 -0
- package/dist/docs/methods/delete_content_range/index.js +22 -0
- package/dist/docs/methods/delete_content_range/index.js.map +1 -0
- package/dist/docs/methods/delete_content_range/schema.d.ts +15 -0
- package/dist/docs/methods/delete_content_range/schema.d.ts.map +1 -0
- package/dist/docs/methods/delete_content_range/schema.js +11 -0
- package/dist/docs/methods/delete_content_range/schema.js.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/handler.d.ts +5 -0
- package/dist/docs/methods/delete_paragraph_bullets/handler.d.ts.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/handler.js +8 -0
- package/dist/docs/methods/delete_paragraph_bullets/handler.js.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/index.d.ts +18 -0
- package/dist/docs/methods/delete_paragraph_bullets/index.d.ts.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/index.js +23 -0
- package/dist/docs/methods/delete_paragraph_bullets/index.js.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/schema.d.ts +15 -0
- package/dist/docs/methods/delete_paragraph_bullets/schema.d.ts.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/schema.js +11 -0
- package/dist/docs/methods/delete_paragraph_bullets/schema.js.map +1 -0
- package/dist/docs/methods/get_document/handler.d.ts +5 -0
- package/dist/docs/methods/get_document/handler.d.ts.map +1 -0
- package/dist/docs/methods/get_document/handler.js +6 -0
- package/dist/docs/methods/get_document/handler.js.map +1 -0
- package/dist/docs/methods/get_document/index.d.ts +27 -0
- package/dist/docs/methods/get_document/index.d.ts.map +1 -0
- package/dist/docs/methods/get_document/index.js +22 -0
- package/dist/docs/methods/get_document/index.js.map +1 -0
- package/dist/docs/methods/get_document/schema.d.ts +25 -0
- package/dist/docs/methods/get_document/schema.d.ts.map +1 -0
- package/dist/docs/methods/get_document/schema.js +9 -0
- package/dist/docs/methods/get_document/schema.js.map +1 -0
- package/dist/docs/methods/insert_text/handler.d.ts +5 -0
- package/dist/docs/methods/insert_text/handler.d.ts.map +1 -0
- package/dist/docs/methods/insert_text/handler.js +8 -0
- package/dist/docs/methods/insert_text/handler.js.map +1 -0
- package/dist/docs/methods/insert_text/index.d.ts +10 -0
- package/dist/docs/methods/insert_text/index.d.ts.map +1 -0
- package/dist/docs/methods/insert_text/index.js +17 -0
- package/dist/docs/methods/insert_text/index.js.map +1 -0
- package/dist/docs/methods/insert_text/schema.d.ts +13 -0
- package/dist/docs/methods/insert_text/schema.d.ts.map +1 -0
- package/dist/docs/methods/insert_text/schema.js +19 -0
- package/dist/docs/methods/insert_text/schema.js.map +1 -0
- package/dist/docs/methods/registry.d.ts +175 -0
- package/dist/docs/methods/registry.d.ts.map +1 -0
- package/dist/docs/methods/registry.js +32 -0
- package/dist/docs/methods/registry.js.map +1 -0
- package/dist/docs/methods/replace_all_text/handler.d.ts +5 -0
- package/dist/docs/methods/replace_all_text/handler.d.ts.map +1 -0
- package/dist/docs/methods/replace_all_text/handler.js +16 -0
- package/dist/docs/methods/replace_all_text/handler.js.map +1 -0
- package/dist/docs/methods/replace_all_text/index.d.ts +20 -0
- package/dist/docs/methods/replace_all_text/index.d.ts.map +1 -0
- package/dist/docs/methods/replace_all_text/index.js +23 -0
- package/dist/docs/methods/replace_all_text/index.js.map +1 -0
- package/dist/docs/methods/replace_all_text/schema.d.ts +17 -0
- package/dist/docs/methods/replace_all_text/schema.d.ts.map +1 -0
- package/dist/docs/methods/replace_all_text/schema.js +19 -0
- package/dist/docs/methods/replace_all_text/schema.js.map +1 -0
- package/dist/docs/methods/update_paragraph_style/handler.d.ts +5 -0
- package/dist/docs/methods/update_paragraph_style/handler.d.ts.map +1 -0
- package/dist/docs/methods/update_paragraph_style/handler.js +16 -0
- package/dist/docs/methods/update_paragraph_style/handler.js.map +1 -0
- package/dist/docs/methods/update_paragraph_style/index.d.ts +37 -0
- package/dist/docs/methods/update_paragraph_style/index.d.ts.map +1 -0
- package/dist/docs/methods/update_paragraph_style/index.js +22 -0
- package/dist/docs/methods/update_paragraph_style/index.js.map +1 -0
- package/dist/docs/methods/update_paragraph_style/schema.d.ts +35 -0
- package/dist/docs/methods/update_paragraph_style/schema.d.ts.map +1 -0
- package/dist/docs/methods/update_paragraph_style/schema.js +15 -0
- package/dist/docs/methods/update_paragraph_style/schema.js.map +1 -0
- package/dist/docs/methods/update_text_style/handler.d.ts +5 -0
- package/dist/docs/methods/update_text_style/handler.d.ts.map +1 -0
- package/dist/docs/methods/update_text_style/handler.js +26 -0
- package/dist/docs/methods/update_text_style/handler.js.map +1 -0
- package/dist/docs/methods/update_text_style/index.d.ts +32 -0
- package/dist/docs/methods/update_text_style/index.d.ts.map +1 -0
- package/dist/docs/methods/update_text_style/index.js +21 -0
- package/dist/docs/methods/update_text_style/index.js.map +1 -0
- package/dist/docs/methods/update_text_style/schema.d.ts +31 -0
- package/dist/docs/methods/update_text_style/schema.d.ts.map +1 -0
- package/dist/docs/methods/update_text_style/schema.js +15 -0
- package/dist/docs/methods/update_text_style/schema.js.map +1 -0
- package/dist/docs/operation.d.ts +12 -0
- package/dist/docs/operation.d.ts.map +1 -0
- package/dist/docs/operation.js +10 -0
- package/dist/docs/operation.js.map +1 -0
- package/dist/doctor/services.d.ts.map +1 -1
- package/dist/doctor/services.js +32 -1
- package/dist/doctor/services.js.map +1 -1
- package/package.json +8 -3
|
@@ -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_paragraph_bullets/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
|
+
deleteParagraphBullets: { 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_paragraph_bullets/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,sBAAsB,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;KAC9C,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 deleteParagraphBullets: { range: args.range },\n });\n return { documentId, revisionId };\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One DeleteParagraphBulletsRequest applied via `documents.batchUpdate` (the
|
|
3
|
+
* curated subset; issue #35). A removal, so destructive per the rubric
|
|
4
|
+
* (Google's unlabel precedent: reversible removals still count), and
|
|
5
|
+
* idempotent: bullets occupy no body indices, the text is preserved, and a
|
|
6
|
+
* repeat on unbulleted paragraphs is a no-op.
|
|
7
|
+
*/
|
|
8
|
+
export declare const delete_paragraph_bullets: import("../../../lib/operation.js").Operation<import("@googleapis/docs").docs_v1.Docs, import("zod").ZodObject<{
|
|
9
|
+
documentId: import("zod").ZodString;
|
|
10
|
+
range: import("zod").ZodObject<{
|
|
11
|
+
startIndex: import("zod").ZodNumber;
|
|
12
|
+
endIndex: import("zod").ZodNumber;
|
|
13
|
+
}, import("zod/v4/core").$strip>;
|
|
14
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
15
|
+
documentId: import("zod").ZodString;
|
|
16
|
+
revisionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
|
+
}, import("zod/v4/core").$strip>>;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/docs/methods/delete_paragraph_bullets/index.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;iCAanC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { docsOperation } from '../../operation.js';
|
|
2
|
+
import { handler } from './handler.js';
|
|
3
|
+
import { schema } from './schema.js';
|
|
4
|
+
/**
|
|
5
|
+
* One DeleteParagraphBulletsRequest applied via `documents.batchUpdate` (the
|
|
6
|
+
* curated subset; issue #35). A removal, so destructive per the rubric
|
|
7
|
+
* (Google's unlabel precedent: reversible removals still count), and
|
|
8
|
+
* idempotent: bullets occupy no body indices, the text is preserved, and a
|
|
9
|
+
* repeat on unbulleted paragraphs is a no-op.
|
|
10
|
+
*/
|
|
11
|
+
export const delete_paragraph_bullets = docsOperation({
|
|
12
|
+
description: 'Remove bullets from the paragraphs a range overlaps; the text is preserved and the paragraphs leave their list.',
|
|
13
|
+
annotations: {
|
|
14
|
+
readOnlyHint: false,
|
|
15
|
+
destructiveHint: true,
|
|
16
|
+
idempotentHint: true,
|
|
17
|
+
openWorldHint: false,
|
|
18
|
+
},
|
|
19
|
+
source: 'https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteParagraphBulletsRequest',
|
|
20
|
+
schema,
|
|
21
|
+
handler,
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/docs/methods/delete_paragraph_bullets/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;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,aAAa,CAAC;IACpD,WAAW,EACT,iHAAiH;IACnH,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,IAAI;QACrB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM,EACJ,oHAAoH;IACtH,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 DeleteParagraphBulletsRequest applied via `documents.batchUpdate` (the\n * curated subset; issue #35). A removal, so destructive per the rubric\n * (Google's unlabel precedent: reversible removals still count), and\n * idempotent: bullets occupy no body indices, the text is preserved, and a\n * repeat on unbulleted paragraphs is a no-op.\n */\nexport const delete_paragraph_bullets = docsOperation({\n description:\n 'Remove bullets from the paragraphs a range overlaps; the text is preserved and the paragraphs leave their list.',\n annotations: {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: true,\n openWorldHint: false,\n },\n source:\n 'https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteParagraphBulletsRequest',\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_paragraph_bullets/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 to delete bullets from.'),
|
|
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_paragraph_bullets/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,mCAAmC,CAAC;KAC3D,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 to delete bullets from.'),\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 @@
|
|
|
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,175 @@
|
|
|
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 curated editing and styling
|
|
7
|
+
* operations each wrap `documents.batchUpdate` with exactly one request type;
|
|
8
|
+
* the rest of the 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
|
+
update_text_style: import("../../lib/operation.js").Operation<docs_v1.Docs, import("zod").ZodObject<{
|
|
82
|
+
documentId: import("zod").ZodString;
|
|
83
|
+
range: import("zod").ZodObject<{
|
|
84
|
+
startIndex: import("zod").ZodNumber;
|
|
85
|
+
endIndex: import("zod").ZodNumber;
|
|
86
|
+
}, import("zod/v4/core").$strip>;
|
|
87
|
+
textStyle: import("zod").ZodObject<{
|
|
88
|
+
bold: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
89
|
+
italic: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
90
|
+
underline: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
91
|
+
strikethrough: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
92
|
+
smallCaps: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
93
|
+
baselineOffset: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
94
|
+
NONE: "NONE";
|
|
95
|
+
SUPERSCRIPT: "SUPERSCRIPT";
|
|
96
|
+
SUBSCRIPT: "SUBSCRIPT";
|
|
97
|
+
}>>;
|
|
98
|
+
fontSize: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
99
|
+
link: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
100
|
+
url: import("zod").ZodString;
|
|
101
|
+
}, import("zod/v4/core").$strip>>;
|
|
102
|
+
}, import("zod/v4/core").$strip>;
|
|
103
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
104
|
+
documentId: import("zod").ZodString;
|
|
105
|
+
revisionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
106
|
+
}, import("zod/v4/core").$strip>>;
|
|
107
|
+
update_paragraph_style: import("../../lib/operation.js").Operation<docs_v1.Docs, import("zod").ZodObject<{
|
|
108
|
+
documentId: import("zod").ZodString;
|
|
109
|
+
range: import("zod").ZodObject<{
|
|
110
|
+
startIndex: import("zod").ZodNumber;
|
|
111
|
+
endIndex: import("zod").ZodNumber;
|
|
112
|
+
}, import("zod/v4/core").$strip>;
|
|
113
|
+
paragraphStyle: import("zod").ZodObject<{
|
|
114
|
+
namedStyleType: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
115
|
+
NORMAL_TEXT: "NORMAL_TEXT";
|
|
116
|
+
TITLE: "TITLE";
|
|
117
|
+
SUBTITLE: "SUBTITLE";
|
|
118
|
+
HEADING_1: "HEADING_1";
|
|
119
|
+
HEADING_2: "HEADING_2";
|
|
120
|
+
HEADING_3: "HEADING_3";
|
|
121
|
+
HEADING_4: "HEADING_4";
|
|
122
|
+
HEADING_5: "HEADING_5";
|
|
123
|
+
HEADING_6: "HEADING_6";
|
|
124
|
+
}>>;
|
|
125
|
+
alignment: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
126
|
+
START: "START";
|
|
127
|
+
CENTER: "CENTER";
|
|
128
|
+
END: "END";
|
|
129
|
+
JUSTIFIED: "JUSTIFIED";
|
|
130
|
+
}>>;
|
|
131
|
+
lineSpacing: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
132
|
+
}, import("zod/v4/core").$strip>;
|
|
133
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
134
|
+
documentId: import("zod").ZodString;
|
|
135
|
+
revisionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
136
|
+
}, import("zod/v4/core").$strip>>;
|
|
137
|
+
create_paragraph_bullets: import("../../lib/operation.js").Operation<docs_v1.Docs, import("zod").ZodObject<{
|
|
138
|
+
documentId: import("zod").ZodString;
|
|
139
|
+
range: import("zod").ZodObject<{
|
|
140
|
+
startIndex: import("zod").ZodNumber;
|
|
141
|
+
endIndex: import("zod").ZodNumber;
|
|
142
|
+
}, import("zod/v4/core").$strip>;
|
|
143
|
+
bulletPreset: import("zod").ZodEnum<{
|
|
144
|
+
BULLET_DISC_CIRCLE_SQUARE: "BULLET_DISC_CIRCLE_SQUARE";
|
|
145
|
+
BULLET_DIAMONDX_ARROW3D_SQUARE: "BULLET_DIAMONDX_ARROW3D_SQUARE";
|
|
146
|
+
BULLET_CHECKBOX: "BULLET_CHECKBOX";
|
|
147
|
+
BULLET_ARROW_DIAMOND_DISC: "BULLET_ARROW_DIAMOND_DISC";
|
|
148
|
+
BULLET_STAR_CIRCLE_SQUARE: "BULLET_STAR_CIRCLE_SQUARE";
|
|
149
|
+
BULLET_ARROW3D_CIRCLE_SQUARE: "BULLET_ARROW3D_CIRCLE_SQUARE";
|
|
150
|
+
BULLET_LEFTTRIANGLE_DIAMOND_DISC: "BULLET_LEFTTRIANGLE_DIAMOND_DISC";
|
|
151
|
+
BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE: "BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE";
|
|
152
|
+
BULLET_DIAMOND_CIRCLE_SQUARE: "BULLET_DIAMOND_CIRCLE_SQUARE";
|
|
153
|
+
NUMBERED_DECIMAL_ALPHA_ROMAN: "NUMBERED_DECIMAL_ALPHA_ROMAN";
|
|
154
|
+
NUMBERED_DECIMAL_ALPHA_ROMAN_PARENS: "NUMBERED_DECIMAL_ALPHA_ROMAN_PARENS";
|
|
155
|
+
NUMBERED_DECIMAL_NESTED: "NUMBERED_DECIMAL_NESTED";
|
|
156
|
+
NUMBERED_UPPERALPHA_ALPHA_ROMAN: "NUMBERED_UPPERALPHA_ALPHA_ROMAN";
|
|
157
|
+
NUMBERED_UPPERROMAN_UPPERALPHA_DECIMAL: "NUMBERED_UPPERROMAN_UPPERALPHA_DECIMAL";
|
|
158
|
+
NUMBERED_ZERODECIMAL_ALPHA_ROMAN: "NUMBERED_ZERODECIMAL_ALPHA_ROMAN";
|
|
159
|
+
}>;
|
|
160
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
161
|
+
documentId: import("zod").ZodString;
|
|
162
|
+
revisionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
163
|
+
}, import("zod/v4/core").$strip>>;
|
|
164
|
+
delete_paragraph_bullets: import("../../lib/operation.js").Operation<docs_v1.Docs, import("zod").ZodObject<{
|
|
165
|
+
documentId: import("zod").ZodString;
|
|
166
|
+
range: import("zod").ZodObject<{
|
|
167
|
+
startIndex: import("zod").ZodNumber;
|
|
168
|
+
endIndex: import("zod").ZodNumber;
|
|
169
|
+
}, import("zod/v4/core").$strip>;
|
|
170
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
171
|
+
documentId: import("zod").ZodString;
|
|
172
|
+
revisionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
173
|
+
}, import("zod/v4/core").$strip>>;
|
|
174
|
+
};
|
|
175
|
+
//# 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;AAYhD;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAakC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { create_document } from './create_document/index.js';
|
|
2
|
+
import { create_paragraph_bullets } from './create_paragraph_bullets/index.js';
|
|
3
|
+
import { delete_content_range } from './delete_content_range/index.js';
|
|
4
|
+
import { delete_paragraph_bullets } from './delete_paragraph_bullets/index.js';
|
|
5
|
+
import { get_document } from './get_document/index.js';
|
|
6
|
+
import { insert_text } from './insert_text/index.js';
|
|
7
|
+
import { replace_all_text } from './replace_all_text/index.js';
|
|
8
|
+
import { update_paragraph_style } from './update_paragraph_style/index.js';
|
|
9
|
+
import { update_text_style } from './update_text_style/index.js';
|
|
10
|
+
/**
|
|
11
|
+
* REST-sourced operations, from
|
|
12
|
+
* `developers.google.com/workspace/docs/api/reference/rest`. Google publishes
|
|
13
|
+
* no MCP toolset for Docs, so there is no `tools/` folder and this registry is
|
|
14
|
+
* the service's whole wire surface. The curated editing and styling
|
|
15
|
+
* operations each wrap `documents.batchUpdate` with exactly one request type;
|
|
16
|
+
* the rest of the 40-variant union is issue #35.
|
|
17
|
+
*/
|
|
18
|
+
export const methods = {
|
|
19
|
+
// documents
|
|
20
|
+
get_document,
|
|
21
|
+
create_document,
|
|
22
|
+
// text editing (curated batchUpdate requests)
|
|
23
|
+
insert_text,
|
|
24
|
+
replace_all_text,
|
|
25
|
+
delete_content_range,
|
|
26
|
+
// styling (curated batchUpdate requests)
|
|
27
|
+
update_text_style,
|
|
28
|
+
update_paragraph_style,
|
|
29
|
+
create_paragraph_bullets,
|
|
30
|
+
delete_paragraph_bullets,
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/docs/methods/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,8CAA8C;IAC9C,WAAW;IACX,gBAAgB;IAChB,oBAAoB;IACpB,yCAAyC;IACzC,iBAAiB;IACjB,sBAAsB;IACtB,wBAAwB;IACxB,wBAAwB;CAC4B,CAAC","sourcesContent":["import type { docs_v1 } from '@googleapis/docs';\nimport type { AnyOperation } from '../../lib/operation.js';\nimport { create_document } from './create_document/index.js';\nimport { create_paragraph_bullets } from './create_paragraph_bullets/index.js';\nimport { delete_content_range } from './delete_content_range/index.js';\nimport { delete_paragraph_bullets } from './delete_paragraph_bullets/index.js';\nimport { get_document } from './get_document/index.js';\nimport { insert_text } from './insert_text/index.js';\nimport { replace_all_text } from './replace_all_text/index.js';\nimport { update_paragraph_style } from './update_paragraph_style/index.js';\nimport { update_text_style } from './update_text_style/index.js';\n\n/**\n * REST-sourced operations, from\n * `developers.google.com/workspace/docs/api/reference/rest`. Google publishes\n * no MCP toolset for Docs, so there is no `tools/` folder and this registry is\n * the service's whole wire surface. The curated editing and styling\n * operations each wrap `documents.batchUpdate` with exactly one request type;\n * the rest of the 40-variant union is issue #35.\n */\nexport const methods = {\n // documents\n get_document,\n create_document,\n // text editing (curated batchUpdate requests)\n insert_text,\n replace_all_text,\n delete_content_range,\n // styling (curated batchUpdate requests)\n update_text_style,\n update_paragraph_style,\n create_paragraph_bullets,\n delete_paragraph_bullets,\n} satisfies Record<string, AnyOperation<docs_v1.Docs>>;\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/replace_all_text/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAG7B,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,CAYxC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { forGoogle } from '../../../lib/google.js';
|
|
2
|
+
import { applyUpdate } from '../../lib/batch.js';
|
|
3
|
+
export async function handler(docs, args) {
|
|
4
|
+
const { reply, documentId, revisionId } = await applyUpdate(docs, args.documentId, {
|
|
5
|
+
replaceAllText: {
|
|
6
|
+
containsText: forGoogle(args.containsText),
|
|
7
|
+
replaceText: args.replaceText,
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
return {
|
|
11
|
+
documentId,
|
|
12
|
+
occurrencesChanged: reply?.replaceAllText?.occurrencesChanged ?? 0,
|
|
13
|
+
revisionId,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=handler.js.map
|