Projekt

Obecné

Profil

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