@composio/core 0.5.5 → 0.6.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/BaseProvider-2__95v5V.d.cts +26875 -0
- package/dist/BaseProvider-D1UCDu8V.d.mts +26875 -0
- package/dist/FileToolModifier.utils.neutral-BN_L8usp.mjs +78 -0
- package/dist/FileToolModifier.utils.neutral-Bcl7LVf4.cjs +102 -0
- package/dist/Telemetry-Bn5VseVi.mjs +331 -0
- package/dist/Telemetry-DErMJqj0.cjs +337 -0
- package/dist/buffer-BFpVRahf.mjs +382 -0
- package/dist/buffer-CYf1Z6Sd.cjs +478 -0
- package/dist/composio-CFe2Q5BN.d.cts +6313 -0
- package/dist/composio-DtAsGWh4.d.mts +6313 -0
- package/dist/fileUtils.node-BJQeDcfa.cjs +233 -0
- package/dist/fileUtils.node-C6fQOgF0.mjs +220 -0
- package/dist/index.cjs +140 -389
- package/dist/index.d.cts +6 -33161
- package/dist/index.d.mts +6 -33161
- package/dist/index.mjs +49 -297
- package/dist/models/Files.node.cjs +6 -4
- package/dist/models/Files.node.d.cts +1 -1
- package/dist/models/Files.node.d.mts +1 -1
- package/dist/models/Files.node.mjs +4 -2
- package/dist/models/Files.workerd.cjs +1 -1
- package/dist/models/Files.workerd.mjs +1 -1
- package/dist/platform/node.cjs +6 -3
- package/dist/platform/node.d.cts +1 -1
- package/dist/platform/node.d.mts +1 -1
- package/dist/platform/node.mjs +6 -3
- package/dist/platform/workerd.d.cts +1 -1
- package/dist/platform/workerd.d.mts +1 -1
- package/dist/{types-BaUqjuX3.d.mts → types-BF2OQZRP.d.cts} +8 -5
- package/dist/{types-BrsW5suw.d.cts → types-Cvt_yFsu.d.mts} +8 -5
- package/dist/types-Do-rlwX8.d.mts +13 -0
- package/dist/types-Ohe4pd-1.d.cts +13 -0
- package/dist/utils/config-defaults/ConfigDefaults.node.cjs +10 -0
- package/dist/utils/config-defaults/ConfigDefaults.node.d.cts +7 -0
- package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +8 -0
- package/dist/utils/config-defaults/ConfigDefaults.node.mjs +9 -0
- package/dist/utils/config-defaults/ConfigDefaults.workerd.cjs +10 -0
- package/dist/utils/config-defaults/ConfigDefaults.workerd.d.cts +7 -0
- package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +8 -0
- package/dist/utils/config-defaults/ConfigDefaults.workerd.mjs +9 -0
- package/dist/utils/modifiers/FileToolModifier.node.cjs +172 -0
- package/dist/utils/modifiers/FileToolModifier.node.d.cts +21 -0
- package/dist/utils/modifiers/FileToolModifier.node.d.mts +21 -0
- package/dist/utils/modifiers/FileToolModifier.node.mjs +173 -0
- package/dist/utils/modifiers/FileToolModifier.workerd.cjs +27 -0
- package/dist/utils/modifiers/FileToolModifier.workerd.d.cts +20 -0
- package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +20 -0
- package/dist/utils/modifiers/FileToolModifier.workerd.mjs +27 -0
- package/generated/ably.ts +20 -0
- package/generated/accelo.ts +8 -0
- package/generated/acculynx.ts +17 -0
- package/generated/active_campaign.ts +30 -0
- package/generated/adobe.ts +8 -0
- package/generated/adyntel.ts +12 -0
- package/generated/aero_workflow.ts +8 -0
- package/generated/affinity.ts +29 -0
- package/generated/agencyzoom.ts +108 -0
- package/generated/ahrefs.ts +49 -0
- package/generated/airtable.ts +26 -0
- package/generated/alchemy.ts +16 -0
- package/generated/algolia.ts +39 -0
- package/generated/altoviz.ts +18 -0
- package/generated/amazon.ts +8 -0
- package/generated/amcards.ts +11 -0
- package/generated/amplitude.ts +25 -0
- package/generated/anthropic_administrator.ts +13 -0
- package/generated/apaleo.ts +38 -0
- package/generated/apollo.ts +40 -0
- package/generated/appdrag.ts +8 -0
- package/generated/appsflyer.ts +8 -0
- package/generated/asana.ts +95 -0
- package/generated/ashby.ts +8 -0
- package/generated/atlassian.ts +8 -0
- package/generated/attio.ts +20 -0
- package/generated/auth0.ts +8 -0
- package/generated/axonaut.ts +8 -0
- package/generated/bamboohr.ts +168 -0
- package/generated/bannerbear.ts +17 -0
- package/generated/baserow.ts +11 -0
- package/generated/battlenet.ts +8 -0
- package/generated/beeminder.ts +14 -0
- package/generated/bigmailer.ts +12 -0
- package/generated/bigml.ts +15 -0
- package/generated/bill.ts +218 -0
- package/generated/bitbucket.ts +25 -0
- package/generated/bitwarden.ts +8 -0
- package/generated/blackbaud.ts +8 -0
- package/generated/blackboard.ts +323 -0
- package/generated/boldsign.ts +8 -0
- package/generated/bolna.ts +24 -0
- package/generated/borneo.ts +162 -0
- package/generated/botbaba.ts +8 -0
- package/generated/box.ts +282 -0
- package/generated/braintree.ts +8 -0
- package/generated/brandfetch.ts +15 -0
- package/generated/breezy_hr.ts +8 -0
- package/generated/brevo.ts +28 -0
- package/generated/brex.ts +8 -0
- package/generated/brex_staging.ts +8 -0
- package/generated/brightpearl.ts +8 -0
- package/generated/brilliant_directories.ts +15 -0
- package/generated/browseai.ts +18 -0
- package/generated/browserbase_tool.ts +10 -0
- package/generated/browserhub.ts +8 -0
- package/generated/browserless.ts +16 -0
- package/generated/bubble.ts +8 -0
- package/generated/bugbug.ts +13 -0
- package/generated/builtwith.ts +21 -0
- package/generated/cal.ts +150 -0
- package/generated/calendly.ts +51 -0
- package/generated/canva.ts +41 -0
- package/generated/canvas.ts +100 -0
- package/generated/chatwork.ts +17 -0
- package/generated/chmeetings.ts +8 -0
- package/generated/clickup.ts +153 -0
- package/generated/clockify.ts +23 -0
- package/generated/close.ts +15 -0
- package/generated/cloudflare.ts +10 -0
- package/generated/coda.ts +115 -0
- package/generated/codeinterpreter.ts +14 -0
- package/generated/coinbase.ts +15 -0
- package/generated/coinmarketcal.ts +8 -0
- package/generated/composio.ts +34 -0
- package/generated/composio_search.ts +22 -0
- package/generated/confluence.ts +199 -0
- package/generated/contentful.ts +12 -0
- package/generated/crustdata.ts +23 -0
- package/generated/customer_io.ts +8 -0
- package/generated/cutt_ly.ts +10 -0
- package/generated/d2lbrightspace.ts +54 -0
- package/generated/dailybot.ts +15 -0
- package/generated/datadog.ts +47 -0
- package/generated/datagma.ts +8 -0
- package/generated/datarobot.ts +8 -0
- package/generated/deel.ts +8 -0
- package/generated/demio.ts +8 -0
- package/generated/dialpad.ts +201 -0
- package/generated/digicert.ts +15 -0
- package/generated/discord.ts +17 -0
- package/generated/discordbot.ts +173 -0
- package/generated/docmosis.ts +8 -0
- package/generated/docusign.ts +351 -0
- package/generated/dropbox.ts +20 -0
- package/generated/dropbox_sign.ts +8 -0
- package/generated/dynamics365.ts +25 -0
- package/generated/echtpost.ts +10 -0
- package/generated/elevenlabs.ts +70 -0
- package/generated/emailoctopus.ts +16 -0
- package/generated/enigma.ts +11 -0
- package/generated/entelligence.ts +11 -0
- package/generated/epic_games.ts +8 -0
- package/generated/eventbrite.ts +12 -0
- package/generated/exa.ts +13 -0
- package/generated/excel.ts +34 -0
- package/generated/exist.ts +8 -0
- package/generated/facebook.ts +8 -0
- package/generated/factorial.ts +8 -0
- package/generated/figma.ts +59 -0
- package/generated/finage.ts +19 -0
- package/generated/firecrawl.ts +16 -0
- package/generated/fireflies.ts +21 -0
- package/generated/fitbit.ts +8 -0
- package/generated/flutterwave.ts +33 -0
- package/generated/fomo.ts +10 -0
- package/generated/formcarry.ts +10 -0
- package/generated/formsite.ts +14 -0
- package/generated/foursquare.ts +14 -0
- package/generated/freshbooks.ts +11 -0
- package/generated/freshdesk.ts +16 -0
- package/generated/front.ts +8 -0
- package/generated/github.ts +967 -0
- package/generated/gitlab.ts +82 -0
- package/generated/gmail.d.ts +86 -0
- package/generated/gmail.js +13 -0
- package/generated/gmail.ts +95 -0
- package/generated/go_to_webinar.ts +8 -0
- package/generated/gong.ts +63 -0
- package/generated/google_analytics.ts +13 -0
- package/generated/google_maps.ts +16 -0
- package/generated/googleads.ts +14 -0
- package/generated/googlebigquery.ts +10 -0
- package/generated/googlecalendar.ts +39 -0
- package/generated/googledocs.ts +41 -0
- package/generated/googledrive.ts +62 -0
- package/generated/googlemeet.ts +18 -0
- package/generated/googlephotos.ts +22 -0
- package/generated/googlesheets.ts +40 -0
- package/generated/googleslides.ts +8 -0
- package/generated/googlesuper.ts +230 -0
- package/generated/googletasks.ts +23 -0
- package/generated/gorgias.ts +41 -0
- package/generated/gumroad.ts +14 -0
- package/generated/guru.ts +8 -0
- package/generated/hackernews.ts +15 -0
- package/generated/hackerrank_work.ts +8 -0
- package/generated/harvest.ts +56 -0
- package/generated/helcim.ts +8 -0
- package/generated/heygen.ts +44 -0
- package/generated/highlevel.ts +8 -0
- package/generated/hubspot.ts +252 -0
- package/generated/humanloop.ts +13 -0
- package/generated/icims_talent_cloud.ts +8 -0
- package/generated/idea_scale.ts +8 -0
- package/generated/index.ts +151 -0
- package/generated/insighto_ai.ts +19 -0
- package/generated/intercom.ts +52 -0
- package/generated/interzoid.ts +8 -0
- package/generated/jira.ts +59 -0
- package/generated/jotform.ts +15 -0
- package/generated/junglescout.ts +15 -0
- package/generated/keap.ts +8 -0
- package/generated/kibana.ts +58 -0
- package/generated/kit.ts +38 -0
- package/generated/klaviyo.ts +240 -0
- package/generated/klipfolio.ts +20 -0
- package/generated/kommo.ts +24 -0
- package/generated/lastpass.ts +8 -0
- package/generated/launch_darkly.ts +16 -0
- package/generated/leadfeeder.ts +13 -0
- package/generated/leadoku.ts +10 -0
- package/generated/lever.ts +8 -0
- package/generated/lever_sandbox.ts +8 -0
- package/generated/lexoffice.ts +8 -0
- package/generated/linear.ts +31 -0
- package/generated/linkedin.ts +13 -0
- package/generated/linkhut.ts +14 -0
- package/generated/linkup.ts +11 -0
- package/generated/listennotes.ts +35 -0
- package/generated/lmnt.ts +16 -0
- package/generated/lodgify.ts +10 -0
- package/generated/mailchimp.ts +285 -0
- package/generated/mailerlite.ts +8 -0
- package/generated/maintainx.ts +20 -0
- package/generated/make.ts +12 -0
- package/generated/mboum.ts +8 -0
- package/generated/mem0.ts +52 -0
- package/generated/metaads.ts +25 -0
- package/generated/metatextai.ts +8 -0
- package/generated/microsoft_clarity.ts +10 -0
- package/generated/microsoft_teams.ts +22 -0
- package/generated/microsoft_tenant.ts +8 -0
- package/generated/miro.ts +23 -0
- package/generated/mixpanel.ts +30 -0
- package/generated/mocean.ts +8 -0
- package/generated/monday.ts +30 -0
- package/generated/mopinion.ts +8 -0
- package/generated/more_trees.ts +10 -0
- package/generated/moxie.ts +8 -0
- package/generated/moz.ts +8 -0
- package/generated/mural.ts +14 -0
- package/generated/nasdaq.ts +15 -0
- package/generated/ncscale.ts +8 -0
- package/generated/neon.ts +78 -0
- package/generated/netsuite.ts +8 -0
- package/generated/nextdns.ts +11 -0
- package/generated/ngrok.ts +18 -0
- package/generated/notion.ts +40 -0
- package/generated/oncehub.ts +8 -0
- package/generated/one_drive.ts +49 -0
- package/generated/onepage.ts +11 -0
- package/generated/open_sea.ts +33 -0
- package/generated/outlook.ts +37 -0
- package/generated/pagerduty.ts +362 -0
- package/generated/pandadoc.ts +23 -0
- package/generated/peopledatalabs.ts +24 -0
- package/generated/perplexityai.ts +10 -0
- package/generated/piggy.ts +8 -0
- package/generated/pipedrive.ts +288 -0
- package/generated/placekey.ts +12 -0
- package/generated/posthog.ts +367 -0
- package/generated/precoro.ts +8 -0
- package/generated/printnode.ts +8 -0
- package/generated/process_street.ts +14 -0
- package/generated/productboard.ts +8 -0
- package/generated/qualaroo.ts +8 -0
- package/generated/quickbooks.ts +22 -0
- package/generated/rafflys.ts +8 -0
- package/generated/ragic.ts +10 -0
- package/generated/ramp.ts +17 -0
- package/generated/ravenseotools.ts +8 -0
- package/generated/recallai.ts +17 -0
- package/generated/reddit.ts +19 -0
- package/generated/resend.ts +27 -0
- package/generated/retellai.ts +19 -0
- package/generated/retently.ts +24 -0
- package/generated/ring_central.ts +8 -0
- package/generated/rippling.ts +8 -0
- package/generated/rocket_reach.ts +8 -0
- package/generated/rocketlane.ts +42 -0
- package/generated/rootly.ts +12 -0
- package/generated/rosette_text_analytics.ts +12 -0
- package/generated/sage.ts +8 -0
- package/generated/salesforce.ts +46 -0
- package/generated/scrape_do.ts +28 -0
- package/generated/scrapingant.ts +14 -0
- package/generated/screenshotone.ts +10 -0
- package/generated/seismic.ts +8 -0
- package/generated/semanticscholar.ts +23 -0
- package/generated/semrush.ts +45 -0
- package/generated/sendgrid.ts +384 -0
- package/generated/sentry.ts +185 -0
- package/generated/serpapi.ts +32 -0
- package/generated/servicem8.ts +37 -0
- package/generated/servicenow.ts +14 -0
- package/generated/share_point.ts +15 -0
- package/generated/shopify.ts +37 -0
- package/generated/shortcut.ts +131 -0
- package/generated/simplesat.ts +11 -0
- package/generated/slack.d.ts +16 -0
- package/generated/slack.js +11 -0
- package/generated/slack.ts +24 -0
- package/generated/slackbot.ts +205 -0
- package/generated/smartrecruiters.ts +8 -0
- package/generated/smugmug.ts +14 -0
- package/generated/snowflake.ts +15 -0
- package/generated/sourcegraph.ts +16 -0
- package/generated/square.ts +8 -0
- package/generated/stack_exchange.ts +17 -0
- package/generated/starton.ts +11 -0
- package/generated/storeganise.ts +12 -0
- package/generated/stripe.ts +50 -0
- package/generated/supabase.ts +86 -0
- package/generated/survey_monkey.ts +8 -0
- package/generated/tally.ts +25 -0
- package/generated/tapfiliate.ts +11 -0
- package/generated/tapform.ts +8 -0
- package/generated/tavily.ts +10 -0
- package/generated/terminus.ts +8 -0
- package/generated/text_to_pdf.ts +10 -0
- package/generated/textrazor.ts +22 -0
- package/generated/timecamp.ts +10 -0
- package/generated/timekit.ts +8 -0
- package/generated/timely.ts +11 -0
- package/generated/tinypng.ts +15 -0
- package/generated/tinyurl.ts +10 -0
- package/generated/tisane.ts +15 -0
- package/generated/todoist.ts +19 -0
- package/generated/toneden.ts +8 -0
- package/generated/tpscheck.ts +10 -0
- package/generated/trello.ts +360 -0
- package/generated/twitch.ts +8 -0
- package/generated/twitter.ts +82 -0
- package/generated/twitter_media.ts +10 -0
- package/generated/typefully.ts +14 -0
- package/generated/venly.ts +8 -0
- package/generated/vero.ts +8 -0
- package/generated/visme.ts +8 -0
- package/generated/waboxapp.ts +8 -0
- package/generated/wakatime.ts +8 -0
- package/generated/wave_accounting.ts +8 -0
- package/generated/weathermap.ts +10 -0
- package/generated/webex.ts +37 -0
- package/generated/webflow.ts +30 -0
- package/generated/whatsapp.ts +14 -0
- package/generated/wiz.ts +8 -0
- package/generated/workiom.ts +12 -0
- package/generated/wrike.ts +47 -0
- package/generated/xero.ts +13 -0
- package/generated/yandex.ts +13 -0
- package/generated/ynab.ts +8 -0
- package/generated/yousearch.ts +10 -0
- package/generated/youtube.ts +26 -0
- package/generated/zendesk.ts +23 -0
- package/generated/zenrows.ts +25 -0
- package/generated/zenserp.ts +20 -0
- package/generated/zoho.ts +33 -0
- package/generated/zoho_bigin.ts +21 -0
- package/generated/zoho_books.ts +8 -0
- package/generated/zoho_desk.ts +8 -0
- package/generated/zoho_inventory.ts +8 -0
- package/generated/zoho_invoice.ts +15 -0
- package/generated/zoho_mail.ts +8 -0
- package/generated/zoom.ts +181 -0
- package/generated/zoominfo.ts +26 -0
- package/package.json +25 -1
- package/src/platform/index.ts +1 -1
- package/src/platform/node.ts +17 -9
- package/src/platform/types.ts +9 -5
- package/src/platform/workerd.ts +7 -3
- package/dist/fileUtils-2bnnG7dq.cjs +0 -979
- package/dist/fileUtils-Dbn-fnh5.mjs +0 -900
- /package/dist/{chunk-0j-ceAHr.mjs → chunk-Dx2NuYGI.mjs} +0 -0
- /package/dist/{files.types-B7P5A1Z5.d.mts → files.types-BDqIUdfP.d.mts} +0 -0
- /package/dist/{files.types-D-RzIOHq.d.cts → files.types-nK6eTNnc.d.cts} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { n as BaseComposioProvider } from "./BaseProvider-2__95v5V.cjs";
|
|
2
|
+
import { n as ComposioConfig } from "./composio-CFe2Q5BN.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/config-defaults/types.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Configuration defaults for Composio.
|
|
8
|
+
* These are the required fields that must have default values.
|
|
9
|
+
* The provider type is set to never since defaults don't include a provider instance.
|
|
10
|
+
*/
|
|
11
|
+
type ConfigDefaults = Required<Pick<ComposioConfig<BaseComposioProvider<never, never, never>>, 'autoUploadDownloadFiles' | 'allowTracking' | 'toolkitVersions'>>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ConfigDefaults as t };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "../../BaseProvider-D1UCDu8V.mjs";
|
|
2
|
+
import "../../composio-DtAsGWh4.mjs";
|
|
3
|
+
import { t as ConfigDefaults } from "../../types-Do-rlwX8.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/utils/config-defaults/ConfigDefaults.node.d.ts
|
|
6
|
+
declare const CONFIG_DEFAULTS: ConfigDefaults;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { CONFIG_DEFAULTS };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "../../BaseProvider-D1UCDu8V.mjs";
|
|
2
|
+
import "../../composio-DtAsGWh4.mjs";
|
|
3
|
+
import { t as ConfigDefaults } from "../../types-Do-rlwX8.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/utils/config-defaults/ConfigDefaults.workerd.d.ts
|
|
6
|
+
declare const CONFIG_DEFAULTS: ConfigDefaults;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { CONFIG_DEFAULTS };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
const require_buffer = require('../../buffer-CYf1Z6Sd.cjs');
|
|
2
|
+
const require_fileUtils_node = require('../../fileUtils.node-BJQeDcfa.cjs');
|
|
3
|
+
const require_FileToolModifier_utils_neutral = require('../../FileToolModifier.utils.neutral-Bcl7LVf4.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/errors/FileModifierErrors.ts
|
|
6
|
+
const FileModifierErrorCodes = { FILE_UPLOAD_FAILED: "FILE_UPLOAD_FAILED" };
|
|
7
|
+
var ComposioFileUploadError = class extends require_buffer.ComposioError {
|
|
8
|
+
constructor(message = "Failed to upload file", options = {}) {
|
|
9
|
+
super(message, {
|
|
10
|
+
...options,
|
|
11
|
+
code: FileModifierErrorCodes.FILE_UPLOAD_FAILED,
|
|
12
|
+
possibleFixes: options.possibleFixes || ["Check if the file exists in the location provided"]
|
|
13
|
+
});
|
|
14
|
+
this.name = "ComposioFileUploadError";
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/utils/modifiers/FileToolModifier.node.ts
|
|
20
|
+
/**
|
|
21
|
+
* Recursively walks a runtime value and its matching JSON-Schema node,
|
|
22
|
+
* uploading any string path whose schema node has `file_uploadable: true`.
|
|
23
|
+
* The function returns a **new** value with all substitutions applied;
|
|
24
|
+
* nothing is mutated in-place.
|
|
25
|
+
*/
|
|
26
|
+
const hydrateFiles = async (value, schema, ctx) => {
|
|
27
|
+
if (schema?.file_uploadable) {
|
|
28
|
+
if (typeof value !== "string" && !(value instanceof File)) return value;
|
|
29
|
+
require_buffer.logger_default.debug(`Uploading file "${value}"`);
|
|
30
|
+
return require_fileUtils_node.getFileDataAfterUploadingToS3(value, {
|
|
31
|
+
toolSlug: ctx.toolSlug,
|
|
32
|
+
toolkitSlug: ctx.toolkitSlug,
|
|
33
|
+
client: ctx.client
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
const schemaVariants = [
|
|
37
|
+
...schema?.anyOf ?? [],
|
|
38
|
+
...schema?.oneOf ?? [],
|
|
39
|
+
...schema?.allOf ?? []
|
|
40
|
+
];
|
|
41
|
+
if (schemaVariants.length > 0) {
|
|
42
|
+
const uploadableVariants = schemaVariants.filter(require_FileToolModifier_utils_neutral.schemaHasFileUploadable);
|
|
43
|
+
if (uploadableVariants.length > 0) {
|
|
44
|
+
let result = value;
|
|
45
|
+
for (const variant of uploadableVariants) result = await hydrateFiles(result, variant, ctx);
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (schema?.type === "object" && schema.properties && require_FileToolModifier_utils_neutral.isPlainObject(value)) {
|
|
50
|
+
const transformed = {};
|
|
51
|
+
for (const [k, v] of Object.entries(value)) transformed[k] = await hydrateFiles(v, schema.properties[k], ctx);
|
|
52
|
+
return transformed;
|
|
53
|
+
}
|
|
54
|
+
if (schema?.type === "array" && schema.items && Array.isArray(value)) {
|
|
55
|
+
const itemSchema = Array.isArray(schema.items) ? schema.items[0] : schema.items;
|
|
56
|
+
return Promise.all(value.map((item) => hydrateFiles(item, itemSchema, ctx)));
|
|
57
|
+
}
|
|
58
|
+
return value;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Downloads a file from S3 and returns a replacement object.
|
|
62
|
+
*/
|
|
63
|
+
const downloadS3File = async (value, ctx) => {
|
|
64
|
+
const { s3url, mimetype } = value;
|
|
65
|
+
try {
|
|
66
|
+
require_buffer.logger_default.debug(`Downloading from S3: ${s3url}`);
|
|
67
|
+
const dl = await require_fileUtils_node.downloadFileFromS3({
|
|
68
|
+
toolSlug: ctx.toolSlug,
|
|
69
|
+
s3Url: s3url,
|
|
70
|
+
mimeType: mimetype ?? "application/octet-stream"
|
|
71
|
+
});
|
|
72
|
+
require_buffer.logger_default.debug(`Downloaded → ${dl.filePath}`);
|
|
73
|
+
return {
|
|
74
|
+
uri: dl.filePath,
|
|
75
|
+
file_downloaded: dl.filePath ? true : false,
|
|
76
|
+
s3url,
|
|
77
|
+
mimeType: dl.mimeType
|
|
78
|
+
};
|
|
79
|
+
} catch (err) {
|
|
80
|
+
require_buffer.logger_default.error(`Download failed: ${s3url}`, { cause: err });
|
|
81
|
+
return {
|
|
82
|
+
uri: "",
|
|
83
|
+
file_downloaded: false,
|
|
84
|
+
s3url,
|
|
85
|
+
mimeType: mimetype ?? "application/octet-stream"
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Recursively walks an arbitrary value and its matching JSON-Schema node.
|
|
91
|
+
* Whenever it encounters an object that represents a file reference
|
|
92
|
+
* (i.e. has an `s3url`), it downloads the file and returns a replacement:
|
|
93
|
+
* {
|
|
94
|
+
* uri: "<local-path>",
|
|
95
|
+
* file_downloaded: true | false,
|
|
96
|
+
* s3url: "<original S3 URL>",
|
|
97
|
+
* mimeType: "<detected-or-fallback-mime-type>"
|
|
98
|
+
* }
|
|
99
|
+
*
|
|
100
|
+
* The function is side-effect-free: it never mutates the input value.
|
|
101
|
+
*/
|
|
102
|
+
const hydrateDownloads = async (value, schema, ctx) => {
|
|
103
|
+
if (require_FileToolModifier_utils_neutral.isPlainObject(value) && typeof value.s3url === "string") return downloadS3File(value, ctx);
|
|
104
|
+
if (schema?.file_downloadable && require_FileToolModifier_utils_neutral.isPlainObject(value) && typeof value.s3url === "string") return downloadS3File(value, ctx);
|
|
105
|
+
const schemaVariants = [
|
|
106
|
+
...schema?.anyOf ?? [],
|
|
107
|
+
...schema?.oneOf ?? [],
|
|
108
|
+
...schema?.allOf ?? []
|
|
109
|
+
];
|
|
110
|
+
if (schemaVariants.length > 0) {
|
|
111
|
+
const downloadableVariants = schemaVariants.filter(require_FileToolModifier_utils_neutral.schemaHasFileDownloadable);
|
|
112
|
+
let result = value;
|
|
113
|
+
for (const variant of downloadableVariants) result = await hydrateDownloads(result, variant, ctx);
|
|
114
|
+
if (downloadableVariants.length === 0) return hydrateDownloads(value, void 0, ctx);
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
if (require_FileToolModifier_utils_neutral.isPlainObject(value)) {
|
|
118
|
+
const pairs = await Promise.all(Object.entries(value).map(async ([k, v]) => [k, await hydrateDownloads(v, schema?.properties?.[k], ctx)]));
|
|
119
|
+
return Object.fromEntries(pairs);
|
|
120
|
+
}
|
|
121
|
+
if (Array.isArray(value)) {
|
|
122
|
+
const itemSchema = schema?.items ? Array.isArray(schema.items) ? schema.items[0] : schema.items : void 0;
|
|
123
|
+
return Promise.all(value.map((item) => hydrateDownloads(item, itemSchema, ctx)));
|
|
124
|
+
}
|
|
125
|
+
return value;
|
|
126
|
+
};
|
|
127
|
+
var FileToolModifier = class {
|
|
128
|
+
client;
|
|
129
|
+
constructor(client) {
|
|
130
|
+
this.client = client;
|
|
131
|
+
}
|
|
132
|
+
async modifyToolSchema(toolSlug, toolkitSlug, schema) {
|
|
133
|
+
if (!schema.inputParameters?.properties) return schema;
|
|
134
|
+
const properties = require_FileToolModifier_utils_neutral.transformProperties(schema.inputParameters.properties);
|
|
135
|
+
return {
|
|
136
|
+
...schema,
|
|
137
|
+
inputParameters: {
|
|
138
|
+
...schema.inputParameters,
|
|
139
|
+
properties
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
async fileUploadModifier(tool, options) {
|
|
144
|
+
const { params, toolSlug, toolkitSlug = "unknown" } = options;
|
|
145
|
+
const { arguments: args } = params;
|
|
146
|
+
if (!args || typeof args !== "object") return params;
|
|
147
|
+
try {
|
|
148
|
+
const newArgs = await hydrateFiles(args, tool.inputParameters, {
|
|
149
|
+
toolSlug,
|
|
150
|
+
toolkitSlug,
|
|
151
|
+
client: this.client
|
|
152
|
+
});
|
|
153
|
+
return {
|
|
154
|
+
...params,
|
|
155
|
+
arguments: newArgs
|
|
156
|
+
};
|
|
157
|
+
} catch (error) {
|
|
158
|
+
throw new ComposioFileUploadError("Failed to upload file", { cause: error });
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
async fileDownloadModifier(tool, options) {
|
|
162
|
+
const { result, toolSlug } = options;
|
|
163
|
+
const dataWithDownloads = await hydrateDownloads(result.data, tool.outputParameters, { toolSlug });
|
|
164
|
+
return {
|
|
165
|
+
...result,
|
|
166
|
+
data: dataWithDownloads
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
//#endregion
|
|
172
|
+
exports.FileToolModifier = FileToolModifier;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { _n as ToolExecuteResponse, fn as Tool, hn as ToolExecuteParams } from "../../BaseProvider-2__95v5V.cjs";
|
|
2
|
+
import ComposioClient from "@composio/client";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/modifiers/FileToolModifier.node.d.ts
|
|
5
|
+
declare class FileToolModifier {
|
|
6
|
+
private client;
|
|
7
|
+
constructor(client: ComposioClient);
|
|
8
|
+
modifyToolSchema(toolSlug: string, toolkitSlug: string, schema: Tool): Promise<Tool>;
|
|
9
|
+
fileUploadModifier(tool: Tool, options: {
|
|
10
|
+
toolSlug: string;
|
|
11
|
+
toolkitSlug?: string;
|
|
12
|
+
params: ToolExecuteParams;
|
|
13
|
+
}): Promise<ToolExecuteParams>;
|
|
14
|
+
fileDownloadModifier(tool: Tool, options: {
|
|
15
|
+
toolSlug: string;
|
|
16
|
+
toolkitSlug: string;
|
|
17
|
+
result: ToolExecuteResponse;
|
|
18
|
+
}): Promise<ToolExecuteResponse>;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { FileToolModifier };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { _n as ToolExecuteResponse, fn as Tool, hn as ToolExecuteParams } from "../../BaseProvider-D1UCDu8V.mjs";
|
|
2
|
+
import ComposioClient from "@composio/client";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/modifiers/FileToolModifier.node.d.ts
|
|
5
|
+
declare class FileToolModifier {
|
|
6
|
+
private client;
|
|
7
|
+
constructor(client: ComposioClient);
|
|
8
|
+
modifyToolSchema(toolSlug: string, toolkitSlug: string, schema: Tool): Promise<Tool>;
|
|
9
|
+
fileUploadModifier(tool: Tool, options: {
|
|
10
|
+
toolSlug: string;
|
|
11
|
+
toolkitSlug?: string;
|
|
12
|
+
params: ToolExecuteParams;
|
|
13
|
+
}): Promise<ToolExecuteParams>;
|
|
14
|
+
fileDownloadModifier(tool: Tool, options: {
|
|
15
|
+
toolSlug: string;
|
|
16
|
+
toolkitSlug: string;
|
|
17
|
+
result: ToolExecuteResponse;
|
|
18
|
+
}): Promise<ToolExecuteResponse>;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { FileToolModifier };
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import "../../chunk-Dx2NuYGI.mjs";
|
|
2
|
+
import { o as ComposioError, s as logger_default } from "../../buffer-BFpVRahf.mjs";
|
|
3
|
+
import { n as getFileDataAfterUploadingToS3, t as downloadFileFromS3 } from "../../fileUtils.node-C6fQOgF0.mjs";
|
|
4
|
+
import { i as transformProperties, n as schemaHasFileDownloadable, r as schemaHasFileUploadable, t as isPlainObject } from "../../FileToolModifier.utils.neutral-BN_L8usp.mjs";
|
|
5
|
+
|
|
6
|
+
//#region src/errors/FileModifierErrors.ts
|
|
7
|
+
const FileModifierErrorCodes = { FILE_UPLOAD_FAILED: "FILE_UPLOAD_FAILED" };
|
|
8
|
+
var ComposioFileUploadError = class extends ComposioError {
|
|
9
|
+
constructor(message = "Failed to upload file", options = {}) {
|
|
10
|
+
super(message, {
|
|
11
|
+
...options,
|
|
12
|
+
code: FileModifierErrorCodes.FILE_UPLOAD_FAILED,
|
|
13
|
+
possibleFixes: options.possibleFixes || ["Check if the file exists in the location provided"]
|
|
14
|
+
});
|
|
15
|
+
this.name = "ComposioFileUploadError";
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/utils/modifiers/FileToolModifier.node.ts
|
|
21
|
+
/**
|
|
22
|
+
* Recursively walks a runtime value and its matching JSON-Schema node,
|
|
23
|
+
* uploading any string path whose schema node has `file_uploadable: true`.
|
|
24
|
+
* The function returns a **new** value with all substitutions applied;
|
|
25
|
+
* nothing is mutated in-place.
|
|
26
|
+
*/
|
|
27
|
+
const hydrateFiles = async (value, schema, ctx) => {
|
|
28
|
+
if (schema?.file_uploadable) {
|
|
29
|
+
if (typeof value !== "string" && !(value instanceof File)) return value;
|
|
30
|
+
logger_default.debug(`Uploading file "${value}"`);
|
|
31
|
+
return getFileDataAfterUploadingToS3(value, {
|
|
32
|
+
toolSlug: ctx.toolSlug,
|
|
33
|
+
toolkitSlug: ctx.toolkitSlug,
|
|
34
|
+
client: ctx.client
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const schemaVariants = [
|
|
38
|
+
...schema?.anyOf ?? [],
|
|
39
|
+
...schema?.oneOf ?? [],
|
|
40
|
+
...schema?.allOf ?? []
|
|
41
|
+
];
|
|
42
|
+
if (schemaVariants.length > 0) {
|
|
43
|
+
const uploadableVariants = schemaVariants.filter(schemaHasFileUploadable);
|
|
44
|
+
if (uploadableVariants.length > 0) {
|
|
45
|
+
let result = value;
|
|
46
|
+
for (const variant of uploadableVariants) result = await hydrateFiles(result, variant, ctx);
|
|
47
|
+
return result;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (schema?.type === "object" && schema.properties && isPlainObject(value)) {
|
|
51
|
+
const transformed = {};
|
|
52
|
+
for (const [k, v] of Object.entries(value)) transformed[k] = await hydrateFiles(v, schema.properties[k], ctx);
|
|
53
|
+
return transformed;
|
|
54
|
+
}
|
|
55
|
+
if (schema?.type === "array" && schema.items && Array.isArray(value)) {
|
|
56
|
+
const itemSchema = Array.isArray(schema.items) ? schema.items[0] : schema.items;
|
|
57
|
+
return Promise.all(value.map((item) => hydrateFiles(item, itemSchema, ctx)));
|
|
58
|
+
}
|
|
59
|
+
return value;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Downloads a file from S3 and returns a replacement object.
|
|
63
|
+
*/
|
|
64
|
+
const downloadS3File = async (value, ctx) => {
|
|
65
|
+
const { s3url, mimetype } = value;
|
|
66
|
+
try {
|
|
67
|
+
logger_default.debug(`Downloading from S3: ${s3url}`);
|
|
68
|
+
const dl = await downloadFileFromS3({
|
|
69
|
+
toolSlug: ctx.toolSlug,
|
|
70
|
+
s3Url: s3url,
|
|
71
|
+
mimeType: mimetype ?? "application/octet-stream"
|
|
72
|
+
});
|
|
73
|
+
logger_default.debug(`Downloaded → ${dl.filePath}`);
|
|
74
|
+
return {
|
|
75
|
+
uri: dl.filePath,
|
|
76
|
+
file_downloaded: dl.filePath ? true : false,
|
|
77
|
+
s3url,
|
|
78
|
+
mimeType: dl.mimeType
|
|
79
|
+
};
|
|
80
|
+
} catch (err) {
|
|
81
|
+
logger_default.error(`Download failed: ${s3url}`, { cause: err });
|
|
82
|
+
return {
|
|
83
|
+
uri: "",
|
|
84
|
+
file_downloaded: false,
|
|
85
|
+
s3url,
|
|
86
|
+
mimeType: mimetype ?? "application/octet-stream"
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Recursively walks an arbitrary value and its matching JSON-Schema node.
|
|
92
|
+
* Whenever it encounters an object that represents a file reference
|
|
93
|
+
* (i.e. has an `s3url`), it downloads the file and returns a replacement:
|
|
94
|
+
* {
|
|
95
|
+
* uri: "<local-path>",
|
|
96
|
+
* file_downloaded: true | false,
|
|
97
|
+
* s3url: "<original S3 URL>",
|
|
98
|
+
* mimeType: "<detected-or-fallback-mime-type>"
|
|
99
|
+
* }
|
|
100
|
+
*
|
|
101
|
+
* The function is side-effect-free: it never mutates the input value.
|
|
102
|
+
*/
|
|
103
|
+
const hydrateDownloads = async (value, schema, ctx) => {
|
|
104
|
+
if (isPlainObject(value) && typeof value.s3url === "string") return downloadS3File(value, ctx);
|
|
105
|
+
if (schema?.file_downloadable && isPlainObject(value) && typeof value.s3url === "string") return downloadS3File(value, ctx);
|
|
106
|
+
const schemaVariants = [
|
|
107
|
+
...schema?.anyOf ?? [],
|
|
108
|
+
...schema?.oneOf ?? [],
|
|
109
|
+
...schema?.allOf ?? []
|
|
110
|
+
];
|
|
111
|
+
if (schemaVariants.length > 0) {
|
|
112
|
+
const downloadableVariants = schemaVariants.filter(schemaHasFileDownloadable);
|
|
113
|
+
let result = value;
|
|
114
|
+
for (const variant of downloadableVariants) result = await hydrateDownloads(result, variant, ctx);
|
|
115
|
+
if (downloadableVariants.length === 0) return hydrateDownloads(value, void 0, ctx);
|
|
116
|
+
return result;
|
|
117
|
+
}
|
|
118
|
+
if (isPlainObject(value)) {
|
|
119
|
+
const pairs = await Promise.all(Object.entries(value).map(async ([k, v]) => [k, await hydrateDownloads(v, schema?.properties?.[k], ctx)]));
|
|
120
|
+
return Object.fromEntries(pairs);
|
|
121
|
+
}
|
|
122
|
+
if (Array.isArray(value)) {
|
|
123
|
+
const itemSchema = schema?.items ? Array.isArray(schema.items) ? schema.items[0] : schema.items : void 0;
|
|
124
|
+
return Promise.all(value.map((item) => hydrateDownloads(item, itemSchema, ctx)));
|
|
125
|
+
}
|
|
126
|
+
return value;
|
|
127
|
+
};
|
|
128
|
+
var FileToolModifier = class {
|
|
129
|
+
client;
|
|
130
|
+
constructor(client) {
|
|
131
|
+
this.client = client;
|
|
132
|
+
}
|
|
133
|
+
async modifyToolSchema(toolSlug, toolkitSlug, schema) {
|
|
134
|
+
if (!schema.inputParameters?.properties) return schema;
|
|
135
|
+
const properties = transformProperties(schema.inputParameters.properties);
|
|
136
|
+
return {
|
|
137
|
+
...schema,
|
|
138
|
+
inputParameters: {
|
|
139
|
+
...schema.inputParameters,
|
|
140
|
+
properties
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
async fileUploadModifier(tool, options) {
|
|
145
|
+
const { params, toolSlug, toolkitSlug = "unknown" } = options;
|
|
146
|
+
const { arguments: args } = params;
|
|
147
|
+
if (!args || typeof args !== "object") return params;
|
|
148
|
+
try {
|
|
149
|
+
const newArgs = await hydrateFiles(args, tool.inputParameters, {
|
|
150
|
+
toolSlug,
|
|
151
|
+
toolkitSlug,
|
|
152
|
+
client: this.client
|
|
153
|
+
});
|
|
154
|
+
return {
|
|
155
|
+
...params,
|
|
156
|
+
arguments: newArgs
|
|
157
|
+
};
|
|
158
|
+
} catch (error) {
|
|
159
|
+
throw new ComposioFileUploadError("Failed to upload file", { cause: error });
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
async fileDownloadModifier(tool, options) {
|
|
163
|
+
const { result, toolSlug } = options;
|
|
164
|
+
const dataWithDownloads = await hydrateDownloads(result.data, tool.outputParameters, { toolSlug });
|
|
165
|
+
return {
|
|
166
|
+
...result,
|
|
167
|
+
data: dataWithDownloads
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
//#endregion
|
|
173
|
+
export { FileToolModifier };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const require_FileToolModifier_utils_neutral = require('../../FileToolModifier.utils.neutral-Bcl7LVf4.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/utils/modifiers/FileToolModifier.workerd.ts
|
|
4
|
+
const UNSUPPORTED_MESSAGE = "File upload/download modifiers are not available on edge runtimes yet. Please set `autoUploadDownloadFiles: false` or run Composio in another JS runtime (Node.js / Bun).";
|
|
5
|
+
var FileToolModifier = class {
|
|
6
|
+
constructor(_client) {}
|
|
7
|
+
async modifyToolSchema(toolSlug, toolkitSlug, schema) {
|
|
8
|
+
if (!schema.inputParameters?.properties) return schema;
|
|
9
|
+
const properties = require_FileToolModifier_utils_neutral.transformProperties(schema.inputParameters.properties);
|
|
10
|
+
return {
|
|
11
|
+
...schema,
|
|
12
|
+
inputParameters: {
|
|
13
|
+
...schema.inputParameters,
|
|
14
|
+
properties
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
async fileUploadModifier(_tool, _options) {
|
|
19
|
+
throw new Error(UNSUPPORTED_MESSAGE);
|
|
20
|
+
}
|
|
21
|
+
async fileDownloadModifier(_tool, _options) {
|
|
22
|
+
throw new Error(UNSUPPORTED_MESSAGE);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
exports.FileToolModifier = FileToolModifier;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { _n as ToolExecuteResponse, fn as Tool, hn as ToolExecuteParams } from "../../BaseProvider-2__95v5V.cjs";
|
|
2
|
+
import ComposioClient from "@composio/client";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/modifiers/FileToolModifier.workerd.d.ts
|
|
5
|
+
declare class FileToolModifier {
|
|
6
|
+
constructor(_client: ComposioClient);
|
|
7
|
+
modifyToolSchema(toolSlug: string, toolkitSlug: string, schema: Tool): Promise<Tool>;
|
|
8
|
+
fileUploadModifier(_tool: Tool, _options: {
|
|
9
|
+
toolSlug: string;
|
|
10
|
+
toolkitSlug?: string;
|
|
11
|
+
params: ToolExecuteParams;
|
|
12
|
+
}): Promise<ToolExecuteParams>;
|
|
13
|
+
fileDownloadModifier(_tool: Tool, _options: {
|
|
14
|
+
toolSlug: string;
|
|
15
|
+
toolkitSlug: string;
|
|
16
|
+
result: ToolExecuteResponse;
|
|
17
|
+
}): Promise<ToolExecuteResponse>;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { FileToolModifier };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { _n as ToolExecuteResponse, fn as Tool, hn as ToolExecuteParams } from "../../BaseProvider-D1UCDu8V.mjs";
|
|
2
|
+
import ComposioClient from "@composio/client";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/modifiers/FileToolModifier.workerd.d.ts
|
|
5
|
+
declare class FileToolModifier {
|
|
6
|
+
constructor(_client: ComposioClient);
|
|
7
|
+
modifyToolSchema(toolSlug: string, toolkitSlug: string, schema: Tool): Promise<Tool>;
|
|
8
|
+
fileUploadModifier(_tool: Tool, _options: {
|
|
9
|
+
toolSlug: string;
|
|
10
|
+
toolkitSlug?: string;
|
|
11
|
+
params: ToolExecuteParams;
|
|
12
|
+
}): Promise<ToolExecuteParams>;
|
|
13
|
+
fileDownloadModifier(_tool: Tool, _options: {
|
|
14
|
+
toolSlug: string;
|
|
15
|
+
toolkitSlug: string;
|
|
16
|
+
result: ToolExecuteResponse;
|
|
17
|
+
}): Promise<ToolExecuteResponse>;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { FileToolModifier };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { i as transformProperties } from "../../FileToolModifier.utils.neutral-BN_L8usp.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/modifiers/FileToolModifier.workerd.ts
|
|
4
|
+
const UNSUPPORTED_MESSAGE = "File upload/download modifiers are not available on edge runtimes yet. Please set `autoUploadDownloadFiles: false` or run Composio in another JS runtime (Node.js / Bun).";
|
|
5
|
+
var FileToolModifier = class {
|
|
6
|
+
constructor(_client) {}
|
|
7
|
+
async modifyToolSchema(toolSlug, toolkitSlug, schema) {
|
|
8
|
+
if (!schema.inputParameters?.properties) return schema;
|
|
9
|
+
const properties = transformProperties(schema.inputParameters.properties);
|
|
10
|
+
return {
|
|
11
|
+
...schema,
|
|
12
|
+
inputParameters: {
|
|
13
|
+
...schema.inputParameters,
|
|
14
|
+
properties
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
async fileUploadModifier(_tool, _options) {
|
|
19
|
+
throw new Error(UNSUPPORTED_MESSAGE);
|
|
20
|
+
}
|
|
21
|
+
async fileDownloadModifier(_tool, _options) {
|
|
22
|
+
throw new Error(UNSUPPORTED_MESSAGE);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { FileToolModifier };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Map of Composio's ABLY toolkit.
|
|
3
|
+
*/
|
|
4
|
+
export const ABLY = {
|
|
5
|
+
slug: "ably",
|
|
6
|
+
tools: {
|
|
7
|
+
BATCH_PRESENCE: "ABLY_BATCH_PRESENCE",
|
|
8
|
+
BATCH_PRESENCE_HISTORY: "ABLY_BATCH_PRESENCE_HISTORY",
|
|
9
|
+
CREATE_CHANNEL: "ABLY_CREATE_CHANNEL",
|
|
10
|
+
DELETE_CHANNEL_SUBSCRIPTION: "ABLY_DELETE_CHANNEL_SUBSCRIPTION",
|
|
11
|
+
GET_CHANNEL_DETAILS: "ABLY_GET_CHANNEL_DETAILS",
|
|
12
|
+
GET_CHANNEL_HISTORY: "ABLY_GET_CHANNEL_HISTORY",
|
|
13
|
+
GET_PRESENCE_HISTORY: "ABLY_GET_PRESENCE_HISTORY",
|
|
14
|
+
GET_SERVICE_TIME: "ABLY_GET_SERVICE_TIME",
|
|
15
|
+
GET_STATS: "ABLY_GET_STATS",
|
|
16
|
+
LIST_PUSH_CHANNEL_SUBSCRIPTIONS: "ABLY_LIST_PUSH_CHANNEL_SUBSCRIPTIONS",
|
|
17
|
+
PUBLISH_MESSAGE_TO_CHANNEL: "ABLY_PUBLISH_MESSAGE_TO_CHANNEL",
|
|
18
|
+
},
|
|
19
|
+
triggerTypes: {},
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Map of Composio's ACCULYNX toolkit.
|
|
3
|
+
*/
|
|
4
|
+
export const ACCULYNX = {
|
|
5
|
+
slug: "acculynx",
|
|
6
|
+
tools: {
|
|
7
|
+
ADD_JOB_APPOINTMENT: "ACCULYNX_ADD_JOB_APPOINTMENT",
|
|
8
|
+
CREATE_A_CONTACT: "ACCULYNX_CREATE_A_CONTACT",
|
|
9
|
+
CREATE_A_JOB: "ACCULYNX_CREATE_A_JOB",
|
|
10
|
+
CREATE_A_LEAD: "ACCULYNX_CREATE_A_LEAD",
|
|
11
|
+
JOB_APPOINTMENT_SUMMARY: "ACCULYNX_JOB_APPOINTMENT_SUMMARY",
|
|
12
|
+
LIST_OF_CALENDARS_FOR_THE_LOCATION: "ACCULYNX_LIST_OF_CALENDARS_FOR_THE_LOCATION",
|
|
13
|
+
LIST_OF_CONTACT_TYPES_RELATED_TO_THE_COMPANY: "ACCULYNX_LIST_OF_CONTACT_TYPES_RELATED_TO_THE_COMPANY",
|
|
14
|
+
UPDATE_COMPANY_REPRESENTATIVE: "ACCULYNX_UPDATE_COMPANY_REPRESENTATIVE",
|
|
15
|
+
},
|
|
16
|
+
triggerTypes: {},
|
|
17
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Map of Composio's ACTIVE_CAMPAIGN toolkit.
|
|
3
|
+
*/
|
|
4
|
+
export const ACTIVE_CAMPAIGN = {
|
|
5
|
+
slug: "active_campaign",
|
|
6
|
+
tools: {
|
|
7
|
+
ADD_CONTACT_NOTE: "ACTIVE_CAMPAIGN_ADD_CONTACT_NOTE",
|
|
8
|
+
ADD_CONTACT_TO_AUTOMATION: "ACTIVE_CAMPAIGN_ADD_CONTACT_TO_AUTOMATION",
|
|
9
|
+
ADD_SECONDARY_CONTACT_TO_DEAL: "ACTIVE_CAMPAIGN_ADD_SECONDARY_CONTACT_TO_DEAL",
|
|
10
|
+
CREATE_ACCOUNT: "ACTIVE_CAMPAIGN_CREATE_ACCOUNT",
|
|
11
|
+
CREATE_CONTACT: "ACTIVE_CAMPAIGN_CREATE_CONTACT",
|
|
12
|
+
CREATE_CONTACT_TASK: "ACTIVE_CAMPAIGN_CREATE_CONTACT_TASK",
|
|
13
|
+
CREATE_DEAL_PIPELINE: "ACTIVE_CAMPAIGN_CREATE_DEAL_PIPELINE",
|
|
14
|
+
CREATE_DEAL_TASK_TYPE: "ACTIVE_CAMPAIGN_CREATE_DEAL_TASK_TYPE",
|
|
15
|
+
DELETE_ACCOUNT: "ACTIVE_CAMPAIGN_DELETE_ACCOUNT",
|
|
16
|
+
DELETE_DEAL_PIPELINE: "ACTIVE_CAMPAIGN_DELETE_DEAL_PIPELINE",
|
|
17
|
+
DELETE_DEAL_STAGE: "ACTIVE_CAMPAIGN_DELETE_DEAL_STAGE",
|
|
18
|
+
FIND_CONTACT: "ACTIVE_CAMPAIGN_FIND_CONTACT",
|
|
19
|
+
FIND_CONTACT_TASK: "ACTIVE_CAMPAIGN_FIND_CONTACT_TASK",
|
|
20
|
+
FIND_USER_ACTION: "ACTIVE_CAMPAIGN_FIND_USER_ACTION",
|
|
21
|
+
LIST_ALL_CONTACTS: "ACTIVE_CAMPAIGN_LIST_ALL_CONTACTS",
|
|
22
|
+
MANAGE_CONTACT_TAG: "ACTIVE_CAMPAIGN_MANAGE_CONTACT_TAG",
|
|
23
|
+
MANAGE_LIST_SUBSCRIPTION: "ACTIVE_CAMPAIGN_MANAGE_LIST_SUBSCRIPTION",
|
|
24
|
+
REMOVE_CONTACT_FROM_AUTOMATION: "ACTIVE_CAMPAIGN_REMOVE_CONTACT_FROM_AUTOMATION",
|
|
25
|
+
TRACK_EVENT: "ACTIVE_CAMPAIGN_TRACK_EVENT",
|
|
26
|
+
UPDATE_ACCOUNT: "ACTIVE_CAMPAIGN_UPDATE_ACCOUNT",
|
|
27
|
+
UPSERT_ACCOUNT: "ACTIVE_CAMPAIGN_UPSERT_ACCOUNT",
|
|
28
|
+
},
|
|
29
|
+
triggerTypes: {},
|
|
30
|
+
}
|