1 |
a69da1e3
|
Vaclav Honzik
|
/* eslint-disable */
|
2 |
|
|
/* tslint:disable */
|
3 |
|
|
/*
|
4 |
|
|
* ---------------------------------------------------------------
|
5 |
|
|
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
6 |
|
|
* ## ##
|
7 |
|
|
* ## AUTHOR: acacode ##
|
8 |
|
|
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
9 |
|
|
* ---------------------------------------------------------------
|
10 |
|
|
*/
|
11 |
|
|
|
12 |
|
|
import { CatalogItemDto } from "./data-contracts";
|
13 |
|
|
import { ContentType, HttpClient, RequestParams } from "./http-client";
|
14 |
|
|
|
15 |
|
|
export class CatalogItems<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
|
16 |
0d941c5e
|
Jakub Smid
|
/**
|
17 |
|
|
* No description
|
18 |
|
|
*
|
19 |
|
|
* @tags catalog-controller
|
20 |
|
|
* @name GetCatalogItem
|
21 |
|
|
* @summary returns catalog item with given ID
|
22 |
|
|
* @request GET:/catalog-items/{id}
|
23 |
|
|
*/
|
24 |
|
|
getCatalogItem = (id: string, params: RequestParams = {}) =>
|
25 |
|
|
this.request<CatalogItemDto, any>({
|
26 |
|
|
path: `/catalog-items/${id}`,
|
27 |
|
|
method: "GET",
|
28 |
|
|
...params,
|
29 |
|
|
});
|
30 |
a69da1e3
|
Vaclav Honzik
|
/**
|
31 |
|
|
* No description
|
32 |
|
|
*
|
33 |
|
|
* @tags catalog-controller
|
34 |
|
|
* @name UpdateCatalogItem
|
35 |
|
|
* @summary updates catalog item with given ID
|
36 |
|
|
* @request PUT:/catalog-items/{id}
|
37 |
|
|
*/
|
38 |
|
|
updateCatalogItem = (id: string, data: CatalogItemDto, params: RequestParams = {}) =>
|
39 |
|
|
this.request<void, any>({
|
40 |
|
|
path: `/catalog-items/${id}`,
|
41 |
|
|
method: "PUT",
|
42 |
|
|
body: data,
|
43 |
|
|
type: ContentType.Json,
|
44 |
|
|
...params,
|
45 |
|
|
});
|
46 |
|
|
/**
|
47 |
|
|
* No description
|
48 |
|
|
*
|
49 |
|
|
* @tags catalog-controller
|
50 |
|
|
* @name DeleteCatalogItem
|
51 |
|
|
* @summary deletes catalog item with given ID
|
52 |
|
|
* @request DELETE:/catalog-items/{id}
|
53 |
|
|
*/
|
54 |
|
|
deleteCatalogItem = (id: string, params: RequestParams = {}) =>
|
55 |
|
|
this.request<void, any>({
|
56 |
|
|
path: `/catalog-items/${id}`,
|
57 |
|
|
method: "DELETE",
|
58 |
|
|
...params,
|
59 |
|
|
});
|
60 |
|
|
/**
|
61 |
|
|
* No description
|
62 |
|
|
*
|
63 |
|
|
* @tags catalog-controller
|
64 |
|
|
* @name GetCatalog
|
65 |
|
|
* @summary returns catalog items based on filter
|
66 |
|
|
* @request GET:/catalog-items
|
67 |
|
|
*/
|
68 |
dda6e56e
|
Vaclav Honzik
|
getCatalog = (
|
69 |
|
|
query?: { name?: string; country?: string; type?: string; writtenForm?: string },
|
70 |
|
|
params: RequestParams = {},
|
71 |
|
|
) =>
|
72 |
a69da1e3
|
Vaclav Honzik
|
this.request<CatalogItemDto[], any>({
|
73 |
|
|
path: `/catalog-items`,
|
74 |
|
|
method: "GET",
|
75 |
|
|
query: query,
|
76 |
|
|
...params,
|
77 |
|
|
});
|
78 |
|
|
/**
|
79 |
|
|
* No description
|
80 |
|
|
*
|
81 |
|
|
* @tags catalog-controller
|
82 |
|
|
* @name AddCatalogItem
|
83 |
|
|
* @summary creates new catalog item
|
84 |
|
|
* @request POST:/catalog-items
|
85 |
|
|
*/
|
86 |
|
|
addCatalogItem = (data: CatalogItemDto, params: RequestParams = {}) =>
|
87 |
|
|
this.request<void, any>({
|
88 |
|
|
path: `/catalog-items`,
|
89 |
|
|
method: "POST",
|
90 |
|
|
body: data,
|
91 |
|
|
type: ContentType.Json,
|
92 |
|
|
...params,
|
93 |
|
|
});
|
94 |
|
|
}
|