@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,63 @@
|
|
|
1
|
+
.gitignore
|
|
2
|
+
.npmignore
|
|
3
|
+
README.md
|
|
4
|
+
api.ts
|
|
5
|
+
apis/auth-api.ts
|
|
6
|
+
apis/business-api.ts
|
|
7
|
+
apis/default-api.ts
|
|
8
|
+
apis/employees-api.ts
|
|
9
|
+
apis/products-api.ts
|
|
10
|
+
apis/users-api.ts
|
|
11
|
+
apis/warehouse-products-api.ts
|
|
12
|
+
apis/warehouses-api.ts
|
|
13
|
+
base.ts
|
|
14
|
+
common.ts
|
|
15
|
+
configuration.ts
|
|
16
|
+
docs/AuthApi.md
|
|
17
|
+
docs/BusinessApi.md
|
|
18
|
+
docs/ChangePasswordDto.md
|
|
19
|
+
docs/ChangeWarehouseDto.md
|
|
20
|
+
docs/ChangeWarehouseItemDto.md
|
|
21
|
+
docs/CreateBusinessDto.md
|
|
22
|
+
docs/CreateProductDto.md
|
|
23
|
+
docs/CreateWarehouseDto.md
|
|
24
|
+
docs/DefaultApi.md
|
|
25
|
+
docs/EmployeesApi.md
|
|
26
|
+
docs/ExceptionDto.md
|
|
27
|
+
docs/ForgotPasswordDto.md
|
|
28
|
+
docs/LoginUserBodyDto.md
|
|
29
|
+
docs/LoginUserResponseDto.md
|
|
30
|
+
docs/LogoutUserResponseDto.md
|
|
31
|
+
docs/ProductsApi.md
|
|
32
|
+
docs/RegisterEmployeeDto.md
|
|
33
|
+
docs/RegisterOwnerDto.md
|
|
34
|
+
docs/ResetPasswordDto.md
|
|
35
|
+
docs/SellItemDto.md
|
|
36
|
+
docs/SellProductDto.md
|
|
37
|
+
docs/UpdateProductDto.md
|
|
38
|
+
docs/UsersApi.md
|
|
39
|
+
docs/WarehouseProductsApi.md
|
|
40
|
+
docs/WarehousesApi.md
|
|
41
|
+
git_push.sh
|
|
42
|
+
index.ts
|
|
43
|
+
models/change-password-dto.ts
|
|
44
|
+
models/change-warehouse-dto.ts
|
|
45
|
+
models/change-warehouse-item-dto.ts
|
|
46
|
+
models/create-business-dto.ts
|
|
47
|
+
models/create-product-dto.ts
|
|
48
|
+
models/create-warehouse-dto.ts
|
|
49
|
+
models/exception-dto.ts
|
|
50
|
+
models/forgot-password-dto.ts
|
|
51
|
+
models/index.ts
|
|
52
|
+
models/login-user-body-dto.ts
|
|
53
|
+
models/login-user-response-dto.ts
|
|
54
|
+
models/logout-user-response-dto.ts
|
|
55
|
+
models/register-employee-dto.ts
|
|
56
|
+
models/register-owner-dto.ts
|
|
57
|
+
models/reset-password-dto.ts
|
|
58
|
+
models/sell-item-dto.ts
|
|
59
|
+
models/sell-product-dto.ts
|
|
60
|
+
models/update-product-dto.ts
|
|
61
|
+
package.json
|
|
62
|
+
tsconfig.esm.json
|
|
63
|
+
tsconfig.json
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7.17.0
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# OpenAPI Generator Ignore
|
|
2
|
+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
3
|
+
|
|
4
|
+
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
+
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
+
|
|
7
|
+
# As an example, the C# client generator defines ApiClient.cs.
|
|
8
|
+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
9
|
+
#ApiClient.cs
|
|
10
|
+
|
|
11
|
+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
12
|
+
#foo/*/qux
|
|
13
|
+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
14
|
+
|
|
15
|
+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
16
|
+
#foo/**/qux
|
|
17
|
+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
18
|
+
|
|
19
|
+
# You can also negate patterns with an exclamation (!).
|
|
20
|
+
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
21
|
+
#docs/*.md
|
|
22
|
+
# Then explicitly reverse the ignore rule for a single file:
|
|
23
|
+
#!docs/README.md
|
package/README.md
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
## @my-market-contracts@0.0.1
|
|
2
|
+
|
|
3
|
+
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
|
+
|
|
5
|
+
Environment
|
|
6
|
+
* Node.js
|
|
7
|
+
* Webpack
|
|
8
|
+
* Browserify
|
|
9
|
+
|
|
10
|
+
Language level
|
|
11
|
+
* ES5 - you must have a Promises/A+ library installed
|
|
12
|
+
* ES6
|
|
13
|
+
|
|
14
|
+
Module system
|
|
15
|
+
* CommonJS
|
|
16
|
+
* ES6 module system
|
|
17
|
+
|
|
18
|
+
It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
|
|
19
|
+
|
|
20
|
+
### Building
|
|
21
|
+
|
|
22
|
+
To build and compile the typescript sources to javascript use:
|
|
23
|
+
```
|
|
24
|
+
npm install
|
|
25
|
+
npm run build
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Publishing
|
|
29
|
+
|
|
30
|
+
First build the package then run `npm publish`
|
|
31
|
+
|
|
32
|
+
### Consuming
|
|
33
|
+
|
|
34
|
+
navigate to the folder of your consuming project and run one of the following commands.
|
|
35
|
+
|
|
36
|
+
_published:_
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
npm install @my-market-contracts@0.0.1 --save
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
_unPublished (not recommended):_
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
npm install PATH_TO_GENERATED_PACKAGE --save
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Documentation for API Endpoints
|
|
49
|
+
|
|
50
|
+
All URIs are relative to *http://localhost*
|
|
51
|
+
|
|
52
|
+
Class | Method | HTTP request | Description
|
|
53
|
+
------------ | ------------- | ------------- | -------------
|
|
54
|
+
*DefaultApi* | [**rolesControllerApply**](docs/DefaultApi.md#rolescontrollerapply) | **POST** /roles/add_role_user | Назначить роль пользователю
|
|
55
|
+
*DefaultApi* | [**rolesControllerCreate**](docs/DefaultApi.md#rolescontrollercreate) | **POST** /roles | Создать роль
|
|
56
|
+
*DefaultApi* | [**rolesControllerDelete**](docs/DefaultApi.md#rolescontrollerdelete) | **DELETE** /roles/{id} | Удалить роль
|
|
57
|
+
*DefaultApi* | [**rolesControllerFindAll**](docs/DefaultApi.md#rolescontrollerfindall) | **GET** /roles/get_all | Получить все роли
|
|
58
|
+
*DefaultApi* | [**rolesControllerRemove**](docs/DefaultApi.md#rolescontrollerremove) | **DELETE** /roles/remove_role_user | Удалить роль у пользователя
|
|
59
|
+
*DefaultApi* | [**rolesControllerUpdate**](docs/DefaultApi.md#rolescontrollerupdate) | **PATCH** /roles/{id} | Обновить роль
|
|
60
|
+
*AuthApi* | [**authControllerLogin**](docs/AuthApi.md#authcontrollerlogin) | **POST** /auth/login | Авторизация
|
|
61
|
+
*AuthApi* | [**authControllerLogout**](docs/AuthApi.md#authcontrollerlogout) | **POST** /auth/logout | Выход из аккаунта
|
|
62
|
+
*BusinessApi* | [**businessesControllerCreate**](docs/BusinessApi.md#businessescontrollercreate) | **POST** /business | Создать бизнес
|
|
63
|
+
*BusinessApi* | [**businessesControllerDeleteEmployee**](docs/BusinessApi.md#businessescontrollerdeleteemployee) | **DELETE** /business/employees | Удалить сотрудника по локальному ID
|
|
64
|
+
*BusinessApi* | [**businessesControllerFind**](docs/BusinessApi.md#businessescontrollerfind) | **GET** /business | Получить информацию о бизнесе
|
|
65
|
+
*BusinessApi* | [**businessesControllerGetEmployees**](docs/BusinessApi.md#businessescontrollergetemployees) | **GET** /business/employees | Получить список сотрудников
|
|
66
|
+
*BusinessApi* | [**businessesControllerGetWarehouses**](docs/BusinessApi.md#businessescontrollergetwarehouses) | **GET** /business/warehouses | Получить список складов
|
|
67
|
+
*BusinessApi* | [**businessesControllerRemove**](docs/BusinessApi.md#businessescontrollerremove) | **DELETE** /business/{id} | Удалить бизнес по ID (НЕПРАВИЛЬНЫЙ)
|
|
68
|
+
*BusinessApi* | [**businessesControllerUpdate**](docs/BusinessApi.md#businessescontrollerupdate) | **PATCH** /business/{id} | Изменить информацию о бизнесе
|
|
69
|
+
*EmployeesApi* | [**employeesControllerAccessToWarehouse**](docs/EmployeesApi.md#employeescontrolleraccesstowarehouse) | **POST** /employees/warehouse | Дать доступ к складу
|
|
70
|
+
*EmployeesApi* | [**employeesControllerGenerateCode**](docs/EmployeesApi.md#employeescontrollergeneratecode) | **POST** /employees/generate | Генерация реферального кода
|
|
71
|
+
*EmployeesApi* | [**employeesControllerRegister**](docs/EmployeesApi.md#employeescontrollerregister) | **POST** /employees | Регистрация сотрудника
|
|
72
|
+
*ProductsApi* | [**productsControllerCreate**](docs/ProductsApi.md#productscontrollercreate) | **POST** /products | Создать товар
|
|
73
|
+
*ProductsApi* | [**productsControllerFindAll**](docs/ProductsApi.md#productscontrollerfindall) | **GET** /products | Получить список товаров по складу? с пагинацией
|
|
74
|
+
*ProductsApi* | [**productsControllerFindOne**](docs/ProductsApi.md#productscontrollerfindone) | **GET** /products/{id} | Получить товар по ID
|
|
75
|
+
*ProductsApi* | [**productsControllerRemove**](docs/ProductsApi.md#productscontrollerremove) | **DELETE** /products/{id} | Удалить товар
|
|
76
|
+
*ProductsApi* | [**productsControllerSearch**](docs/ProductsApi.md#productscontrollersearch) | **GET** /products/search | Поиск товаров
|
|
77
|
+
*ProductsApi* | [**productsControllerUpdate**](docs/ProductsApi.md#productscontrollerupdate) | **PATCH** /products/{id} | Обновить товар
|
|
78
|
+
*UsersApi* | [**usersControllerChangePassword**](docs/UsersApi.md#userscontrollerchangepassword) | **POST** /users/changepassword | Сменить пароль пользователя
|
|
79
|
+
*UsersApi* | [**usersControllerForgotPassword**](docs/UsersApi.md#userscontrollerforgotpassword) | **POST** /users/forgot-password | Отправка письма на восстановление пароля
|
|
80
|
+
*UsersApi* | [**usersControllerGetProfile**](docs/UsersApi.md#userscontrollergetprofile) | **GET** /users/profile | Получить профиль пользователя
|
|
81
|
+
*UsersApi* | [**usersControllerRegisterOwner**](docs/UsersApi.md#userscontrollerregisterowner) | **POST** /users/register | Регистрация владельца бизнеса
|
|
82
|
+
*UsersApi* | [**usersControllerResetPassword**](docs/UsersApi.md#userscontrollerresetpassword) | **POST** /users/reset-password | Сброс пароля с помощью токена
|
|
83
|
+
*UsersApi* | [**usersControllerVerifyEmail**](docs/UsersApi.md#userscontrollerverifyemail) | **GET** /users/verify-email/{token} | Подтверждения email с помощью токена
|
|
84
|
+
*WarehouseProductsApi* | [**warehouseProductsControllerChangeWarehouses**](docs/WarehouseProductsApi.md#warehouseproductscontrollerchangewarehouses) | **POST** /wp | Перемещение товара между складами
|
|
85
|
+
*WarehouseProductsApi* | [**warehouseProductsControllerStock**](docs/WarehouseProductsApi.md#warehouseproductscontrollerstock) | **POST** /wp/stock | Продажа товара
|
|
86
|
+
*WarehousesApi* | [**warehousesControllerCreate**](docs/WarehousesApi.md#warehousescontrollercreate) | **POST** /warehouses | Создание склада
|
|
87
|
+
*WarehousesApi* | [**warehousesControllerDelete**](docs/WarehousesApi.md#warehousescontrollerdelete) | **DELETE** /warehouses/{id} | Удаление склада по ID
|
|
88
|
+
*WarehousesApi* | [**warehousesControllerFind**](docs/WarehousesApi.md#warehousescontrollerfind) | **GET** /warehouses | Получения доступных пользователю складов
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### Documentation For Models
|
|
92
|
+
|
|
93
|
+
- [ChangePasswordDto](docs/ChangePasswordDto.md)
|
|
94
|
+
- [ChangeWarehouseDto](docs/ChangeWarehouseDto.md)
|
|
95
|
+
- [ChangeWarehouseItemDto](docs/ChangeWarehouseItemDto.md)
|
|
96
|
+
- [CreateBusinessDto](docs/CreateBusinessDto.md)
|
|
97
|
+
- [CreateProductDto](docs/CreateProductDto.md)
|
|
98
|
+
- [CreateWarehouseDto](docs/CreateWarehouseDto.md)
|
|
99
|
+
- [ExceptionDto](docs/ExceptionDto.md)
|
|
100
|
+
- [ForgotPasswordDto](docs/ForgotPasswordDto.md)
|
|
101
|
+
- [LoginUserBodyDto](docs/LoginUserBodyDto.md)
|
|
102
|
+
- [LoginUserResponseDto](docs/LoginUserResponseDto.md)
|
|
103
|
+
- [LogoutUserResponseDto](docs/LogoutUserResponseDto.md)
|
|
104
|
+
- [RegisterEmployeeDto](docs/RegisterEmployeeDto.md)
|
|
105
|
+
- [RegisterOwnerDto](docs/RegisterOwnerDto.md)
|
|
106
|
+
- [ResetPasswordDto](docs/ResetPasswordDto.md)
|
|
107
|
+
- [SellItemDto](docs/SellItemDto.md)
|
|
108
|
+
- [SellProductDto](docs/SellProductDto.md)
|
|
109
|
+
- [UpdateProductDto](docs/UpdateProductDto.md)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
<a id="documentation-for-authorization"></a>
|
|
113
|
+
## Documentation For Authorization
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
Authentication schemes defined for the API:
|
|
117
|
+
<a id="bearer"></a>
|
|
118
|
+
### bearer
|
|
119
|
+
|
|
120
|
+
- **Type**: Bearer authentication (JWT)
|
|
121
|
+
|
package/api.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MyMarket API
|
|
5
|
+
* API для управления товарами и транзакциями
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.2
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export * from './apis/default-api';
|
|
18
|
+
export * from './apis/auth-api';
|
|
19
|
+
export * from './apis/business-api';
|
|
20
|
+
export * from './apis/employees-api';
|
|
21
|
+
export * from './apis/products-api';
|
|
22
|
+
export * from './apis/users-api';
|
|
23
|
+
export * from './apis/warehouse-products-api';
|
|
24
|
+
export * from './apis/warehouses-api';
|
|
25
|
+
|
package/apis/auth-api.ts
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MyMarket API
|
|
5
|
+
* API для управления товарами и транзакциями
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.2
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import type { Configuration } from '../configuration';
|
|
17
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
18
|
+
import globalAxios from 'axios';
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
import type { ExceptionDto } from '../models';
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import type { LoginUserBodyDto } from '../models';
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
import type { LoginUserResponseDto } from '../models';
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
import type { LogoutUserResponseDto } from '../models';
|
|
32
|
+
/**
|
|
33
|
+
* AuthApi - axios parameter creator
|
|
34
|
+
*/
|
|
35
|
+
export const AuthApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
36
|
+
return {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @summary Авторизация
|
|
40
|
+
* @param {LoginUserBodyDto} loginUserBodyDto
|
|
41
|
+
* @param {*} [options] Override http request option.
|
|
42
|
+
* @throws {RequiredError}
|
|
43
|
+
*/
|
|
44
|
+
authControllerLogin: async (loginUserBodyDto: LoginUserBodyDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
45
|
+
// verify required parameter 'loginUserBodyDto' is not null or undefined
|
|
46
|
+
assertParamExists('authControllerLogin', 'loginUserBodyDto', loginUserBodyDto)
|
|
47
|
+
const localVarPath = `/auth/login`;
|
|
48
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
49
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
50
|
+
let baseOptions;
|
|
51
|
+
if (configuration) {
|
|
52
|
+
baseOptions = configuration.baseOptions;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
56
|
+
const localVarHeaderParameter = {} as any;
|
|
57
|
+
const localVarQueryParameter = {} as any;
|
|
58
|
+
|
|
59
|
+
// authentication bearer required
|
|
60
|
+
// http bearer authentication required
|
|
61
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
66
|
+
|
|
67
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
68
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
69
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
70
|
+
localVarRequestOptions.data = serializeDataIfNeeded(loginUserBodyDto, localVarRequestOptions, configuration)
|
|
71
|
+
|
|
72
|
+
return {
|
|
73
|
+
url: toPathString(localVarUrlObj),
|
|
74
|
+
options: localVarRequestOptions,
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @summary Выход из аккаунта
|
|
80
|
+
* @param {*} [options] Override http request option.
|
|
81
|
+
* @throws {RequiredError}
|
|
82
|
+
*/
|
|
83
|
+
authControllerLogout: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
84
|
+
const localVarPath = `/auth/logout`;
|
|
85
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
86
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
87
|
+
let baseOptions;
|
|
88
|
+
if (configuration) {
|
|
89
|
+
baseOptions = configuration.baseOptions;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
93
|
+
const localVarHeaderParameter = {} as any;
|
|
94
|
+
const localVarQueryParameter = {} as any;
|
|
95
|
+
|
|
96
|
+
// authentication bearer required
|
|
97
|
+
// http bearer authentication required
|
|
98
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
103
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
104
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
url: toPathString(localVarUrlObj),
|
|
108
|
+
options: localVarRequestOptions,
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* AuthApi - functional programming interface
|
|
116
|
+
*/
|
|
117
|
+
export const AuthApiFp = function(configuration?: Configuration) {
|
|
118
|
+
const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration)
|
|
119
|
+
return {
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @summary Авторизация
|
|
123
|
+
* @param {LoginUserBodyDto} loginUserBodyDto
|
|
124
|
+
* @param {*} [options] Override http request option.
|
|
125
|
+
* @throws {RequiredError}
|
|
126
|
+
*/
|
|
127
|
+
async authControllerLogin(loginUserBodyDto: LoginUserBodyDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoginUserResponseDto>> {
|
|
128
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerLogin(loginUserBodyDto, options);
|
|
129
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
130
|
+
const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerLogin']?.[localVarOperationServerIndex]?.url;
|
|
131
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
132
|
+
},
|
|
133
|
+
/**
|
|
134
|
+
*
|
|
135
|
+
* @summary Выход из аккаунта
|
|
136
|
+
* @param {*} [options] Override http request option.
|
|
137
|
+
* @throws {RequiredError}
|
|
138
|
+
*/
|
|
139
|
+
async authControllerLogout(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LogoutUserResponseDto>> {
|
|
140
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerLogout(options);
|
|
141
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
142
|
+
const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerLogout']?.[localVarOperationServerIndex]?.url;
|
|
143
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
144
|
+
},
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* AuthApi - factory interface
|
|
150
|
+
*/
|
|
151
|
+
export const AuthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
152
|
+
const localVarFp = AuthApiFp(configuration)
|
|
153
|
+
return {
|
|
154
|
+
/**
|
|
155
|
+
*
|
|
156
|
+
* @summary Авторизация
|
|
157
|
+
* @param {LoginUserBodyDto} loginUserBodyDto
|
|
158
|
+
* @param {*} [options] Override http request option.
|
|
159
|
+
* @throws {RequiredError}
|
|
160
|
+
*/
|
|
161
|
+
authControllerLogin(loginUserBodyDto: LoginUserBodyDto, options?: RawAxiosRequestConfig): AxiosPromise<LoginUserResponseDto> {
|
|
162
|
+
return localVarFp.authControllerLogin(loginUserBodyDto, options).then((request) => request(axios, basePath));
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
*
|
|
166
|
+
* @summary Выход из аккаунта
|
|
167
|
+
* @param {*} [options] Override http request option.
|
|
168
|
+
* @throws {RequiredError}
|
|
169
|
+
*/
|
|
170
|
+
authControllerLogout(options?: RawAxiosRequestConfig): AxiosPromise<LogoutUserResponseDto> {
|
|
171
|
+
return localVarFp.authControllerLogout(options).then((request) => request(axios, basePath));
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* AuthApi - object-oriented interface
|
|
178
|
+
*/
|
|
179
|
+
export class AuthApi extends BaseAPI {
|
|
180
|
+
/**
|
|
181
|
+
*
|
|
182
|
+
* @summary Авторизация
|
|
183
|
+
* @param {LoginUserBodyDto} loginUserBodyDto
|
|
184
|
+
* @param {*} [options] Override http request option.
|
|
185
|
+
* @throws {RequiredError}
|
|
186
|
+
*/
|
|
187
|
+
public authControllerLogin(loginUserBodyDto: LoginUserBodyDto, options?: RawAxiosRequestConfig) {
|
|
188
|
+
return AuthApiFp(this.configuration).authControllerLogin(loginUserBodyDto, options).then((request) => request(this.axios, this.basePath));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
*
|
|
193
|
+
* @summary Выход из аккаунта
|
|
194
|
+
* @param {*} [options] Override http request option.
|
|
195
|
+
* @throws {RequiredError}
|
|
196
|
+
*/
|
|
197
|
+
public authControllerLogout(options?: RawAxiosRequestConfig) {
|
|
198
|
+
return AuthApiFp(this.configuration).authControllerLogout(options).then((request) => request(this.axios, this.basePath));
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|