misc: slack integration reinstall

This commit is contained in:
Sheen Capadngan
2024-09-04 15:44:58 +08:00
parent 5343c7af00
commit 15c5fe4095
7 changed files with 207 additions and 1 deletions
@@ -5,6 +5,7 @@ export {
} from "./mutation";
export {
fetchSlackInstallUrl,
fetchSlackReinstallUrl,
useGetSlackIntegrationById,
useGetSlackIntegrations
} from "./queries";
@@ -26,6 +26,20 @@ export const fetchSlackInstallUrl = async ({
return data;
};
export const fetchSlackReinstallUrl = async ({
slackIntegrationId
}: {
slackIntegrationId: string;
}) => {
const { data } = await apiRequest.get<string>("/api/v1/workflow-integrations/slack/reinstall", {
params: {
slackIntegrationId
}
});
return data;
};
export const fetchSlackIntegrations = async () => {
const { data } = await apiRequest.get<SlackIntegration[]>("/api/v1/workflow-integrations/slack");