@composio/core 0.30.0 → 0.31.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/index.mjs CHANGED
@@ -85,17 +85,29 @@ const CreateComposioManagedAuthConfigParamsSchema = z$1.object({
85
85
  user_scopes: z$1.union([z$1.string(), z$1.array(z$1.string())]).optional()
86
86
  }).passthrough().optional(),
87
87
  toolAccessConfig: AuthConfigCreationToolAccessConfigSchema.optional(),
88
- isEnabledForToolRouter: z$1.boolean().optional()
88
+ isEnabledForToolRouter: z$1.boolean().optional(),
89
+ /**
90
+ * The Composio-managed app to use, as `composioManagedAuth[].managedAppId`
91
+ * from `composio.toolkits.get(slug)`. Omit to use the toolkit's default app.
92
+ */
93
+ managedAppId: z$1.string().optional()
89
94
  });
90
95
  /**
91
96
  * Discriminated union of all possible auth config types.
92
97
  */
93
98
  const CreateAuthConfigParamsSchema = z$1.discriminatedUnion("type", [CreateCustomAuthConfigParamsSchema, CreateComposioManagedAuthConfigParamsSchema]);
99
+ /**
100
+ * The Composio-managed app an auth config uses, as
101
+ * `composioManagedAuth[].managedAppId` from `composio.toolkits.get(slug)`.
102
+ * `null` when the auth config is not linked to a managed app.
103
+ */
104
+ const AuthConfigManagedAppIdSchema = z$1.string().nullable();
94
105
  const CreateAuthConfigResponseSchema = z$1.object({
95
106
  id: z$1.string(),
96
107
  authScheme: z$1.string(),
97
108
  isComposioManaged: z$1.boolean(),
98
- toolkit: z$1.string()
109
+ toolkit: z$1.string(),
110
+ managedAppId: AuthConfigManagedAppIdSchema
99
111
  });
