@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.
- package/.openapi-generator/FILES +63 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +121 -0
- package/api.ts +25 -0
- package/apis/auth-api.ts +201 -0
- package/apis/business-api.ts +535 -0
- package/apis/default-api.ts +470 -0
- package/apis/employees-api.ts +268 -0
- package/apis/products-api.ts +551 -0
- package/apis/users-api.ts +471 -0
- package/apis/warehouse-products-api.ts +198 -0
- package/apis/warehouses-api.ts +255 -0
- package/base.ts +62 -0
- package/common.ts +113 -0
- package/configuration.ts +121 -0
- package/dist/api.d.ts +19 -0
- package/dist/api.js +37 -0
- package/dist/apis/auth-api.d.ts +98 -0
- package/dist/apis/auth-api.js +196 -0
- package/dist/apis/business-api.d.ts +256 -0
- package/dist/apis/business-api.js +520 -0
- package/dist/apis/default-api.d.ts +227 -0
- package/dist/apis/default-api.js +460 -0
- package/dist/apis/employees-api.d.ts +132 -0
- package/dist/apis/employees-api.js +266 -0
- package/dist/apis/products-api.d.ts +257 -0
- package/dist/apis/products-api.js +525 -0
- package/dist/apis/users-api.d.ts +227 -0
- package/dist/apis/users-api.js +453 -0
- package/dist/apis/warehouse-products-api.d.ts +101 -0
- package/dist/apis/warehouse-products-api.js +198 -0
- package/dist/apis/warehouses-api.d.ts +128 -0
- package/dist/apis/warehouses-api.js +255 -0
- package/dist/base.d.ts +42 -0
- package/dist/base.js +49 -0
- package/dist/common.d.ts +28 -0
- package/dist/common.js +124 -0
- package/dist/configuration.d.ts +98 -0
- package/dist/configuration.js +44 -0
- package/dist/esm/api.d.ts +19 -0
- package/dist/esm/api.js +21 -0
- package/dist/esm/apis/auth-api.d.ts +97 -0
- package/dist/esm/apis/auth-api.js +186 -0
- package/dist/esm/apis/business-api.d.ts +255 -0
- package/dist/esm/apis/business-api.js +510 -0
- package/dist/esm/apis/default-api.d.ts +226 -0
- package/dist/esm/apis/default-api.js +450 -0
- package/dist/esm/apis/employees-api.d.ts +131 -0
- package/dist/esm/apis/employees-api.js +256 -0
- package/dist/esm/apis/products-api.d.ts +256 -0
- package/dist/esm/apis/products-api.js +515 -0
- package/dist/esm/apis/users-api.d.ts +226 -0
- package/dist/esm/apis/users-api.js +443 -0
- package/dist/esm/apis/warehouse-products-api.d.ts +100 -0
- package/dist/esm/apis/warehouse-products-api.js +188 -0
- package/dist/esm/apis/warehouses-api.d.ts +127 -0
- package/dist/esm/apis/warehouses-api.js +245 -0
- package/dist/esm/base.d.ts +42 -0
- package/dist/esm/base.js +41 -0
- package/dist/esm/common.d.ts +28 -0
- package/dist/esm/common.js +112 -0
- package/dist/esm/configuration.d.ts +98 -0
- package/dist/esm/configuration.js +40 -0
- package/dist/esm/index.d.ts +14 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/models/change-password-dto.d.ts +21 -0
- package/dist/esm/models/change-password-dto.js +14 -0
- package/dist/esm/models/change-warehouse-dto.d.ts +15 -0
- package/dist/esm/models/change-warehouse-dto.js +14 -0
- package/dist/esm/models/change-warehouse-item-dto.d.ts +33 -0
- package/dist/esm/models/change-warehouse-item-dto.js +14 -0
- package/dist/esm/models/create-business-dto.d.ts +17 -0
- package/dist/esm/models/create-business-dto.js +14 -0
- package/dist/esm/models/create-product-dto.d.ts +69 -0
- package/dist/esm/models/create-product-dto.js +14 -0
- package/dist/esm/models/create-warehouse-dto.d.ts +17 -0
- package/dist/esm/models/create-warehouse-dto.js +14 -0
- package/dist/esm/models/exception-dto.d.ts +16 -0
- package/dist/esm/models/exception-dto.js +14 -0
- package/dist/esm/models/forgot-password-dto.d.ts +17 -0
- package/dist/esm/models/forgot-password-dto.js +14 -0
- package/dist/esm/models/index.d.ts +17 -0
- package/dist/esm/models/index.js +17 -0
- package/dist/esm/models/login-user-body-dto.d.ts +21 -0
- package/dist/esm/models/login-user-body-dto.js +14 -0
- package/dist/esm/models/login-user-response-dto.d.ts +14 -0
- package/dist/esm/models/login-user-response-dto.js +14 -0
- package/dist/esm/models/logout-user-response-dto.d.ts +14 -0
- package/dist/esm/models/logout-user-response-dto.js +14 -0
- package/dist/esm/models/register-employee-dto.d.ts +29 -0
- package/dist/esm/models/register-employee-dto.js +14 -0
- package/dist/esm/models/register-owner-dto.d.ts +29 -0
- package/dist/esm/models/register-owner-dto.js +14 -0
- package/dist/esm/models/reset-password-dto.d.ts +21 -0
- package/dist/esm/models/reset-password-dto.js +14 -0
- package/dist/esm/models/sell-item-dto.d.ts +25 -0
- package/dist/esm/models/sell-item-dto.js +14 -0
- package/dist/esm/models/sell-product-dto.d.ts +18 -0
- package/dist/esm/models/sell-product-dto.js +14 -0
- package/dist/esm/models/update-product-dto.d.ts +65 -0
- package/dist/esm/models/update-product-dto.js +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +32 -0
- package/dist/models/change-password-dto.d.ts +21 -0
- package/dist/models/change-password-dto.js +15 -0
- package/dist/models/change-warehouse-dto.d.ts +15 -0
- package/dist/models/change-warehouse-dto.js +15 -0
- package/dist/models/change-warehouse-item-dto.d.ts +33 -0
- package/dist/models/change-warehouse-item-dto.js +15 -0
- package/dist/models/create-business-dto.d.ts +17 -0
- package/dist/models/create-business-dto.js +15 -0
- package/dist/models/create-product-dto.d.ts +69 -0
- package/dist/models/create-product-dto.js +15 -0
- package/dist/models/create-warehouse-dto.d.ts +17 -0
- package/dist/models/create-warehouse-dto.js +15 -0
- package/dist/models/exception-dto.d.ts +16 -0
- package/dist/models/exception-dto.js +15 -0
- package/dist/models/forgot-password-dto.d.ts +17 -0
- package/dist/models/forgot-password-dto.js +15 -0
- package/dist/models/index.d.ts +17 -0
- package/dist/models/index.js +33 -0
- package/dist/models/login-user-body-dto.d.ts +21 -0
- package/dist/models/login-user-body-dto.js +15 -0
- package/dist/models/login-user-response-dto.d.ts +14 -0
- package/dist/models/login-user-response-dto.js +15 -0
- package/dist/models/logout-user-response-dto.d.ts +14 -0
- package/dist/models/logout-user-response-dto.js +15 -0
- package/dist/models/register-employee-dto.d.ts +29 -0
- package/dist/models/register-employee-dto.js +15 -0
- package/dist/models/register-owner-dto.d.ts +29 -0
- package/dist/models/register-owner-dto.js +15 -0
- package/dist/models/reset-password-dto.d.ts +21 -0
- package/dist/models/reset-password-dto.js +15 -0
- package/dist/models/sell-item-dto.d.ts +25 -0
- package/dist/models/sell-item-dto.js +15 -0
- package/dist/models/sell-product-dto.d.ts +18 -0
- package/dist/models/sell-product-dto.js +15 -0
- package/dist/models/update-product-dto.d.ts +65 -0
- package/dist/models/update-product-dto.js +15 -0
- package/docs/AuthApi.md +106 -0
- package/docs/BusinessApi.md +361 -0
- package/docs/ChangePasswordDto.md +22 -0
- package/docs/ChangeWarehouseDto.md +20 -0
- package/docs/ChangeWarehouseItemDto.md +28 -0
- package/docs/CreateBusinessDto.md +20 -0
- package/docs/CreateProductDto.md +46 -0
- package/docs/CreateWarehouseDto.md +20 -0
- package/docs/DefaultApi.md +315 -0
- package/docs/EmployeesApi.md +161 -0
- package/docs/ExceptionDto.md +24 -0
- package/docs/ForgotPasswordDto.md +20 -0
- package/docs/LoginUserBodyDto.md +22 -0
- package/docs/LoginUserResponseDto.md +20 -0
- package/docs/LogoutUserResponseDto.md +20 -0
- package/docs/ProductsApi.md +348 -0
- package/docs/RegisterEmployeeDto.md +26 -0
- package/docs/RegisterOwnerDto.md +26 -0
- package/docs/ResetPasswordDto.md +22 -0
- package/docs/SellItemDto.md +24 -0
- package/docs/SellProductDto.md +20 -0
- package/docs/UpdateProductDto.md +44 -0
- package/docs/UsersApi.md +310 -0
- package/docs/WarehouseProductsApi.md +111 -0
- package/docs/WarehousesApi.md +154 -0
- package/git_push.sh +57 -0
- package/index.ts +18 -0
- package/models/change-password-dto.ts +27 -0
- package/models/change-warehouse-dto.ts +23 -0
- package/models/change-warehouse-item-dto.ts +39 -0
- package/models/create-business-dto.ts +23 -0
- package/models/create-product-dto.ts +75 -0
- package/models/create-warehouse-dto.ts +23 -0
- package/models/exception-dto.ts +22 -0
- package/models/forgot-password-dto.ts +23 -0
- package/models/index.ts +17 -0
- package/models/login-user-body-dto.ts +27 -0
- package/models/login-user-response-dto.ts +20 -0
- package/models/logout-user-response-dto.ts +20 -0
- package/models/register-employee-dto.ts +35 -0
- package/models/register-owner-dto.ts +35 -0
- package/models/reset-password-dto.ts +27 -0
- package/models/sell-item-dto.ts +31 -0
- package/models/sell-product-dto.ts +26 -0
- package/models/update-product-dto.ts +71 -0
- package/package.json +33 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +12 -0
|
@@ -0,0 +1,535 @@
|
|
|
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
|
+
|
|
15
|
+
|
|
16
|
+
import type { Configuration } from '../configuration';
|
|
17
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
18
|
+
import globalAxios from 'axios';
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
import type { CreateBusinessDto } from '../models';
|
|
26
|
+
/**
|
|
27
|
+
* BusinessApi - axios parameter creator
|
|
28
|
+
*/
|
|
29
|
+
export const BusinessApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
30
|
+
return {
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @summary Создать бизнес
|
|
34
|
+
* @param {CreateBusinessDto} createBusinessDto
|
|
35
|
+
* @param {*} [options] Override http request option.
|
|
36
|
+
* @throws {RequiredError}
|
|
37
|
+
*/
|
|
38
|
+
businessesControllerCreate: async (createBusinessDto: CreateBusinessDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
39
|
+
// verify required parameter 'createBusinessDto' is not null or undefined
|
|
40
|
+
assertParamExists('businessesControllerCreate', 'createBusinessDto', createBusinessDto)
|
|
41
|
+
const localVarPath = `/business`;
|
|
42
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
43
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
44
|
+
let baseOptions;
|
|
45
|
+
if (configuration) {
|
|
46
|
+
baseOptions = configuration.baseOptions;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
50
|
+
const localVarHeaderParameter = {} as any;
|
|
51
|
+
const localVarQueryParameter = {} as any;
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
56
|
+
|
|
57
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
58
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
59
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
60
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createBusinessDto, localVarRequestOptions, configuration)
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
url: toPathString(localVarUrlObj),
|
|
64
|
+
options: localVarRequestOptions,
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @summary Удалить сотрудника по локальному ID
|
|
70
|
+
* @param {number} employeeId
|
|
71
|
+
* @param {*} [options] Override http request option.
|
|
72
|
+
* @throws {RequiredError}
|
|
73
|
+
*/
|
|
74
|
+
businessesControllerDeleteEmployee: async (employeeId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
75
|
+
// verify required parameter 'employeeId' is not null or undefined
|
|
76
|
+
assertParamExists('businessesControllerDeleteEmployee', 'employeeId', employeeId)
|
|
77
|
+
const localVarPath = `/business/employees`;
|
|
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
|
+
|
|
85
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
86
|
+
const localVarHeaderParameter = {} as any;
|
|
87
|
+
const localVarQueryParameter = {} as any;
|
|
88
|
+
|
|
89
|
+
if (employeeId !== undefined) {
|
|
90
|
+
localVarQueryParameter['employee_id'] = employeeId;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
96
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
97
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
url: toPathString(localVarUrlObj),
|
|
101
|
+
options: localVarRequestOptions,
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @summary Получить информацию о бизнесе
|
|
107
|
+
* @param {*} [options] Override http request option.
|
|
108
|
+
* @throws {RequiredError}
|
|
109
|
+
*/
|
|
110
|
+
businessesControllerFind: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
111
|
+
const localVarPath = `/business`;
|
|
112
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
113
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
114
|
+
let baseOptions;
|
|
115
|
+
if (configuration) {
|
|
116
|
+
baseOptions = configuration.baseOptions;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
120
|
+
const localVarHeaderParameter = {} as any;
|
|
121
|
+
const localVarQueryParameter = {} as any;
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
126
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
127
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
128
|
+
|
|
129
|
+
return {
|
|
130
|
+
url: toPathString(localVarUrlObj),
|
|
131
|
+
options: localVarRequestOptions,
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
/**
|
|
135
|
+
*
|
|
136
|
+
* @summary Получить список сотрудников
|
|
137
|
+
* @param {string} employeeId
|
|
138
|
+
* @param {*} [options] Override http request option.
|
|
139
|
+
* @throws {RequiredError}
|
|
140
|
+
*/
|
|
141
|
+
businessesControllerGetEmployees: async (employeeId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
142
|
+
// verify required parameter 'employeeId' is not null or undefined
|
|
143
|
+
assertParamExists('businessesControllerGetEmployees', 'employeeId', employeeId)
|
|
144
|
+
const localVarPath = `/business/employees`;
|
|
145
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
146
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
147
|
+
let baseOptions;
|
|
148
|
+
if (configuration) {
|
|
149
|
+
baseOptions = configuration.baseOptions;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
153
|
+
const localVarHeaderParameter = {} as any;
|
|
154
|
+
const localVarQueryParameter = {} as any;
|
|
155
|
+
|
|
156
|
+
if (employeeId !== undefined) {
|
|
157
|
+
localVarQueryParameter['employee_id'] = employeeId;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
163
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
164
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
165
|
+
|
|
166
|
+
return {
|
|
167
|
+
url: toPathString(localVarUrlObj),
|
|
168
|
+
options: localVarRequestOptions,
|
|
169
|
+
};
|
|
170
|
+
},
|
|
171
|
+
/**
|
|
172
|
+
*
|
|
173
|
+
* @summary Получить список складов
|
|
174
|
+
* @param {*} [options] Override http request option.
|
|
175
|
+
* @throws {RequiredError}
|
|
176
|
+
*/
|
|
177
|
+
businessesControllerGetWarehouses: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
178
|
+
const localVarPath = `/business/warehouses`;
|
|
179
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
180
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
181
|
+
let baseOptions;
|
|
182
|
+
if (configuration) {
|
|
183
|
+
baseOptions = configuration.baseOptions;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
187
|
+
const localVarHeaderParameter = {} as any;
|
|
188
|
+
const localVarQueryParameter = {} as any;
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
193
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
194
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
195
|
+
|
|
196
|
+
return {
|
|
197
|
+
url: toPathString(localVarUrlObj),
|
|
198
|
+
options: localVarRequestOptions,
|
|
199
|
+
};
|
|
200
|
+
},
|
|
201
|
+
/**
|
|
202
|
+
*
|
|
203
|
+
* @summary Удалить бизнес по ID (НЕПРАВИЛЬНЫЙ)
|
|
204
|
+
* @param {string} id
|
|
205
|
+
* @param {*} [options] Override http request option.
|
|
206
|
+
* @throws {RequiredError}
|
|
207
|
+
*/
|
|
208
|
+
businessesControllerRemove: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
209
|
+
// verify required parameter 'id' is not null or undefined
|
|
210
|
+
assertParamExists('businessesControllerRemove', 'id', id)
|
|
211
|
+
const localVarPath = `/business/{id}`
|
|
212
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
213
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
214
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
215
|
+
let baseOptions;
|
|
216
|
+
if (configuration) {
|
|
217
|
+
baseOptions = configuration.baseOptions;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
221
|
+
const localVarHeaderParameter = {} as any;
|
|
222
|
+
const localVarQueryParameter = {} as any;
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
227
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
228
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
229
|
+
|
|
230
|
+
return {
|
|
231
|
+
url: toPathString(localVarUrlObj),
|
|
232
|
+
options: localVarRequestOptions,
|
|
233
|
+
};
|
|
234
|
+
},
|
|
235
|
+
/**
|
|
236
|
+
*
|
|
237
|
+
* @summary Изменить информацию о бизнесе
|
|
238
|
+
* @param {string} id
|
|
239
|
+
* @param {object} body
|
|
240
|
+
* @param {*} [options] Override http request option.
|
|
241
|
+
* @throws {RequiredError}
|
|
242
|
+
*/
|
|
243
|
+
businessesControllerUpdate: async (id: string, body: object, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
244
|
+
// verify required parameter 'id' is not null or undefined
|
|
245
|
+
assertParamExists('businessesControllerUpdate', 'id', id)
|
|
246
|
+
// verify required parameter 'body' is not null or undefined
|
|
247
|
+
assertParamExists('businessesControllerUpdate', 'body', body)
|
|
248
|
+
const localVarPath = `/business/{id}`
|
|
249
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
250
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
251
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
252
|
+
let baseOptions;
|
|
253
|
+
if (configuration) {
|
|
254
|
+
baseOptions = configuration.baseOptions;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
258
|
+
const localVarHeaderParameter = {} as any;
|
|
259
|
+
const localVarQueryParameter = {} as any;
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
264
|
+
|
|
265
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
266
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
267
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
268
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
|
|
269
|
+
|
|
270
|
+
return {
|
|
271
|
+
url: toPathString(localVarUrlObj),
|
|
272
|
+
options: localVarRequestOptions,
|
|
273
|
+
};
|
|
274
|
+
},
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* BusinessApi - functional programming interface
|
|
280
|
+
*/
|
|
281
|
+
export const BusinessApiFp = function(configuration?: Configuration) {
|
|
282
|
+
const localVarAxiosParamCreator = BusinessApiAxiosParamCreator(configuration)
|
|
283
|
+
return {
|
|
284
|
+
/**
|
|
285
|
+
*
|
|
286
|
+
* @summary Создать бизнес
|
|
287
|
+
* @param {CreateBusinessDto} createBusinessDto
|
|
288
|
+
* @param {*} [options] Override http request option.
|
|
289
|
+
* @throws {RequiredError}
|
|
290
|
+
*/
|
|
291
|
+
async businessesControllerCreate(createBusinessDto: CreateBusinessDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
292
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.businessesControllerCreate(createBusinessDto, options);
|
|
293
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
294
|
+
const localVarOperationServerBasePath = operationServerMap['BusinessApi.businessesControllerCreate']?.[localVarOperationServerIndex]?.url;
|
|
295
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
296
|
+
},
|
|
297
|
+
/**
|
|
298
|
+
*
|
|
299
|
+
* @summary Удалить сотрудника по локальному ID
|
|
300
|
+
* @param {number} employeeId
|
|
301
|
+
* @param {*} [options] Override http request option.
|
|
302
|
+
* @throws {RequiredError}
|
|
303
|
+
*/
|
|
304
|
+
async businessesControllerDeleteEmployee(employeeId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
305
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.businessesControllerDeleteEmployee(employeeId, options);
|
|
306
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
307
|
+
const localVarOperationServerBasePath = operationServerMap['BusinessApi.businessesControllerDeleteEmployee']?.[localVarOperationServerIndex]?.url;
|
|
308
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
309
|
+
},
|
|
310
|
+
/**
|
|
311
|
+
*
|
|
312
|
+
* @summary Получить информацию о бизнесе
|
|
313
|
+
* @param {*} [options] Override http request option.
|
|
314
|
+
* @throws {RequiredError}
|
|
315
|
+
*/
|
|
316
|
+
async businessesControllerFind(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
317
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.businessesControllerFind(options);
|
|
318
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
319
|
+
const localVarOperationServerBasePath = operationServerMap['BusinessApi.businessesControllerFind']?.[localVarOperationServerIndex]?.url;
|
|
320
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
321
|
+
},
|
|
322
|
+
/**
|
|
323
|
+
*
|
|
324
|
+
* @summary Получить список сотрудников
|
|
325
|
+
* @param {string} employeeId
|
|
326
|
+
* @param {*} [options] Override http request option.
|
|
327
|
+
* @throws {RequiredError}
|
|
328
|
+
*/
|
|
329
|
+
async businessesControllerGetEmployees(employeeId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
330
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.businessesControllerGetEmployees(employeeId, options);
|
|
331
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
332
|
+
const localVarOperationServerBasePath = operationServerMap['BusinessApi.businessesControllerGetEmployees']?.[localVarOperationServerIndex]?.url;
|
|
333
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
334
|
+
},
|
|
335
|
+
/**
|
|
336
|
+
*
|
|
337
|
+
* @summary Получить список складов
|
|
338
|
+
* @param {*} [options] Override http request option.
|
|
339
|
+
* @throws {RequiredError}
|
|
340
|
+
*/
|
|
341
|
+
async businessesControllerGetWarehouses(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
342
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.businessesControllerGetWarehouses(options);
|
|
343
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
344
|
+
const localVarOperationServerBasePath = operationServerMap['BusinessApi.businessesControllerGetWarehouses']?.[localVarOperationServerIndex]?.url;
|
|
345
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
346
|
+
},
|
|
347
|
+
/**
|
|
348
|
+
*
|
|
349
|
+
* @summary Удалить бизнес по ID (НЕПРАВИЛЬНЫЙ)
|
|
350
|
+
* @param {string} id
|
|
351
|
+
* @param {*} [options] Override http request option.
|
|
352
|
+
* @throws {RequiredError}
|
|
353
|
+
*/
|
|
354
|
+
async businessesControllerRemove(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
355
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.businessesControllerRemove(id, options);
|
|
356
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
357
|
+
const localVarOperationServerBasePath = operationServerMap['BusinessApi.businessesControllerRemove']?.[localVarOperationServerIndex]?.url;
|
|
358
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
359
|
+
},
|
|
360
|
+
/**
|
|
361
|
+
*
|
|
362
|
+
* @summary Изменить информацию о бизнесе
|
|
363
|
+
* @param {string} id
|
|
364
|
+
* @param {object} body
|
|
365
|
+
* @param {*} [options] Override http request option.
|
|
366
|
+
* @throws {RequiredError}
|
|
367
|
+
*/
|
|
368
|
+
async businessesControllerUpdate(id: string, body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
369
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.businessesControllerUpdate(id, body, options);
|
|
370
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
371
|
+
const localVarOperationServerBasePath = operationServerMap['BusinessApi.businessesControllerUpdate']?.[localVarOperationServerIndex]?.url;
|
|
372
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
373
|
+
},
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* BusinessApi - factory interface
|
|
379
|
+
*/
|
|
380
|
+
export const BusinessApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
381
|
+
const localVarFp = BusinessApiFp(configuration)
|
|
382
|
+
return {
|
|
383
|
+
/**
|
|
384
|
+
*
|
|
385
|
+
* @summary Создать бизнес
|
|
386
|
+
* @param {CreateBusinessDto} createBusinessDto
|
|
387
|
+
* @param {*} [options] Override http request option.
|
|
388
|
+
* @throws {RequiredError}
|
|
389
|
+
*/
|
|
390
|
+
businessesControllerCreate(createBusinessDto: CreateBusinessDto, options?: RawAxiosRequestConfig): AxiosPromise<object> {
|
|
391
|
+
return localVarFp.businessesControllerCreate(createBusinessDto, options).then((request) => request(axios, basePath));
|
|
392
|
+
},
|
|
393
|
+
/**
|
|
394
|
+
*
|
|
395
|
+
* @summary Удалить сотрудника по локальному ID
|
|
396
|
+
* @param {number} employeeId
|
|
397
|
+
* @param {*} [options] Override http request option.
|
|
398
|
+
* @throws {RequiredError}
|
|
399
|
+
*/
|
|
400
|
+
businessesControllerDeleteEmployee(employeeId: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
401
|
+
return localVarFp.businessesControllerDeleteEmployee(employeeId, options).then((request) => request(axios, basePath));
|
|
402
|
+
},
|
|
403
|
+
/**
|
|
404
|
+
*
|
|
405
|
+
* @summary Получить информацию о бизнесе
|
|
406
|
+
* @param {*} [options] Override http request option.
|
|
407
|
+
* @throws {RequiredError}
|
|
408
|
+
*/
|
|
409
|
+
businessesControllerFind(options?: RawAxiosRequestConfig): AxiosPromise<object> {
|
|
410
|
+
return localVarFp.businessesControllerFind(options).then((request) => request(axios, basePath));
|
|
411
|
+
},
|
|
412
|
+
/**
|
|
413
|
+
*
|
|
414
|
+
* @summary Получить список сотрудников
|
|
415
|
+
* @param {string} employeeId
|
|
416
|
+
* @param {*} [options] Override http request option.
|
|
417
|
+
* @throws {RequiredError}
|
|
418
|
+
*/
|
|
419
|
+
businessesControllerGetEmployees(employeeId: string, options?: RawAxiosRequestConfig): AxiosPromise<object> {
|
|
420
|
+
return localVarFp.businessesControllerGetEmployees(employeeId, options).then((request) => request(axios, basePath));
|
|
421
|
+
},
|
|
422
|
+
/**
|
|
423
|
+
*
|
|
424
|
+
* @summary Получить список складов
|
|
425
|
+
* @param {*} [options] Override http request option.
|
|
426
|
+
* @throws {RequiredError}
|
|
427
|
+
*/
|
|
428
|
+
businessesControllerGetWarehouses(options?: RawAxiosRequestConfig): AxiosPromise<object> {
|
|
429
|
+
return localVarFp.businessesControllerGetWarehouses(options).then((request) => request(axios, basePath));
|
|
430
|
+
},
|
|
431
|
+
/**
|
|
432
|
+
*
|
|
433
|
+
* @summary Удалить бизнес по ID (НЕПРАВИЛЬНЫЙ)
|
|
434
|
+
* @param {string} id
|
|
435
|
+
* @param {*} [options] Override http request option.
|
|
436
|
+
* @throws {RequiredError}
|
|
437
|
+
*/
|
|
438
|
+
businessesControllerRemove(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
439
|
+
return localVarFp.businessesControllerRemove(id, options).then((request) => request(axios, basePath));
|
|
440
|
+
},
|
|
441
|
+
/**
|
|
442
|
+
*
|
|
443
|
+
* @summary Изменить информацию о бизнесе
|
|
444
|
+
* @param {string} id
|
|
445
|
+
* @param {object} body
|
|
446
|
+
* @param {*} [options] Override http request option.
|
|
447
|
+
* @throws {RequiredError}
|
|
448
|
+
*/
|
|
449
|
+
businessesControllerUpdate(id: string, body: object, options?: RawAxiosRequestConfig): AxiosPromise<object> {
|
|
450
|
+
return localVarFp.businessesControllerUpdate(id, body, options).then((request) => request(axios, basePath));
|
|
451
|
+
},
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* BusinessApi - object-oriented interface
|
|
457
|
+
*/
|
|
458
|
+
export class BusinessApi extends BaseAPI {
|
|
459
|
+
/**
|
|
460
|
+
*
|
|
461
|
+
* @summary Создать бизнес
|
|
462
|
+
* @param {CreateBusinessDto} createBusinessDto
|
|
463
|
+
* @param {*} [options] Override http request option.
|
|
464
|
+
* @throws {RequiredError}
|
|
465
|
+
*/
|
|
466
|
+
public businessesControllerCreate(createBusinessDto: CreateBusinessDto, options?: RawAxiosRequestConfig) {
|
|
467
|
+
return BusinessApiFp(this.configuration).businessesControllerCreate(createBusinessDto, options).then((request) => request(this.axios, this.basePath));
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
*
|
|
472
|
+
* @summary Удалить сотрудника по локальному ID
|
|
473
|
+
* @param {number} employeeId
|
|
474
|
+
* @param {*} [options] Override http request option.
|
|
475
|
+
* @throws {RequiredError}
|
|
476
|
+
*/
|
|
477
|
+
public businessesControllerDeleteEmployee(employeeId: number, options?: RawAxiosRequestConfig) {
|
|
478
|
+
return BusinessApiFp(this.configuration).businessesControllerDeleteEmployee(employeeId, options).then((request) => request(this.axios, this.basePath));
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
*
|
|
483
|
+
* @summary Получить информацию о бизнесе
|
|
484
|
+
* @param {*} [options] Override http request option.
|
|
485
|
+
* @throws {RequiredError}
|
|
486
|
+
*/
|
|
487
|
+
public businessesControllerFind(options?: RawAxiosRequestConfig) {
|
|
488
|
+
return BusinessApiFp(this.configuration).businessesControllerFind(options).then((request) => request(this.axios, this.basePath));
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
*
|
|
493
|
+
* @summary Получить список сотрудников
|
|
494
|
+
* @param {string} employeeId
|
|
495
|
+
* @param {*} [options] Override http request option.
|
|
496
|
+
* @throws {RequiredError}
|
|
497
|
+
*/
|
|
498
|
+
public businessesControllerGetEmployees(employeeId: string, options?: RawAxiosRequestConfig) {
|
|
499
|
+
return BusinessApiFp(this.configuration).businessesControllerGetEmployees(employeeId, options).then((request) => request(this.axios, this.basePath));
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
*
|
|
504
|
+
* @summary Получить список складов
|
|
505
|
+
* @param {*} [options] Override http request option.
|
|
506
|
+
* @throws {RequiredError}
|
|
507
|
+
*/
|
|
508
|
+
public businessesControllerGetWarehouses(options?: RawAxiosRequestConfig) {
|
|
509
|
+
return BusinessApiFp(this.configuration).businessesControllerGetWarehouses(options).then((request) => request(this.axios, this.basePath));
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
*
|
|
514
|
+
* @summary Удалить бизнес по ID (НЕПРАВИЛЬНЫЙ)
|
|
515
|
+
* @param {string} id
|
|
516
|
+
* @param {*} [options] Override http request option.
|
|
517
|
+
* @throws {RequiredError}
|
|
518
|
+
*/
|
|
519
|
+
public businessesControllerRemove(id: string, options?: RawAxiosRequestConfig) {
|
|
520
|
+
return BusinessApiFp(this.configuration).businessesControllerRemove(id, options).then((request) => request(this.axios, this.basePath));
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
*
|
|
525
|
+
* @summary Изменить информацию о бизнесе
|
|
526
|
+
* @param {string} id
|
|
527
|
+
* @param {object} body
|
|
528
|
+
* @param {*} [options] Override http request option.
|
|
529
|
+
* @throws {RequiredError}
|
|
530
|
+
*/
|
|
531
|
+
public businessesControllerUpdate(id: string, body: object, options?: RawAxiosRequestConfig) {
|
|
532
|
+
return BusinessApiFp(this.configuration).businessesControllerUpdate(id, body, options).then((request) => request(this.axios, this.basePath));
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|