mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-12 08:38:27 +00:00
* Feat: add mcp oauth2.1 support * Fix: integration mcp is not loading * Feat: add slack integration --------- Co-authored-by: Manoj K <saimanoj58@gmail.com>
25 lines
611 B
TypeScript
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,
|
|
},
|
|
},
|
|
];
|
|
}
|