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