@devries-cameron20 / composio Mirror · read-only / commits / 160229afa
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 00:45 UTC

fix: restore type casts for unpublished SDK types in ConnectedAccounts

Keep clean if-check style but add necessary casts for alias (not yet in @composio/client types) and state (ConnectionData union). Use inline type for linkParams instead of Record<string, string>. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Zen Agent <zen@composio.dev>

abir committed Apr 9, 2026 at 06:24 UTC 160229afa9e2b6f535437d4e352b83557f88f0b1
1 file changed +5 -5
ts/packages/core/src/models/ConnectedAccounts.ts
+5 -5
@@ -193,8 +193,8 @@ export class ConnectedAccounts {
193 // state = connectionDataParsed.data;
194 // }
195
196 - // alias is not yet in the published @composio/client types
197 - const createParams: ConnectedAccountCreateParamsRaw & { alias?: string } = {
196 + // Cast needed: alias + state types not yet in the published @composio/client
197 + const createParams = {
198 auth_config: {
199 id: authConfigId,
200 },
@@ -203,10 +203,10 @@ export class ConnectedAccounts {
203 user_id: userId,
204 state,
205 },
206 - };
206 + } as ConnectedAccountCreateParamsRaw;
207
208 if (options?.alias != null) {
209 - createParams.alias = options.alias;
209 + (createParams as ConnectedAccountCreateParamsRaw & { alias?: string }).alias = options.alias;
210 }
211
212 const response = await this.client.connectedAccounts.create(createParams);
@@ -272,7 +272,7 @@ export class ConnectedAccounts {
272 }
273
274 try {
275 - const linkParams: Record<string, string> = {
275 + const linkParams: { auth_config_id: string; user_id: string; callback_url?: string; alias?: string } = {
276 auth_config_id: authConfigId,
277 user_id: userId,
278 };