Skip to content

Commit 6ea9c9d

Browse files
committed
M Disconnect response type
1 parent 04527e5 commit 6ea9c9d

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

packages/manager-api-client/src/manager-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@ export class ManagerClient implements ClientProvider {
8585
}
8686

8787
async disconnectHubs(opts: any) {
88-
await this.client.post<any>("disconnect", opts, {}, { json: true, parse: "json" });
88+
return this.client.post<MRestAPI.PostDisconnectResponse>("disconnect", opts, {}, { json: true, parse: "json" });
8989
}
9090
}

packages/types/src/rest-api-manager/common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export type ConnectedSTHInfo = {
1010
healthy: boolean;
1111
isConnectionActive: boolean;
1212
selfHosted: boolean;
13+
disconnectReason?: string;
1314
};
1415

1516
export type HealthCheckInfo = {
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1+
import { OpResponse } from "../rest-api-multi-manager";
2+
13
export type PostDisconnectPayload = {
24
limit?: number;
3-
accessKey: string;
5+
accessKey?: string;
46
}
7+
8+
export type PostDisconnectResponse = OpResponse<{
9+
managerId: string;
10+
disconnected: {
11+
sthId: string;
12+
reason: string;
13+
}[];
14+
}>;

0 commit comments

Comments
 (0)