/** * 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 { ApiDeleteOAuthServiceRequest, ApiDeleteOAuthServiceResponse, ApiOAuthService, ApiSearchOAuthServiceResponse, LocateOAuthServiceParams, OAuth2FederationDeleteOAuthServiceBody, SearchOAuthServiceParams, UpdateOAuthService2Params, UpdateOAuthServiceParams, } from '../_models'; // --- header start // export const // --- title start getOauth2Federation = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end const deleteOAuthService = ( apiDeleteOAuthServiceRequest: ApiDeleteOAuthServiceRequest, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete(`/oauth/apps`, { data: apiDeleteOAuthServiceRequest, ...options, }); }; const searchOAuthService = ( params?: SearchOAuthServiceParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/oauth/apps`, { ...options, params: { ...params, ...options?.params, }, }); }; const createOAuthService = ( apiOAuthService: ApiOAuthService, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post(`/oauth/apps`, apiOAuthService, options); }; const deleteOAuthService2 = ( id: string[], oAuth2FederationDeleteOAuthServiceBody: OAuth2FederationDeleteOAuthServiceBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete(`/oauth/apps/${id}`, { data: oAuth2FederationDeleteOAuthServiceBody, ...options, }); }; const locateOAuthService = ( id: string[], params?: LocateOAuthServiceParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/oauth/apps/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; const updateOAuthService2 = ( id: string, apiOAuthService: ApiOAuthService, params?: UpdateOAuthService2Params, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.patch(`/oauth/apps/${id}`, apiOAuthService, { ...options, params: { ...params, ...options?.params, }, }); }; const updateOAuthService = ( id: string, apiOAuthService: ApiOAuthService, params?: UpdateOAuthServiceParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put(`/oauth/apps/${id}`, apiOAuthService, { ...options, params: { ...params, ...options?.params, }, }); }; // --- footer start return { deleteOAuthService, searchOAuthService, createOAuthService, deleteOAuthService2, locateOAuthService, updateOAuthService2, updateOAuthService, }; }; export type DeleteOAuthServiceResult = AxiosResponse; export type SearchOAuthServiceResult = AxiosResponse; export type CreateOAuthServiceResult = AxiosResponse; export type DeleteOAuthService2Result = AxiosResponse; export type LocateOAuthServiceResult = AxiosResponse; export type UpdateOAuthService2Result = AxiosResponse; export type UpdateOAuthServiceResult = AxiosResponse; // --- footer end