mirror of
https://github.com/warmbly/warmbly.git
synced 2026-09-05 08:01:23 +00:00
Adds OAuth-backed integration connection management across the API, repository, event dispatch, migrations, docs, and dashboard UI. Includes realtime invalidation and small dashboard type compatibility fixes needed for the web typecheck gate.
14 lines
561 B
TypeScript
14 lines
561 B
TypeScript
import type { IntegrationOAuthStartResponse } from "@/lib/api/models/app/integrations/Integration";
|
|
import Request from "../../Request";
|
|
|
|
// Starts a fresh OAuth handshake for an existing connection whose token
|
|
// expired or was revoked. Returns a new authorization URL.
|
|
export default async function reauthIntegration(id: string): Promise<IntegrationOAuthStartResponse> {
|
|
return await Request<IntegrationOAuthStartResponse>({
|
|
method: "POST",
|
|
url: `/integrations/oauth/reauth/${id}`,
|
|
data: {},
|
|
authorization: true,
|
|
});
|
|
}
|