Projekt

Obecné

Profil

Stáhnout (2.61 KB) Statistiky
| Větev: | Tag: | Revize:
1 7e048a58 Schwobik
/* 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
      format: "json",
29
      ...params,
30
    });
31
  /**
32
   * No description
33
   *
34
   * @tags catalog-controller
35
   * @name UpdateCatalogItem
36
   * @summary updates catalog item with given ID
37
   * @request PUT:/catalog-items/{id}
38
   */
39
  updateCatalogItem = (id: string, data: CatalogItemDto, params: RequestParams = {}) =>
40
    this.request<void, any>({
41
      path: `/catalog-items/${id}`,
42
      method: "PUT",
43
      body: data,
44
      type: ContentType.Json,
45
      ...params,
46
    });
47
  /**
48
   * No description
49
   *
50
   * @tags catalog-controller
51
   * @name DeleteCatalogItem
52
   * @summary deletes catalog item with given ID
53
   * @request DELETE:/catalog-items/{id}
54
   */
55
  deleteCatalogItem = (id: string, params: RequestParams = {}) =>
56
    this.request<void, any>({
57
      path: `/catalog-items/${id}`,
58
      method: "DELETE",
59
      ...params,
60
    });
61
  /**
62
   * No description
63
   *
64
   * @tags catalog-controller
65
   * @name GetCatalog
66
   * @summary returns catalog items based on filter
67
   * @request GET:/catalog-items
68
   */
69
  getCatalog = (query?: { name?: string; country?: string; type?: string }, params: RequestParams = {}) =>
70
    this.request<CatalogItemDto[], any>({
71
      path: `/catalog-items`,
72
      method: "GET",
73
      query: query,
74
      ...params,
75
    });
76
  /**
77
   * No description
78
   *
79
   * @tags catalog-controller
80
   * @name AddCatalogItem
81
   * @summary creates new catalog item
82
   * @request POST:/catalog-items
83
   */
84
  addCatalogItem = (data: CatalogItemDto, params: RequestParams = {}) =>
85
    this.request<void, any>({
86
      path: `/catalog-items`,
87
      method: "POST",
88
      body: data,
89
      type: ContentType.Json,
90
      ...params,
91
    });
92
}