@my-market/contracts 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/.openapi-generator/FILES +63 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +121 -0
  5. package/api.ts +25 -0
  6. package/apis/auth-api.ts +201 -0
  7. package/apis/business-api.ts +535 -0
  8. package/apis/default-api.ts +470 -0
  9. package/apis/employees-api.ts +268 -0
  10. package/apis/products-api.ts +551 -0
  11. package/apis/users-api.ts +471 -0
  12. package/apis/warehouse-products-api.ts +198 -0
  13. package/apis/warehouses-api.ts +255 -0
  14. package/base.ts +62 -0
  15. package/common.ts +113 -0
  16. package/configuration.ts +121 -0
  17. package/dist/api.d.ts +19 -0
  18. package/dist/api.js +37 -0
  19. package/dist/apis/auth-api.d.ts +98 -0
  20. package/dist/apis/auth-api.js +196 -0
  21. package/dist/apis/business-api.d.ts +256 -0
  22. package/dist/apis/business-api.js +520 -0
  23. package/dist/apis/default-api.d.ts +227 -0
  24. package/dist/apis/default-api.js +460 -0
  25. package/dist/apis/employees-api.d.ts +132 -0
  26. package/dist/apis/employees-api.js +266 -0
  27. package/dist/apis/products-api.d.ts +257 -0
  28. package/dist/apis/products-api.js +525 -0
  29. package/dist/apis/users-api.d.ts +227 -0
  30. package/dist/apis/users-api.js +453 -0
  31. package/dist/apis/warehouse-products-api.d.ts +101 -0
  32. package/dist/apis/warehouse-products-api.js +198 -0
  33. package/dist/apis/warehouses-api.d.ts +128 -0
  34. package/dist/apis/warehouses-api.js +255 -0
  35. package/dist/base.d.ts +42 -0
  36. package/dist/base.js +49 -0
  37. package/dist/common.d.ts +28 -0
  38. package/dist/common.js +124 -0
  39. package/dist/configuration.d.ts +98 -0
  40. package/dist/configuration.js +44 -0
  41. package/dist/esm/api.d.ts +19 -0
  42. package/dist/esm/api.js +21 -0
  43. package/dist/esm/apis/auth-api.d.ts +97 -0
  44. package/dist/esm/apis/auth-api.js +186 -0
  45. package/dist/esm/apis/business-api.d.ts +255 -0
  46. package/dist/esm/apis/business-api.js +510 -0
  47. package/dist/esm/apis/default-api.d.ts +226 -0
  48. package/dist/esm/apis/default-api.js +450 -0
  49. package/dist/esm/apis/employees-api.d.ts +131 -0
  50. package/dist/esm/apis/employees-api.js +256 -0
  51. package/dist/esm/apis/products-api.d.ts +256 -0
  52. package/dist/esm/apis/products-api.js +515 -0
  53. package/dist/esm/apis/users-api.d.ts +226 -0
  54. package/dist/esm/apis/users-api.js +443 -0
  55. package/dist/esm/apis/warehouse-products-api.d.ts +100 -0
  56. package/dist/esm/apis/warehouse-products-api.js +188 -0
  57. package/dist/esm/apis/warehouses-api.d.ts +127 -0
  58. package/dist/esm/apis/warehouses-api.js +245 -0
  59. package/dist/esm/base.d.ts +42 -0
  60. package/dist/esm/base.js +41 -0
  61. package/dist/esm/common.d.ts +28 -0
  62. package/dist/esm/common.js +112 -0
  63. package/dist/esm/configuration.d.ts +98 -0
  64. package/dist/esm/configuration.js +40 -0
  65. package/dist/esm/index.d.ts +14 -0
  66. package/dist/esm/index.js +16 -0
  67. package/dist/esm/models/change-password-dto.d.ts +21 -0
  68. package/dist/esm/models/change-password-dto.js +14 -0
  69. package/dist/esm/models/change-warehouse-dto.d.ts +15 -0
  70. package/dist/esm/models/change-warehouse-dto.js +14 -0
  71. package/dist/esm/models/change-warehouse-item-dto.d.ts +33 -0
  72. package/dist/esm/models/change-warehouse-item-dto.js +14 -0
  73. package/dist/esm/models/create-business-dto.d.ts +17 -0
  74. package/dist/esm/models/create-business-dto.js +14 -0
  75. package/dist/esm/models/create-product-dto.d.ts +69 -0
  76. package/dist/esm/models/create-product-dto.js +14 -0
  77. package/dist/esm/models/create-warehouse-dto.d.ts +17 -0
  78. package/dist/esm/models/create-warehouse-dto.js +14 -0
  79. package/dist/esm/models/exception-dto.d.ts +16 -0
  80. package/dist/esm/models/exception-dto.js +14 -0
  81. package/dist/esm/models/forgot-password-dto.d.ts +17 -0
  82. package/dist/esm/models/forgot-password-dto.js +14 -0
  83. package/dist/esm/models/index.d.ts +17 -0
  84. package/dist/esm/models/index.js +17 -0
  85. package/dist/esm/models/login-user-body-dto.d.ts +21 -0
  86. package/dist/esm/models/login-user-body-dto.js +14 -0
  87. package/dist/esm/models/login-user-response-dto.d.ts +14 -0
  88. package/dist/esm/models/login-user-response-dto.js +14 -0
  89. package/dist/esm/models/logout-user-response-dto.d.ts +14 -0
  90. package/dist/esm/models/logout-user-response-dto.js +14 -0
  91. package/dist/esm/models/register-employee-dto.d.ts +29 -0
  92. package/dist/esm/models/register-employee-dto.js +14 -0
  93. package/dist/esm/models/register-owner-dto.d.ts +29 -0
  94. package/dist/esm/models/register-owner-dto.js +14 -0
  95. package/dist/esm/models/reset-password-dto.d.ts +21 -0
  96. package/dist/esm/models/reset-password-dto.js +14 -0
  97. package/dist/esm/models/sell-item-dto.d.ts +25 -0
  98. package/dist/esm/models/sell-item-dto.js +14 -0
  99. package/dist/esm/models/sell-product-dto.d.ts +18 -0
  100. package/dist/esm/models/sell-product-dto.js +14 -0
  101. package/dist/esm/models/update-product-dto.d.ts +65 -0
  102. package/dist/esm/models/update-product-dto.js +14 -0
  103. package/dist/index.d.ts +14 -0
  104. package/dist/index.js +32 -0
  105. package/dist/models/change-password-dto.d.ts +21 -0
  106. package/dist/models/change-password-dto.js +15 -0
  107. package/dist/models/change-warehouse-dto.d.ts +15 -0
  108. package/dist/models/change-warehouse-dto.js +15 -0
  109. package/dist/models/change-warehouse-item-dto.d.ts +33 -0
  110. package/dist/models/change-warehouse-item-dto.js +15 -0
  111. package/dist/models/create-business-dto.d.ts +17 -0
  112. package/dist/models/create-business-dto.js +15 -0
  113. package/dist/models/create-product-dto.d.ts +69 -0
  114. package/dist/models/create-product-dto.js +15 -0
  115. package/dist/models/create-warehouse-dto.d.ts +17 -0
  116. package/dist/models/create-warehouse-dto.js +15 -0
  117. package/dist/models/exception-dto.d.ts +16 -0
  118. package/dist/models/exception-dto.js +15 -0
  119. package/dist/models/forgot-password-dto.d.ts +17 -0
  120. package/dist/models/forgot-password-dto.js +15 -0
  121. package/dist/models/index.d.ts +17 -0
  122. package/dist/models/index.js +33 -0
  123. package/dist/models/login-user-body-dto.d.ts +21 -0
  124. package/dist/models/login-user-body-dto.js +15 -0
  125. package/dist/models/login-user-response-dto.d.ts +14 -0
  126. package/dist/models/login-user-response-dto.js +15 -0
  127. package/dist/models/logout-user-response-dto.d.ts +14 -0
  128. package/dist/models/logout-user-response-dto.js +15 -0
  129. package/dist/models/register-employee-dto.d.ts +29 -0
  130. package/dist/models/register-employee-dto.js +15 -0
  131. package/dist/models/register-owner-dto.d.ts +29 -0
  132. package/dist/models/register-owner-dto.js +15 -0
  133. package/dist/models/reset-password-dto.d.ts +21 -0
  134. package/dist/models/reset-password-dto.js +15 -0
  135. package/dist/models/sell-item-dto.d.ts +25 -0
  136. package/dist/models/sell-item-dto.js +15 -0
  137. package/dist/models/sell-product-dto.d.ts +18 -0
  138. package/dist/models/sell-product-dto.js +15 -0
  139. package/dist/models/update-product-dto.d.ts +65 -0
  140. package/dist/models/update-product-dto.js +15 -0
  141. package/docs/AuthApi.md +106 -0
  142. package/docs/BusinessApi.md +361 -0
  143. package/docs/ChangePasswordDto.md +22 -0
  144. package/docs/ChangeWarehouseDto.md +20 -0
  145. package/docs/ChangeWarehouseItemDto.md +28 -0
  146. package/docs/CreateBusinessDto.md +20 -0
  147. package/docs/CreateProductDto.md +46 -0
  148. package/docs/CreateWarehouseDto.md +20 -0
  149. package/docs/DefaultApi.md +315 -0
  150. package/docs/EmployeesApi.md +161 -0
  151. package/docs/ExceptionDto.md +24 -0
  152. package/docs/ForgotPasswordDto.md +20 -0
  153. package/docs/LoginUserBodyDto.md +22 -0
  154. package/docs/LoginUserResponseDto.md +20 -0
  155. package/docs/LogoutUserResponseDto.md +20 -0
  156. package/docs/ProductsApi.md +348 -0
  157. package/docs/RegisterEmployeeDto.md +26 -0
  158. package/docs/RegisterOwnerDto.md +26 -0
  159. package/docs/ResetPasswordDto.md +22 -0
  160. package/docs/SellItemDto.md +24 -0
  161. package/docs/SellProductDto.md +20 -0
  162. package/docs/UpdateProductDto.md +44 -0
  163. package/docs/UsersApi.md +310 -0
  164. package/docs/WarehouseProductsApi.md +111 -0
  165. package/docs/WarehousesApi.md +154 -0
  166. package/git_push.sh +57 -0
  167. package/index.ts +18 -0
  168. package/models/change-password-dto.ts +27 -0
  169. package/models/change-warehouse-dto.ts +23 -0
  170. package/models/change-warehouse-item-dto.ts +39 -0
  171. package/models/create-business-dto.ts +23 -0
  172. package/models/create-product-dto.ts +75 -0
  173. package/models/create-warehouse-dto.ts +23 -0
  174. package/models/exception-dto.ts +22 -0
  175. package/models/forgot-password-dto.ts +23 -0
  176. package/models/index.ts +17 -0
  177. package/models/login-user-body-dto.ts +27 -0
  178. package/models/login-user-response-dto.ts +20 -0
  179. package/models/logout-user-response-dto.ts +20 -0
  180. package/models/register-employee-dto.ts +35 -0
  181. package/models/register-owner-dto.ts +35 -0
  182. package/models/reset-password-dto.ts +27 -0
  183. package/models/sell-item-dto.ts +31 -0
  184. package/models/sell-product-dto.ts +26 -0
  185. package/models/update-product-dto.ts +71 -0
  186. package/package.json +33 -0
  187. package/tsconfig.esm.json +7 -0
  188. package/tsconfig.json +12 -0
