Skip to content

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

fix: restore type casts for unpublished SDK types in ConnectedAccounts

abir160229afa9e2
diff --git a/ts/packages/core/src/models/ConnectedAccounts.ts b/ts/packages/core/src/models/ConnectedAccounts.ts
index 23f8ac17e..48855eeb3 100644
--- a/ts/packages/core/src/models/ConnectedAccounts.ts
+++ b/ts/packages/core/src/models/ConnectedAccounts.ts
@@ -193,8 +193,8 @@ export class ConnectedAccounts {
// state = connectionDataParsed.data;
// }
- // alias is not yet in the published @composio/client types
- const createParams: ConnectedAccountCreateParamsRaw & { alias?: string } = {
+ // Cast needed: alias + state types not yet in the published @composio/client
+ const createParams = {
auth_config: {
id: authConfigId,
},
@@ -203,10 +203,10 @@ export class ConnectedAccounts {
user_id: userId,
state,
},
- };
+ } as ConnectedAccountCreateParamsRaw;
if (options?.alias != null) {
- createParams.alias = options.alias;
+ (createParams as ConnectedAccountCreateParamsRaw & { alias?: string }).alias = options.alias;
}
const response = await this.client.connectedAccounts.create(createParams);
@@ -272,7 +272,7 @@ export class ConnectedAccounts {
}
try {
- const linkParams: Record<string, string> = {
+ const linkParams: { auth_config_id: string; user_id: string; callback_url?: string; alias?: string } = {
auth_config_id: authConfigId,
user_id: userId,
};