@composio/core 0.6.3-alpha.0 → 0.6.4
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-KztT1fTW.d.mts → BaseProvider-B_7Qy99Q.d.mts} +1951 -65
- package/dist/{BaseProvider-B7yFqBhL.d.cts → BaseProvider-DF03HAz3.d.cts} +1951 -65
- package/dist/{Telemetry-Bn5VseVi.mjs → Telemetry-B3HlLpMT.mjs} +4 -7
- package/dist/{Telemetry-DErMJqj0.cjs → Telemetry-DBe2oppA.cjs} +4 -7
- package/dist/{composio-D2VJ9p-v.d.cts → composio-COyITeJf.d.cts} +137 -165
- package/dist/{composio-XQjM3MQQ.d.mts → composio-ClplAPbl.d.mts} +137 -165
- package/dist/index.cjs +287 -132
- package/dist/index.d.cts +4777 -3
- package/dist/index.d.mts +4777 -3
- package/dist/index.mjs +280 -133
- package/dist/models/Files.node.cjs +1 -1
- package/dist/models/Files.node.mjs +1 -1
- package/dist/{types-CBJRDqI3.d.mts → types-BO1Bf2Xz.d.mts} +2 -2
- package/dist/{types-Q-uLBUsT.d.cts → types-Bib0jIbg.d.cts} +2 -2
- package/dist/utils/config-defaults/ConfigDefaults.node.d.cts +2 -2
- package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +3 -3
- package/dist/utils/config-defaults/ConfigDefaults.workerd.d.cts +2 -2
- package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +3 -3
- package/dist/utils/modifiers/FileToolModifier.node.d.cts +1 -1
- package/dist/utils/modifiers/FileToolModifier.node.d.mts +1 -1
- package/dist/utils/modifiers/FileToolModifier.workerd.d.cts +1 -1
- package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +1 -1
- package/package.json +2 -2
- package/generated/ably.ts +0 -20
- package/generated/accelo.ts +0 -8
- package/generated/acculynx.ts +0 -17
- package/generated/active_campaign.ts +0 -30
- package/generated/adobe.ts +0 -8
- package/generated/adyntel.ts +0 -12
- package/generated/aero_workflow.ts +0 -8
- package/generated/affinity.ts +0 -29
- package/generated/agencyzoom.ts +0 -108
- package/generated/ahrefs.ts +0 -49
- package/generated/airtable.ts +0 -26
- package/generated/alchemy.ts +0 -16
- package/generated/algolia.ts +0 -39
- package/generated/altoviz.ts +0 -18
- package/generated/amazon.ts +0 -8
- package/generated/amcards.ts +0 -11
- package/generated/amplitude.ts +0 -25
- package/generated/anthropic_administrator.ts +0 -13
- package/generated/apaleo.ts +0 -38
- package/generated/apollo.ts +0 -40
- package/generated/appdrag.ts +0 -8
- package/generated/appsflyer.ts +0 -8
- package/generated/asana.ts +0 -95
- package/generated/ashby.ts +0 -8
- package/generated/atlassian.ts +0 -8
- package/generated/attio.ts +0 -20
- package/generated/auth0.ts +0 -8
- package/generated/axonaut.ts +0 -8
- package/generated/bamboohr.ts +0 -168
- package/generated/bannerbear.ts +0 -17
- package/generated/baserow.ts +0 -11
- package/generated/battlenet.ts +0 -8
- package/generated/beeminder.ts +0 -14
- package/generated/bigmailer.ts +0 -12
- package/generated/bigml.ts +0 -15
- package/generated/bill.ts +0 -218
- package/generated/bitbucket.ts +0 -25
- package/generated/bitwarden.ts +0 -8
- package/generated/blackbaud.ts +0 -8
- package/generated/blackboard.ts +0 -323
- package/generated/boldsign.ts +0 -8
- package/generated/bolna.ts +0 -24
- package/generated/borneo.ts +0 -162
- package/generated/botbaba.ts +0 -8
- package/generated/box.ts +0 -282
- package/generated/braintree.ts +0 -8
- package/generated/brandfetch.ts +0 -15
- package/generated/breezy_hr.ts +0 -8
- package/generated/brevo.ts +0 -28
- package/generated/brex.ts +0 -8
- package/generated/brex_staging.ts +0 -8
- package/generated/brightpearl.ts +0 -8
- package/generated/brilliant_directories.ts +0 -15
- package/generated/browseai.ts +0 -18
- package/generated/browserbase_tool.ts +0 -10
- package/generated/browserhub.ts +0 -8
- package/generated/browserless.ts +0 -16
- package/generated/bubble.ts +0 -8
- package/generated/bugbug.ts +0 -13
- package/generated/builtwith.ts +0 -21
- package/generated/cal.ts +0 -150
- package/generated/calendly.ts +0 -51
- package/generated/canva.ts +0 -41
- package/generated/canvas.ts +0 -100
- package/generated/chatwork.ts +0 -17
- package/generated/chmeetings.ts +0 -8
- package/generated/clickup.ts +0 -153
- package/generated/clockify.ts +0 -23
- package/generated/close.ts +0 -15
- package/generated/cloudflare.ts +0 -10
- package/generated/coda.ts +0 -115
- package/generated/codeinterpreter.ts +0 -14
- package/generated/coinbase.ts +0 -15
- package/generated/coinmarketcal.ts +0 -8
- package/generated/composio.ts +0 -34
- package/generated/composio_search.ts +0 -22
- package/generated/confluence.ts +0 -199
- package/generated/contentful.ts +0 -12
- package/generated/crustdata.ts +0 -23
- package/generated/customer_io.ts +0 -8
- package/generated/cutt_ly.ts +0 -10
- package/generated/d2lbrightspace.ts +0 -54
- package/generated/dailybot.ts +0 -15
- package/generated/datadog.ts +0 -47
- package/generated/datagma.ts +0 -8
- package/generated/datarobot.ts +0 -8
- package/generated/deel.ts +0 -8
- package/generated/demio.ts +0 -8
- package/generated/dialpad.ts +0 -201
- package/generated/digicert.ts +0 -15
- package/generated/discord.ts +0 -17
- package/generated/discordbot.ts +0 -173
- package/generated/docmosis.ts +0 -8
- package/generated/docusign.ts +0 -351
- package/generated/dropbox.ts +0 -20
- package/generated/dropbox_sign.ts +0 -8
- package/generated/dynamics365.ts +0 -25
- package/generated/echtpost.ts +0 -10
- package/generated/elevenlabs.ts +0 -70
- package/generated/emailoctopus.ts +0 -16
- package/generated/enigma.ts +0 -11
- package/generated/entelligence.ts +0 -11
- package/generated/epic_games.ts +0 -8
- package/generated/eventbrite.ts +0 -12
- package/generated/exa.ts +0 -13
- package/generated/excel.ts +0 -34
- package/generated/exist.ts +0 -8
- package/generated/facebook.ts +0 -8
- package/generated/factorial.ts +0 -8
- package/generated/figma.ts +0 -59
- package/generated/finage.ts +0 -19
- package/generated/firecrawl.ts +0 -16
- package/generated/fireflies.ts +0 -21
- package/generated/fitbit.ts +0 -8
- package/generated/flutterwave.ts +0 -33
- package/generated/fomo.ts +0 -10
- package/generated/formcarry.ts +0 -10
- package/generated/formsite.ts +0 -14
- package/generated/foursquare.ts +0 -14
- package/generated/freshbooks.ts +0 -11
- package/generated/freshdesk.ts +0 -16
- package/generated/front.ts +0 -8
- package/generated/github.ts +0 -967
- package/generated/gitlab.ts +0 -82
- package/generated/gmail.d.ts +0 -86
- package/generated/gmail.js +0 -13
- package/generated/gmail.ts +0 -95
- package/generated/go_to_webinar.ts +0 -8
- package/generated/gong.ts +0 -63
- package/generated/google_analytics.ts +0 -13
- package/generated/google_maps.ts +0 -16
- package/generated/googleads.ts +0 -14
- package/generated/googlebigquery.ts +0 -10
- package/generated/googlecalendar.ts +0 -39
- package/generated/googledocs.ts +0 -41
- package/generated/googledrive.ts +0 -62
- package/generated/googlemeet.ts +0 -18
- package/generated/googlephotos.ts +0 -22
- package/generated/googlesheets.ts +0 -40
- package/generated/googleslides.ts +0 -8
- package/generated/googlesuper.ts +0 -230
- package/generated/googletasks.ts +0 -23
- package/generated/gorgias.ts +0 -41
- package/generated/gumroad.ts +0 -14
- package/generated/guru.ts +0 -8
- package/generated/hackernews.ts +0 -15
- package/generated/hackerrank_work.ts +0 -8
- package/generated/harvest.ts +0 -56
- package/generated/helcim.ts +0 -8
- package/generated/heygen.ts +0 -44
- package/generated/highlevel.ts +0 -8
- package/generated/hubspot.ts +0 -252
- package/generated/humanloop.ts +0 -13
- package/generated/icims_talent_cloud.ts +0 -8
- package/generated/idea_scale.ts +0 -8
- package/generated/index.ts +0 -151
- package/generated/insighto_ai.ts +0 -19
- package/generated/intercom.ts +0 -52
- package/generated/interzoid.ts +0 -8
- package/generated/jira.ts +0 -59
- package/generated/jotform.ts +0 -15
- package/generated/junglescout.ts +0 -15
- package/generated/keap.ts +0 -8
- package/generated/kibana.ts +0 -58
- package/generated/kit.ts +0 -38
- package/generated/klaviyo.ts +0 -240
- package/generated/klipfolio.ts +0 -20
- package/generated/kommo.ts +0 -24
- package/generated/lastpass.ts +0 -8
- package/generated/launch_darkly.ts +0 -16
- package/generated/leadfeeder.ts +0 -13
- package/generated/leadoku.ts +0 -10
- package/generated/lever.ts +0 -8
- package/generated/lever_sandbox.ts +0 -8
- package/generated/lexoffice.ts +0 -8
- package/generated/linear.ts +0 -31
- package/generated/linkedin.ts +0 -13
- package/generated/linkhut.ts +0 -14
- package/generated/linkup.ts +0 -11
- package/generated/listennotes.ts +0 -35
- package/generated/lmnt.ts +0 -16
- package/generated/lodgify.ts +0 -10
- package/generated/mailchimp.ts +0 -285
- package/generated/mailerlite.ts +0 -8
- package/generated/maintainx.ts +0 -20
- package/generated/make.ts +0 -12
- package/generated/mboum.ts +0 -8
- package/generated/mem0.ts +0 -52
- package/generated/metaads.ts +0 -25
- package/generated/metatextai.ts +0 -8
- package/generated/microsoft_clarity.ts +0 -10
- package/generated/microsoft_teams.ts +0 -22
- package/generated/microsoft_tenant.ts +0 -8
- package/generated/miro.ts +0 -23
- package/generated/mixpanel.ts +0 -30
- package/generated/mocean.ts +0 -8
- package/generated/monday.ts +0 -30
- package/generated/mopinion.ts +0 -8
- package/generated/more_trees.ts +0 -10
- package/generated/moxie.ts +0 -8
- package/generated/moz.ts +0 -8
- package/generated/mural.ts +0 -14
- package/generated/nasdaq.ts +0 -15
- package/generated/ncscale.ts +0 -8
- package/generated/neon.ts +0 -78
- package/generated/netsuite.ts +0 -8
- package/generated/nextdns.ts +0 -11
- package/generated/ngrok.ts +0 -18
- package/generated/notion.ts +0 -40
- package/generated/oncehub.ts +0 -8
- package/generated/one_drive.ts +0 -49
- package/generated/onepage.ts +0 -11
- package/generated/open_sea.ts +0 -33
- package/generated/outlook.ts +0 -37
- package/generated/pagerduty.ts +0 -362
- package/generated/pandadoc.ts +0 -23
- package/generated/peopledatalabs.ts +0 -24
- package/generated/perplexityai.ts +0 -10
- package/generated/piggy.ts +0 -8
- package/generated/pipedrive.ts +0 -288
- package/generated/placekey.ts +0 -12
- package/generated/posthog.ts +0 -367
- package/generated/precoro.ts +0 -8
- package/generated/printnode.ts +0 -8
- package/generated/process_street.ts +0 -14
- package/generated/productboard.ts +0 -8
- package/generated/qualaroo.ts +0 -8
- package/generated/quickbooks.ts +0 -22
- package/generated/rafflys.ts +0 -8
- package/generated/ragic.ts +0 -10
- package/generated/ramp.ts +0 -17
- package/generated/ravenseotools.ts +0 -8
- package/generated/recallai.ts +0 -17
- package/generated/reddit.ts +0 -19
- package/generated/resend.ts +0 -27
- package/generated/retellai.ts +0 -19
- package/generated/retently.ts +0 -24
- package/generated/ring_central.ts +0 -8
- package/generated/rippling.ts +0 -8
- package/generated/rocket_reach.ts +0 -8
- package/generated/rocketlane.ts +0 -42
- package/generated/rootly.ts +0 -12
- package/generated/rosette_text_analytics.ts +0 -12
- package/generated/sage.ts +0 -8
- package/generated/salesforce.ts +0 -46
- package/generated/scrape_do.ts +0 -28
- package/generated/scrapingant.ts +0 -14
- package/generated/screenshotone.ts +0 -10
- package/generated/seismic.ts +0 -8
- package/generated/semanticscholar.ts +0 -23
- package/generated/semrush.ts +0 -45
- package/generated/sendgrid.ts +0 -384
- package/generated/sentry.ts +0 -185
- package/generated/serpapi.ts +0 -32
- package/generated/servicem8.ts +0 -37
- package/generated/servicenow.ts +0 -14
- package/generated/share_point.ts +0 -15
- package/generated/shopify.ts +0 -37
- package/generated/shortcut.ts +0 -131
- package/generated/simplesat.ts +0 -11
- package/generated/slack.d.ts +0 -16
- package/generated/slack.js +0 -11
- package/generated/slack.ts +0 -24
- package/generated/slackbot.ts +0 -205
- package/generated/smartrecruiters.ts +0 -8
- package/generated/smugmug.ts +0 -14
- package/generated/snowflake.ts +0 -15
- package/generated/sourcegraph.ts +0 -16
- package/generated/square.ts +0 -8
- package/generated/stack_exchange.ts +0 -17
- package/generated/starton.ts +0 -11
- package/generated/storeganise.ts +0 -12
- package/generated/stripe.ts +0 -50
- package/generated/supabase.ts +0 -86
- package/generated/survey_monkey.ts +0 -8
- package/generated/tally.ts +0 -25
- package/generated/tapfiliate.ts +0 -11
- package/generated/tapform.ts +0 -8
- package/generated/tavily.ts +0 -10
- package/generated/terminus.ts +0 -8
- package/generated/text_to_pdf.ts +0 -10
- package/generated/textrazor.ts +0 -22
- package/generated/timecamp.ts +0 -10
- package/generated/timekit.ts +0 -8
- package/generated/timely.ts +0 -11
- package/generated/tinypng.ts +0 -15
- package/generated/tinyurl.ts +0 -10
- package/generated/tisane.ts +0 -15
- package/generated/todoist.ts +0 -19
- package/generated/toneden.ts +0 -8
- package/generated/tpscheck.ts +0 -10
- package/generated/trello.ts +0 -360
- package/generated/twitch.ts +0 -8
- package/generated/twitter.ts +0 -82
- package/generated/twitter_media.ts +0 -10
- package/generated/typefully.ts +0 -14
- package/generated/venly.ts +0 -8
- package/generated/vero.ts +0 -8
- package/generated/visme.ts +0 -8
- package/generated/waboxapp.ts +0 -8
- package/generated/wakatime.ts +0 -8
- package/generated/wave_accounting.ts +0 -8
- package/generated/weathermap.ts +0 -10
- package/generated/webex.ts +0 -37
- package/generated/webflow.ts +0 -30
- package/generated/whatsapp.ts +0 -14
- package/generated/wiz.ts +0 -8
- package/generated/workiom.ts +0 -12
- package/generated/wrike.ts +0 -47
- package/generated/xero.ts +0 -13
- package/generated/yandex.ts +0 -13
- package/generated/ynab.ts +0 -8
- package/generated/yousearch.ts +0 -10
- package/generated/youtube.ts +0 -26
- package/generated/zendesk.ts +0 -23
- package/generated/zenrows.ts +0 -25
- package/generated/zenserp.ts +0 -20
- package/generated/zoho.ts +0 -33
- package/generated/zoho_bigin.ts +0 -21
- package/generated/zoho_books.ts +0 -8
- package/generated/zoho_desk.ts +0 -8
- package/generated/zoho_inventory.ts +0 -8
- package/generated/zoho_invoice.ts +0 -15
- package/generated/zoho_mail.ts +0 -8
- package/generated/zoom.ts +0 -181
- package/generated/zoominfo.ts +0 -26
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CQwRTUmo.cjs');
|
|
2
2
|
const require_buffer = require('./buffer-CYf1Z6Sd.cjs');
|
|
3
|
-
const require_Telemetry = require('./Telemetry-
|
|
3
|
+
const require_Telemetry = require('./Telemetry-DBe2oppA.cjs');
|
|
4
4
|
let _composio_client = require("@composio/client");
|
|
5
5
|
_composio_client = require_chunk.__toESM(_composio_client);
|
|
6
6
|
let _file_tool_modifier = require("#file_tool_modifier");
|
|
@@ -34,7 +34,8 @@ const AuthSchemeTypes = {
|
|
|
34
34
|
CALCOM_AUTH: "CALCOM_AUTH",
|
|
35
35
|
SERVICE_ACCOUNT: "SERVICE_ACCOUNT",
|
|
36
36
|
SAML: "SAML",
|
|
37
|
-
DCR_OAUTH: "DCR_OAUTH"
|
|
37
|
+
DCR_OAUTH: "DCR_OAUTH",
|
|
38
|
+
S2S_OAUTH2: "S2S_OAUTH2"
|
|
38
39
|
};
|
|
39
40
|
const AuthConfigCreationToolAccessConfigSchema = zod_v3.z.object({ toolsForConnectedAccountCreation: zod_v3.z.array(zod_v3.z.string()).optional() });
|
|
40
41
|
const AuthConfigToolAccessConfigSchema = zod_v3.z.object({
|
|
@@ -54,7 +55,8 @@ const AuthSchemeEnum = zod_v3.z.enum([
|
|
|
54
55
|
"CALCOM_AUTH",
|
|
55
56
|
"SERVICE_ACCOUNT",
|
|
56
57
|
"SAML",
|
|
57
|
-
"DCR_OAUTH"
|
|
58
|
+
"DCR_OAUTH",
|
|
59
|
+
"S2S_OAUTH2"
|
|
58
60
|
]);
|
|
59
61
|
const CreateCustomAuthConfigParamsSchema = zod_v3.z.object({
|
|
60
62
|
type: zod_v3.z.literal("use_custom_auth"),
|
|
@@ -258,6 +260,70 @@ const Oauth2ConnectionDataSchema = zod_v3.z.discriminatedUnion("status", [
|
|
|
258
260
|
Oauth2InactiveConnectionDataSchema
|
|
259
261
|
]);
|
|
260
262
|
const CustomOauth2ConnectionDataSchema = Oauth2ActiveConnectionDataSchema.omit({ status: true });
|
|
263
|
+
const S2SOauth2BaseSchema = BaseSchemeRaw.extend({ status: zod_v3.z.literal(ConnectionStatuses.INITIALIZING) }).catchall(zod_v3.z.unknown());
|
|
264
|
+
const S2SOauth2ConnectionDataSchema = zod_v3.z.discriminatedUnion("status", [
|
|
265
|
+
S2SOauth2BaseSchema,
|
|
266
|
+
S2SOauth2BaseSchema.extend({ status: zod_v3.z.literal(ConnectionStatuses.INITIATED) }).catchall(zod_v3.z.unknown()),
|
|
267
|
+
S2SOauth2BaseSchema.extend({
|
|
268
|
+
status: zod_v3.z.literal(ConnectionStatuses.ACTIVE),
|
|
269
|
+
access_token: zod_v3.z.string().optional(),
|
|
270
|
+
id_token: zod_v3.z.string().optional(),
|
|
271
|
+
token_type: zod_v3.z.string().optional(),
|
|
272
|
+
refresh_token: zod_v3.z.string().nullish(),
|
|
273
|
+
expires_in: zod_v3.z.union([
|
|
274
|
+
zod_v3.z.string(),
|
|
275
|
+
zod_v3.z.number(),
|
|
276
|
+
zod_v3.z.null()
|
|
277
|
+
]).optional(),
|
|
278
|
+
scope: zod_v3.z.union([
|
|
279
|
+
zod_v3.z.string(),
|
|
280
|
+
zod_v3.z.array(zod_v3.z.string()),
|
|
281
|
+
zod_v3.z.null()
|
|
282
|
+
]).optional()
|
|
283
|
+
}).catchall(zod_v3.z.unknown()),
|
|
284
|
+
S2SOauth2BaseSchema.extend({
|
|
285
|
+
status: zod_v3.z.literal(ConnectionStatuses.INACTIVE),
|
|
286
|
+
access_token: zod_v3.z.string().optional(),
|
|
287
|
+
id_token: zod_v3.z.string().optional(),
|
|
288
|
+
token_type: zod_v3.z.string().optional(),
|
|
289
|
+
refresh_token: zod_v3.z.string().nullish(),
|
|
290
|
+
expires_in: zod_v3.z.union([
|
|
291
|
+
zod_v3.z.string(),
|
|
292
|
+
zod_v3.z.number(),
|
|
293
|
+
zod_v3.z.null()
|
|
294
|
+
]).optional(),
|
|
295
|
+
scope: zod_v3.z.union([
|
|
296
|
+
zod_v3.z.string(),
|
|
297
|
+
zod_v3.z.array(zod_v3.z.string()),
|
|
298
|
+
zod_v3.z.null()
|
|
299
|
+
]).optional()
|
|
300
|
+
}).catchall(zod_v3.z.unknown()),
|
|
301
|
+
S2SOauth2BaseSchema.extend({
|
|
302
|
+
status: zod_v3.z.literal(ConnectionStatuses.FAILED),
|
|
303
|
+
error: zod_v3.z.string().optional(),
|
|
304
|
+
error_description: zod_v3.z.string().optional()
|
|
305
|
+
}).catchall(zod_v3.z.unknown()),
|
|
306
|
+
S2SOauth2BaseSchema.extend({
|
|
307
|
+
status: zod_v3.z.literal(ConnectionStatuses.EXPIRED),
|
|
308
|
+
expired_at: zod_v3.z.string().optional()
|
|
309
|
+
}).catchall(zod_v3.z.unknown())
|
|
310
|
+
]);
|
|
311
|
+
const CustomS2SOauth2ConnectionDataSchema = BaseSchemeRaw.extend({
|
|
312
|
+
access_token: zod_v3.z.string().optional(),
|
|
313
|
+
id_token: zod_v3.z.string().optional(),
|
|
314
|
+
token_type: zod_v3.z.string().optional(),
|
|
315
|
+
refresh_token: zod_v3.z.string().nullish().optional(),
|
|
316
|
+
expires_in: zod_v3.z.union([
|
|
317
|
+
zod_v3.z.string(),
|
|
318
|
+
zod_v3.z.number(),
|
|
319
|
+
zod_v3.z.null()
|
|
320
|
+
]).optional(),
|
|
321
|
+
scope: zod_v3.z.union([
|
|
322
|
+
zod_v3.z.string(),
|
|
323
|
+
zod_v3.z.array(zod_v3.z.string()),
|
|
324
|
+
zod_v3.z.null()
|
|
325
|
+
]).optional()
|
|
326
|
+
}).catchall(zod_v3.z.unknown());
|
|
261
327
|
const Oauth1InitiatingConnectionDataSchema = BaseSchemeRaw.extend({ status: zod_v3.z.literal(ConnectionStatuses.INITIALIZING) }).catchall(zod_v3.z.unknown());
|
|
262
328
|
const Oauth1InitiatedConnectionDataSchema = Oauth1InitiatingConnectionDataSchema.extend({
|
|
263
329
|
status: zod_v3.z.literal(ConnectionStatuses.INITIATED),
|
|
@@ -618,6 +684,10 @@ const ConnectionDataSchema = zod_v3.z.discriminatedUnion("authScheme", [
|
|
|
618
684
|
authScheme: zod_v3.z.literal(AuthSchemeTypes.OAUTH2),
|
|
619
685
|
val: Oauth2ConnectionDataSchema
|
|
620
686
|
}),
|
|
687
|
+
zod_v3.z.object({
|
|
688
|
+
authScheme: zod_v3.z.literal(AuthSchemeTypes.S2S_OAUTH2),
|
|
689
|
+
val: S2SOauth2ConnectionDataSchema
|
|
690
|
+
}),
|
|
621
691
|
zod_v3.z.object({
|
|
622
692
|
authScheme: zod_v3.z.literal(AuthSchemeTypes.API_KEY),
|
|
623
693
|
val: ApiKeyConnectionDataSchema
|
|
@@ -669,6 +739,11 @@ const CustomConnectionDataSchema = zod_v3.z.discriminatedUnion("authScheme", [
|
|
|
669
739
|
toolkitSlug: zod_v3.z.string(),
|
|
670
740
|
val: CustomOauth2ConnectionDataSchema
|
|
671
741
|
}),
|
|
742
|
+
zod_v3.z.object({
|
|
743
|
+
authScheme: zod_v3.z.literal(AuthSchemeTypes.S2S_OAUTH2),
|
|
744
|
+
toolkitSlug: zod_v3.z.string(),
|
|
745
|
+
val: CustomS2SOauth2ConnectionDataSchema
|
|
746
|
+
}),
|
|
672
747
|
zod_v3.z.object({
|
|
673
748
|
authScheme: zod_v3.z.literal(AuthSchemeTypes.DCR_OAUTH),
|
|
674
749
|
toolkitSlug: zod_v3.z.string(),
|
|
@@ -1422,6 +1497,7 @@ const CreateConnectedAccountResponseSchema = zod_v3.z.object({
|
|
|
1422
1497
|
});
|
|
1423
1498
|
const ConnectedAccountAuthConfigSchema = zod_v3.z.object({
|
|
1424
1499
|
id: zod_v3.z.string(),
|
|
1500
|
+
authScheme: AuthSchemeEnum.optional(),
|
|
1425
1501
|
isComposioManaged: zod_v3.z.boolean(),
|
|
1426
1502
|
isDisabled: zod_v3.z.boolean()
|
|
1427
1503
|
});
|
|
@@ -1504,6 +1580,7 @@ function transformConnectedAccountResponse(response) {
|
|
|
1504
1580
|
authConfig: {
|
|
1505
1581
|
...response$1.auth_config,
|
|
1506
1582
|
id: response$1.auth_config.id,
|
|
1583
|
+
authScheme: response$1.auth_config.auth_scheme,
|
|
1507
1584
|
isComposioManaged: response$1.auth_config.is_composio_managed,
|
|
1508
1585
|
isDisabled: response$1.auth_config.is_disabled
|
|
1509
1586
|
},
|
|
@@ -1934,7 +2011,7 @@ var Tools = class {
|
|
|
1934
2011
|
if ("tools" in query && "toolkits" in query) throw new ValidationError("Invalid tool list parameters. You should not use tools and toolkits filter together.");
|
|
1935
2012
|
const queryParams = ToolListParamsSchema.safeParse(query);
|
|
1936
2013
|
if (queryParams.error) throw new ValidationError("Invalid tool list parameters", { cause: queryParams.error });
|
|
1937
|
-
const shouldAutoApplyImportant = "toolkits" in queryParams.data && !("tools" in queryParams.data) && !("tags" in queryParams.data) && !("search" in queryParams.data) && queryParams.data.important !== false;
|
|
2014
|
+
const shouldAutoApplyImportant = "toolkits" in queryParams.data && !("tools" in queryParams.data) && !("tags" in queryParams.data) && !("search" in queryParams.data) && !("limit" in queryParams.data) && queryParams.data.important !== false;
|
|
1938
2015
|
const effectiveImportant = "important" in queryParams.data ? queryParams.data.important : shouldAutoApplyImportant;
|
|
1939
2016
|
if (!("tools" in queryParams.data || "toolkits" in queryParams.data || "search" in queryParams.data || "authConfigIds" in queryParams.data)) throw new ValidationError("Invalid tool list parameters, atleast one of the following parameters is required: tools, toolkits, search, authConfigIds");
|
|
1940
2017
|
let limit = "limit" in queryParams.data ? queryParams.data.limit : void 0;
|
|
@@ -2125,58 +2202,16 @@ var Tools = class {
|
|
|
2125
2202
|
}
|
|
2126
2203
|
/**
|
|
2127
2204
|
* @internal
|
|
2128
|
-
* Utility to wrap tools
|
|
2129
|
-
*
|
|
2130
|
-
*
|
|
2131
|
-
* @param
|
|
2132
|
-
* @param
|
|
2133
|
-
* @
|
|
2134
|
-
* @param params.regularTools - Optional regular prefetch tools
|
|
2135
|
-
* @param params.modifiers - The modifiers to apply to the tools
|
|
2136
|
-
* @returns {Tool[]} The wrapped tools in provider format
|
|
2205
|
+
* Utility to wrap a given set of tools in the format expected by the tool router
|
|
2206
|
+
*
|
|
2207
|
+
* @param {string} sessionId - The session id to execute the tool for
|
|
2208
|
+
* @param {Tool[]} tools - The tools to wrap
|
|
2209
|
+
* @param {SessionExecuteMetaModifiers} modifiers - The modifiers to apply to the tool
|
|
2210
|
+
* @returns {Tool[]} The wrapped tools
|
|
2137
2211
|
*/
|
|
2138
|
-
wrapToolsForToolRouter(
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
return this.provider.wrapTools(metaTools, executeToolFn);
|
|
2142
|
-
}
|
|
2143
|
-
const metaToolSlugs = new Set(metaTools.map((t) => t.slug));
|
|
2144
|
-
const regularToolkitSlugs = new Map(regularTools.map((t) => [t.slug, t.toolkit?.slug ?? "unknown"]));
|
|
2145
|
-
const allTools = [...metaTools, ...regularTools];
|
|
2146
|
-
const unifiedExecuteFn = async (toolSlug, input) => {
|
|
2147
|
-
if (metaToolSlugs.has(toolSlug)) return await this.executeMetaTool(toolSlug, {
|
|
2148
|
-
sessionId,
|
|
2149
|
-
arguments: input
|
|
2150
|
-
}, modifiers);
|
|
2151
|
-
else {
|
|
2152
|
-
const toolkitSlug = regularToolkitSlugs.get(toolSlug) ?? "unknown";
|
|
2153
|
-
let modifiedParams = input;
|
|
2154
|
-
if (modifiers?.beforeExecute) modifiedParams = await modifiers.beforeExecute({
|
|
2155
|
-
toolSlug,
|
|
2156
|
-
toolkitSlug,
|
|
2157
|
-
sessionId,
|
|
2158
|
-
params: modifiedParams
|
|
2159
|
-
});
|
|
2160
|
-
const response = await this.client.toolRouter.session.execute(sessionId, {
|
|
2161
|
-
tool_slug: toolSlug,
|
|
2162
|
-
arguments: modifiedParams
|
|
2163
|
-
});
|
|
2164
|
-
let result = {
|
|
2165
|
-
data: response.data,
|
|
2166
|
-
error: response.error,
|
|
2167
|
-
successful: !response.error,
|
|
2168
|
-
logId: response.log_id
|
|
2169
|
-
};
|
|
2170
|
-
if (modifiers?.afterExecute) result = await modifiers.afterExecute({
|
|
2171
|
-
toolSlug,
|
|
2172
|
-
toolkitSlug,
|
|
2173
|
-
sessionId,
|
|
2174
|
-
result
|
|
2175
|
-
});
|
|
2176
|
-
return result;
|
|
2177
|
-
}
|
|
2178
|
-
};
|
|
2179
|
-
return this.provider.wrapTools(allTools, unifiedExecuteFn);
|
|
2212
|
+
wrapToolsForToolRouter(sessionId, tools, modifiers) {
|
|
2213
|
+
const executeToolFn = this.createExecuteToolFnForToolRouter(sessionId, modifiers);
|
|
2214
|
+
return this.provider.wrapTools(tools, executeToolFn);
|
|
2180
2215
|
}
|
|
2181
2216
|
/**
|
|
2182
2217
|
* @internal
|
|
@@ -2217,46 +2252,6 @@ var Tools = class {
|
|
|
2217
2252
|
}
|
|
2218
2253
|
/**
|
|
2219
2254
|
* @internal
|
|
2220
|
-
* Creates a function that executes regular (non-meta) tools via tool router session
|
|
2221
|
-
*
|
|
2222
|
-
* @param {string} sessionId - The session id to execute the tool for
|
|
2223
|
-
* @param {Tool[]} tools - The tools to extract toolkit info from
|
|
2224
|
-
* @param {SessionExecuteMetaModifiers} modifiers - The modifiers to apply to the tool
|
|
2225
|
-
* @returns {ExecuteToolFn} The execute tool function
|
|
2226
|
-
*/
|
|
2227
|
-
createExecuteRegularToolFnForToolRouter(sessionId, tools, modifiers) {
|
|
2228
|
-
const toolkitSlugs = new Map(tools.map((t) => [t.slug, t.toolkit?.slug ?? "unknown"]));
|
|
2229
|
-
const executeToolFn = async (toolSlug, input) => {
|
|
2230
|
-
const toolkitSlug = toolkitSlugs.get(toolSlug) ?? "unknown";
|
|
2231
|
-
let modifiedParams = input;
|
|
2232
|
-
if (modifiers?.beforeExecute) modifiedParams = await modifiers.beforeExecute({
|
|
2233
|
-
toolSlug,
|
|
2234
|
-
toolkitSlug,
|
|
2235
|
-
sessionId,
|
|
2236
|
-
params: modifiedParams
|
|
2237
|
-
});
|
|
2238
|
-
const response = await this.client.toolRouter.session.execute(sessionId, {
|
|
2239
|
-
tool_slug: toolSlug,
|
|
2240
|
-
arguments: modifiedParams
|
|
2241
|
-
});
|
|
2242
|
-
let result = {
|
|
2243
|
-
data: response.data,
|
|
2244
|
-
error: response.error,
|
|
2245
|
-
successful: !response.error,
|
|
2246
|
-
logId: response.log_id
|
|
2247
|
-
};
|
|
2248
|
-
if (modifiers?.afterExecute) result = await modifiers.afterExecute({
|
|
2249
|
-
toolSlug,
|
|
2250
|
-
toolkitSlug,
|
|
2251
|
-
sessionId,
|
|
2252
|
-
result
|
|
2253
|
-
});
|
|
2254
|
-
return result;
|
|
2255
|
-
};
|
|
2256
|
-
return executeToolFn;
|
|
2257
|
-
}
|
|
2258
|
-
/**
|
|
2259
|
-
* @internal
|
|
2260
2255
|
* Executes a composio tool via API without modifiers
|
|
2261
2256
|
* @param tool - The tool to execute
|
|
2262
2257
|
* @param body - The body of the tool execution
|
|
@@ -3328,7 +3323,7 @@ var ConnectedAccounts = class {
|
|
|
3328
3323
|
const parsedOptions = ConnectedAccountRefreshOptionsSchema.safeParse(options);
|
|
3329
3324
|
if (!parsedOptions.success) throw new ValidationError("Failed to parse connected account refresh options", { cause: parsedOptions.error });
|
|
3330
3325
|
params = {
|
|
3331
|
-
|
|
3326
|
+
query_redirect_url: parsedOptions.data.redirectUrl,
|
|
3332
3327
|
validate_credentials: parsedOptions.data.validateCredentials
|
|
3333
3328
|
};
|
|
3334
3329
|
}
|
|
@@ -3759,11 +3754,19 @@ const WebhookPayloadV2Schema = zod_v3.z.object({
|
|
|
3759
3754
|
user_id: zod_v3.z.string()
|
|
3760
3755
|
}).passthrough()
|
|
3761
3756
|
});
|
|
3762
|
-
/** V3 webhook payload -
|
|
3757
|
+
/** V3 webhook payload - generic envelope for all composio.* events */
|
|
3763
3758
|
const WebhookPayloadV3Schema = zod_v3.z.object({
|
|
3764
3759
|
id: zod_v3.z.string(),
|
|
3765
3760
|
timestamp: zod_v3.z.string(),
|
|
3766
|
-
type: zod_v3.z.
|
|
3761
|
+
type: zod_v3.z.string().refine((val) => val.startsWith("composio."), { message: "V3 event type must start with 'composio.'" }),
|
|
3762
|
+
metadata: zod_v3.z.record(zod_v3.z.unknown()),
|
|
3763
|
+
data: zod_v3.z.record(zod_v3.z.unknown())
|
|
3764
|
+
});
|
|
3765
|
+
/** V3 trigger-specific payload - has trigger metadata fields */
|
|
3766
|
+
const WebhookTriggerPayloadV3Schema = zod_v3.z.object({
|
|
3767
|
+
id: zod_v3.z.string(),
|
|
3768
|
+
timestamp: zod_v3.z.string(),
|
|
3769
|
+
type: zod_v3.z.string(),
|
|
3767
3770
|
metadata: zod_v3.z.object({
|
|
3768
3771
|
log_id: zod_v3.z.string(),
|
|
3769
3772
|
trigger_slug: zod_v3.z.string(),
|
|
@@ -3771,7 +3774,7 @@ const WebhookPayloadV3Schema = zod_v3.z.object({
|
|
|
3771
3774
|
connected_account_id: zod_v3.z.string(),
|
|
3772
3775
|
auth_config_id: zod_v3.z.string(),
|
|
3773
3776
|
user_id: zod_v3.z.string()
|
|
3774
|
-
}),
|
|
3777
|
+
}).passthrough(),
|
|
3775
3778
|
data: zod_v3.z.record(zod_v3.z.unknown())
|
|
3776
3779
|
});
|
|
3777
3780
|
/** Union of all webhook payload versions */
|
|
@@ -4617,28 +4620,55 @@ var Triggers = class {
|
|
|
4617
4620
|
* @private
|
|
4618
4621
|
*/
|
|
4619
4622
|
normalizeV3Payload(payload) {
|
|
4620
|
-
const
|
|
4621
|
-
|
|
4623
|
+
const triggerResult = WebhookTriggerPayloadV3Schema.safeParse(payload);
|
|
4624
|
+
if (triggerResult.success) {
|
|
4625
|
+
const triggerSlug = triggerResult.data.metadata.trigger_slug;
|
|
4626
|
+
const toolkitSlug = triggerSlug.split("_")[0]?.toUpperCase() || "UNKNOWN";
|
|
4627
|
+
return {
|
|
4628
|
+
id: triggerResult.data.metadata.trigger_id,
|
|
4629
|
+
uuid: triggerResult.data.metadata.trigger_id,
|
|
4630
|
+
triggerSlug,
|
|
4631
|
+
toolkitSlug,
|
|
4632
|
+
userId: triggerResult.data.metadata.user_id,
|
|
4633
|
+
payload: payload.data,
|
|
4634
|
+
originalPayload: payload.data,
|
|
4635
|
+
metadata: {
|
|
4636
|
+
id: triggerResult.data.metadata.trigger_id,
|
|
4637
|
+
uuid: triggerResult.data.metadata.trigger_id,
|
|
4638
|
+
toolkitSlug,
|
|
4639
|
+
triggerSlug,
|
|
4640
|
+
triggerConfig: {},
|
|
4641
|
+
connectedAccount: {
|
|
4642
|
+
id: triggerResult.data.metadata.connected_account_id,
|
|
4643
|
+
uuid: triggerResult.data.metadata.connected_account_id,
|
|
4644
|
+
authConfigId: triggerResult.data.metadata.auth_config_id,
|
|
4645
|
+
authConfigUUID: triggerResult.data.metadata.auth_config_id,
|
|
4646
|
+
userId: triggerResult.data.metadata.user_id,
|
|
4647
|
+
status: "ACTIVE"
|
|
4648
|
+
}
|
|
4649
|
+
}
|
|
4650
|
+
};
|
|
4651
|
+
}
|
|
4622
4652
|
return {
|
|
4623
|
-
id: payload.
|
|
4624
|
-
uuid: payload.
|
|
4625
|
-
triggerSlug,
|
|
4626
|
-
toolkitSlug,
|
|
4627
|
-
userId:
|
|
4653
|
+
id: payload.id,
|
|
4654
|
+
uuid: payload.id,
|
|
4655
|
+
triggerSlug: payload.type,
|
|
4656
|
+
toolkitSlug: "COMPOSIO",
|
|
4657
|
+
userId: "",
|
|
4628
4658
|
payload: payload.data,
|
|
4629
|
-
originalPayload: payload
|
|
4659
|
+
originalPayload: payload,
|
|
4630
4660
|
metadata: {
|
|
4631
|
-
id: payload.
|
|
4632
|
-
uuid: payload.
|
|
4633
|
-
toolkitSlug,
|
|
4634
|
-
triggerSlug,
|
|
4661
|
+
id: payload.id,
|
|
4662
|
+
uuid: payload.id,
|
|
4663
|
+
toolkitSlug: "COMPOSIO",
|
|
4664
|
+
triggerSlug: payload.type,
|
|
4635
4665
|
triggerConfig: {},
|
|
4636
4666
|
connectedAccount: {
|
|
4637
|
-
id:
|
|
4638
|
-
uuid:
|
|
4639
|
-
authConfigId:
|
|
4640
|
-
authConfigUUID:
|
|
4641
|
-
userId:
|
|
4667
|
+
id: "",
|
|
4668
|
+
uuid: "",
|
|
4669
|
+
authConfigId: "",
|
|
4670
|
+
authConfigUUID: "",
|
|
4671
|
+
userId: "",
|
|
4642
4672
|
status: "ACTIVE"
|
|
4643
4673
|
}
|
|
4644
4674
|
}
|
|
@@ -5666,7 +5696,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
5666
5696
|
|
|
5667
5697
|
//#endregion
|
|
5668
5698
|
//#region package.json
|
|
5669
|
-
var version = "0.6.
|
|
5699
|
+
var version = "0.6.4";
|
|
5670
5700
|
|
|
5671
5701
|
//#endregion
|
|
5672
5702
|
//#region src/utils/session.ts
|
|
@@ -5968,21 +5998,8 @@ var ToolRouter = class {
|
|
|
5968
5998
|
createToolsFn = (sessionId) => {
|
|
5969
5999
|
return async (modifiers) => {
|
|
5970
6000
|
const ToolsModel = new Tools(this.client, this.config);
|
|
5971
|
-
const
|
|
5972
|
-
|
|
5973
|
-
const regularTools = await ToolsModel.getRawComposioTools({ tools: modifiers.experimental.prefetchTools }, modifiers?.modifySchema ? { modifySchema: modifiers.modifySchema } : void 0);
|
|
5974
|
-
return ToolsModel.wrapToolsForToolRouter({
|
|
5975
|
-
sessionId,
|
|
5976
|
-
metaTools,
|
|
5977
|
-
regularTools,
|
|
5978
|
-
modifiers
|
|
5979
|
-
});
|
|
5980
|
-
}
|
|
5981
|
-
return ToolsModel.wrapToolsForToolRouter({
|
|
5982
|
-
sessionId,
|
|
5983
|
-
metaTools,
|
|
5984
|
-
modifiers
|
|
5985
|
-
});
|
|
6001
|
+
const tools = await ToolsModel.getRawToolRouterMetaTools(sessionId, modifiers?.modifySchema ? { modifySchema: modifiers?.modifySchema } : void 0);
|
|
6002
|
+
return ToolsModel.wrapToolsForToolRouter(sessionId, tools, modifiers);
|
|
5986
6003
|
};
|
|
5987
6004
|
};
|
|
5988
6005
|
/**
|
|
@@ -6559,6 +6576,136 @@ var AuthScheme = class {
|
|
|
6559
6576
|
}
|
|
6560
6577
|
};
|
|
6561
6578
|
|
|
6579
|
+
//#endregion
|
|
6580
|
+
//#region src/types/webhookEvents.types.ts
|
|
6581
|
+
const WebhookEventTypes = {
|
|
6582
|
+
CONNECTION_EXPIRED: "composio.connected_account.expired",
|
|
6583
|
+
TRIGGER_MESSAGE: "composio.trigger.message"
|
|
6584
|
+
};
|
|
6585
|
+
/**
|
|
6586
|
+
* Auth config schema for webhook payloads (raw API format, snake_case).
|
|
6587
|
+
*
|
|
6588
|
+
* This intentionally does NOT reuse ConnectedAccountAuthConfigSchema from
|
|
6589
|
+
* connectedAccounts.types.ts because:
|
|
6590
|
+
* - Webhook payloads arrive in raw snake_case (is_composio_managed, is_disabled)
|
|
6591
|
+
* while the SDK schema uses camelCase (isComposioManaged, isDisabled)
|
|
6592
|
+
* - Webhook payloads include additional fields (auth_scheme, deprecated)
|
|
6593
|
+
* not present in the SDK schema
|
|
6594
|
+
*
|
|
6595
|
+
* Uses .passthrough() to accept unknown fields the API may add in the future.
|
|
6596
|
+
*
|
|
6597
|
+
* @see ConnectedAccountAuthConfigSchema in connectedAccounts.types.ts for the camelCase SDK version
|
|
6598
|
+
*/
|
|
6599
|
+
const WebhookConnectedAccountAuthConfigSchema = zod_v3.z.object({
|
|
6600
|
+
id: zod_v3.z.string(),
|
|
6601
|
+
auth_scheme: zod_v3.z.nativeEnum(AuthSchemeTypes),
|
|
6602
|
+
is_composio_managed: zod_v3.z.boolean(),
|
|
6603
|
+
is_disabled: zod_v3.z.boolean(),
|
|
6604
|
+
deprecated: zod_v3.z.object({ uuid: zod_v3.z.string() }).optional()
|
|
6605
|
+
}).passthrough();
|
|
6606
|
+
/**
|
|
6607
|
+
* Simplified connection state schema for webhook payloads (raw API format).
|
|
6608
|
+
*
|
|
6609
|
+
* This intentionally does NOT reuse ConnectionDataSchema from
|
|
6610
|
+
* connectedAccountAuthStates.types.ts because:
|
|
6611
|
+
* - ConnectionDataSchema is a discriminated union requiring typed `val`
|
|
6612
|
+
* per auth scheme (e.g., Oauth2ConnectionDataSchema)
|
|
6613
|
+
* - Webhook payloads need loose validation (z.record(z.unknown()))
|
|
6614
|
+
* since the connection state varies and isn't the focus of event handling
|
|
6615
|
+
*
|
|
6616
|
+
* Uses .passthrough() to accept unknown fields the API may add in the future.
|
|
6617
|
+
*
|
|
6618
|
+
* @see ConnectionDataSchema in connectedAccountAuthStates.types.ts for the full typed version
|
|
6619
|
+
*/
|
|
6620
|
+
const WebhookConnectionStateSchema = zod_v3.z.object({
|
|
6621
|
+
authScheme: zod_v3.z.nativeEnum(AuthSchemeTypes),
|
|
6622
|
+
val: zod_v3.z.record(zod_v3.z.unknown())
|
|
6623
|
+
}).passthrough();
|
|
6624
|
+
/**
|
|
6625
|
+
* Connected account data schema for webhook payloads (raw API format, snake_case).
|
|
6626
|
+
*
|
|
6627
|
+
* This is the snake_case equivalent of ConnectedAccountRetrieveResponseSchema
|
|
6628
|
+
* from connectedAccounts.types.ts. It intentionally does NOT reuse that schema because:
|
|
6629
|
+
* - Webhook payloads arrive in raw snake_case (auth_config, user_id, created_at, etc.)
|
|
6630
|
+
* while the SDK schema uses camelCase (authConfig, createdAt, etc.)
|
|
6631
|
+
* - The SDK applies a transformation layer (utils/transformers/connectedAccounts.ts)
|
|
6632
|
+
* before validation; webhooks are validated directly by the user
|
|
6633
|
+
* - Webhook payloads include user_id, which the SDK schema omits
|
|
6634
|
+
*
|
|
6635
|
+
* Uses .passthrough() to accept unknown fields the API may add in the future.
|
|
6636
|
+
*
|
|
6637
|
+
* @see ConnectedAccountRetrieveResponseSchema in connectedAccounts.types.ts for the camelCase SDK version
|
|
6638
|
+
* @see utils/transformers/connectedAccounts.ts for the snake-to-camel transformation
|
|
6639
|
+
*/
|
|
6640
|
+
const SingleConnectedAccountDetailedResponseSchema = zod_v3.z.object({
|
|
6641
|
+
toolkit: zod_v3.z.object({ slug: zod_v3.z.string().describe("The slug of the toolkit") }).passthrough(),
|
|
6642
|
+
auth_config: WebhookConnectedAccountAuthConfigSchema,
|
|
6643
|
+
id: zod_v3.z.string(),
|
|
6644
|
+
user_id: zod_v3.z.string(),
|
|
6645
|
+
status: zod_v3.z.nativeEnum(ConnectionStatuses),
|
|
6646
|
+
created_at: zod_v3.z.string(),
|
|
6647
|
+
updated_at: zod_v3.z.string(),
|
|
6648
|
+
state: WebhookConnectionStateSchema,
|
|
6649
|
+
data: zod_v3.z.record(zod_v3.z.unknown()),
|
|
6650
|
+
params: zod_v3.z.record(zod_v3.z.unknown()),
|
|
6651
|
+
status_reason: zod_v3.z.string().nullable(),
|
|
6652
|
+
is_disabled: zod_v3.z.boolean(),
|
|
6653
|
+
test_request_endpoint: zod_v3.z.string().optional(),
|
|
6654
|
+
deprecated: zod_v3.z.object({
|
|
6655
|
+
labels: zod_v3.z.array(zod_v3.z.string()),
|
|
6656
|
+
uuid: zod_v3.z.string()
|
|
6657
|
+
}).optional()
|
|
6658
|
+
}).passthrough();
|
|
6659
|
+
/**
|
|
6660
|
+
* Webhook metadata for connection events.
|
|
6661
|
+
* Note: This differs from the trigger webhook metadata in WebhookTriggerPayloadV3Schema.
|
|
6662
|
+
*
|
|
6663
|
+
* Uses .passthrough() to accept unknown fields the API may add in the future.
|
|
6664
|
+
*/
|
|
6665
|
+
const WebhookConnectionMetadataSchema = zod_v3.z.object({
|
|
6666
|
+
project_id: zod_v3.z.string(),
|
|
6667
|
+
org_id: zod_v3.z.string()
|
|
6668
|
+
}).passthrough();
|
|
6669
|
+
/**
|
|
6670
|
+
* Connection expired webhook event payload.
|
|
6671
|
+
* Emitted when a connected account expires due to authentication refresh failure.
|
|
6672
|
+
*
|
|
6673
|
+
* Uses .passthrough() to accept unknown fields the API may add in the future.
|
|
6674
|
+
*
|
|
6675
|
+
* @example
|
|
6676
|
+
* ```typescript
|
|
6677
|
+
* import { ConnectionExpiredEventSchema } from '@composio/core';
|
|
6678
|
+
*
|
|
6679
|
+
* // In your webhook handler
|
|
6680
|
+
* const result = ConnectionExpiredEventSchema.safeParse(webhookPayload);
|
|
6681
|
+
* if (result.success) {
|
|
6682
|
+
* const { data, metadata } = result.data;
|
|
6683
|
+
* console.log(`Connection ${data.id} expired for user ${data.user_id}`);
|
|
6684
|
+
* console.log(`Toolkit: ${data.toolkit.slug}`);
|
|
6685
|
+
* console.log(`Project: ${metadata.project_id}`);
|
|
6686
|
+
* }
|
|
6687
|
+
* ```
|
|
6688
|
+
*/
|
|
6689
|
+
const ConnectionExpiredEventSchema = zod_v3.z.object({
|
|
6690
|
+
id: zod_v3.z.string(),
|
|
6691
|
+
timestamp: zod_v3.z.string(),
|
|
6692
|
+
type: zod_v3.z.literal(WebhookEventTypes.CONNECTION_EXPIRED),
|
|
6693
|
+
data: SingleConnectedAccountDetailedResponseSchema,
|
|
6694
|
+
metadata: WebhookConnectionMetadataSchema
|
|
6695
|
+
}).passthrough();
|
|
6696
|
+
/**
|
|
6697
|
+
* Union of all typed webhook event schemas.
|
|
6698
|
+
* Extend this as new event types are added.
|
|
6699
|
+
*
|
|
6700
|
+
* Note: This covers specific known event types with strict validation.
|
|
6701
|
+
* For unknown or new event types, use WebhookPayloadV3Schema from
|
|
6702
|
+
* triggers.types.ts which accepts any composio.* event with loose validation.
|
|
6703
|
+
*
|
|
6704
|
+
* Trigger events (composio.trigger.message) are handled through the
|
|
6705
|
+
* WebhookTriggerPayloadV3Schema in triggers.types.ts and the TriggerEvent type.
|
|
6706
|
+
*/
|
|
6707
|
+
const WebhookEventSchema = zod_v3.z.discriminatedUnion("type", [ConnectionExpiredEventSchema]);
|
|
6708
|
+
|
|
6562
6709
|
//#endregion
|
|
6563
6710
|
//#region src/types/mcp.types.ts
|
|
6564
6711
|
/**
|
|
@@ -6812,6 +6959,7 @@ exports.ConnectedAccountRetrieveResponseSchema = ConnectedAccountRetrieveRespons
|
|
|
6812
6959
|
exports.ConnectedAccountStatusSchema = ConnectedAccountStatusSchema;
|
|
6813
6960
|
exports.ConnectedAccountStatuses = ConnectedAccountStatuses;
|
|
6814
6961
|
exports.ConnectionDataSchema = ConnectionDataSchema;
|
|
6962
|
+
exports.ConnectionExpiredEventSchema = ConnectionExpiredEventSchema;
|
|
6815
6963
|
exports.ConnectionRequestErrorCodes = ConnectionRequestErrorCodes;
|
|
6816
6964
|
exports.ConnectionRequestFailedError = ConnectionRequestFailedError;
|
|
6817
6965
|
exports.ConnectionRequestTimeoutError = ConnectionRequestTimeoutError;
|
|
@@ -6871,6 +7019,7 @@ exports.Oauth2InitiatingConnectionDataSchema = Oauth2InitiatingConnectionDataSch
|
|
|
6871
7019
|
exports.OpenAIProvider = OpenAIProvider;
|
|
6872
7020
|
exports.RedirectableAuthSchemeSchema = RedirectableAuthSchemeSchema;
|
|
6873
7021
|
exports.SDKErrorCodes = SDKErrorCodes;
|
|
7022
|
+
exports.SingleConnectedAccountDetailedResponseSchema = SingleConnectedAccountDetailedResponseSchema;
|
|
6874
7023
|
exports.ToolErrorCodes = ToolErrorCodes;
|
|
6875
7024
|
exports.ToolExecuteMetaParamsSchema = ToolExecuteMetaParamsSchema;
|
|
6876
7025
|
exports.ToolExecuteParamsSchema = ToolExecuteParamsSchema;
|
|
@@ -6930,10 +7079,16 @@ exports.TriggersTypeListResponseSchema = TriggersTypeListResponseSchema;
|
|
|
6930
7079
|
exports.ValidationError = ValidationError;
|
|
6931
7080
|
exports.ValidationErrorCodes = ValidationErrorCodes;
|
|
6932
7081
|
exports.VerifyWebhookParamsSchema = VerifyWebhookParamsSchema;
|
|
7082
|
+
exports.WebhookConnectedAccountAuthConfigSchema = WebhookConnectedAccountAuthConfigSchema;
|
|
7083
|
+
exports.WebhookConnectionMetadataSchema = WebhookConnectionMetadataSchema;
|
|
7084
|
+
exports.WebhookConnectionStateSchema = WebhookConnectionStateSchema;
|
|
7085
|
+
exports.WebhookEventSchema = WebhookEventSchema;
|
|
7086
|
+
exports.WebhookEventTypes = WebhookEventTypes;
|
|
6933
7087
|
exports.WebhookPayloadSchema = WebhookPayloadSchema;
|
|
6934
7088
|
exports.WebhookPayloadV1Schema = WebhookPayloadV1Schema;
|
|
6935
7089
|
exports.WebhookPayloadV2Schema = WebhookPayloadV2Schema;
|
|
6936
7090
|
exports.WebhookPayloadV3Schema = WebhookPayloadV3Schema;
|
|
7091
|
+
exports.WebhookTriggerPayloadV3Schema = WebhookTriggerPayloadV3Schema;
|
|
6937
7092
|
exports.WebhookVersions = WebhookVersions;
|
|
6938
7093
|
Object.defineProperty(exports, 'constants', {
|
|
6939
7094
|
enumerable: true,
|