import * as Models from "./models";


/**
 * API endpoints for Backup Codes.
 */
export class BackupCodes {
  private client: any;

  constructor(client: any) {
    this.client = client;
  }

  /**
   * Get backup codes status for user.
   */
  async totpBackupCodesRetrieve(): Promise<Models.BackupCodesStatus> {
    const response = await this.client.request('GET', "/cfg/totp/backup-codes/");
    return response;
  }

  /**
   * Regenerate backup codes. Requires TOTP code for verification.
   * Invalidates all existing codes.
   */
  async totpBackupCodesRegenerateCreate(data: Models.BackupCodesRegenerateRequest): Promise<Models.BackupCodesRegenerateResponse> {
    const response = await this.client.request('POST', "/cfg/totp/backup-codes/regenerate/", { body: data });
    return response;
  }

}