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
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
* raw Gmail API response (including base64url `raw` for format=raw,
|
|
21
21
|
* or parsed `payload` tree for format=full).
|
|
22
22
|
*/
|
|
23
|
+
import * as t from "typebox";
|
|
23
24
|
import { googleAccessToken } from "../../_shared/googleAuth.js";
|
|
25
|
+
import { GoogleTimestamp, Id, NonEmptyString, stringEnum, } from "../../_shared/googleSchemas.js";
|
|
24
26
|
// ─── Auth ────────────────────────────────────────────────────────
|
|
25
27
|
async function accessToken(ctx) {
|
|
26
28
|
return googleAccessToken(ctx, "gmail", SCOPES);
|
|
@@ -503,6 +505,82 @@ const SCOPES = [
|
|
|
503
505
|
"https://www.googleapis.com/auth/gmail.compose",
|
|
504
506
|
"https://www.googleapis.com/auth/gmail.labels",
|
|
505
507
|
];
|
|
508
|
+
// ─── Action input schemas ────────────────────────────────────────
|
|
509
|
+
const strict = { additionalProperties: false };
|
|
510
|
+
const EmptyInput = t.Object({}, strict);
|
|
511
|
+
const IdInput = t.Object({ id: Id }, strict);
|
|
512
|
+
const MessageFormat = stringEnum(["minimal", "full", "raw", "metadata"]);
|
|
513
|
+
const ThreadFormat = stringEnum(["minimal", "full", "metadata"]);
|
|
514
|
+
const ReadStatus = stringEnum(["read", "unread", "both"]);
|
|
515
|
+
const LabelListVisibility = stringEnum([
|
|
516
|
+
"labelShow",
|
|
517
|
+
"labelShowIfUnread",
|
|
518
|
+
"labelHide",
|
|
519
|
+
]);
|
|
520
|
+
const MessageListVisibility = stringEnum(["show", "hide"]);
|
|
521
|
+
const MetadataHeaders = t.Array(t.String());
|
|
522
|
+
const LabelIds = t.Array(NonEmptyString, { minItems: 1 });
|
|
523
|
+
const MaxResults = t.Integer({ minimum: 1, maximum: 500 });
|
|
524
|
+
const AttachmentContent = t.Union([
|
|
525
|
+
t.String(),
|
|
526
|
+
t.Object({ contentBase64: t.String() }, strict),
|
|
527
|
+
]);
|
|
528
|
+
const Attachment = t.Object({
|
|
529
|
+
name: t.Optional(t.String()),
|
|
530
|
+
filename: t.Optional(t.String()),
|
|
531
|
+
mimeType: t.Optional(t.String()),
|
|
532
|
+
contentBase64: AttachmentContent,
|
|
533
|
+
}, strict);
|
|
534
|
+
const Attachments = t.Array(Attachment);
|
|
535
|
+
const HasMessageContent = {
|
|
536
|
+
anyOf: [
|
|
537
|
+
{
|
|
538
|
+
required: ["text"],
|
|
539
|
+
properties: { text: { type: "string", minLength: 1, pattern: "\\S" } },
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
required: ["html"],
|
|
543
|
+
properties: { html: { type: "string", minLength: 1, pattern: "\\S" } },
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
required: ["attachments"],
|
|
547
|
+
properties: { attachments: { type: "array", minItems: 1 } },
|
|
548
|
+
},
|
|
549
|
+
],
|
|
550
|
+
};
|
|
551
|
+
const ReplyFields = {
|
|
552
|
+
text: t.Optional(t.String()),
|
|
553
|
+
html: t.Optional(t.String()),
|
|
554
|
+
cc: t.Optional(t.String()),
|
|
555
|
+
bcc: t.Optional(t.String()),
|
|
556
|
+
replyToSenderOnly: t.Optional(t.Boolean()),
|
|
557
|
+
replyToRecipientsOnly: t.Optional(t.Boolean()),
|
|
558
|
+
attachments: t.Optional(Attachments),
|
|
559
|
+
};
|
|
560
|
+
const ReplyOptions = {
|
|
561
|
+
...strict,
|
|
562
|
+
...HasMessageContent,
|
|
563
|
+
not: {
|
|
564
|
+
required: ["replyToSenderOnly", "replyToRecipientsOnly"],
|
|
565
|
+
properties: {
|
|
566
|
+
replyToSenderOnly: { const: true },
|
|
567
|
+
replyToRecipientsOnly: { const: true },
|
|
568
|
+
},
|
|
569
|
+
},
|
|
570
|
+
};
|
|
571
|
+
const ListFields = {
|
|
572
|
+
q: t.Optional(t.String({ description: "Gmail search query" })),
|
|
573
|
+
sender: t.Optional(t.String()),
|
|
574
|
+
readStatus: t.Optional(ReadStatus),
|
|
575
|
+
receivedAfter: t.Optional(GoogleTimestamp),
|
|
576
|
+
receivedBefore: t.Optional(GoogleTimestamp),
|
|
577
|
+
labelIds: t.Optional(t.Array(NonEmptyString)),
|
|
578
|
+
maxResults: t.Optional(MaxResults),
|
|
579
|
+
pageToken: t.Optional(t.String()),
|
|
580
|
+
includeSpamTrash: t.Optional(t.Boolean()),
|
|
581
|
+
returnAll: t.Optional(t.Boolean()),
|
|
582
|
+
};
|
|
583
|
+
const ListInput = t.Object(ListFields, strict);
|
|
506
584
|
export default function gmail(rl) {
|
|
507
585
|
rl.setName("gmail");
|
|
508
586
|
rl.setVersion("0.1.0");
|
|
@@ -616,31 +694,20 @@ export default function gmail(rl) {
|
|
|
616
694
|
});
|
|
617
695
|
// ── Message ───────────────────────────────────────────
|
|
618
696
|
rl.registerAction("message.send", {
|
|
697
|
+
access: "write",
|
|
619
698
|
description: "Send an email",
|
|
620
|
-
inputSchema: {
|
|
621
|
-
to:
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
from: {
|
|
633
|
-
type: "string",
|
|
634
|
-
required: false,
|
|
635
|
-
description: 'Override From (e.g. "Name <me@x.com>")',
|
|
636
|
-
},
|
|
637
|
-
threadId: { type: "string", required: false },
|
|
638
|
-
attachments: {
|
|
639
|
-
type: "array",
|
|
640
|
-
required: false,
|
|
641
|
-
description: "[{name, mimeType, contentBase64}]",
|
|
642
|
-
},
|
|
643
|
-
},
|
|
699
|
+
inputSchema: t.Object({
|
|
700
|
+
to: NonEmptyString,
|
|
701
|
+
subject: t.String(),
|
|
702
|
+
text: t.Optional(t.String({ description: "Plain body" })),
|
|
703
|
+
html: t.Optional(t.String({ description: "HTML body" })),
|
|
704
|
+
cc: t.Optional(t.String()),
|
|
705
|
+
bcc: t.Optional(t.String()),
|
|
706
|
+
replyTo: t.Optional(t.String()),
|
|
707
|
+
from: t.Optional(t.String({ description: 'Override From (e.g. "Name <me@x.com>")' })),
|
|
708
|
+
threadId: t.Optional(Id),
|
|
709
|
+
attachments: t.Optional(Attachments),
|
|
710
|
+
}, { ...strict, ...HasMessageContent }),
|
|
644
711
|
async execute(input, ctx) {
|
|
645
712
|
const p = (input ?? {});
|
|
646
713
|
const email = {
|
|
@@ -661,38 +728,25 @@ export default function gmail(rl) {
|
|
|
661
728
|
},
|
|
662
729
|
});
|
|
663
730
|
rl.registerAction("message.reply", {
|
|
731
|
+
access: "write",
|
|
664
732
|
description: "Reply to a message, preserving threadId and In-Reply-To/References headers",
|
|
665
|
-
inputSchema: {
|
|
666
|
-
messageId: { type: "string", required: true },
|
|
667
|
-
text: { type: "string", required: false },
|
|
668
|
-
html: { type: "string", required: false },
|
|
669
|
-
cc: { type: "string", required: false },
|
|
670
|
-
bcc: { type: "string", required: false },
|
|
671
|
-
replyToSenderOnly: { type: "boolean", required: false },
|
|
672
|
-
replyToRecipientsOnly: { type: "boolean", required: false },
|
|
673
|
-
attachments: { type: "array", required: false },
|
|
674
|
-
},
|
|
733
|
+
inputSchema: t.Object({ messageId: Id, ...ReplyFields }, ReplyOptions),
|
|
675
734
|
async execute(input, ctx) {
|
|
676
735
|
const p = (input ?? {});
|
|
677
736
|
return replyToMessage(ctx, p.messageId, p);
|
|
678
737
|
},
|
|
679
738
|
});
|
|
680
739
|
rl.registerAction("message.get", {
|
|
740
|
+
access: "read",
|
|
681
741
|
description: "Get a message by ID",
|
|
682
|
-
inputSchema: {
|
|
683
|
-
id:
|
|
684
|
-
format:
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
description: "minimal | full | raw | metadata (default: full)",
|
|
688
|
-
},
|
|
689
|
-
metadataHeaders: { type: "array", required: false },
|
|
690
|
-
simple: {
|
|
691
|
-
type: "boolean",
|
|
692
|
-
required: false,
|
|
742
|
+
inputSchema: t.Object({
|
|
743
|
+
id: Id,
|
|
744
|
+
format: t.Optional(MessageFormat),
|
|
745
|
+
metadataHeaders: t.Optional(MetadataHeaders),
|
|
746
|
+
simple: t.Optional(t.Boolean({
|
|
693
747
|
description: "Flatten headers, resolve labels to names, and decode text/html bodies",
|
|
694
|
-
},
|
|
695
|
-
},
|
|
748
|
+
})),
|
|
749
|
+
}, strict),
|
|
696
750
|
async execute(input, ctx) {
|
|
697
751
|
const p = (input ?? {});
|
|
698
752
|
const qs = { format: p.format ?? "full" };
|
|
@@ -706,31 +760,9 @@ export default function gmail(rl) {
|
|
|
706
760
|
},
|
|
707
761
|
});
|
|
708
762
|
rl.registerAction("message.list", {
|
|
763
|
+
access: "read",
|
|
709
764
|
description: "List messages. Supports Gmail search syntax via `q`, plus friendly filters: sender, readStatus ('read'|'unread'), receivedAfter/Before (ISO string, ms, or seconds).",
|
|
710
|
-
inputSchema:
|
|
711
|
-
q: { type: "string", required: false, description: "Gmail search query" },
|
|
712
|
-
sender: { type: "string", required: false },
|
|
713
|
-
readStatus: {
|
|
714
|
-
type: "string",
|
|
715
|
-
required: false,
|
|
716
|
-
description: "read | unread | both (default: both)",
|
|
717
|
-
},
|
|
718
|
-
receivedAfter: {
|
|
719
|
-
type: "string",
|
|
720
|
-
required: false,
|
|
721
|
-
description: "ISO datetime, epoch ms, or epoch seconds",
|
|
722
|
-
},
|
|
723
|
-
receivedBefore: { type: "string", required: false },
|
|
724
|
-
labelIds: { type: "array", required: false },
|
|
725
|
-
maxResults: { type: "number", required: false },
|
|
726
|
-
pageToken: { type: "string", required: false },
|
|
727
|
-
includeSpamTrash: { type: "boolean", required: false },
|
|
728
|
-
returnAll: {
|
|
729
|
-
type: "boolean",
|
|
730
|
-
required: false,
|
|
731
|
-
description: "Paginate until exhausted",
|
|
732
|
-
},
|
|
733
|
-
},
|
|
765
|
+
inputSchema: ListInput,
|
|
734
766
|
async execute(input, ctx) {
|
|
735
767
|
const p = (input ?? {});
|
|
736
768
|
const qs = buildListQuery(p);
|
|
@@ -743,32 +775,36 @@ export default function gmail(rl) {
|
|
|
743
775
|
},
|
|
744
776
|
});
|
|
745
777
|
rl.registerAction("message.delete", {
|
|
778
|
+
access: "write",
|
|
746
779
|
description: "Permanently delete a message",
|
|
747
|
-
inputSchema:
|
|
780
|
+
inputSchema: IdInput,
|
|
748
781
|
async execute(input, ctx) {
|
|
749
782
|
const { id } = input;
|
|
750
783
|
return gmailRequest(ctx, "DELETE", `/messages/${id}`);
|
|
751
784
|
},
|
|
752
785
|
});
|
|
753
786
|
rl.registerAction("message.trash", {
|
|
787
|
+
access: "write",
|
|
754
788
|
description: "Move a message to trash (recoverable)",
|
|
755
|
-
inputSchema:
|
|
789
|
+
inputSchema: IdInput,
|
|
756
790
|
async execute(input, ctx) {
|
|
757
791
|
const { id } = input;
|
|
758
792
|
return gmailRequest(ctx, "POST", `/messages/${id}/trash`);
|
|
759
793
|
},
|
|
760
794
|
});
|
|
761
795
|
rl.registerAction("message.untrash", {
|
|
796
|
+
access: "write",
|
|
762
797
|
description: "Remove a message from trash",
|
|
763
|
-
inputSchema:
|
|
798
|
+
inputSchema: IdInput,
|
|
764
799
|
async execute(input, ctx) {
|
|
765
800
|
const { id } = input;
|
|
766
801
|
return gmailRequest(ctx, "POST", `/messages/${id}/untrash`);
|
|
767
802
|
},
|
|
768
803
|
});
|
|
769
804
|
rl.registerAction("message.markAsRead", {
|
|
805
|
+
access: "write",
|
|
770
806
|
description: "Remove the UNREAD label",
|
|
771
|
-
inputSchema:
|
|
807
|
+
inputSchema: IdInput,
|
|
772
808
|
async execute(input, ctx) {
|
|
773
809
|
const { id } = input;
|
|
774
810
|
return gmailRequest(ctx, "POST", `/messages/${id}/modify`, {
|
|
@@ -777,8 +813,9 @@ export default function gmail(rl) {
|
|
|
777
813
|
},
|
|
778
814
|
});
|
|
779
815
|
rl.registerAction("message.markAsUnread", {
|
|
816
|
+
access: "write",
|
|
780
817
|
description: "Add the UNREAD label",
|
|
781
|
-
inputSchema:
|
|
818
|
+
inputSchema: IdInput,
|
|
782
819
|
async execute(input, ctx) {
|
|
783
820
|
const { id } = input;
|
|
784
821
|
return gmailRequest(ctx, "POST", `/messages/${id}/modify`, {
|
|
@@ -787,11 +824,9 @@ export default function gmail(rl) {
|
|
|
787
824
|
},
|
|
788
825
|
});
|
|
789
826
|
rl.registerAction("message.addLabels", {
|
|
827
|
+
access: "write",
|
|
790
828
|
description: "Add labels to a message",
|
|
791
|
-
inputSchema: {
|
|
792
|
-
id: { type: "string", required: true },
|
|
793
|
-
labelIds: { type: "array", required: true },
|
|
794
|
-
},
|
|
829
|
+
inputSchema: t.Object({ id: Id, labelIds: LabelIds }, strict),
|
|
795
830
|
async execute(input, ctx) {
|
|
796
831
|
const { id, labelIds } = input;
|
|
797
832
|
return gmailRequest(ctx, "POST", `/messages/${id}/modify`, {
|
|
@@ -800,11 +835,9 @@ export default function gmail(rl) {
|
|
|
800
835
|
},
|
|
801
836
|
});
|
|
802
837
|
rl.registerAction("message.removeLabels", {
|
|
838
|
+
access: "write",
|
|
803
839
|
description: "Remove labels from a message",
|
|
804
|
-
inputSchema: {
|
|
805
|
-
id: { type: "string", required: true },
|
|
806
|
-
labelIds: { type: "array", required: true },
|
|
807
|
-
},
|
|
840
|
+
inputSchema: t.Object({ id: Id, labelIds: LabelIds }, strict),
|
|
808
841
|
async execute(input, ctx) {
|
|
809
842
|
const { id, labelIds } = input;
|
|
810
843
|
return gmailRequest(ctx, "POST", `/messages/${id}/modify`, {
|
|
@@ -813,11 +846,9 @@ export default function gmail(rl) {
|
|
|
813
846
|
},
|
|
814
847
|
});
|
|
815
848
|
rl.registerAction("message.getAttachment", {
|
|
849
|
+
access: "read",
|
|
816
850
|
description: "Download an attachment by ID (returns {size, data} where data is base64url)",
|
|
817
|
-
inputSchema: {
|
|
818
|
-
messageId: { type: "string", required: true },
|
|
819
|
-
attachmentId: { type: "string", required: true },
|
|
820
|
-
},
|
|
851
|
+
inputSchema: t.Object({ messageId: Id, attachmentId: Id }, strict),
|
|
821
852
|
async execute(input, ctx) {
|
|
822
853
|
const { messageId, attachmentId } = input;
|
|
823
854
|
return gmailRequest(ctx, "GET", `/messages/${messageId}/attachments/${attachmentId}`);
|
|
@@ -825,21 +856,16 @@ export default function gmail(rl) {
|
|
|
825
856
|
});
|
|
826
857
|
// ── Thread ────────────────────────────────────────────
|
|
827
858
|
rl.registerAction("thread.get", {
|
|
859
|
+
access: "read",
|
|
828
860
|
description: "Get a thread by ID",
|
|
829
|
-
inputSchema: {
|
|
830
|
-
id:
|
|
831
|
-
format:
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
description: "minimal | full | metadata",
|
|
835
|
-
},
|
|
836
|
-
metadataHeaders: { type: "array", required: false },
|
|
837
|
-
simple: {
|
|
838
|
-
type: "boolean",
|
|
839
|
-
required: false,
|
|
861
|
+
inputSchema: t.Object({
|
|
862
|
+
id: Id,
|
|
863
|
+
format: t.Optional(ThreadFormat),
|
|
864
|
+
metadataHeaders: t.Optional(MetadataHeaders),
|
|
865
|
+
simple: t.Optional(t.Boolean({
|
|
840
866
|
description: "Return an array of simplified messages instead of the raw thread",
|
|
841
|
-
},
|
|
842
|
-
},
|
|
867
|
+
})),
|
|
868
|
+
}, strict),
|
|
843
869
|
async execute(input, ctx) {
|
|
844
870
|
const p = (input ?? {});
|
|
845
871
|
const qs = { format: p.format ?? "full" };
|
|
@@ -853,19 +879,9 @@ export default function gmail(rl) {
|
|
|
853
879
|
},
|
|
854
880
|
});
|
|
855
881
|
rl.registerAction("thread.list", {
|
|
882
|
+
access: "read",
|
|
856
883
|
description: "List threads. Same filter sugar as `message.list` (sender, readStatus, receivedAfter/Before).",
|
|
857
|
-
inputSchema:
|
|
858
|
-
q: { type: "string", required: false },
|
|
859
|
-
sender: { type: "string", required: false },
|
|
860
|
-
readStatus: { type: "string", required: false },
|
|
861
|
-
receivedAfter: { type: "string", required: false },
|
|
862
|
-
receivedBefore: { type: "string", required: false },
|
|
863
|
-
labelIds: { type: "array", required: false },
|
|
864
|
-
maxResults: { type: "number", required: false },
|
|
865
|
-
pageToken: { type: "string", required: false },
|
|
866
|
-
includeSpamTrash: { type: "boolean", required: false },
|
|
867
|
-
returnAll: { type: "boolean", required: false },
|
|
868
|
-
},
|
|
884
|
+
inputSchema: ListInput,
|
|
869
885
|
async execute(input, ctx) {
|
|
870
886
|
const p = (input ?? {});
|
|
871
887
|
const qs = buildListQuery(p);
|
|
@@ -877,35 +893,36 @@ export default function gmail(rl) {
|
|
|
877
893
|
},
|
|
878
894
|
});
|
|
879
895
|
rl.registerAction("thread.delete", {
|
|
896
|
+
access: "write",
|
|
880
897
|
description: "Permanently delete a thread",
|
|
881
|
-
inputSchema:
|
|
898
|
+
inputSchema: IdInput,
|
|
882
899
|
async execute(input, ctx) {
|
|
883
900
|
const { id } = input;
|
|
884
901
|
return gmailRequest(ctx, "DELETE", `/threads/${id}`);
|
|
885
902
|
},
|
|
886
903
|
});
|
|
887
904
|
rl.registerAction("thread.trash", {
|
|
905
|
+
access: "write",
|
|
888
906
|
description: "Move a thread to trash",
|
|
889
|
-
inputSchema:
|
|
907
|
+
inputSchema: IdInput,
|
|
890
908
|
async execute(input, ctx) {
|
|
891
909
|
const { id } = input;
|
|
892
910
|
return gmailRequest(ctx, "POST", `/threads/${id}/trash`);
|
|
893
911
|
},
|
|
894
912
|
});
|
|
895
913
|
rl.registerAction("thread.untrash", {
|
|
914
|
+
access: "write",
|
|
896
915
|
description: "Remove a thread from trash",
|
|
897
|
-
inputSchema:
|
|
916
|
+
inputSchema: IdInput,
|
|
898
917
|
async execute(input, ctx) {
|
|
899
918
|
const { id } = input;
|
|
900
919
|
return gmailRequest(ctx, "POST", `/threads/${id}/untrash`);
|
|
901
920
|
},
|
|
902
921
|
});
|
|
903
922
|
rl.registerAction("thread.addLabels", {
|
|
923
|
+
access: "write",
|
|
904
924
|
description: "Add labels to all messages in a thread",
|
|
905
|
-
inputSchema: {
|
|
906
|
-
id: { type: "string", required: true },
|
|
907
|
-
labelIds: { type: "array", required: true },
|
|
908
|
-
},
|
|
925
|
+
inputSchema: t.Object({ id: Id, labelIds: LabelIds }, strict),
|
|
909
926
|
async execute(input, ctx) {
|
|
910
927
|
const { id, labelIds } = input;
|
|
911
928
|
return gmailRequest(ctx, "POST", `/threads/${id}/modify`, {
|
|
@@ -914,11 +931,9 @@ export default function gmail(rl) {
|
|
|
914
931
|
},
|
|
915
932
|
});
|
|
916
933
|
rl.registerAction("thread.removeLabels", {
|
|
934
|
+
access: "write",
|
|
917
935
|
description: "Remove labels from all messages in a thread",
|
|
918
|
-
inputSchema: {
|
|
919
|
-
id: { type: "string", required: true },
|
|
920
|
-
labelIds: { type: "array", required: true },
|
|
921
|
-
},
|
|
936
|
+
inputSchema: t.Object({ id: Id, labelIds: LabelIds }, strict),
|
|
922
937
|
async execute(input, ctx) {
|
|
923
938
|
const { id, labelIds } = input;
|
|
924
939
|
return gmailRequest(ctx, "POST", `/threads/${id}/modify`, {
|
|
@@ -927,17 +942,9 @@ export default function gmail(rl) {
|
|
|
927
942
|
},
|
|
928
943
|
});
|
|
929
944
|
rl.registerAction("thread.reply", {
|
|
945
|
+
access: "write",
|
|
930
946
|
description: "Reply to the last message in a thread (convenience wrapper over message.reply)",
|
|
931
|
-
inputSchema: {
|
|
932
|
-
id: { type: "string", required: true, description: "Thread ID" },
|
|
933
|
-
text: { type: "string", required: false },
|
|
934
|
-
html: { type: "string", required: false },
|
|
935
|
-
cc: { type: "string", required: false },
|
|
936
|
-
bcc: { type: "string", required: false },
|
|
937
|
-
replyToSenderOnly: { type: "boolean", required: false },
|
|
938
|
-
replyToRecipientsOnly: { type: "boolean", required: false },
|
|
939
|
-
attachments: { type: "array", required: false },
|
|
940
|
-
},
|
|
947
|
+
inputSchema: t.Object({ id: Id, ...ReplyFields }, ReplyOptions),
|
|
941
948
|
async execute(input, ctx) {
|
|
942
949
|
const p = (input ?? {});
|
|
943
950
|
const thread = (await gmailRequest(ctx, "GET", `/threads/${p.id}`, undefined, { format: "minimal" }));
|
|
@@ -950,24 +957,23 @@ export default function gmail(rl) {
|
|
|
950
957
|
});
|
|
951
958
|
// ── Draft ─────────────────────────────────────────────
|
|
952
959
|
rl.registerAction("draft.create", {
|
|
960
|
+
access: "write",
|
|
953
961
|
description: "Create a draft",
|
|
954
|
-
inputSchema: {
|
|
955
|
-
to:
|
|
956
|
-
subject:
|
|
957
|
-
text:
|
|
958
|
-
html:
|
|
959
|
-
cc:
|
|
960
|
-
bcc:
|
|
961
|
-
replyTo:
|
|
962
|
-
from:
|
|
963
|
-
fromAlias: {
|
|
964
|
-
type: "string",
|
|
965
|
-
required: false,
|
|
962
|
+
inputSchema: t.Object({
|
|
963
|
+
to: t.Optional(t.String()),
|
|
964
|
+
subject: t.Optional(t.String()),
|
|
965
|
+
text: t.Optional(t.String()),
|
|
966
|
+
html: t.Optional(t.String()),
|
|
967
|
+
cc: t.Optional(t.String()),
|
|
968
|
+
bcc: t.Optional(t.String()),
|
|
969
|
+
replyTo: t.Optional(t.String()),
|
|
970
|
+
from: t.Optional(t.String()),
|
|
971
|
+
fromAlias: t.Optional(t.String({
|
|
966
972
|
description: "Send-as alias address (e.g. 'me+alt@x.com'); sets the From header",
|
|
967
|
-
},
|
|
968
|
-
threadId:
|
|
969
|
-
attachments:
|
|
970
|
-
},
|
|
973
|
+
})),
|
|
974
|
+
threadId: t.Optional(Id),
|
|
975
|
+
attachments: t.Optional(Attachments),
|
|
976
|
+
}, strict),
|
|
971
977
|
async execute(input, ctx) {
|
|
972
978
|
const p = (input ?? {});
|
|
973
979
|
const from = p.from ?? p.fromAlias;
|
|
@@ -1001,11 +1007,9 @@ export default function gmail(rl) {
|
|
|
1001
1007
|
},
|
|
1002
1008
|
});
|
|
1003
1009
|
rl.registerAction("draft.get", {
|
|
1010
|
+
access: "read",
|
|
1004
1011
|
description: "Get a draft by ID",
|
|
1005
|
-
inputSchema: {
|
|
1006
|
-
id: { type: "string", required: true },
|
|
1007
|
-
format: { type: "string", required: false },
|
|
1008
|
-
},
|
|
1012
|
+
inputSchema: t.Object({ id: Id, format: t.Optional(MessageFormat) }, strict),
|
|
1009
1013
|
async execute(input, ctx) {
|
|
1010
1014
|
const p = (input ?? {});
|
|
1011
1015
|
const qs = { format: p.format ?? "full" };
|
|
@@ -1013,14 +1017,15 @@ export default function gmail(rl) {
|
|
|
1013
1017
|
},
|
|
1014
1018
|
});
|
|
1015
1019
|
rl.registerAction("draft.list", {
|
|
1020
|
+
access: "read",
|
|
1016
1021
|
description: "List drafts",
|
|
1017
|
-
inputSchema: {
|
|
1018
|
-
q:
|
|
1019
|
-
maxResults:
|
|
1020
|
-
pageToken:
|
|
1021
|
-
includeSpamTrash:
|
|
1022
|
-
returnAll:
|
|
1023
|
-
},
|
|
1022
|
+
inputSchema: t.Object({
|
|
1023
|
+
q: t.Optional(t.String()),
|
|
1024
|
+
maxResults: t.Optional(MaxResults),
|
|
1025
|
+
pageToken: t.Optional(t.String()),
|
|
1026
|
+
includeSpamTrash: t.Optional(t.Boolean()),
|
|
1027
|
+
returnAll: t.Optional(t.Boolean()),
|
|
1028
|
+
}, strict),
|
|
1024
1029
|
async execute(input, ctx) {
|
|
1025
1030
|
const p = (input ?? {});
|
|
1026
1031
|
const qs = {};
|
|
@@ -1038,16 +1043,18 @@ export default function gmail(rl) {
|
|
|
1038
1043
|
},
|
|
1039
1044
|
});
|
|
1040
1045
|
rl.registerAction("draft.delete", {
|
|
1046
|
+
access: "write",
|
|
1041
1047
|
description: "Delete a draft",
|
|
1042
|
-
inputSchema:
|
|
1048
|
+
inputSchema: IdInput,
|
|
1043
1049
|
async execute(input, ctx) {
|
|
1044
1050
|
const { id } = input;
|
|
1045
1051
|
return gmailRequest(ctx, "DELETE", `/drafts/${id}`);
|
|
1046
1052
|
},
|
|
1047
1053
|
});
|
|
1048
1054
|
rl.registerAction("draft.send", {
|
|
1055
|
+
access: "write",
|
|
1049
1056
|
description: "Send an existing draft",
|
|
1050
|
-
inputSchema:
|
|
1057
|
+
inputSchema: IdInput,
|
|
1051
1058
|
async execute(input, ctx) {
|
|
1052
1059
|
const { id } = input;
|
|
1053
1060
|
return gmailRequest(ctx, "POST", "/drafts/send", { id });
|
|
@@ -1055,20 +1062,13 @@ export default function gmail(rl) {
|
|
|
1055
1062
|
});
|
|
1056
1063
|
// ── Label ─────────────────────────────────────────────
|
|
1057
1064
|
rl.registerAction("label.create", {
|
|
1065
|
+
access: "write",
|
|
1058
1066
|
description: "Create a label",
|
|
1059
|
-
inputSchema: {
|
|
1060
|
-
name:
|
|
1061
|
-
labelListVisibility:
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
description: "labelShow | labelShowIfUnread | labelHide",
|
|
1065
|
-
},
|
|
1066
|
-
messageListVisibility: {
|
|
1067
|
-
type: "string",
|
|
1068
|
-
required: false,
|
|
1069
|
-
description: "show | hide",
|
|
1070
|
-
},
|
|
1071
|
-
},
|
|
1067
|
+
inputSchema: t.Object({
|
|
1068
|
+
name: NonEmptyString,
|
|
1069
|
+
labelListVisibility: t.Optional(LabelListVisibility),
|
|
1070
|
+
messageListVisibility: t.Optional(MessageListVisibility),
|
|
1071
|
+
}, strict),
|
|
1072
1072
|
async execute(input, ctx) {
|
|
1073
1073
|
const p = (input ?? {});
|
|
1074
1074
|
const body = { name: p.name };
|
|
@@ -1082,36 +1082,48 @@ export default function gmail(rl) {
|
|
|
1082
1082
|
},
|
|
1083
1083
|
});
|
|
1084
1084
|
rl.registerAction("label.get", {
|
|
1085
|
+
access: "read",
|
|
1085
1086
|
description: "Get a label by ID",
|
|
1086
|
-
inputSchema:
|
|
1087
|
+
inputSchema: IdInput,
|
|
1087
1088
|
async execute(input, ctx) {
|
|
1088
1089
|
const { id } = input;
|
|
1089
1090
|
return gmailRequest(ctx, "GET", `/labels/${id}`);
|
|
1090
1091
|
},
|
|
1091
1092
|
});
|
|
1092
1093
|
rl.registerAction("label.list", {
|
|
1094
|
+
access: "read",
|
|
1093
1095
|
description: "List all labels",
|
|
1096
|
+
inputSchema: EmptyInput,
|
|
1094
1097
|
async execute(_input, ctx) {
|
|
1095
1098
|
const res = (await gmailRequest(ctx, "GET", "/labels"));
|
|
1096
1099
|
return res.labels ?? [];
|
|
1097
1100
|
},
|
|
1098
1101
|
});
|
|
1099
1102
|
rl.registerAction("label.delete", {
|
|
1103
|
+
access: "write",
|
|
1100
1104
|
description: "Delete a label",
|
|
1101
|
-
inputSchema:
|
|
1105
|
+
inputSchema: IdInput,
|
|
1102
1106
|
async execute(input, ctx) {
|
|
1103
1107
|
const { id } = input;
|
|
1104
1108
|
return gmailRequest(ctx, "DELETE", `/labels/${id}`);
|
|
1105
1109
|
},
|
|
1106
1110
|
});
|
|
1107
1111
|
rl.registerAction("label.update", {
|
|
1112
|
+
access: "write",
|
|
1108
1113
|
description: "Update a label",
|
|
1109
|
-
inputSchema: {
|
|
1110
|
-
id:
|
|
1111
|
-
name:
|
|
1112
|
-
labelListVisibility:
|
|
1113
|
-
messageListVisibility:
|
|
1114
|
-
},
|
|
1114
|
+
inputSchema: t.Object({
|
|
1115
|
+
id: Id,
|
|
1116
|
+
name: t.Optional(NonEmptyString),
|
|
1117
|
+
labelListVisibility: t.Optional(LabelListVisibility),
|
|
1118
|
+
messageListVisibility: t.Optional(MessageListVisibility),
|
|
1119
|
+
}, {
|
|
1120
|
+
...strict,
|
|
1121
|
+
anyOf: [
|
|
1122
|
+
{ required: ["name"] },
|
|
1123
|
+
{ required: ["labelListVisibility"] },
|
|
1124
|
+
{ required: ["messageListVisibility"] },
|
|
1125
|
+
],
|
|
1126
|
+
}),
|
|
1115
1127
|
async execute(input, ctx) {
|
|
1116
1128
|
const p = (input ?? {});
|
|
1117
1129
|
const body = {};
|
|
@@ -1128,13 +1140,17 @@ export default function gmail(rl) {
|
|
|
1128
1140
|
});
|
|
1129
1141
|
// ── Profile / aliases ─────────────────────────────────
|
|
1130
1142
|
rl.registerAction("profile.get", {
|
|
1143
|
+
access: "read",
|
|
1131
1144
|
description: "Get the authenticated user's profile",
|
|
1145
|
+
inputSchema: EmptyInput,
|
|
1132
1146
|
async execute(_input, ctx) {
|
|
1133
1147
|
return gmailRequest(ctx, "GET", "/profile");
|
|
1134
1148
|
},
|
|
1135
1149
|
});
|
|
1136
1150
|
rl.registerAction("alias.list", {
|
|
1151
|
+
access: "read",
|
|
1137
1152
|
description: "List configured send-as aliases",
|
|
1153
|
+
inputSchema: EmptyInput,
|
|
1138
1154
|
async execute(_input, ctx) {
|
|
1139
1155
|
const res = (await gmailRequest(ctx, "GET", "/settings/sendAs"));
|
|
1140
1156
|
return res.sendAs ?? [];
|
|
@@ -62,6 +62,7 @@ export default function gong(rl) {
|
|
|
62
62
|
},
|
|
63
63
|
});
|
|
64
64
|
rl.registerAction("call.get", {
|
|
65
|
+
access: "read",
|
|
65
66
|
description: "Get detailed call data",
|
|
66
67
|
inputSchema: {
|
|
67
68
|
callId: { type: "string", required: true, description: "Call ID" },
|
|
@@ -83,6 +84,7 @@ export default function gong(rl) {
|
|
|
83
84
|
},
|
|
84
85
|
});
|
|
85
86
|
rl.registerAction("call.list", {
|
|
87
|
+
access: "read",
|
|
86
88
|
description: "List calls",
|
|
87
89
|
inputSchema: {
|
|
88
90
|
limit: { type: "number", required: false, description: "Max results" },
|
|
@@ -130,6 +132,7 @@ export default function gong(rl) {
|
|
|
130
132
|
},
|
|
131
133
|
});
|
|
132
134
|
rl.registerAction("user.get", {
|
|
135
|
+
access: "read",
|
|
133
136
|
description: "Get a user",
|
|
134
137
|
inputSchema: {
|
|
135
138
|
userId: { type: "string", required: true, description: "User ID" },
|
|
@@ -145,6 +148,7 @@ export default function gong(rl) {
|
|
|
145
148
|
},
|
|
146
149
|
});
|
|
147
150
|
rl.registerAction("user.list", {
|
|
151
|
+
access: "read",
|
|
148
152
|
description: "List users",
|
|
149
153
|
inputSchema: {
|
|
150
154
|
limit: { type: "number", required: false, description: "Max results" },
|