1
|
/* 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
|
/**
|
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
|
/**
|
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
|
getCatalog = (query?: { name?: string; country?: string; type?: string }, params: RequestParams = {}) =>
|
69
|
this.request<CatalogItemDto[], any>({
|
70
|
path: `/catalog-items`,
|
71
|
method: "GET",
|
72
|
query: query,
|
73
|
...params,
|
74
|
});
|
75
|
/**
|
76
|
* No description
|
77
|
*
|
78
|
* @tags catalog-controller
|
79
|
* @name AddCatalogItem
|
80
|
* @summary creates new catalog item
|
81
|
* @request POST:/catalog-items
|
82
|
*/
|
83
|
addCatalogItem = (data: CatalogItemDto, params: RequestParams = {}) =>
|
84
|
this.request<void, any>({
|
85
|
path: `/catalog-items`,
|
86
|
method: "POST",
|
87
|
body: data,
|
88
|
type: ContentType.Json,
|
89
|
...params,
|
90
|
});
|
91
|
}
|