Skip to content

Commit

Permalink
SCUBA-177: Add AdminReadRaftCseq response type
Browse files Browse the repository at this point in the history
  • Loading branch information
dvasilas committed Oct 23, 2024
1 parent 3f6604f commit a226217
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,11 @@ export type HealthCheckResponse = {
date?: string;
};

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

function lpad(num: number, digits: number) {
return num.toString().padStart(digits, '0');
}
Expand Down Expand Up @@ -170,7 +175,12 @@ 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 | void> {
const resp = (await this._api.admin(action, logId, body, {
...this._defaultReqOptions,
...options,
Expand Down

0 comments on commit a226217

Please sign in to comment.