@composio/core 0.6.7 → 0.6.9

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.
@@ -585,6 +585,7 @@ function validateSlugLength(toolSlug, toolkitSlug, context) {
585
585
  * extendsToolkit: 'gmail',
586
586
  * inputParams: z.object({ limit: z.number().default(10) }),
587
587
  * execute: async (input, ctx) => {
588
+ * // Same response shape as session.execute(): { data, error, logId }
588
589
  * const result = await ctx.execute('GMAIL_SEARCH', { query: 'is:important' });
589
590
  * return { emails: result.data };
590
591
  * },
@@ -1,4 +1,4 @@
1
- import { a as CustomTool, i as CreateCustomToolkitParams, m as CustomToolkit, n as CreateCustomToolParams } from "./customTool.types-CzBEXJw5.cjs";
1
+ import { a as CustomTool, i as CreateCustomToolkitParams, m as CustomToolkit, n as CreateCustomToolParams } from "./customTool.types-DIvgAKNO.cjs";
2
2
  import { z } from "zod/v3";
3
3
  import { SessionCreateResponse } from "@composio/client/resources/tool-router/session/session.mjs";
4
4
 
@@ -41,6 +41,7 @@ import { SessionCreateResponse } from "@composio/client/resources/tool-router/se
41
41
  * extendsToolkit: 'gmail',
42
42
  * inputParams: z.object({ limit: z.number().default(10) }),
43
43
  * execute: async (input, ctx) => {
44
+ * // Same response shape as session.execute(): { data, error, logId }
44
45
  * const result = await ctx.execute('GMAIL_SEARCH', { query: 'is:important' });
45
46
  * return { emails: result.data };
46
47
  * },
@@ -1,4 +1,4 @@
1
- import { a as CustomTool, i as CreateCustomToolkitParams, m as CustomToolkit, n as CreateCustomToolParams } from "./customTool.types-CEo_oLEU.mjs";
1
+ import { a as CustomTool, i as CreateCustomToolkitParams, m as CustomToolkit, n as CreateCustomToolParams } from "./customTool.types-jiqAXiST.mjs";
2
2
  import { z as z$1 } from "zod/v3";
3
3
  import { SessionCreateResponse } from "@composio/client/resources/tool-router/session/session.mjs";
4
4
 
@@ -41,6 +41,7 @@ import { SessionCreateResponse } from "@composio/client/resources/tool-router/se
41
41
  * extendsToolkit: 'gmail',
42
42
  * inputParams: z.object({ limit: z.number().default(10) }),
43
43
  * execute: async (input, ctx) => {
44
+ * // Same response shape as session.execute(): { data, error, logId }
44
45
  * const result = await ctx.execute('GMAIL_SEARCH', { query: 'is:important' });
45
46
  * return { emails: result.data };
46
47
  * },
@@ -587,6 +587,7 @@ function validateSlugLength(toolSlug, toolkitSlug, context) {
587
587
  * extendsToolkit: 'gmail',
588
588
  * inputParams: z.object({ limit: z.number().default(10) }),
589
589
  * execute: async (input, ctx) => {
590
+ * // Same response shape as session.execute(): { data, error, logId }
590
591
  * const result = await ctx.execute('GMAIL_SEARCH', { query: 'is:important' });
591
592
  * return { emails: result.data };
592
593
  * },
@@ -1,13 +1,13 @@
1
1
  import { D as ToolkitVersionParam, F as ProviderOptions, G as BaseComposioProvider, I as SessionExecuteMetaModifiers, Jt as ExecuteToolFnOptions, K as BaseNonAgenticProvider, N as ExecuteToolModifiers, Wt as McpUrlResponse, a as SchemaModifierOptions, b as ToolRetrievalOptions, d as ToolExecuteResponse$1, l as ToolExecuteParams, m as ToolListParams, o as Tool, p as ToolList, s as ToolExecuteMetaParams, v as ToolProxyParams, zt as McpServerGetResponse } from "./tool.types-bencsexi.mjs";
2
- import { E as Session, Ht as CreateConnectedAccountLinkOptions, I as ToolRouterCreateSessionConfig, It as ConnectedAccountRetrieveResponse, Kt as CreateConnectedAccountOptions, Pt as ConnectedAccountRefreshOptions, Tt as ConnectionRequest, c as CustomToolInputParameter, jt as ConnectedAccountListResponse, kt as ConnectedAccountListParams, l as CustomToolOptions } from "./customTool.types-CEo_oLEU.mjs";
2
+ import { $t as UpdateConnectedAccountParams, E as Session, Ht as CreateConnectedAccountLinkOptions, I as ToolRouterCreateSessionConfig, It as ConnectedAccountRetrieveResponse, Kt as CreateConnectedAccountOptions, Pt as ConnectedAccountRefreshOptions, Tt as ConnectionRequest, c as CustomToolInputParameter, jt as ConnectedAccountListResponse, kt as ConnectedAccountListParams, l as CustomToolOptions } from "./customTool.types-jiqAXiST.mjs";
3
3
  import ComposioClient, { Composio } from "@composio/client";
4
4
  import z, { z as z$1 } from "zod/v3";
5
5
  import { OpenAI } from "openai";
6
6
  import { Files } from "#files";
7
+ import { ConnectedAccountDeleteResponse, ConnectedAccountPatchResponse, ConnectedAccountRefreshResponse, ConnectedAccountUpdateStatusParams, ConnectedAccountUpdateStatusResponse } from "@composio/client/resources/connected-accounts";
7
8
  import { ToolGetInputParams, ToolGetInputResponse, ToolProxyResponse, ToolRetrieveEnumResponse } from "@composio/client/resources/tools";
8
9
  import { TriggersTypeRetrieveEnumResponse } from "@composio/client/resources/index";
9
10
  import { AuthConfigDeleteResponse, AuthConfigUpdateResponse, AuthConfigUpdateStatusResponse } from "@composio/client/resources/auth-configs";
10
- import { ConnectedAccountDeleteResponse, ConnectedAccountRefreshResponse, ConnectedAccountUpdateStatusParams, ConnectedAccountUpdateStatusResponse } from "@composio/client/resources/connected-accounts";
11
11
  import { Stream } from "openai/streaming";
12
12
 
13
13
  //#region src/models/Tools.d.ts
@@ -2609,9 +2609,9 @@ declare const TriggerInstanceListActiveResponseItemSchema: z$1.ZodObject<{
2609
2609
  }, "strip", z$1.ZodTypeAny, {
2610
2610
  connectedAccountId: string;
2611
2611
  id: string;
2612
+ state: Record<string, unknown>;
2612
2613
  updatedAt: string;
2613
2614
  disabledAt: string | null;
2614
- state: Record<string, unknown>;
2615
2615
  triggerConfig: Record<string, unknown>;
2616
2616
  triggerName: string;
2617
2617
  uuid?: string | undefined;
@@ -2619,9 +2619,9 @@ declare const TriggerInstanceListActiveResponseItemSchema: z$1.ZodObject<{
2619
2619
  }, {
2620
2620
  connectedAccountId: string;
2621
2621
  id: string;
2622
+ state: Record<string, unknown>;
2622
2623
  updatedAt: string;
2623
2624
  disabledAt: string | null;
2624
- state: Record<string, unknown>;
2625
2625
  triggerConfig: Record<string, unknown>;
2626
2626
  triggerName: string;
2627
2627
  uuid?: string | undefined;
@@ -2641,9 +2641,9 @@ declare const TriggerInstanceListActiveResponseSchema: z$1.ZodObject<{
2641
2641
  }, "strip", z$1.ZodTypeAny, {
2642
2642
  connectedAccountId: string;
2643
2643
  id: string;
2644
+ state: Record<string, unknown>;
2644
2645
  updatedAt: string;
2645
2646
  disabledAt: string | null;
2646
- state: Record<string, unknown>;
2647
2647
  triggerConfig: Record<string, unknown>;
2648
2648
  triggerName: string;
2649
2649
  uuid?: string | undefined;
@@ -2651,9 +2651,9 @@ declare const TriggerInstanceListActiveResponseSchema: z$1.ZodObject<{
2651
2651
  }, {
2652
2652
  connectedAccountId: string;
2653
2653
  id: string;
2654
+ state: Record<string, unknown>;
2654
2655
  updatedAt: string;
2655
2656
  disabledAt: string | null;
2656
- state: Record<string, unknown>;
2657
2657
  triggerConfig: Record<string, unknown>;
2658
2658
  triggerName: string;
2659
2659
  uuid?: string | undefined;
@@ -2665,9 +2665,9 @@ declare const TriggerInstanceListActiveResponseSchema: z$1.ZodObject<{
2665
2665
  items: {
2666
2666
  connectedAccountId: string;
2667
2667
  id: string;
2668
+ state: Record<string, unknown>;
2668
2669
  updatedAt: string;
2669
2670
  disabledAt: string | null;
2670
- state: Record<string, unknown>;
2671
2671
  triggerConfig: Record<string, unknown>;
2672
2672
  triggerName: string;
2673
2673
  uuid?: string | undefined;
@@ -2679,9 +2679,9 @@ declare const TriggerInstanceListActiveResponseSchema: z$1.ZodObject<{
2679
2679
  items: {
2680
2680
  connectedAccountId: string;
2681
2681
  id: string;
2682
+ state: Record<string, unknown>;
2682
2683
  updatedAt: string;
2683
2684
  disabledAt: string | null;
2684
- state: Record<string, unknown>;
2685
2685
  triggerConfig: Record<string, unknown>;
2686
2686
  triggerName: string;
2687
2687
  uuid?: string | undefined;
@@ -4022,6 +4022,30 @@ declare class ConnectedAccounts {
4022
4022
  * ```
4023
4023
  */
4024
4024
  disable(nanoid: string): Promise<ConnectedAccountUpdateStatusResponse>;
4025
+ /**
4026
+ * Update a connected account's alias and/or credentials.
4027
+ *
4028
+ * @param {string} nanoid - The unique identifier of the connected account
4029
+ * @param {UpdateConnectedAccountParams} params - The update parameters
4030
+ * @returns {Promise<ConnectedAccountPatchResponse>} The update response
4031
+ *
4032
+ * @example
4033
+ * ```typescript
4034
+ * // Set an alias
4035
+ * await composio.connectedAccounts.update('ca_abc123', { alias: 'work-gmail' });
4036
+ *
4037
+ * // Update credentials
4038
+ * await composio.connectedAccounts.update('ca_abc123', {
4039
+ * connection: {
4040
+ * state: {
4041
+ * authScheme: 'BEARER_TOKEN',
4042
+ * val: { token: 'new-access-token' },
4043
+ * },
4044
+ * },
4045
+ * });
4046
+ * ```
4047
+ */
4048
+ update(nanoid: string, params: UpdateConnectedAccountParams): Promise<ConnectedAccountPatchResponse>;
4025
4049
  }
4026
4050
  //#endregion
4027
4051
  //#region src/types/mcp.experimental.types.d.ts
@@ -1,11 +1,11 @@
1
1
  import { D as ToolkitVersionParam, F as ProviderOptions, G as BaseComposioProvider, I as SessionExecuteMetaModifiers, Jt as ExecuteToolFnOptions, K as BaseNonAgenticProvider, N as ExecuteToolModifiers, Wt as McpUrlResponse, a as SchemaModifierOptions, b as ToolRetrievalOptions, d as ToolExecuteResponse$1, l as ToolExecuteParams, m as ToolListParams, o as Tool, p as ToolList, s as ToolExecuteMetaParams, v as ToolProxyParams, zt as McpServerGetResponse } from "./tool.types-BWc7GUrD.cjs";
2
- import { E as Session, Ht as CreateConnectedAccountLinkOptions, I as ToolRouterCreateSessionConfig, It as ConnectedAccountRetrieveResponse, Kt as CreateConnectedAccountOptions, Pt as ConnectedAccountRefreshOptions, Tt as ConnectionRequest, c as CustomToolInputParameter, jt as ConnectedAccountListResponse, kt as ConnectedAccountListParams, l as CustomToolOptions } from "./customTool.types-CzBEXJw5.cjs";
2
+ import { $t as UpdateConnectedAccountParams, E as Session, Ht as CreateConnectedAccountLinkOptions, I as ToolRouterCreateSessionConfig, It as ConnectedAccountRetrieveResponse, Kt as CreateConnectedAccountOptions, Pt as ConnectedAccountRefreshOptions, Tt as ConnectionRequest, c as CustomToolInputParameter, jt as ConnectedAccountListResponse, kt as ConnectedAccountListParams, l as CustomToolOptions } from "./customTool.types-DIvgAKNO.cjs";
3
3
  import z$1, { z } from "zod/v3";
4
+ import { ConnectedAccountDeleteResponse, ConnectedAccountPatchResponse, ConnectedAccountRefreshResponse, ConnectedAccountUpdateStatusParams, ConnectedAccountUpdateStatusResponse } from "@composio/client/resources/connected-accounts";
4
5
  import ComposioClient, { Composio } from "@composio/client";
5
6
  import { ToolGetInputParams, ToolGetInputResponse, ToolProxyResponse, ToolRetrieveEnumResponse } from "@composio/client/resources/tools";
6
7
  import { TriggersTypeRetrieveEnumResponse } from "@composio/client/resources/index";
7
8
  import { AuthConfigDeleteResponse, AuthConfigUpdateResponse, AuthConfigUpdateStatusResponse } from "@composio/client/resources/auth-configs";
8
- import { ConnectedAccountDeleteResponse, ConnectedAccountRefreshResponse, ConnectedAccountUpdateStatusParams, ConnectedAccountUpdateStatusResponse } from "@composio/client/resources/connected-accounts";
9
9
  import { OpenAI } from "openai";
10
10
  import { Stream } from "openai/streaming";
11
11
  import { Files } from "#files";
@@ -2609,9 +2609,9 @@ declare const TriggerInstanceListActiveResponseItemSchema: z.ZodObject<{
2609
2609
  }, "strip", z.ZodTypeAny, {
2610
2610
  connectedAccountId: string;
2611
2611
  id: string;
2612
+ state: Record<string, unknown>;
2612
2613
  updatedAt: string;
2613
2614
  disabledAt: string | null;
2614
- state: Record<string, unknown>;
2615
2615
  triggerConfig: Record<string, unknown>;
2616
2616
  triggerName: string;
2617
2617
  uuid?: string | undefined;
@@ -2619,9 +2619,9 @@ declare const TriggerInstanceListActiveResponseItemSchema: z.ZodObject<{
2619
2619
  }, {
2620
2620
  connectedAccountId: string;
2621
2621
  id: string;
2622
+ state: Record<string, unknown>;
2622
2623
  updatedAt: string;
2623
2624
  disabledAt: string | null;
2624
- state: Record<string, unknown>;
2625
2625
  triggerConfig: Record<string, unknown>;
2626
2626
  triggerName: string;
2627
2627
  uuid?: string | undefined;
@@ -2641,9 +2641,9 @@ declare const TriggerInstanceListActiveResponseSchema: z.ZodObject<{
2641
2641
  }, "strip", z.ZodTypeAny, {
2642
2642
  connectedAccountId: string;
2643
2643
  id: string;
2644
+ state: Record<string, unknown>;
2644
2645
  updatedAt: string;
2645
2646
  disabledAt: string | null;
2646
- state: Record<string, unknown>;
2647
2647
  triggerConfig: Record<string, unknown>;
2648
2648
  triggerName: string;
2649
2649
  uuid?: string | undefined;
@@ -2651,9 +2651,9 @@ declare const TriggerInstanceListActiveResponseSchema: z.ZodObject<{
2651
2651
  }, {
2652
2652
  connectedAccountId: string;
2653
2653
  id: string;
2654
+ state: Record<string, unknown>;
2654
2655
  updatedAt: string;
2655
2656
  disabledAt: string | null;
2656
- state: Record<string, unknown>;
2657
2657
  triggerConfig: Record<string, unknown>;
2658
2658
  triggerName: string;
2659
2659
  uuid?: string | undefined;
@@ -2665,9 +2665,9 @@ declare const TriggerInstanceListActiveResponseSchema: z.ZodObject<{
2665
2665
  items: {
2666
2666
  connectedAccountId: string;
2667
2667
  id: string;
2668
+ state: Record<string, unknown>;
2668
2669
  updatedAt: string;
2669
2670
  disabledAt: string | null;
2670
- state: Record<string, unknown>;
2671
2671
  triggerConfig: Record<string, unknown>;
2672
2672
  triggerName: string;
2673
2673
  uuid?: string | undefined;
@@ -2679,9 +2679,9 @@ declare const TriggerInstanceListActiveResponseSchema: z.ZodObject<{
2679
2679
  items: {
2680
2680
  connectedAccountId: string;
2681
2681
  id: string;
2682
+ state: Record<string, unknown>;
2682
2683
  updatedAt: string;
2683
2684
  disabledAt: string | null;
2684
- state: Record<string, unknown>;
2685
2685
  triggerConfig: Record<string, unknown>;
2686
2686
  triggerName: string;
2687
2687
  uuid?: string | undefined;
@@ -4022,6 +4022,30 @@ declare class ConnectedAccounts {
4022
4022
  * ```
4023
4023
  */
4024
4024
  disable(nanoid: string): Promise<ConnectedAccountUpdateStatusResponse>;
4025
+ /**
4026
+ * Update a connected account's alias and/or credentials.
4027
+ *
4028
+ * @param {string} nanoid - The unique identifier of the connected account
4029
+ * @param {UpdateConnectedAccountParams} params - The update parameters
4030
+ * @returns {Promise<ConnectedAccountPatchResponse>} The update response
4031
+ *
4032
+ * @example
4033
+ * ```typescript
4034
+ * // Set an alias
4035
+ * await composio.connectedAccounts.update('ca_abc123', { alias: 'work-gmail' });
4036
+ *
4037
+ * // Update credentials
4038
+ * await composio.connectedAccounts.update('ca_abc123', {
4039
+ * connection: {
4040
+ * state: {
4041
+ * authScheme: 'BEARER_TOKEN',
4042
+ * val: { token: 'new-access-token' },
4043
+ * },
4044
+ * },
4045
+ * });
4046
+ * ```
4047
+ */
4048
+ update(nanoid: string, params: UpdateConnectedAccountParams): Promise<ConnectedAccountPatchResponse>;
4025
4049
  }
4026
4050
  //#endregion
4027
4051
  //#region src/types/mcp.experimental.types.d.ts
@@ -1,5 +1,6 @@
1
- import { $t as ConnectionData, G as BaseComposioProvider, L as SessionMetaToolOptions, d as ToolExecuteResponse$1, en as ConnectionDataSchema, o as Tool, v as ToolProxyParams } from "./tool.types-BWc7GUrD.cjs";
1
+ import { $t as ConnectionData, G as BaseComposioProvider, L as SessionMetaToolOptions, en as ConnectionDataSchema, o as Tool, v as ToolProxyParams } from "./tool.types-BWc7GUrD.cjs";
2
2
  import z$1, { z } from "zod/v3";
3
+ import { ConnectedAccountPatchParams as UpdateConnectedAccountParams } from "@composio/client/resources/connected-accounts";
3
4
  import { Composio } from "@composio/client";
4
5
  import { ToolExecuteResponse } from "@composio/client/resources/tools";
5
6
  import { SessionCreateParams, SessionCreateResponse } from "@composio/client/resources/tool-router/session/session.mjs";
@@ -68,12 +69,14 @@ declare const DefaultCreateConnectedAccountParamsSchema: z.ZodType<{
68
69
  data?: Record<string, unknown>;
69
70
  callback_url?: string;
70
71
  user_id?: string;
72
+ alias?: string;
71
73
  };
72
74
  }>;
73
75
  declare const CreateConnectedAccountOptionsSchema: z.ZodType<{
74
76
  allowMultiple?: boolean;
75
77
  callbackUrl?: string;
76
78
  config?: z.infer<typeof ConnectionDataSchema>;
79
+ alias?: string;
77
80
  }>;
78
81
  type CreateConnectedAccountOptions = z.infer<typeof CreateConnectedAccountOptionsSchema>;
79
82
  type CreateConnectedAccountParams = z.infer<typeof CreateConnectedAccountParamsSchema>;
@@ -115,6 +118,8 @@ type ConnectedAccountAuthConfig = z.infer<typeof ConnectedAccountAuthConfigSchem
115
118
  declare const ConnectedAccountRetrieveResponseSchema: z.ZodType<{
116
119
  id: string;
117
120
  authConfig: z.infer<typeof ConnectedAccountAuthConfigSchema>;
121
+ wordId?: string | null;
122
+ alias?: string | null;
118
123
  /** @deprecated use connectedAccount.state instead */
119
124
  data?: Record<string, unknown>;
120
125
  /** @deprecated use connectedAccount.state instead */
@@ -165,6 +170,8 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
165
170
  items: z.ZodArray<z.ZodType<{
166
171
  id: string;
167
172
  authConfig: z.infer<typeof ConnectedAccountAuthConfigSchema>;
173
+ wordId?: string | null;
174
+ alias?: string | null;
168
175
  /** @deprecated use connectedAccount.state instead */
169
176
  data?: Record<string, unknown>;
170
177
  /** @deprecated use connectedAccount.state instead */
@@ -182,6 +189,8 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
182
189
  }, z.ZodTypeDef, {
183
190
  id: string;
184
191
  authConfig: z.infer<typeof ConnectedAccountAuthConfigSchema>;
192
+ wordId?: string | null;
193
+ alias?: string | null;
185
194
  /** @deprecated use connectedAccount.state instead */
186
195
  data?: Record<string, unknown>;
187
196
  /** @deprecated use connectedAccount.state instead */
@@ -203,6 +212,8 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
203
212
  items: {
204
213
  id: string;
205
214
  authConfig: z.infer<typeof ConnectedAccountAuthConfigSchema>;
215
+ wordId?: string | null;
216
+ alias?: string | null;
206
217
  /** @deprecated use connectedAccount.state instead */
207
218
  data?: Record<string, unknown>;
208
219
  /** @deprecated use connectedAccount.state instead */
@@ -224,6 +235,8 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
224
235
  items: {
225
236
  id: string;
226
237
  authConfig: z.infer<typeof ConnectedAccountAuthConfigSchema>;
238
+ wordId?: string | null;
239
+ alias?: string | null;
227
240
  /** @deprecated use connectedAccount.state instead */
228
241
  data?: Record<string, unknown>;
229
242
  /** @deprecated use connectedAccount.state instead */
@@ -254,10 +267,16 @@ declare const CreateConnectedAccountLinkOptionsSchema: z.ZodObject<{
254
267
  *
255
268
  */
256
269
  callbackUrl: z.ZodOptional<z.ZodString>;
270
+ /**
271
+ * Human-readable alias for the connected account. Must be unique per userId and toolkit within the project.
272
+ */
273
+ alias: z.ZodOptional<z.ZodString>;
257
274
  }, "strip", z.ZodTypeAny, {
258
275
  callbackUrl?: string | undefined;
276
+ alias?: string | undefined;
259
277
  }, {
260
278
  callbackUrl?: string | undefined;
279
+ alias?: string | undefined;
261
280
  }>;
262
281
  type CreateConnectedAccountLinkOptions = z.infer<typeof CreateConnectedAccountLinkOptionsSchema>;
263
282
  declare const CreateConnectedAccountLinkResponseSchema: z.ZodObject<{
@@ -279,6 +298,47 @@ declare const ConnectedAccountRefreshOptionsSchema: z.ZodObject<{
279
298
  validateCredentials?: boolean | undefined;
280
299
  }>;
281
300
  type ConnectedAccountRefreshOptions = z.infer<typeof ConnectedAccountRefreshOptionsSchema>;
301
+ declare const UpdateConnectedAccountParamsSchema: z.ZodObject<{
302
+ alias: z.ZodOptional<z.ZodString>;
303
+ connection: z.ZodOptional<z.ZodObject<{
304
+ state: z.ZodObject<{
305
+ authScheme: z.ZodEnum<["BEARER_TOKEN", "API_KEY", "BASIC", "BASIC_WITH_JWT", "GOOGLE_SERVICE_ACCOUNT", "SERVICE_ACCOUNT"]>;
306
+ val: z.ZodRecord<z.ZodString, z.ZodUnknown>;
307
+ }, "strip", z.ZodTypeAny, {
308
+ authScheme: "API_KEY" | "BASIC" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "SERVICE_ACCOUNT";
309
+ val: Record<string, unknown>;
310
+ }, {
311
+ authScheme: "API_KEY" | "BASIC" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "SERVICE_ACCOUNT";
312
+ val: Record<string, unknown>;
313
+ }>;
314
+ }, "strip", z.ZodTypeAny, {
315
+ state: {
316
+ authScheme: "API_KEY" | "BASIC" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "SERVICE_ACCOUNT";
317
+ val: Record<string, unknown>;
318
+ };
319
+ }, {
320
+ state: {
321
+ authScheme: "API_KEY" | "BASIC" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "SERVICE_ACCOUNT";
322
+ val: Record<string, unknown>;
323
+ };
324
+ }>>;
325
+ }, "strip", z.ZodTypeAny, {
326
+ connection?: {
327
+ state: {
328
+ authScheme: "API_KEY" | "BASIC" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "SERVICE_ACCOUNT";
329
+ val: Record<string, unknown>;
330
+ };
331
+ } | undefined;
332
+ alias?: string | undefined;
333
+ }, {
334
+ connection?: {
335
+ state: {
336
+ authScheme: "API_KEY" | "BASIC" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "SERVICE_ACCOUNT";
337
+ val: Record<string, unknown>;
338
+ };
339
+ } | undefined;
340
+ alias?: string | undefined;
341
+ }>;
282
342
  //#endregion
283
343
  //#region src/types/connectionRequest.types.d.ts
284
344
  interface ConnectionRequestState {
@@ -883,6 +943,19 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodObject<{
883
943
  enableProxyExecution?: boolean | undefined;
884
944
  autoOffloadThreshold?: number | undefined;
885
945
  }>>>;
946
+ multiAccount: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodObject<{
947
+ enable: z$1.ZodDefault<z$1.ZodBoolean>;
948
+ maxAccountsPerToolkit: z$1.ZodOptional<z$1.ZodNumber>;
949
+ requireExplicitSelection: z$1.ZodOptional<z$1.ZodBoolean>;
950
+ }, "strip", z$1.ZodTypeAny, {
951
+ enable: boolean;
952
+ maxAccountsPerToolkit?: number | undefined;
953
+ requireExplicitSelection?: boolean | undefined;
954
+ }, {
955
+ enable?: boolean | undefined;
956
+ maxAccountsPerToolkit?: number | undefined;
957
+ requireExplicitSelection?: boolean | undefined;
958
+ }>>>;
886
959
  experimental: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodObject<{
887
960
  assistivePrompt: z$1.ZodOptional<z$1.ZodObject<{
888
961
  userTimezone: z$1.ZodOptional<z$1.ZodString>;
@@ -938,6 +1011,11 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodObject<{
938
1011
  enableProxyExecution?: boolean | undefined;
939
1012
  autoOffloadThreshold?: number | undefined;
940
1013
  } | undefined;
1014
+ multiAccount?: {
1015
+ enable: boolean;
1016
+ maxAccountsPerToolkit?: number | undefined;
1017
+ requireExplicitSelection?: boolean | undefined;
1018
+ } | undefined;
941
1019
  experimental?: {
942
1020
  assistivePrompt?: {
943
1021
  userTimezone?: string | undefined;
@@ -977,6 +1055,11 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodObject<{
977
1055
  enableProxyExecution?: boolean | undefined;
978
1056
  autoOffloadThreshold?: number | undefined;
979
1057
  } | undefined;
1058
+ multiAccount?: {
1059
+ enable?: boolean | undefined;
1060
+ maxAccountsPerToolkit?: number | undefined;
1061
+ requireExplicitSelection?: boolean | undefined;
1062
+ } | undefined;
980
1063
  experimental?: {
981
1064
  assistivePrompt?: {
982
1065
  userTimezone?: string | undefined;
@@ -1000,6 +1083,10 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodObject<{
1000
1083
  * @param {boolean} [workbench.enable] - Whether to enable the workbench entirely. Defaults to true. When false, no code execution tools are available.
1001
1084
  * @param {boolean} [workbench.enableProxyExecution] - Whether to enable proxy execution
1002
1085
  * @param {number} [workbench.autoOffloadThreshold] - Auto offload threshold in characters for moving execution to workbench
1086
+ * @param {object} [multiAccount] - Multi-account configuration for this session
1087
+ * @param {boolean} [multiAccount.enable] - When true, enables multi-account mode. Falls back to org/project-level config when not set.
1088
+ * @param {number} [multiAccount.maxAccountsPerToolkit] - Max connected accounts per toolkit (2-10, default 5)
1089
+ * @param {boolean} [multiAccount.requireExplicitSelection] - When true, require explicit account selection when multiple accounts are connected
1003
1090
  */
1004
1091
  type ToolRouterCreateSessionConfig = z$1.infer<typeof ToolRouterCreateSessionConfigSchema>;
1005
1092
  declare const ToolkitConnectionStateSchema: z$1.ZodObject<{
@@ -1341,20 +1428,20 @@ declare const ToolRouterSessionSearchResponseSchema: z$1.ZodObject<{
1341
1428
  }, {
1342
1429
  toolSlugs: string[];
1343
1430
  }>;
1344
- message: z$1.ZodString;
1431
+ message: z$1.ZodOptional<z$1.ZodString>;
1345
1432
  tool: z$1.ZodLiteral<"COMPOSIO_GET_TOOL_SCHEMAS">;
1346
1433
  }, "strip", z$1.ZodTypeAny, {
1347
- message: string;
1348
1434
  args: {
1349
1435
  toolSlugs: string[];
1350
1436
  };
1351
1437
  tool: "COMPOSIO_GET_TOOL_SCHEMAS";
1438
+ message?: string | undefined;
1352
1439
  }, {
1353
- message: string;
1354
1440
  args: {
1355
1441
  toolSlugs: string[];
1356
1442
  };
1357
1443
  tool: "COMPOSIO_GET_TOOL_SCHEMAS";
1444
+ message?: string | undefined;
1358
1445
  }>>;
1359
1446
  }, "strip", z$1.ZodTypeAny, {
1360
1447
  toolkit: string;
@@ -1364,11 +1451,11 @@ declare const ToolRouterSessionSearchResponseSchema: z$1.ZodObject<{
1364
1451
  inputSchema?: Record<string, unknown> | undefined;
1365
1452
  outputSchema?: Record<string, unknown> | undefined;
1366
1453
  schemaRef?: {
1367
- message: string;
1368
1454
  args: {
1369
1455
  toolSlugs: string[];
1370
1456
  };
1371
1457
  tool: "COMPOSIO_GET_TOOL_SCHEMAS";
1458
+ message?: string | undefined;
1372
1459
  } | undefined;
1373
1460
  }, {
1374
1461
  toolkit: string;
@@ -1378,11 +1465,11 @@ declare const ToolRouterSessionSearchResponseSchema: z$1.ZodObject<{
1378
1465
  inputSchema?: Record<string, unknown> | undefined;
1379
1466
  outputSchema?: Record<string, unknown> | undefined;
1380
1467
  schemaRef?: {
1381
- message: string;
1382
1468
  args: {
1383
1469
  toolSlugs: string[];
1384
1470
  };
1385
1471
  tool: "COMPOSIO_GET_TOOL_SCHEMAS";
1472
+ message?: string | undefined;
1386
1473
  } | undefined;
1387
1474
  }>>;
1388
1475
  toolkitConnectionStatuses: z$1.ZodArray<z$1.ZodObject<{
@@ -1463,11 +1550,11 @@ declare const ToolRouterSessionSearchResponseSchema: z$1.ZodObject<{
1463
1550
  inputSchema?: Record<string, unknown> | undefined;
1464
1551
  outputSchema?: Record<string, unknown> | undefined;
1465
1552
  schemaRef?: {
1466
- message: string;
1467
1553
  args: {
1468
1554
  toolSlugs: string[];
1469
1555
  };
1470
1556
  tool: "COMPOSIO_GET_TOOL_SCHEMAS";
1557
+ message?: string | undefined;
1471
1558
  } | undefined;
1472
1559
  }>;
1473
1560
  toolkitConnectionStatuses: {
@@ -1518,11 +1605,11 @@ declare const ToolRouterSessionSearchResponseSchema: z$1.ZodObject<{
1518
1605
  inputSchema?: Record<string, unknown> | undefined;
1519
1606
  outputSchema?: Record<string, unknown> | undefined;
1520
1607
  schemaRef?: {
1521
- message: string;
1522
1608
  args: {
1523
1609
  toolSlugs: string[];
1524
1610
  };
1525
1611
  tool: "COMPOSIO_GET_TOOL_SCHEMAS";
1612
+ message?: string | undefined;
1526
1613
  } | undefined;
1527
1614
  }>;
1528
1615
  toolkitConnectionStatuses: {
@@ -1709,8 +1796,8 @@ interface ExecuteMetadata {
1709
1796
  interface SessionContext {
1710
1797
  /** The user ID for this session */
1711
1798
  readonly userId: string;
1712
- /** Execute any Composio native tool from within a custom tool */
1713
- execute(toolSlug: string, arguments_: Record<string, unknown>): Promise<ToolExecuteResponse$1>;
1799
+ /** Execute any Composio native tool from within a custom tool. Returns the same shape as session.execute(). */
1800
+ execute(toolSlug: string, arguments_: Record<string, unknown>): Promise<ToolRouterSessionExecuteResponse>;
1714
1801
  /** Proxy API calls through Composio's auth layer (resolved from session toolkit). */
1715
1802
  proxyExecute(params: SessionProxyExecuteParams): Promise<ToolRouterSessionProxyExecuteResponse>;
1716
1803
  }
@@ -1857,4 +1944,4 @@ type CustomToolResponse = SessionCreateResponse.Experimental.CustomTool;
1857
1944
  /** Custom toolkit as returned in the session create response (has prefixed slugs + original_slugs). */
1858
1945
  type CustomToolkitResponse = SessionCreateResponse.Experimental.CustomToolkit;
1859
1946
  //#endregion
1860
- export { ToolRouterToolkitsFn as $, ToolRouterAuthorizeFn as A, ConnectedAccountListParamsSchema as At, ToolRouterManageConnectionsConfigSchema as B, ConnectedAccountStatusSchema as Bt, SessionContext as C, ToolRouterSessionFilesMountUploadOptions as Ct, SessionExperimental as D, ConnectedAccountAuthConfig as Dt, Session as E, ConnectionRequestState as Et, ToolRouterConfigToolsSchema as F, ConnectedAccountRefreshOptionsSchema as Ft, ToolRouterSessionProxyExecuteResponse as G, CreateConnectedAccountLinkResponseSchema as Gt, ToolRouterSessionExecuteResponse as H, CreateConnectedAccountLinkOptions as Ht, ToolRouterCreateSessionConfig as I, ConnectedAccountRetrieveResponse as It, ToolRouterSessionSearchResponseSchema as J, CreateConnectedAccountParams as Jt, ToolRouterSessionSearchFn as K, CreateConnectedAccountOptions as Kt, ToolRouterCreateSessionConfigSchema as L, ConnectedAccountRetrieveResponseSchema as Lt, ToolRouterConfigTags as M, ConnectedAccountListResponseItem as Mt, ToolRouterConfigTagsSchema as N, ConnectedAccountListResponseSchema as Nt, SessionProxyExecuteParams as O, ConnectedAccountAuthConfigSchema as Ot, ToolRouterConfigTools as P, ConnectedAccountRefreshOptions as Pt, ToolRouterToolkitsEnabledConfigSchema as Q, DefaultCreateConnectedAccountParamsSchema as Qt, ToolRouterMCPServerConfig as R, ConnectedAccountStatus as Rt, RegisteredCustomToolkit as S, ToolRouterSessionFilesMountListOptionsSchema as St, MCPServerTypeSchema as T, ConnectionRequest as Tt, ToolRouterSessionExecuteResponseSchema as U, CreateConnectedAccountLinkOptionsSchema as Ut, ToolRouterSessionExecuteFn as V, ConnectedAccountStatuses as Vt, ToolRouterSessionProxyExecuteFn as W, CreateConnectedAccountLinkResponse as Wt, ToolRouterTagsParamSchema as X, CreateConnectedAccountResponse as Xt, ToolRouterTagsEnableDisableSchema as Y, CreateConnectedAccountParamsSchema as Yt, ToolRouterToolkitsDisabledConfigSchema as Z, CreateConnectedAccountResponseSchema as Zt, CustomToolsMap as _, ToolRouterSessionFilesMountDeleteOptions as _t, CustomTool as a, ToolRouterToolsParamSchema as at, InputParamsSchema as b, ToolRouterSessionFilesMountDownloadOptionsSchema as bt, CustomToolInputParameter as c, ToolkitConnectionsDetails as ct, CustomToolRegistryItem as d, FileDeleteResponse as dt, ToolRouterToolkitsOptions as et, CustomToolResponse as f, FileDeleteResponseSchema as ft, CustomToolkitResponse as g, RemoteFileDataSchema as gt, CustomToolkitDefinition as h, RemoteFileData as ht, CreateCustomToolkitParams as i, ToolRouterToolsParam as it, ToolRouterConfigManageConnectionsSchema as j, ConnectedAccountListResponse as jt, SessionProxyExecuteParamsSchema as k, ConnectedAccountListParams as kt, CustomToolOptions as l, ToolkitConnectionsDetailsSchema as lt, CustomToolkit as m, FileListResponseSchema as mt, CreateCustomToolParams as n, ToolRouterToolkitsParamSchema as nt, CustomToolDefinition as o, ToolkitConnectionState as ot, CustomToolSlugSchema as p, FileListResponse as pt, ToolRouterSessionSearchResponse as q, CreateConnectedAccountOptionsSchema as qt, CreateCustomToolkitBaseSchema as r, ToolRouterToolsFn as rt, CustomToolExecuteFn as s, ToolkitConnectionStateSchema as st, CreateCustomToolBaseSchema as t, ToolRouterToolkitsOptionsSchema as tt, CustomToolRegistry as u, RemoteFile as ut, CustomToolsMapEntry as v, ToolRouterSessionFilesMountDeleteOptionsSchema as vt, MCPServerType as w, ToolRouterSessionFilesMountUploadOptionsSchema as wt, RegisteredCustomTool as x, ToolRouterSessionFilesMountListOptions as xt, ExecuteMetadata as y, ToolRouterSessionFilesMountDownloadOptions as yt, ToolRouterMCPServerConfigSchema as z, ConnectedAccountStatusEnum as zt };
1947
+ export { ToolRouterToolkitsFn as $, UpdateConnectedAccountParams as $t, ToolRouterAuthorizeFn as A, ConnectedAccountListParamsSchema as At, ToolRouterManageConnectionsConfigSchema as B, ConnectedAccountStatusSchema as Bt, SessionContext as C, ToolRouterSessionFilesMountUploadOptions as Ct, SessionExperimental as D, ConnectedAccountAuthConfig as Dt, Session as E, ConnectionRequestState as Et, ToolRouterConfigToolsSchema as F, ConnectedAccountRefreshOptionsSchema as Ft, ToolRouterSessionProxyExecuteResponse as G, CreateConnectedAccountLinkResponseSchema as Gt, ToolRouterSessionExecuteResponse as H, CreateConnectedAccountLinkOptions as Ht, ToolRouterCreateSessionConfig as I, ConnectedAccountRetrieveResponse as It, ToolRouterSessionSearchResponseSchema as J, CreateConnectedAccountParams as Jt, ToolRouterSessionSearchFn as K, CreateConnectedAccountOptions as Kt, ToolRouterCreateSessionConfigSchema as L, ConnectedAccountRetrieveResponseSchema as Lt, ToolRouterConfigTags as M, ConnectedAccountListResponseItem as Mt, ToolRouterConfigTagsSchema as N, ConnectedAccountListResponseSchema as Nt, SessionProxyExecuteParams as O, ConnectedAccountAuthConfigSchema as Ot, ToolRouterConfigTools as P, ConnectedAccountRefreshOptions as Pt, ToolRouterToolkitsEnabledConfigSchema as Q, DefaultCreateConnectedAccountParamsSchema as Qt, ToolRouterMCPServerConfig as R, ConnectedAccountStatus as Rt, RegisteredCustomToolkit as S, ToolRouterSessionFilesMountListOptionsSchema as St, MCPServerTypeSchema as T, ConnectionRequest as Tt, ToolRouterSessionExecuteResponseSchema as U, CreateConnectedAccountLinkOptionsSchema as Ut, ToolRouterSessionExecuteFn as V, ConnectedAccountStatuses as Vt, ToolRouterSessionProxyExecuteFn as W, CreateConnectedAccountLinkResponse as Wt, ToolRouterTagsParamSchema as X, CreateConnectedAccountResponse as Xt, ToolRouterTagsEnableDisableSchema as Y, CreateConnectedAccountParamsSchema as Yt, ToolRouterToolkitsDisabledConfigSchema as Z, CreateConnectedAccountResponseSchema as Zt, CustomToolsMap as _, ToolRouterSessionFilesMountDeleteOptions as _t, CustomTool as a, ToolRouterToolsParamSchema as at, InputParamsSchema as b, ToolRouterSessionFilesMountDownloadOptionsSchema as bt, CustomToolInputParameter as c, ToolkitConnectionsDetails as ct, CustomToolRegistryItem as d, FileDeleteResponse as dt, UpdateConnectedAccountParamsSchema as en, ToolRouterToolkitsOptions as et, CustomToolResponse as f, FileDeleteResponseSchema as ft, CustomToolkitResponse as g, RemoteFileDataSchema as gt, CustomToolkitDefinition as h, RemoteFileData as ht, CreateCustomToolkitParams as i, ToolRouterToolsParam as it, ToolRouterConfigManageConnectionsSchema as j, ConnectedAccountListResponse as jt, SessionProxyExecuteParamsSchema as k, ConnectedAccountListParams as kt, CustomToolOptions as l, ToolkitConnectionsDetailsSchema as lt, CustomToolkit as m, FileListResponseSchema as mt, CreateCustomToolParams as n, ToolRouterToolkitsParamSchema as nt, CustomToolDefinition as o, ToolkitConnectionState as ot, CustomToolSlugSchema as p, FileListResponse as pt, ToolRouterSessionSearchResponse as q, CreateConnectedAccountOptionsSchema as qt, CreateCustomToolkitBaseSchema as r, ToolRouterToolsFn as rt, CustomToolExecuteFn as s, ToolkitConnectionStateSchema as st, CreateCustomToolBaseSchema as t, ToolRouterToolkitsOptionsSchema as tt, CustomToolRegistry as u, RemoteFile as ut, CustomToolsMapEntry as v, ToolRouterSessionFilesMountDeleteOptionsSchema as vt, MCPServerType as w, ToolRouterSessionFilesMountUploadOptionsSchema as wt, RegisteredCustomTool as x, ToolRouterSessionFilesMountListOptions as xt, ExecuteMetadata as y, ToolRouterSessionFilesMountDownloadOptions as yt, ToolRouterMCPServerConfigSchema as z, ConnectedAccountStatusEnum as zt };