runline 0.11.6 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/actions.js +3 -1
- package/dist/core/engine.js +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/plugin/api.d.ts +2 -1
- package/dist/plugin/types.d.ts +2 -0
- package/dist/plugins/_shared/googleSchemas.js +23 -0
- package/dist/plugins/actionNetwork/src/index.js +23 -0
- package/dist/plugins/activeCampaign/src/index.js +48 -0
- package/dist/plugins/adalo/src/index.js +5 -0
- package/dist/plugins/affinity/src/index.js +16 -0
- package/dist/plugins/agileCrm/src/index.js +15 -0
- package/dist/plugins/airtable/src/index.js +10 -0
- package/dist/plugins/airtop/src/index.js +24 -0
- package/dist/plugins/apiTemplateIo/src/index.js +4 -0
- package/dist/plugins/asana/src/index.js +22 -0
- package/dist/plugins/autopilot/src/index.js +11 -0
- package/dist/plugins/bambooHr/src/index.js +11 -0
- package/dist/plugins/bannerbear/src/index.js +4 -0
- package/dist/plugins/baserow/src/index.js +8 -0
- package/dist/plugins/beeminder/src/index.js +18 -0
- package/dist/plugins/bitly/src/index.js +3 -0
- package/dist/plugins/bitwarden/src/index.js +19 -0
- package/dist/plugins/box/src/index.js +11 -0
- package/dist/plugins/brandfetch/src/index.js +5 -0
- package/dist/plugins/brevo/src/index.js +15 -0
- package/dist/plugins/bubble/src/index.js +5 -0
- package/dist/plugins/chargebee/src/index.js +5 -0
- package/dist/plugins/circleci/src/index.js +3 -0
- package/dist/plugins/ciscoWebex/src/index.js +10 -0
- package/dist/plugins/clearbit/src/index.js +3 -0
- package/dist/plugins/clickup/src/index.js +61 -0
- package/dist/plugins/clockify/src/index.js +25 -0
- package/dist/plugins/cloudflare/src/index.js +4 -0
- package/dist/plugins/cockpit/src/index.js +5 -0
- package/dist/plugins/coda/src/index.js +18 -0
- package/dist/plugins/coingecko/src/index.js +10 -0
- package/dist/plugins/contentful/src/index.js +7 -0
- package/dist/plugins/convertkit/src/index.js +16 -0
- package/dist/plugins/copper/src/index.js +7 -0
- package/dist/plugins/cortex/src/index.js +4 -0
- package/dist/plugins/currents/src/index.js +22 -0
- package/dist/plugins/customerIo/src/index.js +9 -0
- package/dist/plugins/databricks/src/index.js +34 -0
- package/dist/plugins/deepl/src/index.js +2 -0
- package/dist/plugins/demio/src/index.js +4 -0
- package/dist/plugins/dhl/src/index.js +1 -0
- package/dist/plugins/discord/src/index.js +13 -0
- package/dist/plugins/discourse/src/index.js +16 -0
- package/dist/plugins/disqus/src/index.js +4 -0
- package/dist/plugins/docker/src/index.js +5 -0
- package/dist/plugins/drift/src/index.js +5 -0
- package/dist/plugins/dropbox/src/index.js +9 -0
- package/dist/plugins/dropcontact/src/index.js +2 -0
- package/dist/plugins/egoi/src/index.js +4 -0
- package/dist/plugins/elasticsearch/src/index.js +9 -0
- package/dist/plugins/emelia/src/index.js +9 -0
- package/dist/plugins/erpnext/src/index.js +5 -0
- package/dist/plugins/facebookGraph/src/index.js +1 -0
- package/dist/plugins/freshdesk/src/index.js +10 -0
- package/dist/plugins/freshservice/src/index.js +7 -0
- package/dist/plugins/freshworksCrm/src/index.js +7 -0
- package/dist/plugins/getresponse/src/index.js +5 -0
- package/dist/plugins/ghost/src/index.js +5 -0
- package/dist/plugins/github/src/index.js +37 -0
- package/dist/plugins/gitlab/src/index.js +17 -0
- package/dist/plugins/gmail/src/index.js +200 -184
- package/dist/plugins/gong/src/index.js +4 -0
- package/dist/plugins/googleAppsScript/src/index.js +98 -43
- package/dist/plugins/googleCalendar/src/index.js +329 -250
- package/dist/plugins/googleContacts/src/index.js +144 -145
- package/dist/plugins/googleDocs/src/documents.js +31 -38
- package/dist/plugins/googleDocs/src/formatting.js +51 -47
- package/dist/plugins/googleDocs/src/images.js +23 -26
- package/dist/plugins/googleDocs/src/shared.js +55 -0
- package/dist/plugins/googleDocs/src/structure.js +111 -123
- package/dist/plugins/googleDocs/src/tables.js +103 -154
- package/dist/plugins/googleDocs/src/tabs.js +27 -23
- package/dist/plugins/googleDocs/src/text.js +106 -136
- package/dist/plugins/googleDrive/src/index.js +461 -408
- package/dist/plugins/googleImage/src/index.js +14 -16
- package/dist/plugins/googleSheets/src/index.js +527 -339
- package/dist/plugins/googleSlides/src/index.js +92 -72
- package/dist/plugins/googleTasks/src/index.js +94 -92
- package/dist/plugins/gotify/src/index.js +3 -0
- package/dist/plugins/gotowebinar/src/index.js +20 -0
- package/dist/plugins/grafana/src/index.js +17 -0
- package/dist/plugins/graphql/src/index.js +2 -0
- package/dist/plugins/grist/src/index.js +4 -0
- package/dist/plugins/hackernews/src/index.js +6 -0
- package/dist/plugins/halopsa/src/index.js +5 -0
- package/dist/plugins/harvest/src/index.js +14 -0
- package/dist/plugins/helpscout/src/index.js +13 -0
- package/dist/plugins/highlevel/src/index.js +17 -0
- package/dist/plugins/homeAssistant/src/index.js +13 -0
- package/dist/plugins/hubspot/src/index.js +14 -0
- package/dist/plugins/humanticAi/src/index.js +3 -0
- package/dist/plugins/hunter/src/index.js +3 -0
- package/dist/plugins/intercom/src/index.js +10 -0
- package/dist/plugins/iterable/src/index.js +6 -0
- package/dist/plugins/jenkins/src/index.js +11 -0
- package/dist/plugins/jira/src/index.js +16 -0
- package/dist/plugins/keap/src/index.js +28 -0
- package/dist/plugins/kobotoolbox/src/index.js +17 -0
- package/dist/plugins/lemlist/src/index.js +15 -0
- package/dist/plugins/linear/src/attachments.js +6 -0
- package/dist/plugins/linear/src/comments.js +5 -0
- package/dist/plugins/linear/src/cycles.js +2 -0
- package/dist/plugins/linear/src/initiatives.js +5 -0
- package/dist/plugins/linear/src/issues.js +14 -0
- package/dist/plugins/linear/src/labels.js +5 -0
- package/dist/plugins/linear/src/organization.js +1 -0
- package/dist/plugins/linear/src/projects.js +11 -0
- package/dist/plugins/linear/src/shared.js +2 -0
- package/dist/plugins/linear/src/states.js +2 -0
- package/dist/plugins/linear/src/teams.js +3 -0
- package/dist/plugins/linear/src/users.js +2 -0
- package/dist/plugins/linear/src/views.js +4 -0
- package/dist/plugins/linear/src/webhooks.js +4 -0
- package/dist/plugins/lingvanex/src/index.js +1 -0
- package/dist/plugins/linkedin/src/index.js +1 -0
- package/dist/plugins/lonescale/src/index.js +4 -0
- package/dist/plugins/magento/src/index.js +15 -0
- package/dist/plugins/mailcheck/src/index.js +1 -0
- package/dist/plugins/mailchimp/src/index.js +14 -0
- package/dist/plugins/mailerlite/src/index.js +4 -0
- package/dist/plugins/mailgun/src/index.js +1 -0
- package/dist/plugins/mailjet/src/index.js +3 -0
- package/dist/plugins/mandrill/src/index.js +2 -0
- package/dist/plugins/marketstack/src/index.js +3 -0
- package/dist/plugins/matrix/src/index.js +10 -0
- package/dist/plugins/mattermost/src/index.js +19 -0
- package/dist/plugins/mautic/src/index.js +20 -0
- package/dist/plugins/medium/src/index.js +3 -0
- package/dist/plugins/messagebird/src/index.js +2 -0
- package/dist/plugins/metabase/src/index.js +10 -0
- package/dist/plugins/microsoftCalendar/src/index.js +2 -0
- package/dist/plugins/microsoftFiles/src/index.js +5 -0
- package/dist/plugins/microsoftMail/src/index.js +4 -0
- package/dist/plugins/misp/src/index.js +44 -0
- package/dist/plugins/mocean/src/index.js +2 -0
- package/dist/plugins/monday/src/index.js +18 -0
- package/dist/plugins/monicaCrm/src/index.js +5 -0
- package/dist/plugins/msg91/src/index.js +1 -0
- package/dist/plugins/nasa/src/index.js +7 -0
- package/dist/plugins/netlify/src/index.js +7 -0
- package/dist/plugins/netscalerAdc/src/index.js +3 -0
- package/dist/plugins/nextcloud/src/index.js +13 -0
- package/dist/plugins/nocodb/src/index.js +5 -0
- package/dist/plugins/node/src/index.js +38 -0
- package/dist/plugins/notion/src/index.js +14 -0
- package/dist/plugins/npm/src/index.js +5 -0
- package/dist/plugins/odoo/src/index.js +6 -0
- package/dist/plugins/okta/src/index.js +5 -0
- package/dist/plugins/oneSimpleApi/src/index.js +10 -0
- package/dist/plugins/onfleet/src/index.js +24 -0
- package/dist/plugins/openThesaurus/src/index.js +1 -0
- package/dist/plugins/openai/src/index.js +1 -0
- package/dist/plugins/openweathermap/src/index.js +2 -0
- package/dist/plugins/oura/src/index.js +2 -0
- package/dist/plugins/paddle/src/index.js +9 -0
- package/dist/plugins/pagerduty/src/index.js +9 -0
- package/dist/plugins/parallel/src/index.js +1 -0
- package/dist/plugins/paypal/src/index.js +4 -0
- package/dist/plugins/peekalink/src/index.js +2 -0
- package/dist/plugins/phantombuster/src/index.js +5 -0
- package/dist/plugins/philipsHue/src/index.js +4 -0
- package/dist/plugins/pipedrive/src/index.js +14 -0
- package/dist/plugins/plivo/src/index.js +3 -0
- package/dist/plugins/postbin/src/index.js +6 -0
- package/dist/plugins/posthog/src/index.js +5 -0
- package/dist/plugins/profitwell/src/index.js +2 -0
- package/dist/plugins/pushbullet/src/index.js +4 -0
- package/dist/plugins/pushcut/src/index.js +1 -0
- package/dist/plugins/pushover/src/index.js +1 -0
- package/dist/plugins/quickbase/src/index.js +8 -0
- package/dist/plugins/quickbooks/src/index.js +5 -0
- package/dist/plugins/quickchart/src/index.js +1 -0
- package/dist/plugins/raindrop/src/index.js +13 -0
- package/dist/plugins/recraft/src/index.js +1 -0
- package/dist/plugins/reddit/src/index.js +10 -0
- package/dist/plugins/replicate/src/index.js +1 -0
- package/dist/plugins/rocketchat/src/index.js +1 -0
- package/dist/plugins/rundeck/src/index.js +2 -0
- package/dist/plugins/salesforce/src/metadata.js +4 -0
- package/dist/plugins/salesforce/src/query.js +5 -0
- package/dist/plugins/salesforce/src/sobjects.js +12 -0
- package/dist/plugins/salesmate/src/index.js +5 -0
- package/dist/plugins/securityScorecard/src/index.js +14 -0
- package/dist/plugins/segment/src/index.js +4 -0
- package/dist/plugins/sendgrid/src/index.js +10 -0
- package/dist/plugins/sendy/src/index.js +6 -0
- package/dist/plugins/sentry/src/index.js +24 -0
- package/dist/plugins/servicenow/src/index.js +10 -0
- package/dist/plugins/shiftLabs/src/index.js +6 -0
- package/dist/plugins/shiftLabs/src/issues.js +4 -0
- package/dist/plugins/shiftLabs/src/pages.js +10 -0
- package/dist/plugins/shiftLabs/src/shared.js +2 -0
- package/dist/plugins/shiftLabs/src/transcription.js +203 -0
- package/dist/plugins/shopify/src/index.js +10 -0
- package/dist/plugins/signl4/src/index.js +2 -0
- package/dist/plugins/slack/src/index.js +38 -0
- package/dist/plugins/sms77/src/index.js +2 -0
- package/dist/plugins/splunk/src/index.js +16 -0
- package/dist/plugins/spotify/src/index.js +30 -0
- package/dist/plugins/stackby/src/index.js +4 -0
- package/dist/plugins/steel/src/browser.js +7 -0
- package/dist/plugins/steel/src/captchas.js +3 -0
- package/dist/plugins/steel/src/credentials.js +4 -0
- package/dist/plugins/steel/src/extensions.js +5 -0
- package/dist/plugins/steel/src/files.js +10 -0
- package/dist/plugins/steel/src/profiles.js +4 -0
- package/dist/plugins/steel/src/sessions.js +11 -0
- package/dist/plugins/storyblok/src/index.js +7 -0
- package/dist/plugins/strapi/src/index.js +5 -0
- package/dist/plugins/strava/src/index.js +6 -0
- package/dist/plugins/stripe/src/index.js +20 -0
- package/dist/plugins/supabase/src/index.js +5 -0
- package/dist/plugins/syncromsp/src/index.js +20 -0
- package/dist/plugins/tapfiliate/src/index.js +11 -0
- package/dist/plugins/telegram/src/index.js +21 -0
- package/dist/plugins/thehive/src/index.js +23 -0
- package/dist/plugins/thehiveProject/src/index.js +31 -0
- package/dist/plugins/todoist/src/index.js +31 -0
- package/dist/plugins/together/src/index.js +1 -0
- package/dist/plugins/travisci/src/index.js +5 -0
- package/dist/plugins/trello/src/index.js +37 -0
- package/dist/plugins/twake/src/index.js +1 -0
- package/dist/plugins/twilio/src/index.js +2 -0
- package/dist/plugins/twist/src/index.js +22 -0
- package/dist/plugins/twitter/src/index.js +8 -0
- package/dist/plugins/unleashedSoftware/src/index.js +3 -0
- package/dist/plugins/uplead/src/index.js +2 -0
- package/dist/plugins/uproc/src/index.js +1 -0
- package/dist/plugins/uptimerobot/src/index.js +22 -0
- package/dist/plugins/urlscanio/src/index.js +3 -0
- package/dist/plugins/vercel/src/account.js +1 -0
- package/dist/plugins/vercel/src/deployments.js +5 -0
- package/dist/plugins/vercel/src/env.js +4 -0
- package/dist/plugins/vercel/src/projects.js +2 -0
- package/dist/plugins/vercel/src/shared.js +1 -0
- package/dist/plugins/vero/src/index.js +6 -0
- package/dist/plugins/vonage/src/index.js +1 -0
- package/dist/plugins/wekan/src/index.js +24 -0
- package/dist/plugins/woocommerce/src/index.js +5 -0
- package/dist/plugins/wordpress/src/index.js +10 -0
- package/dist/plugins/xai/src/index.js +1 -0
- package/dist/plugins/xero/src/index.js +8 -0
- package/dist/plugins/yourls/src/index.js +3 -0
- package/dist/plugins/zammad/src/index.js +12 -0
- package/dist/plugins/zendesk/src/index.js +18 -0
- package/dist/plugins/zoho/src/index.js +6 -0
- package/dist/plugins/zoom/src/index.js +5 -0
- package/dist/plugins/zulip/src/index.js +15 -0
- package/dist/sdk.d.ts +2 -1
- package/dist/sdk.js +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as t from "typebox";
|
|
2
|
+
import { buildLocation, compact, DocumentInput, extractDocumentId, HexColor, hexToRgbF, LOCATION_REQUIREMENT, LocationInput, location, PositivePoints, runBatchUpdate, SegmentInput, STRICT_OBJECT, TableLocationInput, } from "./shared.js";
|
|
3
|
+
const PositiveSpan = t.Integer({ minimum: 1 });
|
|
2
4
|
function tableStartLocation(p) {
|
|
3
5
|
return location(p.tableStartIndex, p.segmentId, p.tabId);
|
|
4
6
|
}
|
|
@@ -14,16 +16,14 @@ function point(value) {
|
|
|
14
16
|
}
|
|
15
17
|
export function registerTablesActions(rl) {
|
|
16
18
|
rl.registerAction("document.insertTable", {
|
|
19
|
+
access: "write",
|
|
17
20
|
description: "Insert an empty table with the given dimensions.",
|
|
18
|
-
inputSchema: {
|
|
19
|
-
|
|
20
|
-
rows:
|
|
21
|
-
columns:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
segmentId: { type: "string", required: false },
|
|
25
|
-
tabId: { type: "string", required: false },
|
|
26
|
-
},
|
|
21
|
+
inputSchema: t.Object({
|
|
22
|
+
...DocumentInput,
|
|
23
|
+
rows: PositiveSpan,
|
|
24
|
+
columns: PositiveSpan,
|
|
25
|
+
...LocationInput,
|
|
26
|
+
}, { ...STRICT_OBJECT, anyOf: LOCATION_REQUIREMENT }),
|
|
27
27
|
async execute(input, ctx) {
|
|
28
28
|
const p = (input ?? {});
|
|
29
29
|
const documentId = extractDocumentId(p.document);
|
|
@@ -38,24 +38,13 @@ export function registerTablesActions(rl) {
|
|
|
38
38
|
},
|
|
39
39
|
});
|
|
40
40
|
rl.registerAction("document.insertTableRow", {
|
|
41
|
+
access: "write",
|
|
41
42
|
description: "Insert a table row above or below a cell in an existing table.",
|
|
42
|
-
inputSchema: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
description: "Document index where the table begins",
|
|
48
|
-
},
|
|
49
|
-
rowIndex: { type: "number", required: true },
|
|
50
|
-
columnIndex: { type: "number", required: true },
|
|
51
|
-
insertBelow: {
|
|
52
|
-
type: "boolean",
|
|
53
|
-
required: false,
|
|
54
|
-
description: "default: false (insert above)",
|
|
55
|
-
},
|
|
56
|
-
segmentId: { type: "string", required: false },
|
|
57
|
-
tabId: { type: "string", required: false },
|
|
58
|
-
},
|
|
43
|
+
inputSchema: t.Object({
|
|
44
|
+
...DocumentInput,
|
|
45
|
+
...TableLocationInput,
|
|
46
|
+
insertBelow: t.Optional(t.Boolean()),
|
|
47
|
+
}, STRICT_OBJECT),
|
|
59
48
|
async execute(input, ctx) {
|
|
60
49
|
const p = (input ?? {});
|
|
61
50
|
const documentId = extractDocumentId(p.document);
|
|
@@ -68,15 +57,9 @@ export function registerTablesActions(rl) {
|
|
|
68
57
|
},
|
|
69
58
|
});
|
|
70
59
|
rl.registerAction("document.deleteTableRow", {
|
|
60
|
+
access: "write",
|
|
71
61
|
description: "Delete a specific row from a table.",
|
|
72
|
-
inputSchema: {
|
|
73
|
-
document: { type: "string", required: true },
|
|
74
|
-
tableStartIndex: { type: "number", required: true },
|
|
75
|
-
rowIndex: { type: "number", required: true },
|
|
76
|
-
columnIndex: { type: "number", required: true },
|
|
77
|
-
segmentId: { type: "string", required: false },
|
|
78
|
-
tabId: { type: "string", required: false },
|
|
79
|
-
},
|
|
62
|
+
inputSchema: t.Object({ ...DocumentInput, ...TableLocationInput }, STRICT_OBJECT),
|
|
80
63
|
async execute(input, ctx) {
|
|
81
64
|
const p = (input ?? {});
|
|
82
65
|
const documentId = extractDocumentId(p.document);
|
|
@@ -88,20 +71,13 @@ export function registerTablesActions(rl) {
|
|
|
88
71
|
},
|
|
89
72
|
});
|
|
90
73
|
rl.registerAction("document.insertTableColumn", {
|
|
74
|
+
access: "write",
|
|
91
75
|
description: "Insert a column left or right of a cell.",
|
|
92
|
-
inputSchema: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
insertRight: {
|
|
98
|
-
type: "boolean",
|
|
99
|
-
required: false,
|
|
100
|
-
description: "default: false (insert left)",
|
|
101
|
-
},
|
|
102
|
-
segmentId: { type: "string", required: false },
|
|
103
|
-
tabId: { type: "string", required: false },
|
|
104
|
-
},
|
|
76
|
+
inputSchema: t.Object({
|
|
77
|
+
...DocumentInput,
|
|
78
|
+
...TableLocationInput,
|
|
79
|
+
insertRight: t.Optional(t.Boolean()),
|
|
80
|
+
}, STRICT_OBJECT),
|
|
105
81
|
async execute(input, ctx) {
|
|
106
82
|
const p = (input ?? {});
|
|
107
83
|
const documentId = extractDocumentId(p.document);
|
|
@@ -114,15 +90,9 @@ export function registerTablesActions(rl) {
|
|
|
114
90
|
},
|
|
115
91
|
});
|
|
116
92
|
rl.registerAction("document.deleteTableColumn", {
|
|
93
|
+
access: "write",
|
|
117
94
|
description: "Delete a specific column from a table.",
|
|
118
|
-
inputSchema: {
|
|
119
|
-
document: { type: "string", required: true },
|
|
120
|
-
tableStartIndex: { type: "number", required: true },
|
|
121
|
-
rowIndex: { type: "number", required: true },
|
|
122
|
-
columnIndex: { type: "number", required: true },
|
|
123
|
-
segmentId: { type: "string", required: false },
|
|
124
|
-
tabId: { type: "string", required: false },
|
|
125
|
-
},
|
|
95
|
+
inputSchema: t.Object({ ...DocumentInput, ...TableLocationInput }, STRICT_OBJECT),
|
|
126
96
|
async execute(input, ctx) {
|
|
127
97
|
const p = (input ?? {});
|
|
128
98
|
const documentId = extractDocumentId(p.document);
|
|
@@ -134,31 +104,30 @@ export function registerTablesActions(rl) {
|
|
|
134
104
|
},
|
|
135
105
|
});
|
|
136
106
|
rl.registerAction("document.updateTableCellStyle", {
|
|
107
|
+
access: "write",
|
|
137
108
|
description: "Apply table-cell styling (background color, borders, padding) to a contiguous span of cells. Pass either a single cell via `tableStartLocation+rowIndex+columnIndex`, or a range via `tableStartLocation+rowSpan+columnSpan`.",
|
|
138
|
-
inputSchema: {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
required:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
tabId: { type: "string", required: false },
|
|
161
|
-
},
|
|
109
|
+
inputSchema: t.Object({
|
|
110
|
+
...DocumentInput,
|
|
111
|
+
...TableLocationInput,
|
|
112
|
+
rowSpan: t.Optional(PositiveSpan),
|
|
113
|
+
columnSpan: t.Optional(PositiveSpan),
|
|
114
|
+
backgroundColorHex: t.Optional(HexColor),
|
|
115
|
+
paddingLeftPt: t.Optional(PositivePoints),
|
|
116
|
+
paddingRightPt: t.Optional(PositivePoints),
|
|
117
|
+
paddingTopPt: t.Optional(PositivePoints),
|
|
118
|
+
paddingBottomPt: t.Optional(PositivePoints),
|
|
119
|
+
contentAlignment: t.Optional(t.Union([t.Literal("TOP"), t.Literal("MIDDLE"), t.Literal("BOTTOM")])),
|
|
120
|
+
}, {
|
|
121
|
+
...STRICT_OBJECT,
|
|
122
|
+
anyOf: [
|
|
123
|
+
{ required: ["backgroundColorHex"] },
|
|
124
|
+
{ required: ["paddingLeftPt"] },
|
|
125
|
+
{ required: ["paddingRightPt"] },
|
|
126
|
+
{ required: ["paddingTopPt"] },
|
|
127
|
+
{ required: ["paddingBottomPt"] },
|
|
128
|
+
{ required: ["contentAlignment"] },
|
|
129
|
+
],
|
|
130
|
+
}),
|
|
162
131
|
async execute(input, ctx) {
|
|
163
132
|
const p = (input ?? {});
|
|
164
133
|
const documentId = extractDocumentId(p.document);
|
|
@@ -214,17 +183,14 @@ export function registerTablesActions(rl) {
|
|
|
214
183
|
},
|
|
215
184
|
});
|
|
216
185
|
rl.registerAction("document.mergeTableCells", {
|
|
186
|
+
access: "write",
|
|
217
187
|
description: "Merge a contiguous block of cells in a table.",
|
|
218
|
-
inputSchema: {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
columnSpan: { type: "number", required: true },
|
|
225
|
-
segmentId: { type: "string", required: false },
|
|
226
|
-
tabId: { type: "string", required: false },
|
|
227
|
-
},
|
|
188
|
+
inputSchema: t.Object({
|
|
189
|
+
...DocumentInput,
|
|
190
|
+
...TableLocationInput,
|
|
191
|
+
rowSpan: PositiveSpan,
|
|
192
|
+
columnSpan: PositiveSpan,
|
|
193
|
+
}, STRICT_OBJECT),
|
|
228
194
|
async execute(input, ctx) {
|
|
229
195
|
const p = (input ?? {});
|
|
230
196
|
const documentId = extractDocumentId(p.document);
|
|
@@ -246,17 +212,14 @@ export function registerTablesActions(rl) {
|
|
|
246
212
|
},
|
|
247
213
|
});
|
|
248
214
|
rl.registerAction("document.unmergeTableCells", {
|
|
215
|
+
access: "write",
|
|
249
216
|
description: "Unmerge a previously merged block of cells.",
|
|
250
|
-
inputSchema: {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
columnSpan: { type: "number", required: true },
|
|
257
|
-
segmentId: { type: "string", required: false },
|
|
258
|
-
tabId: { type: "string", required: false },
|
|
259
|
-
},
|
|
217
|
+
inputSchema: t.Object({
|
|
218
|
+
...DocumentInput,
|
|
219
|
+
...TableLocationInput,
|
|
220
|
+
rowSpan: PositiveSpan,
|
|
221
|
+
columnSpan: PositiveSpan,
|
|
222
|
+
}, STRICT_OBJECT),
|
|
260
223
|
async execute(input, ctx) {
|
|
261
224
|
const p = (input ?? {});
|
|
262
225
|
const documentId = extractDocumentId(p.document);
|
|
@@ -278,33 +241,28 @@ export function registerTablesActions(rl) {
|
|
|
278
241
|
},
|
|
279
242
|
});
|
|
280
243
|
rl.registerAction("document.updateTableColumnProperties", {
|
|
244
|
+
access: "write",
|
|
281
245
|
description: "Update table column properties such as width for selected columns or all columns.",
|
|
282
|
-
inputSchema: {
|
|
283
|
-
|
|
284
|
-
tableStartIndex: {
|
|
285
|
-
columnIndices: {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
required:
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
required: false,
|
|
303
|
-
description: "Field mask. Defaults to fields implied by supplied properties.",
|
|
304
|
-
},
|
|
305
|
-
segmentId: { type: "string", required: false },
|
|
306
|
-
tabId: { type: "string", required: false },
|
|
307
|
-
},
|
|
246
|
+
inputSchema: t.Object({
|
|
247
|
+
...DocumentInput,
|
|
248
|
+
tableStartIndex: t.Integer({ minimum: 0 }),
|
|
249
|
+
columnIndices: t.Optional(t.Array(t.Integer({ minimum: 0 }), { minItems: 1 })),
|
|
250
|
+
widthPt: t.Optional(PositivePoints),
|
|
251
|
+
widthType: t.Optional(t.Union([
|
|
252
|
+
t.Literal("WIDTH_TYPE_UNSPECIFIED"),
|
|
253
|
+
t.Literal("EVENLY_DISTRIBUTED"),
|
|
254
|
+
t.Literal("FIXED_WIDTH"),
|
|
255
|
+
])),
|
|
256
|
+
fields: t.Optional(t.String({ minLength: 1 })),
|
|
257
|
+
...SegmentInput,
|
|
258
|
+
}, {
|
|
259
|
+
...STRICT_OBJECT,
|
|
260
|
+
anyOf: [
|
|
261
|
+
{ required: ["widthPt"] },
|
|
262
|
+
{ required: ["widthType"] },
|
|
263
|
+
{ required: ["fields"] },
|
|
264
|
+
],
|
|
265
|
+
}),
|
|
308
266
|
async execute(input, ctx) {
|
|
309
267
|
const p = (input ?? {});
|
|
310
268
|
const documentId = extractDocumentId(p.document);
|
|
@@ -333,24 +291,19 @@ export function registerTablesActions(rl) {
|
|
|
333
291
|
},
|
|
334
292
|
});
|
|
335
293
|
rl.registerAction("document.updateTableRowStyle", {
|
|
294
|
+
access: "write",
|
|
336
295
|
description: "Update table row style such as minimum row height for selected rows or all rows.",
|
|
337
|
-
inputSchema: {
|
|
338
|
-
|
|
339
|
-
tableStartIndex: {
|
|
340
|
-
rowIndices: {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
required: false,
|
|
349
|
-
description: "Field mask. Defaults to fields implied by supplied properties.",
|
|
350
|
-
},
|
|
351
|
-
segmentId: { type: "string", required: false },
|
|
352
|
-
tabId: { type: "string", required: false },
|
|
353
|
-
},
|
|
296
|
+
inputSchema: t.Object({
|
|
297
|
+
...DocumentInput,
|
|
298
|
+
tableStartIndex: t.Integer({ minimum: 0 }),
|
|
299
|
+
rowIndices: t.Optional(t.Array(t.Integer({ minimum: 0 }), { minItems: 1 })),
|
|
300
|
+
minRowHeightPt: t.Optional(PositivePoints),
|
|
301
|
+
fields: t.Optional(t.String({ minLength: 1 })),
|
|
302
|
+
...SegmentInput,
|
|
303
|
+
}, {
|
|
304
|
+
...STRICT_OBJECT,
|
|
305
|
+
anyOf: [{ required: ["minRowHeightPt"] }, { required: ["fields"] }],
|
|
306
|
+
}),
|
|
354
307
|
async execute(input, ctx) {
|
|
355
308
|
const p = (input ?? {});
|
|
356
309
|
const documentId = extractDocumentId(p.document);
|
|
@@ -374,18 +327,14 @@ export function registerTablesActions(rl) {
|
|
|
374
327
|
},
|
|
375
328
|
});
|
|
376
329
|
rl.registerAction("document.pinTableHeaderRows", {
|
|
330
|
+
access: "write",
|
|
377
331
|
description: "Pin or unpin header rows in a table.",
|
|
378
|
-
inputSchema: {
|
|
379
|
-
|
|
380
|
-
tableStartIndex: {
|
|
381
|
-
pinnedHeaderRowsCount: {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
description: "Use 0 to unpin all header rows.",
|
|
385
|
-
},
|
|
386
|
-
segmentId: { type: "string", required: false },
|
|
387
|
-
tabId: { type: "string", required: false },
|
|
388
|
-
},
|
|
332
|
+
inputSchema: t.Object({
|
|
333
|
+
...DocumentInput,
|
|
334
|
+
tableStartIndex: t.Integer({ minimum: 0 }),
|
|
335
|
+
pinnedHeaderRowsCount: t.Integer({ minimum: 0 }),
|
|
336
|
+
...SegmentInput,
|
|
337
|
+
}, STRICT_OBJECT),
|
|
389
338
|
async execute(input, ctx) {
|
|
390
339
|
const p = (input ?? {});
|
|
391
340
|
const documentId = extractDocumentId(p.document);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as t from "typebox";
|
|
2
|
+
import { compact, DocumentInput, extractDocumentId, runBatchUpdate, STRICT_OBJECT, } from "./shared.js";
|
|
2
3
|
function tabProperties(p) {
|
|
3
4
|
return compact({
|
|
4
5
|
tabId: p.tabId,
|
|
@@ -9,13 +10,14 @@ function tabProperties(p) {
|
|
|
9
10
|
}
|
|
10
11
|
export function registerTabActions(rl) {
|
|
11
12
|
rl.registerAction("document.addDocumentTab", {
|
|
13
|
+
access: "write",
|
|
12
14
|
description: "Add a Google Docs document tab, optionally at an index or under a parent tab.",
|
|
13
|
-
inputSchema: {
|
|
14
|
-
|
|
15
|
-
title: {
|
|
16
|
-
index: {
|
|
17
|
-
parentTabId: {
|
|
18
|
-
},
|
|
15
|
+
inputSchema: t.Object({
|
|
16
|
+
...DocumentInput,
|
|
17
|
+
title: t.Optional(t.String({ minLength: 1 })),
|
|
18
|
+
index: t.Optional(t.Integer({ minimum: 0 })),
|
|
19
|
+
parentTabId: t.Optional(t.String({ minLength: 1 })),
|
|
20
|
+
}, STRICT_OBJECT),
|
|
19
21
|
async execute(input, ctx) {
|
|
20
22
|
const p = (input ?? {});
|
|
21
23
|
const documentId = extractDocumentId(p.document);
|
|
@@ -25,11 +27,9 @@ export function registerTabActions(rl) {
|
|
|
25
27
|
},
|
|
26
28
|
});
|
|
27
29
|
rl.registerAction("document.deleteTab", {
|
|
30
|
+
access: "write",
|
|
28
31
|
description: "Delete a Google Docs document tab by tab ID. Child tabs are deleted too.",
|
|
29
|
-
inputSchema: {
|
|
30
|
-
document: { type: "string", required: true },
|
|
31
|
-
tabId: { type: "string", required: true },
|
|
32
|
-
},
|
|
32
|
+
inputSchema: t.Object({ ...DocumentInput, tabId: t.String({ minLength: 1 }) }, STRICT_OBJECT),
|
|
33
33
|
async execute(input, ctx) {
|
|
34
34
|
const p = (input ?? {});
|
|
35
35
|
const documentId = extractDocumentId(p.document);
|
|
@@ -39,19 +39,23 @@ export function registerTabActions(rl) {
|
|
|
39
39
|
},
|
|
40
40
|
});
|
|
41
41
|
rl.registerAction("document.updateDocumentTabProperties", {
|
|
42
|
+
access: "write",
|
|
42
43
|
description: "Update Google Docs tab properties such as title, index, or parent tab.",
|
|
43
|
-
inputSchema: {
|
|
44
|
-
|
|
45
|
-
tabId: {
|
|
46
|
-
title: {
|
|
47
|
-
index: {
|
|
48
|
-
parentTabId: {
|
|
49
|
-
fields: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
inputSchema: t.Object({
|
|
45
|
+
...DocumentInput,
|
|
46
|
+
tabId: t.String({ minLength: 1 }),
|
|
47
|
+
title: t.Optional(t.String({ minLength: 1 })),
|
|
48
|
+
index: t.Optional(t.Integer({ minimum: 0 })),
|
|
49
|
+
parentTabId: t.Optional(t.String({ minLength: 1 })),
|
|
50
|
+
fields: t.Optional(t.String({ minLength: 1 })),
|
|
51
|
+
}, {
|
|
52
|
+
...STRICT_OBJECT,
|
|
53
|
+
anyOf: [
|
|
54
|
+
{ required: ["title"] },
|
|
55
|
+
{ required: ["index"] },
|
|
56
|
+
{ required: ["parentTabId"] },
|
|
57
|
+
],
|
|
58
|
+
}),
|
|
55
59
|
async execute(input, ctx) {
|
|
56
60
|
const p = (input ?? {});
|
|
57
61
|
const documentId = extractDocumentId(p.document);
|