refactor(linear): keep workspace API types inside channel

This commit is contained in:
chengyongru authored and chengyongru committed 2026-09-23 18:29:52 +08:00
1 parent c5f78bbd5c
commit 2dac0d330c
5 files changed
+38 -30

No files matched your search

+3 -3
View File
@@ -815,12 +815,12 @@ export async function runPairingAction(
return mutation<PairingPayload>(transport, `settings.pairing.${action}`, { code });
}
export async function startChannelConnect(
export async function startChannelConnect<T = ChannelConnectPayload>(
transport: WebUIMutationTransport,
channel: string,
params: Readonly<Record<string, string | boolean>> = {},
): Promise<ChannelConnectPayload> {
return mutation<ChannelConnectPayload>(
): Promise<T> {
return mutation<T>(
transport,
"settings.channel.connect.start",
{
+1 -21
View File
@@ -1212,22 +1212,7 @@ export interface McpPresetsPayload {
};
}
type ChannelConnectStatus =
| "pending"
| "succeeded"
| "expired"
| "cancelled"
| "failed"
| "inspected"
| "disconnected";
export interface ChannelInstallationSummary {
organization_id: string;
organization_name?: string;
scopes?: string[];
authorization_status?: "authorized" | "refresh_required" | "missing_scopes";
missing_scopes?: string[];
}
type ChannelConnectStatus = "pending" | "succeeded" | "expired" | "cancelled" | "failed";
export interface ChannelConnectPayload {
session_id: string;
@@ -1237,11 +1222,6 @@ export interface ChannelConnectPayload {
qr_url?: string;
interval_ms?: number;
expires_at_ms?: number;
organization_id?: string;
organization_name?: string;
installations?: ChannelInstallationSummary[];
webhook_url?: string;
redirect_uri?: string;
nanobot_features?: NanobotFeaturesPayload;
}