@@ -0,0 +1,515 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * MyMarket API
5
+ * API для управления товарами и транзакциями
6
+ *
7
+ * The version of the OpenAPI document: 0.2
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
29
+ /**
30
+ * ProductsApi - axios parameter creator
31
+ */
32
+ export const ProductsApiAxiosParamCreator = function (configuration) {
33
+ return {
34
+ /**
35
+ *
36
+ * @summary Создать товар
37
+ * @param {CreateProductDto} createProductDto
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ */
41
+ productsControllerCreate: (createProductDto_1, ...args_1) => __awaiter(this, [createProductDto_1, ...args_1], void 0, function* (createProductDto, options = {}) {
42
+ // verify required parameter 'createProductDto' is not null or undefined
43
+ assertParamExists('productsControllerCreate', 'createProductDto', createProductDto);
44
+ const localVarPath = `/products`;
45
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
46
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
47
+ let baseOptions;
48
+ if (configuration) {
49
+ baseOptions = configuration.baseOptions;
50
+ }
51
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
52
+ const localVarHeaderParameter = {};
53
+ const localVarQueryParameter = {};
54
+ // authentication bearer required
55
+ // http bearer authentication required
56
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
57
+ localVarHeaderParameter['Content-Type'] = 'application/json';
58
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
59
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
60
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
61
+ localVarRequestOptions.data = serializeDataIfNeeded(createProductDto, localVarRequestOptions, configuration);
62
+ return {
63
+ url: toPathString(localVarUrlObj),
64
+ options: localVarRequestOptions,
65
+ };
66
+ }),
67
+ /**
68
+ *
69
+ * @summary Получить список товаров по складу? с пагинацией
70
+ * @param {number} [warehouseId] ID склада
71
+ * @param {number} [page] Номер страницы для пагинации
72
+ * @param {number} [limit] Количество элементов на странице
73
+ * @param {*} [options] Override http request option.
74
+ * @throws {RequiredError}
75
+ */
76
+ productsControllerFindAll: (warehouseId_1, page_1, limit_1, ...args_1) => __awaiter(this, [warehouseId_1, page_1, limit_1, ...args_1], void 0, function* (warehouseId, page, limit, options = {}) {
77
+ const localVarPath = `/products`;
78
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
79
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
80
+ let baseOptions;
81
+ if (configuration) {
82
+ baseOptions = configuration.baseOptions;
83
+ }
84
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
85
+ const localVarHeaderParameter = {};
86
+ const localVarQueryParameter = {};
87
+ // authentication bearer required
88
+ // http bearer authentication required
89
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
90
+ if (warehouseId !== undefined) {
91
+ localVarQueryParameter['warehouse_id'] = warehouseId;
92
+ }
93
+ if (page !== undefined) {
94
+ localVarQueryParameter['page'] = page;
95
+ }
96
+ if (limit !== undefined) {
97
+ localVarQueryParameter['limit'] = limit;
98
+ }
99
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
100
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
101
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
102
+ return {
103
+ url: toPathString(localVarUrlObj),
104
+ options: localVarRequestOptions,
105
+ };
106
+ }),
107
+ /**
108
+ *
109
+ * @summary Получить товар по ID
110
+ * @param {number} id
111
+ * @param {*} [options] Override http request option.
112
+ * @throws {RequiredError}
113
+ */
114
+ productsControllerFindOne: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
115
+ // verify required parameter 'id' is not null or undefined
116
+ assertParamExists('productsControllerFindOne', 'id', id);
117
+ const localVarPath = `/products/{id}`
118
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
119
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
120
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
121
+ let baseOptions;
122
+ if (configuration) {
123
+ baseOptions = configuration.baseOptions;
124
+ }
125
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
126
+ const localVarHeaderParameter = {};
127
+ const localVarQueryParameter = {};
128
+ // authentication bearer required
129
+ // http bearer authentication required
130
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
131
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
132
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
133
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
134
+ return {
135
+ url: toPathString(localVarUrlObj),
136
+ options: localVarRequestOptions,
137
+ };
138
+ }),
139
+ /**
140
+ *
141
+ * @summary Удалить товар
142
+ * @param {number} id ID товара
143
+ * @param {*} [options] Override http request option.
144
+ * @throws {RequiredError}
145
+ */
146
+ productsControllerRemove: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
147
+ // verify required parameter 'id' is not null or undefined
148
+ assertParamExists('productsControllerRemove', 'id', id);
149
+ const localVarPath = `/products/{id}`
150
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
151
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
152
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
153
+ let baseOptions;
154
+ if (configuration) {
155
+ baseOptions = configuration.baseOptions;
156
+ }
157
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
158
+ const localVarHeaderParameter = {};
159
+ const localVarQueryParameter = {};
160
+ // authentication bearer required
161
+ // http bearer authentication required
162
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
163
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
164
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
165
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
166
+ return {
167
+ url: toPathString(localVarUrlObj),
168
+ options: localVarRequestOptions,
169
+ };
170
+ }),
171
+ /**
172
+ * Поиск товаров по названию, штрихкоду или артикулу
173
+ * @summary Поиск товаров
174
+ * @param {string} [text] Значение поиска
175
+ * @param {string} [sort] Поле сортировки
176
+ * @param {string} [order] Тип сортировки
177
+ * @param {number} [page] Номер страницы для пагинации
178
+ * @param {number} [limit] Количество элементов на странице
179
+ * @param {*} [options] Override http request option.
180
+ * @throws {RequiredError}
181
+ */
182
+ productsControllerSearch: (text_1, sort_1, order_1, page_1, limit_1, ...args_1) => __awaiter(this, [text_1, sort_1, order_1, page_1, limit_1, ...args_1], void 0, function* (text, sort, order, page, limit, options = {}) {
183
+ const localVarPath = `/products/search`;
184
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
185
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
186
+ let baseOptions;
187
+ if (configuration) {
188
+ baseOptions = configuration.baseOptions;
189
+ }
190
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
191
+ const localVarHeaderParameter = {};
192
+ const localVarQueryParameter = {};
193
+ // authentication bearer required
194
+ // http bearer authentication required
195
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
196
+ if (text !== undefined) {
197
+ localVarQueryParameter['text'] = text;
198
+ }
199
+ if (sort !== undefined) {
200
+ localVarQueryParameter['sort'] = sort;
201
+ }
202
+ if (order !== undefined) {
203
+ localVarQueryParameter['order'] = order;
204
+ }
205
+ if (page !== undefined) {
206
+ localVarQueryParameter['page'] = page;
207
+ }
208
+ if (limit !== undefined) {
209
+ localVarQueryParameter['limit'] = limit;
210
+ }
211
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
212
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
213
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
214
+ return {
215
+ url: toPathString(localVarUrlObj),
216
+ options: localVarRequestOptions,
217
+ };
218
+ }),
219
+ /**
220
+ *
221
+ * @summary Обновить товар
222
+ * @param {number} id ID товара
223
+ * @param {UpdateProductDto} updateProductDto
224
+ * @param {*} [options] Override http request option.
225
+ * @throws {RequiredError}
226
+ */
227
+ productsControllerUpdate: (id_1, updateProductDto_1, ...args_1) => __awaiter(this, [id_1, updateProductDto_1, ...args_1], void 0, function* (id, updateProductDto, options = {}) {
228
+ // verify required parameter 'id' is not null or undefined
229
+ assertParamExists('productsControllerUpdate', 'id', id);
230
+ // verify required parameter 'updateProductDto' is not null or undefined
231
+ assertParamExists('productsControllerUpdate', 'updateProductDto', updateProductDto);
232
+ const localVarPath = `/products/{id}`
233
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
234
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
235
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
236
+ let baseOptions;
237
+ if (configuration) {
238
+ baseOptions = configuration.baseOptions;
239
+ }
240
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
241
+ const localVarHeaderParameter = {};
242
+ const localVarQueryParameter = {};
243
+ // authentication bearer required
244
+ // http bearer authentication required
245
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
246
+ localVarHeaderParameter['Content-Type'] = 'application/json';
247
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
248
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
249
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
250
+ localVarRequestOptions.data = serializeDataIfNeeded(updateProductDto, localVarRequestOptions, configuration);
251
+ return {
252
+ url: toPathString(localVarUrlObj),
253
+ options: localVarRequestOptions,
254
+ };
255
+ }),
256
+ };
257
+ };
258
+ /**
259
+ * ProductsApi - functional programming interface
260
+ */
261
+ export const ProductsApiFp = function (configuration) {
262
+ const localVarAxiosParamCreator = ProductsApiAxiosParamCreator(configuration);
263
+ return {
264
+ /**
265
+ *
266
+ * @summary Создать товар
267
+ * @param {CreateProductDto} createProductDto
268
+ * @param {*} [options] Override http request option.
269
+ * @throws {RequiredError}
270
+ */
271
+ productsControllerCreate(createProductDto, options) {
272
+ return __awaiter(this, void 0, void 0, function* () {
273
+ var _a, _b, _c;
274
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.productsControllerCreate(createProductDto, options);
275
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
276
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProductsApi.productsControllerCreate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
277
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
278
+ });
279
+ },
280
+ /**
281
+ *
282
+ * @summary Получить список товаров по складу? с пагинацией
283
+ * @param {number} [warehouseId] ID склада
284
+ * @param {number} [page] Номер страницы для пагинации
285
+ * @param {number} [limit] Количество элементов на странице
286
+ * @param {*} [options] Override http request option.
287
+ * @throws {RequiredError}
288
+ */
289
+ productsControllerFindAll(warehouseId, page, limit, options) {
290
+ return __awaiter(this, void 0, void 0, function* () {
291
+ var _a, _b, _c;
292
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.productsControllerFindAll(warehouseId, page, limit, options);
293
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
294
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProductsApi.productsControllerFindAll']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
295
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
296
+ });
297
+ },
298
+ /**
299
+ *
300
+ * @summary Получить товар по ID
301
+ * @param {number} id
302
+ * @param {*} [options] Override http request option.
303
+ * @throws {RequiredError}
304
+ */
305
+ productsControllerFindOne(id, options) {
306
+ return __awaiter(this, void 0, void 0, function* () {
307
+ var _a, _b, _c;
308
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.productsControllerFindOne(id, options);
309
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
310
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProductsApi.productsControllerFindOne']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
311
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
312
+ });
313
+ },
314
+ /**
315
+ *
316
+ * @summary Удалить товар
317
+ * @param {number} id ID товара
318
+ * @param {*} [options] Override http request option.
319
+ * @throws {RequiredError}
320
+ */
321
+ productsControllerRemove(id, options) {
322
+ return __awaiter(this, void 0, void 0, function* () {
323
+ var _a, _b, _c;
324
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.productsControllerRemove(id, options);
325
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
326
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProductsApi.productsControllerRemove']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
327
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
328
+ });
329
+ },
330
+ /**
331
+ * Поиск товаров по названию, штрихкоду или артикулу
332
+ * @summary Поиск товаров
333
+ * @param {string} [text] Значение поиска
334
+ * @param {string} [sort] Поле сортировки
335
+ * @param {string} [order] Тип сортировки
336
+ * @param {number} [page] Номер страницы для пагинации
337
+ * @param {number} [limit] Количество элементов на странице
338
+ * @param {*} [options] Override http request option.
339
+ * @throws {RequiredError}
340
+ */
341
+ productsControllerSearch(text, sort, order, page, limit, options) {
342
+ return __awaiter(this, void 0, void 0, function* () {
343
+ var _a, _b, _c;
344
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.productsControllerSearch(text, sort, order, page, limit, options);
345
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
346
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProductsApi.productsControllerSearch']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
347
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
348
+ });
349
+ },
350
+ /**
351
+ *
352
+ * @summary Обновить товар
353
+ * @param {number} id ID товара
354
+ * @param {UpdateProductDto} updateProductDto
355
+ * @param {*} [options] Override http request option.
356
+ * @throws {RequiredError}
357
+ */
358
+ productsControllerUpdate(id, updateProductDto, options) {
359
+ return __awaiter(this, void 0, void 0, function* () {
360
+ var _a, _b, _c;
361
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.productsControllerUpdate(id, updateProductDto, options);
362
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
363
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProductsApi.productsControllerUpdate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
364
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
365
+ });
366
+ },
367
+ };
368
+ };
369
+ /**
370
+ * ProductsApi - factory interface
371
+ */
372
+ export const ProductsApiFactory = function (configuration, basePath, axios) {
373
+ const localVarFp = ProductsApiFp(configuration);
374
+ return {
375
+ /**
376
+ *
377
+ * @summary Создать товар
378
+ * @param {CreateProductDto} createProductDto
379
+ * @param {*} [options] Override http request option.
380
+ * @throws {RequiredError}
381
+ */
382
+ productsControllerCreate(createProductDto, options) {
383
+ return localVarFp.productsControllerCreate(createProductDto, options).then((request) => request(axios, basePath));
384
+ },
385
+ /**
386
+ *
387
+ * @summary Получить список товаров по складу? с пагинацией
388
+ * @param {number} [warehouseId] ID склада
389
+ * @param {number} [page] Номер страницы для пагинации
390
+ * @param {number} [limit] Количество элементов на странице
391
+ * @param {*} [options] Override http request option.
392
+ * @throws {RequiredError}
393
+ */
394
+ productsControllerFindAll(warehouseId, page, limit, options) {
395
+ return localVarFp.productsControllerFindAll(warehouseId, page, limit, options).then((request) => request(axios, basePath));
396
+ },
397
+ /**
398
+ *
399
+ * @summary Получить товар по ID
400
+ * @param {number} id
401
+ * @param {*} [options] Override http request option.
402
+ * @throws {RequiredError}
403
+ */
404
+ productsControllerFindOne(id, options) {
405
+ return localVarFp.productsControllerFindOne(id, options).then((request) => request(axios, basePath));
406
+ },
407
+ /**
408
+ *
409
+ * @summary Удалить товар
410
+ * @param {number} id ID товара
411
+ * @param {*} [options] Override http request option.
412
+ * @throws {RequiredError}
413
+ */
414
+ productsControllerRemove(id, options) {
415
+ return localVarFp.productsControllerRemove(id, options).then((request) => request(axios, basePath));
416
+ },
417
+ /**
418
+ * Поиск товаров по названию, штрихкоду или артикулу
419
+ * @summary Поиск товаров
420
+ * @param {string} [text] Значение поиска
421
+ * @param {string} [sort] Поле сортировки
422
+ * @param {string} [order] Тип сортировки
423
+ * @param {number} [page] Номер страницы для пагинации
424
+ * @param {number} [limit] Количество элементов на странице
425
+ * @param {*} [options] Override http request option.
426
+ * @throws {RequiredError}
427
+ */
428
+ productsControllerSearch(text, sort, order, page, limit, options) {
429
+ return localVarFp.productsControllerSearch(text, sort, order, page, limit, options).then((request) => request(axios, basePath));
430
+ },
431
+ /**
432
+ *
433
+ * @summary Обновить товар
434
+ * @param {number} id ID товара
435
+ * @param {UpdateProductDto} updateProductDto
436
+ * @param {*} [options] Override http request option.
437
+ * @throws {RequiredError}
438
+ */
439
+ productsControllerUpdate(id, updateProductDto, options) {
440
+ return localVarFp.productsControllerUpdate(id, updateProductDto, options).then((request) => request(axios, basePath));
441
+ },
442
+ };
443
+ };
444
+ /**
445
+ * ProductsApi - object-oriented interface
446
+ */
447
+ export class ProductsApi extends BaseAPI {
448
+ /**
449
+ *
450
+ * @summary Создать товар
451
+ * @param {CreateProductDto} createProductDto
452
+ * @param {*} [options] Override http request option.
453
+ * @throws {RequiredError}
454
+ */
455
+ productsControllerCreate(createProductDto, options) {
456
+ return ProductsApiFp(this.configuration).productsControllerCreate(createProductDto, options).then((request) => request(this.axios, this.basePath));
457
+ }
458
+ /**
459
+ *
460
+ * @summary Получить список товаров по складу? с пагинацией
461
+ * @param {number} [warehouseId] ID склада
462
+ * @param {number} [page] Номер страницы для пагинации
463
+ * @param {number} [limit] Количество элементов на странице
464
+ * @param {*} [options] Override http request option.
465
+ * @throws {RequiredError}
466
+ */
467
+ productsControllerFindAll(warehouseId, page, limit, options) {
468
+ return ProductsApiFp(this.configuration).productsControllerFindAll(warehouseId, page, limit, options).then((request) => request(this.axios, this.basePath));
469
+ }
470
+ /**
471
+ *
472
+ * @summary Получить товар по ID
473
+ * @param {number} id
474
+ * @param {*} [options] Override http request option.
475
+ * @throws {RequiredError}
476
+ */
477
+ productsControllerFindOne(id, options) {
478
+ return ProductsApiFp(this.configuration).productsControllerFindOne(id, options).then((request) => request(this.axios, this.basePath));
479
+ }
480
+ /**
481
+ *
482
+ * @summary Удалить товар
483
+ * @param {number} id ID товара
484
+ * @param {*} [options] Override http request option.
485
+ * @throws {RequiredError}
486
+ */
487
+ productsControllerRemove(id, options) {
488
+ return ProductsApiFp(this.configuration).productsControllerRemove(id, options).then((request) => request(this.axios, this.basePath));
489
+ }
490
+ /**
491
+ * Поиск товаров по названию, штрихкоду или артикулу
492
+ * @summary Поиск товаров
493
+ * @param {string} [text] Значение поиска
494
+ * @param {string} [sort] Поле сортировки
495
+ * @param {string} [order] Тип сортировки
496
+ * @param {number} [page] Номер страницы для пагинации
497
+ * @param {number} [limit] Количество элементов на странице
498
+ * @param {*} [options] Override http request option.
499
+ * @throws {RequiredError}
500
+ */
501
+ productsControllerSearch(text, sort, order, page, limit, options) {
502
+ return ProductsApiFp(this.configuration).productsControllerSearch(text, sort, order, page, limit, options).then((request) => request(this.axios, this.basePath));
503
+ }
504
+ /**
505
+ *
506
+ * @summary Обновить товар
507
+ * @param {number} id ID товара
508
+ * @param {UpdateProductDto} updateProductDto
509
+ * @param {*} [options] Override http request option.
510
+ * @throws {RequiredError}
511
+ */
512
+ productsControllerUpdate(id, updateProductDto, options) {
513
+ return ProductsApiFp(this.configuration).productsControllerUpdate(id, updateProductDto, options).then((request) => request(this.axios, this.basePath));
514
+ }
515
+ }