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