@divyacon/piece-google-docs 0.0.0-stage → 0.1.1
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 +48 -4
- 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
package/LICENSE.MIT-AP
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Activepieces AB
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Derived helpers in this folder are adapted from Activepieces (MIT) for use
|
|
24
|
+
inside CX without depending on @activepieces/* packages at runtime.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { googleDocsAuth, getAccessToken, GoogleDocsAuthValue } from './lib/auth';
|
|
2
|
+
export declare const googleDocs: import("@agnocon/pieces-framework").Piece<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
3
|
+
serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
|
|
4
|
+
userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
}>)[]>;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmDA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjF,eAAO,MAAM,UAAU;;;MAoErB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.googleDocs = exports.getAccessToken = exports.googleDocsAuth = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-docs/src/index.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 pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
const pieces_framework_2 = require("@agnocon/pieces-framework");
|
|
10
|
+
const create_document_1 = require("./lib/actions/create-document");
|
|
11
|
+
const create_document_based_on_template_action_1 = require("./lib/actions/create-document-based-on-template.action");
|
|
12
|
+
const read_document_action_1 = require("./lib/actions/read-document.action");
|
|
13
|
+
const append_text_1 = require("./lib/actions/append-text");
|
|
14
|
+
const find_document_1 = require("./lib/actions/find-document");
|
|
15
|
+
const get_document_plaintext_action_1 = require("./lib/actions/get-document-plaintext.action");
|
|
16
|
+
const replace_all_text_action_1 = require("./lib/actions/replace-all-text.action");
|
|
17
|
+
const search_documents_action_1 = require("./lib/actions/search-documents.action");
|
|
18
|
+
const copy_document_action_1 = require("./lib/actions/copy-document.action");
|
|
19
|
+
const get_document_action_1 = require("./lib/actions/get-document.action");
|
|
20
|
+
const create_text_document_action_1 = require("./lib/actions/create-text-document.action");
|
|
21
|
+
const get_document_end_index_action_1 = require("./lib/actions/get-document-end-index.action");
|
|
22
|
+
const insert_text_action_1 = require("./lib/actions/insert-text.action");
|
|
23
|
+
const delete_content_range_action_1 = require("./lib/actions/delete-content-range.action");
|
|
24
|
+
const create_document_from_markdown_action_1 = require("./lib/actions/create-document-from-markdown.action");
|
|
25
|
+
const create_footer_action_1 = require("./lib/actions/create-footer.action");
|
|
26
|
+
const create_footnote_action_1 = require("./lib/actions/create-footnote.action");
|
|
27
|
+
const create_header_action_1 = require("./lib/actions/create-header.action");
|
|
28
|
+
const create_named_range_action_1 = require("./lib/actions/create-named-range.action");
|
|
29
|
+
const create_paragraph_bullets_action_1 = require("./lib/actions/create-paragraph-bullets.action");
|
|
30
|
+
const delete_footer_action_1 = require("./lib/actions/delete-footer.action");
|
|
31
|
+
const delete_header_action_1 = require("./lib/actions/delete-header.action");
|
|
32
|
+
const delete_named_range_action_1 = require("./lib/actions/delete-named-range.action");
|
|
33
|
+
const delete_paragraph_bullets_action_1 = require("./lib/actions/delete-paragraph-bullets.action");
|
|
34
|
+
const delete_table_column_action_1 = require("./lib/actions/delete-table-column.action");
|
|
35
|
+
const delete_table_row_action_1 = require("./lib/actions/delete-table-row.action");
|
|
36
|
+
const insert_table_action_1 = require("./lib/actions/insert-table.action");
|
|
37
|
+
const insert_table_column_action_1 = require("./lib/actions/insert-table-column.action");
|
|
38
|
+
const insert_table_row_action_1 = require("./lib/actions/insert-table-row.action");
|
|
39
|
+
const insert_text_in_table_cell_action_1 = require("./lib/actions/insert-text-in-table-cell.action");
|
|
40
|
+
const insert_image_in_table_cell_action_1 = require("./lib/actions/insert-image-in-table-cell.action");
|
|
41
|
+
const unmerge_table_cells_action_1 = require("./lib/actions/unmerge-table-cells.action");
|
|
42
|
+
const update_table_row_style_action_1 = require("./lib/actions/update-table-row-style.action");
|
|
43
|
+
const insert_inline_image_action_1 = require("./lib/actions/insert-inline-image.action");
|
|
44
|
+
const insert_page_break_action_1 = require("./lib/actions/insert-page-break.action");
|
|
45
|
+
const replace_image_action_1 = require("./lib/actions/replace-image.action");
|
|
46
|
+
const update_document_style_action_1 = require("./lib/actions/update-document-style.action");
|
|
47
|
+
const export_as_pdf_action_1 = require("./lib/actions/export-as-pdf.action");
|
|
48
|
+
const create_and_populate_table_action_1 = require("./lib/actions/create-and-populate-table.action");
|
|
49
|
+
const replace_body_with_markdown_action_1 = require("./lib/actions/replace-body-with-markdown.action");
|
|
50
|
+
const replace_section_with_markdown_action_1 = require("./lib/actions/replace-section-with-markdown.action");
|
|
51
|
+
const batch_update_action_1 = require("./lib/actions/batch-update.action");
|
|
52
|
+
const new_document_1 = require("./lib/triggers/new-document");
|
|
53
|
+
const auth_1 = require("./lib/auth");
|
|
54
|
+
var auth_2 = require("./lib/auth");
|
|
55
|
+
Object.defineProperty(exports, "googleDocsAuth", { enumerable: true, get: function () { return auth_2.googleDocsAuth; } });
|
|
56
|
+
Object.defineProperty(exports, "getAccessToken", { enumerable: true, get: function () { return auth_2.getAccessToken; } });
|
|
57
|
+
exports.googleDocs = (0, pieces_framework_1.createPiece)({
|
|
58
|
+
displayName: 'Google Docs',
|
|
59
|
+
description: 'Create and edit documents online',
|
|
60
|
+
minimumSupportedRelease: '0.86.4',
|
|
61
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/google-docs.png',
|
|
62
|
+
categories: [pieces_framework_2.PieceCategory.CONTENT_AND_FILES],
|
|
63
|
+
authors: [
|
|
64
|
+
'pfernandez98',
|
|
65
|
+
'kishanprmr',
|
|
66
|
+
'MoShizzle',
|
|
67
|
+
'khaledmashaly',
|
|
68
|
+
'abuaboud',
|
|
69
|
+
'AbdullahBitar',
|
|
70
|
+
'Kevinyu-alan'
|
|
71
|
+
],
|
|
72
|
+
auth: auth_1.googleDocsAuth,
|
|
73
|
+
actions: [
|
|
74
|
+
create_document_1.createDocument,
|
|
75
|
+
create_document_based_on_template_action_1.createDocumentBasedOnTemplate,
|
|
76
|
+
read_document_action_1.readDocument,
|
|
77
|
+
find_document_1.findDocumentAction,
|
|
78
|
+
get_document_plaintext_action_1.getDocumentPlaintext,
|
|
79
|
+
replace_all_text_action_1.replaceAllText,
|
|
80
|
+
search_documents_action_1.searchDocuments,
|
|
81
|
+
copy_document_action_1.copyDocument,
|
|
82
|
+
get_document_end_index_action_1.getDocumentEndIndex,
|
|
83
|
+
insert_text_action_1.insertText,
|
|
84
|
+
delete_content_range_action_1.deleteContentRange,
|
|
85
|
+
create_document_from_markdown_action_1.createDocumentFromMarkdown,
|
|
86
|
+
get_document_action_1.getDocument,
|
|
87
|
+
create_text_document_action_1.createTextDocument,
|
|
88
|
+
create_footer_action_1.createFooter,
|
|
89
|
+
create_footnote_action_1.createFootnote,
|
|
90
|
+
create_header_action_1.createHeader,
|
|
91
|
+
create_named_range_action_1.createNamedRange,
|
|
92
|
+
create_paragraph_bullets_action_1.createParagraphBullets,
|
|
93
|
+
delete_footer_action_1.deleteFooter,
|
|
94
|
+
delete_header_action_1.deleteHeader,
|
|
95
|
+
delete_named_range_action_1.deleteNamedRange,
|
|
96
|
+
delete_paragraph_bullets_action_1.deleteParagraphBullets,
|
|
97
|
+
delete_table_column_action_1.deleteTableColumn,
|
|
98
|
+
delete_table_row_action_1.deleteTableRow,
|
|
99
|
+
insert_table_action_1.insertTable,
|
|
100
|
+
insert_table_column_action_1.insertTableColumn,
|
|
101
|
+
insert_table_row_action_1.insertTableRow,
|
|
102
|
+
insert_text_in_table_cell_action_1.insertTextInTableCell,
|
|
103
|
+
insert_image_in_table_cell_action_1.insertImageInTableCell,
|
|
104
|
+
unmerge_table_cells_action_1.unmergeTableCells,
|
|
105
|
+
update_table_row_style_action_1.updateTableRowStyle,
|
|
106
|
+
insert_inline_image_action_1.insertInlineImage,
|
|
107
|
+
insert_page_break_action_1.insertPageBreak,
|
|
108
|
+
replace_image_action_1.replaceImage,
|
|
109
|
+
update_document_style_action_1.updateDocumentStyle,
|
|
110
|
+
export_as_pdf_action_1.exportAsPdf,
|
|
111
|
+
create_and_populate_table_action_1.createAndPopulateTable,
|
|
112
|
+
replace_body_with_markdown_action_1.replaceBodyWithMarkdown,
|
|
113
|
+
replace_section_with_markdown_action_1.replaceSectionWithMarkdown,
|
|
114
|
+
batch_update_action_1.batchUpdate,
|
|
115
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
116
|
+
baseUrl: () => 'https://docs.googleapis.com/v1',
|
|
117
|
+
auth: auth_1.googleDocsAuth,
|
|
118
|
+
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
119
|
+
return ({
|
|
120
|
+
Authorization: `Bearer ${yield (0, auth_1.getAccessToken)(auth)}`,
|
|
121
|
+
});
|
|
122
|
+
}),
|
|
123
|
+
}),
|
|
124
|
+
append_text_1.appendText,
|
|
125
|
+
],
|
|
126
|
+
triggers: [new_document_1.newDocumentTrigger],
|
|
127
|
+
});
|
|
128
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,uFAAuF;AACvF,qEAAqE;AACrE,gEAAwD;AAExD,0DAAmE;AACnE,gEAA0D;AAC1D,mEAA+D;AAC/D,qHAAuG;AACvG,6EAAkE;AAClE,2DAAuD;AACvD,+DAAiE;AACjE,+FAAmF;AACnF,mFAAuE;AACvE,mFAAwE;AACxE,6EAAkE;AAClE,2EAAgE;AAChE,2FAA+E;AAC/E,+FAAkF;AAClF,yEAA8D;AAC9D,2FAA+E;AAC/E,6GAAgG;AAChG,6EAAkE;AAClE,iFAAsE;AACtE,6EAAkE;AAClE,uFAA2E;AAC3E,mGAAuF;AACvF,6EAAkE;AAClE,6EAAkE;AAClE,uFAA2E;AAC3E,mGAAuF;AACvF,yFAA6E;AAC7E,mFAAuE;AACvE,2EAAgE;AAChE,yFAA6E;AAC7E,mFAAuE;AACvE,qGAAuF;AACvF,uGAAyF;AACzF,yFAA6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AI,EAAE,qBAAc;YACpB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC7B,aAAa,EAAE,UAAU,MAAM,IAAA,qBAAc,EAAC,IAA2B,CAAC,EAAE;iBAC5E,CAAC,CAAA;cAAA;SACF,CAAC;QACF,wBAAU;KACV;IACD,QAAQ,EAAE,CAAC,iCAAkB,CAAC;CAC9B,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const appendText: 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
|
+
text: import("@agnocon/pieces-framework").LongTextProperty<true>;
|
|
6
|
+
documentId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=append-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"append-text.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/append-text.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,UAAU;;;;;;EA+BnB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appendText = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-docs/src/lib/actions/append-text.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
const auth_1 = require("../auth");
|
|
9
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
10
|
+
const output_schemas_1 = require("../output-schemas");
|
|
11
|
+
exports.appendText = (0, pieces_framework_1.createAction)({
|
|
12
|
+
auth: auth_1.googleDocsAuth,
|
|
13
|
+
name: 'append_text',
|
|
14
|
+
description: 'Appends text to google docs',
|
|
15
|
+
audience: 'human',
|
|
16
|
+
aiMetadata: {
|
|
17
|
+
description: 'Appends text to the end of an existing Google Docs document identified by its ID. Use when an agent needs to add content to a known document without altering its existing text. Requires the document ID; not idempotent, since each call inserts the text again, accumulating duplicates.',
|
|
18
|
+
idempotent: false,
|
|
19
|
+
},
|
|
20
|
+
displayName: 'Append text to google docs',
|
|
21
|
+
props: {
|
|
22
|
+
text: pieces_framework_1.Property.LongText({
|
|
23
|
+
displayName: 'Text to append',
|
|
24
|
+
description: 'The text to append to the document',
|
|
25
|
+
required: true,
|
|
26
|
+
}),
|
|
27
|
+
documentId: pieces_framework_1.Property.ShortText({
|
|
28
|
+
displayName: 'Document ID',
|
|
29
|
+
description: 'The ID of the document to append text to',
|
|
30
|
+
required: true,
|
|
31
|
+
})
|
|
32
|
+
},
|
|
33
|
+
outputSchema: output_schemas_1.appendTextActionOutputSchema,
|
|
34
|
+
run(context) {
|
|
35
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
return yield common_1.docsCommon.writeToDocument(context.propsValue.documentId, context.propsValue.text, yield (0, auth_1.getAccessToken)(context.auth));
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=append-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"append-text.js","sourceRoot":"","sources":["../../../src/lib/actions/append-text.ts"],"names":[],"mappings":";;;;AAAA,yGAAyG;AACzG,qEAAqE;AACrE,sCAAuC;AACvC,kCAAyD;AACzD,gEAAmE;AACnE,sDAAiE;AAEpD,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACnC,IAAI,EAAE,qBAAc;IACpB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,6BAA6B;IAC1C,QAAQ,EAAE,OAAO;IACjB,UAAU,EAAE;QACV,WAAW,EACT,6RAA6R;QAC/R,UAAU,EAAE,KAAK;KAClB;IACD,WAAW,EAAE,4BAA4B;IACzC,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACD,YAAY,EAAE,6CAA4B;IACpC,GAAG,CAAC,OAAO;;YACf,OAAO,MAAM,mBAAU,CAAC,eAAe,CACrC,OAAO,CAAC,UAAU,CAAC,UAAU,EAC7B,OAAO,CAAC,UAAU,CAAC,IAAI,EACvB,MAAM,IAAA,qBAAc,EAAC,OAAO,CAAC,IAAI,CAAC,CACnC,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const batchUpdate: 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
|
+
requests: import("@agnocon/pieces-framework").JsonProperty<true>;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=batch-update.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch-update.action.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/batch-update.action.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW;;;;;;EAmDtB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.batchUpdate = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-docs/src/lib/actions/batch-update.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.batchUpdate = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleDocsAuth,
|
|
14
|
+
name: 'batch_update',
|
|
15
|
+
displayName: 'Batch Update (Advanced)',
|
|
16
|
+
description: 'Send a raw Google Docs batchUpdate requests array to a document',
|
|
17
|
+
audience: 'ai',
|
|
18
|
+
aiMetadata: {
|
|
19
|
+
description: 'Advanced escape hatch that sends a raw array of Google Docs API batchUpdate request objects directly to documents.batchUpdate. Only for callers who know the Google Docs API and need a request kind not covered by a dedicated atomic — prefer the specific atomics (Insert Text, Create Header, Insert Table, Delete Content Range, etc.) for common operations, as they validate inputs and resolve indices for you. Each request is a Docs API Request object, e.g. {"insertText":{"text":"hi","location":{"index":1}}}; requests run in order and indices must already account for prior edits in the same call. Not idempotent in general (depends on the requests supplied).',
|
|
20
|
+
idempotent: false,
|
|
21
|
+
},
|
|
22
|
+
outputSchema: output_schemas_1.batchUpdateActionOutputSchema,
|
|
23
|
+
props: {
|
|
24
|
+
documentId: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Document ID',
|
|
26
|
+
description: 'The ID of the document to update.',
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
29
|
+
requests: pieces_framework_1.Property.Json({
|
|
30
|
+
displayName: 'Requests',
|
|
31
|
+
description: 'An array of raw Google Docs batchUpdate request objects, e.g. [{"insertText":{"text":"hi","location":{"index":1}}}]. See the Google Docs API documents.batchUpdate reference for the available request kinds.',
|
|
32
|
+
required: true,
|
|
33
|
+
}),
|
|
34
|
+
},
|
|
35
|
+
run(context) {
|
|
36
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
var _a;
|
|
38
|
+
const { documentId, requests } = context.propsValue;
|
|
39
|
+
if (!Array.isArray(requests)) {
|
|
40
|
+
throw new Error('Requests must be an array of Google Docs batchUpdate request objects.');
|
|
41
|
+
}
|
|
42
|
+
const docsRequests = requests;
|
|
43
|
+
const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
|
|
44
|
+
const docs = (0, docs_1.docs)({ version: 'v1', auth: authClient });
|
|
45
|
+
try {
|
|
46
|
+
const response = yield docs.documents.batchUpdate({
|
|
47
|
+
documentId,
|
|
48
|
+
requestBody: { requests: docsRequests },
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
success: true,
|
|
52
|
+
documentId,
|
|
53
|
+
appliedRequests: docsRequests.length,
|
|
54
|
+
replies: (_a = response.data.replies) !== null && _a !== void 0 ? _a : [],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
throw new Error(common_1.docsCommon.formatError(error, 'apply a batch update to'));
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=batch-update.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch-update.action.js","sourceRoot":"","sources":["../../../src/lib/actions/batch-update.action.ts"],"names":[],"mappings":";;;;AAAA,iHAAiH;AACjH,qEAAqE;AACrE,kCAA6D;AAC7D,sCAAuC;AACvC,gEAAmE;AAC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OAAO,EAAE,IAAI;oBACb,UAAU;oBACV,eAAe,EAAE,YAAY,CAAC,MAAM;oBACpC,OAAO,EAAE,MAAA,QAAQ,CAAC,IAAI,CAAC,OAAO,mCAAI,EAAE;iBACrC,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,mBAAU,CAAC,WAAW,CAAC,KAAK,EAAE,yBAAyB,CAAC,CAAC,CAAC;YAC5E,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const copyDocument: 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
|
+
fileId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
title: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
parents: import("@agnocon/pieces-framework").DropdownProperty<string, false, (import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
8
|
+
serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
|
|
9
|
+
userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
10
|
+
}>)[]>;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=copy-document.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-document.action.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/copy-document.action.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;;;;;;;;EAmEvB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.copyDocument = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-docs/src/lib/actions/copy-document.action.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
9
|
+
const drive_1 = require("@googleapis/drive");
|
|
10
|
+
const props_1 = require("../common/props");
|
|
11
|
+
const output_schemas_1 = require("../output-schemas");
|
|
12
|
+
exports.copyDocument = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleDocsAuth,
|
|
14
|
+
name: 'copy_document',
|
|
15
|
+
displayName: 'Copy Document',
|
|
16
|
+
description: 'Create a copy of an existing Google Docs document.',
|
|
17
|
+
audience: 'ai',
|
|
18
|
+
aiMetadata: {
|
|
19
|
+
description: 'Duplicates an existing Google Docs document into a new file with the given title. Pick this to spin a working copy off a template or snapshot a version before editing; it is distinct from Edit Template File, which merges data in place. Each call creates a new file, so it is not idempotent (retries produce duplicates).',
|
|
20
|
+
idempotent: false,
|
|
21
|
+
},
|
|
22
|
+
outputSchema: output_schemas_1.copyDocumentActionOutputSchema,
|
|
23
|
+
props: {
|
|
24
|
+
fileId: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Source Document ID',
|
|
26
|
+
description: "The ID of the document to copy, found in its URL: 'https://docs.google.com/document/d/<documentId>/edit'.",
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
29
|
+
title: pieces_framework_1.Property.ShortText({
|
|
30
|
+
displayName: 'New Document Title',
|
|
31
|
+
description: 'The name to give the copied document.',
|
|
32
|
+
required: true,
|
|
33
|
+
}),
|
|
34
|
+
// Destination folder maps directly to the native Drive files.copy
|
|
35
|
+
// endpoint (the requestBody.parents field), letting the copy be placed in
|
|
36
|
+
// a chosen folder instead of defaulting to the source document's location.
|
|
37
|
+
parents: props_1.folderIdProp,
|
|
38
|
+
},
|
|
39
|
+
run(context) {
|
|
40
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
var _a, _b, _c, _d;
|
|
42
|
+
const { fileId, title, parents } = context.propsValue;
|
|
43
|
+
const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
|
|
44
|
+
const drive = (0, drive_1.drive)({ version: 'v3', auth: authClient });
|
|
45
|
+
try {
|
|
46
|
+
const response = yield drive.files.copy({
|
|
47
|
+
fileId,
|
|
48
|
+
supportsAllDrives: true,
|
|
49
|
+
fields: 'id, name, webViewLink, parents',
|
|
50
|
+
requestBody: Object.assign({ name: title }, (parents ? { parents: [parents] } : {})),
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
id: (_a = response.data.id) !== null && _a !== void 0 ? _a : '',
|
|
54
|
+
name: (_b = response.data.name) !== null && _b !== void 0 ? _b : '',
|
|
55
|
+
webViewLink: (_c = response.data.webViewLink) !== null && _c !== void 0 ? _c : '',
|
|
56
|
+
parents: (_d = response.data.parents) !== null && _d !== void 0 ? _d : [],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
catch (e) {
|
|
60
|
+
const error = e;
|
|
61
|
+
if (error.code === 403) {
|
|
62
|
+
throw new Error('Permission denied copying the document. Ensure the connected account has access to the source document and the destination folder.');
|
|
63
|
+
}
|
|
64
|
+
if (error.code === 404) {
|
|
65
|
+
throw new Error(`Source document not found for ID '${fileId}'. Verify the document ID.`);
|
|
66
|
+
}
|
|
67
|
+
throw e;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=copy-document.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-document.action.js","sourceRoot":"","sources":["../../../src/lib/actions/copy-document.action.ts"],"names":[],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AK,IACR,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAC1C;iBACD,CAAC,CAAC;gBAEH,OAAO;oBACN,EAAE,EAAE,MAAA,QAAQ,CAAC,IAAI,CAAC,EAAE,mCAAI,EAAE;oBAC1B,IAAI,EAAE,MAAA,QAAQ,CAAC,IAAI,CAAC,IAAI,mCAAI,EAAE;oBAC9B,WAAW,EAAE,MAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,mCAAI,EAAE;oBAC5C,OAAO,EAAE,MAAA,QAAQ,CAAC,IAAI,CAAC,OAAO,mCAAI,EAAE;iBACpC,CAAC;YACH,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACZ,MAAM,KAAK,GAAG,CAAwC,CAAC;gBACvD,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACxB,MAAM,IAAI,KAAK,CACd,oIAAoI,CACpI,CAAC;gBACH,CAAC;gBACD,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACxB,MAAM,IAAI,KAAK,CACd,qCAAqC,MAAM,4BAA4B,CACvE,CAAC;gBACH,CAAC;gBACD,MAAM,CAAC,CAAC;YACT,CAAC;QACF,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const createAndPopulateTable: 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
|
+
data: import("@agnocon/pieces-framework").JsonProperty<true>;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=create-and-populate-table.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-and-populate-table.action.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/create-and-populate-table.action.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,sBAAsB;;;;;;EAwHjC,CAAC"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createAndPopulateTable = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-docs/src/lib/actions/create-and-populate-table.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.createAndPopulateTable = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleDocsAuth,
|
|
14
|
+
name: 'create_and_populate_table',
|
|
15
|
+
displayName: 'Create and Populate Table',
|
|
16
|
+
description: 'Insert a table into a Google Docs document and fill its cells with text',
|
|
17
|
+
audience: 'ai',
|
|
18
|
+
aiMetadata: {
|
|
19
|
+
description: 'Inserts a new table at the end of a Google Docs document, sized to the supplied 2D array of strings, and writes each value into its cell in one operation — so an agent can drop a fully-populated table without computing cell indices. The column count is the width of the widest row; shorter rows leave their trailing cells empty. Not idempotent: each call adds another table.',
|
|
20
|
+
idempotent: false,
|
|
21
|
+
},
|
|
22
|
+
outputSchema: output_schemas_1.createAndPopulateTableActionOutputSchema,
|
|
23
|
+
props: {
|
|
24
|
+
documentId: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Document ID',
|
|
26
|
+
description: 'The ID of the document to insert the table into.',
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
29
|
+
data: pieces_framework_1.Property.Json({
|
|
30
|
+
displayName: 'Table Data',
|
|
31
|
+
description: 'A 2D array of strings (rows of columns), e.g. [["Name","Age"],["Alice","30"]]. Each string is written into its matching cell. The table width is the widest row; shorter rows leave trailing cells empty.',
|
|
32
|
+
required: true,
|
|
33
|
+
}),
|
|
34
|
+
},
|
|
35
|
+
run(context) {
|
|
36
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
var _a, _b, _c, _d, _e, _f;
|
|
38
|
+
const { documentId, data } = context.propsValue;
|
|
39
|
+
const rowsData = data;
|
|
40
|
+
if (!Array.isArray(rowsData) || rowsData.length === 0 || !rowsData.every((row) => Array.isArray(row))) {
|
|
41
|
+
throw new Error('Table Data must be a non-empty 2D array of strings (rows of columns).');
|
|
42
|
+
}
|
|
43
|
+
const tableData = rowsData;
|
|
44
|
+
const rows = tableData.length;
|
|
45
|
+
const columns = Math.max(...tableData.map((row) => row.length));
|
|
46
|
+
if (columns === 0) {
|
|
47
|
+
throw new Error('Table Data rows must contain at least one column.');
|
|
48
|
+
}
|
|
49
|
+
const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
|
|
50
|
+
const docs = (0, docs_1.docs)({ version: 'v1', auth: authClient });
|
|
51
|
+
// Append at the end of the body so the new table is unambiguously the last
|
|
52
|
+
// one in the document when we read back to resolve its cell indices.
|
|
53
|
+
const insertTableRequest = {
|
|
54
|
+
insertTable: { rows, columns, endOfSegmentLocation: {} },
|
|
55
|
+
};
|
|
56
|
+
try {
|
|
57
|
+
yield docs.documents.batchUpdate({
|
|
58
|
+
documentId,
|
|
59
|
+
requestBody: { requests: [insertTableRequest] },
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
throw new Error(common_1.docsCommon.formatError(error, 'insert a table into'));
|
|
64
|
+
}
|
|
65
|
+
let reloaded;
|
|
66
|
+
try {
|
|
67
|
+
const response = yield docs.documents.get({ documentId });
|
|
68
|
+
reloaded = response.data;
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
throw new Error(common_1.docsCommon.formatError(error, 'read back the new table in'));
|
|
72
|
+
}
|
|
73
|
+
const content = (_b = (_a = reloaded.body) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : [];
|
|
74
|
+
const tableElement = findLastTable(content);
|
|
75
|
+
if (!(tableElement === null || tableElement === void 0 ? void 0 : tableElement.table)) {
|
|
76
|
+
throw new Error('Could not locate the inserted table when reading the document back.');
|
|
77
|
+
}
|
|
78
|
+
const cellInserts = [];
|
|
79
|
+
const tableRows = (_c = tableElement.table.tableRows) !== null && _c !== void 0 ? _c : [];
|
|
80
|
+
for (let r = 0; r < tableRows.length; r++) {
|
|
81
|
+
const cells = (_d = tableRows[r].tableCells) !== null && _d !== void 0 ? _d : [];
|
|
82
|
+
for (let c = 0; c < cells.length; c++) {
|
|
83
|
+
const value = (_e = tableData[r]) === null || _e === void 0 ? void 0 : _e[c];
|
|
84
|
+
if (value === undefined || value === null || value === '') {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
const cellContent = (_f = cells[c].content) !== null && _f !== void 0 ? _f : [];
|
|
88
|
+
const firstParagraph = cellContent[0];
|
|
89
|
+
const insertIndex = firstParagraph === null || firstParagraph === void 0 ? void 0 : firstParagraph.startIndex;
|
|
90
|
+
if (insertIndex === undefined || insertIndex === null) {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
cellInserts.push({ insertText: { text: String(value), location: { index: insertIndex } } });
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
// Apply highest-index inserts first so earlier (lower) indices stay valid as
|
|
97
|
+
// text shifts the document; each insert below an applied one is unaffected.
|
|
98
|
+
cellInserts.sort((a, b) => { var _a, _b, _c, _d, _e, _f; return ((_c = (_b = (_a = b.insertText) === null || _a === void 0 ? void 0 : _a.location) === null || _b === void 0 ? void 0 : _b.index) !== null && _c !== void 0 ? _c : 0) - ((_f = (_e = (_d = a.insertText) === null || _d === void 0 ? void 0 : _d.location) === null || _e === void 0 ? void 0 : _e.index) !== null && _f !== void 0 ? _f : 0); });
|
|
99
|
+
if (cellInserts.length > 0) {
|
|
100
|
+
try {
|
|
101
|
+
yield docs.documents.batchUpdate({
|
|
102
|
+
documentId,
|
|
103
|
+
requestBody: {
|
|
104
|
+
requests: cellInserts,
|
|
105
|
+
// Fail loudly instead of misplacing text if the document changed
|
|
106
|
+
// between the read-back above and this write.
|
|
107
|
+
writeControl: reloaded.revisionId
|
|
108
|
+
? { requiredRevisionId: reloaded.revisionId }
|
|
109
|
+
: undefined,
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
throw new Error(common_1.docsCommon.formatError(error, 'populate the new table in'));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
success: true,
|
|
119
|
+
documentId,
|
|
120
|
+
rows,
|
|
121
|
+
columns,
|
|
122
|
+
cellsPopulated: cellInserts.length,
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
// The table appended at end-of-body has the greatest startIndex, so the last
|
|
128
|
+
// table element in document order is unambiguously the one just inserted.
|
|
129
|
+
function findLastTable(content) {
|
|
130
|
+
let match;
|
|
131
|
+
for (const element of content) {
|
|
132
|
+
if (element.table) {
|
|
133
|
+
match = element;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return match;
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=create-and-populate-table.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-and-populate-table.action.js","sourceRoot":"","sources":["../../../src/lib/actions/create-and-populate-table.action.ts"],"names":[],"mappings":";;;;AAAA,8HAA8H;AAC9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,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YAClB,KAAK,GAAG,OAAO,CAAC;QAClB,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const createDocumentBasedOnTemplate: 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
|
+
template: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
values: import("@agnocon/pieces-framework").ObjectProperty<true>;
|
|
7
|
+
images: import("@agnocon/pieces-framework").ObjectProperty<true>;
|
|
8
|
+
placeholder_format: import("@agnocon/pieces-framework").StaticDropdownProperty<string, true>;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=create-document-based-on-template.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-document-based-on-template.action.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/create-document-based-on-template.action.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,6BAA6B;;;;;;;;EA4FxC,CAAC"}
|