Skip to content

Commit

Permalink
add admin response types
Browse files Browse the repository at this point in the history
  • Loading branch information
dvasilas committed Oct 17, 2024
1 parent b563386 commit 901d23d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ export type HealthCheckResponse = {
date?: string;
};

type AdminResponseCseq = {
logId: string;
cseq: number;
}

type AdminResponseRPC = {
done: boolean;
description?: string;
}

function lpad(num: number, digits: number) {
return num.toString().padStart(digits, '0');
}
Expand Down Expand Up @@ -170,7 +180,7 @@ export default class ScubaClient {
return resp.data;
}

async admin(action: AdminActions, logId: string, options?: AxiosRequestConfig, body?: any): Promise<void> {
async admin(action: AdminActions, logId: string, options?: AxiosRequestConfig, body?: any): Promise<AdminResponseCseq|AdminResponseRPC> {
const resp = (await this._api.admin(action, logId, body, {
...this._defaultReqOptions,
...options,
Expand Down

0 comments on commit 901d23d

Please sign in to comment.