@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,98 @@
|
|
|
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 { LoginUserBodyDto } from '../models';
|
|
17
|
+
import type { LoginUserResponseDto } from '../models';
|
|
18
|
+
import type { LogoutUserResponseDto } from '../models';
|
|
19
|
+
/**
|
|
20
|
+
* AuthApi - axios parameter creator
|
|
21
|
+
*/
|
|
22
|
+
export declare const AuthApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @summary Авторизация
|
|
26
|
+
* @param {LoginUserBodyDto} loginUserBodyDto
|
|
27
|
+
* @param {*} [options] Override http request option.
|
|
28
|
+
* @throws {RequiredError}
|
|
29
|
+
*/
|
|
30
|
+
authControllerLogin: (loginUserBodyDto: LoginUserBodyDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @summary Выход из аккаунта
|
|
34
|
+
* @param {*} [options] Override http request option.
|
|
35
|
+
* @throws {RequiredError}
|
|
36
|
+
*/
|
|
37
|
+
authControllerLogout: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* AuthApi - functional programming interface
|
|
41
|
+
*/
|
|
42
|
+
export declare const AuthApiFp: (configuration?: Configuration) => {
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @summary Авторизация
|
|
46
|
+
* @param {LoginUserBodyDto} loginUserBodyDto
|
|
47
|
+
* @param {*} [options] Override http request option.
|
|
48
|
+
* @throws {RequiredError}
|
|
49
|
+
*/
|
|
50
|
+
authControllerLogin(loginUserBodyDto: LoginUserBodyDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoginUserResponseDto>>;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @summary Выход из аккаунта
|
|
54
|
+
* @param {*} [options] Override http request option.
|
|
55
|
+
* @throws {RequiredError}
|
|
56
|
+
*/
|
|
57
|
+
authControllerLogout(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LogoutUserResponseDto>>;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* AuthApi - factory interface
|
|
61
|
+
*/
|
|
62
|
+
export declare const AuthApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @summary Авторизация
|
|
66
|
+
* @param {LoginUserBodyDto} loginUserBodyDto
|
|
67
|
+
* @param {*} [options] Override http request option.
|
|
68
|
+
* @throws {RequiredError}
|
|
69
|
+
*/
|
|
70
|
+
authControllerLogin(loginUserBodyDto: LoginUserBodyDto, options?: RawAxiosRequestConfig): AxiosPromise<LoginUserResponseDto>;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @summary Выход из аккаунта
|
|
74
|
+
* @param {*} [options] Override http request option.
|
|
75
|
+
* @throws {RequiredError}
|
|
76
|
+
*/
|
|
77
|
+
authControllerLogout(options?: RawAxiosRequestConfig): AxiosPromise<LogoutUserResponseDto>;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* AuthApi - object-oriented interface
|
|
81
|
+
*/
|
|
82
|
+
export declare class AuthApi extends BaseAPI {
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @summary Авторизация
|
|
86
|
+
* @param {LoginUserBodyDto} loginUserBodyDto
|
|
87
|
+
* @param {*} [options] Override http request option.
|
|
88
|
+
* @throws {RequiredError}
|
|
89
|
+
*/
|
|
90
|
+
authControllerLogin(loginUserBodyDto: LoginUserBodyDto, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<LoginUserResponseDto, any, {}>>;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @summary Выход из аккаунта
|
|
94
|
+
* @param {*} [options] Override http request option.
|
|
95
|
+
* @throws {RequiredError}
|
|
96
|
+
*/
|
|
97
|
+
authControllerLogout(options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<LogoutUserResponseDto, any, {}>>;
|
|
98
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
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.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = 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
|
+
* AuthApi - axios parameter creator
|
|
37
|
+
*/
|
|
38
|
+
const AuthApiAxiosParamCreator = function (configuration) {
|
|
39
|
+
return {
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @summary Авторизация
|
|
43
|
+
* @param {LoginUserBodyDto} loginUserBodyDto
|
|
44
|
+
* @param {*} [options] Override http request option.
|
|
45
|
+
* @throws {RequiredError}
|
|
46
|
+
*/
|
|
47
|
+
authControllerLogin: (loginUserBodyDto_1, ...args_1) => __awaiter(this, [loginUserBodyDto_1, ...args_1], void 0, function* (loginUserBodyDto, options = {}) {
|
|
48
|
+
// verify required parameter 'loginUserBodyDto' is not null or undefined
|
|
49
|
+
(0, common_1.assertParamExists)('authControllerLogin', 'loginUserBodyDto', loginUserBodyDto);
|
|
50
|
+
const localVarPath = `/auth/login`;
|
|
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
|
+
// authentication bearer required
|
|
61
|
+
// http bearer authentication required
|
|
62
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
63
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
64
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
65
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
66
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
67
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(loginUserBodyDto, localVarRequestOptions, configuration);
|
|
68
|
+
return {
|
|
69
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
70
|
+
options: localVarRequestOptions,
|
|
71
|
+
};
|
|
72
|
+
}),
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @summary Выход из аккаунта
|
|
76
|
+
* @param {*} [options] Override http request option.
|
|
77
|
+
* @throws {RequiredError}
|
|
78
|
+
*/
|
|
79
|
+
authControllerLogout: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
80
|
+
const localVarPath = `/auth/logout`;
|
|
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
|
+
// authentication bearer required
|
|
91
|
+
// http bearer authentication required
|
|
92
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
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
|
+
exports.AuthApiAxiosParamCreator = AuthApiAxiosParamCreator;
|
|
104
|
+
/**
|
|
105
|
+
* AuthApi - functional programming interface
|
|
106
|
+
*/
|
|
107
|
+
const AuthApiFp = function (configuration) {
|
|
108
|
+
const localVarAxiosParamCreator = (0, exports.AuthApiAxiosParamCreator)(configuration);
|
|
109
|
+
return {
|
|
110
|
+
/**
|
|
111
|
+
*
|
|
112
|
+
* @summary Авторизация
|
|
113
|
+
* @param {LoginUserBodyDto} loginUserBodyDto
|
|
114
|
+
* @param {*} [options] Override http request option.
|
|
115
|
+
* @throws {RequiredError}
|
|
116
|
+
*/
|
|
117
|
+
authControllerLogin(loginUserBodyDto, options) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
var _a, _b, _c;
|
|
120
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.authControllerLogin(loginUserBodyDto, options);
|
|
121
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
122
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthApi.authControllerLogin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
123
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
124
|
+
});
|
|
125
|
+
},
|
|
126
|
+
/**
|
|
127
|
+
*
|
|
128
|
+
* @summary Выход из аккаунта
|
|
129
|
+
* @param {*} [options] Override http request option.
|
|
130
|
+
* @throws {RequiredError}
|
|
131
|
+
*/
|
|
132
|
+
authControllerLogout(options) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
var _a, _b, _c;
|
|
135
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.authControllerLogout(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['AuthApi.authControllerLogout']) === 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.AuthApiFp = AuthApiFp;
|
|
144
|
+
/**
|
|
145
|
+
* AuthApi - factory interface
|
|
146
|
+
*/
|
|
147
|
+
const AuthApiFactory = function (configuration, basePath, axios) {
|
|
148
|
+
const localVarFp = (0, exports.AuthApiFp)(configuration);
|
|
149
|
+
return {
|
|
150
|
+
/**
|
|
151
|
+
*
|
|
152
|
+
* @summary Авторизация
|
|
153
|
+
* @param {LoginUserBodyDto} loginUserBodyDto
|
|
154
|
+
* @param {*} [options] Override http request option.
|
|
155
|
+
* @throws {RequiredError}
|
|
156
|
+
*/
|
|
157
|
+
authControllerLogin(loginUserBodyDto, options) {
|
|
158
|
+
return localVarFp.authControllerLogin(loginUserBodyDto, options).then((request) => request(axios, basePath));
|
|
159
|
+
},
|
|
160
|
+
/**
|
|
161
|
+
*
|
|
162
|
+
* @summary Выход из аккаунта
|
|
163
|
+
* @param {*} [options] Override http request option.
|
|
164
|
+
* @throws {RequiredError}
|
|
165
|
+
*/
|
|
166
|
+
authControllerLogout(options) {
|
|
167
|
+
return localVarFp.authControllerLogout(options).then((request) => request(axios, basePath));
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
exports.AuthApiFactory = AuthApiFactory;
|
|
172
|
+
/**
|
|
173
|
+
* AuthApi - object-oriented interface
|
|
174
|
+
*/
|
|
175
|
+
class AuthApi extends base_1.BaseAPI {
|
|
176
|
+
/**
|
|
177
|
+
*
|
|
178
|
+
* @summary Авторизация
|
|
179
|
+
* @param {LoginUserBodyDto} loginUserBodyDto
|
|
180
|
+
* @param {*} [options] Override http request option.
|
|
181
|
+
* @throws {RequiredError}
|
|
182
|
+
*/
|
|
183
|
+
authControllerLogin(loginUserBodyDto, options) {
|
|
184
|
+
return (0, exports.AuthApiFp)(this.configuration).authControllerLogin(loginUserBodyDto, options).then((request) => request(this.axios, this.basePath));
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
*
|
|
188
|
+
* @summary Выход из аккаунта
|
|
189
|
+
* @param {*} [options] Override http request option.
|
|
190
|
+
* @throws {RequiredError}
|
|
191
|
+
*/
|
|
192
|
+
authControllerLogout(options) {
|
|
193
|
+
return (0, exports.AuthApiFp)(this.configuration).authControllerLogout(options).then((request) => request(this.axios, this.basePath));
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
exports.AuthApi = AuthApi;
|
|
@@ -0,0 +1,256 @@
|
|
|
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 { CreateBusinessDto } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* BusinessApi - axios parameter creator
|
|
19
|
+
*/
|
|
20
|
+
export declare const BusinessApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @summary Создать бизнес
|
|
24
|
+
* @param {CreateBusinessDto} createBusinessDto
|
|
25
|
+
* @param {*} [options] Override http request option.
|
|
26
|
+
* @throws {RequiredError}
|
|
27
|
+
*/
|
|
28
|
+
businessesControllerCreate: (createBusinessDto: CreateBusinessDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @summary Удалить сотрудника по локальному ID
|
|
32
|
+
* @param {number} employeeId
|
|
33
|
+
* @param {*} [options] Override http request option.
|
|
34
|
+
* @throws {RequiredError}
|
|
35
|
+
*/
|
|
36
|
+
businessesControllerDeleteEmployee: (employeeId: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @summary Получить информацию о бизнесе
|
|
40
|
+
* @param {*} [options] Override http request option.
|
|
41
|
+
* @throws {RequiredError}
|
|
42
|
+
*/
|
|
43
|
+
businessesControllerFind: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @summary Получить список сотрудников
|
|
47
|
+
* @param {string} employeeId
|
|
48
|
+
* @param {*} [options] Override http request option.
|
|
49
|
+
* @throws {RequiredError}
|
|
50
|
+
*/
|
|
51
|
+
businessesControllerGetEmployees: (employeeId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @summary Получить список складов
|
|
55
|
+
* @param {*} [options] Override http request option.
|
|
56
|
+
* @throws {RequiredError}
|
|
57
|
+
*/
|
|
58
|
+
businessesControllerGetWarehouses: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @summary Удалить бизнес по ID (НЕПРАВИЛЬНЫЙ)
|
|
62
|
+
* @param {string} id
|
|
63
|
+
* @param {*} [options] Override http request option.
|
|
64
|
+
* @throws {RequiredError}
|
|
65
|
+
*/
|
|
66
|
+
businessesControllerRemove: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @summary Изменить информацию о бизнесе
|
|
70
|
+
* @param {string} id
|
|
71
|
+
* @param {object} body
|
|
72
|
+
* @param {*} [options] Override http request option.
|
|
73
|
+
* @throws {RequiredError}
|
|
74
|
+
*/
|
|
75
|
+
businessesControllerUpdate: (id: string, body: object, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* BusinessApi - functional programming interface
|
|
79
|
+
*/
|
|
80
|
+
export declare const BusinessApiFp: (configuration?: Configuration) => {
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @summary Создать бизнес
|
|
84
|
+
* @param {CreateBusinessDto} createBusinessDto
|
|
85
|
+
* @param {*} [options] Override http request option.
|
|
86
|
+
* @throws {RequiredError}
|
|
87
|
+
*/
|
|
88
|
+
businessesControllerCreate(createBusinessDto: CreateBusinessDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @summary Удалить сотрудника по локальному ID
|
|
92
|
+
* @param {number} employeeId
|
|
93
|
+
* @param {*} [options] Override http request option.
|
|
94
|
+
* @throws {RequiredError}
|
|
95
|
+
*/
|
|
96
|
+
businessesControllerDeleteEmployee(employeeId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @summary Получить информацию о бизнесе
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
*/
|
|
103
|
+
businessesControllerFind(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @summary Получить список сотрудников
|
|
107
|
+
* @param {string} employeeId
|
|
108
|
+
* @param {*} [options] Override http request option.
|
|
109
|
+
* @throws {RequiredError}
|
|
110
|
+
*/
|
|
111
|
+
businessesControllerGetEmployees(employeeId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @summary Получить список складов
|
|
115
|
+
* @param {*} [options] Override http request option.
|
|
116
|
+
* @throws {RequiredError}
|
|
117
|
+
*/
|
|
118
|
+
businessesControllerGetWarehouses(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @summary Удалить бизнес по ID (НЕПРАВИЛЬНЫЙ)
|
|
122
|
+
* @param {string} id
|
|
123
|
+
* @param {*} [options] Override http request option.
|
|
124
|
+
* @throws {RequiredError}
|
|
125
|
+
*/
|
|
126
|
+
businessesControllerRemove(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
127
|
+
/**
|
|
128
|
+
*
|
|
129
|
+
* @summary Изменить информацию о бизнесе
|
|
130
|
+
* @param {string} id
|
|
131
|
+
* @param {object} body
|
|
132
|
+
* @param {*} [options] Override http request option.
|
|
133
|
+
* @throws {RequiredError}
|
|
134
|
+
*/
|
|
135
|
+
businessesControllerUpdate(id: string, body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* BusinessApi - factory interface
|
|
139
|
+
*/
|
|
140
|
+
export declare const BusinessApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* @summary Создать бизнес
|
|
144
|
+
* @param {CreateBusinessDto} createBusinessDto
|
|
145
|
+
* @param {*} [options] Override http request option.
|
|
146
|
+
* @throws {RequiredError}
|
|
147
|
+
*/
|
|
148
|
+
businessesControllerCreate(createBusinessDto: CreateBusinessDto, options?: RawAxiosRequestConfig): AxiosPromise<object>;
|
|
149
|
+
/**
|
|
150
|
+
*
|
|
151
|
+
* @summary Удалить сотрудника по локальному ID
|
|
152
|
+
* @param {number} employeeId
|
|
153
|
+
* @param {*} [options] Override http request option.
|
|
154
|
+
* @throws {RequiredError}
|
|
155
|
+
*/
|
|
156
|
+
businessesControllerDeleteEmployee(employeeId: number, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
157
|
+
/**
|
|
158
|
+
*
|
|
159
|
+
* @summary Получить информацию о бизнесе
|
|
160
|
+
* @param {*} [options] Override http request option.
|
|
161
|
+
* @throws {RequiredError}
|
|
162
|
+
*/
|
|
163
|
+
businessesControllerFind(options?: RawAxiosRequestConfig): AxiosPromise<object>;
|
|
164
|
+
/**
|
|
165
|
+
*
|
|
166
|
+
* @summary Получить список сотрудников
|
|
167
|
+
* @param {string} employeeId
|
|
168
|
+
* @param {*} [options] Override http request option.
|
|
169
|
+
* @throws {RequiredError}
|
|
170
|
+
*/
|
|
171
|
+
businessesControllerGetEmployees(employeeId: string, options?: RawAxiosRequestConfig): AxiosPromise<object>;
|
|
172
|
+
/**
|
|
173
|
+
*
|
|
174
|
+
* @summary Получить список складов
|
|
175
|
+
* @param {*} [options] Override http request option.
|
|
176
|
+
* @throws {RequiredError}
|
|
177
|
+
*/
|
|
178
|
+
businessesControllerGetWarehouses(options?: RawAxiosRequestConfig): AxiosPromise<object>;
|
|
179
|
+
/**
|
|
180
|
+
*
|
|
181
|
+
* @summary Удалить бизнес по ID (НЕПРАВИЛЬНЫЙ)
|
|
182
|
+
* @param {string} id
|
|
183
|
+
* @param {*} [options] Override http request option.
|
|
184
|
+
* @throws {RequiredError}
|
|
185
|
+
*/
|
|
186
|
+
businessesControllerRemove(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
187
|
+
/**
|
|
188
|
+
*
|
|
189
|
+
* @summary Изменить информацию о бизнесе
|
|
190
|
+
* @param {string} id
|
|
191
|
+
* @param {object} body
|
|
192
|
+
* @param {*} [options] Override http request option.
|
|
193
|
+
* @throws {RequiredError}
|
|
194
|
+
*/
|
|
195
|
+
businessesControllerUpdate(id: string, body: object, options?: RawAxiosRequestConfig): AxiosPromise<object>;
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* BusinessApi - object-oriented interface
|
|
199
|
+
*/
|
|
200
|
+
export declare class BusinessApi extends BaseAPI {
|
|
201
|
+
/**
|
|
202
|
+
*
|
|
203
|
+
* @summary Создать бизнес
|
|
204
|
+
* @param {CreateBusinessDto} createBusinessDto
|
|
205
|
+
* @param {*} [options] Override http request option.
|
|
206
|
+
* @throws {RequiredError}
|
|
207
|
+
*/
|
|
208
|
+
businessesControllerCreate(createBusinessDto: CreateBusinessDto, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<object, any, {}>>;
|
|
209
|
+
/**
|
|
210
|
+
*
|
|
211
|
+
* @summary Удалить сотрудника по локальному ID
|
|
212
|
+
* @param {number} employeeId
|
|
213
|
+
* @param {*} [options] Override http request option.
|
|
214
|
+
* @throws {RequiredError}
|
|
215
|
+
*/
|
|
216
|
+
businessesControllerDeleteEmployee(employeeId: number, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<void, any, {}>>;
|
|
217
|
+
/**
|
|
218
|
+
*
|
|
219
|
+
* @summary Получить информацию о бизнесе
|
|
220
|
+
* @param {*} [options] Override http request option.
|
|
221
|
+
* @throws {RequiredError}
|
|
222
|
+
*/
|
|
223
|
+
businessesControllerFind(options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<object, any, {}>>;
|
|
224
|
+
/**
|
|
225
|
+
*
|
|
226
|
+
* @summary Получить список сотрудников
|
|
227
|
+
* @param {string} employeeId
|
|
228
|
+
* @param {*} [options] Override http request option.
|
|
229
|
+
* @throws {RequiredError}
|
|
230
|
+
*/
|
|
231
|
+
businessesControllerGetEmployees(employeeId: string, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<object, any, {}>>;
|
|
232
|
+
/**
|
|
233
|
+
*
|
|
234
|
+
* @summary Получить список складов
|
|
235
|
+
* @param {*} [options] Override http request option.
|
|
236
|
+
* @throws {RequiredError}
|
|
237
|
+
*/
|
|
238
|
+
businessesControllerGetWarehouses(options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<object, any, {}>>;
|
|
239
|
+
/**
|
|
240
|
+
*
|
|
241
|
+
* @summary Удалить бизнес по ID (НЕПРАВИЛЬНЫЙ)
|
|
242
|
+
* @param {string} id
|
|
243
|
+
* @param {*} [options] Override http request option.
|
|
244
|
+
* @throws {RequiredError}
|
|
245
|
+
*/
|
|
246
|
+
businessesControllerRemove(id: string, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<void, any, {}>>;
|
|
247
|
+
/**
|
|
248
|
+
*
|
|
249
|
+
* @summary Изменить информацию о бизнесе
|
|
250
|
+
* @param {string} id
|
|
251
|
+
* @param {object} body
|
|
252
|
+
* @param {*} [options] Override http request option.
|
|
253
|
+
* @throws {RequiredError}
|
|
254
|
+
*/
|
|
255
|
+
businessesControllerUpdate(id: string, body: object, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<object, any, {}>>;
|
|
256
|
+
}
|