/** * Generated by orval v8.19.0 🍺 * Do not edit manually. * Webitel API * OpenAPI spec version: 24.04.0 */ import axios from '@aliasedDeps/api-services/axios'; import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'; import type { ApiGenerateUserTfaKeyResponse, ApiGetUserTfaKeyResponse, } from '../_models'; // --- header start // export const // --- title start getTwoFactorAuthentication = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * @summary GetUserTfaKey locates the secret for user and returns it as a TOTP url */ const getUserTfaKey = ( userId: string, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/users/${userId}/2fa`, options); }; /** * @summary GenerateUserTfaKey generates new or regenerates secret for the concrete user */ const generateUserTfaKey = ( userId: string, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post(`/users/${userId}/2fa`, undefined, options); }; // --- footer start return { getUserTfaKey, generateUserTfaKey, }; }; export type GetUserTfaKeyResult = AxiosResponse; export type GenerateUserTfaKeyResult = AxiosResponse; // --- footer end