100
112
  const AuthConfigRetrieveResponseSchema = z$1.object({
101
113
  id: z$1.string(),
@@ -118,7 +130,8 @@ const AuthConfigRetrieveResponseSchema = z$1.object({
118
130
  createdBy: z$1.string().optional(),
119
131
  createdAt: z$1.string().optional(),
120
132
  lastUpdatedAt: z$1.string().optional(),
121
- toolAccessConfig: AuthConfigToolAccessConfigSchema.optional()
133
+ toolAccessConfig: AuthConfigToolAccessConfigSchema.optional(),
134
+ managedAppId: AuthConfigManagedAppIdSchema
122
135
  });
123
136
  const AuthConfigListParamsSchema = z$1.object({
124
137
  cursor: z$1.string().optional(),
@@ -1864,7 +1877,7 @@ var Tools = class {
1864
1877
  * );
1865
1878
  *
1866
1879
  * // Access tool properties
1867
- * const githubTool = await composio.tools.getRawComposioToolBySlug('GITHUB_CREATE_ISSUE');
1880
+ * const githubTool = await composio.tools.getRawComposioToolBySlug('GITHUB_CREATE_AN_ISSUE');
1868
1881
  * console.log({
1869
1882
  * slug: githubTool.slug,
1870
1883
  * name: githubTool.name,
@@ -2270,7 +2283,7 @@ var Tools = class {
2270
2283
  *
2271
2284
  * @example
2272
2285
  * ```typescript
2273
- * const { arguments: args, error } = await composio.tools.getInput('GITHUB_CREATE_ISSUE', {
2286
+ * const { arguments: args, error } = await composio.tools.getInput('GITHUB_CREATE_AN_ISSUE', {
2274
2287
  * text: 'Open an issue in composiohq/composio titled "Docs typo" describing the broken link',
2275
2288
  * version: '20250909_00',
2276
2289
  * });
@@ -2450,12 +2463,28 @@ const ToolkitAuthConfigDetailsSchema = z$1.object({
2450
2463
  }),
2451
2464
  proxy: z$1.object({ baseUrl: z$1.string().optional() }).optional()
2452
2465
  });
2466
+ const ToolkitManagedAuthScopesSchema = z$1.object({ available: z$1.array(z$1.string()) });
2467
+ /**
2468
+ * A Composio-managed app for a toolkit. Pass `managedAppId` to
2469
+ * `composio.authConfigs.create` to create an auth config on this app.
2470
+ */
2471
+ const ToolkitComposioManagedAuthSchema = z$1.object({
2472
+ managedAppId: z$1.string(),
2473
+ /** Whether this is the app used when `managedAppId` is omitted. */
2474
+ isDefault: z$1.boolean(),
2475
+ mode: z$1.string(),
2476
+ scopes: ToolkitManagedAuthScopesSchema,
2477
+ /** Present only for Slack. */
2478
+ userScopes: ToolkitManagedAuthScopesSchema.optional()
2479
+ });
2453
2480
  const ToolkitRetrieveResponseSchema = z$1.object({
2454
2481
  name: z$1.string(),
2455
2482
  slug: z$1.string(),
2456
2483
  meta: ToolKitMetaSchema,
2457
2484
  isLocalToolkit: z$1.boolean(),
2458
2485
  composioManagedAuthSchemes: z$1.array(z$1.string()).optional(),
2486
+ /** One entry per Composio-managed app, the default first. */
2487
+ composioManagedAuth: z$1.array(ToolkitComposioManagedAuthSchema).optional(),
2459
2488
  authConfigDetails: z$1.array(ToolkitAuthConfigDetailsSchema).optional(),
2460
2489
  baseUrl: z$1.string().optional(),
2461
2490
  getCurrentUserEndpoint: z$1.string().optional(),
@@ -2601,7 +2630,7 @@ function transform(raw) {
2601
2630
  * This method converts property names from snake_case to camelCase and reorganizes
2602
2631
  * the data structure to match the SDK's standardized format for auth configurations.
2603
2632
  *
2604
- * @param {RawAuthConfigRetrieveResponse} authConfig - The raw API response to transform
2633
+ * @param {RawAuthConfig} authConfig - The raw retrieve response or list item to transform
2605
2634
  * @returns {AuthConfigRetrieveResponse} The transformed auth config data
2606
2635
  *
2607
2636
  * @private
@@ -2628,7 +2657,8 @@ function transformAuthConfigRetrieveResponse(authConfig) {
2628
2657
  toolAccessConfig: authConfig.tool_access_config ? {
2629
2658
  toolsAvailableForExecution: authConfig.tool_access_config.tools_available_for_execution,
2630
2659
  toolsForConnectedAccountCreation: authConfig.tool_access_config.tools_for_connected_account_creation
2631
- } : void 0
2660
+ } : void 0,
2661
+ managedAppId: authConfig.managed_app_id
2632
2662
  }));
2633
2663
  }
2634
2664
  /**
@@ -2665,7 +2695,8 @@ function transformCreateAuthConfigResponse(response) {
2665
2695
  id: response.auth_config.id,
2666
2696
  authScheme: response.auth_config.auth_scheme,
2667
2697
  isComposioManaged: response.auth_config.is_composio_managed,
2668
- toolkit: response.toolkit.slug
2698
+ toolkit: response.toolkit.slug,
2699
+ managedAppId: response.auth_config.managed_app_id
2669
2700
  }));
2670
2701
  }
2671
2702
 
@@ -2734,6 +2765,14 @@ var AuthConfigs = class {
2734
2765
  * @returns {Promise<CreateAuthConfigResponse>} Created auth config
2735
2766
  *
2736
2767
  * @example
2768
+ * // Use a specific Composio-managed app; omit managedAppId for the toolkit's default
2769
+ * const { composioManagedAuth } = await composio.toolkits.get('slack');
2770
+ * const slackAuthConfig = await authConfigs.create('slack', {
2771
+ * type: AuthConfigTypes.COMPOSIO_MANAGED,
2772
+ * managedAppId: composioManagedAuth?.find(app => !app.isDefault)?.managedAppId,
2773
+ * });
2774
+ *
2775
+ * @example
2737
2776
  * const authConfig = await authConfigs.create('my-toolkit', {
2738
2777
  * type: AuthConfigTypes.CUSTOM,
2739
2778
  * name: 'My Custom Auth Config',
@@ -2766,7 +2805,8 @@ var AuthConfigs = class {
2766
2805
  credentials: parsedOptions.data.credentials,
2767
2806
  name: parsedOptions.data.name,
2768
2807
  is_enabled_for_tool_router: parsedOptions.data.isEnabledForToolRouter,
2769
- tool_access_config: parsedOptions.data.toolAccessConfig ? { tools_for_connected_account_creation: parsedOptions.data.toolAccessConfig.toolsForConnectedAccountCreation } : void 0
2808
+ tool_access_config: parsedOptions.data.toolAccessConfig ? { tools_for_connected_account_creation: parsedOptions.data.toolAccessConfig.toolsForConnectedAccountCreation } : void 0,
2809
+ managed_app_id: parsedOptions.data.managedAppId
2770
2810
  }
2771
2811
  };
2772
2812
  const result = await withCancellation(() => this.client.authConfigs.create(createBody, requestOptions), requestOptions?.signal);
@@ -4738,6 +4778,13 @@ const transformToolkitRetrieveResponse = (response) => {
4738
4778
  },
4739
4779
  isLocalToolkit: response.is_local_toolkit,
4740
4780
  composioManagedAuthSchemes: response.composio_managed_auth_schemes,
4781
+ composioManagedAuth: response.composio_managed_auth?.map((app) => ({
4782
+ managedAppId: app.managed_app_id,
4783
+ isDefault: app.is_default,
4784
+ mode: app.mode,
4785
+ scopes: app.scopes,
4786
+ ...app.user_scopes != null && { userScopes: app.user_scopes }
4787
+ })),
4741
4788
  authConfigDetails: response.auth_config_details?.map((authConfig) => ({
4742
4789
  name: authConfig.name,
4743
4790
  mode: authConfig.mode,
@@ -7664,7 +7711,7 @@ var MCP = class {
7664
7711
  * const server = await composio.experimental.mcp.get("mcp_12345");
7665
7712
  *
7666
7713
  * console.log(server.name); // "My Personal MCP Server"
7667
- * console.log(server.allowedTools); // ["GITHUB_CREATE_ISSUE", "SLACK_SEND_MESSAGE"]
7714
+ * console.log(server.allowedTools); // ["GITHUB_CREATE_AN_ISSUE", "SLACK_SEND_MESSAGE"]
7668
7715
  * console.log(server.toolkits); // ["github", "slack"]
7669
7716
  * console.log(server.serverInstanceCount); // 3
7670
7717
  *
@@ -7746,7 +7793,7 @@ var MCP = class {
7746
7793
  * {
7747
7794
  * toolkit: "github",
7748
7795
  * authConfigId: "auth_abc123",
7749
- * allowedTools: ["GITHUB_CREATE_ISSUE", "GITHUB_LIST_REPOS"]
7796
+ * allowedTools: ["GITHUB_CREATE_AN_ISSUE", "GITHUB_LIST_REPOS"]
7750
7797
  * },
7751
7798
  * {
7752
7799
  * toolkit: "slack",
@@ -9238,7 +9285,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
9238
9285
  };
9239
9286
 
9240
9287
  // package.json
9241
- var version = "0.30.0";
9288
+ var version = "0.31.0";
9242
9289
 
9243
9290
  // src/utils/session.ts
9244
9291
  /**
@@ -12707,4 +12754,4 @@ const ComposioMcpUpdateResponseSchema = z$1.object({
12707
12754
  tools: z$1.array(z$1.string()).optional()
12708
12755
  });
12709
12756
 
12710
- export { AuthConfigCreationToolAccessConfigSchema, AuthConfigErrorCodes, AuthConfigListParamsSchema, AuthConfigListResponseSchema, AuthConfigRetrieveResponseSchema, AuthConfigToolAccessConfigSchema, AuthConfigTypes, AuthConfigUpdateParamsSchema, AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema, AuthScheme, AuthSchemeEnum, AuthSchemeTypes, BUILTIN_FILE_UPLOAD_PATH_DENY_SEGMENTS, BaseAgenticProvider, BaseNonAgenticProvider, BillcomAuthConnectionDataSchema, Composio, ComposioAPIKeyKindError, ComposioAclOnlyForSharedError, ComposioAuthConfigNotFoundError, ComposioBlockedInternalUrlError, ComposioConnectedAccountNotFoundError, ComposioConnectedAccountNotRevokableError, ComposioConnectedAccountRevocationNotSupportedError, ComposioCustomCreateResponseSchema, ComposioError, ComposioFailedToCreateConnectedAccountLink, ComposioFailedToCreatePusherClientError, ComposioFailedToGetSDKRealtimeCredentialsError, ComposioFailedToSubscribeToPusherChannelError, ComposioFailedToUnsubscribeFromPusherChannelError, ComposioFileNotFoundError, ComposioFileUploadAbortedError, ComposioFileUploadError, ComposioFileUploadPathNotAllowedError, ComposioGenerateURLParamsSchema, ComposioGenerateURLResponseSchema, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioInvalidToolArgumentsError, ComposioLegacyConnectedAccountsEndpointRetiredError, ComposioMCPDestinationError, ComposioMcpDeleteResponseSchema, ComposioMcpListResponseSchema, ComposioMcpRetrieveResponseSchema, ComposioMcpUpdateResponseSchema, ComposioMultipleConnectedAccountsError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioRequestCancelledError, ComposioScopeConfigError, ComposioSensitiveFilePathBlockedError, ComposioSessionConfigConflictError, ComposioSharedAccessDeniedError, ComposioSharedConnectionNotAccessibleError, ComposioToolExecutionError, ComposioToolExecutionRateLimitError, ComposioToolFetchError, ComposioToolFetchRateLimitError, ComposioToolInputRequiredError, ComposioToolNotFoundError, ComposioToolSchemaInvalidError, ComposioToolVersionRequiredError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, ComposioTriggerTypeNotFoundError, ComposioWebhookPayloadError, ComposioWebhookSignatureVerificationError, ConnectedAccountAclConfigResponseSchema, ConnectedAccountAclConfigSchema, ConnectedAccountAuthConfigSchema, ConnectedAccountCompleteAuthParamsSchema, ConnectedAccountCompleteAuthResponseSchema, ConnectedAccountErrorCodes, ConnectedAccountExperimentalResponseSchema, ConnectedAccountExperimentalSchema, ConnectedAccountListParamsSchema, ConnectedAccountListResponseSchema, ConnectedAccountRefreshOptionsSchema, ConnectedAccountRetrieveResponseSchema, ConnectedAccountRevokeResponseSchema, ConnectedAccountRevokedTokenSchema, ConnectedAccountStatusSchema, ConnectedAccountStatuses, ConnectedAccountTypeSchema, ConnectedAccountTypes, ConnectionDataSchema, ConnectionExpiredEventSchema, ConnectionRequestErrorCodes, ConnectionRequestFailedError, ConnectionRequestTimeoutError, ConnectionStatus, ConnectionStatuses, CreateAuthConfigParamsSchema, CreateAuthConfigResponseSchema, CreateComposioManagedAuthConfigParamsSchema, CreateConnectedAccountLinkOptionsSchema, CreateConnectedAccountLinkResponseSchema, CreateConnectedAccountOptionsSchema, CreateConnectedAccountParamsSchema, CreateConnectedAccountResponseSchema, CreateCustomAuthConfigParamsSchema, CreateCustomToolBaseSchema, CreateCustomToolkitBaseSchema, CustomAuthParamsSchema, CustomConnectionDataSchema, CustomCreateResponseSchema, CustomOauth1ConnectionDataSchema, CustomOauth2ConnectionDataSchema, CustomToolSlugSchema, CustomToolkitAuthSchemeSchema, CustomToolkitCreateParamsSchema, CustomToolkitCreateResponseSchema, CustomToolkitDeleteResponseSchema, CustomToolkitSyncParamsSchema, CustomToolkitSyncResponseSchema, CustomToolkitUpdateParamsSchema, CustomToolkitUpdateResponseSchema, CustomToolkitUpsertParamsSchema, CustomToolkitUpsertResponseSchema, CustomToolkits, DefaultCreateConnectedAccountParamsSchema, DefaultWebhookSubscriptionEvents, Experimental, FileDeleteResponseSchema, FileListResponseSchema, FileModifierErrorCodes, GenerateURLParamsSchema, GenerateURLResponseSchema, IncomingTriggerPayloadSchema, JSONSchemaPropertySchema, JsonSchemaRefResolutionError, JsonSchemaToZodError, Keyring, KeyringTransferKeySchema, KeyringTransferKeysResponseSchema, LogSearchFilterFieldSchema, LogSearchFilterOperatorSchema, LogSearchFilterSchema, LogSearchParamsSchema, LogSearchResponseSchema, LogSearchTimeRangeSchema, Logs, MAX_URL_UPLOAD_SIZE_BYTES, MCP, MCPAuthOptionsSchema, MCPGenerateURLParamsSchema, MCPGetServerParamsSchema, MCPMultiAppServerSchema, MCPServerCreateResponseSchema, MCPServerListResponseSchema, MCPServerSchema, MCPServerTypeSchema, MCPServerUpdateParamsSchema, MCPSingleAppServerSchema, MCPToolkitConfigSchema, MCPToolkitConfigsArraySchema, McpDeleteResponseSchema, McpListResponseSchema, McpRetrieveResponseSchema, McpUpdateResponseSchema, Oauth1ActiveConnectionDataSchema, Oauth1ConnectionDataSchema, Oauth1ExpiredConnectionDataSchema, Oauth1FailedConnectionDataSchema, Oauth1InactiveConnectionDataSchema, Oauth1InitiatedConnectionDataSchema, Oauth1InitiatingConnectionDataSchema, Oauth2ActiveConnectionDataSchema, Oauth2ConnectionDataSchema, Oauth2ExpiredConnectionDataSchema, Oauth2FailedConnectionDataSchema, Oauth2InactiveConnectionDataSchema, Oauth2InitiatedConnectionDataSchema, Oauth2InitiatingConnectionDataSchema, Oauth2RevokedConnectionDataSchema, OpenAIProvider, RedirectableAuthSchemeSchema, RemoteFile, RemoteFileDataSchema, RemoteFileDownloadError, RemoteFileErrorCodes, SDKErrorCodes, SandboxSizeSchema, SessionConfigListParamsSchema, SessionConfigListResponseSchema, SessionConfigPolicySchema, SessionConfigSchema, SessionConfigSummarySchema, SessionConfigs, SessionPreset, SessionProxyExecuteParamsSchema, Sessions, SetWebhookSubscriptionParamsSchema, SingleConnectedAccountDetailedResponseSchema, SsrfErrorCodes, ToolErrorCodes, ToolExecuteMetaParamsSchema, ToolExecuteParamsSchema, ToolExecuteResponseSchema, ToolExecutionLogDetailSchema, ToolExecutionLogLevelSchema, ToolExecutionLogMetadataSchema, ToolExecutionLogParentSchema, ToolExecutionLogSchema, ToolExecutionLogStatusSchema, ToolKitItemSchema, ToolKitListResponseSchema, ToolKitMetaSchema, ToolListParamsSchema, ToolListResponseSchema, ToolProxyParamsSchema, ToolRouterBlockReasonSchema, ToolRouterConfigManageConnectionsSchema, ToolRouterConfigTagsSchema, ToolRouterConfigToolsSchema, ToolRouterCreateSessionConfigSchema, ToolRouterErrorCodes, ToolRouterHookAppliesToSchema, ToolRouterHookConditionCheckHandlerSchema, ToolRouterHookPromptInjectionCheckHandlerSchema, ToolRouterHookResultSchema, ToolRouterHookSchema, ToolRouterInstantSchema, ToolRouterMCPServerConfigSchema, ToolRouterManageConnectionsConfigSchema, ToolRouterProxyExecuteConfigSchema, ToolRouterProxyExecuteSchema, ToolRouterSandboxConfigSchema, ToolRouterSession, ToolRouterSessionDeleteResponseSchema, ToolRouterSessionEnsureConnectedOptionsSchema, ToolRouterSessionExecuteResponseSchema, ToolRouterSessionFilesMountDeleteOptionsSchema, ToolRouterSessionFilesMountDownloadOptionsSchema, ToolRouterSessionFilesMountListOptionsSchema, ToolRouterSessionFilesMountUploadOptionsSchema, ToolRouterSessionListConfigHistoryOptionsSchema, ToolRouterSessionSearchResponseSchema, ToolRouterTagsEnableDisableSchema, ToolRouterTagsParamSchema, ToolRouterToolkitsDisabledConfigSchema, ToolRouterToolkitsEnabledConfigSchema, ToolRouterToolkitsOptionsSchema, ToolRouterToolkitsParamSchema, ToolRouterToolsParamSchema, ToolRouterUpdateExperimentalSchema, ToolRouterUpdateManageConnectionsSchema, ToolRouterUpdateSessionConfigSchema, ToolSchema, ToolkitAuthConfigDetailsSchema, ToolkitAuthFieldSchema, ToolkitAuthFieldsResponseSchema, ToolkitCategorySchema, ToolkitChangelogItemSchema, ToolkitChangelogResponseSchema, ToolkitConditionalScopeSchema, ToolkitConnectionStateSchema, ToolkitConnectionsDetailsSchema, ToolkitErrorCodes, ToolkitGetManySlugsSchema, ToolkitGrantContextDimensionSchema, ToolkitLatestVersionSchema, ToolkitListGrantContextsParamsSchema, ToolkitListGrantContextsResponseSchema, ToolkitMangedByEnumSchema, ToolkitRecommendScopesParamsSchema, ToolkitRecommendScopesResponseSchema, ToolkitRetrieveCategoriesResponseSchema, ToolkitRetrieveResponseSchema, ToolkitSchema, ToolkitSortByEnumSchema, ToolkitVersionChangelogSchema, ToolkitVersionParamSchema, ToolkitVersionSchema, ToolkitVersionsSchema, ToolkitsGetManyParamsSchema, ToolkitsListParamsSchema, TriggerErrorCodes, TriggerInstanceListActiveParamsSchema, TriggerInstanceListActiveResponseItemSchema, TriggerInstanceListActiveResponseSchema, TriggerInstanceManageDeleteResponseSchema, TriggerInstanceManageUpdateParamsSchema, TriggerInstanceManageUpdateResponseSchema, TriggerInstanceTypeSchema, TriggerInstanceUpsertParamsSchema, TriggerInstanceUpsertResponseSchema, TriggerStatusEnum, TriggerStatuses, TriggerSubscribeParamSchema, TriggerTypeSchema, TriggersTypeListParamsSchema, TriggersTypeListResponseSchema, UpdateConnectedAccountAclParamsSchema, UpdateConnectedAccountParamsSchema, Usage, UsageBreakdownGroupSchema, UsageBreakdownParamsSchema, UsageBreakdownResponseSchema, UsageEntitySummarySchema, UsageFiltersSchema, UsageOrderBySchema, UsageOrderDirectionSchema, UsageSummaryParamsSchema, UsageSummaryResponseSchema, ValidationError, ValidationErrorCodes, VerifyWebhookParamsSchema, WebhookConnectedAccountAuthConfigSchema, WebhookConnectionMetadataSchema, WebhookConnectionStateSchema, WebhookEndpointCreateParamsSchema, WebhookEndpointListItemSchema, WebhookEndpointListParamsSchema, WebhookEndpointListResponseSchema, WebhookEndpointReplaceParamsSchema, WebhookEndpointSchema, WebhookEndpointUpdateParamsSchema, WebhookEndpoints, WebhookEventSchema, WebhookEventTypes, WebhookPayloadSchema, WebhookPayloadV1Schema, WebhookPayloadV2Schema, WebhookPayloadV3Schema, WebhookSubscriptionDeleteResponseSchema, WebhookSubscriptionEventTypeSchema, WebhookSubscriptionEventTypesResponseSchema, WebhookSubscriptionListParamsSchema, WebhookSubscriptionListResponseSchema, WebhookSubscriptionRotateSecretResponseSchema, WebhookSubscriptionSchema, WebhookSubscriptionSetParamsSchema, WebhookSubscriptionUpdateParamsSchema, WebhookSubscriptions, WebhookTriggerPayloadV3Schema, WebhookVersionSchema, WebhookVersions, Webhooks, assertSafeFileUploadPath, constants_exports as constants, createConnectionRequest, deduplicateJsonSchemaRequiredArrays, dereferenceJsonSchema, ensureObjectTypeOnProperties, createCustomTool as experimental_createTool, createCustomToolkit as experimental_createToolkit, getExtensionFromMimeType, handleToolExecutionError, isBlockedSensitiveFileUploadPath, isComposioRateLimitError, isRequestAbortError, jsonSchemaToZodSchema, logger, mappingHasRenames, normalizeToolArguments, omitNullToolArguments, readResponseBodyWithLimit, removeNonRequiredProperties, restoreOriginalKeys, sanitizeSchemaPropertyKeys, telemetry, toStrictJsonSchema };
12757
+ export { AuthConfigCreationToolAccessConfigSchema, AuthConfigErrorCodes, AuthConfigListParamsSchema, AuthConfigListResponseSchema, AuthConfigRetrieveResponseSchema, AuthConfigToolAccessConfigSchema, AuthConfigTypes, AuthConfigUpdateParamsSchema, AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema, AuthScheme, AuthSchemeEnum, AuthSchemeTypes, BUILTIN_FILE_UPLOAD_PATH_DENY_SEGMENTS, BaseAgenticProvider, BaseNonAgenticProvider, BillcomAuthConnectionDataSchema, Composio, ComposioAPIKeyKindError, ComposioAclOnlyForSharedError, ComposioAuthConfigNotFoundError, ComposioBlockedInternalUrlError, ComposioConnectedAccountNotFoundError, ComposioConnectedAccountNotRevokableError, ComposioConnectedAccountRevocationNotSupportedError, ComposioCustomCreateResponseSchema, ComposioError, ComposioFailedToCreateConnectedAccountLink, ComposioFailedToCreatePusherClientError, ComposioFailedToGetSDKRealtimeCredentialsError, ComposioFailedToSubscribeToPusherChannelError, ComposioFailedToUnsubscribeFromPusherChannelError, ComposioFileNotFoundError, ComposioFileUploadAbortedError, ComposioFileUploadError, ComposioFileUploadPathNotAllowedError, ComposioGenerateURLParamsSchema, ComposioGenerateURLResponseSchema, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioInvalidToolArgumentsError, ComposioLegacyConnectedAccountsEndpointRetiredError, ComposioMCPDestinationError, ComposioMcpDeleteResponseSchema, ComposioMcpListResponseSchema, ComposioMcpRetrieveResponseSchema, ComposioMcpUpdateResponseSchema, ComposioMultipleConnectedAccountsError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioRequestCancelledError, ComposioScopeConfigError, ComposioSensitiveFilePathBlockedError, ComposioSessionConfigConflictError, ComposioSharedAccessDeniedError, ComposioSharedConnectionNotAccessibleError, ComposioToolExecutionError, ComposioToolExecutionRateLimitError, ComposioToolFetchError, ComposioToolFetchRateLimitError, ComposioToolInputRequiredError, ComposioToolNotFoundError, ComposioToolSchemaInvalidError, ComposioToolVersionRequiredError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, ComposioTriggerTypeNotFoundError, ComposioWebhookPayloadError, ComposioWebhookSignatureVerificationError, ConnectedAccountAclConfigResponseSchema, ConnectedAccountAclConfigSchema, ConnectedAccountAuthConfigSchema, ConnectedAccountCompleteAuthParamsSchema, ConnectedAccountCompleteAuthResponseSchema, ConnectedAccountErrorCodes, ConnectedAccountExperimentalResponseSchema, ConnectedAccountExperimentalSchema, ConnectedAccountListParamsSchema, ConnectedAccountListResponseSchema, ConnectedAccountRefreshOptionsSchema, ConnectedAccountRetrieveResponseSchema, ConnectedAccountRevokeResponseSchema, ConnectedAccountRevokedTokenSchema, ConnectedAccountStatusSchema, ConnectedAccountStatuses, ConnectedAccountTypeSchema, ConnectedAccountTypes, ConnectionDataSchema, ConnectionExpiredEventSchema, ConnectionRequestErrorCodes, ConnectionRequestFailedError, ConnectionRequestTimeoutError, ConnectionStatus, ConnectionStatuses, CreateAuthConfigParamsSchema, CreateAuthConfigResponseSchema, CreateComposioManagedAuthConfigParamsSchema, CreateConnectedAccountLinkOptionsSchema, CreateConnectedAccountLinkResponseSchema, CreateConnectedAccountOptionsSchema, CreateConnectedAccountParamsSchema, CreateConnectedAccountResponseSchema, CreateCustomAuthConfigParamsSchema, CreateCustomToolBaseSchema, CreateCustomToolkitBaseSchema, CustomAuthParamsSchema, CustomConnectionDataSchema, CustomCreateResponseSchema, CustomOauth1ConnectionDataSchema, CustomOauth2ConnectionDataSchema, CustomToolSlugSchema, CustomToolkitAuthSchemeSchema, CustomToolkitCreateParamsSchema, CustomToolkitCreateResponseSchema, CustomToolkitDeleteResponseSchema, CustomToolkitSyncParamsSchema, CustomToolkitSyncResponseSchema, CustomToolkitUpdateParamsSchema, CustomToolkitUpdateResponseSchema, CustomToolkitUpsertParamsSchema, CustomToolkitUpsertResponseSchema, CustomToolkits, DefaultCreateConnectedAccountParamsSchema, DefaultWebhookSubscriptionEvents, Experimental, FileDeleteResponseSchema, FileListResponseSchema, FileModifierErrorCodes, GenerateURLParamsSchema, GenerateURLResponseSchema, IncomingTriggerPayloadSchema, JSONSchemaPropertySchema, JsonSchemaRefResolutionError, JsonSchemaToZodError, Keyring, KeyringTransferKeySchema, KeyringTransferKeysResponseSchema, LogSearchFilterFieldSchema, LogSearchFilterOperatorSchema, LogSearchFilterSchema, LogSearchParamsSchema, LogSearchResponseSchema, LogSearchTimeRangeSchema, Logs, MAX_URL_UPLOAD_SIZE_BYTES, MCP, MCPAuthOptionsSchema, MCPGenerateURLParamsSchema, MCPGetServerParamsSchema, MCPMultiAppServerSchema, MCPServerCreateResponseSchema, MCPServerListResponseSchema, MCPServerSchema, MCPServerTypeSchema, MCPServerUpdateParamsSchema, MCPSingleAppServerSchema, MCPToolkitConfigSchema, MCPToolkitConfigsArraySchema, McpDeleteResponseSchema, McpListResponseSchema, McpRetrieveResponseSchema, McpUpdateResponseSchema, Oauth1ActiveConnectionDataSchema, Oauth1ConnectionDataSchema, Oauth1ExpiredConnectionDataSchema, Oauth1FailedConnectionDataSchema, Oauth1InactiveConnectionDataSchema, Oauth1InitiatedConnectionDataSchema, Oauth1InitiatingConnectionDataSchema, Oauth2ActiveConnectionDataSchema, Oauth2ConnectionDataSchema, Oauth2ExpiredConnectionDataSchema, Oauth2FailedConnectionDataSchema, Oauth2InactiveConnectionDataSchema, Oauth2InitiatedConnectionDataSchema, Oauth2InitiatingConnectionDataSchema, Oauth2RevokedConnectionDataSchema, OpenAIProvider, RedirectableAuthSchemeSchema, RemoteFile, RemoteFileDataSchema, RemoteFileDownloadError, RemoteFileErrorCodes, SDKErrorCodes, SandboxSizeSchema, SessionConfigListParamsSchema, SessionConfigListResponseSchema, SessionConfigPolicySchema, SessionConfigSchema, SessionConfigSummarySchema, SessionConfigs, SessionPreset, SessionProxyExecuteParamsSchema, Sessions, SetWebhookSubscriptionParamsSchema, SingleConnectedAccountDetailedResponseSchema, SsrfErrorCodes, ToolErrorCodes, ToolExecuteMetaParamsSchema, ToolExecuteParamsSchema, ToolExecuteResponseSchema, ToolExecutionLogDetailSchema, ToolExecutionLogLevelSchema, ToolExecutionLogMetadataSchema, ToolExecutionLogParentSchema, ToolExecutionLogSchema, ToolExecutionLogStatusSchema, ToolKitItemSchema, ToolKitListResponseSchema, ToolKitMetaSchema, ToolListParamsSchema, ToolListResponseSchema, ToolProxyParamsSchema, ToolRouterBlockReasonSchema, ToolRouterConfigManageConnectionsSchema, ToolRouterConfigTagsSchema, ToolRouterConfigToolsSchema, ToolRouterCreateSessionConfigSchema, ToolRouterErrorCodes, ToolRouterHookAppliesToSchema, ToolRouterHookConditionCheckHandlerSchema, ToolRouterHookPromptInjectionCheckHandlerSchema, ToolRouterHookResultSchema, ToolRouterHookSchema, ToolRouterInstantSchema, ToolRouterMCPServerConfigSchema, ToolRouterManageConnectionsConfigSchema, ToolRouterProxyExecuteConfigSchema, ToolRouterProxyExecuteSchema, ToolRouterSandboxConfigSchema, ToolRouterSession, ToolRouterSessionDeleteResponseSchema, ToolRouterSessionEnsureConnectedOptionsSchema, ToolRouterSessionExecuteResponseSchema, ToolRouterSessionFilesMountDeleteOptionsSchema, ToolRouterSessionFilesMountDownloadOptionsSchema, ToolRouterSessionFilesMountListOptionsSchema, ToolRouterSessionFilesMountUploadOptionsSchema, ToolRouterSessionListConfigHistoryOptionsSchema, ToolRouterSessionSearchResponseSchema, ToolRouterTagsEnableDisableSchema, ToolRouterTagsParamSchema, ToolRouterToolkitsDisabledConfigSchema, ToolRouterToolkitsEnabledConfigSchema, ToolRouterToolkitsOptionsSchema, ToolRouterToolkitsParamSchema, ToolRouterToolsParamSchema, ToolRouterUpdateExperimentalSchema, ToolRouterUpdateManageConnectionsSchema, ToolRouterUpdateSessionConfigSchema, ToolSchema, ToolkitAuthConfigDetailsSchema, ToolkitAuthFieldSchema, ToolkitAuthFieldsResponseSchema, ToolkitCategorySchema, ToolkitChangelogItemSchema, ToolkitChangelogResponseSchema, ToolkitComposioManagedAuthSchema, ToolkitConditionalScopeSchema, ToolkitConnectionStateSchema, ToolkitConnectionsDetailsSchema, ToolkitErrorCodes, ToolkitGetManySlugsSchema, ToolkitGrantContextDimensionSchema, ToolkitLatestVersionSchema, ToolkitListGrantContextsParamsSchema, ToolkitListGrantContextsResponseSchema, ToolkitMangedByEnumSchema, ToolkitRecommendScopesParamsSchema, ToolkitRecommendScopesResponseSchema, ToolkitRetrieveCategoriesResponseSchema, ToolkitRetrieveResponseSchema, ToolkitSchema, ToolkitSortByEnumSchema, ToolkitVersionChangelogSchema, ToolkitVersionParamSchema, ToolkitVersionSchema, ToolkitVersionsSchema, ToolkitsGetManyParamsSchema, ToolkitsListParamsSchema, TriggerErrorCodes, TriggerInstanceListActiveParamsSchema, TriggerInstanceListActiveResponseItemSchema, TriggerInstanceListActiveResponseSchema, TriggerInstanceManageDeleteResponseSchema, TriggerInstanceManageUpdateParamsSchema, TriggerInstanceManageUpdateResponseSchema, TriggerInstanceTypeSchema, TriggerInstanceUpsertParamsSchema, TriggerInstanceUpsertResponseSchema, TriggerStatusEnum, TriggerStatuses, TriggerSubscribeParamSchema, TriggerTypeSchema, TriggersTypeListParamsSchema, TriggersTypeListResponseSchema, UpdateConnectedAccountAclParamsSchema, UpdateConnectedAccountParamsSchema, Usage, UsageBreakdownGroupSchema, UsageBreakdownParamsSchema, UsageBreakdownResponseSchema, UsageEntitySummarySchema, UsageFiltersSchema, UsageOrderBySchema, UsageOrderDirectionSchema, UsageSummaryParamsSchema, UsageSummaryResponseSchema, ValidationError, ValidationErrorCodes, VerifyWebhookParamsSchema, WebhookConnectedAccountAuthConfigSchema, WebhookConnectionMetadataSchema, WebhookConnectionStateSchema, WebhookEndpointCreateParamsSchema, WebhookEndpointListItemSchema, WebhookEndpointListParamsSchema, WebhookEndpointListResponseSchema, WebhookEndpointReplaceParamsSchema, WebhookEndpointSchema, WebhookEndpointUpdateParamsSchema, WebhookEndpoints, WebhookEventSchema, WebhookEventTypes, WebhookPayloadSchema, WebhookPayloadV1Schema, WebhookPayloadV2Schema, WebhookPayloadV3Schema, WebhookSubscriptionDeleteResponseSchema, WebhookSubscriptionEventTypeSchema, WebhookSubscriptionEventTypesResponseSchema, WebhookSubscriptionListParamsSchema, WebhookSubscriptionListResponseSchema, WebhookSubscriptionRotateSecretResponseSchema, WebhookSubscriptionSchema, WebhookSubscriptionSetParamsSchema, WebhookSubscriptionUpdateParamsSchema, WebhookSubscriptions, WebhookTriggerPayloadV3Schema, WebhookVersionSchema, WebhookVersions, Webhooks, assertSafeFileUploadPath, constants_exports as constants, createConnectionRequest, deduplicateJsonSchemaRequiredArrays, dereferenceJsonSchema, ensureObjectTypeOnProperties, createCustomTool as experimental_createTool, createCustomToolkit as experimental_createToolkit, getExtensionFromMimeType, handleToolExecutionError, isBlockedSensitiveFileUploadPath, isComposioRateLimitError, isRequestAbortError, jsonSchemaToZodSchema, logger, mappingHasRenames, normalizeToolArguments, omitNullToolArguments, readResponseBodyWithLimit, removeNonRequiredProperties, restoreOriginalKeys, sanitizeSchemaPropertyKeys, telemetry, toStrictJsonSchema };
@@ -1,5 +1,5 @@
1
- import { n as ComposioConfig } from "./composio-DaokW5sV.mjs";
2
- import { jr as BaseComposioProvider } from "./customTool.types-CpJbzxT6.mjs";
1
+ import { n as ComposioConfig } from "./composio-Ba89XGHL.mjs";
2
+ import { jr as BaseComposioProvider } from "./customTool.types-DHxXBU6E.mjs";
3
3
  /**
4
4
  * Configuration defaults for Composio.
5
5
  * These are the required fields that must have default values.
@@ -1,2 +1,2 @@
1
- import { t as ConfigDefaults } from "../../types-DQdUb7OG.mjs";
1
+ import { t as ConfigDefaults } from "../../types-DcdZy5Nc.mjs";
2
2
  export declare const CONFIG_DEFAULTS: ConfigDefaults;
@@ -1,2 +1,2 @@
1
- import { t as ConfigDefaults } from "../../types-DQdUb7OG.mjs";
1
+ import { t as ConfigDefaults } from "../../types-DcdZy5Nc.mjs";
2
2
  export declare const CONFIG_DEFAULTS: ConfigDefaults;
@@ -1,4 +1,4 @@
1
- import { Qa as ToolExecuteResponse, Xa as ToolExecuteParams, qa as Tool } from "../../customTool.types-CpJbzxT6.mjs";
1
+ import { Qa as ToolExecuteResponse, Xa as ToolExecuteParams, qa as Tool } from "../../customTool.types-DHxXBU6E.mjs";
2
2
  import ComposioClient from "@composio/client";
3
3
  export declare class FileToolModifier {
4
4
  private client;
@@ -1,4 +1,4 @@
1
- import { Qa as ToolExecuteResponse, Xa as ToolExecuteParams, qa as Tool } from "../../customTool.types-CpJbzxT6.mjs";
1
+ import { Qa as ToolExecuteResponse, Xa as ToolExecuteParams, qa as Tool } from "../../customTool.types-DHxXBU6E.mjs";
2
2
  import ComposioClient from "@composio/client";
3
3
  export declare class FileToolModifier {
4
4
  constructor(_client: ComposioClient);
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "engines": {
5
5
  "node": ">=22.22.3"
6
6
  },
7
- "version": "0.30.0",
7
+ "version": "0.31.0",
8
8
  "description": "",
9
9
  "main": "dist/index.mjs",
10
10
  "publishConfig": {
@@ -111,7 +111,7 @@
111
111
  ],
112
112
  "license": "ISC",
113
113
  "devDependencies": {
114
- "@hono/node-server": "^2.1.6",
114
+ "@hono/node-server": "^2.1.8",
115
115
  "@types/semver": "^7.8.0",
116
116
  "ajv": "^8.20.0",
117
117
  "fast-check": "^4.10.2",
@@ -128,7 +128,7 @@
128
128
  "zod": ">=3.25.76 <5"
129
129
  },
130
130
  "dependencies": {
131
- "@composio/client": "2.1.33",
131
+ "@composio/client": "2.1.36",
132
132
  "@types/json-schema": "^7.0.15",
133
133
  "is-fs-case-sensitive": "^2.0.0",
134
134
  "openai": "^7.55.0",
@@ -104,6 +104,14 @@ export class AuthConfigs {
104
104
  * @returns {Promise<CreateAuthConfigResponse>} Created auth config
105
105
  *
106
106
  * @example
107
+ * // Use a specific Composio-managed app; omit managedAppId for the toolkit's default
108
+ * const { composioManagedAuth } = await composio.toolkits.get('slack');
109
+ * const slackAuthConfig = await authConfigs.create('slack', {
110
+ * type: AuthConfigTypes.COMPOSIO_MANAGED,
111
+ * managedAppId: composioManagedAuth?.find(app => !app.isDefault)?.managedAppId,
112
+ * });
113
+ *
114
+ * @example
107
115
  * const authConfig = await authConfigs.create('my-toolkit', {
108
116
  * type: AuthConfigTypes.CUSTOM,
109
117
  * name: 'My Custom Auth Config',
@@ -162,6 +170,7 @@ export class AuthConfigs {
162
170
  parsedOptions.data.toolAccessConfig.toolsForConnectedAccountCreation,
163
171
  }
164
172
  : undefined,
173
+ managed_app_id: parsedOptions.data.managedAppId,
165
174
  },
166
175
  };
167
176
  const result = await withCancellation(
package/src/models/MCP.ts CHANGED
@@ -249,7 +249,7 @@ export class MCP {
249
249
  * const server = await composio.experimental.mcp.get("mcp_12345");
250
250
  *
251
251
  * console.log(server.name); // "My Personal MCP Server"
252
- * console.log(server.allowedTools); // ["GITHUB_CREATE_ISSUE", "SLACK_SEND_MESSAGE"]
252
+ * console.log(server.allowedTools); // ["GITHUB_CREATE_AN_ISSUE", "SLACK_SEND_MESSAGE"]
253
253
  * console.log(server.toolkits); // ["github", "slack"]
254
254
  * console.log(server.serverInstanceCount); // 3
255
255
  *
@@ -343,7 +343,7 @@ export class MCP {
343
343
  * {
344
344
  * toolkit: "github",
345
345
  * authConfigId: "auth_abc123",
346
- * allowedTools: ["GITHUB_CREATE_ISSUE", "GITHUB_LIST_REPOS"]
346
+ * allowedTools: ["GITHUB_CREATE_AN_ISSUE", "GITHUB_LIST_REPOS"]
347
347
  * },
348
348
  * {
349
349
  * toolkit: "slack",
@@ -844,7 +844,7 @@ export class Tools<
844
844
  * );
845
845
  *
846
846
  * // Access tool properties
847
- * const githubTool = await composio.tools.getRawComposioToolBySlug('GITHUB_CREATE_ISSUE');
847
+ * const githubTool = await composio.tools.getRawComposioToolBySlug('GITHUB_CREATE_AN_ISSUE');
848
848
  * console.log({
849
849
  * slug: githubTool.slug,
850
850
  * name: githubTool.name,
@@ -1544,7 +1544,7 @@ export class Tools<
1544
1544
  *
1545
1545
  * @example
1546
1546
  * ```typescript
1547
- * const { arguments: args, error } = await composio.tools.getInput('GITHUB_CREATE_ISSUE', {
1547
+ * const { arguments: args, error } = await composio.tools.getInput('GITHUB_CREATE_AN_ISSUE', {
1548
1548
  * text: 'Open an issue in composiohq/composio titled "Docs typo" describing the broken link',
1549
1549
  * version: '20250909_00',
1550
1550
  * });
@@ -78,6 +78,11 @@ export const CreateComposioManagedAuthConfigParamsSchema = z.object({
78
78
  .optional(),
79
79
  toolAccessConfig: AuthConfigCreationToolAccessConfigSchema.optional(),
80
80
  isEnabledForToolRouter: z.boolean().optional(),
81
+ /**
82
+ * The Composio-managed app to use, as `composioManagedAuth[].managedAppId`
83
+ * from `composio.toolkits.get(slug)`. Omit to use the toolkit's default app.
84
+ */
85
+ managedAppId: z.string().optional(),
81
86
  });
82
87
 
83
88
  /**
@@ -90,11 +95,19 @@ export const CreateAuthConfigParamsSchema = z.discriminatedUnion('type', [
90
95
 
91
96
  export type CreateAuthConfigParams = z.infer<typeof CreateAuthConfigParamsSchema>;
92
97
 
98
+ /**
99
+ * The Composio-managed app an auth config uses, as
100
+ * `composioManagedAuth[].managedAppId` from `composio.toolkits.get(slug)`.
101
+ * `null` when the auth config is not linked to a managed app.
102
+ */
103
+ const AuthConfigManagedAppIdSchema = z.string().nullable();
104
+
93
105
  export const CreateAuthConfigResponseSchema = z.object({
94
106
  id: z.string(),
95
107
  authScheme: z.string(),
96
108
  isComposioManaged: z.boolean(),
97
109
  toolkit: z.string(),
110
+ managedAppId: AuthConfigManagedAppIdSchema,
98
111
  });
99
112
  export type CreateAuthConfigResponse = z.infer<typeof CreateAuthConfigResponseSchema>;
100
113
 
@@ -120,6 +133,7 @@ export const AuthConfigRetrieveResponseSchema = z.object({
120
133
  createdAt: z.string().optional(),
121
134
  lastUpdatedAt: z.string().optional(),
122
135
  toolAccessConfig: AuthConfigToolAccessConfigSchema.optional(),
136
+ managedAppId: AuthConfigManagedAppIdSchema,
123
137
  });
124
138
  export type AuthConfigRetrieveResponse = z.infer<typeof AuthConfigRetrieveResponseSchema>;
125
139
 
@@ -459,7 +459,7 @@ export type ToolRetrievalOptions = {
459
459
  *
460
460
  * @example Override with specific version
461
461
  * ```typescript
462
- * const tool = await tools.getRawComposioToolBySlug('GITHUB_CREATE_ISSUE', {
462
+ * const tool = await tools.getRawComposioToolBySlug('GITHUB_CREATE_AN_ISSUE', {
463
463
  * version: '20250909_00'
464
464
  * });
465
465
  * ```
@@ -125,12 +125,32 @@ export const ToolkitAuthConfigDetailsSchema = z.object({
125
125
  .optional(),
126
126
  });
127
127
 
128
+ const ToolkitManagedAuthScopesSchema = z.object({
129
+ available: z.array(z.string()),
130
+ });
131
+
132
+ /**
133
+ * A Composio-managed app for a toolkit. Pass `managedAppId` to
134
+ * `composio.authConfigs.create` to create an auth config on this app.
135
+ */
136
+ export const ToolkitComposioManagedAuthSchema = z.object({
137
+ managedAppId: z.string(),
138
+ /** Whether this is the app used when `managedAppId` is omitted. */
139
+ isDefault: z.boolean(),
140
+ mode: z.string(),
141
+ scopes: ToolkitManagedAuthScopesSchema,
142
+ /** Present only for Slack. */
143
+ userScopes: ToolkitManagedAuthScopesSchema.optional(),
144
+ });
145
+
128
146
  export const ToolkitRetrieveResponseSchema = z.object({
129
147
  name: z.string(),
130
148
  slug: z.string(),
131
149
  meta: ToolKitMetaSchema,
132
150
  isLocalToolkit: z.boolean(),
133
151
  composioManagedAuthSchemes: z.array(z.string()).optional(),
152
+ /** One entry per Composio-managed app, the default first. */
153
+ composioManagedAuth: z.array(ToolkitComposioManagedAuthSchema).optional(),
134
154
  authConfigDetails: z.array(ToolkitAuthConfigDetailsSchema).optional(),
135
155
  baseUrl: z.string().optional(),
136
156
  getCurrentUserEndpoint: z.string().optional(),
@@ -139,6 +159,7 @@ export const ToolkitRetrieveResponseSchema = z.object({
139
159
 
140
160
  export type ToolkitAuthField = z.infer<typeof ToolkitAuthFieldSchema>;
141
161
  export type ToolkitAuthConfigDetails = z.infer<typeof ToolkitAuthConfigDetailsSchema>;
162
+ export type ToolkitComposioManagedAuth = z.infer<typeof ToolkitComposioManagedAuthSchema>;
142
163
  export type ToolkitRetrieveResponse = z.infer<typeof ToolkitRetrieveResponseSchema>;
143
164
 
144
165
  /**
@@ -15,19 +15,21 @@ import {
15
15
  } from '@composio/client/resources/auth-configs';
16
16
  import { transform } from '../transform';
17
17
 
18
+ type RawAuthConfig = RawAuthConfigRetrieveResponse | RawAuthConfigListResponse['items'][number];
19
+
18
20
  /**
19
21
  * Transforms an auth config response from API format to SDK format.
20
22
  *
21
23
  * This method converts property names from snake_case to camelCase and reorganizes
22
24
  * the data structure to match the SDK's standardized format for auth configurations.
23
25
  *
24
- * @param {RawAuthConfigRetrieveResponse} authConfig - The raw API response to transform
26
+ * @param {RawAuthConfig} authConfig - The raw retrieve response or list item to transform
25
27
  * @returns {AuthConfigRetrieveResponse} The transformed auth config data
26
28
  *
27
29
  * @private
28
30
  */
29
31
  export function transformAuthConfigRetrieveResponse(
30
- authConfig: RawAuthConfigRetrieveResponse
32
+ authConfig: RawAuthConfig
31
33
  ): AuthConfigRetrieveResponse {
32
34
  return transform(authConfig)
33
35
  .with(AuthConfigRetrieveResponseSchema)
@@ -56,6 +58,7 @@ export function transformAuthConfigRetrieveResponse(
56
58
  authConfig.tool_access_config.tools_for_connected_account_creation,
57
59
  }
58
60
  : undefined,
61
+ managedAppId: authConfig.managed_app_id,
59
62
  }));
60
63
  }
61
64
 
@@ -103,5 +106,6 @@ export function transformCreateAuthConfigResponse(
103
106
  authScheme: response.auth_config.auth_scheme,
104
107
  isComposioManaged: response.auth_config.is_composio_managed,
105
108
  toolkit: response.toolkit.slug,
109
+ managedAppId: response.auth_config.managed_app_id,
106
110
  }));
107
111
  }
@@ -156,6 +156,13 @@ export const transformToolkitRetrieveResponse = (
156
156
  },
157
157
  isLocalToolkit: response.is_local_toolkit,
158
158
  composioManagedAuthSchemes: response.composio_managed_auth_schemes,
159
+ composioManagedAuth: response.composio_managed_auth?.map(app => ({
160
+ managedAppId: app.managed_app_id,
161
+ isDefault: app.is_default,
162
+ mode: app.mode,
163
+ scopes: app.scopes,
164
+ ...(app.user_scopes != null && { userScopes: app.user_scopes }),
165
+ })),
159
166
  authConfigDetails: response.auth_config_details?.map(authConfig => ({
160
167
  name: authConfig.name,
161
168
  mode: authConfig.mode,