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,10 +1,65 @@
|
|
|
1
|
+
import * as t from "typebox";
|
|
1
2
|
import { googleAccessToken } from "../../_shared/googleAuth.js";
|
|
3
|
+
import { RawGoogleObject } from "../../_shared/googleSchemas.js";
|
|
2
4
|
export const SCOPES = [
|
|
3
5
|
"https://www.googleapis.com/auth/documents",
|
|
4
6
|
"https://www.googleapis.com/auth/drive.file",
|
|
5
7
|
];
|
|
6
8
|
export const DOCS_BASE = "https://docs.googleapis.com/v1";
|
|
7
9
|
export const DRIVE_BASE = "https://www.googleapis.com/drive/v3";
|
|
10
|
+
export const STRICT_OBJECT = { additionalProperties: false };
|
|
11
|
+
export const DocumentInput = {
|
|
12
|
+
document: t.String({ minLength: 1, description: "Document ID or URL" }),
|
|
13
|
+
};
|
|
14
|
+
export const SegmentInput = {
|
|
15
|
+
segmentId: t.Optional(t.String({ description: 'Segment ID, or "body" for the main body' })),
|
|
16
|
+
tabId: t.Optional(t.String({ minLength: 1 })),
|
|
17
|
+
};
|
|
18
|
+
export const RangeInput = {
|
|
19
|
+
startIndex: t.Integer({ minimum: 0 }),
|
|
20
|
+
endIndex: t.Integer({ minimum: 0 }),
|
|
21
|
+
...SegmentInput,
|
|
22
|
+
};
|
|
23
|
+
export const TableLocationInput = {
|
|
24
|
+
tableStartIndex: t.Integer({ minimum: 0 }),
|
|
25
|
+
rowIndex: t.Integer({ minimum: 0 }),
|
|
26
|
+
columnIndex: t.Integer({ minimum: 0 }),
|
|
27
|
+
...SegmentInput,
|
|
28
|
+
};
|
|
29
|
+
export const LocationInput = {
|
|
30
|
+
locationKind: t.Optional(t.Union([t.Literal("location"), t.Literal("endOfSegmentLocation")])),
|
|
31
|
+
index: t.Optional(t.Integer({ minimum: 0 })),
|
|
32
|
+
...SegmentInput,
|
|
33
|
+
};
|
|
34
|
+
export const LOCATION_REQUIREMENT = [
|
|
35
|
+
{
|
|
36
|
+
required: ["index"],
|
|
37
|
+
not: {
|
|
38
|
+
required: ["locationKind"],
|
|
39
|
+
properties: { locationKind: { const: "endOfSegmentLocation" } },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
required: ["locationKind"],
|
|
44
|
+
properties: { locationKind: { const: "endOfSegmentLocation" } },
|
|
45
|
+
not: { required: ["index"] },
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
export const HexColor = t.String({
|
|
49
|
+
pattern: "^#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
|
|
50
|
+
});
|
|
51
|
+
export const PositivePoints = t.Number({ minimum: 0 });
|
|
52
|
+
export const WriteControl = t.Object({
|
|
53
|
+
requiredRevisionId: t.Optional(t.String({ minLength: 1 })),
|
|
54
|
+
targetRevisionId: t.Optional(t.String({ minLength: 1 })),
|
|
55
|
+
}, {
|
|
56
|
+
additionalProperties: false,
|
|
57
|
+
oneOf: [
|
|
58
|
+
{ required: ["requiredRevisionId"] },
|
|
59
|
+
{ required: ["targetRevisionId"] },
|
|
60
|
+
],
|
|
61
|
+
});
|
|
62
|
+
export { RawGoogleObject };
|
|
8
63
|
export async function accessToken(ctx) {
|
|
9
64
|
return googleAccessToken(ctx, "googleDocs", SCOPES);
|
|
10
65
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as t from "typebox";
|
|
2
|
+
import { buildLocation, compact, DocumentInput, extractDocumentId, LOCATION_REQUIREMENT, LocationInput, location, PositivePoints, RangeInput, runBatchUpdate, SegmentInput, STRICT_OBJECT, } from "./shared.js";
|
|
2
3
|
function range(p) {
|
|
3
4
|
return compact({
|
|
4
5
|
segmentId: p.segmentId && p.segmentId !== "body" ? p.segmentId : "",
|
|
@@ -12,14 +13,9 @@ function point(value) {
|
|
|
12
13
|
}
|
|
13
14
|
export function registerStructureActions(rl) {
|
|
14
15
|
rl.registerAction("document.insertPageBreak", {
|
|
16
|
+
access: "write",
|
|
15
17
|
description: "Insert a page break at an index or at the end of a segment.",
|
|
16
|
-
inputSchema: {
|
|
17
|
-
document: { type: "string", required: true },
|
|
18
|
-
locationKind: { type: "string", required: false },
|
|
19
|
-
index: { type: "number", required: false },
|
|
20
|
-
segmentId: { type: "string", required: false },
|
|
21
|
-
tabId: { type: "string", required: false },
|
|
22
|
-
},
|
|
18
|
+
inputSchema: t.Object({ ...DocumentInput, ...LocationInput }, { ...STRICT_OBJECT, anyOf: LOCATION_REQUIREMENT }),
|
|
23
19
|
async execute(input, ctx) {
|
|
24
20
|
const p = (input ?? {});
|
|
25
21
|
const documentId = extractDocumentId(p.document);
|
|
@@ -30,15 +26,13 @@ export function registerStructureActions(rl) {
|
|
|
30
26
|
},
|
|
31
27
|
});
|
|
32
28
|
rl.registerAction("document.createNamedRange", {
|
|
29
|
+
access: "write",
|
|
33
30
|
description: "Create a named range over a span of text (useful for later programmatic edits).",
|
|
34
|
-
inputSchema: {
|
|
35
|
-
|
|
36
|
-
name: {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
segmentId: { type: "string", required: false },
|
|
40
|
-
tabId: { type: "string", required: false },
|
|
41
|
-
},
|
|
31
|
+
inputSchema: t.Object({
|
|
32
|
+
...DocumentInput,
|
|
33
|
+
name: t.String({ minLength: 1 }),
|
|
34
|
+
...RangeInput,
|
|
35
|
+
}, STRICT_OBJECT),
|
|
42
36
|
async execute(input, ctx) {
|
|
43
37
|
const p = (input ?? {});
|
|
44
38
|
const documentId = extractDocumentId(p.document);
|
|
@@ -51,17 +45,17 @@ export function registerStructureActions(rl) {
|
|
|
51
45
|
},
|
|
52
46
|
});
|
|
53
47
|
rl.registerAction("document.deleteNamedRange", {
|
|
48
|
+
access: "write",
|
|
54
49
|
description: "Delete named range(s). Pass one of `namedRangeId` or `name`; the latter deletes every range sharing that name.",
|
|
55
|
-
inputSchema: {
|
|
56
|
-
|
|
57
|
-
namedRangeId: {
|
|
58
|
-
name: {
|
|
59
|
-
tabIds: {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
50
|
+
inputSchema: t.Object({
|
|
51
|
+
...DocumentInput,
|
|
52
|
+
namedRangeId: t.Optional(t.String({ minLength: 1 })),
|
|
53
|
+
name: t.Optional(t.String({ minLength: 1 })),
|
|
54
|
+
tabIds: t.Optional(t.Array(t.String({ minLength: 1 }), { minItems: 1 })),
|
|
55
|
+
}, {
|
|
56
|
+
...STRICT_OBJECT,
|
|
57
|
+
oneOf: [{ required: ["namedRangeId"] }, { required: ["name"] }],
|
|
58
|
+
}),
|
|
65
59
|
async execute(input, ctx) {
|
|
66
60
|
const p = (input ?? {});
|
|
67
61
|
const documentId = extractDocumentId(p.document);
|
|
@@ -77,14 +71,9 @@ export function registerStructureActions(rl) {
|
|
|
77
71
|
},
|
|
78
72
|
});
|
|
79
73
|
rl.registerAction("document.createHeader", {
|
|
74
|
+
access: "write",
|
|
80
75
|
description: "Create a DEFAULT header attached to a SectionBreak.",
|
|
81
|
-
inputSchema: {
|
|
82
|
-
document: { type: "string", required: true },
|
|
83
|
-
locationKind: { type: "string", required: false },
|
|
84
|
-
index: { type: "number", required: false },
|
|
85
|
-
segmentId: { type: "string", required: false },
|
|
86
|
-
tabId: { type: "string", required: false },
|
|
87
|
-
},
|
|
76
|
+
inputSchema: t.Object({ ...DocumentInput, ...LocationInput }, { ...STRICT_OBJECT, anyOf: LOCATION_REQUIREMENT }),
|
|
88
77
|
async execute(input, ctx) {
|
|
89
78
|
const p = (input ?? {});
|
|
90
79
|
const documentId = extractDocumentId(p.document);
|
|
@@ -106,11 +95,13 @@ export function registerStructureActions(rl) {
|
|
|
106
95
|
},
|
|
107
96
|
});
|
|
108
97
|
rl.registerAction("document.deleteHeader", {
|
|
98
|
+
access: "write",
|
|
109
99
|
description: "Delete a header by ID.",
|
|
110
|
-
inputSchema: {
|
|
111
|
-
|
|
112
|
-
headerId: {
|
|
113
|
-
|
|
100
|
+
inputSchema: t.Object({
|
|
101
|
+
...DocumentInput,
|
|
102
|
+
headerId: t.String({ minLength: 1 }),
|
|
103
|
+
tabId: t.Optional(t.String({ minLength: 1 })),
|
|
104
|
+
}, STRICT_OBJECT),
|
|
114
105
|
async execute(input, ctx) {
|
|
115
106
|
const p = (input ?? {});
|
|
116
107
|
const documentId = extractDocumentId(p.document);
|
|
@@ -120,14 +111,9 @@ export function registerStructureActions(rl) {
|
|
|
120
111
|
},
|
|
121
112
|
});
|
|
122
113
|
rl.registerAction("document.createFooter", {
|
|
114
|
+
access: "write",
|
|
123
115
|
description: "Create a DEFAULT footer attached to a SectionBreak.",
|
|
124
|
-
inputSchema: {
|
|
125
|
-
document: { type: "string", required: true },
|
|
126
|
-
locationKind: { type: "string", required: false },
|
|
127
|
-
index: { type: "number", required: false },
|
|
128
|
-
segmentId: { type: "string", required: false },
|
|
129
|
-
tabId: { type: "string", required: false },
|
|
130
|
-
},
|
|
116
|
+
inputSchema: t.Object({ ...DocumentInput, ...LocationInput }, { ...STRICT_OBJECT, anyOf: LOCATION_REQUIREMENT }),
|
|
131
117
|
async execute(input, ctx) {
|
|
132
118
|
const p = (input ?? {});
|
|
133
119
|
const documentId = extractDocumentId(p.document);
|
|
@@ -149,11 +135,13 @@ export function registerStructureActions(rl) {
|
|
|
149
135
|
},
|
|
150
136
|
});
|
|
151
137
|
rl.registerAction("document.deleteFooter", {
|
|
138
|
+
access: "write",
|
|
152
139
|
description: "Delete a footer by ID.",
|
|
153
|
-
inputSchema: {
|
|
154
|
-
|
|
155
|
-
footerId: {
|
|
156
|
-
|
|
140
|
+
inputSchema: t.Object({
|
|
141
|
+
...DocumentInput,
|
|
142
|
+
footerId: t.String({ minLength: 1 }),
|
|
143
|
+
tabId: t.Optional(t.String({ minLength: 1 })),
|
|
144
|
+
}, STRICT_OBJECT),
|
|
157
145
|
async execute(input, ctx) {
|
|
158
146
|
const p = (input ?? {});
|
|
159
147
|
const documentId = extractDocumentId(p.document);
|
|
@@ -163,12 +151,13 @@ export function registerStructureActions(rl) {
|
|
|
163
151
|
},
|
|
164
152
|
});
|
|
165
153
|
rl.registerAction("document.deletePositionedObject", {
|
|
154
|
+
access: "write",
|
|
166
155
|
description: "Delete a positioned object (inline image, floating image, etc.) by its objectId.",
|
|
167
|
-
inputSchema: {
|
|
168
|
-
|
|
169
|
-
objectId: {
|
|
170
|
-
tabId: {
|
|
171
|
-
},
|
|
156
|
+
inputSchema: t.Object({
|
|
157
|
+
...DocumentInput,
|
|
158
|
+
objectId: t.String({ minLength: 1 }),
|
|
159
|
+
tabId: t.Optional(t.String({ minLength: 1 })),
|
|
160
|
+
}, STRICT_OBJECT),
|
|
172
161
|
async execute(input, ctx) {
|
|
173
162
|
const p = (input ?? {});
|
|
174
163
|
const documentId = extractDocumentId(p.document);
|
|
@@ -181,18 +170,9 @@ export function registerStructureActions(rl) {
|
|
|
181
170
|
},
|
|
182
171
|
});
|
|
183
172
|
rl.registerAction("document.createFootnote", {
|
|
173
|
+
access: "write",
|
|
184
174
|
description: "Create a footnote reference at a location or at the end of the document body.",
|
|
185
|
-
inputSchema: {
|
|
186
|
-
document: { type: "string", required: true },
|
|
187
|
-
locationKind: {
|
|
188
|
-
type: "string",
|
|
189
|
-
required: false,
|
|
190
|
-
description: "location (default; requires index) | endOfSegmentLocation",
|
|
191
|
-
},
|
|
192
|
-
index: { type: "number", required: false },
|
|
193
|
-
segmentId: { type: "string", required: false },
|
|
194
|
-
tabId: { type: "string", required: false },
|
|
195
|
-
},
|
|
175
|
+
inputSchema: t.Object({ ...DocumentInput, ...LocationInput }, { ...STRICT_OBJECT, anyOf: LOCATION_REQUIREMENT }),
|
|
196
176
|
async execute(input, ctx) {
|
|
197
177
|
const p = (input ?? {});
|
|
198
178
|
const documentId = extractDocumentId(p.document);
|
|
@@ -203,18 +183,21 @@ export function registerStructureActions(rl) {
|
|
|
203
183
|
},
|
|
204
184
|
});
|
|
205
185
|
rl.registerAction("document.replaceNamedRangeContent", {
|
|
186
|
+
access: "write",
|
|
206
187
|
description: "Replace the content of a named range by ID or name with text.",
|
|
207
|
-
inputSchema: {
|
|
208
|
-
|
|
209
|
-
text:
|
|
210
|
-
namedRangeId: {
|
|
211
|
-
namedRangeName: {
|
|
212
|
-
tabIds: {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
188
|
+
inputSchema: t.Object({
|
|
189
|
+
...DocumentInput,
|
|
190
|
+
text: t.String(),
|
|
191
|
+
namedRangeId: t.Optional(t.String({ minLength: 1 })),
|
|
192
|
+
namedRangeName: t.Optional(t.String({ minLength: 1 })),
|
|
193
|
+
tabIds: t.Optional(t.Array(t.String({ minLength: 1 }), { minItems: 1 })),
|
|
194
|
+
}, {
|
|
195
|
+
...STRICT_OBJECT,
|
|
196
|
+
oneOf: [
|
|
197
|
+
{ required: ["namedRangeId"] },
|
|
198
|
+
{ required: ["namedRangeName"] },
|
|
199
|
+
],
|
|
200
|
+
}),
|
|
218
201
|
async execute(input, ctx) {
|
|
219
202
|
const p = (input ?? {});
|
|
220
203
|
const documentId = extractDocumentId(p.document);
|
|
@@ -234,33 +217,30 @@ export function registerStructureActions(rl) {
|
|
|
234
217
|
},
|
|
235
218
|
});
|
|
236
219
|
rl.registerAction("document.updateSectionStyle", {
|
|
220
|
+
access: "write",
|
|
237
221
|
description: "Update section style over a range, such as margins or column properties.",
|
|
238
|
-
inputSchema: {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
required:
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
},
|
|
261
|
-
segmentId: { type: "string", required: false },
|
|
262
|
-
tabId: { type: "string", required: false },
|
|
263
|
-
},
|
|
222
|
+
inputSchema: t.Object({
|
|
223
|
+
...DocumentInput,
|
|
224
|
+
...RangeInput,
|
|
225
|
+
marginTopPt: t.Optional(PositivePoints),
|
|
226
|
+
marginBottomPt: t.Optional(PositivePoints),
|
|
227
|
+
marginLeftPt: t.Optional(PositivePoints),
|
|
228
|
+
marginRightPt: t.Optional(PositivePoints),
|
|
229
|
+
columnSeparatorStyle: t.Optional(t.Union([t.Literal("NONE"), t.Literal("BETWEEN_EACH_COLUMN")])),
|
|
230
|
+
contentDirection: t.Optional(t.Union([t.Literal("LEFT_TO_RIGHT"), t.Literal("RIGHT_TO_LEFT")])),
|
|
231
|
+
fields: t.Optional(t.String({ minLength: 1 })),
|
|
232
|
+
}, {
|
|
233
|
+
...STRICT_OBJECT,
|
|
234
|
+
anyOf: [
|
|
235
|
+
{ required: ["marginTopPt"] },
|
|
236
|
+
{ required: ["marginBottomPt"] },
|
|
237
|
+
{ required: ["marginLeftPt"] },
|
|
238
|
+
{ required: ["marginRightPt"] },
|
|
239
|
+
{ required: ["columnSeparatorStyle"] },
|
|
240
|
+
{ required: ["contentDirection"] },
|
|
241
|
+
{ required: ["fields"] },
|
|
242
|
+
],
|
|
243
|
+
}),
|
|
264
244
|
async execute(input, ctx) {
|
|
265
245
|
const p = (input ?? {});
|
|
266
246
|
const documentId = extractDocumentId(p.document);
|
|
@@ -303,18 +283,14 @@ export function registerStructureActions(rl) {
|
|
|
303
283
|
},
|
|
304
284
|
});
|
|
305
285
|
rl.registerAction("document.insertSectionBreak", {
|
|
286
|
+
access: "write",
|
|
306
287
|
description: "Insert a section break at the given location.",
|
|
307
|
-
inputSchema: {
|
|
308
|
-
|
|
309
|
-
index: {
|
|
310
|
-
sectionType:
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
description: "CONTINUOUS | NEXT_PAGE. Default CONTINUOUS.",
|
|
314
|
-
},
|
|
315
|
-
segmentId: { type: "string", required: false },
|
|
316
|
-
tabId: { type: "string", required: false },
|
|
317
|
-
},
|
|
288
|
+
inputSchema: t.Object({
|
|
289
|
+
...DocumentInput,
|
|
290
|
+
index: t.Integer({ minimum: 0 }),
|
|
291
|
+
sectionType: t.Optional(t.Union([t.Literal("CONTINUOUS"), t.Literal("NEXT_PAGE")])),
|
|
292
|
+
...SegmentInput,
|
|
293
|
+
}, STRICT_OBJECT),
|
|
318
294
|
async execute(input, ctx) {
|
|
319
295
|
const p = (input ?? {});
|
|
320
296
|
const documentId = extractDocumentId(p.document);
|
|
@@ -329,18 +305,30 @@ export function registerStructureActions(rl) {
|
|
|
329
305
|
},
|
|
330
306
|
});
|
|
331
307
|
rl.registerAction("document.updateDocumentStyle", {
|
|
308
|
+
access: "write",
|
|
332
309
|
description: "Update document-level style (page size, margins, page numbers, default direction).",
|
|
333
|
-
inputSchema: {
|
|
334
|
-
|
|
335
|
-
pageMarginTopPt:
|
|
336
|
-
pageMarginBottomPt:
|
|
337
|
-
pageMarginLeftPt:
|
|
338
|
-
pageMarginRightPt:
|
|
339
|
-
pageSizeWidthPt:
|
|
340
|
-
pageSizeHeightPt:
|
|
341
|
-
useCustomHeaderFooterMargins:
|
|
342
|
-
tabId: {
|
|
343
|
-
},
|
|
310
|
+
inputSchema: t.Object({
|
|
311
|
+
...DocumentInput,
|
|
312
|
+
pageMarginTopPt: t.Optional(PositivePoints),
|
|
313
|
+
pageMarginBottomPt: t.Optional(PositivePoints),
|
|
314
|
+
pageMarginLeftPt: t.Optional(PositivePoints),
|
|
315
|
+
pageMarginRightPt: t.Optional(PositivePoints),
|
|
316
|
+
pageSizeWidthPt: t.Optional(PositivePoints),
|
|
317
|
+
pageSizeHeightPt: t.Optional(PositivePoints),
|
|
318
|
+
useCustomHeaderFooterMargins: t.Optional(t.Boolean()),
|
|
319
|
+
tabId: t.Optional(t.String({ minLength: 1 })),
|
|
320
|
+
}, {
|
|
321
|
+
...STRICT_OBJECT,
|
|
322
|
+
anyOf: [
|
|
323
|
+
{ required: ["pageMarginTopPt"] },
|
|
324
|
+
{ required: ["pageMarginBottomPt"] },
|
|
325
|
+
{ required: ["pageMarginLeftPt"] },
|
|
326
|
+
{ required: ["pageMarginRightPt"] },
|
|
327
|
+
{ required: ["pageSizeWidthPt"] },
|
|
328
|
+
{ required: ["pageSizeHeightPt"] },
|
|
329
|
+
{ required: ["useCustomHeaderFooterMargins"] },
|
|
330
|
+
],
|
|
331
|
+
}),
|
|
344
332
|
async execute(input, ctx) {
|
|
345
333
|
const p = (input ?? {});
|
|
346
334
|
const documentId = extractDocumentId(p.document);
|