/** * 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 { ApiGetCustomerResponse, ApiLicenseUsageResponse, ApiLicenseUsersResponse, ApiServerInfoResponse, ApiUpdateCustomerResponse, GetCustomer2Params, GetCustomerParams, LicenseUsage2Params, LicenseUsage3Params, LicenseUsageParams, LicenseUsersParams, UpdateCustomerParams, } from '../_models'; // --- header start // export const // --- title start getCustomers = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * @summary rpc GetCertificate(CertificateUsageRequest) returns (CertificateUsageResponse) {} */ const getCustomer = ( params?: GetCustomerParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/customer`, { ...options, params: { ...params, ...options?.params, }, }); }; const updateCustomer = ( params?: UpdateCustomerParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put(`/customer`, undefined, { ...options, params: { ...params, ...options?.params, }, }); }; const licenseUsage = ( customerId: string, params?: LicenseUsageParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/customer/${customerId}/license`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary rpc GetCertificate(CertificateUsageRequest) returns (CertificateUsageResponse) {} */ const getCustomer2 = ( id: string, params?: GetCustomer2Params, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/customer/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; const licenseUsage2 = ( params?: LicenseUsage2Params, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/license`, { ...options, params: { ...params, ...options?.params, }, }); }; const licenseUsage3 = ( params?: LicenseUsage3Params, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/products`, { ...options, params: { ...params, ...options?.params, }, }); }; const licenseUsers = ( id: string, params?: LicenseUsersParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/products/${id}/users`, { ...options, params: { ...params, ...options?.params, }, }); }; const serverInfo = ( options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/srvinfo`, options); }; // --- footer start return { getCustomer, updateCustomer, licenseUsage, getCustomer2, licenseUsage2, licenseUsage3, licenseUsers, serverInfo, }; }; export type GetCustomerResult = AxiosResponse; export type UpdateCustomerResult = AxiosResponse; export type LicenseUsageResult = AxiosResponse; export type GetCustomer2Result = AxiosResponse; export type LicenseUsage2Result = AxiosResponse; export type LicenseUsage3Result = AxiosResponse; export type LicenseUsersResult = AxiosResponse; export type ServerInfoResult = AxiosResponse; // --- footer end