mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 05:19:49 +00:00
feat(microsoft-teams): better authentication flow and doc references
This commit is contained in:
@@ -23,7 +23,8 @@ export const workflowIntegrationKeys = {
|
||||
{ id },
|
||||
"microsoft-teams-workflow-integration-teams"
|
||||
],
|
||||
getSlackIntegrationChannels: (id?: string) => [{ id }, "slack-workflow-integration-channels"]
|
||||
getSlackIntegrationChannels: (id?: string) => [{ id }, "slack-workflow-integration-channels"],
|
||||
getMicrosoftTeamsClientId: () => ["microsoft-teams-client-id"]
|
||||
};
|
||||
|
||||
export const fetchSlackInstallUrl = async ({
|
||||
@@ -104,6 +105,14 @@ export const fetchMicrosoftTeamsIntegrationTeams = async (id?: string) => {
|
||||
return data;
|
||||
};
|
||||
|
||||
export const fetchMicrosoftTeamsClientId = async () => {
|
||||
const { data } = await apiRequest.get<{ clientId: string }>(
|
||||
"/api/v1/workflow-integrations/microsoft-teams/client-id"
|
||||
);
|
||||
|
||||
return data;
|
||||
};
|
||||
|
||||
export const useGetMicrosoftTeamsIntegrations = (orgId?: string) =>
|
||||
useQuery({
|
||||
queryKey: workflowIntegrationKeys.getMicrosoftTeamsIntegrations(orgId),
|
||||
@@ -145,3 +154,10 @@ export const useGetWorkflowIntegrations = (id?: string) =>
|
||||
queryFn: () => fetchWorkflowIntegrations(),
|
||||
enabled: Boolean(id)
|
||||
});
|
||||
|
||||
export const useGetMicrosoftTeamsClientId = () =>
|
||||
useQuery({
|
||||
queryKey: workflowIntegrationKeys.getMicrosoftTeamsClientId(),
|
||||
queryFn: () => fetchMicrosoftTeamsClientId(),
|
||||
enabled: true
|
||||
});
|
||||
|
||||
@@ -59,10 +59,11 @@ export type TUpdateMicrosoftTeamsIntegrationDTO = {
|
||||
};
|
||||
|
||||
export type TCreateMicrosoftTeamsIntegrationDTO = {
|
||||
orgId: string;
|
||||
tenantId: string;
|
||||
slug: string;
|
||||
description?: string;
|
||||
redirectUri: string;
|
||||
orgId: string;
|
||||
};
|
||||
|
||||
export type TDeleteSlackIntegrationDTO = {
|
||||
|
||||
Reference in New Issue
Block a user