@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,198 @@
|
|
|
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.WarehouseProductsApi = exports.WarehouseProductsApiFactory = exports.WarehouseProductsApiFp = exports.WarehouseProductsApiAxiosParamCreator = 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
|
+
* WarehouseProductsApi - axios parameter creator
|
|
37
|
+
*/
|
|
38
|
+
const WarehouseProductsApiAxiosParamCreator = function (configuration) {
|
|
39
|
+
return {
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @summary Перемещение товара между складами
|
|
43
|
+
* @param {ChangeWarehouseDto} changeWarehouseDto
|
|
44
|
+
* @param {*} [options] Override http request option.
|
|
45
|
+
* @throws {RequiredError}
|
|
46
|
+
*/
|
|
47
|
+
warehouseProductsControllerChangeWarehouses: (changeWarehouseDto_1, ...args_1) => __awaiter(this, [changeWarehouseDto_1, ...args_1], void 0, function* (changeWarehouseDto, options = {}) {
|
|
48
|
+
// verify required parameter 'changeWarehouseDto' is not null or undefined
|
|
49
|
+
(0, common_1.assertParamExists)('warehouseProductsControllerChangeWarehouses', 'changeWarehouseDto', changeWarehouseDto);
|
|
50
|
+
const localVarPath = `/wp`;
|
|
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)(changeWarehouseDto, localVarRequestOptions, configuration);
|
|
65
|
+
return {
|
|
66
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
67
|
+
options: localVarRequestOptions,
|
|
68
|
+
};
|
|
69
|
+
}),
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @summary Продажа товара
|
|
73
|
+
* @param {SellProductDto} sellProductDto
|
|
74
|
+
* @param {*} [options] Override http request option.
|
|
75
|
+
* @throws {RequiredError}
|
|
76
|
+
*/
|
|
77
|
+
warehouseProductsControllerStock: (sellProductDto_1, ...args_1) => __awaiter(this, [sellProductDto_1, ...args_1], void 0, function* (sellProductDto, options = {}) {
|
|
78
|
+
// verify required parameter 'sellProductDto' is not null or undefined
|
|
79
|
+
(0, common_1.assertParamExists)('warehouseProductsControllerStock', 'sellProductDto', sellProductDto);
|
|
80
|
+
const localVarPath = `/wp/stock`;
|
|
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: 'POST' }, baseOptions), options);
|
|
88
|
+
const localVarHeaderParameter = {};
|
|
89
|
+
const localVarQueryParameter = {};
|
|
90
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
91
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
92
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
93
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
94
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(sellProductDto, localVarRequestOptions, configuration);
|
|
95
|
+
return {
|
|
96
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
97
|
+
options: localVarRequestOptions,
|
|
98
|
+
};
|
|
99
|
+
}),
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
exports.WarehouseProductsApiAxiosParamCreator = WarehouseProductsApiAxiosParamCreator;
|
|
103
|
+
/**
|
|
104
|
+
* WarehouseProductsApi - functional programming interface
|
|
105
|
+
*/
|
|
106
|
+
const WarehouseProductsApiFp = function (configuration) {
|
|
107
|
+
const localVarAxiosParamCreator = (0, exports.WarehouseProductsApiAxiosParamCreator)(configuration);
|
|
108
|
+
return {
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @summary Перемещение товара между складами
|
|
112
|
+
* @param {ChangeWarehouseDto} changeWarehouseDto
|
|
113
|
+
* @param {*} [options] Override http request option.
|
|
114
|
+
* @throws {RequiredError}
|
|
115
|
+
*/
|
|
116
|
+
warehouseProductsControllerChangeWarehouses(changeWarehouseDto, options) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
var _a, _b, _c;
|
|
119
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.warehouseProductsControllerChangeWarehouses(changeWarehouseDto, options);
|
|
120
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
121
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WarehouseProductsApi.warehouseProductsControllerChangeWarehouses']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
122
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
123
|
+
});
|
|
124
|
+
},
|
|
125
|
+
/**
|
|
126
|
+
*
|
|
127
|
+
* @summary Продажа товара
|
|
128
|
+
* @param {SellProductDto} sellProductDto
|
|
129
|
+
* @param {*} [options] Override http request option.
|
|
130
|
+
* @throws {RequiredError}
|
|
131
|
+
*/
|
|
132
|
+
warehouseProductsControllerStock(sellProductDto, options) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
var _a, _b, _c;
|
|
135
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.warehouseProductsControllerStock(sellProductDto, options);
|
|
136
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
137
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WarehouseProductsApi.warehouseProductsControllerStock']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
138
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
139
|
+
});
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
exports.WarehouseProductsApiFp = WarehouseProductsApiFp;
|
|
144
|
+
/**
|
|
145
|
+
* WarehouseProductsApi - factory interface
|
|
146
|
+
*/
|
|
147
|
+
const WarehouseProductsApiFactory = function (configuration, basePath, axios) {
|
|
148
|
+
const localVarFp = (0, exports.WarehouseProductsApiFp)(configuration);
|
|
149
|
+
return {
|
|
150
|
+
/**
|
|
151
|
+
*
|
|
152
|
+
* @summary Перемещение товара между складами
|
|
153
|
+
* @param {ChangeWarehouseDto} changeWarehouseDto
|
|
154
|
+
* @param {*} [options] Override http request option.
|
|
155
|
+
* @throws {RequiredError}
|
|
156
|
+
*/
|
|
157
|
+
warehouseProductsControllerChangeWarehouses(changeWarehouseDto, options) {
|
|
158
|
+
return localVarFp.warehouseProductsControllerChangeWarehouses(changeWarehouseDto, options).then((request) => request(axios, basePath));
|
|
159
|
+
},
|
|
160
|
+
/**
|
|
161
|
+
*
|
|
162
|
+
* @summary Продажа товара
|
|
163
|
+
* @param {SellProductDto} sellProductDto
|
|
164
|
+
* @param {*} [options] Override http request option.
|
|
165
|
+
* @throws {RequiredError}
|
|
166
|
+
*/
|
|
167
|
+
warehouseProductsControllerStock(sellProductDto, options) {
|
|
168
|
+
return localVarFp.warehouseProductsControllerStock(sellProductDto, options).then((request) => request(axios, basePath));
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
exports.WarehouseProductsApiFactory = WarehouseProductsApiFactory;
|
|
173
|
+
/**
|
|
174
|
+
* WarehouseProductsApi - object-oriented interface
|
|
175
|
+
*/
|
|
176
|
+
class WarehouseProductsApi extends base_1.BaseAPI {
|
|
177
|
+
/**
|
|
178
|
+
*
|
|
179
|
+
* @summary Перемещение товара между складами
|
|
180
|
+
* @param {ChangeWarehouseDto} changeWarehouseDto
|
|
181
|
+
* @param {*} [options] Override http request option.
|
|
182
|
+
* @throws {RequiredError}
|
|
183
|
+
*/
|
|
184
|
+
warehouseProductsControllerChangeWarehouses(changeWarehouseDto, options) {
|
|
185
|
+
return (0, exports.WarehouseProductsApiFp)(this.configuration).warehouseProductsControllerChangeWarehouses(changeWarehouseDto, options).then((request) => request(this.axios, this.basePath));
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
*
|
|
189
|
+
* @summary Продажа товара
|
|
190
|
+
* @param {SellProductDto} sellProductDto
|
|
191
|
+
* @param {*} [options] Override http request option.
|
|
192
|
+
* @throws {RequiredError}
|
|
193
|
+
*/
|
|
194
|
+
warehouseProductsControllerStock(sellProductDto, options) {
|
|
195
|
+
return (0, exports.WarehouseProductsApiFp)(this.configuration).warehouseProductsControllerStock(sellProductDto, options).then((request) => request(this.axios, this.basePath));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
exports.WarehouseProductsApi = WarehouseProductsApi;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MyMarket API
|
|
3
|
+
* API для управления товарами и транзакциями
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.2
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from '../configuration';
|
|
13
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
import globalAxios from 'axios';
|
|
15
|
+
import { type RequestArgs, BaseAPI } from '../base';
|
|
16
|
+
import type { CreateWarehouseDto } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* WarehousesApi - axios parameter creator
|
|
19
|
+
*/
|
|
20
|
+
export declare const WarehousesApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @summary Создание склада
|
|
24
|
+
* @param {CreateWarehouseDto} createWarehouseDto
|
|
25
|
+
* @param {*} [options] Override http request option.
|
|
26
|
+
* @throws {RequiredError}
|
|
27
|
+
*/
|
|
28
|
+
warehousesControllerCreate: (createWarehouseDto: CreateWarehouseDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @summary Удаление склада по ID
|
|
32
|
+
* @param {string} id
|
|
33
|
+
* @param {*} [options] Override http request option.
|
|
34
|
+
* @throws {RequiredError}
|
|
35
|
+
*/
|
|
36
|
+
warehousesControllerDelete: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @summary Получения доступных пользователю складов
|
|
40
|
+
* @param {*} [options] Override http request option.
|
|
41
|
+
* @throws {RequiredError}
|
|
42
|
+
*/
|
|
43
|
+
warehousesControllerFind: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* WarehousesApi - functional programming interface
|
|
47
|
+
*/
|
|
48
|
+
export declare const WarehousesApiFp: (configuration?: Configuration) => {
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @summary Создание склада
|
|
52
|
+
* @param {CreateWarehouseDto} createWarehouseDto
|
|
53
|
+
* @param {*} [options] Override http request option.
|
|
54
|
+
* @throws {RequiredError}
|
|
55
|
+
*/
|
|
56
|
+
warehousesControllerCreate(createWarehouseDto: CreateWarehouseDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @summary Удаление склада по ID
|
|
60
|
+
* @param {string} id
|
|
61
|
+
* @param {*} [options] Override http request option.
|
|
62
|
+
* @throws {RequiredError}
|
|
63
|
+
*/
|
|
64
|
+
warehousesControllerDelete(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @summary Получения доступных пользователю складов
|
|
68
|
+
* @param {*} [options] Override http request option.
|
|
69
|
+
* @throws {RequiredError}
|
|
70
|
+
*/
|
|
71
|
+
warehousesControllerFind(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* WarehousesApi - factory interface
|
|
75
|
+
*/
|
|
76
|
+
export declare const WarehousesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @summary Создание склада
|
|
80
|
+
* @param {CreateWarehouseDto} createWarehouseDto
|
|
81
|
+
* @param {*} [options] Override http request option.
|
|
82
|
+
* @throws {RequiredError}
|
|
83
|
+
*/
|
|
84
|
+
warehousesControllerCreate(createWarehouseDto: CreateWarehouseDto, options?: RawAxiosRequestConfig): AxiosPromise<object>;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @summary Удаление склада по ID
|
|
88
|
+
* @param {string} id
|
|
89
|
+
* @param {*} [options] Override http request option.
|
|
90
|
+
* @throws {RequiredError}
|
|
91
|
+
*/
|
|
92
|
+
warehousesControllerDelete(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @summary Получения доступных пользователю складов
|
|
96
|
+
* @param {*} [options] Override http request option.
|
|
97
|
+
* @throws {RequiredError}
|
|
98
|
+
*/
|
|
99
|
+
warehousesControllerFind(options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* WarehousesApi - object-oriented interface
|
|
103
|
+
*/
|
|
104
|
+
export declare class WarehousesApi extends BaseAPI {
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @summary Создание склада
|
|
108
|
+
* @param {CreateWarehouseDto} createWarehouseDto
|
|
109
|
+
* @param {*} [options] Override http request option.
|
|
110
|
+
* @throws {RequiredError}
|
|
111
|
+
*/
|
|
112
|
+
warehousesControllerCreate(createWarehouseDto: CreateWarehouseDto, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<object, any, {}>>;
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* @summary Удаление склада по ID
|
|
116
|
+
* @param {string} id
|
|
117
|
+
* @param {*} [options] Override http request option.
|
|
118
|
+
* @throws {RequiredError}
|
|
119
|
+
*/
|
|
120
|
+
warehousesControllerDelete(id: string, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<void, any, {}>>;
|
|
121
|
+
/**
|
|
122
|
+
*
|
|
123
|
+
* @summary Получения доступных пользователю складов
|
|
124
|
+
* @param {*} [options] Override http request option.
|
|
125
|
+
* @throws {RequiredError}
|
|
126
|
+
*/
|
|
127
|
+
warehousesControllerFind(options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<void, any, {}>>;
|
|
128
|
+
}
|
|
@@ -0,0 +1,255 @@
|
|
|
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.WarehousesApi = exports.WarehousesApiFactory = exports.WarehousesApiFp = exports.WarehousesApiAxiosParamCreator = 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
|
+
* WarehousesApi - axios parameter creator
|
|
37
|
+
*/
|
|
38
|
+
const WarehousesApiAxiosParamCreator = function (configuration) {
|
|
39
|
+
return {
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @summary Создание склада
|
|
43
|
+
* @param {CreateWarehouseDto} createWarehouseDto
|
|
44
|
+
* @param {*} [options] Override http request option.
|
|
45
|
+
* @throws {RequiredError}
|
|
46
|
+
*/
|
|
47
|
+
warehousesControllerCreate: (createWarehouseDto_1, ...args_1) => __awaiter(this, [createWarehouseDto_1, ...args_1], void 0, function* (createWarehouseDto, options = {}) {
|
|
48
|
+
// verify required parameter 'createWarehouseDto' is not null or undefined
|
|
49
|
+
(0, common_1.assertParamExists)('warehousesControllerCreate', 'createWarehouseDto', createWarehouseDto);
|
|
50
|
+
const localVarPath = `/warehouses`;
|
|
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)(createWarehouseDto, localVarRequestOptions, configuration);
|
|
65
|
+
return {
|
|
66
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
67
|
+
options: localVarRequestOptions,
|
|
68
|
+
};
|
|
69
|
+
}),
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @summary Удаление склада по ID
|
|
73
|
+
* @param {string} id
|
|
74
|
+
* @param {*} [options] Override http request option.
|
|
75
|
+
* @throws {RequiredError}
|
|
76
|
+
*/
|
|
77
|
+
warehousesControllerDelete: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
78
|
+
// verify required parameter 'id' is not null or undefined
|
|
79
|
+
(0, common_1.assertParamExists)('warehousesControllerDelete', 'id', id);
|
|
80
|
+
const localVarPath = `/warehouses/{id}`
|
|
81
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
82
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
83
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
84
|
+
let baseOptions;
|
|
85
|
+
if (configuration) {
|
|
86
|
+
baseOptions = configuration.baseOptions;
|
|
87
|
+
}
|
|
88
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
89
|
+
const localVarHeaderParameter = {};
|
|
90
|
+
const localVarQueryParameter = {};
|
|
91
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
92
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
93
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
94
|
+
return {
|
|
95
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
96
|
+
options: localVarRequestOptions,
|
|
97
|
+
};
|
|
98
|
+
}),
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @summary Получения доступных пользователю складов
|
|
102
|
+
* @param {*} [options] Override http request option.
|
|
103
|
+
* @throws {RequiredError}
|
|
104
|
+
*/
|
|
105
|
+
warehousesControllerFind: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
106
|
+
const localVarPath = `/warehouses`;
|
|
107
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
108
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
109
|
+
let baseOptions;
|
|
110
|
+
if (configuration) {
|
|
111
|
+
baseOptions = configuration.baseOptions;
|
|
112
|
+
}
|
|
113
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
114
|
+
const localVarHeaderParameter = {};
|
|
115
|
+
const localVarQueryParameter = {};
|
|
116
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
117
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
118
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
119
|
+
return {
|
|
120
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
121
|
+
options: localVarRequestOptions,
|
|
122
|
+
};
|
|
123
|
+
}),
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
exports.WarehousesApiAxiosParamCreator = WarehousesApiAxiosParamCreator;
|
|
127
|
+
/**
|
|
128
|
+
* WarehousesApi - functional programming interface
|
|
129
|
+
*/
|
|
130
|
+
const WarehousesApiFp = function (configuration) {
|
|
131
|
+
const localVarAxiosParamCreator = (0, exports.WarehousesApiAxiosParamCreator)(configuration);
|
|
132
|
+
return {
|
|
133
|
+
/**
|
|
134
|
+
*
|
|
135
|
+
* @summary Создание склада
|
|
136
|
+
* @param {CreateWarehouseDto} createWarehouseDto
|
|
137
|
+
* @param {*} [options] Override http request option.
|
|
138
|
+
* @throws {RequiredError}
|
|
139
|
+
*/
|
|
140
|
+
warehousesControllerCreate(createWarehouseDto, options) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
var _a, _b, _c;
|
|
143
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.warehousesControllerCreate(createWarehouseDto, options);
|
|
144
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
145
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WarehousesApi.warehousesControllerCreate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
146
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
147
|
+
});
|
|
148
|
+
},
|
|
149
|
+
/**
|
|
150
|
+
*
|
|
151
|
+
* @summary Удаление склада по ID
|
|
152
|
+
* @param {string} id
|
|
153
|
+
* @param {*} [options] Override http request option.
|
|
154
|
+
* @throws {RequiredError}
|
|
155
|
+
*/
|
|
156
|
+
warehousesControllerDelete(id, options) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
var _a, _b, _c;
|
|
159
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.warehousesControllerDelete(id, options);
|
|
160
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
161
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WarehousesApi.warehousesControllerDelete']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
162
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
/**
|
|
166
|
+
*
|
|
167
|
+
* @summary Получения доступных пользователю складов
|
|
168
|
+
* @param {*} [options] Override http request option.
|
|
169
|
+
* @throws {RequiredError}
|
|
170
|
+
*/
|
|
171
|
+
warehousesControllerFind(options) {
|
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
var _a, _b, _c;
|
|
174
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.warehousesControllerFind(options);
|
|
175
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
176
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WarehousesApi.warehousesControllerFind']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
177
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
178
|
+
});
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
exports.WarehousesApiFp = WarehousesApiFp;
|
|
183
|
+
/**
|
|
184
|
+
* WarehousesApi - factory interface
|
|
185
|
+
*/
|
|
186
|
+
const WarehousesApiFactory = function (configuration, basePath, axios) {
|
|
187
|
+
const localVarFp = (0, exports.WarehousesApiFp)(configuration);
|
|
188
|
+
return {
|
|
189
|
+
/**
|
|
190
|
+
*
|
|
191
|
+
* @summary Создание склада
|
|
192
|
+
* @param {CreateWarehouseDto} createWarehouseDto
|
|
193
|
+
* @param {*} [options] Override http request option.
|
|
194
|
+
* @throws {RequiredError}
|
|
195
|
+
*/
|
|
196
|
+
warehousesControllerCreate(createWarehouseDto, options) {
|
|
197
|
+
return localVarFp.warehousesControllerCreate(createWarehouseDto, options).then((request) => request(axios, basePath));
|
|
198
|
+
},
|
|
199
|
+
/**
|
|
200
|
+
*
|
|
201
|
+
* @summary Удаление склада по ID
|
|
202
|
+
* @param {string} id
|
|
203
|
+
* @param {*} [options] Override http request option.
|
|
204
|
+
* @throws {RequiredError}
|
|
205
|
+
*/
|
|
206
|
+
warehousesControllerDelete(id, options) {
|
|
207
|
+
return localVarFp.warehousesControllerDelete(id, options).then((request) => request(axios, basePath));
|
|
208
|
+
},
|
|
209
|
+
/**
|
|
210
|
+
*
|
|
211
|
+
* @summary Получения доступных пользователю складов
|
|
212
|
+
* @param {*} [options] Override http request option.
|
|
213
|
+
* @throws {RequiredError}
|
|
214
|
+
*/
|
|
215
|
+
warehousesControllerFind(options) {
|
|
216
|
+
return localVarFp.warehousesControllerFind(options).then((request) => request(axios, basePath));
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
exports.WarehousesApiFactory = WarehousesApiFactory;
|
|
221
|
+
/**
|
|
222
|
+
* WarehousesApi - object-oriented interface
|
|
223
|
+
*/
|
|
224
|
+
class WarehousesApi extends base_1.BaseAPI {
|
|
225
|
+
/**
|
|
226
|
+
*
|
|
227
|
+
* @summary Создание склада
|
|
228
|
+
* @param {CreateWarehouseDto} createWarehouseDto
|
|
229
|
+
* @param {*} [options] Override http request option.
|
|
230
|
+
* @throws {RequiredError}
|
|
231
|
+
*/
|
|
232
|
+
warehousesControllerCreate(createWarehouseDto, options) {
|
|
233
|
+
return (0, exports.WarehousesApiFp)(this.configuration).warehousesControllerCreate(createWarehouseDto, options).then((request) => request(this.axios, this.basePath));
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
*
|
|
237
|
+
* @summary Удаление склада по ID
|
|
238
|
+
* @param {string} id
|
|
239
|
+
* @param {*} [options] Override http request option.
|
|
240
|
+
* @throws {RequiredError}
|
|
241
|
+
*/
|
|
242
|
+
warehousesControllerDelete(id, options) {
|
|
243
|
+
return (0, exports.WarehousesApiFp)(this.configuration).warehousesControllerDelete(id, options).then((request) => request(this.axios, this.basePath));
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
*
|
|
247
|
+
* @summary Получения доступных пользователю складов
|
|
248
|
+
* @param {*} [options] Override http request option.
|
|
249
|
+
* @throws {RequiredError}
|
|
250
|
+
*/
|
|
251
|
+
warehousesControllerFind(options) {
|
|
252
|
+
return (0, exports.WarehousesApiFp)(this.configuration).warehousesControllerFind(options).then((request) => request(this.axios, this.basePath));
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
exports.WarehousesApi = WarehousesApi;
|
package/dist/base.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MyMarket API
|
|
3
|
+
* API для управления товарами и транзакциями
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.2
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from './configuration';
|
|
13
|
+
import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
export declare const BASE_PATH: string;
|
|
15
|
+
export declare const COLLECTION_FORMATS: {
|
|
16
|
+
csv: string;
|
|
17
|
+
ssv: string;
|
|
18
|
+
tsv: string;
|
|
19
|
+
pipes: string;
|
|
20
|
+
};
|
|
21
|
+
export interface RequestArgs {
|
|
22
|
+
url: string;
|
|
23
|
+
options: RawAxiosRequestConfig;
|
|
24
|
+
}
|
|
25
|
+
export declare class BaseAPI {
|
|
26
|
+
protected basePath: string;
|
|
27
|
+
protected axios: AxiosInstance;
|
|
28
|
+
protected configuration: Configuration | undefined;
|
|
29
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
30
|
+
}
|
|
31
|
+
export declare class RequiredError extends Error {
|
|
32
|
+
field: string;
|
|
33
|
+
constructor(field: string, msg?: string);
|
|
34
|
+
}
|
|
35
|
+
interface ServerMap {
|
|
36
|
+
[key: string]: {
|
|
37
|
+
url: string;
|
|
38
|
+
description: string;
|
|
39
|
+
}[];
|
|
40
|
+
}
|
|
41
|
+
export declare const operationServerMap: ServerMap;
|
|
42
|
+
export {};
|
package/dist/base.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
20
|
+
const axios_1 = __importDefault(require("axios"));
|
|
21
|
+
exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
22
|
+
exports.COLLECTION_FORMATS = {
|
|
23
|
+
csv: ",",
|
|
24
|
+
ssv: " ",
|
|
25
|
+
tsv: "\t",
|
|
26
|
+
pipes: "|",
|
|
27
|
+
};
|
|
28
|
+
class BaseAPI {
|
|
29
|
+
constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
|
|
30
|
+
var _a;
|
|
31
|
+
this.basePath = basePath;
|
|
32
|
+
this.axios = axios;
|
|
33
|
+
if (configuration) {
|
|
34
|
+
this.configuration = configuration;
|
|
35
|
+
this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.BaseAPI = BaseAPI;
|
|
40
|
+
;
|
|
41
|
+
class RequiredError extends Error {
|
|
42
|
+
constructor(field, msg) {
|
|
43
|
+
super(msg);
|
|
44
|
+
this.field = field;
|
|
45
|
+
this.name = "RequiredError";
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.RequiredError = RequiredError;
|
|
49
|
+
exports.operationServerMap = {};
|