@divyacon/piece-google-docs 0.0.0-stage → 0.1.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/LICENSE.MIT-AP +24 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +128 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/actions/append-text.d.ts +8 -0
- package/dist/lib/actions/append-text.d.ts.map +1 -0
- package/dist/lib/actions/append-text.js +40 -0
- package/dist/lib/actions/append-text.js.map +1 -0
- package/dist/lib/actions/batch-update.action.d.ts +8 -0
- package/dist/lib/actions/batch-update.action.d.ts.map +1 -0
- package/dist/lib/actions/batch-update.action.js +63 -0
- package/dist/lib/actions/batch-update.action.js.map +1 -0
- package/dist/lib/actions/copy-document.action.d.ts +12 -0
- package/dist/lib/actions/copy-document.action.d.ts.map +1 -0
- package/dist/lib/actions/copy-document.action.js +72 -0
- package/dist/lib/actions/copy-document.action.js.map +1 -0
- package/dist/lib/actions/create-and-populate-table.action.d.ts +8 -0
- package/dist/lib/actions/create-and-populate-table.action.d.ts.map +1 -0
- package/dist/lib/actions/create-and-populate-table.action.js +138 -0
- package/dist/lib/actions/create-and-populate-table.action.js.map +1 -0
- package/dist/lib/actions/create-document-based-on-template.action.d.ts +10 -0
- package/dist/lib/actions/create-document-based-on-template.action.d.ts.map +1 -0
- package/dist/lib/actions/create-document-based-on-template.action.js +107 -0
- package/dist/lib/actions/create-document-based-on-template.action.js.map +1 -0
- package/dist/lib/actions/create-document-from-markdown.action.d.ts +8 -0
- package/dist/lib/actions/create-document-from-markdown.action.d.ts.map +1 -0
- package/dist/lib/actions/create-document-from-markdown.action.js +69 -0
- package/dist/lib/actions/create-document-from-markdown.action.js.map +1 -0
- package/dist/lib/actions/create-document.d.ts +8 -0
- package/dist/lib/actions/create-document.d.ts.map +1 -0
- package/dist/lib/actions/create-document.js +35 -0
- package/dist/lib/actions/create-document.js.map +1 -0
- package/dist/lib/actions/create-footer.action.d.ts +8 -0
- package/dist/lib/actions/create-footer.action.d.ts.map +1 -0
- package/dist/lib/actions/create-footer.action.js +66 -0
- package/dist/lib/actions/create-footer.action.js.map +1 -0
- package/dist/lib/actions/create-footnote.action.d.ts +8 -0
- package/dist/lib/actions/create-footnote.action.d.ts.map +1 -0
- package/dist/lib/actions/create-footnote.action.js +58 -0
- package/dist/lib/actions/create-footnote.action.js.map +1 -0
- package/dist/lib/actions/create-header.action.d.ts +8 -0
- package/dist/lib/actions/create-header.action.d.ts.map +1 -0
- package/dist/lib/actions/create-header.action.js +66 -0
- package/dist/lib/actions/create-header.action.js.map +1 -0
- package/dist/lib/actions/create-named-range.action.d.ts +10 -0
- package/dist/lib/actions/create-named-range.action.d.ts.map +1 -0
- package/dist/lib/actions/create-named-range.action.js +74 -0
- package/dist/lib/actions/create-named-range.action.js.map +1 -0
- package/dist/lib/actions/create-paragraph-bullets.action.d.ts +10 -0
- package/dist/lib/actions/create-paragraph-bullets.action.d.ts.map +1 -0
- package/dist/lib/actions/create-paragraph-bullets.action.js +98 -0
- package/dist/lib/actions/create-paragraph-bullets.action.js.map +1 -0
- package/dist/lib/actions/create-text-document.action.d.ts +8 -0
- package/dist/lib/actions/create-text-document.action.d.ts.map +1 -0
- package/dist/lib/actions/create-text-document.action.js +42 -0
- package/dist/lib/actions/create-text-document.action.js.map +1 -0
- package/dist/lib/actions/delete-content-range.action.d.ts +9 -0
- package/dist/lib/actions/delete-content-range.action.d.ts.map +1 -0
- package/dist/lib/actions/delete-content-range.action.js +64 -0
- package/dist/lib/actions/delete-content-range.action.js.map +1 -0
- package/dist/lib/actions/delete-footer.action.d.ts +8 -0
- package/dist/lib/actions/delete-footer.action.d.ts.map +1 -0
- package/dist/lib/actions/delete-footer.action.js +56 -0
- package/dist/lib/actions/delete-footer.action.js.map +1 -0
- package/dist/lib/actions/delete-header.action.d.ts +8 -0
- package/dist/lib/actions/delete-header.action.d.ts.map +1 -0
- package/dist/lib/actions/delete-header.action.js +56 -0
- package/dist/lib/actions/delete-header.action.js.map +1 -0
- package/dist/lib/actions/delete-named-range.action.d.ts +9 -0
- package/dist/lib/actions/delete-named-range.action.d.ts.map +1 -0
- package/dist/lib/actions/delete-named-range.action.js +69 -0
- package/dist/lib/actions/delete-named-range.action.js.map +1 -0
- package/dist/lib/actions/delete-paragraph-bullets.action.d.ts +9 -0
- package/dist/lib/actions/delete-paragraph-bullets.action.d.ts.map +1 -0
- package/dist/lib/actions/delete-paragraph-bullets.action.js +66 -0
- package/dist/lib/actions/delete-paragraph-bullets.action.js.map +1 -0
- package/dist/lib/actions/delete-table-column.action.d.ts +10 -0
- package/dist/lib/actions/delete-table-column.action.d.ts.map +1 -0
- package/dist/lib/actions/delete-table-column.action.js +72 -0
- package/dist/lib/actions/delete-table-column.action.js.map +1 -0
- package/dist/lib/actions/delete-table-row.action.d.ts +10 -0
- package/dist/lib/actions/delete-table-row.action.d.ts.map +1 -0
- package/dist/lib/actions/delete-table-row.action.js +72 -0
- package/dist/lib/actions/delete-table-row.action.js.map +1 -0
- package/dist/lib/actions/export-as-pdf.action.d.ts +7 -0
- package/dist/lib/actions/export-as-pdf.action.d.ts.map +1 -0
- package/dist/lib/actions/export-as-pdf.action.js +61 -0
- package/dist/lib/actions/export-as-pdf.action.js.map +1 -0
- package/dist/lib/actions/find-document.d.ts +16 -0
- package/dist/lib/actions/find-document.d.ts.map +1 -0
- package/dist/lib/actions/find-document.js +127 -0
- package/dist/lib/actions/find-document.js.map +1 -0
- package/dist/lib/actions/get-document-end-index.action.d.ts +7 -0
- package/dist/lib/actions/get-document-end-index.action.d.ts.map +1 -0
- package/dist/lib/actions/get-document-end-index.action.js +54 -0
- package/dist/lib/actions/get-document-end-index.action.js.map +1 -0
- package/dist/lib/actions/get-document-plaintext.action.d.ts +7 -0
- package/dist/lib/actions/get-document-plaintext.action.d.ts.map +1 -0
- package/dist/lib/actions/get-document-plaintext.action.js +76 -0
- package/dist/lib/actions/get-document-plaintext.action.js.map +1 -0
- package/dist/lib/actions/get-document.action.d.ts +7 -0
- package/dist/lib/actions/get-document.action.d.ts.map +1 -0
- package/dist/lib/actions/get-document.action.js +45 -0
- package/dist/lib/actions/get-document.action.js.map +1 -0
- package/dist/lib/actions/insert-image-in-table-cell.action.d.ts +13 -0
- package/dist/lib/actions/insert-image-in-table-cell.action.d.ts.map +1 -0
- package/dist/lib/actions/insert-image-in-table-cell.action.js +128 -0
- package/dist/lib/actions/insert-image-in-table-cell.action.js.map +1 -0
- package/dist/lib/actions/insert-inline-image.action.d.ts +11 -0
- package/dist/lib/actions/insert-inline-image.action.d.ts.map +1 -0
- package/dist/lib/actions/insert-inline-image.action.js +84 -0
- package/dist/lib/actions/insert-inline-image.action.js.map +1 -0
- package/dist/lib/actions/insert-page-break.action.d.ts +8 -0
- package/dist/lib/actions/insert-page-break.action.d.ts.map +1 -0
- package/dist/lib/actions/insert-page-break.action.js +60 -0
- package/dist/lib/actions/insert-page-break.action.js.map +1 -0
- package/dist/lib/actions/insert-table-column.action.d.ts +11 -0
- package/dist/lib/actions/insert-table-column.action.d.ts.map +1 -0
- package/dist/lib/actions/insert-table-column.action.js +86 -0
- package/dist/lib/actions/insert-table-column.action.js.map +1 -0
- package/dist/lib/actions/insert-table-row.action.d.ts +11 -0
- package/dist/lib/actions/insert-table-row.action.d.ts.map +1 -0
- package/dist/lib/actions/insert-table-row.action.js +86 -0
- package/dist/lib/actions/insert-table-row.action.js.map +1 -0
- package/dist/lib/actions/insert-table.action.d.ts +10 -0
- package/dist/lib/actions/insert-table.action.d.ts.map +1 -0
- package/dist/lib/actions/insert-table.action.js +72 -0
- package/dist/lib/actions/insert-table.action.js.map +1 -0
- package/dist/lib/actions/insert-text-in-table-cell.action.d.ts +11 -0
- package/dist/lib/actions/insert-text-in-table-cell.action.d.ts.map +1 -0
- package/dist/lib/actions/insert-text-in-table-cell.action.js +115 -0
- package/dist/lib/actions/insert-text-in-table-cell.action.js.map +1 -0
- package/dist/lib/actions/insert-text.action.d.ts +9 -0
- package/dist/lib/actions/insert-text.action.d.ts.map +1 -0
- package/dist/lib/actions/insert-text.action.js +66 -0
- package/dist/lib/actions/insert-text.action.js.map +1 -0
- package/dist/lib/actions/read-document.action.d.ts +7 -0
- package/dist/lib/actions/read-document.action.d.ts.map +1 -0
- package/dist/lib/actions/read-document.action.js +44 -0
- package/dist/lib/actions/read-document.action.js.map +1 -0
- package/dist/lib/actions/replace-all-text.action.d.ts +10 -0
- package/dist/lib/actions/replace-all-text.action.d.ts.map +1 -0
- package/dist/lib/actions/replace-all-text.action.js +92 -0
- package/dist/lib/actions/replace-all-text.action.js.map +1 -0
- package/dist/lib/actions/replace-body-with-markdown.action.d.ts +8 -0
- package/dist/lib/actions/replace-body-with-markdown.action.d.ts.map +1 -0
- package/dist/lib/actions/replace-body-with-markdown.action.js +79 -0
- package/dist/lib/actions/replace-body-with-markdown.action.js.map +1 -0
- package/dist/lib/actions/replace-image.action.d.ts +9 -0
- package/dist/lib/actions/replace-image.action.d.ts.map +1 -0
- package/dist/lib/actions/replace-image.action.js +65 -0
- package/dist/lib/actions/replace-image.action.js.map +1 -0
- package/dist/lib/actions/replace-section-with-markdown.action.d.ts +10 -0
- package/dist/lib/actions/replace-section-with-markdown.action.d.ts.map +1 -0
- package/dist/lib/actions/replace-section-with-markdown.action.js +106 -0
- package/dist/lib/actions/replace-section-with-markdown.action.js.map +1 -0
- package/dist/lib/actions/search-documents.action.d.ts +11 -0
- package/dist/lib/actions/search-documents.action.d.ts.map +1 -0
- package/dist/lib/actions/search-documents.action.js +121 -0
- package/dist/lib/actions/search-documents.action.js.map +1 -0
- package/dist/lib/actions/unmerge-table-cells.action.d.ts +12 -0
- package/dist/lib/actions/unmerge-table-cells.action.d.ts.map +1 -0
- package/dist/lib/actions/unmerge-table-cells.action.js +94 -0
- package/dist/lib/actions/unmerge-table-cells.action.js.map +1 -0
- package/dist/lib/actions/update-document-style.action.d.ts +11 -0
- package/dist/lib/actions/update-document-style.action.d.ts.map +1 -0
- package/dist/lib/actions/update-document-style.action.js +95 -0
- package/dist/lib/actions/update-document-style.action.js.map +1 -0
- package/dist/lib/actions/update-table-row-style.action.d.ts +10 -0
- package/dist/lib/actions/update-table-row-style.action.d.ts.map +1 -0
- package/dist/lib/actions/update-table-row-style.action.js +78 -0
- package/dist/lib/actions/update-table-row-style.action.js.map +1 -0
- package/dist/lib/auth.d.ts +11 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +92 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/common/index.d.ts +11 -0
- package/dist/lib/common/index.d.ts.map +1 -0
- package/dist/lib/common/index.js +124 -0
- package/dist/lib/common/index.js.map +1 -0
- package/dist/lib/common/props.d.ts +5 -0
- package/dist/lib/common/props.d.ts.map +1 -0
- package/dist/lib/common/props.js +53 -0
- package/dist/lib/common/props.js.map +1 -0
- package/dist/lib/output-schemas.d.ts +43 -0
- package/dist/lib/output-schemas.d.ts.map +1 -0
- package/dist/lib/output-schemas.js +554 -0
- package/dist/lib/output-schemas.js.map +1 -0
- package/dist/lib/triggers/new-document.d.ts +35 -0
- package/dist/lib/triggers/new-document.d.ts.map +1 -0
- package/dist/lib/triggers/new-document.js +104 -0
- package/dist/lib/triggers/new-document.js.map +1 -0
- package/package.json +47 -3
- package/src/index.ts +120 -0
- package/src/lib/actions/append-text.ts +37 -0
- package/src/lib/actions/batch-update.action.ts +58 -0
- package/src/lib/actions/copy-document.action.ts +74 -0
- package/src/lib/actions/create-and-populate-table.action.ts +141 -0
- package/src/lib/actions/create-document-based-on-template.action.ts +110 -0
- package/src/lib/actions/create-document-from-markdown.action.ts +63 -0
- package/src/lib/actions/create-document.ts +36 -0
- package/src/lib/actions/create-footer.action.ts +59 -0
- package/src/lib/actions/create-footnote.action.ts +53 -0
- package/src/lib/actions/create-header.action.ts +59 -0
- package/src/lib/actions/create-named-range.action.ts +70 -0
- package/src/lib/actions/create-paragraph-bullets.action.ts +95 -0
- package/src/lib/actions/create-text-document.action.ts +35 -0
- package/src/lib/actions/delete-content-range.action.ts +59 -0
- package/src/lib/actions/delete-footer.action.ts +51 -0
- package/src/lib/actions/delete-header.action.ts +51 -0
- package/src/lib/actions/delete-named-range.action.ts +65 -0
- package/src/lib/actions/delete-paragraph-bullets.action.ts +62 -0
- package/src/lib/actions/delete-table-column.action.ts +67 -0
- package/src/lib/actions/delete-table-row.action.ts +67 -0
- package/src/lib/actions/export-as-pdf.action.ts +59 -0
- package/src/lib/actions/find-document.ts +136 -0
- package/src/lib/actions/get-document-end-index.action.ts +47 -0
- package/src/lib/actions/get-document-plaintext.action.ts +74 -0
- package/src/lib/actions/get-document.action.ts +37 -0
- package/src/lib/actions/insert-image-in-table-cell.action.ts +139 -0
- package/src/lib/actions/insert-inline-image.action.ts +83 -0
- package/src/lib/actions/insert-page-break.action.ts +56 -0
- package/src/lib/actions/insert-table-column.action.ts +80 -0
- package/src/lib/actions/insert-table-row.action.ts +80 -0
- package/src/lib/actions/insert-table.action.ts +68 -0
- package/src/lib/actions/insert-text-in-table-cell.action.ts +120 -0
- package/src/lib/actions/insert-text.action.ts +62 -0
- package/src/lib/actions/read-document.action.ts +40 -0
- package/src/lib/actions/replace-all-text.action.ts +95 -0
- package/src/lib/actions/replace-body-with-markdown.action.ts +76 -0
- package/src/lib/actions/replace-image.action.ts +60 -0
- package/src/lib/actions/replace-section-with-markdown.action.ts +104 -0
- package/src/lib/actions/search-documents.action.ts +131 -0
- package/src/lib/actions/unmerge-table-cells.action.ts +88 -0
- package/src/lib/actions/update-document-style.action.ts +93 -0
- package/src/lib/actions/update-table-row-style.action.ts +73 -0
- package/src/lib/auth.ts +84 -0
- package/src/lib/common/index.ts +126 -0
- package/src/lib/common/props.ts +55 -0
- package/src/lib/output-schemas.ts +593 -0
- package/src/lib/triggers/new-document.ts +108 -0
- package/README.md +0 -3
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createParagraphBullets = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-docs/src/lib/actions/create-paragraph-bullets.action.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
10
|
+
const docs_1 = require("@googleapis/docs");
|
|
11
|
+
const output_schemas_1 = require("../output-schemas");
|
|
12
|
+
exports.createParagraphBullets = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleDocsAuth,
|
|
14
|
+
name: 'create_paragraph_bullets',
|
|
15
|
+
displayName: 'Create Paragraph Bullets',
|
|
16
|
+
description: 'Apply a bullet list preset to paragraphs in a character range in a Google Docs document',
|
|
17
|
+
audience: 'ai',
|
|
18
|
+
aiMetadata: {
|
|
19
|
+
description: 'Applies a bullet list style (e.g. BULLET_DISC_CIRCLE_SQUARE) to all paragraphs within a character range in a Google Docs document. Use this to convert existing paragraphs into a bulleted or numbered list. The startIndex and endIndex must span the paragraphs to bullet — obtain valid indices from Get Document End Index or Read Document (cannot be guessed). Not idempotent (re-running with a different preset changes the glyph style).',
|
|
20
|
+
idempotent: false,
|
|
21
|
+
},
|
|
22
|
+
outputSchema: output_schemas_1.createParagraphBulletsActionOutputSchema,
|
|
23
|
+
props: {
|
|
24
|
+
documentId: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Document ID',
|
|
26
|
+
description: 'The ID of the document to apply bullets to (from the document URL or Search Documents).',
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
29
|
+
startIndex: pieces_framework_1.Property.Number({
|
|
30
|
+
displayName: 'Start Index',
|
|
31
|
+
description: 'Inclusive start character index of the range of paragraphs to bullet. Obtain from Get Document End Index or Read Document — cannot be guessed.',
|
|
32
|
+
required: true,
|
|
33
|
+
}),
|
|
34
|
+
endIndex: pieces_framework_1.Property.Number({
|
|
35
|
+
displayName: 'End Index',
|
|
36
|
+
description: 'Exclusive end character index of the range of paragraphs to bullet. Must be greater than Start Index. Obtain from Get Document End Index or Read Document — cannot be guessed.',
|
|
37
|
+
required: true,
|
|
38
|
+
}),
|
|
39
|
+
bulletPreset: pieces_framework_1.Property.StaticDropdown({
|
|
40
|
+
displayName: 'Bullet Preset',
|
|
41
|
+
description: 'The bullet list glyph preset to apply to the paragraphs.',
|
|
42
|
+
required: false,
|
|
43
|
+
defaultValue: 'BULLET_DISC_CIRCLE_SQUARE',
|
|
44
|
+
options: {
|
|
45
|
+
options: [
|
|
46
|
+
{ label: 'Disc / Circle / Square (default)', value: 'BULLET_DISC_CIRCLE_SQUARE' },
|
|
47
|
+
{ label: 'Diamond / Circle / Square', value: 'BULLET_DIAMONDX_ARROW3D_SQUARE' },
|
|
48
|
+
{ label: 'Checkbox', value: 'BULLET_CHECKBOX' },
|
|
49
|
+
{ label: 'Arrow / Diamond / Disc', value: 'BULLET_ARROW_DIAMOND_DISC' },
|
|
50
|
+
{ label: 'Star / Circle / Square', value: 'BULLET_STAR_CIRCLE_SQUARE' },
|
|
51
|
+
{ label: 'Arrow3D / Circle / Square', value: 'BULLET_ARROW3D_CIRCLE_SQUARE' },
|
|
52
|
+
{ label: 'Left Triangle / Diamond / Disc', value: 'BULLET_LEFTTRIANGLE_DIAMOND_DISC' },
|
|
53
|
+
{ label: 'Diamond / Circle / Disc', value: 'BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE' },
|
|
54
|
+
{ label: 'Diamond / Diamond / Square', value: 'BULLET_DIAMOND_DISC_CIRCLE' },
|
|
55
|
+
{ label: 'Numbered: Decimal / Alpha Lower / Roman Lower', value: 'NUMBERED_DECIMAL_ALPHA_ROMAN' },
|
|
56
|
+
{ label: 'Numbered: Decimal / Alpha Lower / Roman Lower (parenthesis)', value: 'NUMBERED_DECIMAL_ALPHA_ROMAN_PARENS' },
|
|
57
|
+
{ label: 'Numbered: Decimal nested', value: 'NUMBERED_DECIMAL_NESTED' },
|
|
58
|
+
{ label: 'Numbered: Upper Alpha / Alpha Lower / Roman Lower', value: 'NUMBERED_UPPERALPHA_ALPHA_ROMAN' },
|
|
59
|
+
{ label: 'Numbered: Upper Roman / Roman Lower / Alpha Lower', value: 'NUMBERED_UPPERROMAN_UPPERALPHA_DECIMAL' },
|
|
60
|
+
{ label: 'Numbered: Zero Decimal / Alpha Lower / Roman Lower', value: 'NUMBERED_ZERODECIMAL_ALPHA_ROMAN' },
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
},
|
|
65
|
+
run(context) {
|
|
66
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const { documentId, startIndex, endIndex, bulletPreset } = context.propsValue;
|
|
68
|
+
if (endIndex <= startIndex) {
|
|
69
|
+
throw new Error('End Index must be greater than Start Index.');
|
|
70
|
+
}
|
|
71
|
+
const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
|
|
72
|
+
const docs = (0, docs_1.docs)({ version: 'v1', auth: authClient });
|
|
73
|
+
const request = {
|
|
74
|
+
createParagraphBullets: {
|
|
75
|
+
range: { startIndex, endIndex },
|
|
76
|
+
bulletPreset: (bulletPreset !== null && bulletPreset !== void 0 ? bulletPreset : 'BULLET_DISC_CIRCLE_SQUARE'),
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
try {
|
|
80
|
+
yield docs.documents.batchUpdate({
|
|
81
|
+
documentId,
|
|
82
|
+
requestBody: { requests: [request] },
|
|
83
|
+
});
|
|
84
|
+
return {
|
|
85
|
+
success: true,
|
|
86
|
+
documentId,
|
|
87
|
+
startIndex,
|
|
88
|
+
endIndex,
|
|
89
|
+
bulletPreset: bulletPreset !== null && bulletPreset !== void 0 ? bulletPreset : 'BULLET_DISC_CIRCLE_SQUARE',
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
throw new Error(common_1.docsCommon.formatError(error, 'create paragraph bullets in'));
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
//# sourceMappingURL=create-paragraph-bullets.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-paragraph-bullets.action.js","sourceRoot":"","sources":["../../../src/lib/actions/create-paragraph-bullets.action.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const createTextDocument: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
|
|
3
|
+
userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
}>)[], {
|
|
5
|
+
title: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
body: import("@agnocon/pieces-framework").LongTextProperty<true>;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=create-text-document.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-text-document.action.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/create-text-document.action.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,kBAAkB;;;;;;EA6B7B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTextDocument = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-docs/src/lib/actions/create-text-document.action.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
const auth_1 = require("../auth");
|
|
10
|
+
const output_schemas_1 = require("../output-schemas");
|
|
11
|
+
exports.createTextDocument = (0, pieces_framework_1.createAction)({
|
|
12
|
+
auth: auth_1.googleDocsAuth,
|
|
13
|
+
name: 'create_text_document',
|
|
14
|
+
displayName: 'Create Text Document',
|
|
15
|
+
description: 'Create a new Google Docs document with a title and plain text',
|
|
16
|
+
audience: 'ai',
|
|
17
|
+
aiMetadata: {
|
|
18
|
+
description: 'Creates a new Google Docs document with the given title and writes the provided plain text into it, returning the new document metadata (including its ID). Use when an agent has plain text to put in a fresh document; for Markdown-formatted content use Create Document from Markdown instead. Not idempotent: each call creates a separate new document.',
|
|
19
|
+
idempotent: false,
|
|
20
|
+
},
|
|
21
|
+
outputSchema: output_schemas_1.appendTextActionOutputSchema,
|
|
22
|
+
props: {
|
|
23
|
+
title: pieces_framework_1.Property.ShortText({
|
|
24
|
+
displayName: 'Title',
|
|
25
|
+
description: 'The title (and file name) of the new document.',
|
|
26
|
+
required: true,
|
|
27
|
+
}),
|
|
28
|
+
body: pieces_framework_1.Property.LongText({
|
|
29
|
+
displayName: 'Content',
|
|
30
|
+
description: 'The plain text to write into the new document.',
|
|
31
|
+
required: true,
|
|
32
|
+
}),
|
|
33
|
+
},
|
|
34
|
+
run(context) {
|
|
35
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
const accessToken = yield (0, auth_1.getAccessToken)(context.auth);
|
|
37
|
+
const document = yield common_1.docsCommon.createDocument(context.propsValue.title, accessToken);
|
|
38
|
+
return yield common_1.docsCommon.writeToDocument(document.documentId, context.propsValue.body, accessToken);
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=create-text-document.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-text-document.action.js","sourceRoot":"","sources":["../../../src/lib/actions/create-text-document.action.ts"],"names":[],"mappings":";;;;AAAA,yHAAyH;AACzH,qEAAqE;AACrE,gEAAmE;AACnE,sCAAuC;AACvC,kCAAyD;AACzD,sDAAiE;AAEpD,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,qBAAc;IACpB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,+DAA+D;IAC5E,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,+VAA+V;QACjW,UAAU,EAAE,KAAK;KAClB;IACD,YAAY,EAAE,6CAA4B;IAC1C,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,WAAW,GAAG,MAAM,IAAA,qBAAc,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACvD,MAAM,QAAQ,GAAG,MAAM,mBAAU,CAAC,cAAc,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;YACxF,OAAO,MAAM,mBAAU,CAAC,eAAe,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACrG,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const deleteContentRange: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
|
|
3
|
+
userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
}>)[], {
|
|
5
|
+
documentId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
startIndex: import("@agnocon/pieces-framework").NumberProperty<true>;
|
|
7
|
+
endIndex: import("@agnocon/pieces-framework").NumberProperty<true>;
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=delete-content-range.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-content-range.action.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/delete-content-range.action.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,kBAAkB;;;;;;;EAoD7B,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteContentRange = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-docs/src/lib/actions/delete-content-range.action.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
10
|
+
const docs_1 = require("@googleapis/docs");
|
|
11
|
+
const output_schemas_1 = require("../output-schemas");
|
|
12
|
+
exports.deleteContentRange = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleDocsAuth,
|
|
14
|
+
name: 'delete_content_range',
|
|
15
|
+
displayName: 'Delete Content Range',
|
|
16
|
+
description: 'Delete a range of content from a Google Docs document',
|
|
17
|
+
audience: 'ai',
|
|
18
|
+
aiMetadata: {
|
|
19
|
+
description: 'Deletes all content between a start and end character index in a Google Docs document body. Obtain valid indices from Get Document End Index / Read Document first — indices cannot be guessed. Note that every Google Docs segment ends in a newline that cannot be deleted, so the end index must not exceed the body end index minus one. Destructive and not idempotent.',
|
|
20
|
+
idempotent: false,
|
|
21
|
+
},
|
|
22
|
+
outputSchema: output_schemas_1.deleteContentRangeActionOutputSchema,
|
|
23
|
+
props: {
|
|
24
|
+
documentId: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Document ID',
|
|
26
|
+
description: 'The ID of the document to edit.',
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
29
|
+
startIndex: pieces_framework_1.Property.Number({
|
|
30
|
+
displayName: 'Start Index',
|
|
31
|
+
description: 'Inclusive start character index. Obtain from Get Document End Index / Read Document.',
|
|
32
|
+
required: true,
|
|
33
|
+
}),
|
|
34
|
+
endIndex: pieces_framework_1.Property.Number({
|
|
35
|
+
displayName: 'End Index',
|
|
36
|
+
description: 'Exclusive end character index. Must be greater than Start Index and not exceed the body end index.',
|
|
37
|
+
required: true,
|
|
38
|
+
}),
|
|
39
|
+
},
|
|
40
|
+
run(context) {
|
|
41
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const { documentId, startIndex, endIndex } = context.propsValue;
|
|
43
|
+
if (endIndex <= startIndex) {
|
|
44
|
+
throw new Error('End Index must be greater than Start Index.');
|
|
45
|
+
}
|
|
46
|
+
const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
|
|
47
|
+
const docs = (0, docs_1.docs)({ version: 'v1', auth: authClient });
|
|
48
|
+
const request = {
|
|
49
|
+
deleteContentRange: { range: { startIndex, endIndex } },
|
|
50
|
+
};
|
|
51
|
+
try {
|
|
52
|
+
yield docs.documents.batchUpdate({
|
|
53
|
+
documentId,
|
|
54
|
+
requestBody: { requests: [request] },
|
|
55
|
+
});
|
|
56
|
+
return { success: true, documentId, deletedFrom: startIndex, deletedTo: endIndex };
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
throw new Error(common_1.docsCommon.formatError(error, 'delete content from'));
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=delete-content-range.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-content-range.action.js","sourceRoot":"","sources":["../../../src/lib/actions/delete-content-range.action.ts"],"names":[],"mappings":";;;;AAAA,yHAAyH;AACzH,qEAAqE;AACrE,kCAA6D;AAC7D,sCAAuC;AACvC,gEAAmE;AACnE,2CAA+D;AAC/D,sDAAyE;AAE5D,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,qBAAc;IACpB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,uDAAuD;IACpE,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,8WAA8W;QAChX,UAAU,EAAE,KAAK;KAClB;IACD,YAAY,EAAE,qDAAoC;IAClD,KAAK,EAAE;QACL,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC1B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,sFAAsF;YACnG,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACxB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,oGAAoG;YACjH,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAChE,IAAI,QAAQ,IAAI,UAAU,EAAE,CAAC;gBAC3B,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;YACjE,CAAC;YAED,MAAM,UAAU,GAAG,MAAM,IAAA,yBAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1D,MAAM,IAAI,GAAG,IAAA,WAAU,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAE7D,MAAM,OAAO,GAA2B;gBACtC,kBAAkB,EAAE,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE;aACxD,CAAC;YAEF,IAAI,CAAC;gBACH,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;oBAC/B,UAAU;oBACV,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE;iBACrC,CAAC,CAAC;gBACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;YACrF,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,mBAAU,CAAC,WAAW,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC;YACxE,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const deleteFooter: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
|
|
3
|
+
userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
}>)[], {
|
|
5
|
+
documentId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
footerId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=delete-footer.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-footer.action.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/delete-footer.action.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;;;;EA4CvB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteFooter = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-docs/src/lib/actions/delete-footer.action.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
10
|
+
const docs_1 = require("@googleapis/docs");
|
|
11
|
+
const output_schemas_1 = require("../output-schemas");
|
|
12
|
+
exports.deleteFooter = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleDocsAuth,
|
|
14
|
+
name: 'delete_footer',
|
|
15
|
+
displayName: 'Delete Footer',
|
|
16
|
+
description: 'Delete a footer from a Google Docs document',
|
|
17
|
+
audience: 'ai',
|
|
18
|
+
aiMetadata: {
|
|
19
|
+
description: 'Permanently deletes a footer section from a Google Docs document by its footer ID. The footer ID is a hidden identifier — obtain it from the Read Document (gdocs_get_document) response under the document\'s named styles or sections; it cannot be guessed. Destructive and not idempotent: the footer content is unrecoverable once deleted.',
|
|
20
|
+
idempotent: false,
|
|
21
|
+
},
|
|
22
|
+
outputSchema: output_schemas_1.deleteFooterActionOutputSchema,
|
|
23
|
+
props: {
|
|
24
|
+
documentId: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Document ID',
|
|
26
|
+
description: 'The ID of the document to edit.',
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
29
|
+
footerId: pieces_framework_1.Property.ShortText({
|
|
30
|
+
displayName: 'Footer ID',
|
|
31
|
+
description: 'The ID of the footer to delete. Obtain from Read Document (gdocs_get_document) — cannot be guessed.',
|
|
32
|
+
required: true,
|
|
33
|
+
}),
|
|
34
|
+
},
|
|
35
|
+
run(context) {
|
|
36
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const { documentId, footerId } = context.propsValue;
|
|
38
|
+
const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
|
|
39
|
+
const docs = (0, docs_1.docs)({ version: 'v1', auth: authClient });
|
|
40
|
+
const request = {
|
|
41
|
+
deleteFooter: { footerId },
|
|
42
|
+
};
|
|
43
|
+
try {
|
|
44
|
+
yield docs.documents.batchUpdate({
|
|
45
|
+
documentId,
|
|
46
|
+
requestBody: { requests: [request] },
|
|
47
|
+
});
|
|
48
|
+
return { success: true, documentId, deletedFooterId: footerId };
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
throw new Error(common_1.docsCommon.formatError(error, 'delete the footer from'));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=delete-footer.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-footer.action.js","sourceRoot":"","sources":["../../../src/lib/actions/delete-footer.action.ts"],"names":[],"mappings":";;;;AAAA,kHAAkH;AAClH,qEAAqE;AACrE,kCAA6D;AAC7D,sCAAuC;AACvC,gEAAmE;AACnE,2CAA+D;AAC/D,sDAAmE;AAEtD,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,qBAAc;IACpB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,6CAA6C;IAC1D,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,kVAAkV;QACpV,UAAU,EAAE,KAAK;KAClB;IACD,YAAY,EAAE,+CAA8B;IAC5C,KAAK,EAAE;QACL,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,qGAAqG;YAClH,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEpD,MAAM,UAAU,GAAG,MAAM,IAAA,yBAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1D,MAAM,IAAI,GAAG,IAAA,WAAU,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAE7D,MAAM,OAAO,GAA2B;gBACtC,YAAY,EAAE,EAAE,QAAQ,EAAE;aAC3B,CAAC;YAEF,IAAI,CAAC;gBACH,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;oBAC/B,UAAU;oBACV,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE;iBACrC,CAAC,CAAC;gBACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC;YAClE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,mBAAU,CAAC,WAAW,CAAC,KAAK,EAAE,wBAAwB,CAAC,CAAC,CAAC;YAC3E,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const deleteHeader: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
|
|
3
|
+
userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
}>)[], {
|
|
5
|
+
documentId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
headerId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=delete-header.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-header.action.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/delete-header.action.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;;;;EA4CvB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteHeader = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-docs/src/lib/actions/delete-header.action.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
10
|
+
const docs_1 = require("@googleapis/docs");
|
|
11
|
+
const output_schemas_1 = require("../output-schemas");
|
|
12
|
+
exports.deleteHeader = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleDocsAuth,
|
|
14
|
+
name: 'delete_header',
|
|
15
|
+
displayName: 'Delete Header',
|
|
16
|
+
description: 'Delete a header from a Google Docs document',
|
|
17
|
+
audience: 'ai',
|
|
18
|
+
aiMetadata: {
|
|
19
|
+
description: 'Permanently deletes a header section from a Google Docs document by its header ID. The header ID is a hidden identifier — obtain it from the Read Document (gdocs_get_document) response under the document\'s named styles or sections; it cannot be guessed. Destructive and not idempotent: the header content is unrecoverable once deleted.',
|
|
20
|
+
idempotent: false,
|
|
21
|
+
},
|
|
22
|
+
outputSchema: output_schemas_1.deleteHeaderActionOutputSchema,
|
|
23
|
+
props: {
|
|
24
|
+
documentId: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Document ID',
|
|
26
|
+
description: 'The ID of the document to edit.',
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
29
|
+
headerId: pieces_framework_1.Property.ShortText({
|
|
30
|
+
displayName: 'Header ID',
|
|
31
|
+
description: 'The ID of the header to delete. Obtain from Read Document (gdocs_get_document) — cannot be guessed.',
|
|
32
|
+
required: true,
|
|
33
|
+
}),
|
|
34
|
+
},
|
|
35
|
+
run(context) {
|
|
36
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const { documentId, headerId } = context.propsValue;
|
|
38
|
+
const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
|
|
39
|
+
const docs = (0, docs_1.docs)({ version: 'v1', auth: authClient });
|
|
40
|
+
const request = {
|
|
41
|
+
deleteHeader: { headerId },
|
|
42
|
+
};
|
|
43
|
+
try {
|
|
44
|
+
yield docs.documents.batchUpdate({
|
|
45
|
+
documentId,
|
|
46
|
+
requestBody: { requests: [request] },
|
|
47
|
+
});
|
|
48
|
+
return { success: true, documentId, deletedHeaderId: headerId };
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
throw new Error(common_1.docsCommon.formatError(error, 'delete the header from'));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=delete-header.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-header.action.js","sourceRoot":"","sources":["../../../src/lib/actions/delete-header.action.ts"],"names":[],"mappings":";;;;AAAA,kHAAkH;AAClH,qEAAqE;AACrE,kCAA6D;AAC7D,sCAAuC;AACvC,gEAAmE;AACnE,2CAA+D;AAC/D,sDAAmE;AAEtD,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,qBAAc;IACpB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,6CAA6C;IAC1D,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,kVAAkV;QACpV,UAAU,EAAE,KAAK;KAClB;IACD,YAAY,EAAE,+CAA8B;IAC5C,KAAK,EAAE;QACL,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,qGAAqG;YAClH,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEpD,MAAM,UAAU,GAAG,MAAM,IAAA,yBAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1D,MAAM,IAAI,GAAG,IAAA,WAAU,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAE7D,MAAM,OAAO,GAA2B;gBACtC,YAAY,EAAE,EAAE,QAAQ,EAAE;aAC3B,CAAC;YAEF,IAAI,CAAC;gBACH,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;oBAC/B,UAAU;oBACV,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE;iBACrC,CAAC,CAAC;gBACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC;YAClE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,mBAAU,CAAC,WAAW,CAAC,KAAK,EAAE,wBAAwB,CAAC,CAAC,CAAC;YAC3E,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const deleteNamedRange: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
|
|
3
|
+
userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
}>)[], {
|
|
5
|
+
documentId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
namedRangeId: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
name: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=delete-named-range.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-named-range.action.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/delete-named-range.action.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,gBAAgB;;;;;;;EA0D3B,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteNamedRange = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-docs/src/lib/actions/delete-named-range.action.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
10
|
+
const docs_1 = require("@googleapis/docs");
|
|
11
|
+
const output_schemas_1 = require("../output-schemas");
|
|
12
|
+
exports.deleteNamedRange = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleDocsAuth,
|
|
14
|
+
name: 'delete_named_range',
|
|
15
|
+
displayName: 'Delete Named Range',
|
|
16
|
+
description: 'Delete a named range from a Google Docs document by ID or name',
|
|
17
|
+
audience: 'ai',
|
|
18
|
+
aiMetadata: {
|
|
19
|
+
description: 'Deletes a named range from a Google Docs document. Provide either namedRangeId (targets one specific range — obtain from Read Document gdocs_get_document, cannot be guessed) or name (deletes all named ranges with that name). Re-deleting an already-gone range or name is a no-op, so this call is idempotent.',
|
|
20
|
+
idempotent: true,
|
|
21
|
+
},
|
|
22
|
+
outputSchema: output_schemas_1.deleteNamedRangeActionOutputSchema,
|
|
23
|
+
props: {
|
|
24
|
+
documentId: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Document ID',
|
|
26
|
+
description: 'The ID of the document to edit.',
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
29
|
+
namedRangeId: pieces_framework_1.Property.ShortText({
|
|
30
|
+
displayName: 'Named Range ID',
|
|
31
|
+
description: 'The ID of the named range to delete. Obtain from Read Document (gdocs_get_document) — cannot be guessed. Provide this OR Name, not both.',
|
|
32
|
+
required: false,
|
|
33
|
+
}),
|
|
34
|
+
name: pieces_framework_1.Property.ShortText({
|
|
35
|
+
displayName: 'Name',
|
|
36
|
+
description: 'The name of the named range(s) to delete. All ranges with this name will be removed. Provide this OR Named Range ID, not both.',
|
|
37
|
+
required: false,
|
|
38
|
+
}),
|
|
39
|
+
},
|
|
40
|
+
run(context) {
|
|
41
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const { documentId, namedRangeId, name } = context.propsValue;
|
|
43
|
+
if (!namedRangeId && !name) {
|
|
44
|
+
throw new Error('Provide either Named Range ID or Name — at least one is required.');
|
|
45
|
+
}
|
|
46
|
+
const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
|
|
47
|
+
const docs = (0, docs_1.docs)({ version: 'v1', auth: authClient });
|
|
48
|
+
const request = namedRangeId
|
|
49
|
+
? { deleteNamedRange: { namedRangeId } }
|
|
50
|
+
: { deleteNamedRange: { name } };
|
|
51
|
+
try {
|
|
52
|
+
yield docs.documents.batchUpdate({
|
|
53
|
+
documentId,
|
|
54
|
+
requestBody: { requests: [request] },
|
|
55
|
+
});
|
|
56
|
+
return {
|
|
57
|
+
success: true,
|
|
58
|
+
documentId,
|
|
59
|
+
deletedNamedRangeId: namedRangeId !== null && namedRangeId !== void 0 ? namedRangeId : null,
|
|
60
|
+
deletedName: name !== null && name !== void 0 ? name : null,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
throw new Error(common_1.docsCommon.formatError(error, 'delete the named range from'));
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=delete-named-range.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-named-range.action.js","sourceRoot":"","sources":["../../../src/lib/actions/delete-named-range.action.ts"],"names":[],"mappings":";;;;AAAA,uHAAuH;AACvH,qEAAqE;AACrE,kCAA6D;AAC7D,sCAAuC;AACvC,gEAAmE;AACnE,2CAA+D;AAC/D,sDAAuE;AAE1D,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,qBAAc;IACpB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,gEAAgE;IAC7E,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,oTAAoT;QACtT,UAAU,EAAE,IAAI;KACjB;IACD,YAAY,EAAE,mDAAkC;IAChD,KAAK,EAAE;QACL,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,0IAA0I;YACvJ,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,gIAAgI;YAC7I,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE9D,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,EAAE,CAAC;gBAC3B,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;YACvF,CAAC;YAED,MAAM,UAAU,GAAG,MAAM,IAAA,yBAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1D,MAAM,IAAI,GAAG,IAAA,WAAU,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAE7D,MAAM,OAAO,GAA2B,YAAY;gBAClD,CAAC,CAAC,EAAE,gBAAgB,EAAE,EAAE,YAAY,EAAE,EAAE;gBACxC,CAAC,CAAC,EAAE,gBAAgB,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC;YAEnC,IAAI,CAAC;gBACH,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;oBAC/B,UAAU;oBACV,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE;iBACrC,CAAC,CAAC;gBACH,OAAO;oBACL,OAAO,EAAE,IAAI;oBACb,UAAU;oBACV,mBAAmB,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,IAAI;oBACzC,WAAW,EAAE,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,IAAI;iBAC1B,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,mBAAU,CAAC,WAAW,CAAC,KAAK,EAAE,6BAA6B,CAAC,CAAC,CAAC;YAChF,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const deleteParagraphBullets: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
|
|
3
|
+
userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
}>)[], {
|
|
5
|
+
documentId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
startIndex: import("@agnocon/pieces-framework").NumberProperty<true>;
|
|
7
|
+
endIndex: import("@agnocon/pieces-framework").NumberProperty<true>;
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=delete-paragraph-bullets.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-paragraph-bullets.action.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/delete-paragraph-bullets.action.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,sBAAsB;;;;;;;EAuDjC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteParagraphBullets = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-docs/src/lib/actions/delete-paragraph-bullets.action.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
10
|
+
const docs_1 = require("@googleapis/docs");
|
|
11
|
+
const output_schemas_1 = require("../output-schemas");
|
|
12
|
+
exports.deleteParagraphBullets = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleDocsAuth,
|
|
14
|
+
name: 'delete_paragraph_bullets',
|
|
15
|
+
displayName: 'Delete Paragraph Bullets',
|
|
16
|
+
description: 'Remove bullet list formatting from paragraphs in a range of a Google Docs document',
|
|
17
|
+
audience: 'ai',
|
|
18
|
+
aiMetadata: {
|
|
19
|
+
description: 'Removes bullet or numbered list formatting from all paragraphs within the given character index range in a Google Docs document. The paragraphs\' text content is preserved; only the list nesting and bullet glyphs are removed. Obtain valid startIndex and endIndex from Get Document End Index (gdocs_get_document_end_index) — indices cannot be guessed. Idempotent: re-running on already plain paragraphs is a no-op.',
|
|
20
|
+
idempotent: true,
|
|
21
|
+
},
|
|
22
|
+
outputSchema: output_schemas_1.deleteParagraphBulletsActionOutputSchema,
|
|
23
|
+
props: {
|
|
24
|
+
documentId: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Document ID',
|
|
26
|
+
description: 'The ID of the document to edit.',
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
29
|
+
startIndex: pieces_framework_1.Property.Number({
|
|
30
|
+
displayName: 'Start Index',
|
|
31
|
+
description: 'Inclusive start character index of the range. Obtain from Get Document End Index (gdocs_get_document_end_index).',
|
|
32
|
+
required: true,
|
|
33
|
+
}),
|
|
34
|
+
endIndex: pieces_framework_1.Property.Number({
|
|
35
|
+
displayName: 'End Index',
|
|
36
|
+
description: 'Exclusive end character index of the range. Must be greater than Start Index. Obtain from Get Document End Index (gdocs_get_document_end_index).',
|
|
37
|
+
required: true,
|
|
38
|
+
}),
|
|
39
|
+
},
|
|
40
|
+
run(context) {
|
|
41
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const { documentId, startIndex, endIndex } = context.propsValue;
|
|
43
|
+
if (endIndex <= startIndex) {
|
|
44
|
+
throw new Error('End Index must be greater than Start Index.');
|
|
45
|
+
}
|
|
46
|
+
const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
|
|
47
|
+
const docs = (0, docs_1.docs)({ version: 'v1', auth: authClient });
|
|
48
|
+
const request = {
|
|
49
|
+
deleteParagraphBullets: {
|
|
50
|
+
range: { startIndex, endIndex },
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
try {
|
|
54
|
+
yield docs.documents.batchUpdate({
|
|
55
|
+
documentId,
|
|
56
|
+
requestBody: { requests: [request] },
|
|
57
|
+
});
|
|
58
|
+
return { success: true, documentId, rangeStart: startIndex, rangeEnd: endIndex };
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
throw new Error(common_1.docsCommon.formatError(error, 'delete paragraph bullets from'));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=delete-paragraph-bullets.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-paragraph-bullets.action.js","sourceRoot":"","sources":["../../../src/lib/actions/delete-paragraph-bullets.action.ts"],"names":[],"mappings":";;;;AAAA,6HAA6H;AAC7H,qEAAqE;AACrE,kCAA6D;AAC7D,sCAAuC;AACvC,gEAAmE;AACnE,2CAA+D;AAC/D,sDAA6E;AAEhE,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,qBAAc;IACpB,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,oFAAoF;IACjG,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,+ZAA+Z;QACja,UAAU,EAAE,IAAI;KACjB;IACD,YAAY,EAAE,yDAAwC;IACtD,KAAK,EAAE;QACL,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC1B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,kHAAkH;YAC/H,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACxB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,kJAAkJ;YAC/J,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEhE,IAAI,QAAQ,IAAI,UAAU,EAAE,CAAC;gBAC3B,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;YACjE,CAAC;YAED,MAAM,UAAU,GAAG,MAAM,IAAA,yBAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1D,MAAM,IAAI,GAAG,IAAA,WAAU,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAE7D,MAAM,OAAO,GAA2B;gBACtC,sBAAsB,EAAE;oBACtB,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE;iBAChC;aACF,CAAC;YAEF,IAAI,CAAC;gBACH,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;oBAC/B,UAAU;oBACV,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE;iBACrC,CAAC,CAAC;gBACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;YACnF,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,mBAAU,CAAC,WAAW,CAAC,KAAK,EAAE,+BAA+B,CAAC,CAAC,CAAC;YAClF,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const deleteTableColumn: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
|
|
3
|
+
userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
}>)[], {
|
|
5
|
+
documentId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
tableStartIndex: import("@agnocon/pieces-framework").NumberProperty<true>;
|
|
7
|
+
rowIndex: import("@agnocon/pieces-framework").NumberProperty<true>;
|
|
8
|
+
columnIndex: import("@agnocon/pieces-framework").NumberProperty<true>;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=delete-table-column.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-table-column.action.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/delete-table-column.action.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,iBAAiB;;;;;;;;EA4D5B,CAAC"}
|