2021-12-14 11:54:36 +01:00
|
|
|
import { get, post, put, del, ApiRequestConfig, ApiRequestQuery } from '../../services/request';
|
2021-12-09 14:18:38 +01:00
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
2021-12-14 11:54:36 +01:00
|
|
|
getEmpty: async (flavor?: string, config?: ApiRequestConfig) => await get("applications/empty", { ...config, params: { flavor }, system: true }),
|
2021-12-09 14:18:38 +01:00
|
|
|
|
2021-12-14 11:54:36 +01:00
|
|
|
getById: async (id: string, changeVector?: string, config?: ApiRequestConfig) => await get('applications/' + id, { ...config, params: { changeVector }, system: true }),
|
2021-12-09 14:18:38 +01:00
|
|
|
|
2021-12-14 11:54:36 +01:00
|
|
|
getByQuery: async (query: ApiRequestQuery, config?: ApiRequestConfig) => await get('applications', { ...config, params: { ...query }, system: true }),
|
2021-12-09 14:18:38 +01:00
|
|
|
|
2021-12-14 11:54:36 +01:00
|
|
|
create: async (model: any, config?: ApiRequestConfig) => await post('applications', model, { ...config, system: true }),
|
2021-12-09 14:18:38 +01:00
|
|
|
|
2021-12-14 11:54:36 +01:00
|
|
|
update: async (model: any, config?: ApiRequestConfig) => await put('applications/' + model.id, model, { ...config, system: true }),
|
2021-12-09 14:18:38 +01:00
|
|
|
|
2021-12-16 16:59:27 +01:00
|
|
|
delete: async (id: string, config?: ApiRequestConfig) => await del('applications/' + id, null, { ...config, system: true }),
|
2021-12-09 14:18:38 +01:00
|
|
|
};
|