/** * 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 { CreateSpaceSpacesParams, DeleteSpaceSpacesParams, KnowledgebaseInputSpace, KnowledgebaseSpace, KnowledgebaseSpaceList, ListSpacesSpacesParams, LocateSpaceSpacesParams, UpdateSpaceSpacesBody, UpdateSpaceSpacesParams, } from '../_models'; // --- header start // export const // --- title start getSpaces = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * | Field | Type * | ----------- | ---- * | **----------- READ-ONLY -----------** | * | `id` | int64 * | `ver` | int32 * | `etag` | string * | **---------- OPERATIONAL ----------** | * | `created_at` | int64(epoch:milli) * | `created_by` | lookup(user) * | `updated_at` | int64(epoch:milli) * | `updated_by` | lookup(user) * | **---------- ATTRIBUTES -----------** | * | `name` | name! * | `home_page` | string (home_page) * | `state` | bool * | `has_children`| bool */ const listSpacesSpaces = ( params?: ListSpacesSpacesParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/spaces`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Create NEW Space */ const createSpaceSpaces = ( knowledgebaseInputSpace: KnowledgebaseInputSpace[], params?: CreateSpaceSpacesParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post(`/spaces`, knowledgebaseInputSpace, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Remove Space source */ const deleteSpaceSpaces = ( etag: string, params?: DeleteSpaceSpacesParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete(`/spaces/${etag}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Locate spaces source */ const locateSpaceSpaces = ( etag: string, params?: LocateSpaceSpacesParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/spaces/${etag}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary NEW Update of the Space source */ const updateSpaceSpaces = ( etag: string, updateSpaceSpacesBody: UpdateSpaceSpacesBody, params?: UpdateSpaceSpacesParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.patch(`/spaces/${etag}`, updateSpaceSpacesBody, { ...options, params: { ...params, ...options?.params, }, }); }; // --- footer start return { listSpacesSpaces, createSpaceSpaces, deleteSpaceSpaces, locateSpaceSpaces, updateSpaceSpaces, }; }; export type ListSpacesSpacesResult = AxiosResponse; export type CreateSpaceSpacesResult = AxiosResponse; export type DeleteSpaceSpacesResult = AxiosResponse; export type LocateSpaceSpacesResult = AxiosResponse; export type UpdateSpaceSpacesResult = AxiosResponse; // --- footer end