Fix build issues
This commit is contained in:
@@ -45,7 +45,7 @@ export class AuthApi {
|
||||
uri: "/auth/start_oidc",
|
||||
method: "GET",
|
||||
})
|
||||
).data;
|
||||
).data as { url: string };
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,7 +70,7 @@ export class AuthApi {
|
||||
uri: "/auth/info",
|
||||
method: "GET",
|
||||
})
|
||||
).data;
|
||||
).data as UserInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,7 @@ export class MatrixLinkApi {
|
||||
uri: "/matrix_link/start_auth",
|
||||
method: "POST",
|
||||
})
|
||||
).data;
|
||||
).data as { url: string };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,6 +29,6 @@ export class MatrixSyncApi {
|
||||
method: "GET",
|
||||
uri: "/matrix_sync/status",
|
||||
});
|
||||
return res.data.started;
|
||||
return (res.data as { started: boolean }).started;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ export class ServerApi {
|
||||
uri: "/server/config",
|
||||
method: "GET",
|
||||
})
|
||||
).data;
|
||||
).data as ServerConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,7 +28,7 @@ export class TokensApi {
|
||||
uri: "/tokens",
|
||||
method: "GET",
|
||||
})
|
||||
).data;
|
||||
).data as Token[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -41,18 +41,16 @@ export class TokensApi {
|
||||
method: "POST",
|
||||
jsonData: t,
|
||||
})
|
||||
).data;
|
||||
).data as TokenWithSecret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a token
|
||||
*/
|
||||
static async Delete(t: Token): Promise<void> {
|
||||
return (
|
||||
await APIClient.exec({
|
||||
uri: `/token/${t.id}`,
|
||||
method: "DELETE",
|
||||
})
|
||||
).data;
|
||||
await APIClient.exec({
|
||||
uri: `/token/${t.id}`,
|
||||
method: "DELETE",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export class MatrixApiEvent {
|
||||
`/matrix/room/${encodeURIComponent(room.id)}/events` +
|
||||
(from ? `?from=${from}` : ""),
|
||||
})
|
||||
).data;
|
||||
).data as MatrixEventsList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,13 +13,13 @@ export class MatrixApiProfile {
|
||||
* Get multiple profiles information
|
||||
*/
|
||||
static async GetMultiple(ids: string[]): Promise<UsersMap> {
|
||||
const list: UserProfile[] = (
|
||||
const list = (
|
||||
await APIClient.exec({
|
||||
method: "POST",
|
||||
uri: "/matrix/profile/get_multiple",
|
||||
jsonData: ids,
|
||||
})
|
||||
).data;
|
||||
).data as UserProfile[];
|
||||
|
||||
return new Map(list.map((e) => [e.user_id, e]));
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export class MatrixApiRoom {
|
||||
method: "GET",
|
||||
uri: "/matrix/room/joined",
|
||||
})
|
||||
).data;
|
||||
).data as Room[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,6 +69,6 @@ export class MatrixApiRoom {
|
||||
method: "GET",
|
||||
uri: `/matrix/room/${room.id}/receipts`,
|
||||
})
|
||||
).data;
|
||||
).data as Receipt[];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user