feat: Документация для wallet-transaction
This commit is contained in:
+238
@@ -3673,6 +3673,177 @@ paths:
|
||||
500:
|
||||
description: Internal Server Error.
|
||||
|
||||
/wallet-transaction/index:
|
||||
get:
|
||||
tags:
|
||||
- wallet
|
||||
summary: Получение списка транзакций кошельков
|
||||
parameters:
|
||||
- name: created_at
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Дата или диапазон дат транзакции.
|
||||
- name: wallet_transaction_type
|
||||
in: query
|
||||
schema:
|
||||
$ref: '#/components/schemas/walletTransactionType'
|
||||
description: Тип транзакции
|
||||
- name: wallet_operation_type
|
||||
in: query
|
||||
schema:
|
||||
$ref: '#/components/schemas/walletOperationType'
|
||||
description: Тип операции кошелька
|
||||
- name: sender_wallet_id
|
||||
in: query
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
format: uuid
|
||||
- type: array
|
||||
items:
|
||||
type: string
|
||||
format: uuid
|
||||
description: UUID кошелька отправителя (один или несколько)
|
||||
- name: recipient_wallet_id
|
||||
in: query
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
format: uuid
|
||||
- type: array
|
||||
items:
|
||||
type: string
|
||||
format: uuid
|
||||
description: UUID кошелька получателя (один или несколько)
|
||||
- name: sender_user_id
|
||||
in: query
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
format: uuid
|
||||
- type: array
|
||||
items:
|
||||
type: string
|
||||
format: uuid
|
||||
description: UUID пользователя-отправителя (один или несколько)
|
||||
- name: recipient_user_id
|
||||
in: query
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
format: uuid
|
||||
- type: array
|
||||
items:
|
||||
type: string
|
||||
format: uuid
|
||||
description: UUID пользователя-получателя (один или несколько)
|
||||
- name: entity_id
|
||||
in: query
|
||||
schema:
|
||||
type: number
|
||||
description: ID связанной сущности
|
||||
- name: reference_id
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Внешний идентификатор транзакции
|
||||
- name: wallet_id
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: UUID кошелька (отправителя или получателя)
|
||||
- name: department_id
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: UUID подразделения
|
||||
- name: sender_user_list_key
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Ключ списка пользователей отправителей
|
||||
- name: recipient_user_list_key
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Ключ списка пользователей получателей
|
||||
responses:
|
||||
200:
|
||||
description: Список транзакций кошельков
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/dataProviderResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/walletTransaction'
|
||||
401:
|
||||
description: Unauthorized.
|
||||
403:
|
||||
description: Forbidden.
|
||||
422:
|
||||
description: Data validation failed.
|
||||
500:
|
||||
description: Internal Server Error.
|
||||
|
||||
/wallet-transaction/gift:
|
||||
post:
|
||||
summary: Отправка подарка пользователю
|
||||
tags:
|
||||
- wallet
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- user_id
|
||||
- amount
|
||||
- comment
|
||||
properties:
|
||||
user_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: UUID пользователя, которому отправляется подарок
|
||||
example: 'c0a80101-0000-4000-a000-000000000001'
|
||||
amount:
|
||||
type: integer
|
||||
minimum: 1
|
||||
description: Сумма подарка
|
||||
example: 50
|
||||
comment:
|
||||
type: string
|
||||
maxLength: 400
|
||||
description: Комментарий к транзакции
|
||||
example: 'Поздравляю с достижением!'
|
||||
responses:
|
||||
200:
|
||||
description: Результат отправки подарка
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/httpJsonResponse'
|
||||
401:
|
||||
description: Unauthorized.
|
||||
403:
|
||||
description: Forbidden.
|
||||
422:
|
||||
description: Data validation failed.
|
||||
500:
|
||||
description: Internal Server Error.
|
||||
|
||||
/shop/product/sort-type:
|
||||
get:
|
||||
tags:
|
||||
@@ -10378,6 +10549,73 @@ components:
|
||||
format: uuid
|
||||
example: "c73f48dd-ae57-496e-b973-20d048651f70"
|
||||
|
||||
walletTransactionType:
|
||||
type: integer
|
||||
description: >
|
||||
Тип транзакции:
|
||||
* `1` - Начисление
|
||||
* `2` - Списание
|
||||
enum: [1, 2]
|
||||
example: 1
|
||||
|
||||
walletOperationType:
|
||||
type: integer
|
||||
description: >
|
||||
Тип операции кошелька:
|
||||
* `1` - Начисление валюты
|
||||
* `2` - Списание валюты
|
||||
* `3` - Перевод валюты
|
||||
* `4` - Назначено достижение
|
||||
* `5` - Покупка в магазине
|
||||
* `6` - Автоматическое начисление валюты
|
||||
* `7` - Подарок (автоматическое начисление)
|
||||
* `8` - Подарок (процент от баланса)
|
||||
enum: [1, 2, 3, 4, 5, 6, 7, 8]
|
||||
example: 3
|
||||
|
||||
walletTransaction:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 'd290f1ee-6c54-4b01-90e6-d701748f0851'
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
example: '2025-07-21 14:35:00'
|
||||
wallet_transaction_type:
|
||||
$ref: '#/components/schemas/walletTransactionType'
|
||||
wallet_operation_type:
|
||||
$ref: '#/components/schemas/walletOperationType'
|
||||
administrator_id:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 'c1a22f77-932e-4c7a-98b3-7c65b8b2a3e0'
|
||||
sender_wallet_id:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 'a115e5b4-b56a-4ef0-a96b-4d18b9f3e293'
|
||||
recipient_wallet_id:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 'b265e53c-e8e6-4aa1-8576-b1dc5b2c1fd3'
|
||||
amount:
|
||||
type: number
|
||||
format: int
|
||||
example: 150
|
||||
entity_id:
|
||||
type: number
|
||||
example: 42
|
||||
reference_id:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 'deadbeef-0000-0000-0000-deadbeef0000'
|
||||
comment:
|
||||
type: string
|
||||
nullable: true
|
||||
example: 'Покупка в магазине'
|
||||
|
||||
parameters:
|
||||
boardDateTypeParam:
|
||||
in: query
|
||||
|
||||
Reference in New Issue
Block a user