core/integrations/slack/src/account-create.ts
Harshith Mullapudi b380f2657f
Feat: add mcp oauth2.1 support (#30)
* Feat: add mcp oauth2.1 support

* Fix: integration mcp is not loading

* Feat: add slack integration

---------

Co-authored-by: Manoj K <saimanoj58@gmail.com>
2025-07-24 03:06:24 -07:00

25 lines
611 B
TypeScript

export async function integrationCreate(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
data: any,
) {
const { oauthResponse } = data;
const integrationConfiguration = {
access_token: oauthResponse.authed_user.access_token,
teamId: oauthResponse.team.id,
teamName: oauthResponse.team.name,
userId: oauthResponse.authed_user.id,
scope: oauthResponse.authed_user.scope,
};
return [
{
type: 'account',
data: {
settings: {},
accountId: integrationConfiguration.userId,
config: integrationConfiguration,
},
},
];
}